An extended calculus of constructions

This thesis presents and studies a unifying theory of dependent types ECC | Extended Calculus of Constructions. ECC integrates Coquand-Huet's (impredicative) calculus of constructions and Martin-L of's (predicative) type theory with universes, and turns out to be a strong and expressive calculus for formalization of mathematics, structured proof development and program speci cation. The meta-theory of ECC is studied and we show that the calculus has good meta-theoretic properties. The main proof-theoretic result is the strong normalization theorem, proved by using Girard-Tait's reducibility method based on a quasi normalization theorem which makes explicit the predicativity of the predicative universes. The strong normalization result shows the proof-theoretic consistency of the calculus; in particular, it implies the consistency of the embedded intuitionistic higher-order logic and the decidability of the theory. The meta-theoretic results establish the theoretical foundations both for pragmatic applications in theorem-proving and program speci cation and for computer implementations of the theory. ECC has been implemented in the proof development system LEGO developed by Pollack. In ECC, dependent -types are non-propositional types residing in the predicative universes and propositions are lifted as higher-level types as well. This solves the known di culty that adding strong -types to an impredicative system results in logical paradox and enables -types to be used to express the intuitionistic notion of subsets. -types together with type universes hence provide useful abstraction and module mechanisms for abstract description of mathematical theories and basic mechanisms for program speci cation and adequate formalization of abstract mathematics (e.g., abstract algebras and notions in category theory). A notion of (abstract) mathematical theory can be described and leads to a promising approach to abstract reasoning and structured reasoning. Program speci cations can be expressed by -types, using propositions in the embedded logic to describe program properties (for example, by an equality re ection result, computational equality can be modeled by the propositional Leibniz's equality de nable in the theory). These developments allow comprehensive structuring of formal or rigorous development of proofs and programs. Also discussed is how the calculus can be understood set-theoretically. We explain an ! Set (realizability) model of the theory. In particular, propositions can be interpreted as partial equivalence relations and the predicative type universes as corresponding to large set universes.ii Acknowledgements I would like most of all to express my gratitude to my supervisor Rod Burstall who not only brought me into the research area and provided many interesting ideas, able guidance and helpful advice, but also gave me a lot of help and encouragement in many aspects. From him, I have learned a lot about research methodology as well as scienti c knowledge. I would also thank Susumu Hayashi, Eugenio Moggi and Thierry Coquand for their insights and many helpful discussions, from which I have learned a lot about logics, type theories, categorical models etc. Particularly, I am in debt to Hayashi for the wide-ranging discussions we had in Edinburgh from which I bene ted very much, for his patience in listening to my detailed explanation of the proof of strong normalization, and for his many good suggestions; to Moggi for introducing me to the work on ! -sets and modest sets, reading a draft of this thesis and giving many suggestions; and to Coquand for the deep in uence of his work and his remarks on and suggestions to my work. Many discussions with Paul Taylor and Randy Pollack, in particular those about theory mechanisms, have proved very helpful; from them, I have learned much about proof development systems. Thanks also go to Henk Barendregt, Stefano Berardi, Yves Lafont, PierreLouis Curien, Herman Geuvers, Furio Honsell, Gerard Huet, Martin Hyland, Jos e Messeguer, Christian-Emil Ore, Andy Pitts, Gordon Plotkin, John Power, Anne Salvesen and Don Sannella for the helpful discussions we had. I also thank the sta , students and my friends in Edinburgh who enabled me to study and work in so good an environment. I was nancially supported by the Studentship of the Edinburgh University and the Overseas Research Students Award. My thanks to my wife Dejuan can not be expressed enough in any way. iii Declaration I hereby declare that this thesis has been composed by myself, that the work is my own, and the ideas and results that I do not attribute to others are due to myself. iv