Dependently Sorted Theorem Proving for Mathematical Foundations

Yiming Xu, Michael NorrishITP 2023

TL;DR

This paper introduces "DiaToM," a new theorem-proving system that uses dependent sorts and first-order logic to mechanize mathematical foundations. It offers efficient type-checking, automatic rewriting, and interactive proof support, enabling the formalization of complex mathematical structures and foundations like ETCS and SEAR, which were previously challenging or impossible in other systems.

What Problem Does This Paper Address?

Mathematicians often work with set theory without deeply engaging with its foundational axioms, and standard foundations like ZF set theory can be counterintuitive (e.g., "1 ∈ 2"). Various alternative foundations have been proposed, including category-theoretic ones like Lawvere's ETCS and Shulman's SEAR. The challenge lies in formally verifying proofs within these diverse foundational systems. Existing theorem provers, while powerful, can struggle with the expressiveness needed for these foundations, particularly when dealing with dependent types or complex set-theoretic constructions. This paper aims to bridge this gap by providing a theorem prover that is flexible enough to capture multiple foundational systems while maintaining efficiency and usability.

Methods

The core of the paper is the description of a new logical system and its implementation as an LCF-style theorem prover called DiaToM. Key methodological contributions include:

  • Dependent Sorts: The system uses dependent sorts, where the type (sort) of a term can depend on other terms. This allows for more precise and expressive type systems, crucial for formalizing mathematical structures where types are inherently related to values.
  • First-Order Logic Foundation: Despite the use of dependent sorts, the underlying logic remains first-order. This simplifies the logic and makes it more amenable to efficient implementation and translation.
  • Translation to Non-Dependent FOL: A significant technical contribution is the method for translating formulas and terms from the dependent-sorted logic into a standard, non-dependent first-order logic. This translation preserves semantics and allows existing FOL reasoners to be leveraged.
  • Function and Predicate Specification Rules: Novel rules are introduced for defining new function symbols and predicates. These rules leverage theorems about unique existence and equivalence relations, enabling the construction of complex mathematical objects and properties.
  • Internal Logic for ETCS: For the ETCS foundation, the system provides a mechanism to translate "external" formulas into "internal" logic terms, which is a key feature for working with categorical foundations.
  • Proof-of-Concept Implementation: The system is implemented in SML, providing a REPL interface and core libraries for tactics like rewriting.

Datasets

Not discussed in the paper. The paper focuses on formalizing existing mathematical theories and developing a new theorem-proving system, rather than training on or evaluating against specific datasets.

Key Insights and Ideas

  • Dependent Sorts as a Sweet Spot: The paper argues that dependent sorts, combined with a first-order logic, offer a powerful yet manageable approach for formalizing diverse mathematical foundations. This combination provides expressiveness without the full complexity of higher-order or dependent type theories.
  • Bridging the Gap for Foundational Research: DiaToM makes it practical to explore and verify complex mathematical foundations like ETCS and SEAR, which are often more intuitive for mathematicians than standard set theory.
  • SEAR's Power for Large Sets: The paper demonstrates that SEAR, due to its collection axiom, can construct "large sets" (iterated power sets) that are impossible to formalize in HOL. This highlights the limitations of HOL's type system for certain foundational questions.
  • Modal Logic Proofs Beyond HOL: The system's ability to quantify over sets (rather than just types) allows for proofs in modal model theory that are not expressible in HOL, specifically concerning formulas preserved under simulation.
  • Pragmatic Equality Handling: The system's restrictive handling of equality, focusing on rewriting and matching, is presented as a pragmatic advantage for formalizing abstract structures like groups.

Key Results

  • Formalization of ETCS and SEAR: The paper successfully formalizes Lawvere's ETCS and Shulman's SEAR, demonstrating the system's capability to capture different foundational approaches.
  • Mechanization of Mathematical Constructions: The system supports the construction of integers, lists, and co-lists, showcasing its ability to handle common mathematical developments.
  • Proof of a Modal Logic Theorem: A theorem characterizing formulas preserved under simulation in modal logic was proven, which could not be stated or proven in HOL.
  • Construction of Large Sets: The paper demonstrates the construction of iterated power sets, showing SEAR's advantage over HOL in this regard.
  • Implementation Details: A proof-of-concept implementation in SML is provided, with core logic and libraries detailed.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that while the system can formalize many SEAR results in ETCS as well, the modal model theory result and the construction of large sets specifically leverage SEAR's strengths (collection axiom, quantification over sets).
  • The "subset story" in ETCS is noted as more restrictive than in SEAR, requiring a detour through its internal logic for full generality.
  • The HOL approach to group theory is mentioned as having advantages in certain aspects (e.g., comparing groups as terms), suggesting a trade-off in how theorems are stated.
  • Future Work:
    • Formalizing McLarty's CCAF and the system's own proof theory.
  • Deriving the replacement schema from SEAR's collection axiom to enable more transfinite constructions, such as Beth cardinals.
  • Implementing a uniform approach for applying axiomatic foundations as metatheories.
  • Mechanizing theorems from the "Formalising 100 Theorems" list.
  • Supporting different ambient logics, including intuitionistic proofs.

Summary updated

BibTeX
@inproceedings{xu2023dependently,
  author = {Yiming Xu and Michael Norrish},
  title = {{Dependently Sorted Theorem Proving for Mathematical Foundations}},
  booktitle = {ITP},
  year = {2023},
  doi = {10.4230/lipics.itp.2023.33},
}

Loading related content...

Figure