Part IA Michaelmas, Lent Term
Derivations and Derivation Trees
Derivations
Definition
A derivation (or proof) that is a finite tree where:
- The root is labelled
- Each node is the conclusion of a rule whose premises are its children
- Each leaf is an axiom
Intuition
A derivation shows how can be built by applying rules starting from axioms.
Derivation Trees
Structure
v
/|\
/ | \
u1 u2 u3
/| | \
... ... ...
- Root at top (conclusion)
- Leaves at bottom (axioms)
- Internal nodes: applications of rules
Depth and Height
- The height of a derivation is the length of the longest path from root to leaf
- The depth of a node is its distance from the root
Example: Natural Numbers
Derivation of :
S(S(0))
|
S(0)
|
0
Reading
- (axiom)
- (by successor rule from 0)
- (by successor rule from )
Example: Binary Trees
Derivation of :
Node(Leaf, Node(Leaf, Leaf))
/ \
Leaf Node(Leaf, Leaf)
/ \
Leaf Leaf
The Set of Derivable Elements
Definition
is the set of elements that have a derivation using rules .
Key Theorem
The set of derivable elements equals the smallest closed set.
Types of Rules
Axioms (0-premise rules)
Elements derived in one step.
Unary Rules (1-premise)
If derivable, so is .
Binary Rules (2-premises)
If both and derivable, so is .
n-ary Rules
Reasoning About Derivations
By Induction on Derivation Height
To prove :
- Base: Prove for every axiom
- Step: For each rule , assume and prove
This is a powerful proof technique that mirrors the structure of derivations.
Example: Balanced Strings
Rules for :
Claim: All derivable strings have equal numbers of ‘s and ‘s.
Proof by induction on derivations:
- Base: has ‘s and ‘s.
- If balances, so do and .
- If and balance, so does (sums add).
Summary
- A derivation is a finite tree with axioms at leaves and rule applications at internal nodes
- = set of elements with a derivation
- Induction on derivation height: base case for axioms, step case for each rule