Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#280 closed defect (fixed)

Extensions should coerce defining polynomials into base fields

Reported by: ncalexan Owned by: ncalexan
Priority: minor Milestone: sage-2.8.15
Component: basic arithmetic Keywords: extension base field polynomial
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

Clearly ZZx? coerces into Kx?, so this should not be an error.

sage:K.<a> = NumberField(ZZ['x'].0^3 - 5)

sage: L.<b> = K.extension(ZZ['x'].0^2 - 3)
---------------------------------------------------------------------------
<type 'exceptions.ValueError'>            Traceback (most recent call last)
...
    821         if polynomial.parent().base_ring() != base:
--> 822             raise ValueError, "The polynomial must be defined over the base field"
    823 
    824         # Generate the nf and bnf corresponding to the base field

<type 'exceptions.ValueError'>: The polynomial must be defined over the base field

Change History (4)

comment:1 Changed 7 years ago by was

  • Owner changed from somebody to ncalexan

comment:2 Changed 7 years ago by mabshoff

  • Milestone set to Sage-2.10

comment:3 Changed 6 years ago by dmharvey

  • Resolution set to fixed
  • Status changed from new to closed

This seems to work now:

sage: K.<a> = NumberField(ZZ['x'].0^3 - 5)
sage: L.<b> = K.extension(ZZ['x'].0^2 - 3)
sage: L
Number Field in b with defining polynomial x^2 - 3 over its base field
sage: L.polynomial()
x^2 - 3
sage: L.polynomial().parent()
Univariate Polynomial Ring in x over Number Field in a with defining polynomial x^3 - 5

comment:4 Changed 6 years ago by mabshoff

  • Milestone changed from sage-2.10 to sage-2.8.15
Note: See TracTickets for help on using tickets.