Skip to content

Number Field base rings for NumberFieldTower #3465

@roed314

Description

@roed314

When creating towers of number fields, the base rings don't behave as I think they should. The following is from the coercion branch (the opposite problem exists in the normal branch).

sage: sage: L.<cuberoot2, zeta3> = CyclotomicField(3).extension(x^3 - 2)
sage: type(L)
<class 'sage.rings.number_field.number_field.NumberField_relative'>
sage: L.ngens()
1 (2 in current Sage, I think it should be 1)
sage: L.base_ring()
Cyclotomic Field of order 3 and degree 2 (I agree)
sage: L.base_field()
Cyclotomic Field of order 3 and degree 2 (I agree)
sage: L.base()
Rational Field (I think it should be Cyclotomic Field of order 3 and degree 2)
sage: K.<a, b> = NumberField( [x^2 + x + 1, x^3 + 2] )
sage: K.ngens()
1 (2 in current Sage, I think it should be 2)sage: type(K)
<class 'sage.rings.number_field.number_field.NumberField_relative'>  
sage: K.base_ring()
Number Field in b with defining polynomial x^3 + 2 (I think it should be Rational Field)
sage: K.base_field()
Number Field in b with defining polynomial x^3 + 2 (I think it should be Rational Field)
sage: K.base()
Rational Field (um... ok, I agree)

CC: @craigcitro

Component: number fields

Keywords: relative number fields

Issue created by migration from https://trac.sagemath.org/ticket/3465

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions