CSE-321 Programming Languages Curry-Howard Isomorphism POSTECH June 4, 2009 박성우.

Slides:



Advertisements
Similar presentations
Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions + solutions)
Advertisements

PROOF BY CONTRADICTION
Proofs and Programs Wei Hu 11/01/2007. Outline  Motivation  Theory  Lambda calculus  Curry-Howard Isomorphism  Dependent types  Practice  Coq Wei.
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
Goals Determine the true value of statements with AND, OR, IF..THEN. Negate statements with the connectives above Construct truth tables Understand when.
What’s left in the course. The course in a nutshell Logics Techniques Applications.
Proofs are Programs: 19th Century Logic and 21st Century Computing CS 510: Programming Languages (a talk adapted from Philip Wadler)
From Chapter 4 Formal Specification using Z David Lightfoot
1 Inference Rules and Proofs Z: Inference Rules and Proofs.
Discrete Mathematics Math 6A Instructor: M. Welling.
Chapter 3 Propositional Logic
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Mathematical Induction Assume that we are given an infinite supply of stamps of two different denominations, 3 cents and and 5 cents. Prove using mathematical.
Adapted from Discrete Math
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
Logic in Computer Science - Overview Sep 1, 2011 POSTECH 박성우.
Propositional Equivalences
Math 240: Transition to Advanced Math Deductive reasoning: logic is used to draw conclusions based on statements accepted as true. Thus conclusions are.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
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.
CSE-490 Logic in Computer Science The Coq Proof Assistant POSTECH Dec 15, 2006 박성우.
Logic in Computer Science - Overview Sep 1, 2009 박성우.
September1999 CMSC 203 / 0201 Fall 2002 Week #1 – 28/30 August 2002 Prof. Marie desJardins.
Inductive Predicates  Unit vs True  Inductive unit : Set := tt : unit  Inductive True : Prop := I : True  Curry Howard Isomorphism  But Coq distinguish.
Thinking Mathematically
COMP 170 L2 Part 3 of Course Chapter 3 of Textbook.
CS6133 Software Specification and Verification
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Chapter 1: The Foundations: Logic and Proofs
Chapter 1: The Foundations: Logic and Proofs
CSE-321 Programming Languages Review POSTECH June 14, 2011 박성우.
Laws of Boolean Algebra Commutative Law Associative Law Distributive Law Identity Law De Morgan's Theorem.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 The Foundations: Logic and Proofs Rules of inference.
CS104:Discrete Structures Chapter 2: Proof Techniques.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
1 Section 6.2 Propositional Calculus Propositional calculus is the language of propositions (statements that are true or false). We represent propositions.
Thinking Mathematically Logic 3.4 Truth Tables for the Conditional and Biconditional.
1 Introduction to Abstract Mathematics Proof Methods , , ~, ,  Instructor: Hayk Melikya Purpose of Section:Most theorems in mathematics.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
CT214 – Logical Foundations of Computing Darren Doherty Rm. 311 Dept. of Information Technology NUI Galway
CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth.
Lecture 11: Proof by Reflection
Chapter 1 Propositional Logic
Introduction to Logic © 2008 Pearson Addison-Wesley.
Dummett about realism and anti-realism
The Foundations: Logic and Proofs
AND.
DISCRETE MATHEMATICS CHAPTER I.
Lecture 1 – Formal Logic.
Thinking Mathematically
Truth Tables and Equivalent Statements
CHAPTER 3 Logic.
Chapter 1 Logic and Proofs.
The Lost Art of Argument
Propositional Calculus: Boolean Algebra and Simplification
Information Technology Department
Chapter 1 The Foundations: Logic and Proof, Sets, and Functions
3.5 Symbolic Arguments.
Propositional Equivalences
CS 220: Discrete Structures and their Applications
CSS 342 Data Structures, Algorithms, and Discrete Mathematics I
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
Discrete Mathematics Lecture 2: Propositional Logic
MAT 3100 Introduction to Proof
Discrete Mathematics Lecture 2: Propositional Logic
Foundations of Discrete Mathematics
CHAPTER 3 Logic.
3.5 Symbolic Arguments.
Presentation transcript:

CSE-321 Programming Languages Curry-Howard Isomorphism POSTECH June 4, 2009 박성우

2 Truth Table T = True, F = False ? ???

3 Tautology The computational meaning of ) Truth of A is not affected by truth of B.

4 Tautology But what is the computational meaning of

5 Classical Logic Concerned with: –"whether a given proposition is true or not." Every proposition is either true or false. –Logic from omniscient God's point of view Logic for mathematics Tautologies in classical logic law of double-negation Peirce's law law of excluded middle

6 Constructive Logic Logic from a human's point of view –we know only what we can prove. Eg. P = NP Logic for computer science Not provable in constructive logic

7 Classical vs. Constructive Proposition: there exists a rational number a b such that a and b are both irrational numbers. Proof in classical logic –let c = p2 p2 if c = p2 p2 is rational, let a = b = p2 = irrational. then a b = p2 p2 = rational. if c = p2 p2 is irrational, let a = c = p2 p2 = irrational, b = p2 = irrational. then a b = (p2 p2 ) p2 = p2 2 = 2 = rational. –But what are a and b at all? Proof in constructive logic –more involved, but provides a and b.

8 Constructive Conjunction

9 Constructive Implication

10 Disjunction ?

11 Outline Classical logic vs Constructive logic V Curry-Howard isomorphism Summary

12 Curry-Howard Isomorphism LogicType System propositiontype proofproof term (expression)

13 Conjunction vs. Product Type

14 Logic vs. Type System

15  Reduction

16  Reduction

17 Curry-Howard Isomorphism LogicType System propositional logic simply-type -calculus first-order logicdependent types second-order logicpolymorphism modal logicmodal type system classical logiccontinuations ?

18 Four Color Problem "Every map can be colored with no more than 4 colors." Proposed in 1852 Computer-based solution published in 1976 Formalization of the proof in 1994 –theorem prover Coq 54 to be taught in LICS Fall 2009!

19 Final Assignment in LICS 2009 Proof of the Pythagoras' theorem Theorem even_is_even_times_even: forall (n : nat), even (n * n) -> even n. Theorem main_thm: forall (n p : nat), n * n = double (p * p) -> p = 0. Definition irrational (x : R) : Prop := forall (p : Z) (q : nat), q <> 0 -> x <> (p / q)%R. Theorem irrational_sqrt_2: irrational (sqrt 2%nat).

20 Outline Classical logic vs Constructive logic V Curry-Howard isomorphism V Summary

21 Curry

22 Howard

23 Curry-Howard Isomorphism =

Finally we will have...

25 Final Exam 1.5 hours Closed book Covers all chapters. June 2009 Su Mo Tu We Th Fr Sa