0% found this document useful (0 votes)
15 views

Module-4_Lesson-4.1-Logic (1)

fdhtyjhrsdf
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Module-4_Lesson-4.1-Logic (1)

fdhtyjhrsdf
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Lesson 4.

1
Logic
OBJECTIVES

At the end of the lesson, the students


are expected to do the following:
a. illustrate and symbolize a proposition,
b. perform the different logical
operators,
c. determine the truth value of a
proposition.
Question to Ponder!

How is mathematics seen in the real-life


propositions or statements?
Proposition

a declarative statement that is either true


or false, but cannot be both.
Examples:

1. Leyte is a province of Philippines.


2. Alangalang is the Capital of Leyte.
3. 2+3=5
4. 2 is a prime number.
5. √2 is an integer.
Not Examples:

1. How are you?


2. Welcome to Visayas State University!
3. Follow the protocols imposed to
mitigate the COVID 19 Pandemic.
4. x-2=0
5. 𝒂𝟐 + 𝒃𝟐 = 𝒄𝟐
Simple vs. Compound Proposition

A simple or atomic proposition is a


proposition that cannot be broken down
into simpler propositions.
A compound proposition is a proposition
that is formed by connecting simple
propositions using logical connectors.
Examples: Simple Propositions

1. Leyte is a province of Philippines.


2. Alangalang is the Capital of Leyte.
3. 2+3=5
4. 2 is a prime number.
5. √2 is an integer.
Examples: Compound Propositions
1. Two is not a prime number.
2. 1/2 is a rational number and e is an irrational
number.
3. Either 3 is odd, or 9 is an even number.
4. If psychology starts with letter “s”, then
Philippines starts with letter “f”.
5. The word Mathematics has eleven letters
if and only if logic has five letters.
Propositional Variables

Usually used variables are


𝒑, 𝒒, 𝒓, 𝒔, 𝒕, … , 𝒐𝒓 𝒑𝟏 , 𝒑𝟐 , ….
Examples: Compound Propositions
1. Two is not a prime number.
Let p: Two is a prime number.
In symbols, the proposition can be expressed as
∼𝒑
2. 1/2 is a rational number and e is an irrational
number.
Let q: 1/2 is a rational number.
Let r: e is an irrational number.
In symbols, the proposition can be expressed as
𝒒∧𝒓
Examples: Compound Propositions
3. Either 3 is odd, or 9 is an even number.
Let s: 3 is odd.
Let t: 9 is an even number.
In symbols, the proposition can be expressed as
𝒔∨𝒕
4. If psychology starts with letter “s”, then
Philippines starts with letter “f”.
Let u: Psychology starts with letter “s”.
Let v: Philippines starts with letter “f”.
In symbols, the proposition can be expressed as
𝒖→𝒗
Examples: Compound Propositions
5. The word Mathematics has eleven letters
if and only if logic has five letters.
Let w: The word Mathematics has eleven letters
Let x: Logic has five letters.
In symbols, the proposition can be expressed as
𝒘↔𝒙
Constructing Truth Tables
Let p be a proposition.
Truth Table
T p
p T
F
F
Constructing Truth Tables
Let p and q be propositions. Truth Table
p Pairing q p q
T T
T
T T F
F
F T
T
F F F
F
Constructing Truth Tables
Let p, q. and r be propositions. Truth Table
p q r
p Pairing q Pairing r T T T
T T F
T T
F T F T
T T T F F
F F F T T
T F T F
T F
F T F F T
F F F F F
Constructing Truth Tables
p q r
p q T T T
T T F
T T T F T
p
T T F T F F
F T T
F F T F T F
F F T
F F F F F
Constructing Truth Tables
p q r s
T T T T
T T T F
T T F T
T T F F
T F T T
T F T F
T F F T
T F F F
F T T T
F T T F
F T F T
F T F F
F F T T
F F T F
F F F T
F F F F
Logical Connectives
NEGATION

❑ The negation of a proposition p is


denoted by read as “not p”,
and is defined through the truth
table
p
T F
F T
Logical Connectives
NEGATION

❑ The negation of a proposition p is


denoted by read as “not p”,
and is defined through the truth
table
❑ Example
p: A square is a rectangle. T
: A square is not a rectangle. F
Logical Connectives
CONJUNCTION
❑ The conjunction of propositions p and q
is denoted by read as “p and q”,
and is defined through its truth table
p q
T T T ❑ If both p and q are
true, the conjunction
T F F will be TRUE.
F T F Otherwise, FALSE
F F F
Logical Connectives
CONJUNCTION
❑ The conjunction of propositions p and q
is denoted by read as “p and q”,
and is defined through its truth table

❑ Example
p: Triangle has three sides. ❑T
q: Quadrilaterals has five sides ❑F
: Triangle has three sides while
❑F
quadrilaterals has five sides.
Logical Connectives
DISJUNCTION
❑ The disjunction of propositions p and q
is denoted by read as “p or q”,
and is defined through its truth table
p q
T T T ❑ If at least one is true
for p and q, the
T F T disjunction will be
F T T TRUE. Otherwise,
F F F FALSE
Logical Connectives
DISJUNCTION
❑ The disjunction of propositions p and q
is denoted by read as “p or q”,
and is defined through its truth table
❑ Example
p: A Right angle measures exactly 90°.❑ T
q: Two lines are perpendicular. ❑ T/F
:A Right angle measures exactly 90° or
two lines are perpendicular. ❑T
Logical Connectives
CONDITIONAL
❑ The conditional of propositions p and q
is denoted by read as “If p, then
q.”, and is defined through its truth table
p q ❑ p is the hypothesis while q
T T T is the conclusion.
❑ If the hypothesis is TRUE
T F F and the conclusion is
F T T FALSE, the conditional
will be FALSE. Otherwise,
F F T TRUE
Logical Connectives
CONDITIONAL
❑ The conditional of propositions p and q
is denoted by read as “If p, then
q.”, and is defined through its truth table
❑ Example
p: 3 is a non-zero integer. ❑ T
q: 112 is divisible by 3. ❑F
:If 3 is a non-zero integer, then 112 is
divisible by 3 ❑F
Logical Connectives

❑ The conditional of propositions q and p


is denoted by read as “If q, then
p.”, and is defined through its truth table
p q ❑ q is the hypothesis while p
is the conclusion.
T T T ❑ If the hypothesis is TRUE
T F T and the conclusion is
FALSE, the conditional
F T F will be FALSE. Otherwise,
TRUE
F F T
Logical Connectives

❑ The conditional of propositions q and p


is denoted by read as “If q, then
p.”, and is defined through its truth table
❑ Example
p 3 is a non-zero integer,. ❑ F
q: 112 is divisible by 3 ❑T
: If 112 is divisible by 3, then 3 is a non-
zero integer, ❑T
Logical Connectives
BICONDITIONAL
❑ The biconditional of propositions p and
q is denoted by read as “p if and
only if q.”, and is defined through its truth
table
p q ❑ If the components p and q
T T T are both TRUE or both
FALSE, then the
T F F biconditional will always
F T F be TRUE. Otherwise,
FALSE.
F F T
Logical Connectives
BICONDITIONAL
❑ The biconditional of propositions p and
q is denoted by read as “p if and
only if q.”, and is defined through its truth
table
❑ Example
p: Circle has no sides. ❑T
q: Polygon has sides. ❑T
:Circle has no sides if and only if
polygons have sides. ❑T
Logical Connectives
Example
❑ Given the propositions with symbols,
write these propositions using p, q, and r
and logical connectives (including
negations).
Given p, q, and r be the propositions
❑ p: You get an A on the final exam.
❑ q: You do every exercise in this book.
❑ r: You get an A in this class.
Logical Connectives
Example
Given p, q, and r be the propositions
❑ p: You get an A on the final exam.
❑ q: You do every exercise in this book.
❑ r: You get an A in this class.

1. You get an A in this class, but you do not


do every exercise in this book.
Answer:
𝑟 ∧∼ 𝑞
Logical Connectives
Example
Given p, q, and r be the propositions
❑ p: You get an A on the final exam.
❑ q: You do every exercise in this book.
❑ r: You get an A in this class.
2. You get an A on the final, you do every
exercise in this book, and you get an A in
this class.
Answer:
𝑝∧𝑞∧𝑟
Logical Connectives
Example
Given p, q, and r be the propositions
❑ p: You get an A on the final exam.
❑ q: You do every exercise in this book.
❑ r: You get an A in this class.

3. If you get an A in this class, then you have


to get an A on the final.
Answer:
𝑝→𝑟
Logical Connectives
Example
Given p, q, and r be the propositions
❑ p: You get an A on the final exam.
❑ q: You do every exercise in this book.
❑ r: You get an A in this class.
4. You get an A on the final, but you don’t do
every exercise in this book; nevertheless,
you get an A in this class.
Answer:
[𝑝 ∧ (∼ 𝑞)] ∧ 𝑟
Logical Connectives
Example
Given p, q, and r be the propositions
❑ p: You get an A on the final exam.
❑ q: You do every exercise in this book.
❑ r: You get an A in this class.
5. Getting an A on the final and doing every
exercise in this book is sufficient for
getting an A in this class.
Answer:
𝑝∧𝑞 →𝑟
Logical Connectives
Example
Given p, q, and r be the propositions
❑ p: You get an A on the final exam.
❑ q: You do every exercise in this book.
❑ r: You get an A in this class.
6. You will get an A in this class if and only
if you either do every exercise in this
book or you get an A on the final.
Answer:
𝑟 ↔ (𝑞 ∨ 𝑝)
Logical Connectives
Example
Suppose p and q are propositions.
p: I bought a raffle ticket this week.
q: I won the million-peso jackpot.
Express each of these propositions as an English
sentence.
1. ∼p∧∼q
Answer: I did not buy a raffle ticket this
week and did not win the million-peso
jackpot.
Logical Connectives
Example
Suppose p and q are propositions.
p: I bought a raffle ticket this week.
q: I won the million-peso jackpot.
Express each of these propositions as an English
sentence.
2. p∨q
Answer:
Either I bought a raffle ticket this week or I
won the million-peso jackpot.
Logical Connectives
Example
Suppose p and q are propositions.
p: I bought a raffle ticket this week.
q: I won the million-peso jackpot.
Express each of these propositions as an English
sentence.
3. ∼q→∼p
Answer:
If I did not win the million-peso jackpot,
then I did not buy a raffle ticket this week.
Logical Connectives
Example
Suppose p and q are propositions.
p: I bought a raffle ticket this week.
q: I won the million-peso jackpot.
Express each of these propositions as an English
sentence.
4. ∼p∨(p∧q)
Answer:
Either I did not buy a raffle ticket this week,
or I bought a raffle ticket and won the
million-peso jackpot.
Precedence of Logical Operators
(NAOCB Rule)
Example

𝑝 ↔ 𝑞 ∧ 𝑟 →∼ 𝑞 ∨ 𝑟 𝑚𝑒𝑎𝑛𝑠 𝑝 ↔ [(𝑞 ∧ 𝑟) → (∼ 𝑞) ∨ 𝑟)]


𝑝 → 𝑞 ∨ 𝑟 𝑚𝑒𝑎𝑛𝑠 𝑝 → 𝑞 ∨ 𝑟
𝑝 ∨ 𝑞 ∧ 𝑟 𝑚𝑒𝑎𝑛𝑠 𝑜𝑟 𝑝 ∨ 𝑞 ∧ 𝑟
∼ 𝑝 ∨ 𝑞 𝑚𝑒𝑎𝑛𝑠 (∼ 𝑝) ∨ 𝑞
Example
Suppose p is True, q is False, and r is False,
determine the truth value of the following.
1. ∼ 𝑝 ∧ 𝑝 ∨∼ 𝑞
Answer:
∼ 𝑝 ∧ 𝑝 ∨∼ 𝑞 ≡ ∼ 𝑝 ∧ 𝑝 ∨ ∼ 𝑞
≡ ∼𝑇 ∧𝑇 ∨ ∼𝐹
≡ 𝐹∧𝑇 ∨𝑇
≡𝐹∨𝑇
≡𝑻
Example
Suppose p is True, q is False, and r is False,
determine the truth value of the following.
2. 𝑝 ↔ 𝑞 ∧ 𝑟 →∼ 𝑞 ∨ 𝑟
Answer:
𝑝 ↔ 𝑞 ∧ 𝑟 →∼ 𝑞 ∨ 𝑟 ≡ 𝑝 ↔ 𝑞 ∧ 𝑟 → ∼ 𝑞 ∨ 𝑟
≡𝑇 ↔ 𝐹∧𝐹 → ∼𝐹 ∨𝐹
≡𝑇 ↔ 𝐹 → 𝑇∨𝐹
≡𝑇↔ 𝐹→𝑇
≡𝑇↔𝑇
≡𝑻
Further Examples
Determine whether the following is a proposition or not a
proposition.
a. It is not true that 1 is a prime number.
Answer: Proposition
b. x+1=y
Answer: Not a proposition
c. How is (x, y) be solved in an equation y=x+1 and y=2x+3?
Answer: Not a proposition

46
Further Examples
Determine whether the following statements are TRUE or FALSE.
a. It is not the case that mathematics in the modern world is a
general education course.
Solution:
Let p: Mathematics in the modern world is a general education
course. True
The sentence in symbols: ∼ 𝒑
Operating the truth value: ∼ 𝑻 ≡ 𝑭
Therefore, the proposition is False.
47
Further Examples
Determine whether the following statements are TRUE or FALSE.
b. Either Leonardo of Pisa discovered Fibonacci sequence or
George Polya did not discover the Four-Step Problem Solving
Strategy.
Solution:
Let p: Leonardo of Pisa discovered Fibonacci sequence. True
Let q: George Polya discovered the Four-Step Problem Solving Strategy.
True
The sentence in symbols: 𝒑 ∨∼ 𝒒
Operating the truth value: 𝑻 ∨∼ 𝑻 ≡ 𝑻 ∨ 𝑭 ≡ 𝑻
Therefore, the proposition is True.
48
Further Examples
Determine whether the following statements are TRUE or FALSE.
c. COVID-19 Pandemic affected millions of people worldwide and
caused long distance learning in education.
Solution:
Let p: COVID-19 Pandemic affected millions of people worldwide. True
Let q: COVID-19 Pandemic caused long distance learning in education. True
The sentence in symbols: 𝒑 ∨ 𝒒
Operating the truth value: 𝑻 ∨ 𝑻 ≡ 𝑻
Therefore, the proposition is True.
49
Further Examples
Determine whether the following statements are TRUE or
FALSE.
d. If 0 is a natural number, then 0 is a real number.
Solution:
Let p: 0 is a natural number. False
Let q: 0 is a real number. True
The sentence in symbols: 𝒑 → 𝒒
Operating the truth value: 𝑭 → 𝑻 ≡ 𝑻
Therefore, the proposition is True.
50
Further Examples
Determine whether the following statements are TRUE or FALSE.
e. 5 is an odd number if and only if 2 is a prime number.
Solution:
Let p: 5 is an odd number . True
Let q: 2 is a prime number. True
The sentence in symbols: 𝒑 ↔ 𝒒
Operating the truth value: 𝑻 → 𝑻 ≡ 𝑻
Therefore, the proposition is True.
51
Further Examples
Given the statements below, express statement into its symbolic
form. Then, determine its truth value.
If either a triangle with two congruent sides is an isosceles
triangle or an equilateral triangle is an isosceles triangle, then it
is not the case that a triangle has three sides.
Solution:
Let p: A triangle with two congruent sides is an isosceles triangle. True
Let q: An equilateral triangle is an isosceles triangle. True
Let r: A triangle has three sides. True
In symbols: 𝒑 ∨ 𝒒 →∼ 𝒓
Operating the truth value: 𝑻 ∨ 𝑻 →∼ 𝑻 ≡ 𝑻 → 𝑭 ≡ 𝑭
Therefore the proposition is false.
52
Further Examples
Determine whether the given is a tautology, fallacy, or a
contingency.
a. ∼ (𝑝 ∨ 𝑞) → [𝑝 ∧ (𝑞 → 𝑟)]
Solution:

In all of the cases the proposition is true. Therefore, the


proposition is a tautology.
53
Further Examples
Determine whether the given is a tautology, fallacy, or a
contingency.
b. 𝑝 → 𝑞 ∨ 𝑞 → 𝑝
Solution:
𝑝 → 𝑞 ∨ 𝑞 → 𝑝 ≡ [𝑝 → (𝑞 ∨ 𝑞)] → 𝑝

Therefore, the given proposition is a contingency.


54
Further Examples
Determine whether the given is a tautology, fallacy, or a
contingency.
c. 𝑝 ↔ 𝑝 ∧ 𝑞 ∨∼r→ 𝑝
𝑝 ↔ 𝑝 ∧ 𝑞 ∨∼r→ 𝑝 ≡ 𝑝 ↔ {[(𝑝 ∧ 𝑞) ∨∼r]→ 𝑝}

Therefore, the proposition is a contingency.


55
Further Examples
Determine whether the following is true or false given that 𝑝
is 𝑇𝑟𝑢𝑒, 𝑞 is 𝑇𝑟𝑢𝑒, and 𝑞 is 𝐹𝑎𝑙𝑠𝑒.
a. ∼ (𝑝 ∨ 𝑞) → [𝑝 ∧ (𝑞 → 𝑟)]
≡∼ 𝑻∨𝑻 → 𝑻∧ 𝑻→𝑭
≡∼ 𝑻 → 𝑻∧ 𝑭
≡ 𝑭→ 𝑭
≡𝑻
b. 𝑝 → 𝑞 ∨ 𝑞 → 𝑝
≡𝑻→ 𝑻∨𝑻 →𝑻
≡𝑻→𝑻→𝑻
≡𝑻→𝑻
≡𝑻
56
Further Examples
Determine whether the following is true or false given that 𝑝
is 𝑇𝑟𝑢𝑒, 𝑞 is 𝑇𝑟𝑢𝑒, and 𝑞 is 𝐹𝑎𝑙𝑠𝑒.
c. 𝑝 ↔ 𝑝 ∧ 𝑞 ∨∼→ 𝑝≡ 𝑝 ↔ {[(𝑝 ∧ 𝑞) ∨∼r]→ 𝑝}
≡ T↔ {[(T ∧T) ∨∼F]→ T}
≡ T↔ {[T ∨T]→ T}
≡ T↔ {T→ T}
≡ T↔ T
≡𝑻

57
Thank You!

58

You might also like