Lesson 4: The Language of
Logic
Mr. Mhark Jay O. Benitez
Math Faculty, Department of Mathematics and Natural Sciences
University of Northern Philippines
Math 101 - Mathematics in the Modern World 1
Nature of Logic
• Logic is commonly known as the science of reasoning.
*Mathematical Reasoning and arguments are based on the rules of
logic.
• A statement is a declarative sentence that is either true or false, but
not both true and false.
• A simple statement is a single statement which does not contain
other statements as parts.
• A compound statement contains two or more statements.
• A logical connective combines simple statement into compound
statement.
Math 101 - Mathematics in the Modern World 2
Consider the following examples:
a: Alex loves Emma.
b: Batman is left-handed.
c: Columbus discovered the Philippines.
d: Dynamite is dangerous.
e: Elephant have wings.
f: Five is less than 10
p: How are you?
q: Get out of the building now!
r: Study your lesson everyday!
s: When Robin Padilla was only 12 years old, he defeated Manny Pacquiao in a
boxing match.
Math 101 - Mathematics in the Modern World 3
The main parts of symbolic logic are statements
and connectives. The following table shows some
basic propositional logic with their symbols.
Connectives Type of Symbols Example Statement
Statement
Not Negation ~ ~p not p
And/But Conjunction ^ P^q p and q
Or Disjunction v pvq p or q
Implies Conditional → p→q If p, then q
If and only if Biconditional ↔ p↔q p if and only if q
Math 101 - Mathematics in the Modern World 4
Consider the following statements:
h: Harry is not happy.
v: Harry is going to watch a volleyball game.
r: It is going to rain.
s: Today is Sunday.
Write the following compound statement in symbolic form.
a. Today is Sunday and Harry is not happy.
b. If it is going to rain, then Harry is not going to watch a volleyball game.
c. Harry is happy only if it is not going to rain.
d. Harry is going to watch a volleyball game or it is going to rain.
e. Today is Sunday and Harry is not going to watch a volleyball game.
f. Harry is going to watch a volleyball game if and only if he is happy.
Math 101 - Mathematics in the Modern World 5
Answers:
a. 𝑠 ∧ ℎ
b. 𝑟 → ~𝑣
c. ~ℎ → ~𝑟
d. 𝑣 ∨ 𝑟
e. 𝑠 ∧ ~𝑣
f. v ↔ ~h
Math 101 - Mathematics in the Modern World 6
Convert the following symbolic statements into
words given the following propositions.
p: Andrei plays volleyball.
q: Seve plays basketball
a. ~𝑝
b. 𝑝 ∧ 𝑞
c. 𝑝 → ~𝑞
d. 𝑝 ∨ (~𝑝 → 𝑞)
Math 101 - Mathematics in the Modern World 7
Answers:
a. Andrei does not play volleyball.
b. Andrei plays volleyball while Seve plays basketball.
c. If Andrei plays volleyball, then Seve does not play basketball.
d.Andrei plays volleyball, or if Andrei does not play volleyball, then Seve
plays basketball.
Math 101 - Mathematics in the Modern World 8
Activity:
Consider the following statements:
p: Mhark is a singer.
q: Mhark is a songwriter.
r: Mhark is an actor.
a. Write (𝑝 ∧ 𝑞) → ~𝑟 into words.
b. “If Mhark is an actor, then Mhark is not a singer and Mhark is
not a songwriter” in symbolic form.
Math 101 - Mathematics in the Modern World 9
Answers:
Consider the following statements:
p: Mhark is a singer.
q: Mhark is a songwriter.
r: Mhark is an actor.
a. If Mhark is a singer and Mhark is a songwriter, then Mhark is not an
actor.
b. 𝑟 → (~𝑝 ∧ ~𝑞)
Math 101 - Mathematics in the Modern World 10
The Converse,the Inverse, and the
Contrapositive
The conditional statement, p (antecedent) → q (consequent), has the
following forms:
a. If p, then q.
b. p implies q.
c. p only if q.
d. Not p or q.
e. Every p is q.
f. q, if p.
g. q provided that p.
h. q is a necessary condition for p.
i. p is a sufficient condition for q.
j. p yields q.
k. q follows from p.
Math 101 - Mathematics in the Modern World 11
Example:
• Consider the following statements.
p: x is a prime number.
q: x is odd.
Formalize the following statements
a. x is being prime is a sufficient condition for being odd.
b. x being odd is a necessary condition for being prime.
Math 101 - Mathematics in the Modern World 12
Activity
• Write each statement in the form “If p, then q.”
a. I will be able to tour abroad next year provided that I have my
passport renewed.
b. Every triangle that is not a right triangle is an oblique triangle.
Math 101 - Mathematics in the Modern World 13
Answers:
• Write each statement in the form “If p, then q.”
a. I will be able to tour abroad next year provided that I have my
passport renewed.
Answer: If I have my passport renewed, then will be able to tour
abroad next year.
b. Every triangle that is not a right triangle is an oblique triangle.
Answer: If a triangle is not a right triangle, then it is an oblique
triangle.
Math 101 - Mathematics in the Modern World 14
Derived Forms of a conditional Statement
• There are three ways to restate a conditional statement; the converse, the
inverse, and the contrapositive.
• The conditional statement, 𝑝 → 𝑞, may be restated in the following
forms.
Converse Form : 𝒒→𝒑
Inverse Form: ~𝒑 → ~𝒒
Contrapositive: ~𝒒 → ~𝒑
Math 101 - Mathematics in the Modern World 15
Example:
• Write the converse, inverse, and contrapositive of the given sentence.
“She is allowed to join the volleyball team, only if she knows how to receive the
ball.”
Solution:
𝒑 → 𝒒: If she is allowed to join the volleyball team, then she knows
how to receive the ball.
Converse Form : 𝒒 → 𝒑: If she knows how to receive the ball, then she is
allowed to join the volleyball team.
Inverse Form: ~𝒑 → ~𝒒: If she is not allowed to join the volleyball team,
then she does not know how to receive the ball.
Contrapositive: ~𝒒 → ~𝒑: If she does not know how to receive the ball,
then she is not allowed to join the volleyball team.
Math 101 - Mathematics in the Modern World 16
Activity
• Write the converse, inverse, and contrapositive of the given sentence.
“Every rectangle is a parallelogram.”
“I win the tennis match only if I will fly to Cebu City.”
Math 101 - Mathematics in the Modern World 17
Answer:
• Write the converse, inverse, and contrapositive of the given sentence.
“Every rectangle is a parallelogram.”
Solution:
𝒑 → 𝒒: If it is a rectangle, then it is a parallelogram.
Converse Form : 𝒒 → 𝒑: If it a parallelogram, then it is rectangle.
Inverse Form: ~𝒑 → ~𝒒 : If it is not a rectangle, then it is not a
parallelogram.
Contrapositive: ~𝒒 → ~𝒑: If it is not a parallelogram, then it is not a
rectangle.
Math 101 - Mathematics in the Modern World 18
Answer:
• Write the converse, inverse, and contrapositive of the given sentence.
“I win the tennis match only if I will fly to Cebu City.”
Solution:
𝒑 → 𝒒: If I win the tennis match, then I will fly to Cebu City.
Converse Form : 𝒒 → 𝒑: If I will fly to Cebu City, then I will win the
tennis match.
Inverse Form: ~𝒑 → ~𝒒: If I will lose the tennis match, then I will not fly
to Cebu City.
Contrapositive: ~𝒒 → ~𝒑: If I will not fly to Cebu City, then I will lose the
tennis match.
Math 101 - Mathematics in the Modern World 19
Truth Tables
• A logical statement may either be true or false. If the statement is
true, then the truth value corresponding to the statement is true and
is denoted by the letter T. If it is false, the statement has a value
denoted by F.
• A truth table is a tabulation of possible truth values of a statement
depending on the value of its constituent statements.
• The truth table is a summary of all possible truth values of a
statement.
Math 101 - Mathematics in the Modern World 20
Connectives are operations that allow us combine
statements to form compound statements
• Assertion
p
T
F
• Negation
p ~p
T F
F T
Math 101 - Mathematics in the Modern World 21
• Conjunction
p q 𝒑 ∧ 𝒒
T T T
T F F
F T F
F F F
• Disjunction
p q 𝒑 ∨ 𝒒
T T T
T F T
F T T
F F
Math 101 - Mathematics in the Modern World
F 22
• Conditional/Implication
p q 𝒑 → 𝒒
T T T
T F F
F T T
F F T
• Biconditional
p q 𝒑 ↔ 𝒒
T T T
T F F
F T F
F F
Math 101 - Mathematics in the Modern World
T 23
Example:
• Construct the truth table for the compound statement.
(𝑝 ∨ 𝑞) ∧ ~𝑝
Solution:
p q 𝑝 ∨ 𝑞 ~p (𝑝 ∨ 𝑞) ∧ ~𝑝
T T T F F
T F T F F
F T T T T
F F F T F
Math 101 - Mathematics in the Modern World 24
Example:
• Find the truth table of ~ 𝑝 ∨ ( ~ 𝑞 → 𝑝 )
p q ~𝑝 ~𝑞 ~𝑞 → 𝑝 ~𝑝 ∨ (~𝑞 → 𝑝)
T T F F T T
T F F T T T
F T T F T T
F F T T F T
If the truth value of a compound statement is always TRUE
regardless of the truth values of each of the component
statements, then the statement is said to be a TAUTOLOGY.
Math 101 - Mathematics in the Modern World 25
Example:
• Show that the compound statement 𝑝 ∧ (~ 𝑝 ∧ 𝑞) is always false.
p q ~𝑝 ~𝑝 ∧ 𝑞 𝑝 ∧ (~ 𝑝 ∧ 𝑞)
T T F F F
T F F T F
F T T F F
F F T F F
If the truth value of a compound statement is always FALSE
regardless of the truth values of each of the component
statements, then the statement is a CONTRADICTION.
Math 101 - Mathematics in the Modern World 26
Activity
• Show that ~ ( 𝑝 ∨ ~ 𝑝 ) is a contradiction.
• Show that [( 𝑝 ∨ 𝑞 ) ∧ ~ 𝑞 ] → 𝑝 is a tautology.
Math 101 - Mathematics in the Modern World 27
Logical Equivalence
• Compound statements that displays the same truth values in all cases are
logically equivalent statement. The notation p ≡ q means p and q are
logically equivalent statements, or simply equivalent statements.
• Show that ~ (𝑝 ∨ 𝑞) is logically equivalent to ~ 𝑝 ∧ ~ 𝑞.
p q 𝑝 ∨ 𝑞 ~ (𝒑 ∨ 𝒒) ~𝑝 ~𝑞 ~𝒑 ∧ ~𝒒
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
• Since they display the same truth values for all possible values of their
simple statements, they are equivalent statements, ~ (𝑝 ∨ 𝑞) ≡ ~ 𝑝 ∧
~ 𝑞.
Math 101 - Mathematics in the Modern World 28
Facts about the Conjunction and Disjunction
• Given two statements p and q,
Statement Equivalent form
p and q q and p
p or q q or p
p or q If not p, then q.
Math 101 - Mathematics in the Modern World 29
De Morgan's Law for Logic
• Given two statements p and q,
~ (𝑝 ∨ 𝑞) ≡ ~𝑝 ∧ ~𝑞
~ (𝑝 ∧ 𝑞) ≡ ~𝑝 ∨ ~𝑞
Math 101 - Mathematics in the Modern World 30
Use De Morgan's law to write each statement
in an equivalent form
• a. It is not true that, I swam or I climed.
Let p: I swam, and q: I climed
~ (𝑝 ∨ 𝑞) ≡ ~𝑝 ∧ ~𝑞
The statement is equivalent to: I did not swim and I did not climb.
• b. I did not finish the race and I did not get my finisher's medal.
Let p: I finished the race, and q: I got my finisher's medal.
~𝑝 ∧ ~𝑞 ≡ ~ (𝑝 ∨ 𝑞)
The statement is equivalent to: It is not true that, I finished the race or I
got my finisher's medal.
Math 101 - Mathematics in the Modern World 31
Activity
Use De Morgan's Laws to show that the following statements
are contradictions.
• a. ~ (𝑝 ∨ ~𝑝)
• b. ~[𝑝 ∨ (~𝑝 ∨ 𝑞) ]
Math 101 - Mathematics in the Modern World 32
Activity
Prove the following statement:
1. Show that an implication 𝑝 → 𝑞 is equivalent to its
contrapositive ~𝑞 → ~𝑝.
2. Show that 𝑝 → 𝑞 is not logically equivalent to ~𝑝 →
~𝑞.
3. Show that for any statement p and q, the compound
statement ~(𝑝 → 𝑞) is equivalent to 𝑝 ∧ ~𝑞.
Math 101 - Mathematics in the Modern World 33
Equivalent Forms for p→q AND p↔q
𝑝 → 𝑞 ≡ ~𝑝 ∨ 𝑞
𝑝 ↔ 𝑞 ≡ (𝑝 → 𝑞) ∧ (𝑞 → 𝑝)
Math 101 - Mathematics in the Modern World 34
Quantifiers
• In mathematics, quantifiers describe the quantity of objects in the
domain of functions or simply the quantity of objects in a set that
satisfies some defined characteristics. The two quantifiers that appear
often in mathematics are “for all” and “there exists”.
Types of Quantifiers
Universal Quantifiers Ɐ Existential Quantifiers ⱻ
For all Some
All There exists
Every At least one
None
No Math 101 - Mathematics in the Modern World 35
Write Universal Quantifiers into Math
Language
a. For all real numbers x and y, if
xy is greater than zero, then
either both x and y are negative
or both are positive.
b. For all integers x and y, x + y is
an integer.
c. For all real numbers x and y, if x
+ y = 0, then x = -y.
Math 101 - Mathematics in the Modern World 36
Write Existential Quantifiers into Math
Language
a. For any non-zero real number
x, there is a real number y such
that xy=1.
b. For any real number x and y, if
x>y, then there is a real number
w such that x>w>y.
Math 101 - Mathematics in the Modern World 37
Negation of Quantifiers
Quantified Statements and their Negations
Statement Negation
All M are J. Some M are not J.
No M are J. Some M are J.
Some M are not J. All M are J.
Some M are J. No M are J.
Math 101 - Mathematics in the Modern World 38
Write the negation of Quantified statements.
1. Some dogs are poodles.
Some M are J. No M are J.
Answer:No dogs are poodles.
2. All acute angles are less than 90 All M are J. Some M are not J.
degrees in measure.
Answer: Some acute angles are not
less than 90 degrees in measure.
3. No triangles are quadrilaterals.
Answer: Some triangles are No M are J. Some M are J.
quadrilaterals.
Math 101 - Mathematics in the Modern World 39