[next][up][top][index]
search for:

ideals

An ideal I is represented by its generators, which are stored inside it in a one-rowed matrix.

The ideal generated by a list of ring elements can be constructed with the function ideal.

i1 : R = ZZ/101[a..d];
i2 : I = ideal (a^2*b-c^2, a*b^2-d^3, c^5-d)

             2     2     2    3   5
o2 = ideal (a b - c , a*b  - d , c  - d)

o2 : Ideal of R

If you have a matrix, then ideal will produce the ideal generated by the entries of the matrix.

i3 : f = matrix {{a^2,b^2},{c^2,d^2}}

o3 = | a2 b2 |
     | c2 d2 |

             2       2
o3 : Matrix R  <--- R
i4 : J = ideal f

             2   2   2   2
o4 = ideal (a , c , b , d )

o4 : Ideal of R

An interesting class of ideals can be obtained as the defining ideals in projective space of monomial curves. The twisted cubic is the closure of the set of points (1,t^1,t^2,t^3) in projective space. We use a list of the exponents and monomialCurveIdeal to get the ideal.

i5 : monomialCurveIdeal(R,{1,2,3})

                        2         2
o5 = ideal (b*c - a*d, c  - b*d, b  - a*c)

o5 : Ideal of R

The command substitute can be used to transfer an ideal to another ring. You may want to do this because another ring has a monomial ordering more suitable for the computations you are about to do, or it may have additional variables in it, one of which you wish to use for homogenization. Here is an example of the latter. We make another ring with a new variable t in it, transfer the ideal, and then homogenize the ideal.

i6 : S = ZZ/101[a..d,t];
i7 : substitute(I,S)

             2     2     2    3   5
o7 = ideal (a b - c , a*b  - d , c  - d)

o7 : Ideal of S
i8 : homogenize(oo,t)

             2     2      2    3   5      4
o8 = ideal (a b - c t, a*b  - d , c  - d*t )

o8 : Ideal of S

In this case, the substitution was done according to the names of the variables in the two rings. There are more explicit ways to specify the substitution to be performed. Here is one where we list the new values for all the variables.

i9 : T = ZZ/101[x,y,z,t];
i10 : use ring I

o10 = R

o10 : PolynomialRing
i11 : substitute(I,{a=>x^10,b=>y^10,c=>z^10,d=>t^10})

              20 10    20   10 20    30   50    10
o11 = ideal (x  y   - z  , x  y   - t  , z   - t  )

o11 : Ideal of T

Now notice that the variable a appears to be an element of S. The creation of the ring S supplanted the earlier value.

i12 : a

o12 = a

o12 : R

We restore the variables of R to visibility.

i13 : use R

o13 = R

o13 : PolynomialRing

To recover the generators of an ideal as a matrix, use generators.

i14 : generators J

o14 = | a2 c2 b2 d2 |

              1       4
o14 : Matrix R  <--- R

Use the operator % to reduce a ring element with respect to a Groebner basis of the ideal.

i15 : (1+a+a^3+a^4) % J

o15 = a + 1

o15 : R

Membership in the ideal may be tested by comparing the answer to 0 with ==.

i16 : (1+a+a^3+a^4) % J == 0

o16 = false
i17 : a^4 % J == 0

o17 = true

The usual algebraic operations on ideals are available.

i18 : I+J

              2     2     2    3   5       2   2   2   2
o18 = ideal (a b - c , a*b  - d , c  - d, a , c , b , d )

o18 : Ideal of R
i19 : intersect(I,J)

                  2    3     2     2   5     2   7    2    2 5    2    2 5    2
o19 = ideal (- a*b  + d , - a b + c , c d - d , c  - c d, b c  - b d, a c  - a d)

o19 : Ideal of R
i20 : I*J

              4     2 2   2   2    4   2 3    2 2   2   2    2 2   3 2    2 3     2 2    2 3     4    2 3     2 2    5   2 5    2    7    2    2 5    2    5 2    3
o20 = ideal (a b - a c , a b*c  - c , a b  - b c , a b*d  - c d , a b  - a d , a*b c  - c d , a*b  - b d , a*b d  - d , a c  - a d, c  - c d, b c  - b d, c d  - d )

o20 : Ideal of R
i21 : J:I

                 2   2   2
o21 = ideal (d, c , b , a )

o21 : Ideal of R
i22 : saturate(J,I)

o22 = ideal 1

o22 : Ideal of R
i23 : radical J

o23 = ideal (d, c, b, a)

o23 : Ideal of R

See also: intersect, Ideal : Ideal, saturate, and radical.

We may ask whether one ideal is contained in another.

i24 : isSubset(I,J)

o24 = false
i25 : isSubset(I,I+J)

o25 = true
i26 : isSubset(I+J,J)

o26 = false

Once you have an ideal, then you may construct the quotient ring or the quotient module (there is a difference). Here is the quotient ring.

i27 : R/I

                    R
o27 = -----------------------------
        2     2     2    3   5
      (a b - c , a*b  - d , c  - d)

o27 : QuotientRing

Here is the quotient module.

i28 : M = R^1/I

o28 = cokernel | a2b-c2 ab2-d3 c5-d |

                             1
o28 : R-module, quotient of R

And if you want the module underlying I itself, you can get it with module.

i29 : module I

o29 = image | a2b-c2 ab2-d3 c5-d |

                              1
o29 : R-module, submodule of R

In general, when an ideal is used as an argument to a function that usually would be given a module, we try to make an informed choice about whether the user intends the ideal to be used as a module directly, or whether the quotient module is more suitable. In homological functions such as Ext and Tor the underlying module is used. Here are some examples where the quotient module is used.

A free resolution of R^1/I can be obtained with resolution.

i30 : resolution I

       1      3      3      1
o30 = R  <-- R  <-- R  <-- R  <-- 0
                                  
      0      1      2      3      4

o30 : ChainComplex

The Krull dimension or codimension of the support of the quotient module can be obtained.

i31 : dim I

o31 = 1
i32 : dim J

o32 = 0
i33 : codim I

o33 = 3

(Beware that for a homogeneous ideal the dimension of its projective variety is one less than the number provided by dim.)

If the dimension of the quotient module as a vector space is needed, use basis to get a matrix whose columns form a basis, and compute the dimension from it.

i34 : basis (R^1/J)

o34 = | 1 a ab abc abcd abd ac acd ad b bc bcd bd c cd d |

o34 : Matrix
i35 : rank source oo

o35 = 16

(Here oo refers to the result on the previous line.

For more information see Ideal.


[next][up][top][index]
search for: