Introduction to Constructive Type Theory

Total Page:16

File Type:pdf, Size:1020Kb

Introduction to Constructive Type Theory CS6180: Introduction to Constructive Type Theory Robert Constable August 29, 2017 1 Course Summary and List of Topics These notes briefly summarize the content and course mechanics for fall 2017 CS6180. Constructive type theory is currently \hot," so this brief introduction highlights only a few reasons why type the- ory is important in contemporary computer science. In the course we explore several other reasons, and we will speculate on the future of the subject and its ties to related topics in programming languages, AI, theory, systems, and information science. 1.1 course requirements There will be lecture notes and readings covering nearly all of the material. Students can participate at various levels. Those who simply want to know type theory at a high level and hear about its potential and most interesting results can meet the requirements by writing a paper on the subject and submitting three of the suggested exercises. In addition all students can help by proof reading and making small extensions for one or two of the lecture notes among the 20 to 25 that will be posted. Participation at that level will see grades in the A to A- range. Students who are more interested can help in the exposition by writing tutorial notes on some of the conceptually most difficult material such as Brouwer's Bar Induction principle or his Fan Theorem or about the need for free choice sequences and their value in computer science. Students willing invest more and aspiring to an A+ grade and possibly a publishable article can explore one of the several research questions that will come up regularly. For example, type theory is not well developed for proving computational complexity results. On the other hand there have been suggestions for how to formalize complexity arguments which would make a good start and be the basis for a possibly publishable result (ppr). A fresh look at the issues would definitely merit a project paper. There are some new issues arising from the fact that the type theory we will study implements Brouwer's notion of free choice sequences. There should be opportunities for new results about these interesting constructive objects. Some questions along these lines will be proposed. 1 Other suggestions are mentioned later in these introductory notes. 1.2 proof assistants Constructive type theory is \implemented" in proof assistants. The course will briefly discuss and compare proof assistants. These implementations \bring type theories to life" and enable users to apply them to designing and coding algorithms and software systems and proving that they have certain properties. Knowing properties of algorithms and systems helps us understand their capabilities and limitations. We can compare those system properties to what we intend to do. As a very simple example, if we write an algorithm to recognize whether a given natural number is prime or composite, we expect to be able to prove based on the code that when the program is given a natural number, it will halt with a Boolean value telling us whether the input is prime or not. The code might produce factors if the number is not prime, depending on how we specify the task. Given that we have a very precise mathematical account of this task, we expect to be able to prove that the code does the right thing even if the argument is mathematically complex. 1.3 research questions One of the research themes we will investigate is how to use synthetic geometry, as in Euclid, to develop algorithms in computational geometry that are provably correct and efficient. A major effort worthy of summer support is to create a \compiler" from synthetic algorithms to analytical algorithms (using the constructive real numbers). Dr. Bickford has a working example of this approach that he will lecture about. A related topic would be to apply a result from homotopy theory to a practical geometric algorithm. The PRL group researcher Ariel Kellison is working on developing Nuprl material on Euclidean geometry to establish outreach to Ithaca High School. Many interesting research questions have come up in this project, and she and I could supervise a project in this area. In some cases we expect to know the cost of executing the algorithm. We will see why it is challenging to prove computational complexity bounds on algorithms in type theory. There have been PhD theses using Nuprl on this topic [20, 21, 13]. Since that work, we have considered other approaches worth exploring. They will come up during the course. The more complex an algorithm, the more we require ways to guarantee that it does the right thing. The importance of correctness is sometimes made by reporting on the consequences of trusting faulty algorithms, e.g. the Intel bug in a chip for arithmetic. There are books built around such stories [79, 90]. Type checking algorithms for programming languages with rich type systems help us understand programs. Model checking techniques systematically search for errors using a model of the task. Proof assistants work by helping designers create a formal proof that code has certain properties that can be precisely expressed in the prover's specification language. Typically these proofs provide much stronger guarantees than the type checkers do. We will also very briefly discuss previous strong (misguided) criticism of proof assistants, as in the 1979 article by De Millo, Lipton, and Perlis [42].1 1This article is reminiscent of the attacks on AI by the Dreyfus brothers which now seem so woefully misguided 2 Proof assistants provide considerable help with getting the many details of a formal proof correct. A good proof assistant can even extract algorithms that express the computational content of a proof. In that case, we end up with two results for the price of one. First, we find an algorithm that solves a problem. Second, we create a detailed formally checked explanation of why the algorithm is correct. One reason to implement a very expressive type theory is to provide the capability to precisely define a large variety of computing tasks. It is impossible that we will ever capture fully and completely the capabilities of a complex software system. There are limits that we know from G¨odel'sfamous incompleteness theorem [53]. On the other hand, rich expressiveness is a very worthy goal, and it motivates providing a formal system that can express as much computer science as possible. That is one sense in which constructive type theory is appropriate. It is the richest relevant formal theory we know. This lends credibility to the idea that constructive type theory could be an appropriate foundation for computer science; we'll see that it touches essentially all of the subjects in modern computer science. We will examine this theme throughout the course, starting now at the very beginning. Different versions of type theory are implemented in various proof assistants. We will mention three of them from time to time: Agda [25] from Sweden, Coq [22] from France, and Nuprl [37] from the US. Moreover, at least three new proof assistants are being built to implement variants of constructive type theory { JonPRL and RedPRL at CMU and Lean at Microsoft Research.2 There are also proof assistants for higher order logic (HOL). One of them is called HOL [55, 60, 70, 69, 50, 32]. Although this is not a course on proof assistants, we will illustrate their role with Nuprl examples from time to time. We already know that constructive type theory, like all sufficiently rich formal mathematical theories, cannot be complete in the sense that it is unable to prove all of its true statements. This is the consequence of G¨odel'sfamous incompleteness theorem [53]. For type theory, we need to be clear about what \intuitively true" means. We will consider this question during the course. 1.4 constructive type theories Why is type theory used in proof assistants? Could we use set theory instead, the foundational language of mathematics? The simplest and most naive answer is that we build software systems with programming languages, and they use types to specify tasks, not sets. Indeed, our work on type theory arose naturally from our efforts to design and implement a programming logic for the Cornell programming language PLC. Types were a key feature of this language, so we had to learn to formalize them. If our primary concern is the specification and correctness of algorithms and systems, type theory is the most appropriate choice. Some researchers see this as a mistake in that it complicates connections to a vast body of mathematics. Researchers with this concern in mind have shown how to express set theory in type theory. Peter Aczel has done very interesting work along these lines [4]. Furthermore, the practical value of expressing computational mathematics in [45]. The views of George B. Dyson [47] are much more prescient. One thing he wrote in his book Darwin among the Machines is this famous line: \In the game of life and evolution, there are three players at the table: human beings, nature, and machines. I am firmly on the side of nature. But nature, I suspect, is on the side of machines". 2Lean seems to have another name as well, but not with \PRL" in it! 3 programming languages has led to incorporating most mathematical concepts within type theory. We will see many examples of this during the course. For areas of mathematics that are concerned with constructions and algorithms, set theory was never \just right". Some constructive mathematicians started using notions such as \species" and others used the term \type" still others used \constructive sets" and so forth.
Recommended publications
  • Linear Type Theory for Asynchronous Session Types
    JFP 20 (1): 19–50, 2010. c Cambridge University Press 2009 19 ! doi:10.1017/S0956796809990268 First published online 8 December 2009 Linear type theory for asynchronous session types SIMON J. GAY Department of Computing Science, University of Glasgow, Glasgow G12 8QQ, UK (e-mail: [email protected]) VASCO T. VASCONCELOS Departamento de Informatica,´ Faculdade de Ciencias,ˆ Universidade de Lisboa, 1749-016 Lisboa, Portugal (e-mail: [email protected]) Abstract Session types support a type-theoretic formulation of structured patterns of communication, so that the communication behaviour of agents in a distributed system can be verified by static typechecking. Applications include network protocols, business processes and operating system services. In this paper we define a multithreaded functional language with session types, which unifies, simplifies and extends previous work. There are four main contributions. First is an operational semantics with buffered channels, instead of the synchronous communication of previous work. Second, we prove that the session type of a channel gives an upper bound on the necessary size of the buffer. Third, session types are manipulated by means of the standard structures of a linear type theory, rather than by means of new forms of typing judgement. Fourth, a notion of subtyping, including the standard subtyping relation for session types (imported into the functional setting), and a novel form of subtyping between standard and linear function types, which allows the typechecker to handle linear types conveniently. Our new approach significantly simplifies session types in the functional setting, clarifies their essential features and provides a secure foundation for language developments such as polymorphism and object-orientation.
    [Show full text]
  • A General Framework for the Semantics of Type Theory
    A General Framework for the Semantics of Type Theory Taichi Uemura November 14, 2019 Abstract We propose an abstract notion of a type theory to unify the semantics of various type theories including Martin-L¨oftype theory, two-level type theory and cubical type theory. We establish basic results in the semantics of type theory: every type theory has a bi-initial model; every model of a type theory has its internal language; the category of theories over a type theory is bi-equivalent to a full sub-2-category of the 2-category of models of the type theory. 1 Introduction One of the key steps in the semantics of type theory and logic is to estab- lish a correspondence between theories and models. Every theory generates a model called its syntactic model, and every model has a theory called its internal language. Classical examples are: simply typed λ-calculi and cartesian closed categories (Lambek and Scott 1986); extensional Martin-L¨oftheories and locally cartesian closed categories (Seely 1984); first-order theories and hyperdoctrines (Seely 1983); higher-order theories and elementary toposes (Lambek and Scott 1986). Recently, homotopy type theory (The Univalent Foundations Program 2013) is expected to provide an internal language for what should be called \el- ementary (1; 1)-toposes". As a first step, Kapulkin and Szumio (2019) showed that there is an equivalence between dependent type theories with intensional identity types and finitely complete (1; 1)-categories. As there exist correspondences between theories and models for almost all arXiv:1904.04097v2 [math.CT] 13 Nov 2019 type theories and logics, it is natural to ask if one can define a general notion of a type theory or logic and establish correspondences between theories and models uniformly.
    [Show full text]
  • The Unintended Interpretations of Intuitionistic Logic
    THE UNINTENDED INTERPRETATIONS OF INTUITIONISTIC LOGIC Wim Ruitenburg Department of Mathematics, Statistics and Computer Science Marquette University Milwaukee, WI 53233 Abstract. We present an overview of the unintended interpretations of intuitionis- tic logic that arose after Heyting formalized the “observed regularities” in the use of formal parts of language, in particular, first-order logic and Heyting Arithmetic. We include unintended interpretations of some mild variations on “official” intuitionism, such as intuitionistic type theories with full comprehension and higher order logic without choice principles or not satisfying the right choice sequence properties. We conclude with remarks on the quest for a correct interpretation of intuitionistic logic. §1. The Origins of Intuitionistic Logic Intuitionism was more than twenty years old before A. Heyting produced the first complete axiomatizations for intuitionistic propositional and predicate logic: according to L. E. J. Brouwer, the founder of intuitionism, logic is secondary to mathematics. Some of Brouwer’s papers even suggest that formalization cannot be useful to intuitionism. One may wonder, then, whether intuitionistic logic should itself be regarded as an unintended interpretation of intuitionistic mathematics. I will not discuss Brouwer’s ideas in detail (on this, see [Brouwer 1975], [Hey- ting 1934, 1956]), but some aspects of his philosophy need to be highlighted here. According to Brouwer mathematics is an activity of the human mind, a product of languageless thought. One cannot be certain that language is a perfect reflection of this mental activity. This makes language an uncertain medium (see [van Stigt 1982] for more details on Brouwer’s ideas about language). In “De onbetrouwbaarheid der logische principes” ([Brouwer 1981], pp.
    [Show full text]
  • Intuitionistic Three-Valued Logic and Logic Programming Informatique Théorique Et Applications, Tome 25, No 6 (1991), P
    INFORMATIQUE THÉORIQUE ET APPLICATIONS J. VAUZEILLES A. STRAUSS Intuitionistic three-valued logic and logic programming Informatique théorique et applications, tome 25, no 6 (1991), p. 557-587 <http://www.numdam.org/item?id=ITA_1991__25_6_557_0> © AFCET, 1991, tous droits réservés. L’accès aux archives de la revue « Informatique théorique et applications » im- plique l’accord avec les conditions générales d’utilisation (http://www.numdam. org/conditions). Toute utilisation commerciale ou impression systématique est constitutive d’une infraction pénale. Toute copie ou impression de ce fichier doit contenir la présente mention de copyright. Article numérisé dans le cadre du programme Numérisation de documents anciens mathématiques http://www.numdam.org/ Informatique théorique et Applications/Theoretical Informaties and Applications (vol. 25, n° 6, 1991, p. 557 à 587) INTUITIONISTIC THREE-VALUED LOGIC AMD LOGIC PROGRAMM1NG (*) by J. VAUZEILLES (*) and A. STRAUSS (2) Communicated by J. E. PIN Abstract. - In this paper, we study the semantics of logic programs with the help of trivalued hgic, introduced by Girard in 1973. Trivalued sequent calculus enables to extend easily the results of classical SLD-resolution to trivalued logic. Moreover, if one allows négation in the head and in the body of Hom clauses, one obtains a natural semantics for such programs regarding these clauses as axioms of a theory written in the intuitionistic fragment of that logic. Finally^ we define in the same calculus an intuitionistic trivalued version of Clark's completion, which gives us a déclarative semantics for programs with négation in the body of the clauses, the évaluation method being SLDNF-resolution. Resumé. — Dans cet article, nous étudions la sémantique des programmes logiques à l'aide de la logique trivaluée^ introduite par Girard en 1973.
    [Show full text]
  • Constructivity in Homotopy Type Theory
    Ludwig Maximilian University of Munich Munich Center for Mathematical Philosophy Constructivity in Homotopy Type Theory Author: Supervisors: Maximilian Doré Prof. Dr. Dr. Hannes Leitgeb Prof. Steve Awodey, PhD Munich, August 2019 Thesis submitted in partial fulfillment of the requirements for the degree of Master of Arts in Logic and Philosophy of Science contents Contents 1 Introduction1 1.1 Outline................................ 3 1.2 Open Problems ........................... 4 2 Judgements and Propositions6 2.1 Judgements ............................. 7 2.2 Propositions............................. 9 2.2.1 Dependent types...................... 10 2.2.2 The logical constants in HoTT .............. 11 2.3 Natural Numbers.......................... 13 2.4 Propositional Equality....................... 14 2.5 Equality, Revisited ......................... 17 2.6 Mere Propositions and Propositional Truncation . 18 2.7 Universes and Univalence..................... 19 3 Constructive Logic 22 3.1 Brouwer and the Advent of Intuitionism ............ 22 3.2 Heyting and Kolmogorov, and the Formalization of Intuitionism 23 3.3 The Lambda Calculus and Propositions-as-types . 26 3.4 Bishop’s Constructive Mathematics................ 27 4 Computational Content 29 4.1 BHK in Homotopy Type Theory ................. 30 4.2 Martin-Löf’s Meaning Explanations ............... 31 4.2.1 The meaning of the judgments.............. 32 4.2.2 The theory of expressions................. 34 4.2.3 Canonical forms ...................... 35 4.2.4 The validity of the types.................. 37 4.3 Breaking Canonicity and Propositional Canonicity . 38 4.3.1 Breaking canonicity .................... 39 4.3.2 Propositional canonicity.................. 40 4.4 Proof-theoretic Semantics and the Meaning Explanations . 40 5 Constructive Identity 44 5.1 Identity in Martin-Löf’s Meaning Explanations......... 45 ii contents 5.1.1 Intensional type theory and the meaning explanations 46 5.1.2 Extensional type theory and the meaning explanations 47 5.2 Homotopical Interpretation of Identity ............
    [Show full text]
  • Local Constructive Set Theory and Inductive Definitions
    Local Constructive Set Theory and Inductive Definitions Peter Aczel 1 Introduction Local Constructive Set Theory (LCST) is intended to be a local version of con- structive set theory (CST). Constructive Set Theory is an open-ended set theoretical setting for constructive mathematics that is not committed to any particular brand of constructive mathematics and, by avoiding any built-in choice principles, is also acceptable in topos mathematics, the mathematics that can be carried out in an arbi- trary topos with a natural numbers object. We refer the reader to [2] for any details, not explained in this paper, concerning CST and the specific CST axiom systems CZF and CZF+ ≡ CZF + REA. CST provides a global set theoretical setting in the sense that there is a single universe of all the mathematical objects that are in the range of the variables. By contrast a local set theory avoids the use of any global universe but instead is formu- lated in a many-sorted language that has various forms of sort including, for each sort α a power-sort Pα, the sort of all sets of elements of sort α. For each sort α there is a binary infix relation ∈α that takes two arguments, the first of sort α and the second of sort Pα. For each formula φ and each variable x of sort α, there is a comprehension term {x : α | φ} of sort Pα for which the following scheme holds. Comprehension: (∀y : α)[ y ∈α {x : α | φ} ↔ φ[y/x] ]. Here we use the notation φ[a/x] for the result of substituting a term a for free oc- curences of the variable x in the formula φ, relabelling bound variables in the stan- dard way to avoid variable clashes.
    [Show full text]
  • Intuitionistic Logic
    Intuitionistic Logic Nick Bezhanishvili and Dick de Jongh Institute for Logic, Language and Computation Universiteit van Amsterdam Contents 1 Introduction 2 2 Intuitionism 3 3 Kripke models, Proof systems and Metatheorems 8 3.1 Other proof systems . 8 3.2 Arithmetic and analysis . 10 3.3 Kripke models . 15 3.4 The Disjunction Property, Admissible Rules . 20 3.5 Translations . 22 3.6 The Rieger-Nishimura Lattice and Ladder . 24 3.7 Complexity of IPC . 25 3.8 Mezhirov's game for IPC . 28 4 Heyting algebras 30 4.1 Lattices, distributive lattices and Heyting algebras . 30 4.2 The connection of Heyting algebras with Kripke frames and topologies . 33 4.3 Algebraic completeness of IPC and its extensions . 38 4.4 The connection of Heyting and closure algebras . 40 5 Jankov formulas and intermediate logics 42 5.1 n-universal models . 42 5.2 Formulas characterizing point generated subsets . 44 5.3 The Jankov formulas . 46 5.4 Applications of Jankov formulas . 47 5.5 The logic of the Rieger-Nishimura ladder . 52 1 1 Introduction In this course we give an introduction to intuitionistic logic. We concentrate on the propositional calculus mostly, make some minor excursions to the predicate calculus and to the use of intuitionistic logic in intuitionistic formal systems, in particular Heyting Arithmetic. We have chosen a selection of topics that show various sides of intuitionistic logic. In no way we strive for a complete overview in this short course. Even though we approach the subject for the most part only formally, it is good to have a general introduction to intuitionism.
    [Show full text]
  • The Proper Explanation of Intuitionistic Logic: on Brouwer's Demonstration
    The proper explanation of intuitionistic logic: on Brouwer’s demonstration of the Bar Theorem Göran Sundholm, Mark van Atten To cite this version: Göran Sundholm, Mark van Atten. The proper explanation of intuitionistic logic: on Brouwer’s demonstration of the Bar Theorem. van Atten, Mark Heinzmann, Gerhard Boldini, Pascal Bourdeau, Michel. One Hundred Years of Intuitionism (1907-2007). The Cerisy Conference, Birkhäuser, pp.60- 77, 2008, 978-3-7643-8652-8. halshs-00791550 HAL Id: halshs-00791550 https://halshs.archives-ouvertes.fr/halshs-00791550 Submitted on 24 Jan 2017 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Distributed under a Creative Commons Attribution - NonCommercial| 4.0 International License The proper explanation of intuitionistic logic: on Brouwer’s demonstration of the Bar Theorem Göran Sundholm Philosophical Institute, Leiden University, P.O. Box 2315, 2300 RA Leiden, The Netherlands. [email protected] Mark van Atten SND (CNRS / Paris IV), 1 rue Victor Cousin, 75005 Paris, France. [email protected] Der … geführte Beweis scheint mir aber trotzdem . Basel: Birkhäuser, 2008, 60–77. wegen der in seinem Gedankengange enthaltenen Aussagen Interesse zu besitzen. (Brouwer 1927B, n. 7)1 Brouwer’s demonstration of his Bar Theorem gives rise to provocative ques- tions regarding the proper explanation of the logical connectives within intu- itionistic and constructivist frameworks, respectively, and, more generally, re- garding the role of logic within intuitionism.
    [Show full text]
  • Proof Theory of Constructive Systems: Inductive Types and Univalence
    Proof Theory of Constructive Systems: Inductive Types and Univalence Michael Rathjen Department of Pure Mathematics University of Leeds Leeds LS2 9JT, England [email protected] Abstract In Feferman’s work, explicit mathematics and theories of generalized inductive definitions play a cen- tral role. One objective of this article is to describe the connections with Martin-L¨of type theory and constructive Zermelo-Fraenkel set theory. Proof theory has contributed to a deeper grasp of the rela- tionship between different frameworks for constructive mathematics. Some of the reductions are known only through ordinal-theoretic characterizations. The paper also addresses the strength of Voevodsky’s univalence axiom. A further goal is to investigate the strength of intuitionistic theories of generalized inductive definitions in the framework of intuitionistic explicit mathematics that lie beyond the reach of Martin-L¨of type theory. Key words: Explicit mathematics, constructive Zermelo-Fraenkel set theory, Martin-L¨of type theory, univalence axiom, proof-theoretic strength MSC 03F30 03F50 03C62 1 Introduction Intuitionistic systems of inductive definitions have figured prominently in Solomon Feferman’s program of reducing classical subsystems of analysis and theories of iterated inductive definitions to constructive theories of various kinds. In the special case of classical theories of finitely as well as transfinitely iterated inductive definitions, where the iteration occurs along a computable well-ordering, the program was mainly completed by Buchholz, Pohlers, and Sieg more than 30 years ago (see [13, 19]). For stronger theories of inductive 1 i definitions such as those based on Feferman’s intutitionic Explicit Mathematics (T0) some answers have been provided in the last 10 years while some questions are still open.
    [Show full text]
  • Dependable Atomicity in Type Theory
    Dependable Atomicity in Type Theory Andreas Nuyts1 and Dominique Devriese2 1 imec-DistriNet, KU Leuven, Belgium 2 Vrije Universiteit Brussel, Belgium Presheaf semantics [Hof97, HS97] are an excellent tool for modelling relational preservation prop- erties of (dependent) type theory. They have been applied to parametricity (which is about preservation of relations) [AGJ14], univalent type theory (which is about preservation of equiv- alences) [BCH14, Hub15], directed type theory (which is about preservation of morphisms) and even combinations thereof [RS17, CH19]. Of course, after going through the endeavour of con- structing a presheaf model of type theory, we want type-theoretic profit, i.e. we want internal operations that allow us to write cheap proofs of the `free' theorems [Wad89] that follow from the preservation property concerned. While the models for univalence, parametricity and directed type theory are all just cases of presheaf categories, approaches to internalize their results do not have an obvious common ances- tor (neither historically nor mathematically). Cohen et al. [CCHM16] have used the final type extension operator Glue to prove univalence. In previous work with Vezzosi [NVD17], we used Glue and its dual, the initial type extension operator Weld, to internalize parametricity to some extent. Before, Bernardy, Coquand and Moulin [BCM15, Mou16] have internalized parametricity using completely different `boundary filling’ operators Ψ (for extending types) and Φ (for extending func- tions). Unfortunately, Ψ and Φ have so far only been proven sound with respect to substructural (affine-like) variables of representable types (such as the relational or homotopy interval I). More 1 recently, Licata et al. [LOPS18] have exploited the fact that the homotopyp interval I is atomic | meaning that the exponential functor (I ! xy) has a right adjoint | in order to construct a universe of Kan-fibrant types from a vanilla Hofmann-Streicher universe [HS97] internally.
    [Show full text]
  • Martin-Löf's Type Theory
    Martin-L¨of’s Type Theory B. Nordstr¨om, K. Petersson and J. M. Smith 1 Contents 1 Introduction . 1 1.1 Different formulations of type theory . 3 1.2 Implementations . 4 2 Propositions as sets . 4 3 Semantics and formal rules . 7 3.1 Types . 7 3.2 Hypothetical judgements . 9 3.3 Function types . 12 3.4 The type Set .......................... 14 3.5 Definitions . 15 4 Propositional logic . 16 5 Set theory . 20 5.1 The set of Boolean values . 21 5.2 The empty set . 21 5.3 The set of natural numbers . 22 5.4 The set of functions (Cartesian product of a family of sets) 24 5.5 Propositional equality . 27 5.6 The set of lists . 29 5.7 Disjoint union of two sets . 29 5.8 Disjoint union of a family of sets . 30 5.9 The set of small sets . 31 6 ALF, an interactive editor for type theory . 33 1 Introduction The type theory described in this chapter has been developed by Martin-L¨of with the original aim of being a clarification of constructive mathematics. Unlike most other formalizations of mathematics, type theory is not based on predicate logic. Instead, the logical constants are interpreted within type 1This is a chapter from Handbook of Logic in Computer Science, Vol 5, Oxford University Press, October 2000 1 2 B. Nordstr¨om,K. Petersson and J. M. Smith theory through the Curry-Howard correspondence between propositions and sets [10, 22]: a proposition is interpreted as a set whose elements represent the proofs of the proposition.
    [Show full text]
  • CONSTRUCTIVE ANALYSIS with WITNESSES Contents 1. Real Numbers 4 1.1. Approximation of the Square Root of 2 5 1.2. Reals, Equalit
    CONSTRUCTIVE ANALYSIS WITH WITNESSES HELMUT SCHWICHTENBERG Contents 1. Real numbers 4 1.1. Approximation of the square root of 2 5 1.2. Reals, equality of reals 6 1.3. The Archimedian axiom 7 1.4. Nonnegative and positive reals 8 1.5. Arithmetical functions 9 1.6. Comparison of reals 11 1.7. Non-countability 13 1.8. Cleaning of reals 14 2. Sequences and series of real numbers 14 2.1. Completeness 14 2.2. Limits and inequalities 16 2.3. Series 17 2.4. Signed digit representation of reals 18 2.5. Convergence tests 19 2.6. Reordering 22 2.7. The exponential series 22 3. The exponential function for complex numbers 26 4. Continuous functions 29 4.1. Suprema and infima 29 4.2. Continuous functions 31 4.3. Application of a continuous function to a real 33 4.4. Continuous functions and limits 35 4.5. Composition of continuous functions 35 4.6. Properties of continuous functions 36 4.7. Intermediate value theorem 37 4.8. Continuity for functions of more than one variable 42 5. Differentiation 42 Date: July 27, 2015. 1 2 HELMUT SCHWICHTENBERG 5.1. Derivatives 42 5.2. Bounds on the slope 43 5.3. Properties of derivatives 43 5.4. Rolle's Lemma, mean value theorem 45 6. Integration 46 6.1. Riemannian sums 46 6.2. Integration and differentiation 49 6.3. Substitution rule, partial integration 51 6.4. Intermediate value theorem of integral calculus 52 6.5. Inverse of the exponential function 53 7. Taylor series 54 8.
    [Show full text]