CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus
description
Transcript of CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus
![Page 1: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/1.jpg)
CT214 – Logical Foundations of ComputingCT214 – Logical Foundations of Computing
Lecture 4Lecture 4
Propositional CalculusPropositional Calculus
![Page 2: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/2.jpg)
1. Deduction Theorem
Also known as “Conditional proof”
Used to deduce proofs in a given theory
2. Reductio Ad Absurdum
Means “Reduction to the absurd”
Also known as “Indirect proof” or “Proof by contradiction”
![Page 3: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/3.jpg)
Definition:
If the logical expression B can be derived from the premises P1, P2, P3, …, PN, then the logical expression PN -> B can be derived from P1,
P2, P3, …, PN-1
If P1, P2, P3, …, PN B
Then
P1, P2, P3, …, PN-1 PN -> B
![Page 4: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/4.jpg)
If P1, P2, P3, …, PN B
Then
P1, P2, P3, …, PN-1 PN -> B
To prove PN -> B, assume PN and prove B.
![Page 5: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/5.jpg)
Example: (1) P -> Q
(2) R -> S ¬Q -> S
(3) P v R
To prove ¬Q -> S, assume ¬Q and prove S.
(1) P -> Q
(2) R -> S S
(3) P v R
(4) ¬Q
![Page 6: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/6.jpg)
Example: (1) P -> Q
(2) R -> S S
(3) P v R
(4) ¬Q
Answer: P -> Q, ¬Q (1 + 4)
¬P Modus Tollens (5)
P v R, ¬P (3 + 5)
![Page 7: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/7.jpg)
P v R, ¬P (3 + 5)
R Disjunctive Syllogism (6)
R -> S, R (2 + 6)
S Modus Ponens
![Page 8: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/8.jpg)
Definition:
If the logical expression B can be derived from the premises P1, P2, P3, …, PN, then the
compliment of B together with the premises P1, P2, P3, …, PN can be used to prove a
contradiction.
If P1, P2, P3, …, PN, ¬B S And
P1, P2, P3, …, PN, ¬B ¬S
Then
P1, P2, P3, …, PN B
![Page 9: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/9.jpg)
If P1, P2, P3, …, PN, ¬B S And
P1, P2, P3, …, PN, ¬B ¬S
Then
P1, P2, P3, …, PN B
To prove B, assume ¬B and prove a contradiction.
![Page 10: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/10.jpg)
Example: (1) P -> Q
(2) R -> S ¬Q -> S
(3) P v R
To prove ¬Q -> S, assume ¬(¬Q -> S) and prove contradiction.
(1) P -> Q
(2) R -> S False
(3) P v R
(4) ¬(¬Q -> S)
![Page 11: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/11.jpg)
Example: (1) P -> Q
(2) R -> S False
(3) P v R
(4) ¬(¬Q -> S)
Answer: ¬(¬Q -> S) (4)
¬(¬¬Q v S) Definition
¬(Q v S) Double Negative
![Page 12: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/12.jpg)
¬(Q v S) Double Negative
¬Q ^ ¬S De Morgan (5)
¬Q Simplification (6)
¬Q ^ ¬S (5)
¬S Simplification (7)
P -> Q, ¬Q (1 + 6)
¬P Modus Tollens (8)
P v R, ¬P (3 + 8)
![Page 13: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/13.jpg)
P v R, ¬P (3 + 8)
R Disjunctive Syllogism (9)
R -> S, R (2 + 9)
S Modus Ponens (10)
S, ¬S (10 + 7)
S ^ ¬S Conjunction
F Compliment
![Page 14: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/14.jpg)
Prove the validity of a statement made in natural language by converting the natural language statements to logical expressions.
For example: Determine the validity of:
“Liverpool will win the premiership if Torres doesn’t get injured. If Ronaldo gets injured, Man United will finish third. Torres and Ronaldo both get injured. Therefore, Liverpool don’t win the premiership and Man United finish third.”
![Page 15: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/15.jpg)
“Liverpool will win the premiership if Torres doesn’t get injured. If Ronaldo gets injured, Man United will finish third. Torres and Ronaldo both get injured. Therefore, Liverpool don’t win the premiership and Man United finish third.”
Liverpool will win the premiership L
Torres doesn’t get injured ¬T
Ronaldo gets injured R
Man united finish third M
![Page 16: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/16.jpg)
“Liverpool will win the premiership if Torres doesn’t get injured. If Ronaldo gets injured, Man United will finish third. Torres and Ronaldo both get injured. Therefore, Liverpool don’t win the premiership and Man United finish third.”
(1) L -> ¬T
(2) R -> M ¬L ^ M
(3) T ^ R
![Page 17: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/17.jpg)
(1) L -> ¬T
(2) R -> M ¬L ^ M
(3) T ^ R
Answer: T ^ R (3)
T Simplification (4)
T ^ R (3)
R Simplification (5)
![Page 18: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/18.jpg)
L -> ¬T, T (1 + 4)
¬L Modus Tollens (6)
R -> M, R (2 + 5)
M Modus Ponens (7)
¬L, M (6 + 7)
¬L ^ M Conjunction
![Page 19: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/19.jpg)
(1) L -> ¬T
(2) R -> M ¬L ^ M
(3) T ^ R
Assume ¬(¬L ^ M) and prove a contradiction
(1) L -> ¬T
(2) R -> M False
(3) T ^ R
(4) ¬(¬L ^ M)
![Page 20: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/20.jpg)
(1) L -> ¬T
(2) R -> M False
(3) T ^ R
(4) ¬(¬L ^ M)
Answer: ¬(¬L ^ M) (4)
¬¬L v ¬M De Morgan
L v ¬M Double Negative(5)
![Page 21: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/21.jpg)
T ^ R (3)
T Simplification (6)
T ^ R (3)
R Simplification (7)
L -> ¬T, T (1 + 6)
¬L Modus Tollens (8)
R -> M, R (2 + 7)
M Modus Ponens (9)
![Page 22: CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus](https://reader036.fdocuments.in/reader036/viewer/2022062517/56813c7c550346895da61b0a/html5/thumbnails/22.jpg)
L v ¬M, ¬L (5 + 8)
¬M Disjunctive Syllogism (10)
¬M, M (10 + 9)
¬M ^ M Conjunction
F Compliment