Hi all:

I'm trying to get Sage to compute in a multivariate polynomial ring
over a transcendental field extension but am running into
difficulties.  For example, Sage crashes when trying to compute a
radical ideal as demonstrated by the example below.  I tried the same
example in Singular, which gave me the correct answer (the ideal
generated by x*y).

So is the failure below a Singular interface bug or am i doing
something wrong?  I suspect Singular doesn't like Sage's fraction
field construction of a transcendental extension.

Alex

----------------------------------------------------------------------
| Sage Version 4.3, Release Date: 2009-12-24                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
WARNING: There is one major unsolved bug in some versions of
Sage on OS X 10.6 that causes an 'Abort trap' crash when
doing certain symbolic computations.
See http://trac.sagemath.org/sage_trac/ticket/7095/.
sage: R0.<q> = PolynomialRing(QQ); R0
Univariate Polynomial Ring in q over Rational Field
sage: k= FractionField(R0); k
Fraction Field of Univariate Polynomial Ring in q over Rational Field
sage: R.<x,y> = PolynomialRing(k); R
Multivariate Polynomial Ring in x, y over Fraction Field of Univariate
Polynomial Ring in q over Rational Field
sage: R.<x,y> = PolynomialRing(k); R
Multivariate Polynomial Ring in x, y over Fraction Field of Univariate
Polynomial Ring in q over Rational Field
sage: I = R.ideal((q*x*y)^2); I
Ideal (q^2*x^2*y^2) of Multivariate Polynomial Ring in x, y over
Fraction Field of Univariate Polynomial Ring in q over Rational Field
sage: I.radical()
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call
last)

/Users/arai021/<ipython console> in <module>()

/Applications/sage/local/lib/python2.6/site-packages/sage/rings/
polynomial/multi_polynomial_ideal.pyc in __call__(self, *args, **kwds)
    400         if not R.base_ring().is_field():
    401             raise ValueError("Coefficient ring must be a field
for function '%s'."%(self.f.__name__))
--> 402         return self.f(self._instance, *args, **kwds)
    403
    404 require_field = RequireField

/Applications/sage/local/lib/python2.6/site-packages/sage/rings/
polynomial/multi_polynomial_ideal.pyc in wrapper(*args, **kwds)
    362         """
    363         with RedSBContext():
--> 364             return func(*args, **kwds)
    365
    366     from sage.misc.sageinspect import sage_getsource

/Applications/sage/local/lib/python2.6/site-packages/sage/rings/
polynomial/multi_polynomial_ideal.pyc in radical(self)
   1385         I.parent().lib('primdec.lib')
   1386         r = I.radical()
-> 1387         return S.ideal(r)
   1388
   1389     @require_field

/Applications/sage/local/lib/python2.6/site-packages/sage/rings/
polynomial/multi_polynomial_ring.pyc in ideal(self, *gens, **kwds)
    496         if (kwds.has_key('coerce') and kwds['coerce']) or
do_coerce:
    497             gens = [self(x) for x in gens]  # this will even
coerce from singular ideals correctly!
--> 498         return multi_polynomial_ideal.MPolynomialIdeal(self,
gens, **kwds)
    499
    500

/Applications/sage/local/lib/python2.6/site-packages/sage/rings/
polynomial/multi_polynomial_ideal.pyc in __init__(self, ring, gens,
coerce)
   2250             Ideal (x0^2, x1^3) of Multivariate Polynomial Ring
in x0, x1 over Finite Field of size 3
   2251         """
-> 2252         Ideal_generic.__init__(self, ring, gens,
coerce=coerce)
   2253
   2254     def __cmp__(self, other):

/Applications/sage/local/lib/python2.6/site-packages/sage/rings/
ideal.pyc in __init__(self, ring, gens, coerce)
    238             gens = [gens]
    239         if coerce:
--> 240             gens = [ring(x) for x in gens]
    241
    242         gens = tuple(gens)

/Applications/sage/local/lib/python2.6/site-packages/sage/rings/
polynomial/multi_polynomial_ring.pyc in __call__(self, x, check)
    425             self._singular_().set_ring()
    426             try:
--> 427                 return x.sage_poly(self)
    428             except TypeError:
    429                 raise TypeError, "unable to coerce singular
object"

/Applications/sage/local/lib/python2.6/site-packages/sage/interfaces/
singular.pyc in sage_poly(self, R, kcache)
   1400
   1401         singular_poly_list = self.parent().eval("string(coef
(%s,%s))"%(\
-> 1402                                    self.name
(),variable_str)).split(",")
   1403
   1404         if singular_poly_list == ['1','0'] :

/Applications/sage/local/lib/python2.6/site-packages/sage/interfaces/
singular.pyc in eval(self, x, allow_semicolon, strip, **kwds)
    547
    548         if s.find("error") != -1 or s.find("Segment fault") !=
-1:
--> 549             raise RuntimeError, 'Singular error:\n%s'%s
    550
    551         if get_verbose() > 0:

RuntimeError: Singular error:
   ? coef(`ideal`,`poly`) failed
   ? expected coef(`poly`,`poly`)
   ? error occurred in STDIN line 81: `string(coef(sage18,x*y));`
   ? wrong type declaration. type 'help string;'
sage:
-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to