Ask Your Question
1

i want to define field \mathbb Q (\sqrt 2,\sqrt 3) what command should use?

asked 6 years ago

anonymous user

Anonymous

updated 6 years ago

i tried doing it by spiliting field comand but it is not working ,if possible let me know about spliting field commands also

Preview: (hide)

3 Answers

Sort by » oldest newest most voted
1

answered 6 years ago

rburing gravatar image

updated 6 years ago

You can do the following:

R.<x> = PolynomialRing(QQ)
f = (x^2-2)*(x^2-3)
K.<a> = f.splitting_field()

Note that f.splitting_field() requires a name for the primitive element of the field (a here), which is passed here by using the shorthand notation, as shown in the documentation.

To identify the elements of the splitting field K which correspond to the roots of f you can do e.g.

f.change_ring(K).roots()

or in this case also something like

sqrt(K(3))
Preview: (hide)
link
0

answered 6 years ago

slelievre gravatar image

The most natural way is probably as follows.

sage: K = QQ[sqrt(2), sqrt(3)]
sage: K.inject_variables()
Defining sqrt2, sqrt3
sage: (sqrt2 + sqrt3)^2
2*sqrt3*sqrt2 + 5

The case of adjoining two algebraic numbers with the same minimal polynomial is more involved, see:

Preview: (hide)
link
0

answered 6 years ago

tmonteil gravatar image

Alternatively, you can do:

sage: number_field_elements_from_algebraics([QQbar(2).sqrt(), QQbar(3).sqrt()],minimal=True, same_field=True)
(Number Field in a with defining polynomial y^4 - 4*y^2 + 1,
 [-a^3 + 3*a, -a^2 + 2],
 Ring morphism:
   From: Number Field in a with defining polynomial y^4 - 4*y^2 + 1
   To:   Algebraic Field
   Defn: a |--> 0.5176380902050415?)
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 6 years ago

Seen: 1,656 times

Last updated: Mar 07 '19