25
Introduction to Proofs - Logical Equivalence Prof Mike Pawliuk UTM May 14, 2020 Slides available at: mikepawliuk.ca This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Canada License. Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 1/8

Introduction to Proofs - Logical Equivalence

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Introduction to Proofs - Logical Equivalence

Prof Mike Pawliuk

UTM

May 14, 2020

Slides available at: mikepawliuk.ca

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Canada License.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 1 / 8

Learning Objectives (for this video)

By the end of this video, participants should be able to:

1 Show that two formulas are logically equivalent.

2 Prove that a statement is a tautology or a contradiction.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 2 / 8

Motivation

Motivation

There are usually many ways to express the same thing. We want to knowwhen two things are expressing the same (mathematical) information.

Definition

Let A and B be two mathematical statements made up of P and Q (andlogical connectives). We say that A and B are logically equivalent if A andB have the same truth values for all choices of P and Q.

Example 1. P is logically equivalent to ¬(¬P).Proof.

P ¬P ¬(¬P)

T

F T

F

T F

Column 1 (the truth values of P) and column 3 (the truth values of ¬¬P)are identical, therefore P and ¬¬P are logically equivalent by definition.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 3 / 8

Motivation

Motivation

There are usually many ways to express the same thing. We want to knowwhen two things are expressing the same (mathematical) information.

Definition

Let A and B be two mathematical statements made up of P and Q (andlogical connectives). We say that A and B are logically equivalent if A andB have the same truth values for all choices of P and Q.

Example 1. P is logically equivalent to ¬(¬P).Proof.

P ¬P ¬(¬P)

T

F T

F

T F

Column 1 (the truth values of P) and column 3 (the truth values of ¬¬P)are identical, therefore P and ¬¬P are logically equivalent by definition.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 3 / 8

Motivation

Motivation

There are usually many ways to express the same thing. We want to knowwhen two things are expressing the same (mathematical) information.

Definition

Let A and B be two mathematical statements made up of P and Q (andlogical connectives). We say that A and B are logically equivalent if A andB have the same truth values for all choices of P and Q.

Example 1. P is logically equivalent to ¬(¬P).Proof.

P ¬P ¬(¬P)

T F

T

F T

F

Column 1 (the truth values of P) and column 3 (the truth values of ¬¬P)are identical, therefore P and ¬¬P are logically equivalent by definition.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 3 / 8

Motivation

Motivation

There are usually many ways to express the same thing. We want to knowwhen two things are expressing the same (mathematical) information.

Definition

Let A and B be two mathematical statements made up of P and Q (andlogical connectives). We say that A and B are logically equivalent if A andB have the same truth values for all choices of P and Q.

Example 1. P is logically equivalent to ¬(¬P).Proof.

P ¬P ¬(¬P)

T F T

F T F

Column 1 (the truth values of P) and column 3 (the truth values of ¬¬P)are identical, therefore P and ¬¬P are logically equivalent by definition.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 3 / 8

Motivation

Motivation

There are usually many ways to express the same thing. We want to knowwhen two things are expressing the same (mathematical) information.

Definition

Let A and B be two mathematical statements made up of P and Q (andlogical connectives). We say that A and B are logically equivalent if A andB have the same truth values for all choices of P and Q.

Example 1. P is logically equivalent to ¬(¬P).Proof.

P ¬P ¬(¬P)

T F T

F T F

Column 1 (the truth values of P) and column 3 (the truth values of ¬¬P)are identical, therefore P and ¬¬P are logically equivalent by definition.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 3 / 8

Example 2

Example 2. P =⇒ Q is logically equivalent to (¬Q) =⇒ (¬P).Proof.

P Q P =⇒ Q ¬Q ¬P (¬Q) =⇒ (¬P)

T T

T F F T

T F

F T F F

F T

T F T T

F F

T T T T

Column 3 (the truth values of P =⇒ Q) and column 6 (the truth valuesof (¬Q) =⇒ (¬P)) are identical, therefore P =⇒ Q is logicallyequivalent to (¬Q) =⇒ (¬P).

Definition (Contrapositive)

¬Q =⇒ ¬P is called the contrapositive of P =⇒ Q.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 4 / 8

Example 2

Example 2. P =⇒ Q is logically equivalent to (¬Q) =⇒ (¬P).Proof.

P Q P =⇒ Q ¬Q ¬P (¬Q) =⇒ (¬P)

T T T

F F T

T F F

T F F

F T T

F T T

F F T

T T T

Column 3 (the truth values of P =⇒ Q) and column 6 (the truth valuesof (¬Q) =⇒ (¬P)) are identical, therefore P =⇒ Q is logicallyequivalent to (¬Q) =⇒ (¬P).

Definition (Contrapositive)

¬Q =⇒ ¬P is called the contrapositive of P =⇒ Q.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 4 / 8

Example 2

Example 2. P =⇒ Q is logically equivalent to (¬Q) =⇒ (¬P).Proof.

P Q P =⇒ Q ¬Q ¬P (¬Q) =⇒ (¬P)

T T T F

F T

T F F T

F F

F T T F

T T

F F T T

T T

Column 3 (the truth values of P =⇒ Q) and column 6 (the truth valuesof (¬Q) =⇒ (¬P)) are identical, therefore P =⇒ Q is logicallyequivalent to (¬Q) =⇒ (¬P).

Definition (Contrapositive)

¬Q =⇒ ¬P is called the contrapositive of P =⇒ Q.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 4 / 8

Example 2

Example 2. P =⇒ Q is logically equivalent to (¬Q) =⇒ (¬P).Proof.

P Q P =⇒ Q ¬Q ¬P (¬Q) =⇒ (¬P)

T T T F F

T

T F F T F

F

F T T F T

T

F F T T T

T

Column 3 (the truth values of P =⇒ Q) and column 6 (the truth valuesof (¬Q) =⇒ (¬P)) are identical, therefore P =⇒ Q is logicallyequivalent to (¬Q) =⇒ (¬P).

Definition (Contrapositive)

¬Q =⇒ ¬P is called the contrapositive of P =⇒ Q.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 4 / 8

Example 2

Example 2. P =⇒ Q is logically equivalent to (¬Q) =⇒ (¬P).Proof.

P Q P =⇒ Q ¬Q ¬P (¬Q) =⇒ (¬P)

T T T F F TT F F T F FF T T F T TF F T T T T

Column 3 (the truth values of P =⇒ Q) and column 6 (the truth valuesof (¬Q) =⇒ (¬P)) are identical, therefore P =⇒ Q is logicallyequivalent to (¬Q) =⇒ (¬P).

Definition (Contrapositive)

¬Q =⇒ ¬P is called the contrapositive of P =⇒ Q.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 4 / 8

Example 2

Example 2. P =⇒ Q is logically equivalent to (¬Q) =⇒ (¬P).Proof.

P Q P =⇒ Q ¬Q ¬P (¬Q) =⇒ (¬P)

T T T F F TT F F T F FF T T F T TF F T T T T

Column 3 (the truth values of P =⇒ Q) and column 6 (the truth valuesof (¬Q) =⇒ (¬P)) are identical, therefore P =⇒ Q is logicallyequivalent to (¬Q) =⇒ (¬P).

Definition (Contrapositive)

¬Q =⇒ ¬P is called the contrapositive of P =⇒ Q.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 4 / 8

(Non-)Example 3

(Non-)Example 3

Show that P =⇒ Q is not logically equivalent to Q =⇒ P.

Proof.

P Q P =⇒ Q Q =⇒ P

T T

T T

T F

F T

F T

T F

F F

T T

If P is true, and Q is false, then P =⇒ Q is false, but Q =⇒ P istrue.

Human example. “If it rains, then it will be wet” is not the same as “If itis wet, then it rains.”.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 5 / 8

(Non-)Example 3

(Non-)Example 3

Show that P =⇒ Q is not logically equivalent to Q =⇒ P.

Proof.

P Q P =⇒ Q Q =⇒ P

T T T

T

T F F

T

F T T

F

F F T

T

If P is true, and Q is false, then P =⇒ Q is false, but Q =⇒ P istrue.

Human example. “If it rains, then it will be wet” is not the same as “If itis wet, then it rains.”.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 5 / 8

(Non-)Example 3

(Non-)Example 3

Show that P =⇒ Q is not logically equivalent to Q =⇒ P.

Proof.

P Q P =⇒ Q Q =⇒ P

T T T T

T F F T

F T T F

F F T T

If P is true, and Q is false, then P =⇒ Q is false, but Q =⇒ P istrue.

Human example. “If it rains, then it will be wet” is not the same as “If itis wet, then it rains.”.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 5 / 8

(Non-)Example 3

(Non-)Example 3

Show that P =⇒ Q is not logically equivalent to Q =⇒ P.

Proof.

P Q P =⇒ Q Q =⇒ P

T T T T

T F F T

F T T F

F F T T

If P is true, and Q is false, then P =⇒ Q is false, but Q =⇒ P istrue.

Human example. “If it rains, then it will be wet” is not the same as “If itis wet, then it rains.”.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 5 / 8

(Non-)Example 3

(Non-)Example 3

Show that P =⇒ Q is not logically equivalent to Q =⇒ P.

Proof.

P Q P =⇒ Q Q =⇒ P

T T T T

T F F T

F T T F

F F T T

If P is true, and Q is false, then P =⇒ Q is false, but Q =⇒ P istrue.

Human example. “If it rains, then it will be wet” is not the same as “If itis wet, then it rains.”.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 5 / 8

Tautologies and Contradictions

Exercise

Compute the truth tables of the statements P ∧ (¬P), and P ∨ (¬P).

P ¬P P ∧ ¬P P ∨ (¬P)

T F

F T

F T

F T

Since P ∧ ¬P is always false, it is called a contradiction. Since P ∨ ¬P isalways true, it is called a tautology.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 6 / 8

Tautologies and Contradictions

Exercise

Compute the truth tables of the statements P ∧ (¬P), and P ∨ (¬P).

P ¬P P ∧ ¬P P ∨ (¬P)

T F

F T

F T

F T

Since P ∧ ¬P is always false, it is called a contradiction. Since P ∨ ¬P isalways true, it is called a tautology.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 6 / 8

Tautologies and Contradictions

Exercise

Compute the truth tables of the statements P ∧ (¬P), and P ∨ (¬P).

P ¬P P ∧ ¬P P ∨ (¬P)

T F F

T

F T F

T

Since P ∧ ¬P is always false, it is called a contradiction. Since P ∨ ¬P isalways true, it is called a tautology.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 6 / 8

Tautologies and Contradictions

Exercise

Compute the truth tables of the statements P ∧ (¬P), and P ∨ (¬P).

P ¬P P ∧ ¬P P ∨ (¬P)

T F F TF T F T

Since P ∧ ¬P is always false, it is called a contradiction. Since P ∨ ¬P isalways true, it is called a tautology.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 6 / 8

Tautologies and Contradictions

Exercise

Compute the truth tables of the statements P ∧ (¬P), and P ∨ (¬P).

P ¬P P ∧ ¬P P ∨ (¬P)

T F F TF T F T

Since P ∧ ¬P is always false, it is called a contradiction. Since P ∨ ¬P isalways true, it is called a tautology.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 6 / 8

Exercises

Are the following statements contradictions, tautologies, or neither?

1 P =⇒ P

2 P =⇒ ¬P3 ((¬Q) ∨ Q) =⇒ ((¬Q) ∧ Q)

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 7 / 8

Reflection

Why might someone prefer to use the contrapositive of animplication, instead of the original implication?

What happens when you take the contrapositive of thecontrapositive?

Construct your own tautology and contradiction.

Do we need brackets when referring to (P =⇒ Q) =⇒ R, or is thisthe same as P =⇒ (Q =⇒ R)?

In English, why would someone say “ I’m not not eating cookies rightnow”, instead of “I’m eating cookies right now”.

Prof Mike Pawliuk (UTM) Intro to Proofs May 14, 2020 8 / 8