Morphisms between number fields

This module provides classes to represent ring homomorphisms between number fields (i.e. field embeddings).

class sage.rings.number_field.morphism.CyclotomicFieldHomomorphism_im_gens

Bases: sage.rings.number_field.morphism.NumberFieldHomomorphism_im_gens

class sage.rings.number_field.morphism.NumberFieldHomomorphism_im_gens

Bases: sage.rings.morphism.RingHomomorphism_im_gens

preimage(y)

Computes a preimage of \(y\) in the domain, provided one exists. Raises a ValueError if \(y\) has no preimage.

INPUT:

  • \(y\) – an element of the codomain of self.

OUTPUT:

Returns the preimage of \(y\) in the domain, if one exists. Raises a ValueError if \(y\) has no preimage.

EXAMPLES:

sage: K.<a> = NumberField(x^2 - 7)
sage: L.<b> = NumberField(x^4 - 7)
sage: f = K.embeddings(L)[0]
sage: f.preimage(3*b^2 - 12/7)
3*a - 12/7
sage: f.preimage(b)
Traceback (most recent call last):
...
ValueError: Element 'b' is not in the image of this homomorphism.
sage: F.<b> = QuadraticField(23)
sage: G.<a> = F.extension(x^3+5)
sage: f = F.embeddings(G)[0]
sage: f.preimage(a^3+2*b+3)
2*b - 2
class sage.rings.number_field.morphism.RelativeNumberFieldHomomorphism_from_abs(parent, abs_hom)

Bases: sage.rings.morphism.RingHomomorphism

A homomorphism from a relative number field to some other ring, stored as a homomorphism from the corresponding absolute field.

abs_hom()

Return the corresponding homomorphism from the absolute number field.

EXAMPLES:

sage: K.<a, b> = NumberField( [x^3 + 2, x^2 + x + 1] )
sage: K.hom(a, K).abs_hom()
Ring morphism:
  From: Number Field in a with defining polynomial x^6 - 3*x^5 + 6*x^4 - 3*x^3 - 9*x + 9
  To:   Number Field in a with defining polynomial x^3 + 2 over its base field
  Defn: a |--> a - b
im_gens()

Return the images of the generators under this map.

EXAMPLES:

sage: K.<a, b> = NumberField( [x^3 + 2, x^2 + x + 1] )
sage: K.hom(a, K).im_gens()
[a, b]