CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus

Post on 06-Jan-2016

20 views 0 download

Tags:

description

CT214 – Logical Foundations of Computing Lecture 4 Propositional Calculus. Proof Methods. Deduction Theorem Also known as “Conditional proof” Used to deduce proofs in a given theory Reductio Ad Absurdum Means “Reduction to the absurd” - PowerPoint PPT Presentation

transcript

CT214 – Logical Foundations of ComputingCT214 – Logical Foundations of Computing

Lecture 4Lecture 4

Propositional CalculusPropositional Calculus

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”

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

If P1, P2, P3, …, PN B

Then

P1, P2, P3, …, PN-1 PN -> B

To prove PN -> B, assume PN and prove B.

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

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)

P v R, ¬P (3 + 5)

R Disjunctive Syllogism (6)

R -> S, R (2 + 6)

S Modus Ponens

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

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.

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)

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

¬(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)

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

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

“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

“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

(1) L -> ¬T

(2) R -> M ¬L ^ M

(3) T ^ R

Answer: T ^ R (3)

T Simplification (4)

T ^ R (3)

R Simplification (5)

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

(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)

(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)

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)

L v ¬M, ¬L (5 + 8)

¬M Disjunctive Syllogism (10)

¬M, M (10 + 9)

¬M ^ M Conjunction

F Compliment