Skip to main content

A Purely Functional Library for Modular Arithmetic and Its Application to Certifying Large Prime Numbers

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 4130))

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. GNU Multiple Precision Arithmetic Library, http://www.swox.com/gmp/

  2. Barendregt, H., Barendsen, E.: Autarkic computations in formal proofs. J. Autom. Reasoning 28(3), 321–336 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  3. Bertot, Y., Magaud, N., Zimmermann, P.: A proof of GMP square root. Journal of Automated Reasoning 29(3-4), 225–252 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  4. 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)

    Chapter  Google Scholar 

  5. Brillhart, J., Lehmer, D.H., Selfridge, J.L.: New primality criteria and factorizations of 2m ±1. Mathematics of Computation 29, 620–647 (1975)

    MATH  MathSciNet  Google Scholar 

  6. Burnikel, C., Ziegler, J.: Fast recursive division. Technical Report MPI-I-98-1-022, Max-Planck-Institut (1998)

    Google Scholar 

  7. 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)

    Article  MATH  MathSciNet  Google Scholar 

  8. Crandall, R., Fagin, B.: Discrete weighted transforms and large-integer arithmetic.  62(205), 305–324 (1994)

    Google Scholar 

  9. Gonthier, G.: A computer-checked proof of the Four Colour Theorem. Technical report, available at http://research.microsoft.com/~gonthier/4colproof.pdf

  10. 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)

    Google Scholar 

  11. 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)

    Chapter  Google Scholar 

  12. 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)

    Chapter  Google Scholar 

  13. Harrison, J., Théry, L.: A skeptic’s approach to combining HOL and Maple. J. Autom. Reasoning 21(3), 279–294 (1998)

    Article  MATH  Google Scholar 

  14. Karatsuba, A.A., Ofman, Y.: Multiplication of Many-Digital Numbers by Automatic Computers. Soviet Physics-Doklad 7, 595–596 (1963)

    Google Scholar 

  15. Leroy, X.: Objective Caml (1997), available at http://pauillac.inria.fr/ocaml/

  16. Ménissier-Morain, V.: The CAML Numbers Reference Manual. Technical Report 141, INRIA (1992)

    Google Scholar 

  17. Nipkow, T., Bauer, G., Schultz, P.: Flyspeck I: Tame Graphs. Technical report, available at http://www.in.tum.de/nipkow/pubs/Flyspeck/

  18. The Coq development team. The Coq Proof Assistant Reference Manual v7.2. Technical Report 255, INRIA (2002), available at http://coq.inria.fr/doc

  19. Zimmermann, P.: Karatsuba square root. Research Report 3805, INRIA (1999)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics