Ask Your Question

Defining a number field in sage

asked 2016-08-17 18:52:09 +0200

asksage_user gravatar image

I know how to define a number field in sage by an irreducible polynomial over $\mathbb{Q}$, for example

sage: K.<a> = NumberField(x^3 - 2)
sage: a.minploy()

But how do I define any number field like $\mathbb{Q}(\sqrt{d_1},\sqrt{d_2})$ in sage, where $d_1$ and $d_2$ are two distinct squarefree integers? So how do I find the defining minimal polynomial of the field extension $\mathbb{Q}(\sqrt{d_1},\sqrt{d_2})$ over $\mathbb{Q}$?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-08-17 20:47:18 +0200

nbruin gravatar image
sage: K.<a,b>=NumberField([x^2-3,x^2-5])
sage: K.absolute_field('c')
Number Field in c with defining polynomial x^4 - 16*x^2 + 4

This gets you a representation of K as a simple extension of Q. There are many choices possible.

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


Asked: 2016-08-17 18:52:09 +0200

Seen: 333 times

Last updated: Aug 17 '16