up previous next
Tutorial-11: ring homomorphisms
Tutorial-11 for CoCoA-5
CoCoA-5 lets you create ring homomorphisms; these are useful for
various purposes such as "moving" a value from one ring to another.
A homomorphism from a polynomial ring must state what the images
of the indeterminates are; and, if the homomorphism is not an
algebra homomorphism, how the coefficient ring is mapped.
/**/ P1 ::= QQ[x,y]; // polys in x,y with coefficients in QQ
/**/ P2 ::= QQ[a,b]; // polys in a,b with coefficients in ZZ/(2)
/**/ use P2; IndetImages := [a^2, b^3];
/**/ phi := PolyAlgebraHom(P1, P2, IndetImages);
/**/ use P1;
/**/ f := 2*x^2 + 3*y + 4;
2*a^4 + 3*b^3 + 4