|
From: <D.C...@wa...> - 2008-08-05 21:43:40
|
Hi, > Wow, that's detailed. Whoever goes to implement this will find it quite >easy. > > One thing that worries me is we decided to represent a p-adic as a >multiprecision integer, but if I am reading what you've written > correctly, you are thinking of a padic as a power series in number 6 >below. Or am I just misunderstanding what you mean? I think you may be misunderstanding me, all the arithmetic I've planned is by representing a p-adic as an integer. My reasoning for (6) was in case a user wished to input a p-adic as you would by hand, say 3^-1 + 1 + 2*3 + 3^2 + O(3^3) (or in the notation below; 1 . 1 2 1) instead of inputting it more directly as an integer. This function would allow us to convert the input into a format that we would do arithmetic with. All the arithmetic I've planned is done with integers that represent the p-adic, theres no arithmetic planned using the power series representation. I was thinking as to what would be the best way to deal with say 16/5 which lies in Z_3. I was proposing that we store two integers to represent such a p-adic as (16,5) instead of storing (16/5)%(3^n); However will storing (16/5)%3^n be faster than storing two integers? The actual manipulation of the integers will take longer if we store two integers. We have to check if a power of p divides the denominator straight away otherwise the inverse modulo p^n wont exist. For example if we wanted 16/15 +O(3^5), we would have to take out 3^-1 straight away to get 16/5 and then find 16/5%3^6. We need to check the numerator for powers of p also since if we perform a division we could end up with a power of p on the denominator, in which case the reductions modulo p^k will be impossible. This was one of the things I was trying to take care of in my last email outlining division. In my previous email I was working on the basis that we store two integers for each p-adic, hence the a,b,c,d, but things will be simpler if we store a single integer. I'll have a look at this, re-write it and send it again later. > By the way, I think you asked a few days ago about how to represent >fractions in Qp. I think it will be enough to represent them as an >element of Zp multiplied by the appropriate power of p (where all we store is >the exponent of the power), e.g: Yes, all the information about the structure of Q_p we need is stored in Z_p so we can reduce arithmetic of Q_p to Z_p in this way which is how I've been thinking of doing things. So for example if we had 17/6 + O(3^5), we would write this as (3^-1)*(17/2) + O(3^6). > 2*3^-2+3^-1+1+2+O(3^2) would be represented as: > > -2, 2+3+3^2+2*3^3+O(3^4) which will really get stored as the quadruple of numbers: > > -2, 68, 3, 4 i.e. /3^-2)*(68 mod 3^4) > > Does that look like it works? > > Bill. > If x = 2*3^-2 +3^-1 + 1 +2*3 + O(3^2) then I would write x*3^2 = 2 + 3^1 + 3^2 + 2*3^3 + O(3^4) So we would need to store -2, 68, 3 and 4 as you say. Daniel Ellam |