Search the site

Table of contents for this issue | Previous article | Next article
Jérémy Berthomieu; Joris van der Hoeven; Grégoire Lecerf
Relaxed algorithms for $p$-adic numbers
Journal de théorie des nombres de Bordeaux, 23 no. 3 (2011), p. 541-577, doi: 10.5802/jtnb.777
Article PDF | Reviews MR 2861075 | Zbl 1247.11152 | 1 citation in Cedram
Class. Math.: 68W30, 11Y40, 11Y16
Keywords: $p$-adic numbers, power series, algorithms

Résumé - Abstract

Current implementations of $p$-adic numbers usually rely on so called zealous algorithms, which compute with truncated $p$-adic expansions at a precision that can be specified by the user. In combination with Newton-Hensel type lifting techniques, zealous algorithms can be made very efficient from an asymptotic point of view.

In the similar context of formal power series, another so called lazy technique is also frequently implemented. In this context, a power series is essentially a stream of coefficients, with an effective promise to obtain the next coefficient at every stage. This technique makes it easier to solve implicit equations and also removes the burden of determining appropriate precisions from the user. Unfortunately, naive lazy algorithms are not competitive from the asymptotic complexity point of view. For this reason, a new relaxed approach was proposed by van der Hoeven in the 90’s, which combines the advantages of the lazy approach with the asymptotic efficiency of the zealous approach.

In this paper, we show how to adapt the lazy and relaxed approaches to the context of $p$-adic numbers. We report on our implementation in the C++ library algebramix of Mathemagix, and show significant speedups in the resolution of $p$-adic functional equations when compared to the classical Newton iteration.


[Ber00] D. Bernstein, Removing redundancy in high precision Newton iteration. Available from, 2000.
[BK78] R. P. Brent and H. T. Kung, Fast algorithms for manipulating formal power series. Journal of the ACM 25 (1978), 581–595.  MR 520733 |  Zbl 0388.68052
[Bre76] R. P. Brent, The complexity of multiprecision arithmetic. In R. S. Anderssen and R. P. Brent, editors, Complexity of computational problem solving, 126–165. University of Queensland Press, Brisbane, 1976.
[CC90] D. V. Chudnovsky and G. V. Chudnovsky, Computer algebra in the service of mathematical physics and number theory (Computers in mathematics, Stanford, Ca, 1986). In Lect. Notes in Pure and Applied Math. 125, 109–232. Dekker, New-York, 1990.  MR 1068536 |  Zbl 0712.11078
[CK91] D. G. Cantor and E. Kaltofen, On fast multiplication of polynomials over arbitrary algebras. Acta Informatica 28 (1991), 693–701.  MR 1129288 |  Zbl 0766.68055
[DL08] C. Durvye and G. Lecerf, A concise proof of the Kronecker polynomial system solver from scratch. Expositiones Mathematicae 26(2) (2008), 101 – 139.  MR 2413831 |  Zbl 1134.14317
[DS04] S. De Smedt, $p$-adic arithmetic. The Mathematica Journal 9(2) (2004), 349–357.
[FS56] A. Fröhlich and J. C. Shepherdson, Effective procedures in field theory. Philos. Trans. Roy. Soc. London. Ser. A. 248 (1956), 407–432.  MR 74349 |  Zbl 0070.03502
[Für07] M. Fürer, Faster integer multiplication. In Proceedings of the Thirty-Ninth ACM Symposium on Theory of Computing (STOC 2007), 57–66, San Diego, California, 2007.  MR 2402428 |  Zbl 1179.68198
[G+91] T. Granlund et al, GMP, the GNU multiple precision arithmetic library. Available from, 1991.
[Gat84] J. von zur Gathen, Hensel and Newton methods in valuation rings. Math. Comp., 42(166) (1984), 637–661.  MR 736459 |  Zbl 0581.13001
[GG03] J. von zur Gathen and J. Gerhard, Modern computer algebra. Cambridge University Press, Cambridge, second edition, 2003.  MR 2001757 |  Zbl 1055.68168
[H+02] J. van der Hoeven et al, Mathemagix. Available from, 2002.
[HH09] W. B. Hart and D. Harvey, FLINT 1.5.1: Fast library for number theory. Available from, 2009.
[Hoe97] J. van der Hoeven, Lazy multiplication of formal power series. In W. W. Küchlin, editor, Proceedings of the 1997 International Symposium on Symbolic and Algebraic Computation (ISSAC 1997), 17–20, Maui, Hawaii, July 1997.  Zbl 0932.68135
[Hoe99] J. van der Hoeven, Fast evaluation of holonomic functions. Theoretical Computer Science, 210 (1999), 199–215.  MR 1650888 |  Zbl 0912.68081
[Hoe01] J. van der Hoeven, Fast evaluation of holonomic functions near and in singularities. J. Symbolic Comput. 31 (2001), 717–743.  MR 1834006 |  Zbl 0982.65024
[Hoe02] J. van der Hoeven, Relax, but don’t be too lazy. J. Symbolic Comput. 34(6) (2002), 479–542.  MR 1943041 |  Zbl 1011.68189
[Hoe07a] J. van der Hoeven, Efficient accelero-summation of holonomic functions. J. Symbolic Comput. 42(4) (2007), 389–428.  MR 2317557 |  Zbl 1125.34072
[Hoe07b] J. van der Hoeven, New algorithms for relaxed multiplication. J. Symbolic Comput., 42(8) (2007), 792–802.  MR 2345837 |  Zbl 1130.68103
[Hoe09] J. van der Hoeven, Relaxed resolution of implicit equations. Technical report, HAL, 2009.
[Hoe10] J. van der Hoeven, Newton’s method and FFT trading. J. Symbolic Comput. 45(8) (2010), 857–878.  MR 2657669 |  Zbl 1192.13017
[Kat07] S. Katok, $p$-adic analysis compared with real. Student Mathematical Library 37. American Mathematical Society, Providence, RI, 2007.  MR 2298943 |  Zbl 1147.12003
[Kob84] N. Koblitz, $p$-adic numbers, $p$-adic analysis, and zeta-functions. Graduate Texts in Mathematics 58. Springer-Verlag, New York, second edition, 1984.  MR 754003 |  Zbl 0364.12015
[Lan02] S. Lang, Algebra. Graduate Texts in Mathematics 211. Springer-Verlag, third edition, 2002.  MR 1878556 |  Zbl 0984.00001
[PAR08] The PARI Group, Bordeaux, PARI/GP, version 2.3.5, 2008. Available from
[S+09] W. A. Stein et al, Sage Mathematics Software (Version 4.2.1). The Sage Development Team, 2009. Available from
[SS71] A. Schönhage and V. Strassen, Schnelle Multiplikation grosser Zahlen. Computing 7 (1971), 281–292.  MR 292344 |  Zbl 0223.68007
[Wan84] P. S. Wang, Implementation of a $p$-adic package for polynomial factorization and other related operations. In EUROSAM 84 (Cambridge, 1984), Lecture Notes in Comput. Sci. 174, 86–99. Springer, Berlin, 1984.  MR 779119 |  Zbl 0563.12013