Opened 10 years ago
Last modified 7 years ago
#12271 new enhancement
coercion and conversion for relativize
Reported by: | mstreng | Owned by: | davidloeffler |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | number fields | Keywords: | relativize conversion coercion number field |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
There is no coercion and conversion for fields constructed by relativize, even though the structure morphisms are present:
sage: L.<a> = NumberField(x^3+2) sage: L_rel = L.relativize(1,'b') sage: b = L_rel.gen() sage: L(b) # Falls back to the generic code from #11869, which fails with # TypeError: No compatible natural embeddings found for Number Field in a with defining polynomial x^3 + 2 and Number Field in b0 with defining polynomial x^3 + 2 over its base field sage: L_rel.structure()[0](b) # a sage: L_rel(a) # Does not even fall back to the generic code from #11869 # TypeError: Cannot coerce element into this number field sage: L_rel.structure()[1](a) # b0 sage: b # b0 sage: a+b # TypeError: unsupported operand parent(s) for '+': 'Number Field in a with defining polynomial x^3 + 2' and 'Number Field in b0 with defining polynomial x^3 + 2 over its base field'
Change History (5)
comment:1 Changed 10 years ago by
comment:2 Changed 8 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:3 Changed 8 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:4 Changed 8 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:5 Changed 7 years ago by
- Milestone changed from sage-6.3 to sage-6.4
Note: See
TracTickets for help on using
tickets.
See also #12269