up previous next
 CallOnGroebnerFanIdeals    --    apply a function to Groebner fan ideals

 Syntax
 ```CallOnGroebnerFanIdeals(I: IDEAL, fn: FUNCTION) ```

 Description
Storing all the possible different (reduced) GBases in a Groebner fan is practicable only for small examples; larger ideals may have fans containing thousands or even millions of different Groebner bases. Typically we are interested only in those bases satisfying a certain property.

CallOnGroebnerFanIdeals calls the given function fn successively on the ideal I mapped into different polynomial rings so that the Groebner bases run though all possible distinct ones. This approach avoids storing all distinct possibilities in a big list.

Verbosity: see GroebnerFanIdeals .

Note: using this needs a little technical ability, but might make the difference between getting an answer or filling up the computer's memory.

 Example
 ```/**/ -- print ord and GBasis if ideal I has GBases of length 3: /**/ define PrintIfGBHasLen3(I) /**/ if len(ReducedGBasis(I))=3 then /**/ println OrdMat(RingOf(I)); /**/ indent(ReducedGBasis(I)); /**/ endif; /**/ enddefine; /**/ use R ::= QQ[a,b,c]; /**/ I := ideal(a^5+b^3+c^2-1, b^2+a^2+c-1, c^3+a^6+b^5-1); /**/ SetVerbosityLevel(10); /**/ CallOnGroebnerFanIdeals(I, PrintIfGBHasLen3); ******************************************************(....) matrix(ZZ, [[3, 7, 7], [3, 6, 8], [0, 0, -1]]) [b^2+c+a^2-1, a^5+c^2-b*c-a^2*b+b-1, c^3+b*c^2+2*a^2*b*c+a^4*b-a*c^2+a*b*c+a^3*b-2*b*c-2*a^2*b-a*b+b+a-1] * matrix(ZZ, [[6, 7, 14], [6, 5, 15], [0, 0, -1]]) [c+b^2+a^2-1, -b^6-3*a^2*b^4-3*a^4*b^2+b^5+3*b^4+6*a^2*b^2+3*a^4-3*b^2-3*a^2, a^5+b^4+2*a^2*b^2+a^4+b^3-2*b^2-2*a^2] ******************************************************(....) ```