ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 20 Feb 2016 03:47:20 +0100convert polynomial rings from Sage to Singularhttps://ask.sagemath.org/question/32596/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. Fri, 19 Feb 2016 19:03:01 +0100https://ask.sagemath.org/question/32596/convert-polynomial-rings-from-sage-to-singular/Answer by tmonteil for <p>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? </p>
<p>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. </p>
https://ask.sagemath.org/question/32596/convert-polynomial-rings-from-sage-to-singular/?answer=32597#post-id-32597You 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
_[1]=x2+y
sage: type(s)
<class 'sage.interfaces.singular.SingularElement'>
Fri, 19 Feb 2016 22:11:24 +0100https://ask.sagemath.org/question/32596/convert-polynomial-rings-from-sage-to-singular/?answer=32597#post-id-32597Comment by admiraltso for <p>You can try something like:</p>
<pre><code>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
_[1]=x2+y
sage: type(s)
<class 'sage.interfaces.singular.SingularElement'>
</code></pre>
https://ask.sagemath.org/question/32596/convert-polynomial-rings-from-sage-to-singular/?comment=32600#post-id-32600how to I find functions like self._singular_() (also self._name? (they don't seem to come up in a google search of the documentation)Sat, 20 Feb 2016 03:47:20 +0100https://ask.sagemath.org/question/32596/convert-polynomial-rings-from-sage-to-singular/?comment=32600#post-id-32600