Ask Your Question
1

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

asked 2018-10-19 02:23:40 -0600

anonymous user

Anonymous

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

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

answered 2018-10-19 06:33:55 -0600

updated 2018-10-19 06:35:27 -0600

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))
edit flag offensive delete link more
0

answered 2018-10-19 10:57:08 -0600

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?)
edit flag offensive delete link more
0

answered 2018-10-19 07:30:27 -0600

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:

edit flag offensive delete link more

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: 2018-10-19 02:23:40 -0600

Seen: 95 times

Last updated: Oct 19 '18