Induction Formal Methods Foundation Baojian Hua bjhuaustc edu
Induction Formal Methods Foundation Baojian Hua bjhua@ustc. edu. cn
Motivation n Induction is a powerful math. tool to prove interesting properties n n In this lecture, we study two others: n n n We‘ve studied mathematical induction The structural induction Well-founded induction There are more in the assigned reading
Mathematical induction n n To prove a property P(n), for any natural number n We follow the next two steps: n n Prove P(0); Assume P(k), to prove P(k+1). n The hard part
Mathematical induction The mathematical induction makes sense, for the Piano numbers: n : : = O The base case | Sn The inductive case Example: 0 : O 1: SO 2: SSO … n
Structural induction Do induction on any recursive defined structures Theorem: for any e : : = n A constant expression e, the number of left parenthesis “(“ is A variable | x equal to the number of right parenthesis “)”. |e+e Addition | (e) n Parenthesis
Structural induction Do induction on any recursive defined structures Theorem: for any e : : = n A constant expression e, the number of left parenthesis “(“ is A variable | x equal to the number of right parenthesis “)”. |e+e Addition Proof (only sketch). Do case analysis on | (e) the possible syntax structure of e. n 1) If e=x or e=x, then all 0; 2) If e = e 1+e 2, then based on the assumption …, … 3) If e = (e 1), then based on …, … Parenthesis
Well-founded induction n
- Slides: 7