Skip to main content
Log in

Formalizing an Analytic Proof of the Prime Number Theorem

  • Published:
Journal of Automated Reasoning Aims and scope Submit manuscript

Abstract

We describe the computer formalization of a complex-analytic proof of the Prime Number Theorem (PNT), a classic result from number theory characterizing the asymptotic density of the primes. The formalization, conducted using the HOL Light theorem prover, proceeds from the most basic axioms for mathematics yet builds from that foundation to develop the necessary analytic machinery including Cauchy’s integral formula, so that we are able to formalize a direct, modern and elegant proof instead of the more involved ‘elementary’ Erdös-Selberg argument. As well as setting the work in context and describing the highlights of the formalization, we analyze the relationship between the formal proof and its informal counterpart and so attempt to derive some general lessons about the formalization of mathematics.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Agrawal, M., Kayal, N., Saxena, N.: PRIMES is in P. Ann. Math. 160, 781–793 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  2. Avigad, J., Donnelly, K.: Formalizing O notation in Isabelle/HOL. In: Basin D., Rusinowitsch M. (eds.) Proceedings of the Second International Joint Conference on Automated Reasoning. Lecture Notes in Computer Science, vol. 3097, pp. 357–371. Springer, Cork (2004)

    Google Scholar 

  3. Avigad, J., Donnelly, K., Gray, D., Raff, P.: A formally verified proof of the prime number theorem. Acm Trans. Comput. Log. 9(1:2), 1–23 (2007)

    MathSciNet  Google Scholar 

  4. Bak, J. Newman, D.J.: Complex Analysis. Springer, New York (1997)

    MATH  Google Scholar 

  5. Boulton, R., Gordon, A., Gordon, M., Harrison, J., Herbert, J., Van Tassel, J.: Experience with embedding hardware description languages in HOL. In: Stavridou, V., Melham, T.F., Boute, R.T. (eds.) Proceedings of the IFIP TC10/WG 10.2 International Conference on Theorem Provers in Circuit Design: Theory, Practice and Experience. IFIP Transactions A: Computer Science and Technology, vol. A-10, pp. 129–156. North-Holland, Nijmegen (1993)

    Google Scholar 

  6. Conway, J. Kochen, S.: The free will theorem. Found. Phys. 36, 1441 (2006)

    Google Scholar 

  7. Davis, M.: Obvious logical inferences. In: Hayes, P.J. (ed.) Proceedings of the Seventh International Joint Conference on Artificial Intelligence, pp. 530–531. Kaufmann, Ingolstadt (1981)

    Google Scholar 

  8. Gordon, M.J.C.: Representing a logic in the LCF metalanguage. In: Néel, D. (ed.) Tools and Notions for Program Construction: An Advanced Course, pp. 163–185. Cambridge University Press, Cambridge (1982)

    Google Scholar 

  9. Gordon, M.J.C., Melham, T.F.: Introduction to HOL: A Theorem Proving Environment for Higher Order Logic. Cambridge University Press, Cambridge (1993)

    MATH  Google Scholar 

  10. Gordon, M.J.C., Milner, R., Wadsworth, C.P.: Edinburgh LCF: A Mechanised Logic of Computation. Lecture Notes in Computer Science, vol. 78. Springer, Cambridge (1979)

    Google Scholar 

  11. Harrison, J.: Constructing the real numbers in HOL. In: Claesen, L.J.M., Gordon, M.J.C. (eds.) Proceedings of the IFIP TC10/WG10.2 International Workshop on Higher Order Logic Theorem Proving and its Applications. IFIP Transactions A: Computer Science and Technology, vol. A-20, pp. 145–164. IMEC, Leuven (1992)

    Google Scholar 

  12. Harrison, J.: Theorem Proving with the Real Numbers. Springer, New York (1998) (Revised version of author’s PhD thesis)

    MATH  Google Scholar 

  13. Harrison, J.: Formal verification of floating point trigonometric functions. In: Hunt, W.A., Johnson, S.D. (eds.) Formal Methods in Computer-Aided Design: Third International Conference FMCAD 2000. Lecture Notes in Computer Science, vol. 1954, pp. 217–233. Springer, New York (2000)

    Google Scholar 

  14. Harrison, J.: Complex quantifier elimination in HOL. In: Boulton, R.J., Jackson, P.B. (eds.) TPHOLs 2001: Supplemental Proceedings, pp. 159–174. Division of Informatics, University of Edinburgh. Published as Informatics Report Series EDI-INF-RR-0046. http://www.informatics.ed.ac.uk/publications/report/0046.html (2001)

  15. Harrison, J.: Isolating critical cases for reciprocals using integer factorization. In: Bajard, J.-C., Schulte, M. (eds.) Proceedings, 16th IEEE Symposium on Computer Arithmetic, pp. 148–157. Santiago de Compostela, Spain. IEEE Computer Society, Los Alamitos (2003) (http://www.dec.usc.es/arith16/papers/paper-150.pdf)

  16. Harrison, J.: A HOL theory of Euclidean space. In: Hurd, J., Melham, T. (eds.) Theorem Proving in Higher Order Logics, 18th International Conference, TPHOLs 2005. Lecture Notes in Computer Science, vol. 3603, pp. 114–129. Springer, Oxford (2005)

    Google Scholar 

  17. Harrison, J.: The HOL light tutorial. http://www.cl.cam.ac.uk/~jrh13/hol-light/tutorial.pdf (2006)

  18. Harrison, J.: Formalizing basic complex analysis. In: Matuszewski, R., Zalewska, A. (eds.) From Insight to Proof: Festschrift in Honour of Andrzej Trybulec. Studies in Logic, Grammar and Rhetoric, vol. 10(23), pp. 151–165. University of Białystok, Białystok (2007)

    Google Scholar 

  19. Ingham, A.E.: The Distribution of Prime Numbers. Cambridge University Press, Cambridge (1932)

    Google Scholar 

  20. Jameson, G.J.O.: The Prime Number Theorem. London Mathematical Society Student Texts, vol. 53. Cambridge University Press, Cambridge (2003)

    Google Scholar 

  21. Newman, D.J.: Analytic Number Theory. Graduate Texts in Mathematics, vol. 177. Springer, New York (1998)

    MATH  Google Scholar 

  22. Rudnicki, P.: Obvious inferences. J. Autom. Reason. 3, 383–393 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  23. Tenenbaum, G., France, M.M.: The Prime Numbers and Their Distribution. Student Mathematical Library, vol. 6. American Mathematical Society, Providence (2000) (Translation by Philip G. Spain, from French original “Nombres premiers”, Presses Universitaires de France, 1997.)

  24. Théry, L., Hanrot, G.: Primality proving with elliptic curves. In: Schneider, K., Brandt, J. (eds.) Proceedings of the 20th International Conference on Theorem Proving in Higher Order Logics, TPHOLs 2007. Lecture Notes in Computer Science, vol. 4732, pp. 319–333. Springer, Kaiserslautern (2007)

    Chapter  Google Scholar 

  25. Wiedijk, F.: The de Bruijn factor. http://www.cs.ru.nl/~freek/factor/ (2000)

  26. Wiedijk, F.: The seventeen provers of the world. In: Lecture Notes in Computer Science, vol. 3600. Springer, New York (2006)

    Google Scholar 

  27. Wos, L., Pieper, G.W.: A Fascinating Country in the World of Computing: Your Guide to Automated Reasoning. World Scientific, Singapore (1999)

    MATH  Google Scholar 

  28. Zagier, D.: Newman’s short proof of the prime number theorem. Am. Math. Mon. 104, 705–708 (1997)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to John Harrison.

Additional information

Dedicated to Mike Gordon on the occasion of his 60th birthday.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Harrison, J. Formalizing an Analytic Proof of the Prime Number Theorem . J Autom Reasoning 43, 243–261 (2009). https://doi.org/10.1007/s10817-009-9145-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10817-009-9145-6

Keywords

Navigation