Changing Ring

ChangeRing(A, R) : Mtrx, Rng -> Mtrx
Matrix(R, A) : Rng, Mtrx -> Mtrx
Given a matrix A over a ring S having m rows and n columns, and another ring R, return the m x n matrix over R obtained by coercing the entries of A from S into R. The argument order to ChangeRing(A, R) here is consistent with other forms of ChangeRing, while the Matrix(R, A) form of this function is provided to be consistent with the matrix creation functions above, for which the destination ring is the first argument, if supplied.
ChangeRing(A, R, f) : Mtrx, Rng, Map -> Mtrx
ChangeRing(A, f) : Mtrx, Map -> Mtrx
Given a matrix A over a ring S having m rows and n columns, another ring R, and a map f:S -> R, return the m x n matrix over R obtained by applying f to each of the entries of A. The R may be omitted, in which case it is taken to be the codomain of f.
CanChangeRing(A, R) : Mtrx, Rng -> BoolElt, Mtrx
Return whether the entries in the matrix A can be coerced into R and the matrix resulting from ChangeRing(A, R) if so.
V2.28, 13 July 2023