You are on page 1of 75

Module 4

Logic
About This Module
This module is will elaborate the discussion on logic.
Student will be introduced to more symbols and
applications of logic in arguments.
Substopics
Learn how to quantify conditions applied on elements of
sets.
Learn more about the meaning and truth values of
different logic operators. Identify logical equivalences
and creating truth tables.
Apply logic to simple arguments. Use truth tables and
Euler diagrams to determine the validity of an argument.
You may stop here and proceed
to the subtopic materials or you
may continue and read through
the full course materials.
Logic
Logic Quantifiers
Intended Learning
Outcomes
• Understand logic symbols
• Apply knowledge on the set of real numbers to
determine the truth value of logic statements
Logic Quantifier
The domain of discourse is the set of all values under
consideration in a given proposition.
A proposition defined for an arbitrary value in a given set
may be denoted like a function of that variable.

Example:

“the sum of an integer and its negative is zero.”


𝑷 𝒏 : 𝒏 + −𝒏 = 𝟎
Quantifier is a word or a phrase which is used before a
noun to indicate the amount or quantity.
Quantifier Universal Quantifier Existential Quantifier
Phrase For all, All, everyone, none There exists, Some, Few, Many

Symbol ∀ ∃

Translation ∀𝑥, 𝑃(𝑥) ∃𝑥, 𝑃 𝑥


Where 𝑃(𝑥) is a proposition in 𝑥 Where 𝑃(𝑥) is a proposition in 𝑥
Examples All students like Math. There is a student who likes Math.
Everyone loves to sing. Many people love to sing.
None of the examinees failed. Some examinees failed.
When all variables in a propositional function are assigned
values, the resulting statement has a TRUTH VALUE. There
is another method to change the propositional functions into
propositions called quantification, which may be universal or
existential.
The universal quantification of 𝑃(𝑥) is the proposition
“𝑃(𝑥) is true for ALL values of 𝑥 in the domain of discourse.”
The existential quantification of 𝑃(𝑥) is the proposition
“𝑃(𝑥) is true for SOME (or at least one) values of 𝑥 in the
domain of discourse.”
Express the statement “ Every student in this class has studied
algebra.” as a universal quantification.

Solution:
Let 𝐴(𝑥) denote the statement “𝑥 has studied algebra.”

The given statement can now be expressed as ∀𝒙 𝑨(𝒙), where the


domain of discourse consists of the students in class.
Let 𝑃(𝑥) be “𝑥 + 1 > 𝑥”,
A. What is the truth value of ∀𝑥 𝑃(𝑥), where the domain of discourse is
the set of all real numbers?
B. What is the truth value of ∃𝑥 𝑃(𝑥)?

Solution:

A. Since a real number 𝑥 will always be smaller than 𝑥 + 1, ∀𝑥 𝑃(𝑥), has the
truth value TRUE or T.
B. Since we can find at least one real number, 𝑥 = 1 such that
(𝑥 + 1) > 𝑥 is true, then ∃𝑥 𝑃(𝑥) has a truth value of TRUE, T.
Let 𝑅(𝑥) be “𝑥 < 2”,

A. What is the truth value of ∀𝒙 𝑹(𝒙), where the domain of discourse is


the set of all real numbers?

B. What is the truth value of ∃𝑥 𝑅(𝑥)?


Let 𝑃 𝑥 : 𝑥 + 1 > 0

1. ∀𝑥, 𝑃(𝑥) if 𝑥 ∈ ℝ
Let 𝑃 𝑥 : 𝑥 + 1 > 0

1. ∀𝑥, 𝑃(𝑥) if 𝑥 ∈ ℝ
2. ∀𝑥, 𝑃 𝑥 if 𝑥 ∈ ℕ
Let 𝑃 𝑥 : 𝑥 + 1 > 0

1. ∀𝑥, 𝑃(𝑥) if 𝑥 ∈ ℝ
2. ∀𝑥, 𝑃 𝑥 if 𝑥 ∈ ℕ
3. ∃𝑥, 𝑃(𝑥) if 𝑥 ∈ ℤ
Let 𝑃 𝑥 : 𝑥 + 1 > 0

1. ∀𝑥, 𝑃(𝑥) if 𝑥 ∈ ℝ
2. ∀𝑥, 𝑃 𝑥 if 𝑥 ∈ ℕ
3. ∃𝑥, 𝑃(𝑥) if 𝑥 ∈ ℤ
4. ∃𝑥, 𝑃(𝑥) if 𝑥 ∈ ℕ
Logic
Logic Operators
Intended Learning
Outcomes
• Interpret logic statements
• Construct truth tables
• Identify logical equivalences
Logic Operators
The truth value of a negated
S ~S statement is just the opposite truth
T F value.
F T
Negation
Symbol: ~

Ex:
She is hungry. (ℎ) → She is not hungry. (~ℎ)
Pia is late (𝑙) → Pia is not late. (~𝑙)
It is cold (𝑐) → It is not cold. (~𝑐)
S1 S2 S1 ∧ S2
T T TRUE “And” statement is TRUE only when
T F FALSE BOTH subsentences are TRUE.
F T FALSE Conjunction
F F FALSE Symbol: ∧

Examples:
It is a weekday and a sunny day. 𝑾 ∧ 𝑺
The kid is playing and is happy 𝑷 ∧ 𝑯
The party is fun and the kids are happy. 𝑭 ∧ 𝑯
S1 S2 S1 ∨ S2 An `or' sentence is true when at least
T T TRUE one of the subsentences is TRUE.
That is, an `or' sentence is true when
T F TRUE one, or the other, or both, of the subsentences are
F T TRUE true. Notice that line 1 of the truth table is slightly
F F FALSE different than the English word ‘or'.
Inclusive Disjunction
Examples: Symbol: V or +

It is a weekday or a sunny day. 𝑾 ∨ 𝑺


The kids are playing or are happy 𝑷 ∨ 𝑯
The party is fun or the kids are happy. 𝑭 ∨ 𝑯
S1 S2 S1 ⨁ S2 An `exclusive-or' statement is
T T FALSE true when only one of the
T F TRUE subsentences is TRUE. The
F T TRUE statements must not be both true.
F F FALSE Exclusive disjunction
Symbol: V or ⨁

Examples:
It is a weekday or a sunny day, but not, weekday and sunny day. 𝑾𝑽𝑺
Either the kids are playing or they tired. 𝑷𝑽𝑻
Either the party is fun or the kids are not happy. 𝑭 𝑽 ~𝑯
S1 S2 S1 → S2
T T TRUE
T F FALSE
S1 implies S2
F T TRUE If S1 then S2
F F TRUE S2 only if S1
S1 is the hypothesis (antecedent).
Examples: S2 is the conclusion (consequence).
If Lea did not eat breakfast then she is hungry. ~𝑃 → 𝑄
Pia waking up late implies she misses her class. 𝐿→ 𝑀
The match is burning only if there is oxygen in the room. 𝑂→𝐵
It is only false when a true statement implies a false statement.
Given an implication 𝒑 → 𝒒, its converse, inverse and
contrapositive are

• Converse proposition: 𝒒→ 𝒑
• Inverse proposition: ~𝒑 → ~𝒒
• Contrapositive proposition: ~𝒒 → ~𝒑

Note: An implication is always logically equivalent to its own contrapositive.


Find the converse, inverse, and the contrapositive propositions of the
implication “If today is Thursday, then I have a test today.”
Solution:
Converse:
“If I have a test today, then today is Thursday.”
Inverse:
“If today is not Thursday then I do not have test today.
Contrapositive:
“If I do not have a test today, then today is not Thursday.”
S1 S2 S1  S2
T T TRUE
T F FALSE “in equivalent to”
F T FALSE
“if and only if”
F F TRUE
“iff”
Ex:
Lea is hungry iff she did not eat. 𝑃 ⟺ 𝑄
A candidate is elected if and only if he supports the poor. 𝐸⟺𝑃
The match is burning is equivalent to there is oxygen in the room. 𝐵 ⟺ 𝑂
Two statements are equivalent when they have the
SAME truth values.
𝒑 𝒒 ~𝒑 𝒑∧𝒒 𝒑∨𝒒 𝒑⨁𝒒 𝒑→ 𝒒 𝒑 ⇔ 𝒒
T T F T T F T T
T F F F T T F F
F T T F T T T F
F F T F F F T T
𝑝: I sleep past midnight
𝑞: I’m late
Write the following in words
1. 𝑝 ∧ ~𝑞
2. ~𝑝 ∨ 𝑞
3. ~𝑝 → 𝑞
4. Converse of 3
5. Inverse of 3
6. Contrapositive of 3
7. 𝑝 ⇔ ~𝑞
𝑝: I sleep past midnight
𝑞: I’m late
Write the following in words
1. 𝑝 ∧ ~𝑞 I sleep past midnight and I’m not late
2. ~𝑝 ∨ 𝑞
3. ~𝑝 → 𝑞
4. Converse of 3
5. Inverse of 3
6. Contrapositive of 3
7. 𝑝 ⇔ ~𝑞
𝑝: I sleep past midnight
𝑞: I’m late
Write the following in words
1. 𝑝 ∧ ~𝑞
2. ~𝑝 ∨ 𝑞 I don’t sleep past midnight or I am late
3. ~𝑝 → 𝑞
4. Converse of 3
5. Inverse of 3
6. Contrapositive of 3
7. 𝑝 ⇔ ~𝑞
𝑝: I sleep past midnight
𝑞: I’m late
Write the following in words
1. 𝑝 ∧ ~𝑞
2. ~𝑝 ∨ 𝑞
3. ~𝑝 → 𝑞 If I don’t sleep past midnight then I’m late
4. Converse of 3
5. Inverse of 3
6. Contrapositive of 3
7. 𝑝 ⇔ ~𝑞
𝑝: I sleep past midnight
𝑞: I’m late
Write the following in words
1. 𝑝 ∧ ~𝑞
2. ~𝑝 ∨ 𝑞
3. ~𝑝 → 𝑞 If I don’t sleep past midnight then I’m late
4. Converse of 3 If I’m late then I don’t sleep past midnight
5. Inverse of 3
6. Contrapositive of 3
7. 𝑝 ⇔ ~𝑞
𝑝: I sleep past midnight
𝑞: I’m late
Write the following in words
1. 𝑝 ∧ ~𝑞
2. ~𝑝 ∨ 𝑞
3. ~𝑝 → 𝑞 If I don’t sleep past midnight then I’m late
4. Converse of 3 If I’m late then I don’t sleep past midnight
5. Inverse of 3 If I sleep past midnight then I’m not late
6. Contrapositive of 3
7. 𝑝 ⇔ ~𝑞
𝑝: I sleep past midnight
𝑞: I’m late
Write the following in words
1. 𝑝 ∧ ~𝑞
2. ~𝑝 ∨ 𝑞
3. ~𝑝 → 𝑞 If I don’t sleep past midnight then I’m late
4. Converse of 3 If I’m late then I don’t sleep past midnight
5. Inverse of 3 If I sleep past midnight then I’m not late
6. Contrapositive of 3 If I’m not late then I sleep past midnight
7. 𝑝 ⇔ ~𝑞
𝑝: I sleep past midnight
𝑞: I’m late
Write the following in words
1. 𝑝 ∧ ~𝑞
2. ~𝑝 ∨ 𝑞
3. ~𝑝 → 𝑞
4. Converse of 3
5. Inverse of 3
6. Contrapositive of 3
7. 𝑝 ⇔ ~𝑞 I sleep past midnight if and only if I’m not late
𝒑 𝒒 ~𝒑 ~𝒒 (1) (2) (3) (4) (5) (6) (7) ~(~𝒑 → 𝒒)
T T
T F
F T
F F
1. 𝒑 ∧ ~𝒒
𝒑 𝒒 ~𝒑 ~𝒒 (1) (2) (3) (4) (5) (6) (7) ~(~𝒑 → 𝒒)
T T F F
T F F T
F T T F
F F T T
2. ~𝒑 ∨ 𝒒
𝒑 𝒒 ~𝒑 ~𝒒 (1) (2) (3) (4) (5) (6) (7) ~(~𝒑 → 𝒒)
T T F F F
T F F T T
F T T F F
F F T T F
3. ~𝒑 → 𝒒
𝒑 𝒒 ~𝒑 ~𝒒 (1) (2) (3) (4) (5) (6) (7) ~(~𝒑 → 𝒒)
T T F F F T
T F F T T F
F T T F F T
F F T T F T
4. 𝒒 → ~𝒑
𝒑 𝒒 ~𝒑 ~𝒒 (1) (2) (3) (4) (5) (6) (7) ~(~𝒑 → 𝒒)
T T F F F T T
T F F T T F T
F T T F F T T
F F T T F T F
5. 𝒑 → ~𝒒
𝒑 𝒒 ~𝒑 ~𝒒 (1) (2) (3) (4) (5) (6) (7) ~(~𝒑 → 𝒒)
T T F F F T T F
T F F T T F T T
F T T F F T T T
F F T T F T F T
6. ~𝒒 → 𝒑
𝒑 𝒒 ~𝒑 ~𝒒 (1) (2) (3) (4) (5) (6) (7) ~(~𝒑 → 𝒒)
T T F F F T T F F
T F F T T F T T T
F T T F F T T T T
F F T T F T F T T
7.𝑝 ⇔ ~𝑞
𝒑 𝒒 ~𝒑 ~𝒒 (1) (2) (3) (4) (5) (6) (7) ~(~𝒑 → 𝒒)
T T F F F T T F F T
T F F T T F T T T T
F T T F F T T T T T
F F T T F T F T T F
7.𝑝 ⇔ ~𝑞
𝒑 𝒒 ~𝒑 ~𝒒 (1) (2) (3) (4) (5) (6) (7) ~(~𝒑 → 𝒒)
T T F F F T T F F T F
T F F T T F T T T T T
F T T F F T T T T T T
F F T T F T F T T F F
7.𝑝 ⇔ ~𝑞
𝒑 𝒒 ~𝒑 ~𝒒 (1) (2) ~𝒑 → 𝒒 (4) (5) (6) (7) ~(~𝒑 → 𝒒)
T T F F F T T F F T F F
T F F T T F T T T T T F
F T T F F T T T T T T F
F F T T F T F T T F F T
Logical Equivalence
Two statements are said to be logically equivalent if they
have the same truth value for every possible cases.
Show that the following are logically equivalent:
~(𝒑 ∨ 𝒒) 𝑎𝑛𝑑 ~𝒑 ∧ ~𝒒

𝑝 𝑞 𝑝 ∨𝑞 ~(𝒑 ∨ 𝒒) ~𝑝 ~𝑞 ~𝒑 ∧ ~𝒒
T T T F F F F
T F T F F T F
F T T F T F F
F F F T T T T

For every possible cases of truth values for 𝒑 and 𝒒, the two statements have the
same truth value. Thus they are logically equivalent.
The following table contains some important logical equivalences.
Logical Equivalence Name
𝒑 ∧𝑻 ⇔ 𝒑 𝒑 ∨ 𝑭⇔𝒑 Identity laws
𝒑 ∨𝑻⇔𝑻 𝒑 ∧ 𝑭⇔𝑭 Domination laws
𝒑 ∨𝒑𝒑 𝒑 ∧𝒑𝒑 Idempotent laws
~(~𝒑) ⇔ 𝒑 Double negation laws
𝒑∨𝒒𝒒∨𝒑 𝒑∧𝒒𝒒∧𝒑 Commutative laws
(𝒑 ∨ 𝒒) ∨ 𝒓 ⇔ 𝒑 ∨ (𝒒 ∨ 𝒓) (𝒑 ∧ 𝒒 ) ∧ 𝒓 ⇔ 𝒑 ∧ (𝒒 ∧ 𝒓) Associative laws
𝒑 ∨ (𝒒 ∧ 𝒓) ⇔ (𝒑 ∨ 𝒒) ∧ (𝒑 ∨ 𝒓) 𝒑 ∧ (𝒒 ∨ 𝒓)  (𝒑 ∧ 𝒒) ∨ (𝒑 ∧ 𝒓) Distributive laws
~(𝒑 ∧ 𝒒 ) ~𝒑 ∨ ~𝒒 ~(𝒑 ∨ 𝒒 )  ~𝒑 ∧ ~𝒒 De Morgan’s laws
Tautology – a compound proposition that is ALWAYS
TRUE, regardless of the truth values of the propositions
that occur in it.

Contradiction – a compound proposition that is ALWAYS


FALSE.

Contingency – neither a tautology nor a contradiction.


Consider the compound propositions 𝒑 ∧ ~𝒑 and 𝒑 ∨ ~𝒑.
Determine whether statement is tautology, contradiction
or contingency.
𝑝 ~𝑝 𝑝 ∧ ~𝑝 𝑝 ∨ ~𝑝
T F F T
F T F T
Contradiction Tautology

The propositions p and q are logically equivalent if p ⟺ q is a tautology.


Logic
Symbolic Arguments
Intended Learning
Outcomes
• Apply logic in determining the validity of
arguments.
Symbolic Arguments
A symbolic argument consists of premises and a
conclusion.

An argument is valid when its conclusion necessarily


follows from a given set of premises.

An argument is invalid or a fallacy when the conclusion


does not necessarily follow from the given set of
premises.
Symbolize the argument, construct the truth table, and determine if the
argument is valid.
𝒑: The senator supports new taxes.
𝒒: The senator is reelected.

Statement Symbolic Form


If the senator supports new taxes then he will not be reelected. 𝑝 → ~𝑞

The senator does not support new taxes. ~𝑝


Therefore, the senator is reelected. 𝑞

Hypothesis: (𝑝 → ~𝑞) ∧ ~𝑝
Conclusion: 𝒒

Argument: 𝒑 → ~𝒒 ∧ ~𝒑 → 𝒒
Determine if the argument is valid.

Argument: ((p → ~q) ∧ ~p) → q


𝒑 𝒒 ~𝒒 ~𝒑 𝒑 → ~𝒒 (𝒑 → ~𝒒) ∧ ~𝒑 𝒑 → ~𝒒 ∧ ~𝒑 → 𝒒
T T F F F F T
T F T F T F T
F T F T T T T
F F T T T T F

Since the last row is false, the argument is INVALID.


Symbolize the argument, construct a truth table, and determine if the
argument is valid.
𝑆: It will be sunny.
𝐶: It will be cloudy.

Statement Symbolic
It will be sunny or cloudy today. 𝑺 ∨ 𝑪
It isn’t sunny. ~𝑺
Therefore, it will be cloudy C. 𝑪

Premise: (𝑆 ∨ 𝐶) ∧ ~ 𝑆
Conclusion: 𝐶
Argument: ((𝑺 ∨ 𝑪) ∧ ~ 𝑺) 𝑪
Determine if the argument is valid.

Argument: ((S ∨ C)∧ ~ S) → C

𝑺 𝑪 ~𝑺 𝑺 ∨ 𝑪 (𝑺 ∨ 𝑪) ∧ ~ 𝑺 𝑺 ∨ 𝑪 ∧ ~𝑺 → 𝑪
T T F T F T
T F F T F T
F T T T T T
F F T F F T

Since all are true, the argument is VALID.


Symbolize the argument, construct a truth table, and
determine if the argument is valid.

1. If you complete your computer training, you can be


eligible to work in the computer lab. You did not finish
your computer training. Therefore, you can not work in
the computer lab.

2. If I pass the exam, then I will graduate. I graduated.


Therefore, I passed the exam.
Euler diagrams – graphic depiction commonly used to illustrate relationships
between sets or groups.

Diagrams are usually drawn with circles or ovals.

Inclusion is represented by overlapping circles.

Exclusion is represented by non-overlapping circles.

Euler diagram is named after Swiss Mathematician Leonhard Euler.


All
that
All wizards can do magic can do
Lizards Wizards

No lizards can do magic. Magic

∴ No wizard is a lizard

Magic
Lizards

Wizards
Argument
is VALID
Argument is VALID only if every possible diagram illustrates the
conclusion of the argument.
Time-
Toasters
Made travel
of gold
All toasters are made of gold machines

Some things made of gold are time-travel machines.


∴ Toasters are not time travel-machines

Time travel
machines Argument
Gold is
INVALID
Toasters

Argument is VALID only if every possible diagram illustrates the


conclusion of the argument.
Using Euler diagram, state whether the argument is valid or not.
1. All runners are athletes.
Tam is a runner.
∴ Tam is an athlete.

2. All runners are athletes.


Piyo is not an athlete.
∴ Piyo is not a runner.
3. All runners are athletes.
Fe is an athlete.
∴ Fe is a runner.
Nocon, R., Nocon, E., Essential Mathematics for the Modern World, 2nd ed. 2018

Online references:
Euler Diagram and Argument Analysis, Retrieved from
https://www.youtube.com/watch?v=KCopWgrMFZg
https://www.radford.edu/~wacase/Section%203.5%20math%20116%20spring%202007.
pdf

You might also like