# A problem on Groebner Fans with more than 10 variables

sage: X=[var('x%d' % i) for i in range(20)]


Up to 10 variables, everything is alright:

sage: R=PolynomialRing(QQ,"x",10)
sage: R.ideal(x0).groebner_fan()
Groebner fan of the ideal:
Ideal (x0) of Multivariate Polynomial Ring in x0, x1, x2, x3, x4, x5, x6, x7, x8, x9 over Rational Field


But with at least one more variable, there is a problem:

sage: R=PolynomialRing(QQ,"x",11)
sage: R.ideal(x0).groebner_fan()
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-49-29624ce56396> in <module>()
----> 1 R.ideal(x0).groebner_fan()

/home/sebastien/sage/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in groebner_fan(self, is_groebner_basis, symmetry, verbose)
3486         import sage.rings.polynomial.groebner_fan as groebner_fan
3487         return groebner_fan.GroebnerFan(self, is_groebner_basis=is_groebner_basis,
-> 3488                                         symmetry=symmetry, verbose=verbose)
3489
3490     @cached_method

/home/sebastien/sage/local/lib/python2.7/site-packages/sage/rings/polynomial/groebner_fan.pyc in __init__(self, I, is_groebner_basis, symmetry, verbose)
810             raise TypeError, "I must be a multivariate polynomial ideal"
811         if prefix_check([str(R_gen) for R_gen in I.ring().gens()]) != True:
--> 812             raise RuntimeError, "Ring variables cannot contain each other as prefixes"
813         S = I.ring()
814         R = S.base_ring()

RuntimeError: Ring variables cannot contain each other as prefixes


What's the problem ? How have more than 10 variables ?

edit retag close merge delete

1

I view this as a bug - see http://trac.sagemath.org/ticket/15644

( 2014-01-07 02:22:27 -0600 )edit

Sort by » oldest newest most voted

Surprisingly, as the error message says, some methods do not apparently work when some variable names are prefixes to others. Here's a nasty workaround

sage: R = PolynomialRing(QQ, [chr(i+ord('a')) for i in range(11)])
sage: R
Multivariate Polynomial Ring in a, b, c, d, e, f, g, h, i, j, k over Rational Field
sage: R.ideal(R.gen(0)).groebner_fan()
Groebner fan of the ideal:
Ideal (a) of Multivariate Polynomial Ring in a, b, c, d, e, f, g, h, i, j, k over Rational Field


... you'll have to get creative when you go past 26 variables, though!

more