Opened 11 years ago

Last modified 4 years ago

#5225 new defect

unhandled case in converting to polynomial ring

Reported by: cwitty Owned by: malb
Priority: major Milestone: sage-6.4
Component: commutative algebra Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

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.

Change History (5)

comment:1 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:2 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:3 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:4 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:5 Changed 4 years ago by bruno

  • Report Upstream set to N/A

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.
Note: See TracTickets for help on using tickets.