Rule Induction
The Rule Induction Principle
Statement
Let be a set of rules on . Let be the set of derivable elements.
To prove : show that for every rule
if holds for all premises , then holds.
Intuition
If every rule “preserves” property from premises to conclusion, and holds for all axioms (rules with no premises), then holds for all derivable elements.
Examinable Proof: Rule Induction is Valid
Theorem: If is closed under all rules in , then .
Proof:
Method: Induction on the height of derivations.
Base case (height ): No derivation has height (a derivation must be a tree with at least a root). Alternatively: axioms have height , and contains all axiom conclusions since is closed under rules with no premises.
Inductive step: Suppose all derivations of height have conclusions in . Consider a derivation of height with conclusion .
The derivation uses some rule where each is derived by a subtree of height .
By the induction hypothesis, each .
Since is closed under the rule, .
Conclusion: By induction, every derivable element is in .
Equivalence of Characterisations
Two Characterisations of
Proof of Equivalence
: Every closed under contains all derivable elements (shown by induction on derivation height).
: is itself closed under (union of rule applications preserves membership), and contains exactly the derivable elements.
The Recipe for Rule Induction
To prove :
- For each axiom : verify holds
- For each rule : assume and prove
This is the single most reusable proof template in this course.
Example: Balanced Parentheses
Rules
Define language with these rules.
Claim
Every has balanced parentheses: #(’(’) = #(’)’) and every prefix has at least as many ’(’ as ’)’.
Proof by Rule Induction
Axiom: has 0 ’(’ and 0 ’)’. Trivially balanced.
Rule: Assume and are balanced. Consider .
- Count: adds 1 ’(’ and 1 ’)’ to total from and . Since balanced, total balanced.
- Prefix property: Any prefix is either:
- A prefix of (balanced by IH)
- itself (balanced by IH)
- or where is a prefix of (still satisfies prefix property)
Example: Natural Numbers
Rules
Claim: Every derived is either or for some derived
Proof:
- Axiom: is of the right form.
- Rule: is of the right form (as successor of ).
When to Use Rule Induction
Use rule induction when:
- The set is defined inductively by rules
- The property should be preserved by rule application
- You need to prove something about all derivable elements
Common applications:
- Properties of syntax trees
- Type preservation in programming languages
- Semantic equivalences
- Language properties
Summary
- Rule induction: if closed under , then
- Recipe: handle axioms, then each rule preserves from premises to conclusion
- Proof: induction on derivation height
- Fundamental proof technique for inductively defined sets