Proofs are Programs: 19th Century Logic and 21st Century Computing

Slides:



Advertisements
Similar presentations
Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
Advertisements

INTRODUCTION LOGICAL OPERATIONS TRUTH TABLE AND RULES.
Proofs and Programs Wei Hu 11/01/2007. Outline  Motivation  Theory  Lambda calculus  Curry-Howard Isomorphism  Dependent types  Practice  Coq Wei.
Cs776 (Prasad)L4Poly1 Polymorphic Type System. cs776 (Prasad)L4Poly2 Goals Allow expression of “for all types T” fun I x = x I : ’a -> ’a Allow expression.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
HISTORY OF LOGIC BY JOHN NAGUIB. What is Logic? The science or study of how to evaluate arguments and reasoning. “Logic is new and necessary reasoning”
Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
Proofs are Programs: 19th Century Logic and 21st Century Computing CS 510: Programming Languages (a talk adapted from Philip Wadler)
The lambda calculus David Walker CS 441. the lambda calculus Originally, the lambda calculus was developed as a logic by Alonzo Church in 1932 –Church.
1 Section 10.1 Boolean Functions. 2 Computers & Boolean Algebra Circuits in computers have inputs whose values are either 0 or 1 Mathematician George.
Proofs Are Programs COS 441 Princeton University Fall 2004.
BOOLEAN LOGIC CSC 171 FALL 2004 LECTURE 7. ASSIGNMENT Review Quiz # 2 Start reading Chapter 5.
Slides 00 1 Advanced Logics Part 1: Lambda Calculus and Type Theory Lecturer: Lim Yohanes Stefanus Part 2: Modal Logic Lecturer: Gregory Wheeler.
Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
Theoretical basis of GUHA Definition 1. A (simplified) observational predicate language L n consists of (i) (unary) predicates P 1,…,P n, and an infinite.
David Evans CS200: Computer Science University of Virginia Computer Science Class 24: Gödel’s Theorem.
Logic in Computer Science - Overview Sep 1, 2011 POSTECH 박성우.
1 Introduction to Abstract Mathematics The Logic and Language of Proofs Instructor: Hayk Melikya Proposition: Informal introduction to.
Logic. Mathematical logic is a subfield of mathematics exploring the applications of formal logic to mathematics. Topically, mathematical logic bears.
Categories and Computer Science
Boolean Algebra. Boolean algebra (or Boolean logic) is a logical calculus of truth values, developed by George Boole in the late 1830s. It created a notation.
Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions Probability Infinity MATH Some Formal Logic (which is really.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
Copyright © Curt Hill Mathematical Logic An Introduction.
Mathematics What is it? What is it about?. Terminology: Definition Axiom – a proposition that is assumed without proof for the sake of studying the consequences.
Logic in Computer Science - Overview Sep 1, 2009 박성우.
Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems or solving problems, creativity and insight.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Key Concepts Representation Inference Semantics Discourse Pragmatics Computation.
CS6133 Software Specification and Verification
Predicate Logic One step stronger than propositional logic Copyright © Curt Hill.
What’s the Right Logic. What Is Logic? Joe Lau The laws of biology might be true only of living creatures, and the laws of economics are only applicable.
2/6/20161 Programming Languages and Compilers (CS 421) Elsa L Gunter 2112 SC, UIUC Based in part on slides by Mattox.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
ECE DIGITAL LOGIC LECTURE 6: BOOLEAN ALGEBRA Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 02/01/2016.
Logic Simplification-Using Boolean Laws Logic Design Laboratory EE 2121 Lectures By Manesh T EE2121-In Charge
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Proof And Strategies Chapter 2. Lecturer: Amani Mahajoub Omer Department of Computer Science and Software Engineering Discrete Structures Definition Discrete.
Chapter 1 Logic and Proof.
CPS120 Introduction to Computer Science
Programming Languages and Compilers (CS 421)
What is a Functional Language?
CS 550 Programming Languages Jeremy Johnson
Unit – 3 :LAMBDA CALCULUS AND FUNCTIONAL PROGRAMMING
From Classical Proof Theory to P vs. NP
CS Chapter 3 (3A and ) Part 1 of 8
Propositional Calculus: Boolean Functions and Expressions
Knowledge and reasoning – second part
Logic Gates and Boolean Algebra
CHAPTER 2 Boolean Algebra
CS 611: Lecture 9 More Lambda Calculus: Recursion, Scope, and Substitution September 17, 1999 Cornell University Computer Science Department Andrew Myers.
CS Chapter 3 (3A and ) Part 1 of 8
Philosophy of Mathematics 1: Geometry
Geometry of Interaction
CS 320 Principles of Programming Languages
CHAPTER 2 Boolean Algebra
Lecture 2 Propositional Logic
Propositional Calculus: Boolean Algebra and Simplification
Procedural versus Functional Programming
Programming Languages
Natural deduction Gerhard Gentzen.
On Kripke’s Alleged Proof of Church-Turing Thesis
Knowledge and reasoning – second part
Subscript and Summation Notation
Computer Security: Art and Science, 2nd Edition
CSE S. Tanimoto Lambda Calculus
Logic of Informatics Introduction.
An example of the “axiomatic approach” from geometry
Presentation transcript:

Proofs are Programs: 19th Century Logic and 21st Century Computing CS 510: Programming Languages (a talk adapted from Philip Wadler)

How to Talk to Aliens

Basic natural phenomena Some mathematical phenomena seem so unavoidable that we must view them as “discovered” rather than “invented” natural numbers 0 appears first in India (700 CE) mathematical constants pi, e geometry basic shapes (circle, triangle) geometric laws (triangle inequality, area and volume)

Computer Science Invented or discovered? Are there fundamental, unavoidable computational phenomena? laws or concepts with the same unavoidable feeling as Newton’s laws of gravity? How would we know? these concepts would appear across time and culture but computer science is only 50 years old! Or is it?

The History of Logic George Boole 1815-1864 inventor (discoverer?) of Boolean algebra conjectured the existence of fundamental Laws of Thought

The History of Logic George Boole (Laws of Thought, 1854)

History of Logic Gotlob Frege (1848-1925) the first hints of modern logic formal diagrams to depict mathematical inferences

History of Logic Frege’s inferences (1879) Look vaguely familiar?

History of Logic Frege continued (1879)

History of Logic Frege in modern notation

History of Logic Gerhard Gentzen (1934) Natural Deduction The definition of logical connectives exclusively in terms of introduction of the connective and elimination of the connective Prior work specified logic via axioms that related one connective to another

History of Logic Gentzen (1934)

History of Logic Gentzen (1934)

History of Logic Gentzen (1934) in modern notation:

History of Logic Gentzen (1934) proof simplification rules:

History of Logic Proof simplification

History of Logic Proof simplification

History of Logic Alonzo Church invented (discovered?) the lambda calculus the first programming language researcher

History of Logic Alonzo Church (1903-1995) invented (discovered?) the lambda calculus the first programming language researcher he didn’t know it at the time (we were still lacking the computers)

History of Logic Church (1932) the introduction of free and bound variables

History of Logic Church (1932) the logic is defined entirely and abstractly by a system of inference rules symbols do not have pre-conceived meanings pure logic uninfluenced by culture

History of Logic Church (1932) in case you missed the last line I’ll say.

History of Logic Church (1932) proof terms, bound variables and the notion of well-formed objects

History of Logic Computing with Church’s lambda calculus General evaluation rules:

History of Logic Sample evaluation

History of Logic Church’s typed lambda calculus

History of Logic Simplifying programs

History of Logic Simplifying programs

History of Logic Curry-Howard Isomorphism William Howard Haskell Curry (1900-1982) William Howard

History of Logic Curry-Howard Isomorphism Fundamental ideas: First noticed by Curry in 1960 First published by Howard in 1980 Fundamental ideas: Proofs are programs Formulas are types Proof rules are type checking rules Proof simplification is operational semantics Ideas and observations about logic are ideas and observations about programming languages to

History of Logic Curry-Howard (intuitionistic logic) 2nd-order intuitionistic logic (formula variable) a (implication) A => B (conjunction) A  B (disjunction) A  B (truth) True (falsehood) False (universal quant) a.A (existential quant) a.A Polymorphic Lambda Calculus (PolyMinML - recursion) (type variable) a (function type) A  B (pair type) A * B (sum type) A + B (unit) unit (void) void (universal poly) a.A (existential poly) a.A

History of Logic Curry-Howard (intuitionistic logic) Note: You don’t have to omit proof terms from logical rules 2nd-order intuitionistic logic Polymorphic Lambda Calculus G, A |- B -------------------------- (=> I) G |- A => B G, x:A |- e : B --------------------------(Fun) G |- x:A.e : A => B G |- A => B G |- A ------------------------------- (=>E) G |- B G |- e1 : A => B G |- e2 : A ---------------------------------- (App) G |- e1 e2 : B

History of Logic Curry-Howard (intuitionistic logic) 2nd-order intuitionistic logic Polymorphic Lambda Calculus G |- A G |- B ------------------- ( I) G |- A  B G |- e1 : A G |- e2 : B ------------------------------(Pair) G |- <e1,e2> : A * B G |- A  B ------------- (E1) G |- A G |- A  B ------------- (E2) G |- B G |- e : A  B ----------------- (E1) G |- e.1 : A G |- e : A  B ----------------- (E2) G |- e.2 B

History of Logic Other Examples Hindley/Milner: formula reconstruction/type inference Girard/Reynolds: System F/Polymorphic lambda calculus Linear Logic/Syntactic control of interference, linear types Murthy: classical logic/callcc Abramsky: multiplicative vs additive/strict vs lazy Pfenning and Davies: modal logic/RTCG Phil Wadler: and dual to or/CBV dual to CBN

History of Logic The Curry-Howard isomorphism Coincidence? Or are aliens trying to tell us something? Identical concepts arise across time and culture Certain logical/computational definitions seem unavoidable Are they inventions or discoveries? Is this talk about the history of logic or the history of computer programming? Was this course about logic or computer science?