The Theory of LEGO A Proof Checker for the Extended Calculus of Constructions

LEGO is a computer program for interactive typechecking in the Extended Calculus of Constructions and two of its subsystems. LEGO also supports the extension of these three systems with inductive types. These type systems can be viewed as logics, and as meta languages for expressing logics, and LEGO is intended to be used for interactively constructing proofs in mathematical theories presented in these logics. I have developed LEGO over six years, starting from an implementation of the Calculus of Constructions by Gérard Huet. LEGO has been used for problems at the limits of our abilities to do formal mathematics. In this thesis I explain some aspects of the meta-theory of LEGO’s type systems leading to a machine-checked proof that typechecking is decidable for all three type theories supported by LEGO, and to a verified algorithm for deciding their typing judgements, assuming only that they are normalizing. In order to do this, the theory of Pure Type Systems (PTS) is extended and formalized in LEGO. This extended example of a formally developed body of mathematics is described, both for its main theorems, and as a case study in formal mathematics. In many examples, I compare formal definitions and theorems with their informal counterparts, and with various alternative approaches, to study the meaning and use of mathematical language, and suggest clarifications in the informal usage. Having outlined a formal development far too large to be surveyed in detail by a human reader, I close with some thoughts on how the human mathematician’s state of understanding and belief might be affected by posessing such a thing.

[1]  P. Martin-Löf Hauptsatz for the Intuitionistic Theory of Iterated Inductive Definitions , 1971 .

[2]  Dag Prawitz,et al.  Towards A Foundation of A General Proof Theory , 1973 .

[3]  Dag Prawitz,et al.  On the idea of a general proof theory , 1974, Synthese.

[4]  F. Dick A survey of the project Automath , 1980 .

[5]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[6]  Thierry Coquand,et al.  Constructions: A Higher Order Proof System for Mechanizing Mathematics , 1985, European Conference on Computer Algebra.

[7]  Rance Cleaveland,et al.  Implementing mathematics with the Nuprl proof development system , 1986 .

[8]  Christine Mohring,et al.  Algorithm Development in the Calculus of Constructions , 1986, Logic in Computer Science.

[9]  M. Gordon HOL: A Proof Generating System for Higher-Order Logic , 1988 .

[10]  Thierry Coquand,et al.  The Calculus of Constructions , 1988, Inf. Comput..

[11]  Jan M. Smith The Independence of Peano's Fourth Axiom from Martin-Lof's Type Theory Without Universes , 1988, J. Symb. Log..

[12]  Thierry Coquand,et al.  Inductively defined types , 1988, Conference on Computer Logic.

[13]  Gift Siromoney,et al.  A Perspective in Theoretical Computer Science - Commemorative Volume for Gift Siromoney , 1989, A Perspective in Theoretical Computer Science.

[14]  Frank Pfenning,et al.  Elf: a language for logic definition and verified metaprogramming , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[15]  Gérard P. Huet,et al.  The Constructive Engine , 1989, A Perspective in Theoretical Computer Science.

[16]  Robin Milner,et al.  Definition of standard ML , 1990 .

[17]  Bengt Nordström,et al.  Programming in Martin-Lo¨f's type theory: an introduction , 1990 .

[18]  Amy P. Felty,et al.  The Coq proof assistant user's guide : version 5.6 , 1990 .

[19]  David J. Pym,et al.  Proofs, search and computation in general logic , 1990 .

[20]  Zhaohui Luo An extended calculus of constructions , 1990 .

[21]  P. Dybjer Inductive sets and families in Martin-Lo¨f's type theory and their set-theoretic semantics , 1991 .

[22]  N. G. de Bruijn,et al.  A plea for weaker frameworks , 1991 .

[23]  Robert Harper,et al.  Type Checking with Universes , 1991, Theor. Comput. Sci..

[24]  Mark-Jan Nederhof,et al.  Modular proof of strong normalization for the calculus of constructions , 1991, Journal of Functional Programming.

[25]  T. Coquand An algorithm for testing conversion in type theory , 1991 .

[26]  Masako Takahashi,et al.  Parallel reductions in λ-calculus (revised version) , 1992 .

[27]  Philippa Gardner,et al.  Representing logics in type theory , 1992 .

[28]  Alexander Simpson Workshop on Types for Proofs and Programs , 1993 .

[29]  Furio Honsell,et al.  A framework for defining logics , 1993, JACM.

[30]  Thorsten Altenkirch,et al.  Constructions, inductive types and strong normalization , 1993, CST.

[31]  Rod M. Burstall,et al.  Deliverables: A Categorial Approach to Program Development in Type Theory , 1993, MFCS.

[32]  Randy Pollack,et al.  Closure Under Alpha-Conversion , 1994, TYPES.

[33]  J. Horgan THE DEATH OF PROOF , 1993 .

[34]  L. S. van Benthem Jutting Typing in Pure Type Systems , 1993, Inf. Comput..

[35]  James McKinna,et al.  Checking Algorithms for Pure Type Systems , 1994, TYPES.

[36]  Thorsten Altenkirch A Formalization of the Strong Normalization Proof for System F in LEGO , 1993, TLCA.

[37]  J. H. Geuvers Logics and type systems , 1993 .

[38]  Christine Paulin-Mohring,et al.  Inductive Definitions in the system Coq - Rules and Properties , 1993, TLCA.

[39]  Claire Jones Completing the rationals and metric spaces in LEGO , 1993 .

[40]  Zhaohui Luo,et al.  Computation and reasoning - a type theory for computer science , 1994, International series of monographs on computer science.

[41]  S. Feferman Finitary inductively presented logics , 1994 .

[42]  Erik Poll,et al.  Pure Type Systems with Definitions , 1994, LFCS.

[43]  Randy B. Pollack,et al.  Incremental Changes in LEGO , 1994 .

[44]  Robert Pollack The theory of LEGO , 1995 .