0% found this document useful (0 votes)
268 views47 pages

001 MMW Elementary Logic Lect PDF

This document discusses elementary logic and includes the following key points in 3 sentences: It defines propositions as statements that can be either true or false, and introduces logical connectives like negation, conjunction, disjunction, conditional, and biconditional. Truth tables are used to determine the truth value of compound statements for different combinations of true and false simple statements. Examples are provided to illustrate how to translate statements between natural language and symbolic logic using these connectives and determine their truth values from truth tables.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
268 views47 pages

001 MMW Elementary Logic Lect PDF

This document discusses elementary logic and includes the following key points in 3 sentences: It defines propositions as statements that can be either true or false, and introduces logical connectives like negation, conjunction, disjunction, conditional, and biconditional. Truth tables are used to determine the truth value of compound statements for different combinations of true and false simple statements. Examples are provided to illustrate how to translate statements between natural language and symbolic logic using these connectives and determine their truth values from truth tables.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

ELEMENTARY LOGIC

This lesson deals with the relationship


between the natural language and
the mathematical language using
symbols and variables.
PROPOSITIONS
A proposition is a statement that has a truth
value.
Two possible truth values associated with
propositions:
True (T)
False (F)
Examples of propositions:
1.Malolos is in Bulacan. T
2.1+1=2. T
3.2+4=5. F
4.Dogs can fly. F
5. Today is Friday. (might be true or false -
depending as to when it is stated but it can
never be both true and false at the same
time)
Which of the following are propositions?
1. The only positive integers that divide 5 are 1 and 5.
2. x + 2y = 7.
3. Where do you live?
4. 7(x+2) = 35, if x = 3.
5. Please close the door.
6. It is a rainy day.
Numbers 1, 4 and 6 are propositions.
Number 2 is not a proposition because the truth value of the
statement cannot be determined unless values are assigned to x and
y.
Numbers 3 and 5 are not propositions (number 3 is a question while
number 5 is a command) because they do not have truth values.
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 (propositional


operator) combines simple statements
into compound statements.
Connectives Type of Symbols Symbolic Read
Statement Form

Not Negation ¬ 𝑜𝑟 ∼ ∼𝑝 Not 𝒑 (𝑝 is false)

conjunctio 𝒑 and 𝒒
And/But ∧ 𝑝∧𝑞
n (both 𝑝 and 𝑞 are
true)

𝒑 𝐨𝐫 𝒒
(Either 𝑝 is true or 𝑞
Or disjunction ∨ 𝑝∨𝑞 is true or both 𝑝 and
𝑞 are true)
Connective Type of Symbol Symbolic Read
Statement Form

Implies conditional → 𝑝→𝑞 If 𝒑, then 𝒒.


If 𝒑, 𝒒.
𝒑 implies 𝒒.
𝒑 only if 𝒒.
Every 𝒑 is a 𝒒.
𝒒, if 𝒑.
𝒒 𝐰𝐡𝐞𝐧𝐞𝐯𝐞𝐫 𝒑.
𝒒 𝐢𝐬 𝐧𝐞𝐜𝐞𝐬𝐬𝐚𝐫𝐲 𝐟𝐨𝐫 𝒑.

𝒑 implies 𝒒 and 𝒒
If and only implies 𝒑
biconditional ↔ 𝑝↔𝑞
if
𝒑 if and only if 𝒒
NEGATION

Examples:
𝑝 ∼𝑝
1. I passed the test. I did not pass the test.
2. It is raining today. It is not raining today.
3. The children are playing in The children are not playing in
the yard. the yard.
4. John does not like math. John likes math.
5. 0 = 1 0≠1
Conjunction (and/but)
 Let 𝑝, 𝑞, 𝑟, 𝑎𝑛𝑑 𝑠 be propositions:
 𝑝: Mary is not happy.
 𝑞: Mary is going to the mall.
 𝑟: It is going to rain.
 𝑠: Today is Saturday.
Compound Propositions Symbols
1. Mary is going to the mall and Mary is 𝑞 ∧∼ 𝑝
happy.
2. Today is not Saturday and it is not ∼ 𝑠 ∧∼ 𝑟
going to rain.
3. It is going to rain and Mary is not 𝑟∧𝑝
happy.
Conjunction (and /but)
Let 𝑝, 𝑞, 𝑟, 𝑎𝑛𝑑 𝑠 be propositions:
 𝑝: Mary is not happy.
 𝑞: Mary is going to the mall.
 𝑟: It is going to rain.
 𝑠: Today is Saturday.

Symbols Compound Propositions


𝑠∧𝑟 1. Today is Saturday and it is going to
rain.
𝑞∧𝑝 2. Mary is going to the mall but Mary is
not happy.
𝑟∧𝑞 3. It is going to rain but Mary is going to
the mall.
Disjunction (or)
Let 𝑝, 𝑞, 𝑟, 𝑎𝑛𝑑 𝑠 be propositions:
𝑝: Carla plays the guitar.
𝑞: Carla is a singer.
𝑟: 2 + 5 = 8.
𝑠: 2 𝑖𝑠 𝑎 𝑝𝑟𝑖𝑚𝑒 𝑛𝑢𝑚𝑏𝑒𝑟.
1. Carla plays the guitar or Carla is a singer.
𝑝∨𝑞
2. 2 + 5 = 8 or 2 𝑖𝑠 𝑎 𝑝𝑟𝑖𝑚𝑒 𝑛𝑢𝑚𝑏𝑒𝑟.
r∨𝑠
Conditional (if 𝒑, then 𝒒 or 𝒑 implies 𝒒)
𝒑 (hypothesis, antecedent or premise)
𝒒 ( consequence or conclusion )
Let 𝑝, 𝑞, 𝑎𝑛𝑑 𝑟 be propositions:
 𝑝: It is going to rain. 𝑞: I will stay home.
 𝑟: Gary is going to watch a volleyball game.

Compound Propositions Symbols


1. If it is not going to rain, then Gary is going to watch a ∼𝑝→𝑟
volleyball game.
2. If it is going to rain, then I will stay home. (if 𝑝, then 𝑞) 𝑝→𝑞
3. I will stay home if it is going to rain. (𝑞 if 𝑝) 𝑝→𝑞
4. I will stay home whenever it is going to rain. 𝑝→𝑞
(𝑞 whenever 𝑝)
Note: The mathematical concept of an implication is
independent of a cause and effect relationship between
hypothesis and conclusion.

Example:
𝑝: Today is Monday.
𝑞: 3+ 7 = 10.
In the natural language, the implication “If today
is Monday, then 3 + 7 = 10” shows no relationship
between the hypothesis and the conclusion.
Biconditional 𝒑 ↔ 𝒒 (𝒑 𝒊𝒇 𝒂𝒏𝒅 𝒐𝒏𝒍𝒚 𝒊𝒇 𝒒)
Let 𝑝, 𝑞, 𝑟, 𝑎𝑛𝑑 𝑠 be propositions:
 𝑝: Peter is an honor student.
 𝑞: Peter is a varsity player.
 𝑟: 𝑥 is divisible by 2.
 𝑠: 𝑥 is an even number.

Compound Propositions Symbols


1. Peter is an honor student if and only if Peter 𝑝↔𝑞
is a varsity player.
2. 𝑥 is divisible by 2 if and only if 𝑥 is an even 𝑟↔𝑠
number.
Compound Statements and Grouping Symbols
Symbolic Form The parenthesis indicate that:
𝑝 ∧ (𝑞 ∨ ~𝑟) 𝑞 and ~𝑟 are grouped together
(𝑝 ∧ 𝑞) ∨ 𝑟 𝑝 and 𝑞 are grouped together

(𝑝 ∧ ~𝑞) 𝑝 and ~𝑞 are grouped together.


→ (𝑟 ∨ 𝑠) 𝑟 and 𝑠 are grouped together.

If a compound statement is written as an


English sentence, then statements on the
same side of a comma are grouped
together.
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 math and Kate is good
in English, then Kate is not a varsity player.
2. Write ~𝑞 ⟶ (𝑝 ∨ 𝑟) into words.
If Kate is not good in English, then Kate is
good in Math or Kate is a varsity player.
𝑝: Kate is good in math. 𝑟: Kate is a varsity player.
𝑞: Kate is good in English. s: Kate is a class mayor.

3. 𝑝 ∧ (𝑞 ∨ ~𝑟)
Kate is good in math, and Kate is good in English or
she is not a varsity player.
4. (𝑝 ∧ 𝑞) ∨ 𝑟
Kate is good in math and she is good in English, or
she is a varsity player.
5. (𝑝 ∧ ~𝑞) → (𝑟 ∨ 𝑠)
If Kate is good in Math but she is not good in
English, then Kate is a varsity player or she is a class
mayor.
Exercises
Let the following be propositions:
𝑝: James is happy. 𝑟: John is sick.
𝑞: Jane is happy. 𝑠: Jeff is not angry.
Translate the following into logic symbols.
1. James is happy but John is sick.
2. Jeff is not angry and Jane is happy.
3. John is not sick or Jeff is angry.
4. If Jeff is not angry, then James is happy.
5. Jane is happy if and only if John is not sick.
6. Jane is happy whenever John is not sick.
7. If Jeff is angry, then James is not happy or
John is sick.
8. James is happy if Jeff is not angry.
9. Jane is happy implies that John is not sick and
John is not sick implies that Jane is happy.
10. If John is sick and Jeff is angry, then James is
not happy.
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. Biconditional

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

1. 𝒑 ∧∼ 𝒒 2. ∼𝒑∨∼𝒒 3. ~ 𝒑 ⟶ ~𝒒
F ∧ F T∨F ~(F ⟶ F)
F T ~(T)
F
B. Find the truth value of the statement “If 4 is an
integer, then 4 is a rational number.”
Antecedent: 4 is an integer. - T
Consequent: 4 is a rational number. - T
T⟶T
T
C. Find the truth value of the statement “If 9
is a prime number, then 8 is irrational. “
Antecedent: 9 is a prime number. - F
Consequent: 8 is irrational. -T
F⟶T
T
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:
2. Construct the truth table for the
compound statement
( 𝒑 ∨ 𝒒) ∧∼ 𝒒.

𝑝 𝑞 𝒑∨𝒒 ∼𝒒 ( 𝒑 ∨ 𝒒) ∧∼ 𝒒
T T T F F
T F T T T
F T T F 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 T F F T F
F T F T T T T
F F T T T T T
Example:
4. Construct the truth table for the compound statement
𝒑 ∨ (𝒒 ∧ 𝒓).

𝑝 𝑞 𝑟 𝒒∧𝒓 𝒑 ∨ (𝒒 ∧ 𝒓)
T T T T T
T T F F T
T F T F T
T F F F T
F T T T T
F T F F F
F F T F F
F F F F F
Exercises:
Construct the truth tables of the following
compound statements:
1.( 𝒑 ∧ 𝒒) ∧∼ 𝒒
2. 𝑝 ⟶ 𝑝 ⟶ 𝑞
3. ~ 𝑝 ⟶ 𝑞 ⟶ ~𝑞
4. (𝑝 ∨ 𝑞) ∧ (𝑝 ∨ 𝑟)
A proposition is a tautology if the truth values in all
possible cases are true.
~ 𝑝 ⟶ 𝑞 ⟶ ~𝑞 is a tautology.

𝑝 𝑞 𝒑 ⟶ 𝑞 ∼ (𝒑 ⟶ 𝑞) ∼ 𝑞 ∼ (𝒑 ⟶ 𝑞) ⟶ 𝐪

T T T F F T
T F F T T T
F T T F F T
F F T F T T
A proposition is a contradiction if the truth values in
all possible cases are false.
( 𝒑 ∧ 𝒒) ∧∼ 𝒒 is a contradiction.

𝑝 𝑞 𝒑∧𝒒 ∼𝒒 ( 𝒑 ∧ 𝒒) ∧∼ 𝒒
T T T F F
T F F T F
F T F F F
F F F T F
A proposition is a contingency if the truth values
in all possible cases are not always true nor false.
( 𝒑 ∨ 𝒒) ∧∼ 𝒒 is a contingency.

𝑝 𝑞 𝒑∨𝒒 ∼𝒒 ( 𝒑 ∨ 𝒒) ∧∼ 𝒒
T T T F F
T F T T T
F T T F F
F F F T F
LOGICAL EQUIVALENCE

Two mathematical statements are


logically equivalent if they have the same
truth values in all possible cases.
Notation:
𝒑 ⟺ 𝒒 (𝒑 and 𝒒 are logically
equivalent)
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 values,
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
Therefore, 𝒑 ⟶ 𝒒 ⟺ ~𝒑 ∨ 𝒒.
3. Is ∼ 𝒑 ∨∼ 𝒒 ⟺ ∼ 𝒒 ∧∼ 𝑝 ?
𝒑 𝒒 ~𝒑 ~𝒒 ∼ 𝒑 ∨∼ 𝒒 ∼ 𝒒 ∧∼ 𝑝
T T F F F F
T F F T T F
F T T F T F
F F T T T T

Since the truth values of ∼ 𝒑 ∨∼ 𝒒 and ∼ 𝒒 ∧∼ 𝑝


are not the same in all possible cases, then they
are not logically equivalent.
∼ 𝒑 ∨∼ 𝒒 ⇎ ∼ 𝒒 ∧∼ 𝑝
THE CONVERSE, THE INVERSE AND THE
CONTRAPOSITIVE
Statements related to the Conditional Statement 𝒑 ⟶ 𝒒 :
 The converse of 𝑝 ⟶ 𝑞 is 𝒒 ⟶ 𝒑.
 The inverse of 𝑝 ⟶ 𝑞 is ~𝒑 ⟶ ~𝒒.
 The contrapositive of 𝑝 ⟶ 𝑞 is ~ 𝒒 ⟶ ~𝒑.
Example:
1. Today is Monday, only if yesterday was Sunday.
𝒑 ⟶ 𝒒: If today is Monday, then yesterday was Sunday.
Converse: If yesterday was Sunday, then today is Monday.
Inverse: If today is not Monday, then yesterday was not Sunday.
Contrapositive: If yesterday was not Sunday, then today is not
Monday.
Write the converse, inverse and contrapositive of the conditional
statement.

2. If I am a BSEd student, then I will be a high school


teacher.
Converse: If I will be a high school teacher, then I am a
BSEd student.
Inverse: If I am not a BSEd student, then I will not be a
high school teacher.
Contrapositive: If I will not be a high school teacher,
then I am not a BSEd student.
Converse Inverse Contrapositive

𝒑 𝒒 ~𝒑 ~𝒒 𝑝⟶𝑞 𝒒⟶𝒑 ∼ 𝒑 ⟶∼ 𝒒 ∼ 𝒒 ⟶∼ 𝑝
T T F F T T T T
T F F T F T T F
F T T F T F F T
F F T T T T T T

The conditional statement is logically equivalent to the


contrapositive.
𝒑 ⟶ 𝒒 ⟺ ∼ 𝒒 ⟶∼ 𝒑

The converse is logically equivalent to the inverse.


𝒒 ⟶ 𝒑 ⟺ ∼ 𝒑 ⟶∼ 𝒒
Write a statement that is logically equivalent to each of
the following compound statements.

 1. I eat whenever I am hungry.


(conditional) 𝑝 ⟶ 𝑞: If I am hungry, then I eat.
(contrapositive) ∼ 𝑞 ⟶∼ 𝑝: If I do not eat, then I am not hungry.
 2. If it rains, I will bring my umbrella.
(conditional) 𝑝 ⟶ 𝑞: If it rains, then I will bring my
umbrella.
(contrapositive) ∼ 𝑞 ⟶∼ 𝑝: If I will not bring my umbrella, then
it does not rain.
 3. (conditional) 𝑝 ⟶ 𝑞: If 5 is greater than zero, then it is a
positive integer.
(contrapositive) ∼ 𝑞 ⟶∼ 𝑝: If 5 is not a positive integer, then it is
not greater than zero.
Exercises:
 Write the converse, inverse and contrapositive of the
following conditional statements.
1. If Mark is promoted, then he gets a salary increase.
2. Macy feels nauseous whenever she rides the bus.
3. He can join the band, if he can play the keyboard.
4. If you are smart, your answer is correct.
 1. if Mark is promoted, then he gets a salary
increase.
Converse: If Mark gets a salary increase, then he
is promoted.
Inverse: If Mark is not promoted, then he does
not get a salary increase.
Contrapositive: If Mark does not get a salary
increase, then he is not promoted.
2. Macy feels nauseous whenever she rides the bus.
𝑝 ⟶ 𝑞 :If Macy rides the bus, then she feels nauseous.
Converse: If Macy feels nauseous, then she rides the
bus.
Inverse: If Macy does not ride the bus, then she does
not feel nauseous.
Contapositive: If Macy does not feel nauseous, then
she does not ride the bus.
 3. He can join the band, if he can play the keyboard.
Conditional: if he can play the keyboard, then he can join the band.
Converse: If he can join the band, then he can play the keyboard.
Inverse: If he cannot play the keyboard, then he cannot join the
band.
Contrapositive: If he cannot join the band, then he cannot play the
keyboard.

4. If you are smart, your answer is correct.


Converse: If your answer is correct, then you are smart.
Inverse: If you are not smart, your answer is not correct.
Contrapositive: If your answer is not correct, then you are not smart.

You might also like