# Structure maps for number fields¶

Provides isomorphisms between relative and absolute presentations, to and from vector spaces, name changing maps, etc.

EXAMPLES:

sage: L.<cuberoot2, zeta3> = CyclotomicField(3).extension(x^3 - 2)
sage: K = L.absolute_field('a')
sage: from_K, to_K = K.structure()
sage: from_K
Isomorphism map:
From: Number Field in a with defining polynomial x^6 - 3*x^5 + 6*x^4 - 11*x^3 + 12*x^2 + 3*x + 1
To:   Number Field in cuberoot2 with defining polynomial x^3 - 2 over its base field
sage: to_K
Isomorphism map:
From: Number Field in cuberoot2 with defining polynomial x^3 - 2 over its base field
To:   Number Field in a with defining polynomial x^6 - 3*x^5 + 6*x^4 - 11*x^3 + 12*x^2 + 3*x + 1

class sage.rings.number_field.maps.MapAbsoluteToRelativeNumberField(A, R)

See MapRelativeToAbsoluteNumberField for examples.

class sage.rings.number_field.maps.MapNumberFieldToVectorSpace(K, V)

Bases: sage.categories.map.Map

A class for the isomorphism from an absolute number field to its underlying $$\QQ$$-vector space.

EXAMPLE:

sage: L.<a> = NumberField(x^3 - x + 1)
sage: V, fr, to = L.vector_space()
sage: type(to)
<class 'sage.rings.number_field.maps.MapNumberFieldToVectorSpace'>

class sage.rings.number_field.maps.MapRelativeNumberFieldToRelativeVectorSpace(K, V)

EXAMPLE:

sage: K.<a, b> = NumberField([x^3 - x + 1, x^2 + 23])
sage: V, fr, to = K.relative_vector_space()
sage: type(to)
<class 'sage.rings.number_field.maps.MapRelativeNumberFieldToRelativeVectorSpace'>

class sage.rings.number_field.maps.MapRelativeNumberFieldToVectorSpace(L, V, to_K, to_V)

The isomorphism from a relative number field to its underlying $$\QQ$$-vector space. Compare MapRelativeNumberFieldToRelativeVectorSpace.

EXAMPLES:

sage: K.<a> = NumberField(x^8 + 100*x^6 + x^2 + 5)
sage: L = K.relativize(K.subfields(4)[0][1], 'b'); L
Number Field in b0 with defining polynomial x^2 + a0 over its base field
sage: L_to_K, K_to_L = L.structure()

sage: V, fr, to = L.absolute_vector_space()
sage: V
Vector space of dimension 8 over Rational Field
sage: fr
Isomorphism map:
From: Vector space of dimension 8 over Rational Field
To:   Number Field in b0 with defining polynomial x^2 + a0 over its base field
sage: to
Isomorphism map:
From: Number Field in b0 with defining polynomial x^2 + a0 over its base field
To:   Vector space of dimension 8 over Rational Field
sage: type(fr), type(to)
(<class 'sage.rings.number_field.maps.MapVectorSpaceToRelativeNumberField'>,
<class 'sage.rings.number_field.maps.MapRelativeNumberFieldToVectorSpace'>)

sage: v = V([1, 1, 1, 1, 0, 1, 1, 1])
sage: fr(v), to(fr(v)) == v
((-a0^3 + a0^2 - a0 + 1)*b0 - a0^3 - a0 + 1, True)
sage: to(L.gen()), fr(to(L.gen())) == L.gen()
((0, 1, 0, 0, 0, 0, 0, 0), True)

class sage.rings.number_field.maps.MapRelativeToAbsoluteNumberField(R, A)

EXAMPLES:

sage: K.<a> = NumberField(x^6 + 4*x^2 + 200)
sage: L = K.relativize(K.subfields(3)[0][1], 'b'); L
Number Field in b0 with defining polynomial x^2 + a0 over its base field
sage: fr, to = L.structure()
sage: fr
Relative number field morphism:
From: Number Field in b0 with defining polynomial x^2 + a0 over its base field
To:   Number Field in a with defining polynomial x^6 + 4*x^2 + 200
Defn: b0 |--> a
a0 |--> -a^2
sage: to
Ring morphism:
From: Number Field in a with defining polynomial x^6 + 4*x^2 + 200
To:   Number Field in b0 with defining polynomial x^2 + a0 over its base field
Defn: a |--> b0
sage: type(fr), type(to)
(<class 'sage.rings.number_field.morphism.RelativeNumberFieldHomomorphism_from_abs'>,
<class 'sage.rings.number_field.morphism.NumberFieldHomomorphism_im_gens'>)

sage: M.<c> = L.absolute_field(); M
Number Field in c with defining polynomial x^6 + 4*x^2 + 200
sage: fr, to = M.structure()
sage: fr
Isomorphism map:
From: Number Field in c with defining polynomial x^6 + 4*x^2 + 200
To:   Number Field in b0 with defining polynomial x^2 + a0 over its base field
sage: to
Isomorphism map:
From: Number Field in b0 with defining polynomial x^2 + a0 over its base field
To:   Number Field in c with defining polynomial x^6 + 4*x^2 + 200
sage: type(fr), type(to)
(<class 'sage.rings.number_field.maps.MapAbsoluteToRelativeNumberField'>,
<class 'sage.rings.number_field.maps.MapRelativeToAbsoluteNumberField'>)
sage: fr(M.gen()), to(fr(M.gen())) == M.gen()
(b0, True)
sage: to(L.gen()), fr(to(L.gen())) == L.gen()
(c, True)
sage: (to * fr)(M.gen()) == M.gen(), (fr * to)(L.gen()) == L.gen()
(True, True)

class sage.rings.number_field.maps.MapRelativeVectorSpaceToRelativeNumberField(V, K)

EXAMPLES:

sage: L.<b> = NumberField(x^4 + 3*x^2 + 1)
sage: K = L.relativize(L.subfields(2)[0][1], 'a'); K
Number Field in a0 with defining polynomial x^2 - b0*x + 1 over its base field
sage: V, fr, to = K.relative_vector_space()
sage: V
Vector space of dimension 2 over Number Field in b0 with defining polynomial x^2 + 1
sage: fr
Isomorphism map:
From: Vector space of dimension 2 over Number Field in b0 with defining polynomial x^2 + 1
To:   Number Field in a0 with defining polynomial x^2 - b0*x + 1 over its base field
sage: type(fr)
<class 'sage.rings.number_field.maps.MapRelativeVectorSpaceToRelativeNumberField'>

sage: a0 = K.gen(); b0 = K.base_field().gen()
sage: fr(to(a0 + 2*b0)), fr(V([0, 1])), fr(V([b0, 2*b0]))
(a0 + 2*b0, a0, 2*b0*a0 + b0)
sage: (fr * to)(K.gen()) == K.gen()
True
sage: (to * fr)(V([1, 2])) == V([1, 2])
True

class sage.rings.number_field.maps.MapVectorSpaceToNumberField(V, K)

The map to an absolute number field from its underlying $$\QQ$$-vector space.

EXAMPLES:

sage: K.<a> = NumberField(x^4 + 3*x + 1)
sage: V, fr, to = K.vector_space()
sage: V
Vector space of dimension 4 over Rational Field
sage: fr
Isomorphism map:
From: Vector space of dimension 4 over Rational Field
To:   Number Field in a with defining polynomial x^4 + 3*x + 1
sage: to
Isomorphism map:
From: Number Field in a with defining polynomial x^4 + 3*x + 1
To:   Vector space of dimension 4 over Rational Field
sage: type(fr), type(to)
(<class 'sage.rings.number_field.maps.MapVectorSpaceToNumberField'>,
<class 'sage.rings.number_field.maps.MapNumberFieldToVectorSpace'>)

sage: fr.is_injective(), fr.is_surjective()
(True, True)

sage: fr.domain(), to.codomain()
(Vector space of dimension 4 over Rational Field, Vector space of dimension 4 over Rational Field)
sage: to.domain(), fr.codomain()
(Number Field in a with defining polynomial x^4 + 3*x + 1, Number Field in a with defining polynomial x^4 + 3*x + 1)
sage: fr * to
Composite map:
From: Number Field in a with defining polynomial x^4 + 3*x + 1
To:   Number Field in a with defining polynomial x^4 + 3*x + 1
Defn:   Isomorphism map:
From: Number Field in a with defining polynomial x^4 + 3*x + 1
To:   Vector space of dimension 4 over Rational Field
then
Isomorphism map:
From: Vector space of dimension 4 over Rational Field
To:   Number Field in a with defining polynomial x^4 + 3*x + 1
sage: to * fr
Composite map:
From: Vector space of dimension 4 over Rational Field
To:   Vector space of dimension 4 over Rational Field
Defn:   Isomorphism map:
From: Vector space of dimension 4 over Rational Field
To:   Number Field in a with defining polynomial x^4 + 3*x + 1
then
Isomorphism map:
From: Number Field in a with defining polynomial x^4 + 3*x + 1
To:   Vector space of dimension 4 over Rational Field

sage: to(a), to(a + 1)
((0, 1, 0, 0), (1, 1, 0, 0))
sage: fr(to(a)), fr(V([0, 1, 2, 3]))
(a, 3*a^3 + 2*a^2 + a)

class sage.rings.number_field.maps.MapVectorSpaceToRelativeNumberField(V, L, from_V, from_K)

The isomorphism to a relative number field from its underlying $$\QQ$$-vector space. Compare MapRelativeVectorSpaceToRelativeNumberField.

EXAMPLES:

sage: L.<a, b> = NumberField([x^2 + 3, x^2 + 5])
sage: V, fr, to = L.absolute_vector_space()
sage: type(fr)
<class 'sage.rings.number_field.maps.MapVectorSpaceToRelativeNumberField'>

class sage.rings.number_field.maps.NameChangeMap(K, L)

A map between two isomorphic number fields with the same defining polynomial but different variable names.

EXAMPLE:

sage: K.<a> = NumberField(x^2 - 3)
sage: L.<b> = K.change_names()
sage: from_L, to_L = L.structure()
sage: from_L
Isomorphism given by variable name change map:
From: Number Field in b with defining polynomial x^2 - 3
To:   Number Field in a with defining polynomial x^2 - 3
sage: to_L
Isomorphism given by variable name change map:
From: Number Field in a with defining polynomial x^2 - 3
To:   Number Field in b with defining polynomial x^2 - 3
sage: type(from_L), type(to_L)
(<class 'sage.rings.number_field.maps.NameChangeMap'>, <class 'sage.rings.number_field.maps.NameChangeMap'>)

class sage.rings.number_field.maps.NumberFieldIsomorphism

Bases: sage.categories.map.Map

A base class for various isomorphisms between number fields and vector spaces.

EXAMPLE:

sage: K.<a> = NumberField(x^4 + 3*x + 1)
sage: V, fr, to = K.vector_space()
sage: isinstance(fr, sage.rings.number_field.maps.NumberFieldIsomorphism)
True

is_injective()

EXAMPLE:

sage: K.<a> = NumberField(x^4 + 3*x + 1)
sage: V, fr, to = K.vector_space()
sage: fr.is_injective()
True

is_surjective()

EXAMPLE:

sage: K.<a> = NumberField(x^4 + 3*x + 1)
sage: V, fr, to = K.vector_space()
sage: fr.is_surjective()
True


#### Previous topic

Embeddings into ambient fields

#### Next topic

Class Groups of Number Fields