Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unhandled case in converting to polynomial ring #5225

Closed
sagetrac-cwitty mannequin opened this issue Feb 9, 2009 · 3 comments
Closed

unhandled case in converting to polynomial ring #5225

sagetrac-cwitty mannequin opened this issue Feb 9, 2009 · 3 comments

Comments

@sagetrac-cwitty
Copy link
Mannequin

sagetrac-cwitty mannequin commented Feb 9, 2009

Normally, Sage tries to allow explicit conversions between arbitrary polynomial rings, if they share the same variable names.

Here's a case where that doesn't work:

R.<a,b,c,d,e,f,x,y,z,t,s,r>=PolynomialRing(QQ,12,order='lex')
I=R.ideal(a^2+d^2-x,a*b+d*e-y,a*c+d*f-z,b^2+e^2-t,b*c+e*f-s,c*c+f*f-r)
j=I.groebner_basis()
R1.<x,y,z,t,s,r>=QQ[]
R2=FractionField(R1)
R3.<a,b,c,d,e,f>=R1.fraction_field()[]
R3(j[0])

For now, the workaround is:

 sage_eval(str(j[0]), locals=locals())

but IMHO the original code should work.

Component: commutative algebra

Reviewer: Vincent Delecroix

Issue created by migration from https://trac.sagemath.org/ticket/5225

@sagetrac-cwitty sagetrac-cwitty mannequin added this to the sage-5.11 milestone Feb 9, 2009
@sagetrac-cwitty sagetrac-cwitty mannequin assigned malb Feb 9, 2009
@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@bgrenet
Copy link

bgrenet commented Apr 13, 2016

comment:5

A smaller example (minimal I hope ;-)):

sage: R = QQ['a,b,x,y']
sage: S = Frac(QQ['x,y'])['a,b']
sage: p = R.gen(0) + R.gen(1) + R.gen(2)
sage: S(p)
Traceback (most recent call last):
...
TypeError: Could not find a mapping of the passed element to this ring.

@mkoeppe
Copy link
Contributor

mkoeppe commented May 4, 2022

comment:6

In 9.6.rc3:

sage: R.<a,b,c,d,e,f,x,y,z,t,s,r>=PolynomialRing(QQ,12,order='lex')
....: I=R.ideal(a^2+d^2-x,a*b+d*e-y,a*c+d*f-z,b^2+e^2-t,b*c+e*f-s,c*c+f*f-r)
....: j=I.groebner_basis()
....: R1.<x,y,z,t,s,r>=QQ[]
....: R2=FractionField(R1)
....: R3.<a,b,c,d,e,f>=R1.fraction_field()[]
....: R3(j[0])
a^2 + d^2 + (-x)

and

sage: R = QQ['a,b,x,y']
....: S = Frac(QQ['x,y'])['a,b']
....: p = R.gen(0) + R.gen(1) + R.gen(2)
....: S(p)
a + b + x

@mkoeppe mkoeppe removed this from the sage-6.4 milestone May 4, 2022
@mkoeppe
Copy link
Contributor

mkoeppe commented May 10, 2022

Reviewer: Vincent Delecroix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants