Opened 9 years ago

Closed 9 years ago

# Extensions should coerce defining polynomials into base fields

Reported by: Owned by: ncalexan ncalexan minor sage-2.8.15 basic arithmetic extension base field polynomial

### 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
```

### comment:1 Changed 9 years ago by was

• Owner changed from somebody to ncalexan

### comment:2 Changed 9 years ago by mabshoff

• Milestone set to Sage-2.10

### comment:3 Changed 9 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 8 years ago by mabshoff

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