Download Slide 1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
CSE-321 Programming Languages
Inductive Proofs
박성우
POSTECH
March 19, 2007
Inductive Definitions of Syntactic Categories
• Natural numbers
• Regular binary trees
2
Inductive Definitions of Judgments
• Judgment
• Inference rules
3
Even and Odd Numbers
• Judgments
• Inference rules
4
Derivable Rule and Admissible Rule
• Derivable rule
• Admissible rule
5
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."
6
Outline
• Inductive proofs
– Structural induction
– Rule induction
7
Structural Induction
• 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).
8
Structural Ind. ¼ Mathematical Ind.
9
Structural Induction on Trees
10
Example
11
Structural Induction on mparen
12
Here is the first theorem
we prove in this course!
14
Outline
• Inductive proofs
– Structural induction V
– Rule induction
• similar to structural induction, but applied to
derivation trees
15
Rule Induction
• A judgment J with inference rules:
16
Example
17
How Rule Induction Works
• A judgment J with two inference rules:
18
19
20
mparen and lparen
• From
• We obtain
21
22
Sometimes we need a lemma
if a direct proof attempt fails.
• But it is not of the form
"If J holds, then P(J) holds."
• Trick: prove instead
24
25
26
Current Schedule
March 2007
Su Mo Tu We Th
1
4 5 6 7 8
11 12 13 14 15
18 19 20 21 22
A2
25 26 27 28 29
Q1
A3
Fr
2
9
16
23
Sa
3
10
17
24
30 31
April 2007
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
Q2
A4
15 16 17 18 19 20 21
22 23 24 25 26 27 28
<midterm>
29 30 1 2
A5
27
New Schedule?
March 2007
Su Mo Tu We Th
1
4 5 6 7 8
11 12 13 14 15
18 19 20 21 22
A2
25 26 27 28 29
Q1
Fr
2
9
16
23
Sa
3
10
17
24
30 31
April 2007
Su Mo Tu We Th
1 2 3 4 5
A3
8 9 10 11 12
Q2
15 16 17 18 19
A4
22 23 24 25 26
<midterm>
29 30 1 2
A5
Fr Sa
6 7
13 14
20 21
27 28
28
Related documents