Opened 12 years ago

Closed 12 years ago

#7150 closed defect (fixed)

Wrong substitution implementation for fraction fields

Reported by: novoselt Owned by:
Priority: critical Milestone: sage-4.1.2
Component: symbolics Keywords:
Cc: was Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

I am getting this in 4.1.1 and find it really frustrating (especially since it took me several hours to catch):

sage: QQ["x", "y"].inject_variables()
Defining x, y
sage: e1 = x^2*y^3 - x^2*y - x*y
sage: e2 = e1.parent().fraction_field()(e1)
sage: print e2
x^2*y^3 - x^2*y - x*y
sage: print e2.subs(y=SR("s"))
x^2*s^3 - (x^2 - x)*s

The last line is wrong!

Change History (4)

comment:1 Changed 12 years ago by fwclarke

  • Milestone changed from sage-4.1.3 to sage-4.1.2
  • Status changed from new to needs_review

But in 4.1.2.rc0:

sage: QQ["x", "y"].inject_variables()
Defining x, y
sage: e1 = x^2*y^3 - x^2*y - x*y
sage: e2 = e1.parent().fraction_field()(e1)
sage: print e2
x^2*y^3 - x^2*y - x*y
sage: print e2.subs(y=SR("s"))
s^3*x^2 - s*x^2 - s*x

So the problem may already have been solved.

comment:2 Changed 12 years ago by was

  • Milestone changed from sage-4.1.2 to sage-4.1.3

comment:3 Changed 12 years ago by jason

  • Cc was added

This may need to be closed with 4.1.2.

comment:4 Changed 12 years ago by mhansen

  • Milestone changed from sage-4.2 to sage-4.1.2
  • Resolution set to fixed
  • Status changed from needs_review to closed

Yep, I think we can close this.

Note: See TracTickets for help on using tickets.