Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "CSE-321 Programming Languages Curry-Howard Isomorphism POSTECH June 4, 2009 박성우."— Presentation transcript:

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

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

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

4 4 Tautology But what is the computational meaning of

5 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 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 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 8 Constructive Conjunction

9 9 Constructive Implication

10 10 Disjunction ?

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

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

13 13 Conjunction vs. Product Type

14 14 Logic vs. Type System

15 15  Reduction

16 16  Reduction

17 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 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 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 20 Outline Classical logic vs Constructive logic V Curry-Howard isomorphism V Summary

21 21 Curry

22 22 Howard

23 23 Curry-Howard Isomorphism =

24 Finally we will have...

25 25 Final Exam 1.5 hours Closed book Covers all chapters. June 2009 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30


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

Similar presentations


Ads by Google