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, 13 Sep 2019 16:39:31 -0500$p$-adic extension of $n$th root of unity.https://ask.sagemath.org/question/47812/p-adic-extension-of-nth-root-of-unity/I have used the following command to define the 5-adic Unramified extension ring in c defined by the polynomial $x^3 + 3x + 3$:
Sage: R.<c> = zq(125, prec=20)
Now, I want to find all the $n$th root of unity in this ring for $n$ dividing $124$. I dont know, how the $n$-th roots are implemented. Kindly help me with this.
Thank you.Tue, 10 Sep 2019 04:41:54 -0500https://ask.sagemath.org/question/47812/p-adic-extension-of-nth-root-of-unity/Comment by vdelecroix for <p>I have used the following command to define the 5-adic Unramified extension ring in c defined by the polynomial $x^3 + 3x + 3$:</p>
<pre><code>Sage: R.<c> = zq(125, prec=20)
</code></pre>
<p>Now, I want to find all the $n$th root of unity in this ring for $n$ dividing $124$. I dont know, how the $n$-th roots are implemented. Kindly help me with this.</p>
<p>Thank you.</p>
https://ask.sagemath.org/question/47812/p-adic-extension-of-nth-root-of-unity/?comment=47828#post-id-47828`zq` is `Zq`Tue, 10 Sep 2019 15:20:58 -0500https://ask.sagemath.org/question/47812/p-adic-extension-of-nth-root-of-unity/?comment=47828#post-id-47828Comment by tmonteil for <p>I have used the following command to define the 5-adic Unramified extension ring in c defined by the polynomial $x^3 + 3x + 3$:</p>
<pre><code>Sage: R.<c> = zq(125, prec=20)
</code></pre>
<p>Now, I want to find all the $n$th root of unity in this ring for $n$ dividing $124$. I dont know, how the $n$-th roots are implemented. Kindly help me with this.</p>
<p>Thank you.</p>
https://ask.sagemath.org/question/47812/p-adic-extension-of-nth-root-of-unity/?comment=47814#post-id-47814You should provide more details. In particular, what is `zq` ?Tue, 10 Sep 2019 06:51:46 -0500https://ask.sagemath.org/question/47812/p-adic-extension-of-nth-root-of-unity/?comment=47814#post-id-47814Answer by dan_fulea for <p>I have used the following command to define the 5-adic Unramified extension ring in c defined by the polynomial $x^3 + 3x + 3$:</p>
<pre><code>Sage: R.<c> = zq(125, prec=20)
</code></pre>
<p>Now, I want to find all the $n$th root of unity in this ring for $n$ dividing $124$. I dont know, how the $n$-th roots are implemented. Kindly help me with this.</p>
<p>Thank you.</p>
https://ask.sagemath.org/question/47812/p-adic-extension-of-nth-root-of-unity/?answer=47910#post-id-47910The residue field $K=\Bbb F_5(c_0)$ of the declared ring $R=\Bbb Q_5(c)$ is the field with $5^3$ elements, and all elements in $K^\times$ have order $5^3-1=124$. So we can ask for the Teichmuller lifts of elements of $K$, for instance, for the element $1+c_0$ the lift ist as follows.
sage: R.<c> = Zq(125, prec=5)
sage: K = R.residue_field()
sage: R
5-adic Unramified Extension Ring in c defined by x^3 + 3*x + 3
sage: K
Finite Field in c0 of size 5^3
sage: R.teichmuller( K(1+c) )
(c + 1) + (4*c^2 + 3*c + 2)*5 + (4*c^2 + 3*c + 1)*5^2 + 3*c*5^3 + (c^2 + 2*c + 4)*5^4 + O(5^5)
sage: _^124
1 + O(5^5)
Note: Check also if the following does a better job in the intentioned application:
R.teichmuller_system()
Fri, 13 Sep 2019 16:39:31 -0500https://ask.sagemath.org/question/47812/p-adic-extension-of-nth-root-of-unity/?answer=47910#post-id-47910Answer by vdelecroix for <p>I have used the following command to define the 5-adic Unramified extension ring in c defined by the polynomial $x^3 + 3x + 3$:</p>
<pre><code>Sage: R.<c> = zq(125, prec=20)
</code></pre>
<p>Now, I want to find all the $n$th root of unity in this ring for $n$ dividing $124$. I dont know, how the $n$-th roots are implemented. Kindly help me with this.</p>
<p>Thank you.</p>
https://ask.sagemath.org/question/47812/p-adic-extension-of-nth-root-of-unity/?answer=47829#post-id-47829You can simply ask for the roots of cyclotomic polynomials
sage: R.<c> = Zq(125, prec=20)
sage: cyclotomic_polynomial(4).roots(multiplicities=False, ring=R)
[2 + 5 + 2*5^2 + 5^3 + 3*5^4 + 4*5^5 + ... + 4*5^17 + 4*5^19 + O(5^20),
3 + 3*5 + 2*5^2 + 3*5^3 + 5^4 + 2*5^6 + ... + 2*5^16 + 4*5^18 + O(5^20)]
Sadly, the zeta method is not available to give you a single primitive n-th root
sage: R.zeta(4)
Traceback (most recent call last):
...
NotImplementedError:
Tue, 10 Sep 2019 15:25:40 -0500https://ask.sagemath.org/question/47812/p-adic-extension-of-nth-root-of-unity/?answer=47829#post-id-47829