discrete mathematics - propositions

202
Discrete Mathematics Propositions H. Turgut Uyar Ay¸ seg¨ ul Gen¸ cata Yayımlı Emre Harmancı 2001-2014

Upload: turgut-uyar

Post on 05-Dec-2014

21.890 views

Category:

Education


7 download

DESCRIPTION

Logical connectives, laws of logic, rules of inference.

TRANSCRIPT

Page 1: Discrete Mathematics - Propositions

Discrete MathematicsPropositions

H. Turgut Uyar Aysegul Gencata Yayımlı Emre Harmancı

2001-2014

Page 2: Discrete Mathematics - Propositions

License

© 2001-2014 T. Uyar, A. Yayımlı, E. Harmancı

You are free to:

Share – copy and redistribute the material in any medium or format

Adapt – remix, transform, and build upon the material

Under the following terms:

Attribution – You must give appropriate credit, provide a link to the license,and indicate if changes were made.

NonCommercial – You may not use the material for commercial purposes.

ShareAlike – If you remix, transform, or build upon the material, you mustdistribute your contributions under the same license as the original.

For more information:https://creativecommons.org/licenses/by-nc-sa/4.0/

Read the full license:

https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode

Page 3: Discrete Mathematics - Propositions

Topics

1 PropositionsIntroductionCompound PropositionsPropositional Logic LanguageMetalanguage

2 Propositional CalculusIntroductionLaws of LogicRules of Inference

Page 4: Discrete Mathematics - Propositions

Topics

1 PropositionsIntroductionCompound PropositionsPropositional Logic LanguageMetalanguage

2 Propositional CalculusIntroductionLaws of LogicRules of Inference

Page 5: Discrete Mathematics - Propositions

Proposition

Definition

proposition (or statement):a declarative sentence that is either true or false

law of the excluded middle:a proposition cannot be partially true or partially false

law of contradiction:a proposition cannot be both true and false

Page 6: Discrete Mathematics - Propositions

Proposition

Definition

proposition (or statement):a declarative sentence that is either true or false

law of the excluded middle:a proposition cannot be partially true or partially false

law of contradiction:a proposition cannot be both true and false

Page 7: Discrete Mathematics - Propositions

Proposition Examples

Example (propositions)

The Moon revolvesaround the Earth.

Elephants can fly.

3 + 8 = 11

Example (not propositions)

What time is it?

Exterminate!

x < 43

Page 8: Discrete Mathematics - Propositions

Proposition Examples

Example (propositions)

The Moon revolvesaround the Earth.

Elephants can fly.

3 + 8 = 11

Example (not propositions)

What time is it?

Exterminate!

x < 43

Page 9: Discrete Mathematics - Propositions

Propositional Variable

Definition

propositional variable:a name that represents the proposition

Example

p1: The Moon revolves around the Earth. (T )

p2: Elephants can fly. (F )

p3: 3 + 8 = 11 (T )

Page 10: Discrete Mathematics - Propositions

Propositional Variable

Definition

propositional variable:a name that represents the proposition

Example

p1: The Moon revolves around the Earth. (T )

p2: Elephants can fly. (F )

p3: 3 + 8 = 11 (T )

Page 11: Discrete Mathematics - Propositions

Topics

1 PropositionsIntroductionCompound PropositionsPropositional Logic LanguageMetalanguage

2 Propositional CalculusIntroductionLaws of LogicRules of Inference

Page 12: Discrete Mathematics - Propositions

Compound Propositions

compound propositions are obtained

by negating a proposition, orby combining two or more propositions using logical connectives

truth table:a table that lists the truth value of the compound propositionfor all possible values of its proposition variables

Page 13: Discrete Mathematics - Propositions

Compound Propositions

compound propositions are obtained

by negating a proposition, orby combining two or more propositions using logical connectives

truth table:a table that lists the truth value of the compound propositionfor all possible values of its proposition variables

Page 14: Discrete Mathematics - Propositions

Negation (NOT)

Table: ¬p

p ¬p

T F

F T

Example

¬p1: The Moon does not revolvearound the Earth.¬T : F

¬p2: Elephants cannot fly.¬F : T

Page 15: Discrete Mathematics - Propositions

Negation (NOT)

Table: ¬p

p ¬p

T F

F T

Example

¬p1: The Moon does not revolvearound the Earth.¬T : F

¬p2: Elephants cannot fly.¬F : T

Page 16: Discrete Mathematics - Propositions

Conjunction (AND)

Table: p ∧ q

p q p ∧ q

T T T

T F F

F T F

F F F

Example

p1 ∧ p2: The Moon revolves aroundthe Earth and elephants can fly.T ∧ F : F

Page 17: Discrete Mathematics - Propositions

Conjunction (AND)

Table: p ∧ q

p q p ∧ q

T T T

T F F

F T F

F F F

Example

p1 ∧ p2: The Moon revolves aroundthe Earth and elephants can fly.T ∧ F : F

Page 18: Discrete Mathematics - Propositions

Disjunction (OR)

Table: p ∨ q

p q p ∨ q

T T T

T F T

F T T

F F F

Example

p1 ∨ p2: The Moon revolves aroundthe Earth or elephants can fly.T ∨ F : T

Page 19: Discrete Mathematics - Propositions

Disjunction (OR)

Table: p ∨ q

p q p ∨ q

T T T

T F T

F T T

F F F

Example

p1 ∨ p2: The Moon revolves aroundthe Earth or elephants can fly.T ∨ F : T

Page 20: Discrete Mathematics - Propositions

Exclusive Disjunction (XOR)

Table: p Y q

p q p Y q

T T F

T F T

F T T

F F F

Example

p1 Y p2: Either the Moon revolvesaround the Earth or elephants can fly.T Y F : T

Page 21: Discrete Mathematics - Propositions

Exclusive Disjunction (XOR)

Table: p Y q

p q p Y q

T T F

T F T

F T T

F F F

Example

p1 Y p2: Either the Moon revolvesaround the Earth or elephants can fly.T Y F : T

Page 22: Discrete Mathematics - Propositions

Implication (IF)

Table: p → q

p q p → q

T T T

T F F

F T T

F F T

if p then q

p is sufficient for qq is necessary for p

p: hypothesis

q: conclusion

¬p ∨ q

Page 23: Discrete Mathematics - Propositions

Implication (IF)

Table: p → q

p q p → q

T T T

T F F

F T T

F F T

if p then q

p is sufficient for qq is necessary for p

p: hypothesis

q: conclusion

¬p ∨ q

Page 24: Discrete Mathematics - Propositions

Implication Examples

Example

p4: 3 < 8, p5: 3 < 14, p6: 3 < 2, p7: 8 < 6

p4 → p5:if 3 < 8, then 3 < 14T → T : T

p4 → p6:if 3 < 8, then 3 < 2T → F : F

p6 → p4:if 3 < 2, then 3 < 8F → T : T

p6 → p7:if 3 < 2, then 8 < 6F → F : T

Page 25: Discrete Mathematics - Propositions

Implication Examples

Example

p4: 3 < 8, p5: 3 < 14, p6: 3 < 2, p7: 8 < 6

p4 → p5:if 3 < 8, then 3 < 14T → T : T

p4 → p6:if 3 < 8, then 3 < 2T → F : F

p6 → p4:if 3 < 2, then 3 < 8F → T : T

p6 → p7:if 3 < 2, then 8 < 6F → F : T

Page 26: Discrete Mathematics - Propositions

Implication Examples

Example

p4: 3 < 8, p5: 3 < 14, p6: 3 < 2, p7: 8 < 6

p4 → p5:if 3 < 8, then 3 < 14T → T : T

p4 → p6:if 3 < 8, then 3 < 2T → F : F

p6 → p4:if 3 < 2, then 3 < 8F → T : T

p6 → p7:if 3 < 2, then 8 < 6F → F : T

Page 27: Discrete Mathematics - Propositions

Implication Examples

Example

p4: 3 < 8, p5: 3 < 14, p6: 3 < 2, p7: 8 < 6

p4 → p5:if 3 < 8, then 3 < 14T → T : T

p4 → p6:if 3 < 8, then 3 < 2T → F : F

p6 → p4:if 3 < 2, then 3 < 8F → T : T

p6 → p7:if 3 < 2, then 8 < 6F → F : T

Page 28: Discrete Mathematics - Propositions

Implication Examples

Example

p4: 3 < 8, p5: 3 < 14, p6: 3 < 2, p7: 8 < 6

p4 → p5:if 3 < 8, then 3 < 14T → T : T

p4 → p6:if 3 < 8, then 3 < 2T → F : F

p6 → p4:if 3 < 2, then 3 < 8F → T : T

p6 → p7:if 3 < 2, then 8 < 6F → F : T

Page 29: Discrete Mathematics - Propositions

Implication Examples

Example

”If I weigh over 70 kg, then I will exercise.”

p: I weigh over 70 kg.

q: I exercise.

when is this claim false?

Table: p → q

p q p → q

T T T

T F F

F T T

F F T

Page 30: Discrete Mathematics - Propositions

Implication Examples

Example

”If I weigh over 70 kg, then I will exercise.”

p: I weigh over 70 kg.

q: I exercise.

when is this claim false?

Table: p → q

p q p → q

T T T

T F F

F T T

F F T

Page 31: Discrete Mathematics - Propositions

Implication Examples

Example

”If I weigh over 70 kg, then I will exercise.”

p: I weigh over 70 kg.

q: I exercise.

when is this claim false?

Table: p → q

p q p → q

T T T

T F F

F T T

F F T

Page 32: Discrete Mathematics - Propositions

Biconditional (IFF)

Table: p ↔ q

p q p ↔ q

T T T

T F F

F T F

F F T

p if and only if q

p is necessary and sufficient for q

(p → q) ∧ (q → p)

¬(p Y q)

Page 33: Discrete Mathematics - Propositions

Biconditional (IFF)

Table: p ↔ q

p q p ↔ q

T T T

T F F

F T F

F F T

p if and only if q

p is necessary and sufficient for q

(p → q) ∧ (q → p)

¬(p Y q)

Page 34: Discrete Mathematics - Propositions

Example

Example

The parent tells the child:”If you do your homework, you can play computer games.”

s: The child does her homework.

t: The child plays computer games.

what does the parent mean?

s → t

¬s → ¬t

s ↔ t

Page 35: Discrete Mathematics - Propositions

Example

Example

The parent tells the child:”If you do your homework, you can play computer games.”

s: The child does her homework.

t: The child plays computer games.

what does the parent mean?

s → t

¬s → ¬t

s ↔ t

Page 36: Discrete Mathematics - Propositions

Example

Example

The parent tells the child:”If you do your homework, you can play computer games.”

s: The child does her homework.

t: The child plays computer games.

what does the parent mean?

s → t

¬s → ¬t

s ↔ t

Page 37: Discrete Mathematics - Propositions

Example

Example

The parent tells the child:”If you do your homework, you can play computer games.”

s: The child does her homework.

t: The child plays computer games.

what does the parent mean?

s → t

¬s → ¬t

s ↔ t

Page 38: Discrete Mathematics - Propositions

Example

Example

The parent tells the child:”If you do your homework, you can play computer games.”

s: The child does her homework.

t: The child plays computer games.

what does the parent mean?

s → t

¬s → ¬t

s ↔ t

Page 39: Discrete Mathematics - Propositions

Topics

1 PropositionsIntroductionCompound PropositionsPropositional Logic LanguageMetalanguage

2 Propositional CalculusIntroductionLaws of LogicRules of Inference

Page 40: Discrete Mathematics - Propositions

Propositional Logic Language

syntax

which rules will be used to form compound propositions?

a formula that obeys these rules: well-formed formula (WFF)

semantics

interpretation: calculating the value of a compound propositionby assigning values to its propositional variables

truth table: all interpretations of a proposition

Page 41: Discrete Mathematics - Propositions

Propositional Logic Language

syntax

which rules will be used to form compound propositions?

a formula that obeys these rules: well-formed formula (WFF)

semantics

interpretation: calculating the value of a compound propositionby assigning values to its propositional variables

truth table: all interpretations of a proposition

Page 42: Discrete Mathematics - Propositions

Formula Examples

Example (not well-formed)

∨p

p ∧ ¬p¬ ∧ q

Page 43: Discrete Mathematics - Propositions

Operator Precedence

1 ¬2 ∧3 ∨4 →5 ↔

parentheses are used to change the order of calculation

implication associates from the right:p → q → r means p → (q → r)

Page 44: Discrete Mathematics - Propositions

Precedence Examples

Example

s: Phyllis goes out for a walk.

t: The Moon is out.

u: It is snowing.

what do the following WFFs mean?

t ∧ ¬u → s

t → (¬u → s)

¬(s ↔ (u ∨ t))

¬s ↔ u ∨ t

Page 45: Discrete Mathematics - Propositions

Precedence Examples

Example

s: Phyllis goes out for a walk.

t: The Moon is out.

u: It is snowing.

what do the following WFFs mean?

t ∧ ¬u → s

t → (¬u → s)

¬(s ↔ (u ∨ t))

¬s ↔ u ∨ t

Page 46: Discrete Mathematics - Propositions

Precedence Examples

Example

s: Phyllis goes out for a walk.

t: The Moon is out.

u: It is snowing.

what do the following WFFs mean?

t ∧ ¬u → s

t → (¬u → s)

¬(s ↔ (u ∨ t))

¬s ↔ u ∨ t

Page 47: Discrete Mathematics - Propositions

Precedence Examples

Example

s: Phyllis goes out for a walk.

t: The Moon is out.

u: It is snowing.

what do the following WFFs mean?

t ∧ ¬u → s

t → (¬u → s)

¬(s ↔ (u ∨ t))

¬s ↔ u ∨ t

Page 48: Discrete Mathematics - Propositions

Precedence Examples

Example

s: Phyllis goes out for a walk.

t: The Moon is out.

u: It is snowing.

what do the following WFFs mean?

t ∧ ¬u → s

t → (¬u → s)

¬(s ↔ (u ∨ t))

¬s ↔ u ∨ t

Page 49: Discrete Mathematics - Propositions

Topics

1 PropositionsIntroductionCompound PropositionsPropositional Logic LanguageMetalanguage

2 Propositional CalculusIntroductionLaws of LogicRules of Inference

Page 50: Discrete Mathematics - Propositions

Metalanguage

Definition

target language:the language being worked on

Definition

metalanguage:the language used when talking about the propertiesof the target language

Page 51: Discrete Mathematics - Propositions

Metalanguage

Definition

target language:the language being worked on

Definition

metalanguage:the language used when talking about the propertiesof the target language

Page 52: Discrete Mathematics - Propositions

Metalanguage Examples

Example

a native Turkish speaker learning English

target language: Englishmetalanguage: Turkish

Example

a student learning programming

target language: C, Python, Java, . . .metalanguage: English, Turkish, . . .

Page 53: Discrete Mathematics - Propositions

Metalanguage Examples

Example

a native Turkish speaker learning English

target language: Englishmetalanguage: Turkish

Example

a student learning programming

target language: C, Python, Java, . . .metalanguage: English, Turkish, . . .

Page 54: Discrete Mathematics - Propositions

Formula Properties

a formula that is true for all interpretations is a tautology

a formula that is false for all interpretations is a contradiction

a formula that is true for some interpretations is valid

these are concepts of the metalanguage

Page 55: Discrete Mathematics - Propositions

Formula Properties

a formula that is true for all interpretations is a tautology

a formula that is false for all interpretations is a contradiction

a formula that is true for some interpretations is valid

these are concepts of the metalanguage

Page 56: Discrete Mathematics - Propositions

Tautology Example

Example

Table: p ∧ (p → q) → q

p q p → q p ∧ A B → q(A) (B)

T T T T T

T F F F T

F T T F T

F F T F T

Page 57: Discrete Mathematics - Propositions

Contradiction Example

Example

Table: p ∧ (¬p ∧ q)

p q ¬p ¬p ∧ q p ∧ A(A)

T T F F F

T F F F F

F T T T F

F F T F F

Page 58: Discrete Mathematics - Propositions

Metalogic

P1,P2, . . . ,Pn ` Q

There is a proof which infers the conclusion Qfrom the assumptions P1,P2, . . . ,Pn.

P1,P2, . . . ,Pn � Q

Q must be true if P1,P2, . . . ,Pn are all true.

Page 59: Discrete Mathematics - Propositions

Metalogic

P1,P2, . . . ,Pn ` Q

There is a proof which infers the conclusion Qfrom the assumptions P1,P2, . . . ,Pn.

P1,P2, . . . ,Pn � Q

Q must be true if P1,P2, . . . ,Pn are all true.

Page 60: Discrete Mathematics - Propositions

Formal Systems

a formal system is consistent if for all WFFs P and Q:if P ` Q then P � Q

if every provable proposition is actually true

a formal system is complete if for all WFFs P and Q:if P � Q then P ` Q

if every true proposition can be proven

Page 61: Discrete Mathematics - Propositions

Formal Systems

a formal system is consistent if for all WFFs P and Q:if P ` Q then P � Q

if every provable proposition is actually true

a formal system is complete if for all WFFs P and Q:if P � Q then P ` Q

if every true proposition can be proven

Page 62: Discrete Mathematics - Propositions

Godel’s Theorem

propositional logic is consistent and complete

Godel’s Theorem

Any logical system that is powerful enough to express arithmeticmust be either inconsistent or incomplete.

liar’s paradox: “This statement is false.”

Page 63: Discrete Mathematics - Propositions

Godel’s Theorem

propositional logic is consistent and complete

Godel’s Theorem

Any logical system that is powerful enough to express arithmeticmust be either inconsistent or incomplete.

liar’s paradox: “This statement is false.”

Page 64: Discrete Mathematics - Propositions

Godel’s Theorem

propositional logic is consistent and complete

Godel’s Theorem

Any logical system that is powerful enough to express arithmeticmust be either inconsistent or incomplete.

liar’s paradox: “This statement is false.”

Page 65: Discrete Mathematics - Propositions

Topics

1 PropositionsIntroductionCompound PropositionsPropositional Logic LanguageMetalanguage

2 Propositional CalculusIntroductionLaws of LogicRules of Inference

Page 66: Discrete Mathematics - Propositions

Propositional Calculus

1 semantic approach: truth tables

too complicated when the number of primitive statements grow

2 axiomatic approach: Boolean algebra

substituting logically equivalent formulas for one another

3 syntactic approach: rules of inference

obtaining new propositions from existing propositionsusing logical implications

Page 67: Discrete Mathematics - Propositions

Propositional Calculus

1 semantic approach: truth tables

too complicated when the number of primitive statements grow

2 axiomatic approach: Boolean algebra

substituting logically equivalent formulas for one another

3 syntactic approach: rules of inference

obtaining new propositions from existing propositionsusing logical implications

Page 68: Discrete Mathematics - Propositions

Propositional Calculus

1 semantic approach: truth tables

too complicated when the number of primitive statements grow

2 axiomatic approach: Boolean algebra

substituting logically equivalent formulas for one another

3 syntactic approach: rules of inference

obtaining new propositions from existing propositionsusing logical implications

Page 69: Discrete Mathematics - Propositions

Truth Table Example

p → qcontrapositive: ¬q → ¬pconverse: q → pinverse: ¬p → ¬q

Example

p q p → q ¬q → ¬p q → p ¬p → ¬q

T T T T T T

T F F F T T

F T T T F F

F F T T T T

an implication and its contrapositive are equivalent

the converse and the inverse of an implication are equivalent

Page 70: Discrete Mathematics - Propositions

Truth Table Example

p → qcontrapositive: ¬q → ¬pconverse: q → pinverse: ¬p → ¬q

Example

p q p → q ¬q → ¬p q → p ¬p → ¬q

T T T T T T

T F F F T T

F T T T F F

F F T T T T

an implication and its contrapositive are equivalent

the converse and the inverse of an implication are equivalent

Page 71: Discrete Mathematics - Propositions

Topics

1 PropositionsIntroductionCompound PropositionsPropositional Logic LanguageMetalanguage

2 Propositional CalculusIntroductionLaws of LogicRules of Inference

Page 72: Discrete Mathematics - Propositions

Logical Equivalence

Definition

if P ↔ Q is a tautology, then P and Q are logically equivalent:P ⇔ Q

Page 73: Discrete Mathematics - Propositions

Logical Equivalence Example

Example

¬p ⇔ p → F

Table: ¬p ↔ p → F

p ¬p p → F ¬p ↔ A(A)

T F F T

F T T T

Page 74: Discrete Mathematics - Propositions

Logical Equivalence Example

Example

p → q ⇔ ¬p ∨ q

Table: (p → q) ↔ (¬p ∨ q)

p q p → q ¬p ¬p ∨ q A ↔ B(A) (B)

T T T F T T

T F F F F T

F T T T T T

F F T T T T

Page 75: Discrete Mathematics - Propositions

Laws of Logic

Double Negation (DN)¬(¬p) ⇔ p

Commutativity (Co)p ∧ q ⇔ q ∧ p p ∨ q ⇔ q ∨ p

Associativity (As)(p ∧ q) ∧ r ⇔ p ∧ (q ∧ r) (p ∨ q) ∨ r ⇔ p ∨ (q ∨ r)

Idempotence (Ip)p ∧ p ⇔ p p ∨ p ⇔ p

Inverse (In)p ∧ ¬p ⇔ F p ∨ ¬p ⇔ T

Page 76: Discrete Mathematics - Propositions

Laws of Logic

Double Negation (DN)¬(¬p) ⇔ p

Commutativity (Co)p ∧ q ⇔ q ∧ p p ∨ q ⇔ q ∨ p

Associativity (As)(p ∧ q) ∧ r ⇔ p ∧ (q ∧ r) (p ∨ q) ∨ r ⇔ p ∨ (q ∨ r)

Idempotence (Ip)p ∧ p ⇔ p p ∨ p ⇔ p

Inverse (In)p ∧ ¬p ⇔ F p ∨ ¬p ⇔ T

Page 77: Discrete Mathematics - Propositions

Laws of Logic

Double Negation (DN)¬(¬p) ⇔ p

Commutativity (Co)p ∧ q ⇔ q ∧ p p ∨ q ⇔ q ∨ p

Associativity (As)(p ∧ q) ∧ r ⇔ p ∧ (q ∧ r) (p ∨ q) ∨ r ⇔ p ∨ (q ∨ r)

Idempotence (Ip)p ∧ p ⇔ p p ∨ p ⇔ p

Inverse (In)p ∧ ¬p ⇔ F p ∨ ¬p ⇔ T

Page 78: Discrete Mathematics - Propositions

Laws of Logic

Double Negation (DN)¬(¬p) ⇔ p

Commutativity (Co)p ∧ q ⇔ q ∧ p p ∨ q ⇔ q ∨ p

Associativity (As)(p ∧ q) ∧ r ⇔ p ∧ (q ∧ r) (p ∨ q) ∨ r ⇔ p ∨ (q ∨ r)

Idempotence (Ip)p ∧ p ⇔ p p ∨ p ⇔ p

Inverse (In)p ∧ ¬p ⇔ F p ∨ ¬p ⇔ T

Page 79: Discrete Mathematics - Propositions

Laws of Logic

Double Negation (DN)¬(¬p) ⇔ p

Commutativity (Co)p ∧ q ⇔ q ∧ p p ∨ q ⇔ q ∨ p

Associativity (As)(p ∧ q) ∧ r ⇔ p ∧ (q ∧ r) (p ∨ q) ∨ r ⇔ p ∨ (q ∨ r)

Idempotence (Ip)p ∧ p ⇔ p p ∨ p ⇔ p

Inverse (In)p ∧ ¬p ⇔ F p ∨ ¬p ⇔ T

Page 80: Discrete Mathematics - Propositions

Laws of Logic

Identity (Id)p ∧ T ⇔ p p ∨ F ⇔ p

Domination (Do)p ∧ F ⇔ F p ∨ T ⇔ T

Distributivity (Di)p ∧ (q ∨ r) ⇔ (p ∧ q) ∨ (p ∧ r) p ∨ (q ∧ r) ⇔ (p ∨ q) ∧ (p ∨ r)

Absorption (Ab)p ∧ (p ∨ q) ⇔ p p ∨ (p ∧ q) ⇔ p

DeMorgan’s Laws (DM)¬(p ∧ q) ⇔ ¬p ∨ ¬q ¬(p ∨ q) ⇔ ¬p ∧ ¬q

Page 81: Discrete Mathematics - Propositions

Laws of Logic

Identity (Id)p ∧ T ⇔ p p ∨ F ⇔ p

Domination (Do)p ∧ F ⇔ F p ∨ T ⇔ T

Distributivity (Di)p ∧ (q ∨ r) ⇔ (p ∧ q) ∨ (p ∧ r) p ∨ (q ∧ r) ⇔ (p ∨ q) ∧ (p ∨ r)

Absorption (Ab)p ∧ (p ∨ q) ⇔ p p ∨ (p ∧ q) ⇔ p

DeMorgan’s Laws (DM)¬(p ∧ q) ⇔ ¬p ∨ ¬q ¬(p ∨ q) ⇔ ¬p ∧ ¬q

Page 82: Discrete Mathematics - Propositions

Laws of Logic

Identity (Id)p ∧ T ⇔ p p ∨ F ⇔ p

Domination (Do)p ∧ F ⇔ F p ∨ T ⇔ T

Distributivity (Di)p ∧ (q ∨ r) ⇔ (p ∧ q) ∨ (p ∧ r) p ∨ (q ∧ r) ⇔ (p ∨ q) ∧ (p ∨ r)

Absorption (Ab)p ∧ (p ∨ q) ⇔ p p ∨ (p ∧ q) ⇔ p

DeMorgan’s Laws (DM)¬(p ∧ q) ⇔ ¬p ∨ ¬q ¬(p ∨ q) ⇔ ¬p ∧ ¬q

Page 83: Discrete Mathematics - Propositions

Laws of Logic

Identity (Id)p ∧ T ⇔ p p ∨ F ⇔ p

Domination (Do)p ∧ F ⇔ F p ∨ T ⇔ T

Distributivity (Di)p ∧ (q ∨ r) ⇔ (p ∧ q) ∨ (p ∧ r) p ∨ (q ∧ r) ⇔ (p ∨ q) ∧ (p ∨ r)

Absorption (Ab)p ∧ (p ∨ q) ⇔ p p ∨ (p ∧ q) ⇔ p

DeMorgan’s Laws (DM)¬(p ∧ q) ⇔ ¬p ∨ ¬q ¬(p ∨ q) ⇔ ¬p ∧ ¬q

Page 84: Discrete Mathematics - Propositions

Laws of Logic

Identity (Id)p ∧ T ⇔ p p ∨ F ⇔ p

Domination (Do)p ∧ F ⇔ F p ∨ T ⇔ T

Distributivity (Di)p ∧ (q ∨ r) ⇔ (p ∧ q) ∨ (p ∧ r) p ∨ (q ∧ r) ⇔ (p ∨ q) ∧ (p ∨ r)

Absorption (Ab)p ∧ (p ∨ q) ⇔ p p ∨ (p ∧ q) ⇔ p

DeMorgan’s Laws (DM)¬(p ∧ q) ⇔ ¬p ∨ ¬q ¬(p ∨ q) ⇔ ¬p ∧ ¬q

Page 85: Discrete Mathematics - Propositions

Equivalence Example

Example

p → q

⇔ ¬p ∨ q

⇔ q ∨ ¬p Co

⇔ ¬¬q ∨ ¬p DN

⇔ ¬q → ¬p

Page 86: Discrete Mathematics - Propositions

Equivalence Example

Example

p → q

⇔ ¬p ∨ q

⇔ q ∨ ¬p Co

⇔ ¬¬q ∨ ¬p DN

⇔ ¬q → ¬p

Page 87: Discrete Mathematics - Propositions

Equivalence Example

Example

p → q

⇔ ¬p ∨ q

⇔ q ∨ ¬p Co

⇔ ¬¬q ∨ ¬p DN

⇔ ¬q → ¬p

Page 88: Discrete Mathematics - Propositions

Equivalence Example

Example

p → q

⇔ ¬p ∨ q

⇔ q ∨ ¬p Co

⇔ ¬¬q ∨ ¬p DN

⇔ ¬q → ¬p

Page 89: Discrete Mathematics - Propositions

Equivalence Example

Example

p → q

⇔ ¬p ∨ q

⇔ q ∨ ¬p Co

⇔ ¬¬q ∨ ¬p DN

⇔ ¬q → ¬p

Page 90: Discrete Mathematics - Propositions

Equivalence Example

Example

¬(¬((p ∨ q) ∧ r) ∨ ¬q)

⇔ ¬¬((p ∨ q) ∧ r) ∧ ¬¬q DM

⇔ ((p ∨ q) ∧ r) ∧ q DN

⇔ (p ∨ q) ∧ (r ∧ q) As

⇔ (p ∨ q) ∧ (q ∧ r) Co

⇔ ((p ∨ q) ∧ q) ∧ r As

⇔ q ∧ r Ab

Page 91: Discrete Mathematics - Propositions

Equivalence Example

Example

¬(¬((p ∨ q) ∧ r) ∨ ¬q)

⇔ ¬¬((p ∨ q) ∧ r) ∧ ¬¬q DM

⇔ ((p ∨ q) ∧ r) ∧ q DN

⇔ (p ∨ q) ∧ (r ∧ q) As

⇔ (p ∨ q) ∧ (q ∧ r) Co

⇔ ((p ∨ q) ∧ q) ∧ r As

⇔ q ∧ r Ab

Page 92: Discrete Mathematics - Propositions

Equivalence Example

Example

¬(¬((p ∨ q) ∧ r) ∨ ¬q)

⇔ ¬¬((p ∨ q) ∧ r) ∧ ¬¬q DM

⇔ ((p ∨ q) ∧ r) ∧ q DN

⇔ (p ∨ q) ∧ (r ∧ q) As

⇔ (p ∨ q) ∧ (q ∧ r) Co

⇔ ((p ∨ q) ∧ q) ∧ r As

⇔ q ∧ r Ab

Page 93: Discrete Mathematics - Propositions

Equivalence Example

Example

¬(¬((p ∨ q) ∧ r) ∨ ¬q)

⇔ ¬¬((p ∨ q) ∧ r) ∧ ¬¬q DM

⇔ ((p ∨ q) ∧ r) ∧ q DN

⇔ (p ∨ q) ∧ (r ∧ q) As

⇔ (p ∨ q) ∧ (q ∧ r) Co

⇔ ((p ∨ q) ∧ q) ∧ r As

⇔ q ∧ r Ab

Page 94: Discrete Mathematics - Propositions

Equivalence Example

Example

¬(¬((p ∨ q) ∧ r) ∨ ¬q)

⇔ ¬¬((p ∨ q) ∧ r) ∧ ¬¬q DM

⇔ ((p ∨ q) ∧ r) ∧ q DN

⇔ (p ∨ q) ∧ (r ∧ q) As

⇔ (p ∨ q) ∧ (q ∧ r) Co

⇔ ((p ∨ q) ∧ q) ∧ r As

⇔ q ∧ r Ab

Page 95: Discrete Mathematics - Propositions

Equivalence Example

Example

¬(¬((p ∨ q) ∧ r) ∨ ¬q)

⇔ ¬¬((p ∨ q) ∧ r) ∧ ¬¬q DM

⇔ ((p ∨ q) ∧ r) ∧ q DN

⇔ (p ∨ q) ∧ (r ∧ q) As

⇔ (p ∨ q) ∧ (q ∧ r) Co

⇔ ((p ∨ q) ∧ q) ∧ r As

⇔ q ∧ r Ab

Page 96: Discrete Mathematics - Propositions

Equivalence Example

Example

¬(¬((p ∨ q) ∧ r) ∨ ¬q)

⇔ ¬¬((p ∨ q) ∧ r) ∧ ¬¬q DM

⇔ ((p ∨ q) ∧ r) ∧ q DN

⇔ (p ∨ q) ∧ (r ∧ q) As

⇔ (p ∨ q) ∧ (q ∧ r) Co

⇔ ((p ∨ q) ∧ q) ∧ r As

⇔ q ∧ r Ab

Page 97: Discrete Mathematics - Propositions

Duality

Definition

If s contains no logical connectives other than ∧ and ∨,then the dual of s, denoted sd , is the statement obtained from sby replacing each occurrence of∧ by ∨, ∨ by ∧, T by F , and F by T .

Example (dual proposition)

s : (p ∧ ¬q) ∨ (r ∧ T )

sd : (p ∨ ¬q) ∧ (r ∨ F )

Page 98: Discrete Mathematics - Propositions

Duality

Definition

If s contains no logical connectives other than ∧ and ∨,then the dual of s, denoted sd , is the statement obtained from sby replacing each occurrence of∧ by ∨, ∨ by ∧, T by F , and F by T .

Example (dual proposition)

s : (p ∧ ¬q) ∨ (r ∧ T )

sd : (p ∨ ¬q) ∧ (r ∨ F )

Page 99: Discrete Mathematics - Propositions

Principle of Duality

principle of duality

Let s and t be statements that contain no logical connectivesother than ∧ and ∨.If s ⇔ t then sd ⇔ td .

Page 100: Discrete Mathematics - Propositions

Topics

1 PropositionsIntroductionCompound PropositionsPropositional Logic LanguageMetalanguage

2 Propositional CalculusIntroductionLaws of LogicRules of Inference

Page 101: Discrete Mathematics - Propositions

Rules of Inference

Definition

if P → Q is a tautology, then P logically implies Q:P ⇒ Q

Page 102: Discrete Mathematics - Propositions

Logical Implication Example

Example

p ∧ (p → q) ⇒ q

Table: p ∧ (p → q) → q

p q p → q p ∧ A B → q(A) (B)

T T T T T

T F F F T

F T T F T

F F T F T

Page 103: Discrete Mathematics - Propositions

Inference

establishing the validity of an argument,starting from a set of propositionswhich are assumed or proven to be true

notation

p1

p2

. . .pn

∴ q

p1 ∧ p2 ∧ · · · ∧ pn ⇒ q

Page 104: Discrete Mathematics - Propositions

Inference

establishing the validity of an argument,starting from a set of propositionswhich are assumed or proven to be true

notation

p1

p2

. . .pn

∴ q

p1 ∧ p2 ∧ · · · ∧ pn ⇒ q

Page 105: Discrete Mathematics - Propositions

Trivial Rules

Identity (ID)

p

∴ p

Contradiction (CTR)

F

∴ p

Page 106: Discrete Mathematics - Propositions

Trivial Rules

Identity (ID)

p

∴ p

Contradiction (CTR)

F

∴ p

Page 107: Discrete Mathematics - Propositions

Basic Rules

OR Introduction (OrI)

p

∴ p ∨ q

AND Elimination (AndE)

p ∧ q

∴ p

AND Introduction (AndI)

pq

∴ p ∧ q

Page 108: Discrete Mathematics - Propositions

Basic Rules

OR Introduction (OrI)

p

∴ p ∨ q

AND Elimination (AndE)

p ∧ q

∴ p

AND Introduction (AndI)

pq

∴ p ∧ q

Page 109: Discrete Mathematics - Propositions

Basic Rules

OR Introduction (OrI)

p

∴ p ∨ q

AND Elimination (AndE)

p ∧ q

∴ p

AND Introduction (AndI)

pq

∴ p ∧ q

Page 110: Discrete Mathematics - Propositions

Implication Elimination

Modus Ponens (ImpE)

p → qp

∴ q

Modus Tollens (MT)

p → q¬q

∴ ¬p

Page 111: Discrete Mathematics - Propositions

Implication Elimination

Modus Ponens (ImpE)

p → qp

∴ q

Modus Tollens (MT)

p → q¬q

∴ ¬p

Page 112: Discrete Mathematics - Propositions

Implication Elimination Example

Example (Modus Ponens)

If Lydia wins the lottery, she will buy a car.

Lydia has won the lottery.

Therefore, Lydia will buy a car.

Example (Modus Tollens)

If Lydia wins the lottery, she will buy a car.

Lydia did not buy a car.

Therefore, Lydia did not win the lottery.

Page 113: Discrete Mathematics - Propositions

Implication Elimination Example

Example (Modus Ponens)

If Lydia wins the lottery, she will buy a car.

Lydia has won the lottery.

Therefore, Lydia will buy a car.

Example (Modus Tollens)

If Lydia wins the lottery, she will buy a car.

Lydia did not buy a car.

Therefore, Lydia did not win the lottery.

Page 114: Discrete Mathematics - Propositions

Fallacies

affirming the conclusion

p → qq

∴ p

(p → q) ∧ q ; p:

(F → T ) ∧ T → F : F

denying the hypothesis

p → q¬p

∴ ¬q

(p → q) ∧ ¬p ; ¬q:

(F → T ) ∧ T → F : F

Page 115: Discrete Mathematics - Propositions

Fallacies

affirming the conclusion

p → qq

∴ p

(p → q) ∧ q ; p:

(F → T ) ∧ T → F : F

denying the hypothesis

p → q¬p

∴ ¬q

(p → q) ∧ ¬p ; ¬q:

(F → T ) ∧ T → F : F

Page 116: Discrete Mathematics - Propositions

Fallacy Examples

Example (affirming the conclusion)

If Lydia wins the lottery, she will buy a car.

Lydia has bought a car.

Therefore, Lydia has won the lottery.

Example (denying the hypothesis)

If Lydia wins the lottery, she will buy a car.

Lydia has not won the lottery.

Therefore, Lydia will not buy a car.

Page 117: Discrete Mathematics - Propositions

Fallacy Examples

Example (affirming the conclusion)

If Lydia wins the lottery, she will buy a car.

Lydia has bought a car.

Therefore, Lydia has won the lottery.

Example (denying the hypothesis)

If Lydia wins the lottery, she will buy a car.

Lydia has not won the lottery.

Therefore, Lydia will not buy a car.

Page 118: Discrete Mathematics - Propositions

Provisional Assumptions

Implication Introduction (ImpI)

p ` q

∴ ` p → q

if it can be shown thatq is true assuming p is true,then p → q is truewithout assuming p is true

p is a provisional assumption (PA)

PAs have to be discharged

OR Elimination (OrE)

p ∨ qp ` rq ` r

∴ ` r

p and q are PAs

Page 119: Discrete Mathematics - Propositions

Provisional Assumptions

Implication Introduction (ImpI)

p ` q

∴ ` p → q

if it can be shown thatq is true assuming p is true,then p → q is truewithout assuming p is true

p is a provisional assumption (PA)

PAs have to be discharged

OR Elimination (OrE)

p ∨ qp ` rq ` r

∴ ` r

p and q are PAs

Page 120: Discrete Mathematics - Propositions

Provisional Assumptions

Implication Introduction (ImpI)

p ` q

∴ ` p → q

if it can be shown thatq is true assuming p is true,then p → q is truewithout assuming p is true

p is a provisional assumption (PA)

PAs have to be discharged

OR Elimination (OrE)

p ∨ qp ` rq ` r

∴ ` r

p and q are PAs

Page 121: Discrete Mathematics - Propositions

Implication Introduction Example

Example (Modus Tollens)

p → q¬q

∴ ¬p

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. ¬q A

5. q → F EQ : 4

6. F ImpE : 3, 5

7. p → F ImpI : 1, 6

8. ¬p EQ : 7

Page 122: Discrete Mathematics - Propositions

Implication Introduction Example

Example (Modus Tollens)

p → q¬q

∴ ¬p

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. ¬q A

5. q → F EQ : 4

6. F ImpE : 3, 5

7. p → F ImpI : 1, 6

8. ¬p EQ : 7

Page 123: Discrete Mathematics - Propositions

Implication Introduction Example

Example (Modus Tollens)

p → q¬q

∴ ¬p

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. ¬q A

5. q → F EQ : 4

6. F ImpE : 3, 5

7. p → F ImpI : 1, 6

8. ¬p EQ : 7

Page 124: Discrete Mathematics - Propositions

Implication Introduction Example

Example (Modus Tollens)

p → q¬q

∴ ¬p

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. ¬q A

5. q → F EQ : 4

6. F ImpE : 3, 5

7. p → F ImpI : 1, 6

8. ¬p EQ : 7

Page 125: Discrete Mathematics - Propositions

Implication Introduction Example

Example (Modus Tollens)

p → q¬q

∴ ¬p

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. ¬q A

5. q → F EQ : 4

6. F ImpE : 3, 5

7. p → F ImpI : 1, 6

8. ¬p EQ : 7

Page 126: Discrete Mathematics - Propositions

Implication Introduction Example

Example (Modus Tollens)

p → q¬q

∴ ¬p

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. ¬q A

5. q → F EQ : 4

6. F ImpE : 3, 5

7. p → F ImpI : 1, 6

8. ¬p EQ : 7

Page 127: Discrete Mathematics - Propositions

Implication Introduction Example

Example (Modus Tollens)

p → q¬q

∴ ¬p

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. ¬q A

5. q → F EQ : 4

6. F ImpE : 3, 5

7. p → F ImpI : 1, 6

8. ¬p EQ : 7

Page 128: Discrete Mathematics - Propositions

Implication Introduction Example

Example (Modus Tollens)

p → q¬q

∴ ¬p

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. ¬q A

5. q → F EQ : 4

6. F ImpE : 3, 5

7. p → F ImpI : 1, 6

8. ¬p EQ : 7

Page 129: Discrete Mathematics - Propositions

Implication Introduction Example

Example (Modus Tollens)

p → q¬q

∴ ¬p

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. ¬q A

5. q → F EQ : 4

6. F ImpE : 3, 5

7. p → F ImpI : 1, 6

8. ¬p EQ : 7

Page 130: Discrete Mathematics - Propositions

Disjunctive Syllogism

Disjunctive Syllogism (DS)

p ∨ q¬p

∴ q

Example

Bart’s wallet is either in his pocket or on his desk.

Bart’s wallet is not in his pocket.

Therefore, Bart’s wallet is on his desk.

Page 131: Discrete Mathematics - Propositions

Disjunctive Syllogism

Disjunctive Syllogism (DS)

p ∨ q¬p

∴ q

Example

Bart’s wallet is either in his pocket or on his desk.

Bart’s wallet is not in his pocket.

Therefore, Bart’s wallet is on his desk.

Page 132: Discrete Mathematics - Propositions

Disjunctive Syllogism

Example

p ∨ q¬p

∴ q

1. p ∨ q A

2. ¬p A

3. p → F EQ : 2

4a1. p PA

4a2. F ImpE : 3, 4a1

4a. q CTR : 4a2

4b1. q PA

4b. q ID : 4b1

5. q OrE : 1, 4a, 4b

Page 133: Discrete Mathematics - Propositions

Disjunctive Syllogism

Example

p ∨ q¬p

∴ q

1. p ∨ q A

2. ¬p A

3. p → F EQ : 2

4a1. p PA

4a2. F ImpE : 3, 4a1

4a. q CTR : 4a2

4b1. q PA

4b. q ID : 4b1

5. q OrE : 1, 4a, 4b

Page 134: Discrete Mathematics - Propositions

Disjunctive Syllogism

Example

p ∨ q¬p

∴ q

1. p ∨ q A

2. ¬p A

3. p → F EQ : 2

4a1. p PA

4a2. F ImpE : 3, 4a1

4a. q CTR : 4a2

4b1. q PA

4b. q ID : 4b1

5. q OrE : 1, 4a, 4b

Page 135: Discrete Mathematics - Propositions

Disjunctive Syllogism

Example

p ∨ q¬p

∴ q

1. p ∨ q A

2. ¬p A

3. p → F EQ : 2

4a1. p PA

4a2. F ImpE : 3, 4a1

4a. q CTR : 4a2

4b1. q PA

4b. q ID : 4b1

5. q OrE : 1, 4a, 4b

Page 136: Discrete Mathematics - Propositions

Disjunctive Syllogism

Example

p ∨ q¬p

∴ q

1. p ∨ q A

2. ¬p A

3. p → F EQ : 2

4a1. p PA

4a2. F ImpE : 3, 4a1

4a. q CTR : 4a2

4b1. q PA

4b. q ID : 4b1

5. q OrE : 1, 4a, 4b

Page 137: Discrete Mathematics - Propositions

Disjunctive Syllogism

Example

p ∨ q¬p

∴ q

1. p ∨ q A

2. ¬p A

3. p → F EQ : 2

4a1. p PA

4a2. F ImpE : 3, 4a1

4a. q CTR : 4a2

4b1. q PA

4b. q ID : 4b1

5. q OrE : 1, 4a, 4b

Page 138: Discrete Mathematics - Propositions

Disjunctive Syllogism

Example

p ∨ q¬p

∴ q

1. p ∨ q A

2. ¬p A

3. p → F EQ : 2

4a1. p PA

4a2. F ImpE : 3, 4a1

4a. q CTR : 4a2

4b1. q PA

4b. q ID : 4b1

5. q OrE : 1, 4a, 4b

Page 139: Discrete Mathematics - Propositions

Disjunctive Syllogism

Example

p ∨ q¬p

∴ q

1. p ∨ q A

2. ¬p A

3. p → F EQ : 2

4a1. p PA

4a2. F ImpE : 3, 4a1

4a. q CTR : 4a2

4b1. q PA

4b. q ID : 4b1

5. q OrE : 1, 4a, 4b

Page 140: Discrete Mathematics - Propositions

Disjunctive Syllogism

Example

p ∨ q¬p

∴ q

1. p ∨ q A

2. ¬p A

3. p → F EQ : 2

4a1. p PA

4a2. F ImpE : 3, 4a1

4a. q CTR : 4a2

4b1. q PA

4b. q ID : 4b1

5. q OrE : 1, 4a, 4b

Page 141: Discrete Mathematics - Propositions

Disjunctive Syllogism

Example

p ∨ q¬p

∴ q

1. p ∨ q A

2. ¬p A

3. p → F EQ : 2

4a1. p PA

4a2. F ImpE : 3, 4a1

4a. q CTR : 4a2

4b1. q PA

4b. q ID : 4b1

5. q OrE : 1, 4a, 4b

Page 142: Discrete Mathematics - Propositions

Hypothetical Syllogism

Hypothetical Syllogism (HS)

p → qq → r

∴ p → r

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. q → r A

5. r ImpE : 3, 4

6. p → r ImpI : 1, 5

Page 143: Discrete Mathematics - Propositions

Hypothetical Syllogism

Hypothetical Syllogism (HS)

p → qq → r

∴ p → r

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. q → r A

5. r ImpE : 3, 4

6. p → r ImpI : 1, 5

Page 144: Discrete Mathematics - Propositions

Hypothetical Syllogism

Hypothetical Syllogism (HS)

p → qq → r

∴ p → r

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. q → r A

5. r ImpE : 3, 4

6. p → r ImpI : 1, 5

Page 145: Discrete Mathematics - Propositions

Hypothetical Syllogism

Hypothetical Syllogism (HS)

p → qq → r

∴ p → r

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. q → r A

5. r ImpE : 3, 4

6. p → r ImpI : 1, 5

Page 146: Discrete Mathematics - Propositions

Hypothetical Syllogism

Hypothetical Syllogism (HS)

p → qq → r

∴ p → r

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. q → r A

5. r ImpE : 3, 4

6. p → r ImpI : 1, 5

Page 147: Discrete Mathematics - Propositions

Hypothetical Syllogism

Hypothetical Syllogism (HS)

p → qq → r

∴ p → r

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. q → r A

5. r ImpE : 3, 4

6. p → r ImpI : 1, 5

Page 148: Discrete Mathematics - Propositions

Hypothetical Syllogism

Hypothetical Syllogism (HS)

p → qq → r

∴ p → r

1. p PA

2. p → q A

3. q ImpE : 1, 2

4. q → r A

5. r ImpE : 3, 4

6. p → r ImpI : 1, 5

Page 149: Discrete Mathematics - Propositions

Hypotetical Syllogism Example

Example (Star Trek)

Spock to Lieutenant Decker:

It would be a suicide to attack the enemy ship now.Someone who attempts suicide is not psychologically fitto command the Enterprise.Therefore, I am obliged to relieve you from duty.

Page 150: Discrete Mathematics - Propositions

Hypotetical Syllogism Example

Example (Star Trek)

p: Decker attacks the enemy ship.

q: Decker attempts suicide.

r : Decker is not psychologically fit to command the Enterprise.

s: Spock relieves Decker from duty.

Page 151: Discrete Mathematics - Propositions

Hypotetical Syllogism Example

Example

pp → qq → rr → s

∴ s

1. p → q A

2. q → r A

3. p → r HS : 1, 2

4. r → s A

5. p → s HS : 3, 4

6. p A

7. s ImpE : 5, 6

Page 152: Discrete Mathematics - Propositions

Hypotetical Syllogism Example

Example

pp → qq → rr → s

∴ s

1. p → q A

2. q → r A

3. p → r HS : 1, 2

4. r → s A

5. p → s HS : 3, 4

6. p A

7. s ImpE : 5, 6

Page 153: Discrete Mathematics - Propositions

Hypotetical Syllogism Example

Example

pp → qq → rr → s

∴ s

1. p → q A

2. q → r A

3. p → r HS : 1, 2

4. r → s A

5. p → s HS : 3, 4

6. p A

7. s ImpE : 5, 6

Page 154: Discrete Mathematics - Propositions

Hypotetical Syllogism Example

Example

pp → qq → rr → s

∴ s

1. p → q A

2. q → r A

3. p → r HS : 1, 2

4. r → s A

5. p → s HS : 3, 4

6. p A

7. s ImpE : 5, 6

Page 155: Discrete Mathematics - Propositions

Hypotetical Syllogism Example

Example

pp → qq → rr → s

∴ s

1. p → q A

2. q → r A

3. p → r HS : 1, 2

4. r → s A

5. p → s HS : 3, 4

6. p A

7. s ImpE : 5, 6

Page 156: Discrete Mathematics - Propositions

Hypotetical Syllogism Example

Example

pp → qq → rr → s

∴ s

1. p → q A

2. q → r A

3. p → r HS : 1, 2

4. r → s A

5. p → s HS : 3, 4

6. p A

7. s ImpE : 5, 6

Page 157: Discrete Mathematics - Propositions

Hypotetical Syllogism Example

Example

pp → qq → rr → s

∴ s

1. p → q A

2. q → r A

3. p → r HS : 1, 2

4. r → s A

5. p → s HS : 3, 4

6. p A

7. s ImpE : 5, 6

Page 158: Discrete Mathematics - Propositions

Hypotetical Syllogism Example

Example

pp → qq → rr → s

∴ s

1. p → q A

2. q → r A

3. p → r HS : 1, 2

4. r → s A

5. p → s HS : 3, 4

6. p A

7. s ImpE : 5, 6

Page 159: Discrete Mathematics - Propositions

Inference Examples

Example

p → rr → sx ∨ ¬su ∨ ¬x¬u

∴ ¬p

1. u ∨ ¬x A

2. ¬u A

3. ¬x DS : 1, 2

4. x ∨ ¬s A

5. ¬s DS : 4, 3

6. r → s A

7. ¬r MT : 6, 5

8. p → r A

9. ¬p MT : 8, 7

Page 160: Discrete Mathematics - Propositions

Inference Examples

Example

p → rr → sx ∨ ¬su ∨ ¬x¬u

∴ ¬p

1. u ∨ ¬x A

2. ¬u A

3. ¬x DS : 1, 2

4. x ∨ ¬s A

5. ¬s DS : 4, 3

6. r → s A

7. ¬r MT : 6, 5

8. p → r A

9. ¬p MT : 8, 7

Page 161: Discrete Mathematics - Propositions

Inference Examples

Example

p → rr → sx ∨ ¬su ∨ ¬x¬u

∴ ¬p

1. u ∨ ¬x A

2. ¬u A

3. ¬x DS : 1, 2

4. x ∨ ¬s A

5. ¬s DS : 4, 3

6. r → s A

7. ¬r MT : 6, 5

8. p → r A

9. ¬p MT : 8, 7

Page 162: Discrete Mathematics - Propositions

Inference Examples

Example

p → rr → sx ∨ ¬su ∨ ¬x¬u

∴ ¬p

1. u ∨ ¬x A

2. ¬u A

3. ¬x DS : 1, 2

4. x ∨ ¬s A

5. ¬s DS : 4, 3

6. r → s A

7. ¬r MT : 6, 5

8. p → r A

9. ¬p MT : 8, 7

Page 163: Discrete Mathematics - Propositions

Inference Examples

Example

p → rr → sx ∨ ¬su ∨ ¬x¬u

∴ ¬p

1. u ∨ ¬x A

2. ¬u A

3. ¬x DS : 1, 2

4. x ∨ ¬s A

5. ¬s DS : 4, 3

6. r → s A

7. ¬r MT : 6, 5

8. p → r A

9. ¬p MT : 8, 7

Page 164: Discrete Mathematics - Propositions

Inference Examples

Example

p → rr → sx ∨ ¬su ∨ ¬x¬u

∴ ¬p

1. u ∨ ¬x A

2. ¬u A

3. ¬x DS : 1, 2

4. x ∨ ¬s A

5. ¬s DS : 4, 3

6. r → s A

7. ¬r MT : 6, 5

8. p → r A

9. ¬p MT : 8, 7

Page 165: Discrete Mathematics - Propositions

Inference Examples

Example

p → rr → sx ∨ ¬su ∨ ¬x¬u

∴ ¬p

1. u ∨ ¬x A

2. ¬u A

3. ¬x DS : 1, 2

4. x ∨ ¬s A

5. ¬s DS : 4, 3

6. r → s A

7. ¬r MT : 6, 5

8. p → r A

9. ¬p MT : 8, 7

Page 166: Discrete Mathematics - Propositions

Inference Examples

Example

p → rr → sx ∨ ¬su ∨ ¬x¬u

∴ ¬p

1. u ∨ ¬x A

2. ¬u A

3. ¬x DS : 1, 2

4. x ∨ ¬s A

5. ¬s DS : 4, 3

6. r → s A

7. ¬r MT : 6, 5

8. p → r A

9. ¬p MT : 8, 7

Page 167: Discrete Mathematics - Propositions

Inference Examples

Example

p → rr → sx ∨ ¬su ∨ ¬x¬u

∴ ¬p

1. u ∨ ¬x A

2. ¬u A

3. ¬x DS : 1, 2

4. x ∨ ¬s A

5. ¬s DS : 4, 3

6. r → s A

7. ¬r MT : 6, 5

8. p → r A

9. ¬p MT : 8, 7

Page 168: Discrete Mathematics - Propositions

Inference Examples

Example

p → rr → sx ∨ ¬su ∨ ¬x¬u

∴ ¬p

1. u ∨ ¬x A

2. ¬u A

3. ¬x DS : 1, 2

4. x ∨ ¬s A

5. ¬s DS : 4, 3

6. r → s A

7. ¬r MT : 6, 5

8. p → r A

9. ¬p MT : 8, 7

Page 169: Discrete Mathematics - Propositions

Inference Examples

Example

(¬p ∨ ¬q) → (r ∧ s)r → x¬x

∴ p

1. r → x A

2. ¬x A

3. ¬r MT : 1, 2

4. ¬r ∨ ¬s OrI : 3

5. ¬(r ∧ s) DM : 4

6. (¬p ∨ ¬q) → (r ∧ s) A

7. ¬(¬p ∨ ¬q) MT : 6, 5

8. p ∧ q DM : 7

9. p AndE : 8

Page 170: Discrete Mathematics - Propositions

Inference Examples

Example

(¬p ∨ ¬q) → (r ∧ s)r → x¬x

∴ p

1. r → x A

2. ¬x A

3. ¬r MT : 1, 2

4. ¬r ∨ ¬s OrI : 3

5. ¬(r ∧ s) DM : 4

6. (¬p ∨ ¬q) → (r ∧ s) A

7. ¬(¬p ∨ ¬q) MT : 6, 5

8. p ∧ q DM : 7

9. p AndE : 8

Page 171: Discrete Mathematics - Propositions

Inference Examples

Example

(¬p ∨ ¬q) → (r ∧ s)r → x¬x

∴ p

1. r → x A

2. ¬x A

3. ¬r MT : 1, 2

4. ¬r ∨ ¬s OrI : 3

5. ¬(r ∧ s) DM : 4

6. (¬p ∨ ¬q) → (r ∧ s) A

7. ¬(¬p ∨ ¬q) MT : 6, 5

8. p ∧ q DM : 7

9. p AndE : 8

Page 172: Discrete Mathematics - Propositions

Inference Examples

Example

(¬p ∨ ¬q) → (r ∧ s)r → x¬x

∴ p

1. r → x A

2. ¬x A

3. ¬r MT : 1, 2

4. ¬r ∨ ¬s OrI : 3

5. ¬(r ∧ s) DM : 4

6. (¬p ∨ ¬q) → (r ∧ s) A

7. ¬(¬p ∨ ¬q) MT : 6, 5

8. p ∧ q DM : 7

9. p AndE : 8

Page 173: Discrete Mathematics - Propositions

Inference Examples

Example

(¬p ∨ ¬q) → (r ∧ s)r → x¬x

∴ p

1. r → x A

2. ¬x A

3. ¬r MT : 1, 2

4. ¬r ∨ ¬s OrI : 3

5. ¬(r ∧ s) DM : 4

6. (¬p ∨ ¬q) → (r ∧ s) A

7. ¬(¬p ∨ ¬q) MT : 6, 5

8. p ∧ q DM : 7

9. p AndE : 8

Page 174: Discrete Mathematics - Propositions

Inference Examples

Example

(¬p ∨ ¬q) → (r ∧ s)r → x¬x

∴ p

1. r → x A

2. ¬x A

3. ¬r MT : 1, 2

4. ¬r ∨ ¬s OrI : 3

5. ¬(r ∧ s) DM : 4

6. (¬p ∨ ¬q) → (r ∧ s) A

7. ¬(¬p ∨ ¬q) MT : 6, 5

8. p ∧ q DM : 7

9. p AndE : 8

Page 175: Discrete Mathematics - Propositions

Inference Examples

Example

(¬p ∨ ¬q) → (r ∧ s)r → x¬x

∴ p

1. r → x A

2. ¬x A

3. ¬r MT : 1, 2

4. ¬r ∨ ¬s OrI : 3

5. ¬(r ∧ s) DM : 4

6. (¬p ∨ ¬q) → (r ∧ s) A

7. ¬(¬p ∨ ¬q) MT : 6, 5

8. p ∧ q DM : 7

9. p AndE : 8

Page 176: Discrete Mathematics - Propositions

Inference Examples

Example

(¬p ∨ ¬q) → (r ∧ s)r → x¬x

∴ p

1. r → x A

2. ¬x A

3. ¬r MT : 1, 2

4. ¬r ∨ ¬s OrI : 3

5. ¬(r ∧ s) DM : 4

6. (¬p ∨ ¬q) → (r ∧ s) A

7. ¬(¬p ∨ ¬q) MT : 6, 5

8. p ∧ q DM : 7

9. p AndE : 8

Page 177: Discrete Mathematics - Propositions

Inference Examples

Example

(¬p ∨ ¬q) → (r ∧ s)r → x¬x

∴ p

1. r → x A

2. ¬x A

3. ¬r MT : 1, 2

4. ¬r ∨ ¬s OrI : 3

5. ¬(r ∧ s) DM : 4

6. (¬p ∨ ¬q) → (r ∧ s) A

7. ¬(¬p ∨ ¬q) MT : 6, 5

8. p ∧ q DM : 7

9. p AndE : 8

Page 178: Discrete Mathematics - Propositions

Inference Examples

Example

(¬p ∨ ¬q) → (r ∧ s)r → x¬x

∴ p

1. r → x A

2. ¬x A

3. ¬r MT : 1, 2

4. ¬r ∨ ¬s OrI : 3

5. ¬(r ∧ s) DM : 4

6. (¬p ∨ ¬q) → (r ∧ s) A

7. ¬(¬p ∨ ¬q) MT : 6, 5

8. p ∧ q DM : 7

9. p AndE : 8

Page 179: Discrete Mathematics - Propositions

Inference Examples

Example

p → (q ∨ r)s → ¬rq → ¬p

ps

∴ F

1. q → ¬p A

2. p A

3. ¬q MT : 1, 2

4. s A

5. s → ¬r A

6. ¬r ImpE : 5, 4

7. p → (q ∨ r) A

8. q ∨ r ImpE : 7, 2

9. q DS : 8, 6

10. q ∧ ¬q : F AndI : 9, 3

Page 180: Discrete Mathematics - Propositions

Inference Examples

Example

p → (q ∨ r)s → ¬rq → ¬p

ps

∴ F

1. q → ¬p A

2. p A

3. ¬q MT : 1, 2

4. s A

5. s → ¬r A

6. ¬r ImpE : 5, 4

7. p → (q ∨ r) A

8. q ∨ r ImpE : 7, 2

9. q DS : 8, 6

10. q ∧ ¬q : F AndI : 9, 3

Page 181: Discrete Mathematics - Propositions

Inference Examples

Example

p → (q ∨ r)s → ¬rq → ¬p

ps

∴ F

1. q → ¬p A

2. p A

3. ¬q MT : 1, 2

4. s A

5. s → ¬r A

6. ¬r ImpE : 5, 4

7. p → (q ∨ r) A

8. q ∨ r ImpE : 7, 2

9. q DS : 8, 6

10. q ∧ ¬q : F AndI : 9, 3

Page 182: Discrete Mathematics - Propositions

Inference Examples

Example

p → (q ∨ r)s → ¬rq → ¬p

ps

∴ F

1. q → ¬p A

2. p A

3. ¬q MT : 1, 2

4. s A

5. s → ¬r A

6. ¬r ImpE : 5, 4

7. p → (q ∨ r) A

8. q ∨ r ImpE : 7, 2

9. q DS : 8, 6

10. q ∧ ¬q : F AndI : 9, 3

Page 183: Discrete Mathematics - Propositions

Inference Examples

Example

p → (q ∨ r)s → ¬rq → ¬p

ps

∴ F

1. q → ¬p A

2. p A

3. ¬q MT : 1, 2

4. s A

5. s → ¬r A

6. ¬r ImpE : 5, 4

7. p → (q ∨ r) A

8. q ∨ r ImpE : 7, 2

9. q DS : 8, 6

10. q ∧ ¬q : F AndI : 9, 3

Page 184: Discrete Mathematics - Propositions

Inference Examples

Example

p → (q ∨ r)s → ¬rq → ¬p

ps

∴ F

1. q → ¬p A

2. p A

3. ¬q MT : 1, 2

4. s A

5. s → ¬r A

6. ¬r ImpE : 5, 4

7. p → (q ∨ r) A

8. q ∨ r ImpE : 7, 2

9. q DS : 8, 6

10. q ∧ ¬q : F AndI : 9, 3

Page 185: Discrete Mathematics - Propositions

Inference Examples

Example

p → (q ∨ r)s → ¬rq → ¬p

ps

∴ F

1. q → ¬p A

2. p A

3. ¬q MT : 1, 2

4. s A

5. s → ¬r A

6. ¬r ImpE : 5, 4

7. p → (q ∨ r) A

8. q ∨ r ImpE : 7, 2

9. q DS : 8, 6

10. q ∧ ¬q : F AndI : 9, 3

Page 186: Discrete Mathematics - Propositions

Inference Examples

Example

p → (q ∨ r)s → ¬rq → ¬p

ps

∴ F

1. q → ¬p A

2. p A

3. ¬q MT : 1, 2

4. s A

5. s → ¬r A

6. ¬r ImpE : 5, 4

7. p → (q ∨ r) A

8. q ∨ r ImpE : 7, 2

9. q DS : 8, 6

10. q ∧ ¬q : F AndI : 9, 3

Page 187: Discrete Mathematics - Propositions

Inference Examples

Example

p → (q ∨ r)s → ¬rq → ¬p

ps

∴ F

1. q → ¬p A

2. p A

3. ¬q MT : 1, 2

4. s A

5. s → ¬r A

6. ¬r ImpE : 5, 4

7. p → (q ∨ r) A

8. q ∨ r ImpE : 7, 2

9. q DS : 8, 6

10. q ∧ ¬q : F AndI : 9, 3

Page 188: Discrete Mathematics - Propositions

Inference Examples

Example

p → (q ∨ r)s → ¬rq → ¬p

ps

∴ F

1. q → ¬p A

2. p A

3. ¬q MT : 1, 2

4. s A

5. s → ¬r A

6. ¬r ImpE : 5, 4

7. p → (q ∨ r) A

8. q ∨ r ImpE : 7, 2

9. q DS : 8, 6

10. q ∧ ¬q : F AndI : 9, 3

Page 189: Discrete Mathematics - Propositions

Inference Examples

Example

p → (q ∨ r)s → ¬rq → ¬p

ps

∴ F

1. q → ¬p A

2. p A

3. ¬q MT : 1, 2

4. s A

5. s → ¬r A

6. ¬r ImpE : 5, 4

7. p → (q ∨ r) A

8. q ∨ r ImpE : 7, 2

9. q DS : 8, 6

10. q ∧ ¬q : F AndI : 9, 3

Page 190: Discrete Mathematics - Propositions

Inference Examples

Example

If there is a chance of rain or her red headband is missing,then Lois will not mow her lawn. Whenever the temperature isover 20�, there is no chance for rain. Today the temperature is22� and Lois is wearing her red headband. Therefore,Lois will mow her lawn.

Page 191: Discrete Mathematics - Propositions

Inference Examples

Example

p: There is a chance of rain.

q: Lois’ red headband is lost.

r : Lois mows her lawn.

s: The temperature is over 20�.

Page 192: Discrete Mathematics - Propositions

Inference Examples

Example

(p ∨ q) → ¬rs → ¬ps ∧ ¬q

∴ r

1. s ∧ ¬q A

2. s AndE : 1

3. s → ¬p A

4. ¬p ImpE : 3, 2

5. ¬q AndE : 1

6. ¬p ∧ ¬q AndI : 4, 5

7. ¬(p ∨ q) DM : 6

8. (p ∨ q) → ¬r A

9. ? 7, 8

Page 193: Discrete Mathematics - Propositions

Inference Examples

Example

(p ∨ q) → ¬rs → ¬ps ∧ ¬q

∴ r

1. s ∧ ¬q A

2. s AndE : 1

3. s → ¬p A

4. ¬p ImpE : 3, 2

5. ¬q AndE : 1

6. ¬p ∧ ¬q AndI : 4, 5

7. ¬(p ∨ q) DM : 6

8. (p ∨ q) → ¬r A

9. ? 7, 8

Page 194: Discrete Mathematics - Propositions

Inference Examples

Example

(p ∨ q) → ¬rs → ¬ps ∧ ¬q

∴ r

1. s ∧ ¬q A

2. s AndE : 1

3. s → ¬p A

4. ¬p ImpE : 3, 2

5. ¬q AndE : 1

6. ¬p ∧ ¬q AndI : 4, 5

7. ¬(p ∨ q) DM : 6

8. (p ∨ q) → ¬r A

9. ? 7, 8

Page 195: Discrete Mathematics - Propositions

Inference Examples

Example

(p ∨ q) → ¬rs → ¬ps ∧ ¬q

∴ r

1. s ∧ ¬q A

2. s AndE : 1

3. s → ¬p A

4. ¬p ImpE : 3, 2

5. ¬q AndE : 1

6. ¬p ∧ ¬q AndI : 4, 5

7. ¬(p ∨ q) DM : 6

8. (p ∨ q) → ¬r A

9. ? 7, 8

Page 196: Discrete Mathematics - Propositions

Inference Examples

Example

(p ∨ q) → ¬rs → ¬ps ∧ ¬q

∴ r

1. s ∧ ¬q A

2. s AndE : 1

3. s → ¬p A

4. ¬p ImpE : 3, 2

5. ¬q AndE : 1

6. ¬p ∧ ¬q AndI : 4, 5

7. ¬(p ∨ q) DM : 6

8. (p ∨ q) → ¬r A

9. ? 7, 8

Page 197: Discrete Mathematics - Propositions

Inference Examples

Example

(p ∨ q) → ¬rs → ¬ps ∧ ¬q

∴ r

1. s ∧ ¬q A

2. s AndE : 1

3. s → ¬p A

4. ¬p ImpE : 3, 2

5. ¬q AndE : 1

6. ¬p ∧ ¬q AndI : 4, 5

7. ¬(p ∨ q) DM : 6

8. (p ∨ q) → ¬r A

9. ? 7, 8

Page 198: Discrete Mathematics - Propositions

Inference Examples

Example

(p ∨ q) → ¬rs → ¬ps ∧ ¬q

∴ r

1. s ∧ ¬q A

2. s AndE : 1

3. s → ¬p A

4. ¬p ImpE : 3, 2

5. ¬q AndE : 1

6. ¬p ∧ ¬q AndI : 4, 5

7. ¬(p ∨ q) DM : 6

8. (p ∨ q) → ¬r A

9. ? 7, 8

Page 199: Discrete Mathematics - Propositions

Inference Examples

Example

(p ∨ q) → ¬rs → ¬ps ∧ ¬q

∴ r

1. s ∧ ¬q A

2. s AndE : 1

3. s → ¬p A

4. ¬p ImpE : 3, 2

5. ¬q AndE : 1

6. ¬p ∧ ¬q AndI : 4, 5

7. ¬(p ∨ q) DM : 6

8. (p ∨ q) → ¬r A

9. ? 7, 8

Page 200: Discrete Mathematics - Propositions

Inference Examples

Example

(p ∨ q) → ¬rs → ¬ps ∧ ¬q

∴ r

1. s ∧ ¬q A

2. s AndE : 1

3. s → ¬p A

4. ¬p ImpE : 3, 2

5. ¬q AndE : 1

6. ¬p ∧ ¬q AndI : 4, 5

7. ¬(p ∨ q) DM : 6

8. (p ∨ q) → ¬r A

9. ? 7, 8

Page 201: Discrete Mathematics - Propositions

Inference Examples

Example

(p ∨ q) → ¬rs → ¬ps ∧ ¬q

∴ r

1. s ∧ ¬q A

2. s AndE : 1

3. s → ¬p A

4. ¬p ImpE : 3, 2

5. ¬q AndE : 1

6. ¬p ∧ ¬q AndI : 4, 5

7. ¬(p ∨ q) DM : 6

8. (p ∨ q) → ¬r A

9. ? 7, 8

Page 202: Discrete Mathematics - Propositions

References

Required Reading: Grimaldi

Chapter 2: Fundamentals of Logic

2.1. Basic Connectives and Truth Tables2.2. Logical Equivalence: The Laws of Logic2.3. Logical Implication: Rules of Inference

Supplementary Reading: O’Donnell, Hall, Page

Chapter 6: Propositional Logic