Skip to main content

Formalising Mathematics in Simple Type Theory

Part of the Synthese Library book series (SYLI,volume 407)

Abstract

Despite the considerable interest in new dependent type theories, simple type theory (which dates from 1940) is sufficient to formalise serious topics in mathematics. This point is seen by examining formal proofs of a theorem about stereographic projections. A formalisation using the HOL Light proof assistant is contrasted with one using Isabelle/HOL. Harrison’s technique for formalising Euclidean spaces is contrasted with an approach using Isabelle/HOL’s axiomatic type classes. However, every formal system can be outgrown, and mathematics should be formalised with a view that it will eventually migrate to a new formalism.

This is a preview of subscription content, access via your 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   119.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   159.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD   159.99
Price excludes VAT (USA)
  • Durable hardcover 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

Notes

  1. 1.

    Italics in original.

  2. 2.

    Italics in original.

  3. 3.

    http://www.cl.cam.ac.uk/~jrh13/hol-light/

  4. 4.

    In fact the relevant proposition, ∗ 54 ⋅ 43, is a statement about sets. Many of the propositions laboriously worked out here are elementary identities that are trivial to prove with modern automation.

  5. 5.

    http://isabelle.in.tum.de

  6. 6.

    Punctured means that one point is removed.

  7. 7.

    File https://github.com/jrh13/hol-light/blob/master/Multivariate/paths.ml

  8. 8.

    Malicious code is another matter. In HOL Light, one can use OCaml’s String.set primitive to replace T (true) by F. Given the variety of loopholes in programming languages and systems, not to mention notational trickery, we must be content with defences against mere incompetence.

  9. 9.

    Because the HOL Light libraries were ported en masse, corresponding theorems generally have similar names and forms.

References

  • Bancerek, G., & Rudnicki, P. (2002). A compendium of continuous lattices in Mizar. Journal of Automated Reasoning, 29(3–4), 189–224.

    CrossRef  Google Scholar 

  • Benacerraf, P., & Putnam, H. (Eds.). (1983). Philosophy of mathematics: Selected readings (2nd ed.). Cambridge: Cambridge University Press.

    Google Scholar 

  • Bishop, E., & Bridges, D. (1985). Constructive analysis. Berlin: Springer.

    CrossRef  Google Scholar 

  • Blanchette, J. C., Hölzl, J., Lochbihler, A., Panny, L., Popescu, A., & Traytel, D. (2014). Truly modular (co)datatypes forIsabelle/HOL. In G. Klein & R. Gamboa (Eds.), Interactive Theorem Proving—5th International Conference, ITP 2014 (LNCS, Vol. 8558, pp. 93–110). Springer.

    Google Scholar 

  • Blazy, S., Paulin-Mohring, C., & Pichardie, D. (Eds.). (2013). Interactive Theorem Proving—4th International Conference (LNCS, Vol. 7998). Springer.

    Google Scholar 

  • Boldo, S., Lelay, C., & Melquiond, G. (2015). Coquelicot: A user-friendly library of real analysis for Coq. Mathematics in Computer Science, 9(1), 41–62.

    CrossRef  Google Scholar 

  • Bove, A., Dybjer, P., & Norell, U. (2009). A brief overview of Agda—A functional language with dependent types. In S. Berghofer, T. Nipkow, C. Urban, & M. Wenzel (Eds.), TPHOLs (LNCS, Vol. 5674, pp. 73–78). Springer.

    Google Scholar 

  • Church, A. (1940). A formulation of the simple theory of types. Journal of Symbolic Logic, 5, 56–68.

    CrossRef  Google Scholar 

  • Constable, R. L. et al. (1986). Implementing mathematics with the Nuprl proof development system. Englewood Cliffs: Prentice-Hall.

    Google Scholar 

  • de Bruijn, N. G. (1980). A survey of the project AUTOMATH. In J. Seldin & J. Hindley (Eds.), To H.B. Curry: Essays in combinatory logic, lambda calculus and formalism (pp. 579–606). London: Academic Press.

    Google Scholar 

  • de Bruijn, N. G. (1995). On the roles of types in mathematics. In P. de Groote (Ed.), The Curry-Howard isomorphism (pp. 27–54). Louvain-la-Neuve: Academia.

    Google Scholar 

  • Feferman, S. (2004). Typical ambiguity: Trying to have your cake and eat it too. In G. Link (Ed.), 100 years of Russell’s paradox (pp. 131–151). Berlin/Boston: Walter de Gruyter.

    Google Scholar 

  • Giménez, E. (1995). Codifying guarded definitions with recursive schemes. In P. Dybjer, B. Nordström, & J. Smith (Eds.), Types for Proofs and Programs: International Workshop TYPES’94 (pp. 39–59). Springer.

    Google Scholar 

  • Gödel, K. (1986). Review of Carnap 1934: The antinomies and the incompleteness of mathematics. In S. Feferman (Ed.), Kurt Gödel: Collected works (Vol. I, p. 389). New York: Oxford University Press.

    Google Scholar 

  • Gödel, K. (1995). Some basic theorems on the foundations of mathematics and their implications. In S. Feferman (Ed.), Kurt Gödel: Collected works (Vol. III, pp. 304–323). New York: Oxford University Press. Originally published in 1951.

    Google Scholar 

  • Gonthier, G. (2008). The four colour theorem: Engineering of a formal proof. In D. Kapur (Ed.), Computer mathematics (LNCS, Vol. 5081, pp. 333–333). Berlin/Heidelberg: Springer.

    CrossRef  Google Scholar 

  • Gonthier, G. & Mahboubi, A. (2010). An introduction to small scale reflection in Coq. Journal of Formalized Reasoning, 3(2).

    Google Scholar 

  • Gonthier, G., Asperti, A., Avigad, J., Bertot, Y., Cohen, C., Garillot, F., Le Roux, S., Mahboubi, A., O’Connor, R., Ould Biha, S., Pasca, I., Rideau, L., Solovyev, A., Tassi, E., & Théry, L. (2013). A machine-checked proof of the odd order theorem. In Blazy et al. (2013) (pp. 163–179).

    Google Scholar 

  • Harrison, J. (1996). HOL Light: A tutorial introduction. In M. K. Srivas & A. J. Camilleri (Eds.), Formal Methods in Computer-Aided Design: FMCAD’96 (LNCS, Vol. 1166, pp. 265–269). Springer.

    Google Scholar 

  • Harrison, J. (2000). Floating point verification in HOL light: The exponential function. Formal Methods in System Design, 16, 271–305.

    CrossRef  Google Scholar 

  • Harrison, J. (2005). A HOL theory of Euclidean space. In J. Hurd & T. Melham (Eds.), Theorem proving in higher order logics: TPHOLs 2005 (LNCS, Vol. 3603, pp. 114–129). Springer.

    Google Scholar 

  • Harrison, J. (2007). Formalizing basic complex analysis. In R. Matuszewski & A. Zalewska (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.

    Google Scholar 

  • Harrison, J. (2009). Formalizing an analytic proof of the prime number theorem. Journal of Automated Reasoning, 43(3), 243–261.

    CrossRef  Google Scholar 

  • Heyting, A. (1944). The intuitionist foundations of mathematics. In Benacerraf and Putnam (1983) (pp. 52–61). First published in 1944.

    Google Scholar 

  • Hölzl, J., Immler, F., & Huffman, B. (2013). Type classes and filters for mathematical analysis in Isabelle/HOL. In Blazy et al. (2013) (pp. 279–294).

    Google Scholar 

  • Jutting, L. (1977). Checking Landau’s “Grundlagen” in the AUTOMATH system. PhD thesis, Eindhoven University of Technology.

    Google Scholar 

  • Kaliszyk, C., & Urban, C. (2011). Quotients revisited for Isabelle/HOL. In W. C. Chu, W. E. Wong, M. J. Palakal, & C.-C. Hung (Eds.), SAC’11: Proceedings of the 2011 ACM Symposium on Applied Computing (pp. 1639–1644). ACM.

    Google Scholar 

  • Kaliszyk, C., & Krauss, A. (2013). Scalable LCF-style proof translation. In Blazy et al. (2013) (pp. 51–66).

    Google Scholar 

  • Krauss, A. (2010). Partial and nested recursive function definitions in higher-order logic. Journal of Automated Reasoning, 44(4), 303–336.

    CrossRef  Google Scholar 

  • Kumar, R., Arthan, R., Myreen, M. O., & Owens, S. (2016). Self-formalisation of higher-order logic: Semantics, soundness, and a verified implementation. Journal of Automated Reasoning, 56(3), 221–259.

    CrossRef  Google Scholar 

  • Kunčar, O., & Popescu, A. (2015). A consistent foundation for Isabelle/HOL. In C. Urban & X. Zhang (Eds.), Interactive Theorem Proving—6th International Conference, ITP 2015 (LNCS, Vol. 9236, pp. 234–252). Springer.

    Google Scholar 

  • Martin-Löf, P. (1975). An intuitionistic theory of types: Predicative part. In H. Rose & J. Shepherdson (Eds.), Logic Colloquium’73 (Studies in logic and the foundations of mathematics, Vol. 80, pp. 73–118). North-Holland.

    Google Scholar 

  • Martin-Löf, P. (1996). On the meanings of the logical constants and the justifications of the logical laws on the meanings of the logical constants and the justifications of the logical laws. Nordic Journal of Philosophical Logic, 1(1), 11–60.

    Google Scholar 

  • Nicely, T. R. (2011). Pentium FDIV flaw. FAQ page online at http://www.trnicely.net/pentbug/pentbug.html

    Google Scholar 

  • Nipkow, T., Paulson, L. C., & Wenzel, M. (2002). Isabelle/HOL: A proof assistant for higher-order logic. Springer. Online at http://isabelle.in.tum.de/dist/Isabelle/doc/tutorial.pdf

    CrossRef  Google Scholar 

  • Nordström, B., Petersson, K., & Smith, J. (1990). Programming in Martin-Löf’s type theory. An introduction. New York: Oxford University Press.

    Google Scholar 

  • Obua, S. & Skalberg, S. (2006). Importing HOL into Isabelle/HOL. In U. Furbach & N. Shankar (Eds.), Automated Reasoning: Third International Joint Conference, IJCAR 2006. Proceedings, Seattle, 17–20 Aug 2006 (LNAI, Vol. 4130, pp. 298–302). Springer.

    Google Scholar 

  • Paulson, L. C. (1986a). Constructing recursion operators in intuitionistic type theory. Journal of Symbolic Computation, 2, 325–355.

    CrossRef  Google Scholar 

  • Paulson, L. C. (1986b). Natural deduction as higher-order resolution. Journal of Logic Programming, 3, 237–258.

    CrossRef  Google Scholar 

  • Paulson, L. C. (1987). Logic and computation: Interactive proof with Cambridge LCF. Cambridge/New York: Cambridge University Press.

    CrossRef  Google Scholar 

  • Paulson, L. C. (1996). ML for the working programmer (2nd ed.). Cambridge: Cambridge University Press.

    CrossRef  Google Scholar 

  • Paulson, L. C. (1997). Mechanizing coinduction and corecursion in higher-order logic. Journal of Logic and Computation, 7(2), 175–204.

    CrossRef  Google Scholar 

  • Paulson, L. C. (2004). Organizing numerical theories using axiomatic type classes. Journal of Automated Reasoning, 33(1), 29–49.

    CrossRef  Google Scholar 

  • Paulson, L. C. (2018). Computational logic: Its origins and applications. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 474(2210). https://doi.org/10.1098/rspa.2017.0872

  • Schlichtkrull, A. (2016). Formalization of the resolution calculus for first-order logic. In J. C. Blanchette & S. Merz (Eds.), Interactive Theorem Proving: 7th International Conference, ITP 2016. Proceedings, Nancy, 22–25 Aug 2016 (LNCS, Vol. 9807, pp. 341–357). Springer.

    Google Scholar 

  • Scott, D. S. (1993). A type-theoretical alternative to ISWIM, CUCH, OWHY. Theoretical Computer Science, 121, 411–440. Annotated version of the 1969 manuscript.

    Google Scholar 

  • Trybulec, A. (1993). Some features of the Mizar language. http://mizar.org/project/trybulec93.pdf/

    Google Scholar 

  • von Neumann, J. (1944). The formalist foundations of mathematics. In Benacerraf and Putnam (1983) (pp. 61–65). First published in 1944.

    Google Scholar 

  • Wenzel, M. (1997). Type classes and overloading in higher-order logic. In E. L. Gunter & A. Felty (Eds.), Theorem Proving in Higher Order Logics: TPHOLs’97 (LNCS, Vol. 1275, pp. 307–322). Springer.

    Google Scholar 

  • Wenzel, M. (2007). Isabelle/Isar—A generic framework for human-readable proof documents. Studies in Logic, Grammar, and Rhetoric, 10(23), 277–297. From Insight to Proof—Festschrift in Honour of Andrzej Trybulec.

    Google Scholar 

  • Whitehead, A. N., & Russell, B. (1962). Principia mathematica. Cambridge: Cambridge University Press. Paperback edition to *56, abridged from the 2nd edition (1927).

    Google Scholar 

  • Zhan, B. (2017). Formalization of the fundamental group in untyped set theory using auto2. In M. Ayala-Rincón & C. A. Muñoz (Eds.), Interactive Theorem Proving—8th International Conference, ITP 2017 (pp. 514–530). Springer.

    Google Scholar 

Download references

Acknowledgements

Dedicated to Michael J C Gordon FRS, 1948–2017. The development of HOL and Isabelle has been supported by numerous EPSRC grants. The ERC project ALEXANDRIA supports continued work on the topic of this paper. Many thanks to Jeremy Avigad, Johannes Hölzl, Neel Krishnaswami, Andrew Pitts, Andrei Popescu and the anonymous referee for their comments.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Lawrence C. Paulson .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Paulson, L.C. (2019). Formalising Mathematics in Simple Type Theory. In: Centrone, S., Kant, D., Sarikaya, D. (eds) Reflections on the Foundations of Mathematics. Synthese Library, vol 407. Springer, Cham. https://doi.org/10.1007/978-3-030-15655-8_20

Download citation