maps between rings

The class of all ring homomorphisms is RingMap. A ring homomorphism from a polynomial ring S to a ring R is obtained with map by providing a list of elements in R to which the generators (variables) of S should go, as follows.

i1 : R = ZZ/101[a,b];
i2 : S = ZZ/101[x,y,z];
i3 : f = map(R,S,{a^2,a*b,b^2})

               2        2
o3 = map(R,S,{a , a*b, b })

o3 : RingMap R <--- S

(Notice that the target of f is the first argument of map and the source of f is the second argument.)

We can apply this ring map to elements of S in the usual way.

i4 : f(x+y+z)

      2          2
o4 = a  + a*b + b 

o4 : R
i5 : f S_2

      2
o5 = b

o5 : R

Composition of ring maps is possible.

i6 : g = map(S,ZZ/101[t],{x+y+z})

            ZZ
o6 = map(S,---[t],{x + y + z})
           101

                     ZZ
o6 : RingMap S <--- ---[t]
                    101
i7 : f * g

            ZZ      2          2
o7 = map(R,---[t],{a  + a*b + b })
           101

                     ZZ
o7 : RingMap R <--- ---[t]
                    101

The defining matrix of f can be recovered with the key matrix.

i8 : f.matrix

o8 = {0} | a2 ab b2 |

             1       3
o8 : Matrix R  <--- R

We can produce the kernel of f with kernel.

i9 : kernel f

            2
o9 = ideal(y  - x*z)

o9 : Ideal of S

We can produce the image of f with image. It is computed as its source ring modulo its kernel.

i10 : image f

          S
o10 = --------
       2
      y  - x*z

o10 : QuotientRing

We can check whether the map is homogeneous with isHomogeneous.

i11 : isHomogeneous f

o11 = true

We can obtain the ring of the graph of f with graphRing.

i12 : graphRing f

       ZZ
      --- [a, b, x, y, z, Degrees => {{1}, {1}, {2}, {2}, {2}}, MonomialOrder => GRevLex]
      101
o12 = -----------------------------------------------------------------------------------
                                    2                    2
                                (- a  + x, - a*b + y, - b  + z)

o12 : QuotientRing

We can obtain the ideal of the graph of f with graphIdeal, except that currently the result is a matrix rather than an ideal, sigh.

i13 : graphIdeal f

                2                    2
o13 = ideal (- a  + x, - a*b + y, - b  + z)

                ZZ
o13 : Ideal of ---[a,b,x,y,z,Degrees => {{1}, {1}, {2}, {2}, {2}},MonomialOrder => GRevLex]
               101


topindexpreviousupnext