1 / 42

CS344: Introduction to Artificial Intelligence (associated lab: CS386)

CS344: Introduction to Artificial Intelligence (associated lab: CS386). Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–25, 26, 27: Soundness and Completeness Proof 6 th , 12 th , 13 th March, 2012. Soundness, Completeness & Consistency. Soundness. Semantic World ----------

kaleb
Download Presentation

CS344: Introduction to Artificial Intelligence (associated lab: CS386)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS344: Introduction to Artificial Intelligence(associated lab: CS386) Pushpak BhattacharyyaCSE Dept., IIT Bombay Lecture–25, 26, 27: Soundness and Completeness Proof 6th , 12th, 13th March, 2012

  2. Soundness, Completeness &Consistency Soundness Semantic World ---------- Valuation, Tautology Syntactic World ---------- Theorems, Proofs Completeness * *

  3. Introduce Semantics in Propositional logic Valuation Function V Definition of V V(F ) = F Where F is called ‘false’ and is one of the two symbols (T, F) Syntactic ‘false Semantic ‘false’

  4. V(F) = F V(AB) is defined through what is called the truth table V(A) V(B) V(AB) T F F T T T F F T F T T

  5. Tautology An expression ‘E’ is a tautology if V(E) = T for all valuations of constituent propositions Each ‘valuation’ is called a ‘model’.

  6. Soundness • Provability Validity • Completeness • Validity Provability

  7. Soundness:Correctness of the System • Proved entities are indeed valid • Completeness:Power of the System • Valid things are indeed provable

  8. Consistency The System should not be able to prove both P and ~P, i.e., should not be able to derive F

  9. Examine the relation between Soundness & Consistency Soundness Consistency

  10. If a System is inconsistent, i.e., can derive F , it can prove any expression to be a theorem. Because F P is a theorem

  11. If a system is Sound & Complete, it does not matter how you “Prove” or “show the validity” Take the Syntactic Path or the Semantic Path

  12. Soundness Proof Hilbert Formalization of Propositional Calculus is sound. “Whatever is provable is valid”

  13. Any statement in propositional calculus can be written as (A1(A2(A3…(AnB)…) Because, WFF F | P | (WFFWFF) Statement Given A1, A2, … ,An |- B V(B) is ‘T’ for all Vs for which V(Ai) = T

  14. Proof Case 1 B is an axiom V(B) = T by actual observation Statement is correct

  15. Case 2 B is one of Ais if V(Ai) = T, so is V(B) statement is correct

  16. Case 3 B is the result of MP on Ei & Ej Ej is Ei B Suppose V(B) = F Then either V(Ei) = F or V(Ej) = F . . . Ei . . . Ej . . . B

  17. i.e. Ei/Ej is result of MP of two expressions coming before them Thus we progressively deal with shorter and shorter proof body. Ultimately we hit an axiom/hypothesis. Hence V(B) = T Soundness proved

  18. Towards Completeness Proof

  19. Soundness:Correctness of the System • Proved entities are indeed true/valid • Completeness:Power of the System • True things are indeed provable

  20. Tautology An expression ‘E’ is a tautology if V(E) = T for all valuations of constituent propositions Each ‘valuation’ is called a ‘model’.

  21. Necessary results Statement: (pq)((~pq)q) Proof: If we can show that (pq), (~pq) |- q Or, (pq), (~pq), qF |- F Then we are done.

  22. Proof continued 1. (pq) H1 2. (~pq) H2 3. qF H3 4. (~pq) (~qp) theorem of contraposition 5. ~qp MP, 2, 4 6. P MP, 3,5 7. q MP, 6, 1 8. F MP,7,3 QED

  23. How to prove contraposition To show (pq)(~q~p) Proof: pq, ~q, p |- F Very obvious!

  24. An example to illustrate the completeness proof

  25. 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)

  26. 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

  27. p, q |- p  (p V q) i.e. p, q, p, ~p |- q same as 1

  28. ~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) Same as 1, since F is derived

  29. Why all this? If we have shown p, q |- A and p, ~q |- A then we can show that p |- A

  30. p |- (q  A) also p |- (~q  A) But (q  A)  ((~q  A)  A) is a theorem by MP twice p |- A

  31. General Statement of the completeness proof If V(A) = T for all models then |- A

  32. Elaborating, If P1, P2, …, Pn are constituent propositions of A and if V(A) = T for every model V(Pi) = T/F then |- A

  33. 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

  34. 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

  35. Lemma If row has P1’, P2’, …, Pn’, A’ Then P1’, P2’, …, Pn’ |- A’ A very critical result linking syntax with semantics

  36. Completeness Proof

  37. We have a truth table with 2n rows P1 P2 P3 . . . Pn A F FF . . . F T F FF . . . T T . . . T TT . . . T T

  38. We should 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

  39. Completeness of Propositional Calculus Statement If V(A) = T for all V, then |--A i.e. A is a theorem. Lemma: If A consists of propositions P1, P2, …, Pn then P’1, P’2, …, P’n |-- A’, where A’ = A if V(A) = true = ~A otherwise Similarly for each P’i

  40. Proof for Lemma Proof by induction on the number of ‘→’ symbols in A Basis: Number of ‘→’ symbols is zero. A is ℱ or P. This is true as, |-- (A → A) i.e. A → A is a theorem. Hypothesis: Let the lemma be true for number of ‘→’ symbols ≤ n. Induction: Let A which is B → C,contain n+1‘→’

  41. Proof of Lemma (contd.) • Induction: By hypothesis, P’1, P’2, …, P’n |-- B’ P’1, P’2, …, P’n |-- C’ If we show that B’, C’ |-- A’ (A is B → C), then the proof is complete. For this we have to show: • B, C |-- B → C True as B, C, B |-- C • B, ~C |-- ~(B → C) True since B, ~C, B → C |-- ℱ • ~B, C |-- B → C True since ~B, C, B |-- C • ~B, ~C |-- B → C True since ~B, ~C, B, C → ℱ|-- ℱ • Hence the lemma is proved.

  42. Proof of Theorem A is a tautology. There are 2n models corresponding to P1, P2, …, Pn propositions. Consider, P1, P2, …, Pn |-- A and P1, P2, …, ~Pn |-- A P1, P2, …, Pn-1 |-- Pn→ A and P1, P2, …, Pn-1 |-- ~Pn→ A RHS can be written as: |-- ((Pn → A) → ((~Pn → A) → A)) |-- (~Pn → A) → A |-- A Thus dropping the propositions progressively we show |-- A

More Related