Truth Tellers, Liars, and Propositional Logic Reading: EC 1.3 Peter - - PowerPoint PPT Presentation

truth tellers liars and propositional logic
SMART_READER_LITE
LIVE PREVIEW

Truth Tellers, Liars, and Propositional Logic Reading: EC 1.3 Peter - - PowerPoint PPT Presentation

Truth Tellers, Liars, and Propositional Logic Reading: EC 1.3 Peter J. Haas INFO 150 Fall Semester 2019 Lecture 2 1/ 16 Truth Tellers, Liars, and Propositional Logic Smullyans Island Propositional Logic Truth Tables for Formal


slide-1
SLIDE 1

Truth Tellers, Liars, and Propositional Logic

Reading: EC 1.3 Peter J. Haas INFO 150 Fall Semester 2019

Lecture 2 1/ 16

slide-2
SLIDE 2

Truth Tellers, Liars, and Propositional Logic Smullyan’s Island Propositional Logic Truth Tables for Formal Propositions Logical Equivalence The Big Honking Theorem

Lecture 2 2/ 16

slide-3
SLIDE 3

Smullyan’s Island

You meet two inhabitants of Smullyan’s Island. A says “exactly one

  • f us is lying”. B says “at least one of us is telling the truth”. Who

(if anyone) is telling the truth? Strategy: Focus on the statements, not on who said them

Lecture 2 3/ 16

slide-4
SLIDE 4

Truth Table Analysis

Notation

I p = “A is truthful” I q = “B is truthful”

Statement 1: Statement 2: p q Exactly one is lying At least one is truthful T T F T T F T T F T T T *F F F F Answer: Both A and B are liars

Lecture 2 4/ 16

slide-5
SLIDE 5

Another Smullyan’s Island Example

The statements

I A: “Exactly one of use is telling the truth” I B: “We are all lying” I C: “The other two are lying Statement 1: Statement 2: Statement 3: p q r Exactly one truthful All lying A & B lying T T T F F F T T F F F F T F T F F F *T F F T F F F T T F F F F T F T F F F F T T F T F F F F T T

Answer: A is truthful; B and C are liars

Lecture 2 5/ 16

slide-6
SLIDE 6

Inconclusive or a Paradox

Statement 1: p I am telling the truth *T T *F F Inconclusive Statement 1: p I am lying T F F T A paradox

Lecture 2 6/ 16

slide-7
SLIDE 7

Propositional Logic Notation

Definitions

Proposition: A sentence that is unambiguously true or false Propositional variable: Represents a proposition (= T or F) Formal proposition: Proposition written in formal logic notation

Lecture 2 7/ 16

slide-8
SLIDE 8

Propositional Logic Notation

Definitions

Proposition: A sentence that is unambiguously true or false Propositional variable: Represents a proposition (= T or F) Formal proposition: Proposition written in formal logic notation

Rules of formal propositions (FPs)

  • 1. Any propositional variable is an FP
  • 2. p and q are FPs ⇒ p ∧ q is an FP (p and q are true)
  • 3. p and q are FPs ⇒ p ∨ q is an FP (p or q or both are true)
  • 4. p is an FP ⇒ ¬p is an FP (not p)

Example: (p ∨ q) ∧ ¬(p ∨ q) is a formal proposition

Lecture 2 7/ 16

slide-9
SLIDE 9

Propositional Logic Notation

Definitions

Proposition: A sentence that is unambiguously true or false Propositional variable: Represents a proposition (= T or F) Formal proposition: Proposition written in formal logic notation

Rules of formal propositions (FPs)

  • 1. Any propositional variable is an FP
  • 2. p and q are FPs ⇒ p ∧ q is an FP (p and q are true)
  • 3. p and q are FPs ⇒ p ∨ q is an FP (p or q or both are true)
  • 4. p is an FP ⇒ ¬p is an FP (not p)

Example: (p ∨ q) ∧ ¬(p ∨ q) is a formal proposition Precedence: ¬ highest, then ∧, then ∨ (like −, ×, and +)

I Ex: ¬p ∧ ¬q ∨ p =

  • (¬p) ∧ (¬q)
  • ∨ p

Lecture 2 7/ 16

slide-10
SLIDE 10

Logic Notation: Examples

Example 1: p = “A is truthful” and q = “B is truthful”

I A is lying: I At least one of us is truthful: I Either B is lying or A is: I Exactly one of us is lying (exclusive or):

Example 2: e = “Sue is an English major” and j = “Sue is a Junior”

I Sue is a Junior English major: I Sue is either an English major or she is a Junior: I Sue is a Junior, but she is not an English major: I Sue is exactly one of the following: an English major or a Junior:

Lecture 2 8/ 16

tip pvq

7 p

V

7g

(

'

pry )

Vpn

  • q )

en 's

evj

j

a

Te

Len

  • j )

vcjn

  • e)
slide-11
SLIDE 11

Truth Tables for Formal Propositions

p q p ∧ q T T T T F F F T F F F F p q p ∨ q T T T T F T F T T F F F p ¬p T F F T

Lecture 2 9/ 16

slide-12
SLIDE 12

Truth Table Examples: Complex Formulas

Example 1: p ∧ ¬q p q ¬q p ∧ ¬q T T F F T F T T F T F F F F T F Example 2: (p ∨ q) ∧ ¬(p ∧ q) p q p ∧ q ¬(p ∧ q) p ∨ q (p ∨ q) ∧ ¬(p ∧ q) T T T F F T F F

Lecture 2 10/ 16

T

f T

f

f T T

T

F T T

T

F T

F f

slide-13
SLIDE 13

Negation and Inequalities

Example

I p = “Tammy has more than two children” I ¬p =: I If c = number of children, then, mathematically, p =

Lecture 2 11/ 16

Tammy has

two

  • r

fewer

children

C

>

2

slide-14
SLIDE 14

Negation and Logical Equivalence

Definition

Two statements are logically equivalent if they have the same truth value for for every row of the truth table Example: Sue is neither an English major nor a Junior j e j ∨ e ¬(j ∨ e) T T T F F T F F j e ¬j ¬e ¬j ∧ ¬e T T T F F T F F

Lecture 2 12/ 16 T

f

if

f f T

f

f

T

f

T

F

T f

f F T

T

T T

4-

the

same

#

slide-15
SLIDE 15

DeMorgan’s Laws and Negation

Proposition (DeMorgan’s Laws) Let p and q be any propositions. Then

  • 1. ¬(p ∨ q) is logically equivalent to ¬p ∧ ¬q
  • 2. ¬(p ∧ q) is logically equivalent to ¬p ∨ ¬q

Proof: Via truth tables Example 1: I “Sue is not both a Junior and an English major”: ¬(j ∧ e) I Use DeMorgan’s laws to given an equivalent statement: Example 2: “John got a B’ on the test” = (g ≥ 80) ∧ (g < 90) [where g = Johns score] I Write the negation in math and English:

Lecture 2 13/ 16

7 j

v

  • e

Sue

is

not

a

Junior

  • ur

Sue

is

not

an

English major 71cg ?

so ) rig

ago ))

=

t ( g

380

)

V

7 ( g

290 )

=

Cg

e

80 )

V

( g >

go )

John

got less

than B

  • r

greater

than B

slide-16
SLIDE 16

Tautology and Contradiction

Definition

  • 1. A tautology is a proposition where every row of the truth table is true
  • 2. A contradiction is a proposition where every row of the truth table is false

p q ¬p ¬q p ∨ ¬q ¬p ∨ q (p ∨ ¬q) ∨ (¬p ∨ q) T T T F F T F F p ¬p p ∧ ¬p T F T F F T F T

Lecture 2 14/ 16

+

to

f F

T T T f

T T

f

T

T F

F T

T

T T

T T

T

I

f

f

f

slide-17
SLIDE 17

The Big Honking Theorem (BHT) of Propositions

Theorem Let p, q and r stand for any propositions. Let t indicate a tautology and c indicate a

  • contradiction. Then:

(a) Commutive p ∧ q ≡ q ∧ p p ∨ q ≡ q ∨ p (b) Associative (p ∧ q) ∧ r ≡ p ∧ (q ∧ r) (p ∨ q) ∨ r ≡ p ∨ (q ∨ r) (c) Distributive p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r) p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r) (d) Identity p ∧ t ≡ p p ∨ c ≡ p (e) Negation p ∨ ¬p ≡ t p ∧ ¬p ≡ c (f) Double negative ¬(¬p) ≡ p (g) Idempotent p ∧ p ≡ p p ∨ p ≡ p (h) DeMorgan’s laws ¬(p ∧ q) ≡ ¬p ∨ ¬q ¬(p ∨ q) ≡ ¬p ∧ ¬q (i) Universal bound p ∨ t ≡ t p ∧ c ≡ c (j) Absorption p ∧ (p ∨ q) ≡ p p ∨ (p ∧ q) ≡ p (k) Negations of t and c ¬t ≡ c ¬c ≡ t Does this look familiar? Substitution Rule: You can replace a formula with a logically equivalent one

Lecture 2 15/ 16

similar

to

algebra,

with

he

X

,

V

it

,

6

it

,

c = o

( Not identical

,

  • c. g. ,

It

venson

  • f distributive

law )

slide-18
SLIDE 18

Proving Logical Equivalences

Ex: Use BHT plus substitution to prove that p ∨ (¬p ∧ q) ≡ p ∨ q p ∨ (¬p ∧ q) = (p ∨ ¬p) ∧ (p ∨ q) (c) Distributive = t ∧ (p ∨ q) (e) Negation = (p ∨ q) ∧ t (a) Commutative = p ∨ q (d) Identity

Lecture 2 16/ 16