The cases mirror the definition
One base case per base clause, one step per recursive clause. If the definition has three rules the proof has three parts.
When a set is defined recursively, proving something about all its members means proving it for the base objects and showing each construction rule preserves it. No numeric parameter is needed.
Core ideas
Structural induction is ordinary induction over the number of construction steps, with the counting left implicit.
One base case per base clause, one step per recursive clause. If the definition has three rules the proof has three parts.
For a tree built from L and R, you assume the claim for L and for R and prove it for the whole. That is strong induction on structure.
Trees and formulas have no obvious n. Structural induction sidesteps the question by inducting on how the object was assembled.
The material
The principle, why it is valid, and three applications.
Let S be defined recursively. To prove P(x) for every x ∈ S, prove P for each object given by a base clause, and prove that each recursive clause preserves P — that is, if P holds for the parts, it holds for the object built from them.
Validity comes straight from the definition. Every member of S is produced in finitely many steps, so induct on that number: at zero steps the object is a base object, and each further step is a recursive clause applied to objects built in fewer steps.
Recall the definition: the empty string is well formed; if s is, so is (s); if s and t are, so is st. Claim: every well-formed string has equally many left and right parentheses.
Base. The empty string has 0 of each.
Clause (s). Assume s has m of each. Then (s) has m + 1 of each.
Clause st. Assume s has m of each and t has p of each. Then st has m + p of each.
Every well-formed string is built by these clauses, so the property holds throughout.
□
Three parts, matching the three clauses. Missing one — forgetting the concatenation clause, say — would leave a whole family of strings unproved, and the omission is invisible unless the definition is beside the proof.
For a binary tree: h(empty) = −1 and h(node(v, L, R)) = 1 + max(h(L), h(R)). n(empty) = 0 and n(node(v, L, R)) = 1 + n(L) + n(R).
For every binary tree T, n(T) ≤ 2^{h(T)+1} − 1.
Base. The empty tree has h = −1 and n = 0, and 2⁰ − 1 = 0.
Step. Let T = node(v, L, R) and assume the bound for L and R. Write h = h(T), so h(L) ≤ h − 1 and h(R) ≤ h − 1.
Then n(T) = 1 + n(L) + n(R) ≤ 1 + (2^h − 1) + (2^h − 1) = 2·2^h − 1 = 2^{h+1} − 1.
□
Both subtrees needed the hypothesis, which makes this structural induction with two recursive parts — the structural analogue of the two-term recurrence that forced strong induction in “Strong Induction”.
The well-formed formulas of Logic and Proof are a recursively defined set: a variable is a formula; if A is a formula so is ¬A; if A and B are, so is (A ∧ B), and similarly for the other binary connectives. Structural induction over that definition proves the syntactic facts Logic and Proof used without proof.
Base: a variable has none of either. Negation adds none. Each binary clause adds one of each. So every well-formed formula has matching parentheses — which is what makes the parser in the truth-table lab able to reject the strings that are not formulas.
Interactive
Iterated and solved, then compared
Method
Put the definition beside the proof and match them clause for clause.
Base clauses and recursive clauses. The proof will have exactly this many parts, and matching them is how you know none was skipped.
Usually immediate. Do it anyway, in writing.
Then establish it for the object constructed. This is the inductive hypothesis, and there may be more than one part.
The closure sentence of the definition is what makes these cases exhaustive. Without it the proof covers a subset.
A tree is full when every node has either 0 or 2 children.
The parity argument reuses the result of “Direct Proof”, in Logic and Proof: the sum of two odd integers is even. Structural induction supplied the two odd numbers; elementary arithmetic finished the job.
Prove that every well-formed parenthesis string has no proper prefix with more right than left parentheses. Three clauses, three parts, and the concatenation case is the one that needs thought.
Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.
No recommendations yet for this lesson.