Roland Dreier on Thu, 1 Oct 1998 08:05:08 -0500 (CDT)

 Problem computing in an extension of Q_p

```While following Bjorn's advice on computing in extensions of Q_p, I
came across the following behavior of gp, which I don't understand
(apologies for the size of the example, I haven't been able to find a
smaller example).  I make an element of such a ring, and try to invert
it.  gp fails to find the reciprocal, even though one exists.  Is this
a bug?

Thanks, Roland

(In the example, a is the element gp thinks is not invertible, and b
is its inverse; also, lines are wrapped by me, not by gp).

GP/PARI CALCULATOR Version 2.0.11 (beta)
i586 running linux (ix86 kernel) 32-bit version

C. Batut, K. Belabas, D. Bernardi, H. Cohen and M. Olivier.

Send bug reports, suggestions and patches to pari@math.u-bordeaux.fr
Type ? for help.

realprecision = 28 significant digits
seriesprecision = 16 significant terms
format = g0.28

parisize = 20000000, primelimit = 500000, buffersize = 30000
? a=Mod(Mod(250, 625)*s20^20 + Mod(300, 625)*s20^19 + Mod(600, 625)*s20^18
+ Mod(350, 625)*s20^17 + Mod(100, 625)*s20^16 + Mod(400, 625)*s20^15 +
Mod(50, 625)*s20^14 + Mod(600, 625)*s20^13 + Mod(15, 625)*s20^12 +
Mod(185, 625)*s20^11 + Mod(615, 625)*s20^10 + Mod(170, 625)*s20^9 +
Mod(185, 625)*s20^8 + Mod(340, 625)*s20^7 + Mod(200, 625)*s20^6 + Mod(120,
625)*s20^5 + Mod(190, 625)*s20^4 + Mod(145, 625)*s20^3 + Mod(170,
625)*s20^2 + Mod(185, 625)*s20 + Mod(36, 625), Mod(1, 625)*s20^21 + Mod(1,
625)*s20^19 + Mod(1, 625)*s20^18 + Mod(3, 625)*s20^17 + Mod(2, 625)*s20^16
+ Mod(4, 625)*s20^15 + Mod(2, 625)*s20^14 + Mod(3, 625)*s20^12 + Mod(3,
625)*s20^10 + Mod(3, 625)*s20^9 + Mod(4, 625)*s20^8 + Mod(3, 625)*s20^6 +
Mod(4, 625)*s20^5 + Mod(1, 625)*s20^3 + Mod(2, 625))
%1 = Mod(Mod(250, 625)*s20^20 + Mod(300, 625)*s20^19 + Mod(600,
625)*s20^18 + Mod(350, 625)*s20^17 + Mod(100, 625)*s20^16 + Mod(400,
625)*s20^15 + Mod(50, 625)*s20^14 + Mod(600, 625)*s20^13 + Mod(15,
625)*s20^12 + Mod(185, 625)*s20^11 + Mod(615, 625)*s20^10 + Mod(170,
625)*s20^9 + Mod(185, 625)*s20^8 + Mod(340, 625)*s20^7 + Mod(200,
625)*s20^6 + Mod(120, 625)*s20^5 + Mod(190, 625)*s20^4 + Mod(145,
625)*s20^3 + Mod(170, 625)*s20^2 + Mod(185, 625)*s20 + Mod(36, 625),
Mod(1, 625)*s20^21 + Mod(1, 625)*s20^19 + Mod(1, 625)*s20^18 + Mod(3,
625)*s20^17 + Mod(2, 625)*s20^16 + Mod(4, 625)*s20^15 + Mod(2, 625)*s20^14
+ Mod(3, 625)*s20^12 + Mod(3, 625)*s20^10 + Mod(3, 625)*s20^9 + Mod(4,
625)*s20^8 + Mod(3, 625)*s20^6 + Mod(4, 625)*s20^5 + Mod(1, 625)*s20^3 +
Mod(2, 625))
? 1/a
***   non-invertible polynomial in polinvmod.

? b=subst(Pol(1/(1-x)+O(x^4)),x,1-a)
%2 = Mod(Mod(375, 625)*s20^20 + Mod(150, 625)*s20^19 + Mod(175,
625)*s20^18 + Mod(50, 625)*s20^17 + Mod(50, 625)*s20^16 + Mod(325,
625)*s20^15 + Mod(150, 625)*s20^14 + Mod(425, 625)*s20^13 + Mod(460,
625)*s20^12 + Mod(315, 625)*s20^11 + Mod(435, 625)*s20^10 + Mod(30,
625)*s20^9 + Mod(40, 625)*s20^8 + Mod(560, 625)*s20^7 + Mod(50, 625)*s20^6
+ Mod(205, 625)*s20^5 + Mod(210, 625)*s20^4 + Mod(205, 625)*s20^3 +
Mod(105, 625)*s20^2 + Mod(615, 625)*s20 + Mod(66, 625), Mod(1, 625)*s20^21
+ Mod(1, 625)*s20^19 + Mod(1, 625)*s20^18 + Mod(3, 625)*s20^17 + Mod(2,
625)*s20^16 + Mod(4, 625)*s20^15 + Mod(2, 625)*s20^14 + Mod(3, 625)*s20^12
+ Mod(3, 625)*s20^10 + Mod(3, 625)*s20^9 + Mod(4, 625)*s20^8 + Mod(3,
625)*s20^6 + Mod(4, 625)*s20^5 + Mod(1, 625)*s20^3 + Mod(2, 625))
? a*b
%3 = Mod(Mod(1, 625), Mod(1, 625)*s20^21 + Mod(1, 625)*s20^19 + Mod(1,
625)*s20^18 + Mod(3, 625)*s20^17 + Mod(2, 625)*s20^16 + Mod(4, 625)*s20^15
+ Mod(2, 625)*s20^14 + Mod(3, 625)*s20^12 + Mod(3, 625)*s20^10 + Mod(3,
625)*s20^9 + Mod(4, 625)*s20^8 + Mod(3, 625)*s20^6 + Mod(4, 625)*s20^5 +
Mod(1, 625)*s20^3 + Mod(2, 625))
```