CSE321 Programming Languages Inductive Proofs - PowerPoint PPT Presentation

About This Presentation
Title:

CSE321 Programming Languages Inductive Proofs

Description:

Inductive Definitions of Syntactic Categories. 3. Judgment. Inference rules ... E.g., what if we mistakenly introduced the rule: So we need 'inductive proofs.' 7 ... – PowerPoint PPT presentation

Number of Views:57
Avg rating:3.0/5.0
Slides: 28
Provided by: sungwo8
Category:

less

Transcript and Presenter's Notes

Title: CSE321 Programming Languages Inductive Proofs


1
CSE-321 Programming LanguagesInductive Proofs
???
  • POSTECH
  • March 20, 2006

2
Inductive Definitions of Syntactic Categories
  • Natural numbers
  • Regular binary trees

3
Inductive Definitions of Judgments
  • Judgment
  • Inference rules

4
Even and Odd Numbers
  • Judgments
  • Inference rules

5
Derivable Rule and Admissible Rule
  • Derivable rule
  • Admissible rule

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
Outline
  • Inductive proofs
  • Structural induction
  • Rule induction

8
Structural Induction
  • Prove 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 zero or has a predecessor n'.
  • n is a product of prime numbers.
  • n is even (which cannot be proven).

9
Structural Induction - Secret Revealed
10
Structural Induction on Trees
11
Example
12
Here is the first theorem we prove in this
course!
13
(No Transcript)
14
Outline
  • Inductive proofs
  • Structural induction V
  • Rule induction

15
Rule Induction
  • Similar to structural induction but applied to
    derivation trees
  • You will be using rule induction millions of
    times in the study of programming language theory
  • because programming languages themselves are
    defined inductively.

16
Rule Induction
  • A judgment J with two inference rules

17
Then what?
18
(No Transcript)
19
(No Transcript)
20
Are proofs by rule induction always this boring?
Are proofs by rule induction always about
something obvious?
21
mparen and lparen
  • From
  • We obtain

22
(No Transcript)
23
Sometimes we need a lemmaif a direct proof
attempt fails.
24
  • But it is not of the form "If J holds, then
    P(J) holds."
  • Trick prove instead
  • That is,

25
(No Transcript)
26
(No Transcript)
27
Assignments
  • Assignment 2
  • The due date is this Friday, but finish it quick!
  • Because...
  • Assignment 3
  • Programming part
  • Our first attempt to implement something
    non-trivial
  • Huffman Code
  • Written part
  • About rule inductions
  • You are required to typeset your answers.
  • We accept only PS and PDF files.
  • Learn to use Latex.
Write a Comment
User Comments (0)
About PowerShow.com