Ask Your Question
1

Artin decomposition for p-adic numbers

asked 2013-10-26 21:06:49 -0500

Klaus Scheicher gravatar image

How can I decompose a p-adic number

... d_2 d_1 d_0. d_{-1} ... d_{-k}

into its integer part

d_2 d_1 d_0.

and fractional part

. d_{-1} ... d_{-k} ?

The does not seem to exist a kind of floor function.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2013-10-27 01:12:07 -0500

tmonteil gravatar image

You can use the .slice() method. For the frac function, you may have to decide wether you want to keep the precision of your adic number or if you want to reset it to 1:

sage: floor_adic = lambda a : a.slice(0, a.precision_absolute())
sage: frac_adic = lambda a : a - a.slice(0, a.precision_absolute())
sage: frac_adic_noprec = lambda a : a.slice(a.valuation(), 0)

sage: K = Qp(11); K
11-adic Field with capped relative precision 20
sage: b = K(3211/11^2); b
10*11^-2 + 5*11^-1 + 4 + 2*11 + O(11^18)

sage: floor_adic(b)
4 + 2*11 + O(11^18)
sage: frac_adic(b)
10*11^-2 + 5*11^-1 + O(11^18)
sage: frac_adic_noprec(b)
10*11^-2 + 5*11^-1 + O(11^0)
edit flag offensive delete link more
0

answered 2013-10-27 01:25:15 -0500

Klaus Scheicher gravatar image

Thank you very much!

edit flag offensive delete link more

Comments

If this helped you, please click the accept button in the answer! Then others will know that this question has a correct answer when they search.

kcrisman gravatar imagekcrisman ( 2013-10-27 14:21:00 -0500 )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-10-26 21:06:49 -0500

Seen: 88 times

Last updated: Oct 27 '13