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

CallOnGroebnerFanIdeals(I: IDEAL, fn: FUNCTION)

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.

/**/ -- 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);
 [[3, 7, 7],
  [3, 6, 8],
  [0, 0, -1]])
 [[6, 7, 14],
  [6, 5, 15],
  [0, 0, -1]])

See Also