# convert polynomial rings from Sage to Singular

Suppose I have a ring R in sage (I have in mind a polynomial ring modulo some ideal). Is there a way to convert it into a ring in Singular?

I want to use the tensor product function (which singular provides) on two rings (and then convert back to sage) but singular doesn't have (natural) constructors for the rings I'd like to tensor.

edit retag close merge delete

Sort by » oldest newest most voted

You can try something like:

sage: R.<x,y> = QQ[]
sage: R
Multivariate Polynomial Ring in x, y over Rational Field
sage: I = R.ideal(x^2+y)
sage: S = R.quotient(I)
sage: S
Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x^2 + y)
sage: s = S._singular_()
sage: s
//   characteristic : 0
//   number of vars : 2
//        block   1 : ordering dp
//                  : names    x y
//        block   2 : ordering C
// quotient ring from ideal
_=x2+y
sage: type(s)
<class 'sage.interfaces.singular.SingularElement'>

more

how to I find functions like self._singular_() (also self._name? (they don't seem to come up in a google search of the documentation)