An Algebraic View of Structural Induction
Total Page:16
File Type:pdf, Size:1020Kb
Load more
Recommended publications
-
A Survey of Engineering of Formally Verified Software
The version of record is available at: http://dx.doi.org/10.1561/2500000045 QED at Large: A Survey of Engineering of Formally Verified Software Talia Ringer Karl Palmskog University of Washington University of Texas at Austin [email protected] [email protected] Ilya Sergey Milos Gligoric Yale-NUS College University of Texas at Austin and [email protected] National University of Singapore [email protected] Zachary Tatlock University of Washington [email protected] arXiv:2003.06458v1 [cs.LO] 13 Mar 2020 Errata for the present version of this paper may be found online at https://proofengineering.org/qed_errata.html The version of record is available at: http://dx.doi.org/10.1561/2500000045 Contents 1 Introduction 103 1.1 Challenges at Scale . 104 1.2 Scope: Domain and Literature . 105 1.3 Overview . 106 1.4 Reading Guide . 106 2 Proof Engineering by Example 108 3 Why Proof Engineering Matters 111 3.1 Proof Engineering for Program Verification . 112 3.2 Proof Engineering for Other Domains . 117 3.3 Practical Impact . 124 4 Foundations and Trusted Bases 126 4.1 Proof Assistant Pre-History . 126 4.2 Proof Assistant Early History . 129 4.3 Proof Assistant Foundations . 130 4.4 Trusted Computing Bases of Proofs and Programs . 137 5 Between the Engineer and the Kernel: Languages and Automation 141 5.1 Styles of Automation . 142 5.2 Automation in Practice . 156 The version of record is available at: http://dx.doi.org/10.1561/2500000045 6 Proof Organization and Scalability 162 6.1 Property Specification and Encodings . -
Collection Principles in Dependent Type Theory
This is a repository copy of Collection Principles in Dependent Type Theory. White Rose Research Online URL for this paper: http://eprints.whiterose.ac.uk/113157/ Version: Accepted Version Proceedings Paper: Azcel, P and Gambino, N orcid.org/0000-0002-4257-3590 (2002) Collection Principles in Dependent Type Theory. In: Lecture Notes in Computer Science: TYPES 2000. International Workshop on Types for Proofs and Programs (TYPES) 2000, 08-12 Dec 2000, Durham, UK. Springer Verlag , pp. 1-23. ISBN 3-540-43287-6 © 2002, Springer-Verlag Berlin Heidelberg. This is an author produced version of a conference paper published in Lecture Notes in Computer Science: Types for Proofs and Programs. Uploaded in accordance with the publisher's self-archiving policy. Reuse Items deposited in White Rose Research Online are protected by copyright, with all rights reserved unless indicated otherwise. They may be downloaded and/or printed for private study, or other acts as permitted by national copyright laws. The publisher or other rights holders may allow further reproduction and re-use of the full text version. This is indicated by the licence information on the White Rose Research Online record for the item. Takedown If you consider content in White Rose Research Online to be in breach of UK law, please notify us by emailing [email protected] including the URL of the record and the reason for the withdrawal request. [email protected] https://eprints.whiterose.ac.uk/ Collection Principles in Dependent Type Theory⋆ Peter Aczel1 and Nicola Gambino2 1 Departments of Mathematics and Computer Science, University of Manchester, e-mail: [email protected] 2 Department of Computer Science, University of Manchester, e-mail: [email protected] Abstract. -
Arxiv:Cs/0610066V2 [Cs.LO] 16 Sep 2013 Eusv Entos Ye Lambda-Calculus
Inductive Data Type Systems Fr´ed´eric Blanqui, Jean-Pierre Jouannaud LRI, Bˆat. 490, Universit´eParis-Sud 91405 Orsay, FRANCE Tel: (33) 1.69.15.69.05 Fax: (33) 1.69.15.65.86 http://www.lri.fr/~blanqui/ Mitsuhiro Okada Department of Philosophy, Keio University, 108 Minatoku, Tokyo, JAPAN Abstract In a previous work (“Abstract Data Type Systems”, TCS 173(2), 1997), the last two authors presented a combined language made of a (strongly normalizing) algebraic rewrite system and a typed λ-calculus enriched by pattern-matching definitions following a certain format, called the “General Schema”, which gen- eralizes the usual recursor definitions for natural numbers and similar “basic inductive types”. This combined language was shown to be strongly normaliz- ing. The purpose of this paper is to reformulate and extend the General Schema in order to make it easily extensible, to capture a more general class of inductive types, called “strictly positive”, and to ease the strong normalization proof of the resulting system. This result provides a computation model for the combi- nation of an algebraic specification language based on abstract data types and of a strongly typed functional language with strictly positive inductive types. Keywords: Higher-order rewriting. Strong normalization. Inductive types. Recursive definitions. Typed lambda-calculus. arXiv:cs/0610066v2 [cs.LO] 16 Sep 2013 1. Introduction This work is one step in a long term program aiming at building formal spec- ification languages integrating computations and proofs within a single frame- work. We focus here on incorporating an expressive notion of equality within a typed λ-calculus. -
Martin Löf's Type Theory: Constructive Set Theory and Logical Framework
Martin Löf’s Type Theory: constructive set theory and logical framework Marco Gaboardi Dipartimento di Informatica - Università degli Studi di Torino – p. 1/54 Brief History (Impredicative) Type Theory. 1971 Per Martin-Löf, A theory of Types. (Predicative) Type Theory as Constructive Set Theory. 1979 Per Martin-Löf, Constructive Mathematics and Computer Programming . 1984 Per Martin-Löf, Intuitionistic Type Theory. (Predicative) Type Theory as Logical Framework 1985 Per Martin-Löf, Truth of a Proposition, Evidence of a Judgement, Validity of a Proof . 1990 Bengt Nordström, Kent Petersson and Jan M. Smith, Programming in Martin-Löf’s Type Theory: an introduction. – p. 2/54 Ideas The main idea behind Martin-Löf’s type theory is Curry-Howard Isomorphism: correspondence between propositions and sets (type theory as constructive set theory) correspondence between proofs and programs (type theory as programming language One of Martin-Löf’s original aims with type theory was that it could serve as a framework in which other theories could be interpreted, inheriting interesting properties: normalization, etc. Semantics in Martin-Löf’s type theory is not given “ a posteriori”, instead it is independent and come before as a justification of the formal system . The meaning of type theory is explained in terms of computations. – p. 3/54 Computations - Informally The meaning of type theory is explained in terms of computations. Hence computation is a primitive concept. We can regard computation as the process of evaluation of terms: ′ T ⇓ T It is important to distinguish beetween input data (elements) and output value ((lazy) canonical elements) canonical elements. Usually we have evaluation of terms T to values V : T ⇓ V Usually we consider computations of a term T as composition of evaluation on subterms: 1. -
Set Theory for Verification: II
Set Theory for Verication: II Induction and Recursion Lawrence C. Paulson Computer Laboratory, University of Cambridge April 1995 Minor revisions, September 2000 Abstract. A theory of recursive denitions has been mechanized in Isabelle’s Zermelo-Fraenkel (ZF) set theory. The objective is to support the formalization of particular recursive denitions for use in verication, semantics proofs and other computational reasoning. Inductively dened sets are expressed as least xedpoints, applying the Knaster-Tarski The- orem over a suitable set. Recursive functions are dened by well-founded recursion and its derivatives, such as transnite recursion. Recursive data structures are expressed by applying the Knaster-Tarski Theorem to a set, such as Vω, that is closed under Cartesian product and disjoint sum. Worked examples include the transitive closure of a relation, lists, variable-branching trees and mutually recursive trees and forests. The Schroder-Bernstein Theorem and the soundness of propositional logic are proved in Isabelle sessions. Key words: Isabelle, set theory, recursive denitions, the Schroder-Bernstein Theorem Contents 1 Introduction 1 1.1 Outline of the Paper 1 1.2 Preliminary Denitions 1 2 Least Fixedpoints 2 2.1 The Knaster-Tarski Theorem 2 2.2 The Bounding Set 3 2.3 A General Induction Rule 4 2.4 Monotonicity 5 2.5 Application: Transitive Closure of a Relation 6 2.6 Application: The Schroder-Bernstein Theorem 7 2.7 Proving the Schroder-Bernstein Theorem in Isabelle 8 3 Recursive Functions 13 3.1 Well-Founded Recursion 15 3.2 Ordinals -
Intuitionistic Type Theory
Intuitionistic Type Theory Peter Dybjer∗ Erik Palmgreny May 6, 2015 Abstract Intuitionistic Type Theory (also Constructive Type Theory or Martin-L¨ofType Theory) is a formal logical system and philosophical foundation for constructive mathematics (link). It is a full- scale system which aims to play a similar role for constructive mathematics as Zermelo-Fraenkel Set Theory (link) does for classical mathematics. It is based on the propositions-as-types principle and clarifies the Brouwer-Heyting-Kolmogorov interpretation of intuitionistic logic. It extends this interpretation to the more general setting of Intuitionistic Type Theory and thus provides a general conception not only of what a constructive proof is, but also of what a constructive mathematical object is. The main idea is that mathematical concepts such as elements, sets and functions are explained in terms of concepts from programming such as data structures, data types and programs. This article describes the formal system of Intuitionistic Type Theory and its semantic foundations. • 1. Overview • 2. Propositions as types { 2.1 Intuitionistic Type Theory - a new way of looking at logic? { 2.2 The Curry-Howard correspondence { 2.3 Sets of proof-objects { 2.4 Dependent types { 2.5 Propositions as types in Intuitionistic Type Theory • 3. Basic Intuitionistic Type Theory { 3.1 Judgments { 3.2 Judgment forms { 3.3 Inference rules { 3.4 Intuitionistic predicate logic { 3.5 Natural numbers { 3.6 The universe of small types { 3.7 Propositional identity { 3.8 The axiom of choice is a theorem ∗[email protected] [email protected] 1 • 4. Extensions { 4.1 The logical framework { 4.2 A general identity type former { 4.3 Well-founded trees { 4.4 Iterative sets and CZF { 4.5 Inductive definitions { 4.6 Inductive-recursive definitions • 5. -
Induction, Coinduction, and Fixed Points in Order Theory, Set Theory, Type Theory, First-Order Logic, and Category Theory
Induction, Coinduction, and Fixed Points in Order Theory, Set Theory, Type Theory, First-Order Logic, and Category Theory: A Concise Comparative Survey Moez A. AbdelGawad [email protected] Abstract In this survey article (which hitherto is an ongoing work-in-progress) we present the for- mulation of the induction and coinduction principles using the language and conventions of each of order theory, set theory, programming languages’ type theory, first-order logic, and category theory, for the purpose of examining some of the similarities and, more significantly, the dissimilarities between these various mathematical disciplines, and hence shed some light on the precise relation between these disciplines. Towards that end, in this article we discuss plenty of related concepts, such as fixed points, pre-fixed points, post-fixed points, inductive sets and types, coinductive sets and types, algebras and coalgebras. We conclude the survey by hinting at the possibility of a more abstract and unified treatment that uses concepts from category theory such as monads and comonads. 1 Introduction Fixed points and concepts related to them, such as induction and coinduction, have applications in numerous scientific fields. These mathematical concepts have applications also in social sciences, and even in common culture, usually under disguise.1 Fixed points, induction and coinduction have been formulated and studied in various subfields of mathematics, usually using different vocabulary in each field. Fields for studying these concepts, formally, include order theory, set theory, programming languages (PL) type theory2, first-order logic, and category theory. In this article—which started as a brief self-note (now summarized in §7)—we compare the various formulations of these concepts by presenting how these concepts, and many related ones— such as pre-fixed points, post-fixed points, inductive sets/types, coinductive sets/types, algebras, and arXiv:1812.10026v9 [cs.LO] 28 Feb 2019 coalgebras—are defined in each of these mathematical subfields. -
A Unified View of Induction Reasoning for First-Order Logic Sorin Stratulat
A Unified View of Induction Reasoning for First-Order Logic Sorin Stratulat To cite this version: Sorin Stratulat. A Unified View of Induction Reasoning for First-Order Logic. Turing-100, TheAlan Turing Centenary Conference, Jun 2012, Manchester, United Kingdom. hal-00763236 HAL Id: hal-00763236 https://hal.inria.fr/hal-00763236 Submitted on 10 Dec 2012 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. A Unified View of Induction Reasoning for First-Order Logic Sorin Stratulat LITA, Department of Computer Science Université de Lorraine Ile du Saulcy, Metz, 57000, FRANCE [email protected] Abstract Induction is a powerful proof technique adapted to reason on sets with an unbounded number of elements. In a first-order setting, two different methods are distinguished: the conventional induction, based on explicit induction schemas, and the implicit induction, based on reductive procedures. We propose a new cycle-based induction method that keeps their best features, i.e., performs local and non-reductive reasoning, and naturally fits for mutual and lazy induction. The heart of the method is a proof strategy that identifies in the proof script the subset of formulas contributing to validate the application of induction hypotheses. -
4.5 Structural Induction 81
4.5 Structural Induction 81 0 pred : ∀x∈nat. ¬x = 0 ⊃∃y∈nat. s(y)= x 0 N N pred = λx∈nat. rec x ⇒ of f(0) (λu. abort (u eq0)) | f(s(x0)) ⇒ (λu. hx0, refl(s(x0))i) If we hide all proof objects we obtain: 0 pred : ∀x∈nat. [¬x = 0] ⊃∃y∈nat. [s(y)= x] 0 N N pred = λx∈nat. rec x ⇒ of f(0) (λ[u]. abort (u eq0)) | f(s(x0)) ⇒ (λ[u]. hx0, [refl(s(x0))]i) Note that this function does not satisfy our restriction: the hidden variable u occurs outside a bracket in the case for f(0). This is because we cannot bracket any subterm of ∃ ∈ abort (u eq0): y nat. [s(y)=N 0] 0 We conclude that our proof of pred does not lend itself to the particular given annotation. However, we can give a different proof where we supply an arbitrary witness c for y in case x is 0 and prove that it satisfies s(y)=N 0 by ⊥E as before. We chose c = 0. 0 pred : ∀x∈nat. ¬x = 0 ⊃∃y∈nat. s(y)= x 0 N N pred = λx∈nat. rec x ⇒ h i of f(0) (λu. 0, abort (u eq0) ) | f(s(x0)) ⇒ (λu. hx0, refl(s(x0))i) Now annotation and extraction succeeds, yielding pred. Of course, any nat- ural number would do for the result of pred(0) 0 ∀ ∈ ¬ ⊃∃ ∈ pred 2 : x nat. [ x =N 0] y nat. [s(y)=N x] 0 ∈ pred 2 = λx nat. rec x ⇒ h i of f(0) (λ[u]. -
The Many Guises of Induction
The Many Guises of Induction Moti Ben-Ari Department of Science Teaching Weizmann Institute of Science http://www.weizmann.ac.il/sci-tea/benari/ Version 1.6.3 © 2016–20 by Moti Ben-Ari. This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/ by-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. Contents 1 Introduction 3 2 Mathematical Induction: An Indispensable Axiom 4 3 Induction Over the Integers 11 4 Not Just Arithmetic 19 5 Things to Watch Out For 23 6 Mathematical Logic 25 7 Models of Computation 28 8 Program Verification 31 9 Induction and Deduction 35 10 The Well-ordering Principle 36 11 Conclusion 40 A Challenge Problems 41 B Solutions 43 2 Chapter 1 Introduction Induction is one of the most widely used proof techniques in mathematics to the extent that it is used routinely and often implicitly. A side effect of the routine use of induction is that it is frequently taught as a set of steps to be followed and not as a fundamental concept. This document presents a short course on induction that shows the richness of the concept and the different ways in which it appears in mathematics. The presentation is broad rather than deep: the aim is to present induction in as many forms as possible, so only one or two examples and exercises are given for each topic, un- like a textbook with many examples and numerous exercises. -
Partially Ordered Sets
Appendix A Partially Ordered Sets Partially ordered sets and complete lattices play a crucial role in program analysis and in this appendix we shall summarise some of their properties. We review the basic approaches for how to construct complete lattices from other complete lattices and state the central properties of partially ordered sets satisfying the Ascending Chain and Descending Chain Conditions. We then review the classical results about least and greatest fixed points. A.l Basic Definitions Partially ordered set. A partial ordering is a relation ~: L x L ---+ { true,fa.lse} that is reflexive (i.e. Vl : l ~ l), transitive (i.e. Vh, l2, b : h ~ l2 A l2 ~ l3 ==> h ~ la), and anti-symmetric (i.e. Vh, h : h ~ l2 Ah ~ h ==> h = l2). A partially ordered set (L, ~) is a set L equipped with a partial ordering ~ (sometimes written ~L). We shall write h ;;;;) h for h ~ l2 and h C l2 for h ~ h A h =1- l2. A subset Y of L has l E L as an upper bound if Vl' E Y : l' ~ l and as a lower bound if Vl' E Y : l' ;;;;) l. A least upper bound l of Y is an upper bound of Y that satisfies l ~ lo whenever lo is another upper bound of Y; similarly, a greatest lower bound l of Y is a lower bound of Y that satisfies lo ~ l whenever lo is another lower bound of Y. Note that subsets Y of a partially ordered set L need not have least upper bounds nor greatest lower bounds but when they exist they are unique (since ~ is anti-symmetric) and they are denoted UY and nY, respectively.