Opened 9 years ago

Closed 9 years ago

#15169 closed defect (fixed)

Bug in FreeAlgebra coercion with fields

Reported by: sam Owned by:
Priority: major Milestone: sage-5.13
Component: algebra Keywords: days54
Cc: Merged in: sage-5.13.beta4
Authors: Travis Scrimshaw Reviewers: Darij Grinberg
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #14898 Stopgaps:

Status badges

Description

There is a bug in the FreeAlgebra? coercion when the algebra is over a field, and you are trying to coerce from something that can be coerced into that field:

sage: A.<x> = FreeAlgebra(ZZ)
sage: A(1)                                      # This works fine
1
sage: A.<x> = FreeAlgebra(CC)
sage: A(1)                                      # This raises an exception

 ...

NameError: global name 'F' is not defined

Attachments (1)

trac_15169-free_algebra_fix-ts.patch (1.1 KB) - added by tscrim 9 years ago.

Download all attachments as: .zip

Change History (9)

Changed 9 years ago by tscrim

comment:1 Changed 9 years ago by tscrim

  • Authors set to Travis Scrimshaw
  • Status changed from new to needs_review

comment:2 Changed 9 years ago by tscrim

  • Dependencies set to #14898

I'm adding #14898 as a dependency just to be safe (it may not be necessary).

comment:3 Changed 9 years ago by tscrim

  • Branch set to public/algebras/15169-free_algebra_fix
  • Commit set to 6fd33b240d2d7171068fff2d14ad367834c8fea7

git version


New commits:

6fd33b2#15169: Fix FreeAlgebra? element constructor from a base field.

comment:4 Changed 9 years ago by darij

  • Reviewers set to Darij Grinberg
  • Status changed from needs_review to positive_review

comment:5 Changed 9 years ago by darij

Good catch and correct fix. I've reviewed the hg version.

comment:6 Changed 9 years ago by tscrim

  • Keywords days54 added

comment:7 Changed 9 years ago by jdemeyer

  • Branch public/algebras/15169-free_algebra_fix deleted
  • Commit 6fd33b240d2d7171068fff2d14ad367834c8fea7 deleted

comment:8 Changed 9 years ago by jdemeyer

  • Merged in set to sage-5.13.beta4
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.