Two Lectures on Constructive Type Theory
Total Page:16
File Type:pdf, Size:1020Kb
Load more
Recommended publications
-
On Proof Interpretations and Linear Logic
On Proof Interpretations and Linear Logic On Proof Interpretations and Linear Logic Paulo Oliva Queen Mary, University of London, UK ([email protected]) Heyting Day Utrecht, 27 February 2015 To Anne Troelstra and Dick de Jongh 6 ?? - !A ::: - !A - ! ILLp ILLp ILLp = Intuit. predicate linear logic (!-free) On Proof Interpretations and Linear Logic Overview - ! IL ::: - IL interpretations IL = Intuitionistic predicate logic 6 ?? - !A ::: - !A On Proof Interpretations and Linear Logic Overview - ! IL ::: - IL interpretations - ! ILLp ILLp IL = Intuitionistic predicate logic ILLp = Intuit. predicate linear logic (!-free) ?? - !A ::: - !A On Proof Interpretations and Linear Logic Overview - ! IL ::: - IL interpretations 6 - ! ILLp ILLp IL = Intuitionistic predicate logic ILLp = Intuit. predicate linear logic (!-free) - !A ::: - !A On Proof Interpretations and Linear Logic Overview - ! IL ::: - IL interpretations 6 ?? - ! ILLp ILLp IL = Intuitionistic predicate logic ILLp = Intuit. predicate linear logic (!-free) On Proof Interpretations and Linear Logic Overview - ! IL ::: - IL interpretations 6 ?? - ! ILLp ILLp - !A ::: - !A IL = Intuitionistic predicate logic ILLp = Intuit. predicate linear logic (!-free) On Proof Interpretations and Linear Logic Outline 1 Proof Interpretations 2 Linear Logic 3 Unified Interpretation of Linear Logic On Proof Interpretations and Linear Logic Proof Interpretations Outline 1 Proof Interpretations 2 Linear Logic 3 Unified Interpretation of Linear Logic E.g. the set of prime numbers is infinite The book \Proofs from THE BOOK" contains six beautiful proofs of this Non-theorems map to the empty set E.g. the set of even numbers is finite Need to fix the formal system On Proof Interpretations and Linear Logic Proof Interpretations Formulas as Sets of Proofs Formulas as set of proofs A 7! fπ : π ` Ag The book \Proofs from THE BOOK" contains six beautiful proofs of this Non-theorems map to the empty set E.g. -
Experience Implementing a Performant Category-Theory Library in Coq
Experience Implementing a Performant Category-Theory Library in Coq Jason Gross, Adam Chlipala, and David I. Spivak Massachusetts Institute of Technology, Cambridge, MA, USA [email protected], [email protected], [email protected] Abstract. We describe our experience implementing a broad category- theory library in Coq. Category theory and computational performance are not usually mentioned in the same breath, but we have needed sub- stantial engineering effort to teach Coq to cope with large categorical constructions without slowing proof script processing unacceptably. In this paper, we share the lessons we have learned about how to repre- sent very abstract mathematical objects and arguments in Coq and how future proof assistants might be designed to better support such rea- soning. One particular encoding trick to which we draw attention al- lows category-theoretic arguments involving duality to be internalized in Coq's logic with definitional equality. Ours may be the largest Coq development to date that uses the relatively new Coq version developed by homotopy type theorists, and we reflect on which new features were especially helpful. Keywords: Coq · category theory · homotopy type theory · duality · performance 1 Introduction Category theory [36] is a popular all-encompassing mathematical formalism that casts familiar mathematical ideas from many domains in terms of a few unifying concepts. A category can be described as a directed graph plus algebraic laws stating equivalences between paths through the graph. Because of this spar- tan philosophical grounding, category theory is sometimes referred to in good humor as \formal abstract nonsense." Certainly the popular perception of cat- egory theory is quite far from pragmatic issues of implementation. -
The Logic of Brouwer and Heyting
THE LOGIC OF BROUWER AND HEYTING Joan Rand Moschovakis Intuitionistic logic consists of the principles of reasoning which were used in- formally by L. E. J. Brouwer, formalized by A. Heyting (also partially by V. Glivenko), interpreted by A. Kolmogorov, and studied by G. Gentzen and K. G¨odel during the first third of the twentieth century. Formally, intuitionistic first- order predicate logic is a proper subsystem of classical logic, obtained by replacing the law of excluded middle A ∨¬A by ¬A ⊃ (A ⊃ B); it has infinitely many dis- tinct consistent axiomatic extensions, each necessarily contained in classical logic (which is axiomatically complete). However, intuitionistic second-order logic is inconsistent with classical second-order logic. In terms of expressibility, the intu- itionistic logic and language are richer than the classical; as G¨odel and Gentzen showed, classical first-order arithmetic can be faithfully translated into the nega- tive fragment of intuitionistic arithmetic, establishing proof-theoretical equivalence and clarifying the distinction between the classical and constructive consequences of mathematical axioms. The logic of Brouwer and Heyting is effective. The conclusion of an intuitionistic derivation holds with the same degree of constructivity as the premises. Any proof of a disjunction of two statements can be effectively transformed into a proof of one of the disjuncts, while any proof of an existential statement contains an effec- tive prescription for finding a witness. The negation of a statement is interpreted as asserting that the statement is not merely false but absurd, i.e., leads to a contradiction. Brouwer objected to the general law of excluded middle as claim- ing a priori that every mathematical problem has a solution, and to the general law ¬¬A ⊃ A of double negation as asserting that every consistent mathematical statement holds. -
Sets in Homotopy Type Theory
Predicative topos Sets in Homotopy type theory Bas Spitters Aarhus Bas Spitters Aarhus Sets in Homotopy type theory Predicative topos About me I PhD thesis on constructive analysis I Connecting Bishop's pointwise mathematics w/topos theory (w/Coquand) I Formalization of effective real analysis in Coq O'Connor's PhD part EU ForMath project I Topos theory and quantum theory I Univalent foundations as a combination of the strands co-author of the book and the Coq library I guarded homotopy type theory: applications to CS Bas Spitters Aarhus Sets in Homotopy type theory Most of the presentation is based on the book and Sets in HoTT (with Rijke). CC-BY-SA Towards a new design of proof assistants: Proof assistant with a clear (denotational) semantics, guiding the addition of new features. E.g. guarded cubical type theory Predicative topos Homotopy type theory Towards a new practical foundation for mathematics. I Modern ((higher) categorical) mathematics I Formalization I Constructive mathematics Closer to mathematical practice, inherent treatment of equivalences. Bas Spitters Aarhus Sets in Homotopy type theory Predicative topos Homotopy type theory Towards a new practical foundation for mathematics. I Modern ((higher) categorical) mathematics I Formalization I Constructive mathematics Closer to mathematical practice, inherent treatment of equivalences. Towards a new design of proof assistants: Proof assistant with a clear (denotational) semantics, guiding the addition of new features. E.g. guarded cubical type theory Bas Spitters Aarhus Sets in Homotopy type theory Formalization of discrete mathematics: four color theorem, Feit Thompson, ... computational interpretation was crucial. Can this be extended to non-discrete types? Predicative topos Challenges pre-HoTT: Sets as Types no quotients (setoids), no unique choice (in Coq), .. -
Types Are Internal Infinity-Groupoids Antoine Allioux, Eric Finster, Matthieu Sozeau
Types are internal infinity-groupoids Antoine Allioux, Eric Finster, Matthieu Sozeau To cite this version: Antoine Allioux, Eric Finster, Matthieu Sozeau. Types are internal infinity-groupoids. 2021. hal- 03133144 HAL Id: hal-03133144 https://hal.inria.fr/hal-03133144 Preprint submitted on 5 Feb 2021 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. Types are Internal 1-groupoids Antoine Allioux∗, Eric Finstery, Matthieu Sozeauz ∗Inria & University of Paris, France [email protected] yUniversity of Birmingham, United Kingdom ericfi[email protected] zInria, France [email protected] Abstract—By extending type theory with a universe of defini- attempts to import these ideas into plain homotopy type theory tionally associative and unital polynomial monads, we show how have, so far, failed. This appears to be a result of a kind of to arrive at a definition of opetopic type which is able to encode circularity: all of the known classical techniques at some point a number of fully coherent algebraic structures. In particular, our approach leads to a definition of 1-groupoid internal to rely on set-level algebraic structures themselves (presheaves, type theory and we prove that the type of such 1-groupoids is operads, or something similar) as a means of presenting or equivalent to the universe of types. -
Sequent Calculus and Equational Programming (Work in Progress)
Sequent Calculus and Equational Programming (work in progress) Nicolas Guenot and Daniel Gustafsson IT University of Copenhagen {ngue,dagu}@itu.dk Proof assistants and programming languages based on type theories usually come in two flavours: one is based on the standard natural deduction presentation of type theory and involves eliminators, while the other provides a syntax in equational style. We show here that the equational approach corresponds to the use of a focused presentation of a type theory expressed as a sequent calculus. A typed functional language is presented, based on a sequent calculus, that we relate to the syntax and internal language of Agda. In particular, we discuss the use of patterns and case splittings, as well as rules implementing inductive reasoning and dependent products and sums. 1 Programming with Equations Functional programming has proved extremely useful in making the task of writing correct software more abstract and thus less tied to the specific, and complex, architecture of modern computers. This, is in a large part, due to its extensive use of types as an abstraction mechanism, specifying in a crisp way the intended behaviour of a program, but it also relies on its declarative style, as a mathematical approach to functions and data structures. However, the vast gain in expressivity obtained through the development of dependent types makes the programming task more challenging, as it amounts to the question of proving complex theorems — as illustrated by the double nature of proof assistants such as Coq [11] and Agda [18]. Keeping this task as simple as possible is then of the highest importance, and it requires the use of a clear declarative style. -
Arxiv:2011.02915V1 [Math.LO] 3 Nov 2020 the Otniy Ucin Pnst Tctr)Ue Nti Ae R T Are Paper (C 1.1
REVERSE MATHEMATICS OF THE UNCOUNTABILITY OF R: BAIRE CLASSES, METRIC SPACES, AND UNORDERED SUMS SAM SANDERS Abstract. Dag Normann and the author have recently initiated the study of the logical and computational properties of the uncountability of R formalised as the statement NIN (resp. NBI) that there is no injection (resp. bijection) from [0, 1] to N. On one hand, these principles are hard to prove relative to the usual scale based on comprehension and discontinuous functionals. On the other hand, these principles are among the weakest principles on a new com- plimentary scale based on (classically valid) continuity axioms from Brouwer’s intuitionistic mathematics. We continue the study of NIN and NBI relative to the latter scale, connecting these principles with theorems about Baire classes, metric spaces, and unordered sums. The importance of the first two topics re- quires no explanation, while the final topic’s main theorem, i.e. that when they exist, unordered sums are (countable) series, has the rather unique property of implying NIN formulated with the Cauchy criterion, and (only) NBI when formulated with limits. This study is undertaken within Ulrich Kohlenbach’s framework of higher-order Reverse Mathematics. 1. Introduction The uncountability of R deals with arbitrary mappings with domain R, and is therefore best studied in a language that has such objects as first-class citizens. Obviousness, much more than beauty, is however in the eye of the beholder. Lest we be misunderstood, we formulate a blanket caveat: all notions (computation, continuity, function, open set, et cetera) used in this paper are to be interpreted via their higher-order definitions, also listed below, unless explicitly stated otherwise. -
The Lambda Calculus Is Algebraic
Under consideration for publication in J. Functional Programming 1 2 P. Selinger point of view. We suggest another way of looking at the problem, which yields a sense in which the lambda calculus is equivalent to an algebraic theory. The Lambda Calculus is Algebraic The basic observation is that the failure of the ξ-rule is not a deficiency of the lambda calculus itself, nor of combinatory algebras, but rather it is an artifact of the way free variables are interpreted in a model. Under the usual interpretation, free variables are in- PETER SELINGER terpreted as elements of a lambda algebra A. Thus, an equation M = N between terms Department of Mathematics and Statistics University of Ottawa, Ottawa, Ontario K1N 6N5, Canada is said to be satisfied if it holds whenever the free variables of M and N are replaced by (e-mail: [email protected]) elements of A. We call this the local interpretation. We suggest a different interpretation, called the absolute interpretation, under which free variables are interpreted as indetermi- nates. Let A[x1 ...xn] be the lambda algebra obtained from A by freely adjoining elements Abstract x1 ...xn. Under the absolute interpretation, an equation M = N is said to be satisfied if it holds in A[x1 ...xn]. This paper serves as a self-contained, tutorial introduction to combinatory models of the untyped The fundamental observationof this paper is that the two interpretations do not coincide, lambda calculus. We focus particularly on the interpretation of free variables. We argue that free and that the absolute interpretation satisfies all rules of the lambda calculus, including the variables should not be interpreted as elements in a model, as is usually done, but as indeterminates. -
The Common HOL Platform
The Common HOL Platform Mark Adams Proof Technologies Ltd, UK Radboud University, Nijmegen, The Netherlands The Common HOL project aims to facilitate porting source code and proofs between members of the HOL family of theorem provers. At the heart of the project is the Common HOL Platform, which defines a standard HOL theory and API that aims to be compatible with all HOL systems. So far, HOL Light and hol90 have been adapted for conformance, and HOL Zero was originally developed to conform. In this paper we provide motivation for a platform, give an overview of the Common HOL Platform’s theory and API components, and show how to adapt legacy systems. We also report on the platform’s successful application in the hand-translation of a few thousand lines of source code from HOL Light to HOL Zero. 1 Introduction The HOL family of theorem provers started in the 1980s with HOL88 [5], and has since grown to include many systems, most prominently HOL4 [16], HOL Light [8], ProofPower HOL [3] and Is- abelle/HOL [12]. These four main systems have developed their own advanced proof facilities and extensive theory libraries, and have been successfully employed in major projects in the verification of critical hardware and software [1, 11] and the formalisation of mathematics [7]. It would clearly be of benefit if these systems could “talk” to each other, specifically if theory, proofs and source code could be exchanged in a relatively seamless manner. This would reduce the considerable duplication of effort otherwise required for one system to benefit from the major projects and advanced capabilities developed on another. -
[The PROOF of FERMAT's LAST THEOREM] and [OTHER MATHEMATICAL MYSTERIES] the World's Most Famous Math Problem the World's Most Famous Math Problem
0Eft- [The PROOF of FERMAT'S LAST THEOREM] and [OTHER MATHEMATICAL MYSTERIES] The World's Most Famous Math Problem The World's Most Famous Math Problem [ THE PROOF OF FERMAT'S LAST THEOREM AND OTHER MATHEMATICAL MYSTERIES I Marilyn vos Savant ST. MARTIN'S PRESS NEW YORK For permission to reprint copyrighted material, grateful acknowledgement is made to the following sources: The American Association for the Advancement of Science: Excerpts from Science, Volume 261, July 2, 1993, C 1993 by the AAAS. Reprinted by permission. Birkhauser Boston: Excerpts from The Mathematical Experience by Philip J. Davis and Reuben Hersh © 1981 Birkhauser Boston. Reprinted by permission of Birkhau- ser Boston and the authors. The Chronicleof Higher Education: Excerpts from The Chronicle of Higher Education, July 7, 1993, C) 1993 Chronicle of HigherEducation. Reprinted by permission. The New York Times: Excerpts from The New York Times, June 24, 1993, X) 1993 The New York Times. Reprinted by permission. Excerpts from The New York Times, June 29, 1993, © 1993 The New York Times. Reprinted by permission. Cody Pfanstieh/ The poem on the subject of Fermat's last theorem is reprinted cour- tesy of Cody Pfanstiehl. Karl Rubin, Ph.D.: The sketch of Dr. Wiles's proof of Fermat's Last Theorem in- cluded in the Appendix is reprinted courtesy of Karl Rubin, Ph.D. Wesley Salmon, Ph.D.: Excerpts from Zeno's Paradoxes by Wesley Salmon, editor © 1970. Reprinted by permission of the editor. Scientific American: Excerpts from "Turing Machines," by John E. Hopcroft, Scientific American, May 1984, (D 1984 Scientific American, Inc. -
Fundamental Algebraic Geometry
http://dx.doi.org/10.1090/surv/123 hematical Surveys and onographs olume 123 Fundamental Algebraic Geometry Grothendieck's FGA Explained Barbara Fantechi Lothar Gottsche Luc lllusie Steven L. Kleiman Nitin Nitsure AngeloVistoli American Mathematical Society U^VDED^ EDITORIAL COMMITTEE Jerry L. Bona Peter S. Landweber Michael G. Eastwood Michael P. Loss J. T. Stafford, Chair 2000 Mathematics Subject Classification. Primary 14-01, 14C20, 13D10, 14D15, 14K30, 18F10, 18D30. For additional information and updates on this book, visit www.ams.org/bookpages/surv-123 Library of Congress Cataloging-in-Publication Data Fundamental algebraic geometry : Grothendieck's FGA explained / Barbara Fantechi p. cm. — (Mathematical surveys and monographs, ISSN 0076-5376 ; v. 123) Includes bibliographical references and index. ISBN 0-8218-3541-6 (pbk. : acid-free paper) ISBN 0-8218-4245-5 (soft cover : acid-free paper) 1. Geometry, Algebraic. 2. Grothendieck groups. 3. Grothendieck categories. I Barbara, 1966- II. Mathematical surveys and monographs ; no. 123. QA564.F86 2005 516.3'5—dc22 2005053614 Copying and reprinting. Individual readers of this publication, and nonprofit libraries acting for them, are permitted to make fair use of the material, such as to copy a chapter for use in teaching or research. Permission is granted to quote brief passages from this publication in reviews, provided the customary acknowledgment of the source is given. Republication, systematic copying, or multiple reproduction of any material in this publication is permitted only under license from the American Mathematical Society. Requests for such permission should be addressed to the Acquisitions Department, American Mathematical Society, 201 Charles Street, Providence, Rhode Island 02904-2294, USA. -
Testing Noninterference, Quickly
Testing Noninterference, Quickly Cat˘ alin˘ Hrit¸cu1 John Hughes2 Benjamin C. Pierce1 Antal Spector-Zabusky1 Dimitrios Vytiniotis3 Arthur Azevedo de Amorim1 Leonidas Lampropoulos1 1University of Pennsylvania 2Chalmers University 3Microsoft Research Abstract To answer this question, we take as a case study the task of Information-flow control mechanisms are difficult to design and extending a simple abstract stack-and-pointer machine to track dy- labor intensive to prove correct. To reduce the time wasted on namic information flow and enforce termination-insensitive nonin- proof attempts doomed to fail due to broken definitions, we ad- terference [23]. Although our machine is simple, this exercise is vocate modern random testing techniques for finding counterexam- both nontrivial and novel. While simpler notions of dynamic taint ples during the design process. We show how to use QuickCheck, tracking are well studied for both high- and low-level languages, a property-based random-testing tool, to guide the design of a sim- it has only recently been shown [1, 24] that dynamic checks are ple information-flow abstract machine. We find that both sophis- capable of soundly enforcing strong security properties. Moreover, ticated strategies for generating well-distributed random programs sound dynamic IFC has been studied only in the context of lambda- and readily falsifiable formulations of noninterference properties calculi [1, 16, 25] and While programs [24]; the unstructured con- are critically important. We propose several approaches and eval- trol flow of a low-level machine poses additional challenges. (Test- uate their effectiveness on a collection of injected bugs of varying ing of static IFC mechanisms is left as future work.) subtlety.