Propositions as Types

Similar documents
Foundations of Computation. Ana Bove

Church s undecidability result

Introduction to Turing Machines

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

CS 301. Lecture 17 Church Turing thesis. Stephen Checkoway. March 19, 2018

Lecture 14 Rosser s Theorem, the length of proofs, Robinson s Arithmetic, and Church s theorem. Michael Beeson

HoTT seminar organization

Teaching Natural Deduction as a Subversive Activity

The roots of computability theory. September 5, 2016

Automata Theory. Definition. Computational Complexity Theory. Computability Theory

CS 275 Automata and Formal Language Theory

Propositions and Proofs

The Legacy of Hilbert, Gödel, Gentzen and Turing

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

CS 275 Automata and Formal Language Theory

Great Ideas in Theoretical Computer Science

Propositional and Predicate Logic. jean/gbooks/logic.html

Structuring Logic with Sequent Calculus

What are the recursion theoretic properties of a set of axioms? Understanding a paper by William Craig Armando B. Matos

Fundamentals of Computer Science

Henk Barendregt and Freek Wiedijk assisted by Andrew Polonsky. Radboud University Nijmegen. March 5, 2012

cse371/mat371 LOGIC Professor Anita Wasilewska Fall 2018

CS Lecture 19: Logic To Truth through Proof. Prof. Clarkson Fall Today s music: Theme from Sherlock

CHAPTER 11. Introduction to Intuitionistic Logic

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Classical Propositional Logic

Propositional logic (revision) & semantic entailment. p. 1/34

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

The Curry-Howard Isomorphism

CST Part IB. Computation Theory. Andrew Pitts

Turing Centenary Lecture

Introduction to dependent type theory. CIRM, May 30

PROOFS IN PREDICATE LOGIC AND COMPLETENESS; WHAT DECIDABILITY MEANS HUTH AND RYAN 2.3, SUPPLEMENTARY NOTES 2

Formal Logic and Deduction Systems

Propositional Logic Language

What is a Proof? Jean Gallier and Kurt W.A.J.H.Y. Reillag CIS, Upenn and Hospices de Beaune. Friday, February 22, 13

Type Theory and Constructive Mathematics. Type Theory and Constructive Mathematics Thierry Coquand. University of Gothenburg

Handbook of Logic and Proof Techniques for Computer Science

The λ-calculus and Curry s Paradox Drew McDermott , revised

Gottfried Wilhelm Leibniz (1666)

COMPUTATION IN AND ABOUT PHYSICS AND MATHEMATICS

CS187 - Science Gateway Seminar for CS and Math

Gödel s Theorem: Limits of logic and computation

The Limit of Humanly Knowable Mathematical Truth

cis32-ai lecture # 18 mon-3-apr-2006

Marie Duží

Introduction to Intuitionistic Logic

185.A09 Advanced Mathematical Logic

Computer Science and Logic A Match Made in Heaven

Computation. Some history...

Decidability: Church-Turing Thesis

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lecture 1 : Introduction

Chapter 2: Introduction to Propositional Logic

NORMAL DERIVABILITY IN CLASSICAL NATURAL DEDUCTION

Logic for Computer Science - Week 4 Natural Deduction

Decidable Languages - relationship with other classes.

Handouts. CS701 Theory of Computation

CHAPTER 2 INTRODUCTION TO CLASSICAL PROPOSITIONAL LOGIC

The Lambda Calculus. Stephen A. Edwards. Fall Columbia University

AN ALTERNATIVE NATURAL DEDUCTION FOR THE INTUITIONISTIC PROPOSITIONAL LOGIC

AN INTRODUCTION TO COMPUTABILITY THEORY

Understanding Computation

Most General computer?

Nonclassical logics (Nichtklassische Logiken)

Turing Machines (TM) The Turing machine is the ultimate model of computation.

Bootstrapping Mathematics

Phil Introductory Formal Logic

Propositional logic. First order logic. Alexander Clark. Autumn 2014

3.2 Reduction 29. Truth. The constructor just forms the unit element,. Since there is no destructor, there is no reduction rule.

NONSTANDARD MODELS AND KRIPKE S PROOF OF THE GÖDEL THEOREM

Type Systems. Lecture 9: Classical Logic. Neel Krishnaswami University of Cambridge

Computability Theory. CS215, Lecture 6,

Institute for Applied Information Processing and Communications (IAIK) Secure & Correct Systems. Decidability

Turing Machines. Lecture 8

ENEE 459E/CMSC 498R In-class exercise February 10, 2015

On some Metatheorems about FOL

Natural Deduction for Propositional Logic

Implementing Proof Systems for the Intuitionistic Propositional Logic

Cogito ergo sum non machina!

Proving Completeness for Nested Sequent Calculi 1

The Calculus of Inductive Constructions

Proseminar on Semantic Theory Fall 2013 Ling 720 Propositional Logic: Syntax and Natural Deduction 1

03 Review of First-Order Logic

THE OPEN LOGIC TEXT. Complete Build. Open Logic Project. Revision: (master)

cse541 LOGIC FOR COMPUTER SCIENCE

Teaching Natural Deduction as a Subversive Activity

Linearisation of dimension bounded sets of Horn clauses

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

Introduction to Metalogic

The Church-Turing Thesis and Relative Recursion

Predicate Logic - Undecidability

An overview of Structural Proof Theory and Computing

Teaching Gödel s incompleteness theorems

Proof-Theoretic Analysis of the Quantified Argument Calculus

Categories, Proofs and Programs

Lecture Notes on The Curry-Howard Isomorphism

1. A motivation for algebraic approaches to logics

Stratifications and complexity in linear logic. Daniel Murfet

Andrew Schumann, Roman Murawski Is the Polish Logic One of the Best Traditions Still? Studia Humana nr 3/4, 78-82

From Hilbert s Program to a Logic Tool Box

Transcription:

Propositions as Types Martin Pfeifhofer & Felix Schett May 25, 2016 Contents 1 Introduction 2 2 Content 3 2.1 Getting Started............................ 3 2.2 Effective Computability And The Various Definitions....... 3 2.2.1 Alonzo Church: Lambda Calculus............. 3 2.2.2 Kurt Gödel: General Recursion............... 4 2.2.3 Alan Turing: Turing Machine................ 4 2.2.4 Gerhard Gentzen: Natural Deduction........... 4 2.3 Curry-Howard Correspondence................... 5 3 Conclusion 6 4 Bibliography 7 1

Abstract This is a scientific work about the roots of Functional Programming. To be more specific it s about Mathematics & Logic on one side and about Programming & Computation on the other side. These two merged together create a new field of study, which has been later become known as Computational Logic. 1 Introduction This scientific work is about the origins and the development of the term Propositions as Types. It tells a story of two different sciences, which have been discovered to be linked to each other. Mathematicians and Computer Scientists have worked on different projects, coming out that they are actually equivalent. In this scientific work we wrote mainly about the Definition of Effective Computability, which has been made by three different mathematicians and was a Milestone in Computational Logic. After that we go shortly into the specific theme of Propositions as Types, also known as Howard-Curry-Correspondence. 2

2 Content 2.1 Getting Started The notion Propositions as Types [1] [2] [3] has many names and origins. Computer scientists and mathematicians discovered Propositions as Types in the 1930s and since then its usage and content developed. It describes a correspondence between a programming language and a logic. That means that for any given type in the programming language there is a corresponding proposition in a logic and the other way around. But there is more to become aware of. For each program of a type there is a proof of the corresponding logic and the other way around. So we have proofs as programs. For each way to evaluate a program, there is a corresponding way to simplify a proof and the other way around. We get evaluation of programs as simplification of proofs. So Propositions as Types is an isomorphism between Computer Science and Logic. These properties of Propositions as Types were discovered by computer scientists and mathematicians step by step since the 1930s and are now used in many different programming languages and logics. Examples of Propositions and their corresponding Types by Haskell Curry: Implication: A B corresponds to A B Conjuction: A B corresponds to A B Disjunction: A B corresponds to A + B 2.2 Effective Computability And The Various Definitions In the early years of the 20th Century there was no definition of Effective Computability or effectively calculable, meaning an algorithm that always terminates and always gives the correct answer. David Hilbert, a German mathematician, published a paper called Das Entscheidungsproblem. It s about an algorithm that gets a statement in formal logic and determines if that statement is either true or false. He wanted to solve the Entscheidungsproblem, depending on the fact that logic is complete, stating that every provable statement is true and every true statement is provable. But before this question could be answered, a formal definition of algorithm was needed. This was made by Alonzo Church, who had a great impact on the development of logics and the notion of propositions as types. Church was one of three scientists who made a definition of Effective Computability in the same decade, together with Kurt Gödel and Alan Turing. But they did not work together, everyone made his own definition independently from the others. 2.2.1 Alonzo Church: Lambda Calculus Alonzo Church (1903-1995) [4] was an US-American mathematician, logician and philosopher. He first studied, and later teached at the Princeton University. Church once said: Never had any mathematical conversations with anybody, because there was nobody else in my field. [5] He invented the Lambda Calculus in 1936, first for defining notations for logical formulas in a new presentation of logic. Lambda Calculus contains only 3 constructs: variables, function application and function abstraction. Lambda Calculus provided the first brief 3

notation for functions, and first class functions (functions as arguments as result from other functions). Lambda Calculus - Alonzo Church (1932) [6]: L,M,N : := x (λx.n) ( L M) Church stated that there are problems which are not solvable and he used Lambda Calculus to proof this statement. After a while Church and his students were convinced, that any effectively calculable-function of numbers can be represented by Lambda Calculus. He also demonstrated in 1937 using Lambda Calculus that the Entscheidungsproblem was not solvable. 2.2.2 Kurt Gödel: General Recursion Kurt Gödel (1906-1978) [7] was an Austrian-American mathematician and is today known as one of the most important logicians of the 20th Century. He made significant contributions to the predicate logic (completeness and decision problem in arithmetic) and on the relations of intuitionist logic both for classical logic and for modal logic. In 1933 Gödel visited Princeton. He was convinced that Churchs Lambda Calculus wasn t effectively calculable. Church offered Gödel to make his own definition and that he would show afterwards, that it was included in lambda-definability. About a year later Gödel proposed what is today known as General Recursive Functions, as definition for effectively calculable. Church and his students soon noticed that both definitions are equivalent. But instead of believing it, Gödel was doubting his own definition. 2.2.3 Alan Turing: Turing Machine Alan Turing (1912-1954) [8] was a British logician, mathematician and computer scientist. Today he is known as one of the most influential theorists in the early computer science. In 1937 when Turing was still a student at Cambridge, he came up with his own definition of Effective Computability: the Turing Machine. Turing argumented that any computation done by a human with paper and pencil can also be done by a Turing Machine. Later he used his Turing Machine to show that the Entscheidungsproblem is undecidable. Gödel was finally convinced that all of the three definitions of Effective Computability are right, thanks to Turing. 2.2.4 Gerhard Gentzen: Natural Deduction Gerhard Gentzen (1909-1945) [9] was a German mathematician and logician. In 1935, at the age of 25, Gentzen introduced two formulations of logic: Natural Deduction [10] and Sequent Calculus [11]. He also introduced the symbol of universal quantification:. While working on his formulations of logics he concluded out of his observation, that proof rules should come in pairs. As example in Gentzens Natural Deduction these two were introduction (I) and elimination pairs (E). The introduction rule indicates under what circumstances a given formula with a logical connective can be claimed and the elimination rule shows 4

how to use that logical connective to solve it. Gentzen stated:...the introductions represent, as it were, the definitions of the symbols concerned, and the eliminations are no more, in the final analysis, than the consequences of these definitions. [1] Natural Deduction by Gentzen (1935) [6]: [A] x. B A B -I x A B B A -E A B &-I A & B A & B &-E A A & B &-E B Natural Deduction was later shown to be equivalent to Lambda Calculus. While working on these logics and proofs he understood something that he later published under the name of Subformula Principle. It shows that every proof can be normalized to one that is made of a combination of concepts that are included in the final result. The reason why this is important, is the fact that it led to consistency. This is also the reason why logicians have interest in the normalization of proofs. Gentzen introduced Sequent Calculus more or less just to prove the Subformula Principle. Coming out in 1965 Prawitz showed how to prove the Principle, by simplifying Natural Deduction proofs. 2.3 Curry-Howard Correspondence After having a little insight into the development and definitions of Effective Computability we can go on to the specific topic of Propositions as Types. Haskell Curry (1900-1982) was a US-American logician and mathematician. He studied at Harvard and promoted 1930 in Göttingen, where Hilbert was teaching. [12]What Curry discovered, was the fact, that every type of a function A B could be read as a proposition A B. That means that for a provable proposition there is a corresponding type of a given function. Thus we have propositions as types. Motivated by Curry, William Alvin Howard (*1926) a US-American logician and mathematician, extended this statement. He observed the fact, that there is a similar correspondence between Natural Deduction and simply typed Lambda Calculus. So what we get is that simplification of proofs corresponds to evaluation of programs. By extending Lambda Calculus, he also noticed that the correspondence works out for other logical connectives, such as conjunction and disjunction. He also proposed that the predicate quantifiers (, ) correspond to dependent types. With the introduction of independent types every proof in predicate logic can be represented by a Lambda Calculus term. A lot of systems made by computer scientists and mathematicians are based on this concept. Some examples are Automath, Type Theory and PRL. 5

3 Conclusion After deeply researching about Propositions as Types and the specific theme of Effective Computability we came to the conclusion that these scientists have made incredible work on the fields of Logic and Computer Science. They set the foundation of the whole field of Functional Programming, including different logics and their combination with programming languages. 6

4 Bibliography References [1] Philip Wadler. Propositions as types, Dec 2015. [2] Steven Awodey and Andrej Bauer. Propositions as [types], Nov 2003. [3] Steven Awodey and Andrej Bauer. Propositions as [types], Jun 2001. [4] Wikipedia. Alonzo church, April 2016. [5] Alonzo Church. Alonzo church quote, Mai 2016. [6] Philip Wadler. Propositions as types - presentation, Sep 2015. [7] Wikipedia. Kurt gödel, Mai 2016. [8] Wikipedia. Alan turing, Mai 2016. [9] Wikipedia. Gerhard gentzen, Mai 2016. [10] Wikipedia. Natural deduction, Mai 2016. [11] Wikipedia. Sequent calculus, März 2016. [12] Wikipedia. Howard-curry-isomorphism, Mai 2016. 7