Ask Your Question
0

extracting digits in p-adic expansion

asked 2013-01-15 10:20:05 +0100

A M gravatar image

Here is a maybe naive question.

I am working over an unramified extansion of $\mathbb{Z}_p$ (let say of degree 2), say R.(c) = Zq(7^2) so that every element of R is written as ($a_0$ c + $b_0$) + ($a_1$ *c + $b_1$) *7 + ($a_2$c + $b_2$)*7^2 + $\ldots$ .

Is there a command to extract each of the $a_i$ or $b_i$ individually ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-01-16 02:43:40 +0100

Francis Clarke gravatar image
sage: Z9.<c> = Zq(9)
sage: z = Z9.random_element(); z
2*c + (c + 2)*3 + (2*c + 2)*3^2 + (2*c + 2)*3^3 + 2*3^4 + (2*c + 1)*3^5 + (2*c + 1)*3^6 + (c + 2)*3^7 + c*3^8 + (2*c + 2)*3^10 + (c + 2)*3^11 + (2*c + 2)*3^13 + 2*3^14 + (2*c + 2)*3^15 + (c + 1)*3^16 + 2*c*3^17 + (2*c + 1)*3^18 + c*3^19 + O(3^20)
sage: z.list()
[[0, 2], [2, 1], [2, 2], [2, 2], [2], [1, 2], [1, 2], [2, 1], [0, 1], [], [2, 2], [2, 1], [], [2, 2], [2], [2, 2], [1, 1], [0, 2], [1, 2], [0, 1]]

But note that here the coefficient of $3^9$, which is zero, yields [] as its list of coefficients. Similarly, for the coefficient of $3^4$, which is $2$, we get [2].

edit flag offensive delete link more

Comments

Thanks a lot !

A M gravatar imageA M ( 2013-01-16 05:19:33 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-01-15 10:20:05 +0100

Seen: 495 times

Last updated: Jan 16 '13