This preview shows pages 1–6. Sign up to view the full content.
Lecture 3
Inductively Defined Sets and
Definition by Recursion
Review
Inductively defined sets are generated from operations on base elements.
Examples:
n
:
•
Natural numbersgenerated
:
from 0 by operation of ‘_ + 1’
1
0
•
PROP
 generated from propositional
(
(p
1
ˮ
p
3
)
p
8
)
symbols and
by operations of
˭
,
ˮ
,
±
¬
±
²
p
1
ˮ
p
3
)
p
8
p
1
p
3
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document Lecture 3
Inductively Defined Sets and
Definition by Recursion
Review
Inductively defined sets are generated from operations on base elements.
We prove that a property holds of an inductive set by showing that
1)
it holds of the base elements (base case).
2)
if holds of given elements, then it holds of all elements that can be
generated from them (inductive step).
This is mathematical induction.
The topic for today is
definition by recursion
.
It is a way to define a
function on an inductively defined set.
But before getting to it, we’ll talk a little more about inductive proofs about
PROP
.
Mathematical induction with
PROP
Claim
:
all members of
PROP
have an even number of brackets.
Proof
:
Base case
Both p
i
and
have 0 brackets.
0 is an even number. So p
i
and
have an even number of brackets.
Inductive step
Case (
φ
˭
ψ
)
.
Assume for the inductive hypothesis that arbitrary
propositions
φ
and
ψ
have an even number of brackets.
Suppose in
particular that
φ
has 2n brackets, and
ψ
has 2m brackets.
Then (
φ
˭
ψ
) has 2 + 2n + 2m = 2(1 + n + m) brackets.
Thus (
φ
˭
ψ
)
has an even number of brackets.
A similar argument works for the
cases (
φ
˭
ψ
), (
φ
ˮ
ψ
), (
φ
ψ
) and (
φ
ψ
).
Case (
¬
φ
).
Assume for the inductive hypothesis that
φ
has an even
number of brackets—i.e. assume it has 2n brackets.
Then (
φ
) has
2 + 2n = 2(1 +n) number of brackets—i.e. an even number of brackets.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document Mathematical induction with
PROP
Claim
:
all members of
PROP
.
Proof
:
Base case
Both p
i
and
have 0 brackets.
0 is an even number. So p
i
and
.
Inductive step
Case (
φ
˭
ψ
)
.
Assume for the inductive hypothesis that arbitrary
propositions
φ
and
ψ
have an even number of brackets
.
Suppose in
particular that
φ
has 2n brackets, and
ψ
has 2m brackets.
Then (
φ
˭
ψ
) has 2 + 2n + 2m = 2(1 + n + m) brackets.
Thus (
φ
˭
ψ
)
.
A similar argument works for the
cases (
φ
˭
ψ
), (
φ
ˮ
ψ
), (
φ
ψ
) and (
φ
ψ
).
Case (
¬
φ
).
Assume for the inductive hypothesis that
φ
has an even
number of brackets
—i.e. assume it has 2n brackets.
Then (
φ
) has
2 + 2n = 2(1 +n) number of brackets—i.e.
.
PROP
Claim
:
.
Proof
:
Base case
.
Inductive step
Case (
φ
˭
ψ
)
.
Assume for the inductive hypothesis that arbitrary
propositions
φ
and
ψ
have an even number of brackets
.
Case (
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This document was uploaded on 02/08/2011.
 Winter '09

Click to edit the document details