Ask Your Question
0

p-adic power series

asked 2013-11-03 05:23:41 +0100

lars.tennstedt gravatar image

updated 2017-07-31 21:47:21 +0100

FrédéricC gravatar image

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 Lars

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2013-11-03 06:39:36 +0100

tmonteil gravatar image

You 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
edit flag offensive delete link more
0

answered 2013-11-04 14:39:39 +0100

lars.tennstedt gravatar image

Thanks! This solves my problem.

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

Stats

Asked: 2013-11-03 05:23:41 +0100

Seen: 496 times

Last updated: Nov 04 '13