Induction
Induction is reasoning from the specific to the general.
If various instances of a schema are true and there are no counterexamples, we are tempted to conclude a universally quantified version of the schema.
p(a) ⇒ q(a) p(b) ⇒ q(b) → ∀x.p(x) ⇒ q(x)
p(c) ⇒ q(c)
Induction
Definitionf(1) = 1f(x + 1) = f(x) + 2*x + 1
Data
Conjecture
In this case, the answer is correct. Lucky Guess.
1 = 1 = 12
1+ 3 = 4 = 22
1+ 3 + 5 = 9 = 32
1+ 3 + 5 + 7 = 16 = 42
1+ 3 + 5 + 7 + 9 = 25 = 52
f (x) = x2
Incomplete Induction
Data:
“Theorem” by Fermat (1601-1665):
Fact discovered (mercifully) after his death:
Oops.
221
+1 = 22+1 = 522
2
+1 = 24+1 = 1722
3
+1 = 28+1 = 25722
4
+1 = 216+1 = 65537
prime(22x
+1)
225
+1 = 4,294,967,297 = 641*6,700, 417
Not So Lucky Guess
Domain Closure finite domains
Linear Induction induction on sequences
Tree Induction induction on trees
Structural Induction induction on arbitrary structures
Outline
Domain Closure
φ1[σ]…φn[σ]
∀υ.φ[υ]
General Form
φ[a]φ[b]φ[c]φ[d]
∀x.φ[x]
Finite Example
1. p(a) ⇒ q(a) Premise
2. p(b) ⇒ q(b) Premise
3. p(c) ⇒ q(c) Premise
4. p(d) ⇒ q(d) Premise
5. ∀x. p(x) ⇒ q(x) Ind: 1-4
Proof
What happens when we have infinitely many terms?
p(a) ⇒ q(a)p(s(a)) ⇒ q(s(a))
p(s(s(a))) ⇒ q(s(s(a)))p(s(s(s(a)))) ⇒ q(s(s(s(a))))
…
∀x.p(x) ⇒ q(x)
Infinite Case
Linear Induction
Linearly Structured World:
a → s(a) → s(s(a)) → s(s(s(a))) → …
Languages like this are called linear languages.The object constant in a linear language is called the base element, and the function constant is called the successor function.
Linear Languages
φ[a] ∀µ.(φ[µ] ⇒ φ[s(µ)])
∀υ.φ[υ]
Linear Induction
φ[a] ∀µ.(φ[µ] ⇒ φ[s(µ)])
∀υ.φ[υ]
Base Case
Linear Induction
φ[a] ∀µ.(φ[µ] ⇒ φ[s(µ)])
∀υ.φ[υ]
Base Case
Inductive Case
Linear Induction
φ[a] ∀µ.(φ[µ] ⇒ φ[s(µ)])
∀υ.φ[υ]
Base Case
Inductive Case
Inductive Hypothesis
Linear Induction
φ[a] ∀µ.(φ[µ] ⇒ φ[s(µ)])
∀υ.φ[υ]
Base Case
Inductive Case
Inductive HypothesisInductive Conclusion
Linear Induction
φ[a] ∀µ.(φ[µ] ⇒ φ[s(µ)])
∀υ.φ[υ]
Base Case
Inductive Case
Inductive HypothesisInductive Conclusion
Overall Conclusion
Linear Induction
Dominoes Set-up
Object constant: aUnary function constant: sTernary relation constant: falls
Dominoes Example
Object constant: aUnary function constant: sTernary relation constant: falls
Axioms:falls(a)
∀x.(falls(x) ⇒ falls(s(x))
Dominoes Example
Object constant: aUnary function constant: sTernary relation constant: falls
Axioms:falls(a)
∀x.(falls(x) ⇒ falls(s(x)))
Goal:∀x.falls(x)
Dominoes Example
1. falls(a) Premise
2. ∀x.(falls(x) ⇒ falls(s(x))) Premise
3. ∀x.falls(x) Ind: 1, 2
Dominoes Proof
Object constant: 0Unary function constant: sTernary relation constant: plus
Arithmetic ExampleArithmetic
Object constant: 0Unary function constant: sTernary relation constant: plus
Axioms of Arithmetic:∀y.plus(0,y,y)
∀x.∀y.∀z.(plus(x,y,z) ⇒ plus(s(x),y,s(z))
Arithmetic ExampleArithmetic Example
Object constant: 0Unary function constant: sTernary relation constant: plus
Axioms of Arithmetic:∀y.plus(0,y,y)
∀x.∀y.∀z.(plus(x,y,z) ⇒ plus(s(x),y,s(z))
Goal:∀x.plus(x,0,x)
Arithmetic Example
1. ∀y.plus(0,y,y) Premise
2. ∀x.∀y.∀z.(plus(x,y,z) ⇒ plus(s(x),y,s(z)) Premise
Arithmetic Proof
1. ∀y.plus(0,y,y) Premise
2. ∀x.∀y.∀z.(plus(x,y,z) ⇒ plus(s(x),y,s(z)) Premise
3. plus(0,0,0) UE: 1
Arithmetic Proof
Arithmetic Proof1. ∀y.plus(0,y,y) Premise
2. ∀x.∀y.∀z.(plus(x,y,z) ⇒ plus(s(x),y,s(z)) Premise
3. plus(0,0,0) UE: 1
4. plus(x,0,x) Assumption
Arithmetic Proof
Arithmetic Proof1. ∀y.plus(0,y,y) Premise
2. ∀x.∀y.∀z.(plus(x,y,z) ⇒ plus(s(x),y,s(z)) Premise
3. plus(0,0,0) UE: 1
4. plus(x,0,x) Assumption
5. plus(x,0,x) ⇒ plus(s(x),0,s(x)) 3 x UE: 2
Arithmetic Proof
Arithmetic Proof1. ∀y.plus(0,y,y) Premise
2. ∀x.∀y.∀z.(plus(x,y,z) ⇒ plus(s(x),y,s(z)) Premise
3. plus(0,0,0) UE: 1
4. plus(x,0,x) Assumption
5. plus(x,0,x) ⇒ plus(s(x),0,s(x)) 3 x UE: 2
6. plus(s(x),0,s(x)) IE: 2, 4
Arithmetic Proof
1. ∀y.plus(0,y,y) Premise
2. ∀x.∀y.∀z.(plus(x,y,z) ⇒ plus(s(x),y,s(z)) Premise
3. plus(0,0,0) UE: 1
4. plus(x,0,x) Assumption
5. plus(x,0,x) ⇒ plus(s(x),0,s(x)) 3 x UE: 2
6. plus(s(x),0,s(x)) IE: 2, 4
7. plus(x,0,x) ⇒ plus(s(x),0,s(x)) II: 4, 6
Arithmetic Proof
1. ∀y.plus(0,y,y) Premise
2. ∀x.∀y.∀z.(plus(x,y,z) ⇒ plus(s(x),y,s(z)) Premise
3. plus(0,0,0) UE: 1
4. plus(x,0,x) Assumption
5. plus(x,0,x) ⇒ plus(s(x),0,s(x)) 3 x UE: 2
6. plus(s(x),0,s(x)) IE: 2, 4
7. plus(x,0,x) ⇒ plus(s(x),0,s(x)) II: 4, 6
8. ∀x.plus(x,0,x) ⇒ plus(s(x),0,s(x)) UI: 7
Arithmetic Proof
1. ∀y.plus(0,y,y) Premise
2. ∀x.∀y.∀z.(plus(x,y,z) ⇒ plus(s(x),y,s(z)) Premise
3. plus(0,0,0) UE: 1
4. plus(x,0,x) Assumption
5. plus(x,0,x) ⇒ plus(s(x),0,s(x)) 3 x UE: 2
6. plus(s(x),0,s(x)) IE: 2, 4
7. plus(x,0,x) ⇒ plus(s(x),0,s(x)) II: 4, 6
8. ∀x.plus(x,0,x) ⇒ plus(s(x),0,s(x)) UI: 7
9. ∀x.plus(x,0,x) Ind: 3, 8
Arithmetic Proof
Tree Induction
Tree-Like World:a
f(a) g(a)
f(f(a)) g(f(a)) f(g(a)) g(g(a))
Languages like this are called tree languages.
Tree Languages
φ[a] ∀µ.(φ[µ] ⇒ φ[f(µ)]) ∀µ.(φ[µ] ⇒ φ[g(µ)])
∀υ.φ[υ]
Tree Induction
Object constant: rexUnary function constants: f, gUnary relation constant: p
Canine Ancestry Example
Object constant: rexUnary function constants: f, gUnary relation constant: p
Axiom:
∀x.(p(x) ⇔ p(f(x)) ∧ p(g(x)))
Canine Ancestry Example
Object constant: rexUnary function constants: f, gUnary relation constant: p
Axioms:p(rex)
∀x.(p(x) ⇔ p(f(x)) ∧ p(g(x)))
Goal:∀x.p(x)
Canine Ancestry ExampleCanine Ancestry Example
1. p(rex) Premise
2. ∀x.(p(x) ⇔ p(f(x)) ∧ p(g(x))) Premise
Canine Ancestry Proof
1. p(rex) Premise
2. ∀x.(p(x) ⇔ p(f(x)) ∧ p(g(x))) Premise
3. p(x) ⇔ p(f(x)) ∧ p(g(x)) UE: 2
4. p(x) ⇒ p(f(x)) ∧ p(g(x)) BE: 3
Canine Ancestry Proof
1. p(rex) Premise
2. ∀x.(p(x) ⇔ p(f(x)) ∧ p(g(x))) Premise
3. p(x) ⇔ p(f(x)) ∧ p(g(x)) UE: 2
4. p(x) ⇒ p(f(x)) ∧ p(g(x)) BE: 3
5. p(x) Assumption
Canine Ancestry Proof
1. p(rex) Premise
2. ∀x.(p(x) ⇔ p(f(x)) ∧ p(g(x))) Premise
3. p(x) ⇔ p(f(x)) ∧ p(g(x)) UE: 2
4. p(x) ⇒ p(f(x)) ∧ p(g(x)) BE: 3
5. p(x) Assumption
6. p(f(x)) ∧ p(g(x)) IE: 4, 5
Canine Ancestry Proof
1. p(rex) Premise
2. ∀x.(p(x) ⇔ p(f(x)) ∧ p(g(x))) Premise
3. p(x) ⇔ p(f(x)) ∧ p(g(x)) UE: 2
4. p(x) ⇒ p(f(x)) ∧ p(g(x)) BE: 3
5. p(x) Assumption
6. p(f(x)) ∧ p(g(x)) IE: 4, 5
7. p(f(x)) AE: 6
Canine Ancestry Proof
1. p(rex) Premise
2. ∀x.(p(x) ⇔ p(f(x)) ∧ p(g(x))) Premise
3. p(x) ⇔ p(f(x)) ∧ p(g(x)) UE: 2
4. p(x) ⇒ p(f(x)) ∧ p(g(x)) BE: 3
5. p(x) Assumption
6. p(f(x)) ∧ p(g(x)) IE: 4, 5
7. p(f(x)) AE: 6
8. p(x) ⇒ p(f(x)) II: 5, 7
9. ∀x.(p(x) ⇒ p(f(x))) UI: 8
Canine Ancestry Proof
1. p(rex) Premise
2. ∀x.(p(x) ⇔ p(f(x)) ∧ p(g(x))) Premise
3. p(x) ⇔ p(f(x)) ∧ p(g(x)) UE: 2
4. p(x) ⇒ p(f(x)) ∧ p(g(x)) BE: 3
…
9. ∀x.(p(x) ⇒ p(f(x))) UI: 8
…
14. ∀x.(p(x) ⇒ p(g(x))) UI: 13
15. ∀x.p(x) Ind: 1, 9, 14
Canine Ancestry Proof
1. p(rex) Premise
2. ∀x.(p(x) ⇔ p(f(x)) ∧ p(g(x))) Premise
3. p(x) ⇔ p(f(x)) ∧ p(g(x)) UE: 2
4. p(x) ⇒ p(f(x)) ∧ p(g(x)) BE: 3
…
9. ∀x.(p(x) ⇒ p(f(x))) UI: 8
…
14. ∀x.(p(x) ⇒ p(g(x))) UI: 13
15. ∀x.p(x) Ind: 1, 9, 14
Canine Ancestry Proof
Structural Induction
Object constant: a, bBinary function constant: c
Sample Terms
a, c(a,a), c(a,b), c(b,a), c(b,b), c(a,c(a,a)), …
General Languages
φ[a]∀λ.∀µ.(φ[λ] ∧ φ[µ] ⇒ φ[c(λ,µ)])
∀υ.φ[υ]
Structural Induction
Chemistry Set-up
Demonstration
Object constant: 1, 2Unary function constants: cUnary relation constant: a, n, b
Chemistry Example
Object constant: 1, 2Unary function constants: cUnary relation constant: a, n, b
Axioms: ∀x.(a(x) ∧ a(y) ⇒ a(c(x,y))) ∀x.(b(x) ∧ b(y) ⇒ b(c(x,y))) ∀x.(a(x) ∧ n(y) ⇒ a(c(x,y))) ∀x.(b(x) ∧ n(y) ⇒ b(c(x,y))) ∀x.(n(x) ∧ a(y) ⇒ a(c(x,y))) ∀x.(n(x) ∧ b(y) ⇒ b(c(x,y)))
∀x.(n(x) ∧ n(y) ⇒ n(c(x,y)))
Chemistry Example
Object constant: 1, 2Unary function constants: cUnary relation constant: a, n, b
Axioms: ∀x.(a(x) ∧ a(y) ⇒ a(c(x,y))) ∀x.(b(x) ∧ b(y) ⇒ b(c(x,y))) ∀x.(a(x) ∧ n(y) ⇒ a(c(x,y))) ∀x.(b(x) ∧ n(y) ⇒ b(c(x,y))) ∀x.(n(x) ∧ a(y) ⇒ a(c(x,y))) ∀x.(n(x) ∧ b(y) ⇒ b(c(x,y)))
∀x.(n(x) ∧ n(y) ⇒ n(c(x,y)))a(1), a(2)
Goal:∀x.a(x)
Chemistry Example
1. a(1) Premise
2. a(2) Premise
3. ∀x.∀y.(a(x) ∧ a(y) ⇒ a(c(x,y))) Premise
Chemistry Proof
Chemistry Proof1. a(1) Premise
2. a(2) Premise
3. ∀x.∀y.(a(x) ∧ a(y) ⇒ a(c(x,y))) Premise
4. ∀x.a(x) Ind: 1, 2, 3
Chemistry Proof
Object constant: 1, 2Unary function constants: cUnary relation constant: a, n, b
Axioms: ∀x.(a(x) ∧ a(y) ⇒ a(c(x,y))) ∀x.(b(x) ∧ b(y) ⇒ b(c(x,y))) ∀x.(a(x) ∧ n(y) ⇒ a(c(x,y))) ∀x.(b(x) ∧ n(y) ⇒ b(c(x,y))) ∀x.(n(x) ∧ a(y) ⇒ a(c(x,y))) ∀x.(n(x) ∧ b(y) ⇒ b(c(x,y)))
∀x.(n(x) ∧ n(y) ⇒ n(c(x,y)))a(1), n(2)
Goal:∀x.(a(x) ∨ n(x))
Chemistry ExampleChemistry Example
1. a(1) Premise
2. a(2) Premise
3. ∀x.∀y.(a(x) ∧ a(y) ⇒ a(c(x,y))) Premise
4. ∀x.∀y.(a(x) ∧ n(y) ⇒ a(c(x,y))) Premise
5. ∀x.∀y.(n(x) ∧ a(y) ⇒ a(c(x,y))) Premise
6. ∀x.∀y.(n(x) ∧ n(y) ⇒ n(c(x,y))) Premise
Chemistry Proof
7. a(1) ∨ n(1) OI: 1
8. a(2) ∨ n(2) OI: 2
Chemistry Proof
7. a(1) ∨ n(1) OI: 1
8. a(2) ∨ n(2) OI: 2
9. (a(x) ∨ n(x)) ∧ (a(y) ∨ n(y)) Assumption
Chemistry Proof
7. a(1) ∨ n(1) OI: 1
8. a(2) ∨ n(2) OI: 2
9. (a(x) ∨ n(x)) ∧ (a(y) ∨ n(y)) Assumption
…
41. a(c(x,y)) ∨ n(c(x,y)) OE:10,25,40
Chemistry Proof
7. a(1) ∨ n(1) OI: 1
8. a(2) ∨ n(2) OI: 2
9. (a(x) ∨ n(x)) ∧ (a(y) ∨ n(y)) Assumption
…
41. a(c(x,y)) ∨ n(c(x,y)) OE:10,25,40
42. (a(x) ∨ n(x)) ∧ (a(y) ∨ n(y)) ⇒ (a(c(x,y)) ∨ n(c(x,y)))
II: 9, 41
Chemistry Proof
7. a(1) ∨ n(1) OI: 1
8. a(2) ∨ n(2) OI: 2
9. (a(x) ∨ n(x)) ∧ (a(y) ∨ n(y)) Assumption
…
41. a(c(x,y)) ∨ n(c(x,y)) OE:10,25,40
42. (a(x) ∨ n(x)) ∧ (a(y) ∨ n(y)) ⇒ (a(c(x,y)) ∨ n(c(x,y)))
II: 9, 41
43. ∀x.∀y.(a(x) ∨ n(x)) ∧ (a(y) ∨ n(y)) ⇒ (a(c(x,y)) ∨ n(c(x,y)))
2 x UI: 42
Chemistry Proof
Chemistry Proof7. a(1) ∨ n(1) OI: 1
8. a(2) ∨ n(2) OI: 2
9. (a(x) ∨ n(x)) ∧ (a(y) ∨ n(y)) Assumption
…
41. a(c(x,y)) ∨ n(c(x,y)) OE:10,25,40
42. (a(x) ∨ n(x)) ∧ (a(y) ∨ n(y)) ⇒ (a(c(x,y)) ∨ n(c(x,y)))
II: 9, 41
43. ∀x.∀y.(a(x) ∨ n(x)) ∧ (a(y) ∨ n(y)) ⇒ (a(c(x,y)) ∨ n(c(x,y)))
2 x UI: 42
44. ∀x.(a(x) ∨ n(x)) Ind: 7, 8, 43
Chemistry Proof