CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 9- Completeness
Formalization of propositional logic (review) Axioms : A1 A2 A3 Inference rule: Given and A, write B A Proof is: A sequence of i) Hypotheses ii) Axioms iii) Results of MP A Theorem is an Expression proved from axioms and inference rules
Soundness, Completeness & Consistency Semantic World ---------- Valuation, Tautology Syntactic World ---------- Theorems, Proofs Completeness * *
Soundness Provability Truth Completeness Truth Provability
Soundness: Correctness of the System Proved entities are indeed true/valid Completeness: Power of the System True things are indeed provable
Tautology An expression ‘E’ is a tautology if V(E) = T for all valuations of constituent propositions Each ‘valuation’ is called a ‘model’.
Problem (P Q) (P Q) Semantic Proof A B P Q P Q P Q A B T F F T T T T T T T F F F F T F T F T T
To show syntactically (P Q) (P Q) i.e. [(P (Q F )) F ] [(P F ) Q]
If we can establish (P (Q F )) F , (P F ), Q F ⊢ F This is shown as Q F hypothesis (Q F ) (P (Q F )) A1
QF; hypothesis (QF)(P(QF)); A1 P(QF); MP F; MP Thus we have a proof of the line we started with
Completeness
Necessary results Statement: (pq)((~pq)q) Proof: If we can show that (pq), (~pq) |- q Or, (pq), (~pq), qF |- F Then we are done.
Proof continued 1. (pq) H1 2. (~pq) H2 3. qF H3 4. (~pq) (~qp) theorem of contraposition 5. ~qp MP, 2, 4 6. P MP, 3,5 7. q MP, 6, 1 8. F MP,7,3 QED
How to prove contraposition To show (pq)(~q~p) Proof: pq, ~q, p |- F Very obvious!
An example to illustrate the completeness proof q p(p V q) T F
Running the completeness proof For every row of the truth table set up a proof: p, ~q |- p(p V q) p, q |- p(p V q) ~p, q |- p(p V q) ~p, ~q |- p(p V q)
p, ~q |- p (p V q) i.e. p, ~q, p |- p V q p, ~q, p, ~p |- q p, ~q, p, ~p |- F |- F q |- q
p, q |- p (p V q) i.e. p, q, p, ~p |- q same as 1
~p, q |- p (p V q) ~p, q, p, ~p |- q Same as 1, since F is derived 4. ~p, ~q |- p (p V q)
Why all this? If we have shown p, q |- A and p, ~q |- A then we can show that p |- A
p |- (q A) also p |- (~q A) But (q A) ((~q A) A) is a theorem by MP twice p |- A
General Statement of the completeness proof If V(A) = T for all models then |- A
Elaborating, If P1, P2, …, Pn are constituent propositions of A and if V(A) = T for every model V(Pi) = T/F then |- A
We have a truth table with 2n rows P1 P2 P3 . . . Pn A F F F . . . F T F F F . . . T T . T T T . . . T T
If we can show P1’, P2’, …, Pn’ |- A’ For every row where Pi’ = Pi if V(Pi) = T = ~Pi if V(Pi) = F And A’ = A if V(A) = T = ~A if V(A) = F
Lemma If row has P1’, P2’, …, Pn’, A’ Then P1’, P2’, …, Pn’ |- A’
Check p q p q F F F F T F T F F T T F It is true that p’, q’ |- (p q)’ i.e., ~p, ~q |- ~(p q)
Proof of Lemma By Induction on the no. of ‘’ symbols in A Base Case: A is either Pi or F A is V(A) |- A’ F |- A F |- F F
A is Pi V(Pi) V(A) T T F F Pi |- A But |- A A is a theorem and ~Pi |- ~A which is also fine