How to compute the different ideal of a number field extension in Sage?
Let $K/F$ be $\mathbb{Q}(\sqrt[3]{2},\zeta_3)/\mathbb{Q}(\sqrt[3]{2})$. I want to compute the different ideal $\mathfrak{d}$ for $K/F$ and check the formula of $N_{K/F} (\mathfrak{d})=\Delta_{K/F}$ where $\zeta_n$ is a $n$-th root of unity and $\Delta_{K/F}$ is the relative discriminat of $K/F$.
But, at first, I tried to compute one more easier case for $\mathbb{Q}(\sqrt{-5})/\mathbb{Q}$. It might be $\mathfrak{d}_{\mathbb{Q}(\sqrt{-5})/\mathbb{Q}}=(2\sqrt{-5})$ since $\Delta_{\mathbb{Q}(\sqrt{-5})/\mathbb{Q}}=(20)$.
My attempt is following:
x=polygen(ZZ, 'x')
K.<a>=NumberField(x^2+5)
gp(K.diff)
But this makes an error. Could you show me the correct code for this and for original setting?
In Sage/Python, you need to add the parenthesis to "call" the function. Without the parenthesis, it returns the function itself:
Also the function (also called method)
diff
does not exists forK
, that is, writtingK.d
and hitting the TAB key does not list any method calleddiff
for the number field K.OK, then how can I get the different ideal (not the discriminant)?
If you want to list methods of K containing the word "ideal", you may do:
If you want to list methods of K containing the word "different", you may do: