Macaulay2 » Documentation
Packages » RandomMonomialIdeals :: IncludeZeroIdeals
next | previous | forward | backward | up | index | toc

IncludeZeroIdeals -- optional input to choose whether zero ideals should be included

Description

When the option is used with the function randomMonomialIdeals, if IncludeZeroIdeals => true (the default), then zero ideals will be included in the list of random monomial ideals. If IncludeZeroIdeals => false, then any zero ideals produced will be excluded, along with the number of them.

i1 : n=2;D=2;p=0.0;N=1;
i5 : ideals = randomMonomialIdeals(n,D,p,N)

o5 = {monomialIdeal ()}

o5 : List

The 0 listed is the zero ideal:

i6 : ideals_0

o6 = monomialIdeal ()

o6 : MonomialIdeal of QQ[x ..x ]
                          1   2

In the example below, in contrast, the list of ideals returned is empty since the single zero ideal generated is excluded:

i7 : randomMonomialIdeals(n,D,p,N,IncludeZeroIdeals=>false)

o7 = ({}, 1)

o7 : Sequence

The option can also be used with the function bettiStats. If ideals contains zero ideals, you may wish to exclude them when computing the Betti table statistics. In this case, use the optional input as follows:

i8 : R=ZZ/101[a..c]

o8 = R

o8 : PolynomialRing
i9 : L={monomialIdeal (a^2*b,b*c), monomialIdeal(a*b,b*c^3),monomialIdeal 0_R};
i10 : apply(L,i->betti res i)

              0 1 2         0 1 2         0
o10 = {total: 1 2 1, total: 1 2 1, total: 1}
           0: 1 . .      0: 1 . .      0: 1
           1: . 1 .      1: . 1 .
           2: . 1 1      2: . . .
                         3: . 1 1

o10 : List
i11 : bettiStats(L,IncludeZeroIdeals=>false)
The Betti statistics do not include those for the zero ideals.

              0  1  2         0  1  2          1  2
o11 = (total: 1  2  1, total: 1  2  1, total:  1  1)
           0: 1  .  .      0: 1  .  .      2: .5 .5
           1: .  1  .      1: .  1  .      3: .5 .5
           2: . .5 .5      2: . .5 .5
           3: . .5 .5      3: . .5 .5

o11 : Sequence
i12 : bettiStats(L,IncludeZeroIdeals=>false,Verbose=>true)
There are 3 ideals in this sample. Of those, 1 are the zero ideal.
The Betti statistics do not include those for the zero ideals.

              0  1  2         0  1  2          1  2
o12 = (total: 1  2  1, total: 1  2  1, total:  1  1)
           0: 1  .  .      0: 1  .  .      2: .5 .5
           1: .  1  .      1: .  1  .      3: .5 .5
           2: . .5 .5      2: . .5 .5
           3: . .5 .5      3: . .5 .5

o12 : Sequence

See also

Functions with optional argument named IncludeZeroIdeals:

For the programmer

The object IncludeZeroIdeals is a symbol.