Rational parametrization of plane curves. Is this a bug?

I am trying to compute the rational parametrization of a plane curve. According to sage is irreducible and has genus 0, hence it should be possible.

B.<u,v> = AffineSpace(QQ,2)
p=Curve([2*u^2 + 2*u*v + 2*v^2 - 1],B)
p.rational_parameterization()


However, i get the following error

Singular crashed -- automatically restarting.

---------------------------------------------------------------------------
SingularError                             Traceback (most recent call last)
<ipython-input-10-db30bbca0c11> in <module>()
1 B = AffineSpace(QQ,Integer(2), names=('u', 'v',)); (u, v,) = B.    _first_ngens(2)
2 p=Curve([Integer(2)*u**Integer(2) + Integer(2)*u*v + Integer(2)    *v**Integer(2) - Integer(1)],B)
----> 3 p.rational_parameterization()

/home/mlainz/.local/SageMath/local/lib/python3.7/site-packages/sage/schemes/    curves/affine_curve.py in rational_parameterization(self)
1451                     ((-7*t^2 + 7)/((-a)*t^2 + (-a)), 14*t/((-a)*t^2 +     (-a)))
1452         """
-> 1453         para = self.projective_closure(i=0).rational_parameterization().    defining_polynomials()
1454         # these polynomials are homogeneous in two indeterminants, so     dehomogenize wrt one of the variables
1455         R = para[0].parent()

/home/mlainz/.local/SageMath/local/lib/python3.7/site-packages/sage/schemes/    curves/projective_curve.py in rational_parameterization(self)
1569         singular.lib("paraplanecurves.lib")
1570         R = singular.paraPlaneCurve(self.defining_polynomial())
-> 1571         singular.setring(R)
1572         param = singular('PARA').sage().gens()
1573         R = R.sage()

/home/mlainz/.local/SageMath/local/lib/python3.7/site-packages/sage/interfaces/    singular.py in set_ring(self, R)
1097         if not isinstance(R, SingularElement):
1098             raise TypeError("R must be a singular ring")
-> 1099         self.eval("setring %s; short=0"%R.name(), allow_semicolon=True)
1100
1101     setring = set_ring

/home/mlainz/.local/SageMath/local/lib/python3.7/site-packages/sage/interfaces/    singular.py in eval(self, x, allow_semicolon, strip, **kwds)
657         # Singular actually does use that string
658         if s.find("error occurred") != -1 or s.find("Segment fault") !=     -1:
--> 659             raise SingularError('Singular error:\n%s'%s)
660
661         if get_verbose() > 0:

SingularError: Singular error:
? sage19 is no name of a ring/qring
? error occurred in or before STDIN line 11: setring sage19; short=0;


Is this a SAGE or a Singular bug or am I missing something?

edit retag close merge delete

Sort by ยป oldest newest most voted

It looks like both: apparently singular crashes, sage restarts singular, and then expects that a previously defined object sage19 is still in place, which of course it isn't.

more