1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee...

27
1 Propositional Logic 2

Transcript of 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee...

Page 1: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

1

Propositional Logic2

Page 2: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Double Negation

2

not-(not-A)=A

A= Ibrahim makes good coffeenot-A= Ibrahim does not make good coffee

not-(not-A)=Ibrahim makes good coffee

Page 3: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Negation of Conjunction

3

not-(A and B) = not-A or not-B

Ibrahim got A in physics AND a B in MathEither Ibrahim didn’t get A in physics or he didn’t get B in

Math• not [(Ibrahim got A in physics) AND (a B in Math)]

=(Ibrahim didn’t get A in physics) OR (he didn’t get B in Math)

=[not (Ibrahim get A in physics)] OR [not-(he get B in Math)] =not-A or not-B

Page 4: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Negation of disjunction

4

not-(A or B)=not-A and not-B

Ibrahim will either go to medicine school or become a doctor

Ibrahim will not go to medicine school and he will not become a doctor

Ibrahim will neither go to medicine school nor he will become a doctor

Page 5: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Negation

not-(A and B)= (not-A) or (not-B)

not-(A or B)= (not-A) and (not-B)

“DeMorgan’s Rules”

5

Page 6: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Negation of Conditional

6

not-(if A then B)

If I pay for dinner then you will pay for drinks

I pay for dinner but you don’t pay for drinks(I pay for dinner) AND (you don’t pay for drinks)

Not-(if A then B) = A and not B = A and not B

if A then not B

Page 7: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Negation of Conditional

7

A BT T TT F FF T TF T F

A ? BT F TT T FF F TF F F

A Not-B

T F FT T TF T FF T T

The conditional

contradictory of conditional

 

if A then not B

Page 8: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Disjunctions A or B

8

A BT T TT F FF T TF T F

A ? BT F TT T FF F TF F F

A and Not-B

T F FT T TF F FF F T

The conditional

contradictory of conditional

contradictory of conditional

=

Page 9: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Negation

not-(not-A) = A

not-(A and B) = (not-A) or (not-B)

not-(A or B) = (not-A) and (not-B)

not-(if A then B) = (A) and (not-B)

9

Contradictories of compound claims

Page 10: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Complex Statements

((P & Q) ¬ R)

Ex.:

¬((A B) ¬(B A)) 10

P Q R P&Q ¬ R ((P & Q) ¬ R)

T T T T F F

T T F T T T

T F T F F T

T F F F T T

F T T F F T

F T F F T T

F F T F F T

F F F F T T

Page 11: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Necessary and sufficient

A B If I become rich then I will be happy

“I become rich” is sufficient  to guarantee that “I’ll be happy”

“If A then B” =  “A is sufficient for B” 

11

Page 12: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Necessary and sufficient

A B If I become rich then I will be happy

“I’ll be happy” is necessary  for “I become rich”

“If A then B” =  “B is necessary for A”

relationships of necessity and relationships of sufficiency are converses of one another   

12

Page 13: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Necessary and sufficient

A is sufficient for B = If A then Bif A is true then B is guaranteed

A is necessary for B = If B then A

If not-A then not-B

“Oxygen is necessary for combustion.”“If there’s combustion then there’s oxygen.”

13

Page 14: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Necessary and sufficient

“Oxygen is necessary for combustion”“If there’s combustion then there’s oxygen.”

“If there’s no oxygen then there’s no combustion”.

“If I have a driver’s license then I passed a driver’s test.”

“Having a driver’s license is necessary for passing a driver’s test.”

=“Passing a driver’s test is necessary for having a driver’s license.”

=“Having a driver’s license is sufficient for passing a driver’s test.”

14

Page 15: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Necessary and sufficient

A is necessary for B A if B If B then A

A is sufficient for B A only if B If A then B

BICONDITIONAL

15

A is necessary and sufficient

for B

If (B then A)And

(If A then B)A if and only if B

Page 16: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

All A are B

“All humans are mortal.”  

“All whales are mammals.”

“All lawyers are decent people.”

16

“Humans are mortal”

“whales are mammals”

“lawyers are decent people.”

All A are B = A are B

Page 17: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Contradictory

The contradictory of a universal generalization is pretty straightforward “ALL A are B”

“ALL humans are mortal”

زائلون البشر كلContradictory:

“SOME humans are NOT mortal”. 

or, “Some humans are immortal.”

17

Page 18: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Examples of Contradictory

Here’s the general form: 

not-(All A are B) = Some A are not-B

Ex.:

“All dogs bark.”

Contradictory: “Some dogs don’t bark”.

“Canadians are funny.”

Contradictory: “Some Canadians are not funny.”

18

Page 19: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Some A are B

“Some dogs have long hair.”  

“Some people weigh over 200 pounds.”

“Some animals make good pets.”

19

 “some” means “at least one”

“At least one dog has long hair”, or

“There is a dog that has long hair”, or

“There exists a long-haired dog”.

Page 20: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Contradictory

The contradictory of : “Some A are B”

“Some Dogs have long hair”

is:

“No dogs have long hair”. 

Ex:

20

not-(Some A are B) = No A are B

Page 21: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

ONLY A are B

 

21

“Only dogs make good pets.”

“Only Great White sharks are dangerous.”

“Only postal employees deliver U.S. mail.”

“All good pets are dogs”.

 “All dangerous sharks are Great Whites”.

“All people who deliver U.S. mail are postal employees”.

“Only A are B” = “All B are A” 

“A only if B” = “B if A”

Page 22: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Contradictory

The contradictory of : “Only A are B ”

“only dogs make good pets”

is:

“Some good pets are not dogs”. 

Ex: “Only movie stars are rich”

“Only Starbucks makes good coffee”.22

not-(Only A are B) = Some B are not A

Page 23: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

23

A valid sentence or tautology is a sentence that is True under all interpretations, no matter what the world is actually like or how the semantics are defined. p Ú Ø p is valid.

A sentence is Satisfiable if and only if it is satisfied by at least one interpretation. We have already seen several examples of satisfiable

sentences.

An Unsatisfiable sentence or contradiction is a sentence that is False under all interpretations. The world is never like what it describes p Û Ø p is Unsatisfiable.

Validity, Satisfiability, Unsatisfiability

Page 24: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

24

Validity, Satisfiability, Unsatisfiability• In one sense, valid sentences and unsatisfiable sentences are

useless. • Valid sentences do not rule out any possible interpretations; • Unsatisfiable sentences rule out all interpretations; thus they say

nothing about the world.

• On the other hand, they are very useful in that, they serve as the basis for legal transformations that we can perform on other logical sentences.

• Note that we can easily check the validity, satisfiability, or unsatisfiability of a sentence by looking at the truth table for the propositional constants in the sentence.

Page 25: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

Ex. A truth table…

p q r p Þ q p Þ r p Þ r q (p Þ q) (p Þ r) Þ(p Þ r q)

p Þ r q (p Þ q) (p Þ r) Þ(p Þ r q)

T T T T T T T T T

T T F T F T T F T

T F T F T T T F T

T F F F F F T F T

F T T T T T T T T

F T F T T T T T T

F F T T T T T T T

F F F T T T T T T

Valid Valid

Page 26: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

26

HomeWork

Say whether each of the following sentences is valid, satisfiable,

or unsatisfiable

a. (p q) (q p)⇒ ∨ ⇒

b. p (p ¬q) q∧ ⇒ ∧

c. (p (q r)) ⇔ (p q) (p r)⇒ ∧ ⇒ ∧ ⇒

d. (p (q r)) ((p q) r)⇒ ⇒ ⇒ ∧ ⇒

e. (p q) (p ¬q)⇒ ∧ ⇒

f. (¬p ¬q) ¬(p q)∨ ⇒ ∧

g. ((¬p q) (¬q p)) (p q)⇒ ⇒ ⇒ ∧ ∨

h. (¬p q) (q (p ⇔ q))∨ ⇒ ∧

i. ((¬r ¬p ¬q) s) ⇔ (p q r s)⇒ ∧ ∨ ∨ ⇒ ∨

j. (p (q r)) ⇔ ((¬p q) (p r))∧ ⇒ ∨ ⇒ ∧

Page 27: 1 Propositional Logic 2. Double Negation 2 not-(not-A)=Anot-(not-A)=A A= Ibrahim makes good coffee not-A= Ibrahim does not make good coffee not-(not-A)=Ibrahim.

27

Thank You!