On Thu, May 29, 2014 at 11:13 AM, Stephen Kauffman
<strangerl...@gmail.com> wrote:
> Specifically I have a polynomial such as mypoly = X*Y + 1 in
> BooleanPoynomialRing() and str(mypoly) converts it to the string 'X*Y + 1'
> then I do some stuff with re pattern matching to construct the string '1 -
> x*y' which I now want to convert to a polynomial in 'x' and 'y' in QQ. Are
> there any built in functions or methods to do that? Or does a python routine
> have to be written to accomplish my task? Thanks

R.<x,y> = PolynomialRing(QQ)
f = R('1 - x*y')
f

>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to