# Define different embedding of a number field

Hi,

Let f(x) be an irreducible polynomial over $ZZ[x]$. We can define a number field

K.<a>= NumberField(f(x))


My question is how does one define all the embedding of K into the real or complex in Sage?

edit retag close merge delete

Sort by » oldest newest most voted

You can have a lool at the embeddings method:

sage: K.embeddings?


Then you can gel all embeddings into the (complex) algebraic field QQbar of the real algrbraic field AA.

sage: K.<a>= NumberField(x^2-2)
sage: K
Number Field in a with defining polynomial x^2 - 2
sage: K.embeddings(QQbar)
[
Ring morphism:
From: Number Field in a with defining polynomial x^2 - 2
To:   Algebraic Field
Defn: a |--> -1.414213562373095?,
Ring morphism:
From: Number Field in a with defining polynomial x^2 - 2
To:   Algebraic Field
Defn: a |--> 1.414213562373095?
]
sage: K.embeddings(AA)
[
Ring morphism:
From: Number Field in a with defining polynomial x^2 - 2
To:   Algebraic Real Field
Defn: a |--> -1.414213562373095?,
Ring morphism:
From: Number Field in a with defining polynomial x^2 - 2
To:   Algebraic Real Field
Defn: a |--> 1.414213562373095?
]


Or,

sage: K.<a>= NumberField(x^2+1)
sage: K.embeddings(QQbar)
[
Ring morphism:
From: Number Field in a with defining polynomial x^2 + 1
To:   Algebraic Field
Defn: a |--> -1*I,
Ring morphism:
From: Number Field in a with defining polynomial x^2 + 1
To:   Algebraic Field
Defn: a |--> 1*I
]
sage: K.embeddings(AA)
[]

more

This is exactly what I want. Thank you very much, Tmonteil!