Anda di halaman 1dari 61

# LOGIC

## LOGIC – The discipline that deals with

the methods of reasoning.
ROLES OF LOGIC
 give precise meaning to
mathematical statements
 used to distinguish between valid
and invalid arguments
CRITICAL THINKING OR LOGICAL
THINKING
is the process in which one uses logic and
reasoning consistently to come to a
conclusion, which is an important foundational
skill of Mathematics. It is used as a process to
evaluate and separate truth from falsehood,
reasonable from unreasonable beliefs.
PROPOSITION
– a complete declarative statement that is
either true or false, but not both
- a statement that has a truth value
EXAMPLES
• 1+1=2
• Twice seven increase by five is twenty- five.
NON-EXAMPLES
• Listen to me.
• The grey old dog.
SEAT WORK
Determine whether the following are propositions by writing
P or NP.
 The bamboo leaf is green.  P
 Manila is the capital of the Philippines.  P
 2+5=5  P
 Close the door.  NP
 Is it hot outside ?  NP
 x is greater than 2  NP
 3=3  P
LETTERS are used to denote propositions.
EXAMPLES: 𝑝, 𝑞, 𝑟, 𝑠

## TRUTH VALUE If a proposition 𝑝 is true, its truth

value is 𝑡𝑟𝑢𝑒 denoted by 𝑇 (or 1). If it is false, its
truth value is 𝑓𝑎𝑙𝑠𝑒, denoted by 𝐹 (or 0).
NEGATION OF 𝒑
Let 𝑝 be a proposition. The statement “It s
not the case that 𝑝” is called negation of 𝑝.
It is denoted as ¬𝑝 𝑜𝑟 ~𝑝 read as “not 𝑝”
EXAMPLES
 𝑝: “Today is Friday”
~ 𝑝: “Today is not Friday” or
“It is not the case that today is Friday”
 𝑝: “I like Math”
 𝑝: “I am prepared to take a seatwork today”
TRUTH TABLE – a table that displays the
relationships between the truth
value of propositions

## TRUTH TABLE FOR THE NEGATION OF A

PROPOSITION
𝑝 ~𝑝
T F
F T
COMPOUND – combination of propositions.
PROPOSITION – formed from existing
proposition using logical
operations or connectives
PROPOSITIONAL
– an operation that combines
CONNECTIVE two propositions to yield a new
one whose truth value depends
only on the truth values of the two original
propositions
CONJUNCTION OF 𝒑 and 𝒒
Let 𝑝 and 𝑞 be propositions. The propositions
“𝑝 and 𝑞” is denoted by 𝑝 ∧ 𝑞. This is also read
as “the conjunction of 𝑝 and 𝑞”.
EXAMPLES
 𝑝: “Today is Friday” 𝑞: “It is raining today”
𝑝 ∧ 𝑞: “Today is Friday and it is raining today”
 𝑝: “I am sick” 𝑞: “I cannot take the exam”
𝑝 ∧ 𝑞: “I am sick and I cannot take the exam”
TRUTH TABLE FOR THE CONJUNCTION OF TWO
PROPOSITIONS
𝑝 𝑞 𝑝∧𝑞
T T T
T F F
F T F
F F F
Notes: “but has the same logical meaning as “and” moreover,
furthermore, yet, still, however, also, nevertheless, although,
and so forth, comma (,) and colon (:) are also used to conjoin
two propositions
DISJUNCTION OF 𝒑 and 𝒒
Let 𝑝 and 𝑞 be propositions. The “disjunction
of 𝑝 and 𝑞” is denoted by 𝑝 ∨ 𝑞. This is also
INCLUSIVE OR: If 𝑝 and 𝑞 are propositions then 𝑝
OR 𝑞 is true if either 𝑝 is true or 𝑞 is true or if
both 𝑝 and 𝑞 are true.
EXCLUSIVE OR: If 𝑝 and 𝑞 are propositions, the
“exclusive or” of 𝑝 and 𝑞 is denoted as 𝑝 ⊕ 𝑞.
EXAMPLES
 𝑝: “Plaridel is the capital of Bulacan” F
𝑞: “Baliuag is one of the cities found in Region III” F
𝑝 ∨ 𝑞: “Plaridel is the capital of Bulacan or Baliuag is
one of the cities found in Region III”
TRUTH VALUE: F (because neither is true)
 𝑝: “3 is an even number” F
𝑞: “A century is 100 years” T
𝑝 ∨ 𝑞: “3 is an even number or a century is 100 years”
TRUTH VALUE: T (because q is true)
EXAMPLES
 𝑝: “I am looking at my seatmate” T
𝑞: “I am looking at my teacher” T
𝑝 ⊕ 𝑞: “I am looking at my seatmate or I am looking at my
teacher”
TRUTH VALUE: F (because either is true but not both)
 𝑝: “I can take a plane going to Romblon” T
𝑞: “I can take a ferry going to Romblon” T
𝑝 ⊕ 𝑞: “I can take a plane or a ferry going to Romblon”
TRUTH VALUE: F (because either is true but not both)
TRUTH TABLE FOR THE TRUTH TABLE FOR THE
DISJUNCTION OF TWO DISJUNCTION OF TWO
PROPOSITIONS PROPOSITIONS
(INCLUSIVE) (EXCLUSIVE)
𝑝 𝑞 𝑝∨𝑞 𝑝 𝑞 𝑝⊕𝑞
T T T T T F
T F T T F T
F T T F T T
F F F F F F
Note: “unless” may also be used in expressing the disjunction
of two propositions.
Exercises: Use the symbols ~, ∧ 𝑎𝑛𝑑 ∨ to
write the following statements.
Notes:
groupings:
“both” goes with 1.) both p or q, and r 1.) 𝑝 ∨ 𝑞 ∧ 𝑟
“and”; “either” 2.) p, or both q and r 2.) 𝑝 ∨ (𝑞 ∧ 𝑟)
goes with “or” 3.) (𝑝 ∧ 𝑞) ∨ 𝑟
3.) either p and q, or r
• “neither 𝑝 nor 𝑞”
is the same as 4.) p, and either q or r 4.) 𝑝 ∧ (𝑞 ∨ 𝑟)
“not either 𝑝 or 5.) neither p nor q 5.)~𝑝 ∨ ~𝑞
𝑞”
Exercises: Use the symbols ~, ∧ 𝑎𝑛𝑑 ∨ to write the
following statements. (use grouping symbols)
𝑝: “-6 is a positive number” 𝑞: “3 is a positive number”
𝑟: “ 5 is an irrational number”
1.) -6 and 3 are both not positive numbers 1.) ~𝑝 ∧ ~𝑞
2.) -6 and 3 are not both positive numbers 2.) ~(𝑝 ∧ 𝑞)
3.) either -6 is a positive number or 3 is a 3.) 𝑝 ∨ (𝑞 ∧ 𝑟)
positive number, and 5 is irrational
4.) 5 is irrational but -6 is not a positive 4.) 𝑟 ∧ ~𝑝
number
5.) either -6 is a positive number or 3 is a 5.) 𝑝 ∨ 𝑞 ∧ ~(𝑝 ∧ 𝑞)
positive number, but they are not both
positive numbers
CONDITIONAL PROPOSITIONS
Let 𝑝 and 𝑞 be propositions. The propositions
“𝑝 implies 𝑞” is denoted by 𝑝 → 𝑞. This is a
statement is in the form of "If ... then“.
EXAMPLES
 𝑝: “I am late” 𝑞: “I cannot take the seatwork”
𝑝 → 𝑞: “If I am late then I cannot take the seatwork”
 𝑝: “Today is Monday” 𝑞: “I have a test today”
𝑝 → 𝑞: “If today is Monday then I have a test today”
EXAMPLES
Let 𝑝, 𝑞, 𝑎𝑛𝑑 𝑟 be propositions:
 𝑝: It is a long weekend.
 𝑞: I will stay at home.
 𝑟: Lucky is not going to watch Riverdale.
Compound Propositions Symbols
1. If it is not a long weekend, then Lucky is not going to ∼𝑝→𝑟
watch Riverdale.
2. If it is a long weekend, then I will stay at home. 𝑝→𝑞
(if 𝑝, then 𝑞)
3. I will stay at home if it is a long weekend. (𝑞 if 𝑝) 𝑝→𝑞
4. I will stay at home whenever it is a long weekend. 𝑝→𝑞
(𝑞 whenever 𝑝)
𝑝 → 𝑞 is false when 𝑝 is true and 𝑞 is false (a
true statement cannot imply a false one)
EXAMPLES
 𝑝: “1 > 2” F
𝑞: “4 < 8” T
𝑝 → 𝑞: “If 1 > 2 then 4 < 8” T
𝑞 → 𝑝: “If 4 < 8 then 1 > 2 “ F

## The mathematical concept of implication is

independent of a cause and effect relationship
between a hypothesis and a conclusion.
TRUTH TABLE FOR THE
IMPLICATION
𝑝→𝑞 Notes:
𝑝 → 𝑞 is equivalent to the
following expressions:
𝑝 𝑞 𝑝→𝑞
 𝑝 implies 𝑞
T T T  If 𝑝 then 𝑞
T F F  𝑞 if 𝑝
 𝑞 whenever 𝑝
F T T
 𝑝 is sufficient for 𝑞
F F T  𝑝 is necessary for 𝑞
BI-CONDITIONAL PROPOSITIONS
Let 𝑝 and 𝑞 be propositions. The propositions “𝑝 if
and only if 𝑞” is denoted by 𝑝 ↔ 𝑞.
EXAMPLES
 𝑝: “David is the son of Ricky”
𝑞: “Ricky is the father of David”
𝑝 ↔ 𝑞: “David is the son of Ricky if and only if Ricky
is the father of David”
 𝑝: “12 is divisible by 2”
𝑞: “12 is even”
𝑝 ↔ 𝑞: “12 is divisible by 2 if and only if 12 is even”
𝑝 ↔ 𝑞 is true when both 𝑝 𝑎𝑛𝑑 𝑞 has the
same logical truth value
EXAMPLES
 𝑝: “7 > 12” F
𝑞: “7 is even” F
𝑝 ↔ 𝑞: “7 > 12 if and only if 7 is even” T
 𝑝: “a square is a quadrilateral” T
𝑞: “a triangle has four vertices” F
𝑝 ↔ 𝑞: “a square is a quadrilateral if and only if a
triangle has four vertices” F
TRUTH TABLE FOR THE
BI-CONDITIONAL
PROPOSITION Notes:
𝑝↔𝑞 𝑝 ↔ 𝑞 is equivalent to the
following expressions:
𝑝 𝑞 𝑝↔𝑞  𝑝 is equivalent to 𝑞
T T T  𝑝 if and only if 𝑞
 𝑝 is necessary and
T F F sufficient for 𝑞
F T F  if 𝑝 then 𝑞 and
conversely
F F T
Connectives Operation Symbols Ex. Way of Reading
Not Negation ~ ~𝑝 Not 𝑝
(𝑝 is false)
And/ But Conjunction ∧ 𝑝∧𝑞 𝑝 and 𝑞
(both 𝑝 and 𝑞 are
true)
Or/ Unless Disjunction ∨ 𝑝∨𝑞 𝑝 or 𝑞
(either 𝑝 is true or 𝑞
is true or both are
true)
Implies Conditional → 𝑝→𝑞 If 𝑝 then 𝑞
If and only if Bi- ↔ 𝑝↔𝑞 𝑝 implies 𝑞 and 𝑞
conditional implies 𝑝
Seatwork: Determine if the following are
propositions by writing P or NP.
1.) 3 < 2 1.) 𝑃
2.) 1 is an integer 2.) 𝑃
3.) 3 −
1 3.) N𝑃
2
4.) The reciprocal of five less three. 4.) N𝑃
5.)
3
8≠2 5.) 𝑃
6.) 0 𝑖𝑠 𝑎 𝑠𝑢𝑏𝑠𝑒𝑡 𝑜𝑓 𝑊 6.) 𝑃
7.) rational numbers between 1 and 0 7.) N𝑃
8.) The function 𝑓(𝑥) is continuous. 8.) N𝑃
Seatwork: Use the symbols ~, ∧, ∨, → 𝑎𝑛𝑑 ↔
to write the following statements.
ℎ: Harry is not happy 𝑠: Today is Sunday 𝑟: It is going to rain
𝑣: Harry is going to watch a volleyball game
1.) Today is Sunday and Harry is not happy. 1.) 𝑠 ∧ ℎ
2.) Today is Sunday and Harry is not going
to watch a volleyball game. 2.) 𝑠 ∧ ~𝑣
3.) If it is going to rain, then Harry is not 3.) 𝑟 → ~𝑣
going to watch a volleyball game.
4.) Harry is going to watch a volleyball 4.) 𝑣 ↔ ~ℎ
game if and only if he is happy.
5.) Harry is happy if it is not going to rain. 5.)~𝑟 → ~ℎ
Seatwork: Convert the following symbolic
statements into words given:
𝑝: Gian plays volleyball 𝑞: Lanz plays basketball
1.) ~𝑝 1.) Gian does not play volleyball.
2.) 𝑝 ∧ 𝑞 2.) Gian plays volleyball and Lanz plays
3.) 𝑝 → ~𝑞 3.) If Gian plays volleyball then Lanz
4.) ~𝑞 ↔ 𝑝 4.) Lanz does not play basketball if and
only if Gian plays volleyball.
EXAMPLES
Consider the following statements:
 𝑝: Kate is good in Math.
 𝑞: Kate is good in English.
 𝑟: Kate is a varsity player.
1. Write (𝑝 ∧ 𝑞) ⟶ ~𝑟 into words.
If Kate is good in both Math and
English, then Kate is not a varsity player.
2. Write ~𝑞 ⟶ (𝑝 ∨ 𝑟) into words.
If Kate is not good in English, then either
Kate is good in Math or Kate is a varsity player.
Implications

## In an implication of the form p→q, the proposition

p is called the hypothesis (antecedent) and the
proposition q is called the conclusion (consequence).
From this form, we can have another statements
which are the converse, inverse and contrapositive of
p→q.
Implications

 Converse: If 𝑝 → 𝑞,
then its converse is 𝑞 → 𝑝.
 Inverse: If 𝑝 → 𝑞,
then its inverse is ∼ 𝑝 →∼ 𝑞.
 Contrapositive: If 𝑝 → 𝑞,
then its contrapositive is ∼ 𝑞 → ∼ 𝑝.
IMPLICATIONS

GIVEN: a → 𝑏
CONVERSE OF a → 𝑏: 𝑏→𝑎
CONTRAPOSITIVE OF a → 𝑏: ~𝑏 → ~𝑎
INVERSE OF a → 𝑏: ~a → ~𝑏
Examples

## If I have a test today, then I will review my lessons.

 Converse: If I will review my lessons, then I have a test
today.
 Inverse:
If I do not have a test today, then I will not
review my lessons.
 Contrapositive: If I will not review my lessons today,
then I do not have a test today.
SEAT WORK: Write the sentence form of each item.
𝑠: 8 is a whole number 𝑓: 8 is an element rational numbers
1.) 𝑠 → 𝑓 1.) If 8 is a whole number then, 8 is
an element rational numbers
2.) CONVERSE 2.) If 8 is an element rational
numbers then 8 is a whole number
3.) CONTRAPOSITIVE 3.) If 8 is not an element rational
numbers then 8 is not a whole
number
4.) INVERSE 4.) If 8 is not a whole number then,
8 is not an element rational numbers
Finding the Truth Value of a Compound
Statement

## Propositions built up using propositional connectives

are called propositional logic or compound/ conjoined
propositions. The truth value of such a new statement
is then completely determined by the truth values of
the given statements. The truth value, together with
the connective used will be the basis to determine the
truth value of the compound statement.
Examples:
p : 2 is a rational number.
 q : 2 can be written as a fraction.

## The given statements are both true. Using logical

connectives, we can make a new proposition and
determine its truth value.
Examples:
 p : 2 is a rational number.
 q : 2 can be written as a fraction.

## a. 2 is not a rational number.

∼T=F
b. 2 is a rational number and can be written as a
fraction.
T∧T=T
Examples:
 p : 2 is a rational number.
 q : 2 can be written as a fraction.

## c. 2 is not a rational number but can be written as a

fraction.
F∧T=F
d. 2 is a rational number or 2 can be written as a
fraction.
T∨T=T
Examples:
 p : 2 is a rational number.
 q : 2 can be written as a fraction.

## e. 2 is a rational number or 2 can not be written as

a fraction.
T∨F=T
f. 2 is not a rational number or 2 can not be written
as a fraction.
F∨F=F
Examples:
 p : 2 is a rational number.
 q : 2 can be written as a fraction.

## g. 2 is a rational number implies that 2 can be

written as a fraction.
T→T=T
h. 2 can not be written as a fraction if 2 is a rational
number.
T→F=F
Examples:
 p : 2 is a rational number.
 q : 2 can be written as a fraction.

## i. 2 can not be written as a fraction whenever 2 is

not a rational number.
F→F=T
j. 2 is a rational number if and only if 2 can be
written as a fraction.
T ↔ T=T
Examples:
 p : 2 is a rational number.
 q : 2 can be written as a fraction.

## k. 2 can not be written as a fraction if 2 is not a

rational number and 2 is not a rational number if 2
can not be written as a fraction.
F ↔ F=T
Examples:
 p : 2 is a rational number.
 q : 2 can be written as a fraction.
 r : 2 is a prime number.

## Write in symbols and determine its truth value.

a. 2 can be written as a fraction implies that 2 is not
a prime number.
q→~r
T→F=F
Examples:
 p : 2 is a rational number.
 q : 2 can be written as a fraction.
 r : 2 is a prime number.

## b. Either 2 is a rational number or both 2 can be

written as a fraction and 2 is a not prime number.
p∨(q∧~r)
T∨(T∧~T)
T∨(T∧F)
T∨F=T
Examples:
 p : 2 is a rational number.
 q : 2 can be written as a fraction.
 r : 2 is a prime number.

## c. 2 is not a rational number and either 2 can not

be written as fraction or 2 is not a prime number.
~p∧(~q∨~r)
~T∧(~T∨~T)
F∧(F∨F)
F∧F=F
SEAT WORK
Write in symbols and determine its truth value.
a : All whole numbers are rational.
b : All fractions are integers.
c : All real numbers are integers.
1. All whole numbers are rational if all real numbers are
integers.
2. If all fractions are not integers, then all whole numbers
are rational.
3. Either all fractions are integers and all whole numbers are
not rational or all real numbers are not integers.
TRUTH TABLES
A logical statement may either be true
or false. If the statement is true, then the
truth value of that statement is true and
is denoted by T. If it is false, then its
truth value is false and is denoted by F.
𝑝
A. Assertion
T
F
B. Negation

𝑝 ∼𝑝
T F
F T
C. Conjunction

𝑝 𝑞 𝒑∧𝒒

T T T
T F F
F T F
F F F
D. Disjunction

𝑝 𝑞 𝒑∨𝒒
T T T
T F T
F T T
F F F
E. Implication (Conditional)

𝑝 𝑞 𝒑→𝒒
T T T
T F F
F T T
F F T
F. Bi-conditional

𝑝 𝑞 𝒑↔𝒒
T T T
T F F
F T F
F F T
Examples:
What are the truth values of the following
statements if 𝒑 is false and 𝒒 is true?

1. 𝒑 ∧∼ 𝒒 2. ∼ 𝒑 ∨ ∼ 𝒒
F ∧ F T∨F
F T
3. ~ 𝒑 ⟶ ~𝒒 4. ∼ 𝒒 ∨ ∼ 𝒑
~(F ⟶ F) F∨T
~(T) T
F
Example:

## 1. Construct the truth table for the compound

statement 𝒑 ∧∼ 𝒒.

𝑝 𝑞 ∼𝒒 𝒑 ∧∼ 𝒒

T T F F
T F T T
F T F F
F F T F
Example:
3. Construct the truth table for the
compound statement ( 𝒑 → 𝒒) ↔ (∼ 𝒒 ∨∼ 𝑝).
𝑝 𝑞 ∼𝑝 ∼𝑞𝑝→𝑞 ∼ 𝑞 ∨∼ 𝑝 ( 𝒑 → 𝒒) ↔ (∼ 𝒒 ∨∼ 𝑝)

T T F F T F F
T F F T F T F
F T T F T T T
F F T T T T T
4. Construct the truth table for the
compound statement 𝒑 ∧ 𝒒 ↔ 𝒓.
 a.
Tautology – a tautology is a proposition
that is always true.
 Example: 𝑝 ∨ ~𝑝

p ∼p 𝑝 ∨ ~𝑝
T F T
F T T
 b.Contradiction – a proposition that is
always false.
 Example: p ∧ ~p

p ∼p 𝑝 ∧ ~𝑝
T F F
F T F
LOGICAL EQUIVALENCE
c. Equivalent Propositions
Two mathematical statements are logically
equivalent if the final output of their truth
tables are exactly alike.
Notation:
𝒑 ⟺ 𝒒 or 𝒑 ≡ 𝒒
(𝒑 and 𝒒 are logically equivalent)
(𝒑 is logically equivalent to 𝒒)
Example:
1. Show that ~(𝑝 ∨ 𝑞) ⟺ ~𝑝 ∧ ~𝑞.
𝒑 𝒒 ~𝒑 ~𝒒 𝒑∨𝒒 ~(𝒑 ∨ 𝒒) ~𝒑 ∧ ~𝒒
T T F F T F F
T F F T T F F
F T T F T F F
F F T T F T T
 Since~(𝒑 ∨ 𝒒) and ~𝒑 ∧ ~𝒒 have the same
truth tables, then they are logically
equivalent.
∴ ~(𝑝 ∨ 𝑞) ⟺ ~𝑝 ∧ ~𝑞
2. Show that 𝒑 ⟶ 𝒒 𝒂𝒏𝒅 ~𝒑 ∨ 𝒒 are logically
equivalent.

𝒑 𝒒 ~𝒑 𝑝 ⟶ 𝑞 ~𝑝 ∨ 𝑞
T T F T T
T F F F F
F T T T T
F F T T T
∴ 𝒑 ⟶ 𝒒 ⟺ ~𝒑 ∨ 𝒒.
 end