1.11 Inductive definitions and structural induction
1. Introduction to set theory and to methodology and philosophy of
mathematics and computer programming
Inductive definitions and structural induction
An overview
by Jan Plaza
c 2017 Jan Plaza
Use under the Creative Commons Attribution 4.0 International License
Version of February 14, 2017
2. successor(n) = n + 1
Natural numbers can be constructed from 0 by repeated applications of successor.
To prove that every natural number has a property P, one can use mathematical
induction.
Sets of other mathematical objects can be defined by repeated applications of some
constructs to certain base objects – these are inductive definitions .
To prove that every object in such a set has a property P, one can use
structural induction .
3. Definition
Let Prop be a set of propositional symbols.
The set of propositional formulas over Prop ,
denoted Form(Prop) , is defined as follows
in an inductive definition.
1. , ⊥ ∈ Form(Prop).
2. If p ∈ Prop, then p ∈ Form(Prop).
3. If A ∈ Form(Prop), then ¬A ∈ Form(Prop).
4. If A, B ∈ Form(Prop), then (A ∧ B), (A ∨ B), (A → B) ∈ Form(Prop).
5. Nothing belongs to Form(Prop) unless it can be constructed using the preceding
rules.
4. Definition
Let Prop be a set of propositional symbols.
The set of propositional formulas over Prop ,
denoted Form(Prop) , is defined as follows
in an inductive definition.
1. , ⊥ ∈ Form(Prop). Base clause
2. If p ∈ Prop, then p ∈ Form(Prop). Base clause
3. If A ∈ Form(Prop), then ¬A ∈ Form(Prop). Inductive clause
4. If A, B ∈ Form(Prop), then (A ∧ B), (A ∨ B), (A → B) ∈ Form(Prop). Inductive
clause
5. Nothing belongs to Form(Prop) unless it can be constructed using the preceding
rules. Restriction clause
5. Definition
Let Prop be a set of propositional symbols.
The set of propositional formulas over Prop ,
denoted Form(Prop) , is defined as follows
1. , ⊥ ∈ Form(Prop).
2. If p ∈ Prop, then p ∈ Form(Prop).
3. If A ∈ Form(Prop), then ¬A ∈ Form(Prop).
4. If A, B ∈ Form(Prop), then (A ∧ B), (A ∨ B), (A → B) ∈ Form(Prop).
5. Nothing belongs to Form(Prop) unless it can be constructed using the preceding
rules.
Notice the parentheses in (A ∧ B), (A ∨ B), (A → B).
6. Proposition
Let Prop be a set of propositional symbols.
Every formula X from Form(Prop) contains equal number of left and right parentheses.
Proof by structural induction
Base case: X is .
has equal number of left and right parentheses, namely 0.
Base case: X is ⊥.
⊥ has equal number of left and right parentheses, namely 0.
Base case: X is a propositional symbol p from Prop.
p has equal number of left and right parentheses, namely 0.
Inductive case: X is ¬A, for some A ∈ Form(Prop).
By inductive hypothesis, A has equal number of left and right
parentheses. X, which is ¬A, has the same numbers of left and right
parentheses as A. So X has equal number of left and right parentheses.
7. Inductive case: X is (A ∧ B), for some A, B ∈ Form(Prop).
By inductive hypothesis, A has equal number of left and right
parentheses, say m, and B has equal number of left and right
parentheses, say n. Then, X, which is (A ∧ B), has the m + n + 1 left
parentheses, and the same number of right parentheses.
Inductive case: X is (A ∨ B), for some A, B ∈ Form(Prop).
By inductive hypothesis, A has equal number of left and right
parentheses, say m, and B has equal number of left and right
parentheses, say n. Then, X, which is (A ∨ B), has the m + n + 1 left
parentheses, and the same number of right parentheses.
Inductive case: X is (A → B), for some A, B ∈ Form(Prop).
By inductive hypothesis, A has equal number of left and right
parentheses, say m, and B has equal number of left and right
parentheses, say n. Then, X, which is (A → B), has the m + n + 1 left
parentheses, and the same number of right parentheses.
8. Exercise
Prove by structural induction that for every A ∈ Form(Prop),
if A does not involve , ⊥
then the number of left parentheses in A is
one less than the number of occurrences of propositional symbols in A.
9. Definition
Let A be a propositional formula.
The set of subformulas of A , denoted subformulas(A) , is defined as follows
in an inductive definition.
1. A ∈ subformulas(A).
2. If (B ∧ C) ∈ subformulas(A), then B, C ∈ subformulas(A).
3. If (B ∨ C) ∈ subformulas(A), then B, C ∈ subformulas(A).
4. If (B → C) ∈ subformulas(A), then B, C ∈ subformulas(A).
5. If ¬B ∈ subformulas(A), then B ∈ subformulas(A).
6. Nothing belongs to subformulas(A) unless it can be constructed using the
preceding rules.
10. Definition
Let A be a propositional formula.
The set of subformulas of A , denoted subformulas(A) , is defined as follows
in an inductive definition.
1. A ∈ subformulas(A). Base clause
2. If (B ∧ C) ∈ subformulas(A), then B, C ∈ subformulas(A). Inductive clause
3. If (B ∨ C) ∈ subformulas(A), then B, C ∈ subformulas(A). Inductive clause
4. If (B → C) ∈ subformulas(A), then B, C ∈ subformulas(A). Inductive clause
5. If ¬B ∈ subformulas(A), then B ∈ subformulas(A). Inductive clause
6. Nothing belongs to subformulas(A) unless it can be constructed using the
preceding rules. Restriction clause
11. Definition
Let A be a propositional formula.
The set of subformulas of A , denoted subformulas(A) , is defined as follows
in an inductive definition.
1. A ∈ subformulas(A).
2. If (B ∧ C) ∈ subformulas(A), then B, C ∈ subformulas(A).
3. If (B ∨ C) ∈ subformulas(A), then B, C ∈ subformulas(A).
4. If (B → C) ∈ subformulas(A), then B, C ∈ subformulas(A).
5. If ¬B ∈ subformulas(A), then B ∈ subformulas(A).
6. Nothing belongs to subformulas(A) unless it can be constructed using the
preceding rules.
Exercise: Let A be the formula (p → (q ∨ ¬p)). Find the set subformulas(A).
12. Definition
Let A be a propositional formula.
The set of subformulas of A , denoted subformulas(A) , is defined as follows
in an inductive definition.
1. A ∈ subformulas(A).
2. If (B ∧ C) ∈ subformulas(A), then B, C ∈ subformulas(A).
3. If (B ∨ C) ∈ subformulas(A), then B, C ∈ subformulas(A).
4. If (B → C) ∈ subformulas(A), then B, C ∈ subformulas(A).
5. If ¬B ∈ subformulas(A), then B ∈ subformulas(A).
6. Nothing belongs to subformulas(A) unless it can be constructed using the
preceding rules.
Exercise: Let A be the formula (p → (q ∨ ¬p)). Find the set subformulas(A).
Answer: {(p → (q ∨ ¬p)), p, (q ∨ ¬p), q, ¬p}