next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
gfanInterface :: gfan

gfan

Description

This method compute the Groebner fan of an ideal, which is a list of all reduced Groebner bases of an ideal. A particular Grobner basis may occur twice if it is a Groebner basis under multiple term orderings. Rather than marking the each Groebner basis to distinguish the leading terms, a second parallel list is given which contains the lead terms of each Groebner basis.

i1 : R = ZZ/32003[symbol a..symbol d];
i2 : I = monomialCurveIdeal(R,{1,3,4})

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

o2 : Ideal of R
i3 : time (M,L) = gfan I;
This is the Gfan program for computing Groebner fans and tropical varieties.
Use the command "gfan list" to view all subcommands.
The command "gfan" is deprecate for computing all Groebner bases of an ideal.
Please use subcommand "gfan _bases" instead. Awaiting input. <Ctrl>-D to end.
LP algorithm being used: "cddgmp".
     -- used 0.003946 seconds
i4 : M/toString/print;
{b*d^2, a*d, a*c^2, a^2*c}
{c^3, a*d, a*c^2, a^2*c}
{c^3, b*c, a*c^2, a^2*c, a^3*d}
{c^3, b*c, b^4, a*c^2, a^2*c}
{c^3, b*c, b^3, a*c^2}
{c^3, b*c, b^2*d, b^3}
{b*d^2, b^2*d, a*d, a^2*c}
{b*d^2, b^2*d, b^3, a*d}
{b*d^2, b*c, b^2*d, b^3, a*d^3}
{c^4, b*d^2, b*c, b^2*d, b^3}
i5 : L/toString/print;
{-c^3+b*d^2, -b*c+a*d, a*c^2-b^2*d, -b^3+a^2*c}
{c^3-b*d^2, -b*c+a*d, a*c^2-b^2*d, -b^3+a^2*c}
{c^3-b*d^2, b*c-a*d, a*c^2-b^2*d, -b^3+a^2*c, -b^4+a^3*d}
{c^3-b*d^2, b*c-a*d, b^4-a^3*d, a*c^2-b^2*d, -b^3+a^2*c}
{c^3-b*d^2, b*c-a*d, b^3-a^2*c, a*c^2-b^2*d}
{c^3-b*d^2, b*c-a*d, -a*c^2+b^2*d, b^3-a^2*c}
{-c^3+b*d^2, -a*c^2+b^2*d, -b*c+a*d, -b^3+a^2*c}
{-c^3+b*d^2, -a*c^2+b^2*d, b^3-a^2*c, -b*c+a*d}
{-c^3+b*d^2, b*c-a*d, -a*c^2+b^2*d, b^3-a^2*c, -c^4+a*d^3}
{c^4-a*d^3, -c^3+b*d^2, b*c-a*d, -a*c^2+b^2*d, b^3-a^2*c}

We can see that the leading terms of -c3+b*d2, -b*c+a*d, a*c2-b2*d, -b3+a2*c (which is the first Groebner basis listed in L) are b*d2, a*d, a*c2, a2*c.

If the ideal is invariant under some permutation of the variables, then gfan can compute all initial ideals up to this equivalence, which can change an intractible problem to a doable one. The cyclic group of order 4 a --> b --> c --> d --> a leaves the following ideal fixed.

i6 : S = ZZ/32003[a..e];
i7 : I = ideal"a+b+c+d,ab+bc+cd+da,abc+bcd+cda+dab,abcd-e4"

                                                                         
o7 = ideal (a + b + c + d, a*b + b*c + a*d + c*d, a*b*c + a*b*d + a*c*d +
     ------------------------------------------------------------------------
                       4
     b*c*d, a*b*c*d - e )

o7 : Ideal of S
i8 : (inL,L) = gfan I;
This is the Gfan program for computing Groebner fans and tropical varieties.
Use the command "gfan list" to view all subcommands.
The command "gfan" is deprecate for computing all Groebner bases of an ideal.
Please use subcommand "gfan _bases" instead. Awaiting input. <Ctrl>-D to end.
LP algorithm being used: "cddgmp".
i9 : #inL

o9 = 96

There are 96 initial ideals of this ideal. We can use the symmetry on the above:

i10 : (inL1, L1) = gfan(I, Symmetries=>{(b,c,d,a,e)});
This is the Gfan program for computing Groebner fans and tropical varieties.
Use the command "gfan list" to view all subcommands.
The command "gfan" is deprecate for computing all Groebner bases of an ideal.
Please use subcommand "gfan _bases" instead. Awaiting input. <Ctrl>-D to end.
LP algorithm being used: "cddgmp".
i11 : #inL1

o11 = 24

Internally gfanInterface uses a polynomial ring in variables gi. If you are using the variable g in your ring, you may need to reasign the old ring to a variable in order to recover the use of g as a variable.

i12 : QQ[f,g,h]

o12 = QQ[f, g, h]

o12 : PolynomialRing
i13 : I = ideal"fg + gh";

o13 : Ideal of QQ[f, g, h]
i14 : gfan I;
This is the Gfan program for computing Groebner fans and tropical varieties.
Use the command "gfan list" to view all subcommands.
The command "gfan" is deprecate for computing all Groebner bases of an ideal.
Please use subcommand "gfan _bases" instead. Awaiting input. <Ctrl>-D to end.
LP algorithm being used: "cddgmp".
warning: clearing value of symbol g to allow access to subscripted variables based on it
       : debug with expression   debug 2909   or with command line option   --debug 2909
i15 : R = ring I;

Ways to use gfan :