Abstract
Computing efficiently with numbers can be crucial for some theorem proving applications. In this paper, we present a library of modular arithmetic that has been developed within the Coq proof assistant. The library proposes the usual operations that have all been proved correct. The library is purely functional but can also be used on top of some native modular arithmetic. With this library, we have been capable of certifying the primality of numbers with more than 13000 digits.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
GNU Multiple Precision Arithmetic Library, http://www.swox.com/gmp/
Barendregt, H., Barendsen, E.: Autarkic computations in formal proofs. J. Autom. Reasoning 28(3), 321–336 (2002)
Bertot, Y., Magaud, N., Zimmermann, P.: A proof of GMP square root. Journal of Automated Reasoning 29(3-4), 225–252 (2002)
Boutin, S.: Using Reflection to Build Efficient and Certified Decision Procedures. In: Ito, T., Abadi, M. (eds.) TACS 1997. LNCS, vol. 1281, pp. 515–529. Springer, Heidelberg (1997)
Brillhart, J., Lehmer, D.H., Selfridge, J.L.: New primality criteria and factorizations of 2m ±1. Mathematics of Computation 29, 620–647 (1975)
Burnikel, C., Ziegler, J.: Fast recursive division. Technical Report MPI-I-98-1-022, Max-Planck-Institut (1998)
Caprotti, O., Oostdijk, M.: Formal and efficient primality proofs by use of computer algebra oracles. Journal of Symbolic Computation 32(1/2), 55–70 (2001)
Crandall, R., Fagin, B.: Discrete weighted transforms and large-integer arithmetic. 62(205), 305–324 (1994)
Gonthier, G.: A computer-checked proof of the Four Colour Theorem. Technical report, available at http://research.microsoft.com/~gonthier/4colproof.pdf
Grégoire, B., Leroy, X.: A compiled implementation of strong reduction. In: International Conference on Functional Programming 2002, pp. 235–246. ACM Press, New York (2002)
Grégoire, B., Mahboubi, A.: Proving ring equalities done right in Coq. In: Hurd, J., Melham, T. (eds.) TPHOLs 2005. LNCS, vol. 3603, pp. 98–113. Springer, Heidelberg (2005)
Grégoire, B., Théry, L., Werner, B.: A computational approach to Pocklington certificates in type theory. In: Hagiya, M., Wadler, P. (eds.) FLOPS 2006. LNCS, vol. 3945, pp. 97–113. Springer, Heidelberg (2006)
Harrison, J., Théry, L.: A skeptic’s approach to combining HOL and Maple. J. Autom. Reasoning 21(3), 279–294 (1998)
Karatsuba, A.A., Ofman, Y.: Multiplication of Many-Digital Numbers by Automatic Computers. Soviet Physics-Doklad 7, 595–596 (1963)
Leroy, X.: Objective Caml (1997), available at http://pauillac.inria.fr/ocaml/
Ménissier-Morain, V.: The CAML Numbers Reference Manual. Technical Report 141, INRIA (1992)
Nipkow, T., Bauer, G., Schultz, P.: Flyspeck I: Tame Graphs. Technical report, available at http://www.in.tum.de/nipkow/pubs/Flyspeck/
The Coq development team. The Coq Proof Assistant Reference Manual v7.2. Technical Report 255, INRIA (2002), available at http://coq.inria.fr/doc
Zimmermann, P.: Karatsuba square root. Research Report 3805, INRIA (1999)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Grégoire, B., Théry, L. (2006). A Purely Functional Library for Modular Arithmetic and Its Application to Certifying Large Prime Numbers. In: Furbach, U., Shankar, N. (eds) Automated Reasoning. IJCAR 2006. Lecture Notes in Computer Science(), vol 4130. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11814771_36
Download citation
DOI: https://doi.org/10.1007/11814771_36
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-37187-8
Online ISBN: 978-3-540-37188-5
eBook Packages: Computer ScienceComputer Science (R0)