up previous next
2.10.1 Introduction to RINGHOM
A value of type INT or RAT can be automatically mapped into any ring. The way to "move" a RINGELEM value from one ring to another is to apply a ring homomorphism; the homomorphism can also transform the value as it is mapped. Think mathematically! ;-)

Common ways to create a ring homomorphism include CanonicalHom , PolyRingHom and PolyAlgebraHom .

The syntax mimics that of a function call (as in mathematical formulas). Given a RINGHOM phi just type phi(x) if x is a RINGELEM, phi(x) if x is a LIST or MAT; applies phi to each entry. An ideal cannot be mapped directly, you must instead map the generators individually: e.g.ideal(phi(gens(I))).

There are also a few handy shortcuts which automatically determine and apply a homomorphism. The functions matrix and RingElem will map the argument into the given ring (e.g.matrix(R, M) maps M into a new matrix in the ring R). Another shortcut is BringIn (easy, but slow).

NOTE: all CoCoA functions should be smart enough to take into account the RING in which their value was defined, for example GBasis , LT , wdeg ,...