Proportional Logic and First Order Logic
Proportional Logic and First Order Logic
Proportional Logic and First Order Logic
Theorem
Let A F . A is valid if and only if k A is unsatisfiable. A is
satisfiable if and only if k A is falsifiable
Proof.
Let I be an arbitrary interpretation. vI (A) = T if and only if vI
(kA) = F by the definition of the truth value of a negation.
Since I was arbitrary, A is true in all interpretations if and only if k
A is false in all interpretations, that is, iff kA is unsatisfiable.
If A is satisfiable then for some interpretation I, vI (A) = T.
By definition of the truth value of a negation, vI (kA) = F so that
k A is falsifiable.
Conversely, if vI (kA) = F then vI (A) = T.
Note
1
p
T
Truth table for the formula pq T
F
F
q
T
F
T
F
pq
T
F
T
T
Validity of (p q)(kq k p)
Proof Refer BB
Prove that (p q) k p k q is unsatisfiable.
Proof Refer BB
Logical Consequence
Definition (Logical Consequence)
Let U be a set of formulas and A a formula. A is a logical
consequence of U , denoted U A, iff every model of U is a model
of A
Example:
Let A = (pr) (kq kr). Then A is a logical consequence
of {p, k q}, denoted {p, kq} A, since A is true in all
interpretations I such that I(p) = T and I(q) = F . However,
A is not valid, since it is not true in the interpretation I0 where
I0 (p) = F , I0 (q)=T , I0 (r) = T
Theorem
Theorem
U A if and only if
Ai A.
Example:
{p, k q} (p r) (k q k r), so by Theorem, (p kq)
(p r) (k q k r)
Semantic Tableaux
Definition (Literals)
A literal is an atom or the negation of an atom. An atom is a
positive literal and the negation of an atom is a negative literal.
For any atom p, {p,kp} is a complementary pair of literals
For any formula A, {A,kA} is a complementary pair of
formulas. A is the complement of kA and kA is the
complement of A
Problems
Theorem
A set of literals is satisfiable if and only if it does not contain a
complementary pair of literals - Proof: Refer BB
SAT Solvers
Definition (SAT Solver)
A computer program that searches for a model for a propositional
formula is called a SAT Solver
Properties of Clausal Form
Definition
Let S, S be sets of clauses. S S denotes that S is satisfiable if
and only if S is satisfiable
It is important to understand that S S (S is satisfiable if
and only if S is satisfiable) does not imply that S S (S is
logically equivalent to S)
Unit-I Proposional Logic & First Order Logic
Example
Example
Example
Consider the set of clauses {p, pq,
q r,r st}. Apply DP
algorithm.
Example
Consider the set of clauses {p, pq,
q r,r st}. Apply DP
algorithm.
Step(i) According to step(i) of D.P algorithm, p is a unit
literal. Hence it must be deleted in all clauses containing p
and delete all occurrences of pc from other clauses. the
given set becomes {q,
q r,r st}
Example
Consider the set of clauses {p, pq,
q r,r st}. Apply DP
algorithm.
Step(i) According to step(i) of D.P algorithm, p is a unit
literal. Hence it must be deleted in all clauses containing p
and delete all occurrences of pc from other clauses. the
given set becomes {q,
q r,r st}
Step(ii) Like the previous step, remove q and qc . the set
becomes {r,r st}
Example
Consider the set of clauses {p, pq,
q r,r st}. Apply DP
algorithm.
Step(i) According to step(i) of D.P algorithm, p is a unit
literal. Hence it must be deleted in all clauses containing p
and delete all occurrences of pc from other clauses. the
given set becomes {q,
q r,r st}
Step(ii) Like the previous step, remove q and qc . the set
becomes {r,r st}
Step(iii) Like the previous step, remove r and its complement.
the set becomes {st}
Example
Consider the set of clauses {p, pq,
q r,r st}. Apply DP
algorithm.
Step(i) According to step(i) of D.P algorithm, p is a unit
literal. Hence it must be deleted in all clauses containing p
and delete all occurrences of pc from other clauses. the
given set becomes {q,
q r,r st}
Step(ii) Like the previous step, remove q and qc . the set
becomes {r,r st}
Step(iii) Like the previous step, remove r and its complement.
the set becomes {st}
No more rules are applicable for the set {st}, the set of
clauses is satisfiable
Unit-I Proposional Logic & First Order Logic
Hilbert System(H)
Definition (Axioms of H & Rules of Inference)
1
`(A(BA))
`(A(BC))((AB)(AC))
`(B A)(AB)
Theorem
`A A
Proof.
Refer BB
Unit-I Proposional Logic & First Order Logic
`A,`AB
`B
Prove `(AB)(B A)
Prove `(A A) A in H
Example
x
p(x,y)
p(y,x)
xA(x)
xA(x)
(a)
A(a)
A(a)
U{,(a)}
U{}
U{(a)}
U{}
xA(x)
xA(x)
(a)
A(a)
A(a)
Hilbert System
Definition (Axioms of H for the First Order Logic)
1
` xA(x)A(a)
` x(AB(x))(A xB(x))
C-Rule:
(i) U ` xA(x) (Existential Quantifier)
(i+1) U ` A(a) (C rule)
Deduction Rule:
U{A}`B
U`AB
Unit-I Proposional Logic & First Order Logic
Theorems
Theorem
`A(a) xA(x)
Proof.
Refer BB
Theorem
` x A(x) x A(x)
Proof.
Refer BB
Skolems Algorithm
Skolems Algorithm I
Input : A closed formula A of first-order logic
Output: A formula Ain clausal form such that AA
1 Rename bound variables so that no variable appears in two
quantifiers
x(p(x) q(x)) (yp(y) zq(z))
2
10
Step
Original formula
Rename bound variables
Eliminate Boolean operators
Push negation inwards
Extract quantifiers
Distribute matrix
Replace existential quantifiers
Write in clausal form
Transformation
xyp(x,y) yxp(x,y)
xyp(x,y) wzp(z,w)
xyp(x,y) wzp(z,w)
xy p(x,y) wzp(z, w)
xywz( p(x,y) p(z,w))
(no change)
xw( p(x,f(x)) p(g(x,w), w))
{{ p(x,f(x)), p(g(x,w), w)}}
Skolems Theorem
Theorem
Let A be a closed formula. Then there exists a formula A in
clausal form such that A A