CSE321 Programming Languages Inductive Proofs POSTECH March 20
- Slides: 27
CSE-321 Programming Languages Inductive Proofs 박성우 POSTECH March 20, 2006
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 • 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). 8
Structural Induction - Secret Revealed 9
Structural Induction on Trees 10
Example 11
Here is the first theorem we prove in this course!
13
Outline • Inductive proofs – Structural induction V – Rule induction 14
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. 15
Rule Induction • A judgment J with two inference rules: 16
Then what? 17
18
19
Are proofs by rule induction always this boring? Are proofs by rule induction always about something obvious?
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 • That is, 24
25
26
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. 27
- Lesson 10 unknown angle proofs-proofs with constructions
- Lesson 9 unknown angle proofs
- Cse321
- March march dabrowski
- Alternative programming languages
- Middle level programming languages
- Programming languages
- Cs 421
- Xenia programming languages
- Storage management in programming languages
- Plc programming languages
- Reasons for studying concepts of programming languages
- Real-time systems and programming languages
- Programming languages
- Strongly typed vs weakly typed
- The art of programming
- Tiny programming language
- Real time example of multithreading in java
- Advantages of high level language
- Joey paquet
- Cornell programming languages
- Xkcd programming
- Programming languages
- Cse 340 principles of programming languages
- Transmission programming languages
- Cs 421 programming languages and compilers
- Brief history of programming languages
- Cxc it