Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » making new functions with optional arguments » symbols used as the name or value of an optional argument » MinimalGenerators
next | previous | forward | backward | up | index | toc

MinimalGenerators -- whether to compute minimal generators and return a trimmed set of generators

Description

The following returns two minimal generators (Serre's Theorem: a codim 2 Gorenstein ideal is a complete intersection.)

i1 : S = ZZ/101[a,b]

o1 = S

o1 : PolynomialRing
i2 : i = ideal(a^4,b^4)

             4   4
o2 = ideal (a , b )

o2 : Ideal of S
i3 : quotient(i, a^3+b^3)

                  3    3
o3 = ideal (a*b, a  - b )

o3 : Ideal of S

Without trimming we would get 4 generators instead.

i4 : quotient(i, a^3+b^3, MinimalGenerators => false)

                  3    3
o4 = ideal (a*b, a  - b )

o4 : Ideal of S

Sometimes the extra time to find the minimal generators is too large. This allows one to bypass this part of the computation.

i5 : needsPackage "Truncations"

o5 = Truncations

o5 : Package
i6 : R = ZZ/101[x_0..x_4]

o6 = R

o6 : PolynomialRing
i7 : I = monomialCurveIdeal(R, {1,4,5,9});

o7 : Ideal of R
i8 : time J = truncate(8, I, MinimalGenerators => false);
 -- used 0.00419647s (cpu); 0.00419569s (thread); 0s (gc)

o8 : Ideal of R
i9 : time K = truncate(8, I, MinimalGenerators => true);
 -- used 0.176723s (cpu); 0.176726s (thread); 0s (gc)

o9 : Ideal of R
i10 : numgens J

o10 = 1067
i11 : numgens K

o11 = 428

See also

Functions with optional argument named MinimalGenerators:

For the programmer

The object MinimalGenerators is a symbol.


The source of this document is in Macaulay2Doc/functions/trim-doc.m2:84:0.