Logic: Lecture 5, 18 August 2015
--------------------------------
Strong completeness
If X |= A then X |- A
Compactness:
X |= A iff there exists a finite subset Y of X such that Y |= A
Assuming Compactness, Proof of Strong Completeness:
If X |= A, by compactness there is a finite subset
Y of X such that Y |= A. Let Y = {B1,B2,.., Bm}.
Verify that |= (B1 -> (B2 -> (... -> (Bm -> A))))
By (normal) completeness, |- (B1 -> (B2 -> (... -> (Bm -> A))))
Applying Deduction Theorem m times, B1,B2,...,Bm |- A.
Can also use strong completness to prove compactness:
X |= A implies X |- A.
Given a (finite) proof of A, collect formulas used in the proof
as Y.
Then Y |- A, whence Y |= A.
Finite Satisfiability:
X is satisfiable iff every finite subset Y of X is satisfiable
Assuming Finite Satisfiability, Proof of Compactness:
(<==) is trivial
(==>) For any Z,B, Z |= B iff Z + {~B} is unsatisfiable.
Suppose X |= A. Then X + {~A} is unsatisfiable. Then
there is a finite subset Y' of X + {~A} that is
unsatisfiable. Set Y = Y' - {~A}.
Clearly Y |= A, where Y is a finite subset of X.
Proof of finite satisfiability:
Koenig's lemma:
A finitely branching tree is infinite iff it has an infinite
path
Given this, to prove:
X is satisfiable iff every finite subset Y of X is satisfiable
(<==) is trivial
(==>)
Contrapositive: If X is not satisfiable, some finite subset Y
is not satisfiable.
Enumerate P = {p1, p2, ...}. Let Pi = {p1,p2,...,pi}
Construct a tree of valuations where nodes are level i are
valuations over Pi and v{j+1} is a child of vj iff they agree
on Pj. Every infinite path in the tree corresponds to a
valuation and vice versa.
A valuation v is bad if v(B) = ff for some B in X. Prune the
tree of valuations by retaining only the first bad node along
each path.
Claim: This tree is finite
If not, there is an infinite path pi with no bad nodes. The
corresponding valuation v must be such that v(B) = tt for
every B in X. This means X is satisfiable!
Given that the pruned tree is finite, it has finitely many
leaves. Each leaf is "witnessed" by some unsatisfiable B in
X. Collect the finite set of witnesses to define Y.
Exercise:
Consider an infinite graph G=(V,E) and a finite set of colours
C. A colouring of G is a function c: V -> C such that for any
edge (x,y) in E, c(x) != c(y). Show that G has a valid colouring
iff every finite subgraph of G has a valid colouring.
----------------------------------------------------------------------
First order logic
Reasoning about mathematical structures:
A set S with relations, functions defined on S
Rings, groups, graphs, linear orders, ...
Example:
A group is a set G with
a group operation + (binary function) and
a distinguished identity element 0 (constant)
We can capture properties of groups using abstract names op for
+ and e for 0
op is associative : (G1) Ax Ay Az op(op(x,y),z)) = op(x,op(y,z))
e is right identity : (G2) Ax op(x,e) = x
right inverse exists: (G3) Ax Ey op(x,y) = e
Note that the meaning of = is fixed as equality in the
underlying set.
Any set S with a binary function f and an element s that
satisfies the axioms for op and e is a group. Any group (G,+,0)
satisfies the axioms by mapping op to + and e to 0
======================================================================