Presentation is loading. Please wait.

Presentation is loading. Please wait.

Inductive Proofs Kangwon National University 임현승 Programming Languages These slides were originally created by Prof. Sungwoo Park at POSTECH.

Similar presentations


Presentation on theme: "Inductive Proofs Kangwon National University 임현승 Programming Languages These slides were originally created by Prof. Sungwoo Park at POSTECH."— Presentation transcript:

1 Inductive Proofs Kangwon National University 임현승 Programming Languages These slides were originally created by Prof. Sungwoo Park at POSTECH.

2 2 Natural numbers Regular binary trees Inductive Def. of Syntactic Categories

3 3 Judgment Inference rules Inductive Definitions of Judgments

4 4 Even and Odd Numbers Judgments Inference rules

5 5 Derivable Rule and Admissible Rule Derivable rule Admissible rule

6 6 But... What is the point of specifying a system and doing nothing else? –E.g., why do we define the two judgments n even and n odd at all? What if the definition is wrong? –E.g., what if we mistakenly introduced the rule: So we need "inductive proofs."

7 7 Outline Inductive Proofs –Structural Induction –Rule Induction

8 8 Proves a property of a syntactic category by analyzing the structure of its definition. I want to prove P(n) for every natural number n. –Examples of P(n) n has a successor. n is 0 or has a predecessor n'. n is a product of prime numbers. n is even (which cannot be proven). Structural Induction

9 9 Structural Ind. ¼ Mathematical Ind.

10 10

11 11

12 12 Structural Induction on Trees

13 13 Example

14 14 Structural Induction on mparen

15 Here is the first theorem we prove in this course!

16 16

17 17 Outline Inductive Proofs –Structural Induction V –Rule Induction similar to structural induction, but applied to derivation trees

18 18 Rule Induction A judgment J with inference rules:

19 19 Example

20 20 How Rule Induction Works A judgment J with two inference rules:

21 21

22 22

23 23 mparen and lparen From We obtain

24 24

25 Sometimes we need a lemma if a direct proof attempt fails.

26 26 But it is not of the form "If J holds, then P(J) holds." Trick: prove instead

27 27

28 28


Download ppt "Inductive Proofs Kangwon National University 임현승 Programming Languages These slides were originally created by Prof. Sungwoo Park at POSTECH."

Similar presentations


Ads by Google