ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 04 Nov 2013 14:39:39 +0100p-adic power serieshttps://ask.sagemath.org/question/10688/p-adic-power-series/Hello,
I am new to Sage and I want to to do some math on p-adic power series. I want to
define such a power series but I did not succeeded. The last line of the
following code rises an exception:
p = 2
q = 4
K = Qp(p)
L.<omega> = Qq(q)
O_L = L.integer_ring()
R.<X> = PowerSeriesRing(O_L)
pi = L.uniformizer()
q = L.residue_class_degree()
f(X) = X^q + pi*X
**TypeError: unsupported operand parent(s) for '*': '2-adic Field with capped
relative precision 20' and 'Symbolic Ring'**
Can someone help me, please? Thanks for your time!
Bye
LarsSun, 03 Nov 2013 05:23:41 +0100https://ask.sagemath.org/question/10688/p-adic-power-series/Answer by tmonteil for <p>Hello,</p>
<p>I am new to Sage and I want to to do some math on p-adic power series. I want to
define such a power series but I did not succeeded. The last line of the
following code rises an exception:</p>
<pre><code>p = 2
q = 4
K = Qp(p)
L.<omega> = Qq(q)
O_L = L.integer_ring()
R.<X> = PowerSeriesRing(O_L)
pi = L.uniformizer()
q = L.residue_class_degree()
f(X) = X^q + pi*X
</code></pre>
<p><strong>TypeError: unsupported operand parent(s) for '*': '2-adic Field with capped
relative precision 20' and 'Symbolic Ring'</strong></p>
<p>Can someone help me, please? Thanks for your time!</p>
<p>Bye
Lars</p>
https://ask.sagemath.org/question/10688/p-adic-power-series/?answer=15645#post-id-15645You should write:
sage: f = X^q + pi*X
sage: f
(2 + O(2^21))*X + (1 + O(2^20))*X^2
Otherwise, while writing `f(X)=... ` you redefine `X` as being an element of the symbolic ring:
sage: f(X) = X^q + pi*X
TypeError: unsupported operand parent(s) for '*': 'Unramified Extension of 2-adic Field with capped relative precision 20 in omega defined by (1 + O(2^20))*x^2 + (1 + O(2^20))*x + (1 + O(2^20))' and 'Symbolic Ring'
sage: X.parent()
Symbolic Ring
Sun, 03 Nov 2013 06:39:36 +0100https://ask.sagemath.org/question/10688/p-adic-power-series/?answer=15645#post-id-15645Answer by lars.tennstedt for <p>Hello,</p>
<p>I am new to Sage and I want to to do some math on p-adic power series. I want to
define such a power series but I did not succeeded. The last line of the
following code rises an exception:</p>
<pre><code>p = 2
q = 4
K = Qp(p)
L.<omega> = Qq(q)
O_L = L.integer_ring()
R.<X> = PowerSeriesRing(O_L)
pi = L.uniformizer()
q = L.residue_class_degree()
f(X) = X^q + pi*X
</code></pre>
<p><strong>TypeError: unsupported operand parent(s) for '*': '2-adic Field with capped
relative precision 20' and 'Symbolic Ring'</strong></p>
<p>Can someone help me, please? Thanks for your time!</p>
<p>Bye
Lars</p>
https://ask.sagemath.org/question/10688/p-adic-power-series/?answer=15654#post-id-15654Thanks! This solves my problem.Mon, 04 Nov 2013 14:39:39 +0100https://ask.sagemath.org/question/10688/p-adic-power-series/?answer=15654#post-id-15654