ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 08 Nov 2019 07:14:34 -0600quotient of algebraic integer ringshttps://ask.sagemath.org/question/48603/quotient-of-algebraic-integer-rings/This is my first time using sage so this might be a stupid question:
I want to construct the field $K=\mathbb{Q}(\sqrt{2}, \frac{-1+\sqrt{3}i}{2})=\mathbb{Q}(\alpha)$, where $\alpha$ is a primitive element. Denoting its ring of algebraic integers $\mathcal{O}_K$, I want to compute the quotient ring $\mathcal{O}_K/\mathbb{Z}[\alpha]$.
My code is like:
K.<d> = QQ.extension(x^2-2)
L.<w> = K.extension(x^2+x+1)
a = L.primitive_element()
O = L.ring_of_integers()
za = ZZ[a]
print O.quotient(za)
But I always get an error:
TypeError: unable to convert Relative Order in Number Field in w0 with defining polynomial x^2 + (2*d + 1)*x + d + 3 over its base field to Number Field in w with defining polynomial x^2 + x + 1 over its base field
Any help is appreciated. Thanks.
Sun, 03 Nov 2019 23:39:09 -0600https://ask.sagemath.org/question/48603/quotient-of-algebraic-integer-rings/Comment by David Tweedle for <p>This is my first time using sage so this might be a stupid question:</p>
<p>I want to construct the field $K=\mathbb{Q}(\sqrt{2}, \frac{-1+\sqrt{3}i}{2})=\mathbb{Q}(\alpha)$, where $\alpha$ is a primitive element. Denoting its ring of algebraic integers $\mathcal{O}_K$, I want to compute the quotient ring $\mathcal{O}_K/\mathbb{Z}[\alpha]$.</p>
<p>My code is like:</p>
<p>K.<d> = QQ.extension(x^2-2)</p>
<p>L.<w> = K.extension(x^2+x+1)</p>
<p>a = L.primitive_element()</p>
<p>O = L.ring_of_integers()</p>
<p>za = ZZ[a]</p>
<p>print O.quotient(za)</p>
<p>But I always get an error:
TypeError: unable to convert Relative Order in Number Field in w0 with defining polynomial x^2 + (2<em>d + 1)</em>x + d + 3 over its base field to Number Field in w with defining polynomial x^2 + x + 1 over its base field</p>
<p>Any help is appreciated. Thanks.</p>
https://ask.sagemath.org/question/48603/quotient-of-algebraic-integer-rings/?comment=48672#post-id-48672I'm not sure how to fix the type error. But the ring $\mathbb{Z}[\alpha]$ is not an ideal of $\mathcal{O}_K$. But it is an (additive) subgroup. You can try to write $\alpha^j = \sum a_{ij} \alpha_i$ where $ \{ \alpha_i \} $ is an integral basis for $\mathcal{O}_K$. Then you can compute the smith normal form of $[a_{ij}]$ and that should tell you the structure of the abelian group $\mathcal{O}_K/\mathbb{Z}[\alpha]$.Fri, 08 Nov 2019 07:14:34 -0600https://ask.sagemath.org/question/48603/quotient-of-algebraic-integer-rings/?comment=48672#post-id-48672