Synopsis:
i1 : R = ZZ[x,y]; |
i2 : S = ZZ[a,b,c]; |
i3 : f = map(R,S,matrix {{x^2,x*y,y^2}}) |
i4 : f(a+b+c^2) |
i5 : g = map(R,S,matrix {{1,2,3},{4,5,6}}) |
i6 : g(a+b) |
If the coefficient ring of S is itself a polynomial ring, then one may optionally include values to which its variables should be sent: they should appear first in the matrix m.
i7 : S = ZZ[a][b,c]; |
i8 : h = map(S,S,matrix {{b,c,a}}) |
i9 : h(a^7 + b^3 + c) |
i10 : k = map(S,S,matrix {{c,b}}) |
i11 : k(a^7 + b^3 + c) |