Logic
Logic
Proposition
Lesson Outline:
1. Define proposition.
➢ Give examples and non-examples
2. Define simple and compound
propositions.
➢ Distinguish simple and compound
propositions
Definition:
A proposition is a declarative
sentence that is either true or false,
but not both. If a proposition is
true, then its truth value is true,
which is denoted by 𝑻; otherwise,
its truth value is false, which is
denoted by 𝑭.
Propositions are usually denoted by
small letters. For example, the proposition
p: Everyone should study logic
may be read as
p is the proposition “Everyone should
study logic.”
If a sequence of propositions is considered,
we denote the propositions by 𝑃1, 𝑃2,…
Example 1.
Determine whether each of the
following statements is a proposition or
not. If it is a proposition, give its truth
value.
6
A: The sum of 5 and 6 is 10
7
B: Mark can you give me money?
D is a proposition, it is true.
10
E: Medical specialists are the
modern heroes
E is a proposition, it is true.
11
Definition.
A compound proposition is a
proposition formed from simpler
proposition using logical connectors or
some combination of logical
connectors. Some logical connectors
involving propositions p and/or q may
be expressed as follows:
not p p or q
p and q If p,then q
14
𝑝: Mindanao is an island in the Philippines.
𝑟: My seatmate will get a perfect score in
the logic exam.
𝑃1, : It is not the case that 2 is a rational
number.
𝑃2, : Either logic is fun and interesting, or it
is boring.
𝑃3, : If you are a Grade 11 student, then
you are a Filipino 15
Solution.
The propositions 𝑝, and 𝑟 are all
simple propositions. On the
other hand, the following are
compound propositions
16
Logical
Operators
Lesson Outline:
1. Introduce how to construct a truth
table.
2. Define the logical operators:
negation, conjunction, disjunction,
conditional and biconditional.
Example 1.
Since a proposition has two possible
truth values, a proposition would have
the following truth table.
𝑝
𝑇
𝐹
19
Truth tables can also be used to
display various combinations of the
truth values of two propositions 𝑝
and 𝑞 . The rows of the table will
correspond to each truth value
combination of 𝑝 and 𝑞, so there will
be rows. The truth table for
propositions and are as follows.
20
𝑝 𝑞
𝑇 𝑇
𝑇 𝐹
𝐹 𝑇
𝐹 𝐹
21
Similarly, suppose 𝑝 , 𝑞 , and 𝑟 are
propositions. Then the truth table
involving the given propositions has
23 = 8 rows,
22
𝑝 𝑞 𝑟
𝑇 𝑇 𝑇
𝑇 𝑇 𝐹
𝑇 𝐹 𝑇
𝑇 𝐹 𝐹
𝐹 𝑇 𝑇
𝐹 𝑇 𝐹
𝐹 𝐹 𝑇
𝐹 𝐹 𝐹 23
In general, a truth table
involving 𝑛 propositions has
𝑛
2 rows.
24
Example 2.
State the negation of the ropositions. 𝑝
𝑛1 : 𝑝 𝑥 = (𝑥 + 1)/(𝑥 − 2) is a
polynomial function.
𝑛2 : 2 is an odd number.
26
Example 2.
State the negation of the propositions. 𝑝
32
Definition.
The disjunction of 𝑝 𝑞 𝑝∧𝑞
two propositions 𝑝 𝑇 𝑇 𝑇
and 𝑞 is denoted by 𝑇 𝐹 𝑇
𝑝 ∨ 𝑞 :( 𝑝 or 𝑞 ) F 𝑇 𝑇
and is defined 𝐹 𝐹 𝐹
through its truth table
The propositions 𝑝 and 𝑞 are called
disjuncts.
The above truth table shows us that
the disjunction 𝑝 ∨ 𝑞 is false only when
both disjuncts and are false.
Example 4.
Let 𝑝, 𝑞, and 𝑟 be the
following propositions:
𝑝: Victor has a date with Liza.
𝑞: Janree is sleeping.
𝑟: Eumir is eating.
35
Express the following propositions in English
sentences or in symbols, as the case may be.
𝑝∨𝑞
𝑞 ∨ (∼ 𝑟)
𝑝 ∨ (𝑞 ∨ 𝑟)
𝑝 ∨ (𝑞 ∧ 𝑟)
39
Express the following propositions in English
sentences or in symbols, as the case may be.
(𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟)
40
Definition.
The conditional of 𝑝 𝑞 𝑝→𝑞
the propositions 𝑝 and 𝑇 𝑇 𝑇
𝑞 is denoted by 𝑇 𝐹 F
𝑝 → 𝑞 ∶ (𝐼𝑓 𝑝 , 𝑡ℎ𝑒𝑛 𝑞) F 𝑇 𝑇
and is defined 𝐹 𝐹 𝑇
through its truth table
The conditional 𝑝 → 𝑞 may also be
read as “ p implies q ”. The proposition
𝑝 is called the hypothesis, while the
proposition 𝑞 is called the conclusion.
Example 5.
One day, Richard tweeted:
“If I get promoted, then I will stop posting
selfies on Facebook.”
Let be the statement
“Richard gets promoted”, and let be the
statement, “Richard stops posting selfies on
Facebook.”
43
Determine whether the conditional is true
given the following scenarios.
Scenario A:
Richard got the promotion and promptly
stopped posting selfies on Facebook.
49
𝑃1 : Geebee is in Grade 11 if and only if
she is a senior high school student.
55
(𝑝 ⟶ 𝑞) ∧ (𝑞 → 𝑝).
𝑝 𝑞 𝑝⟶𝑞 𝑞⟶𝑝 (𝑝 ⟶ 𝑞) ∧ (𝑞 → 𝑝)
𝑇 𝑇 𝑇 𝑇 𝑇
𝑇 𝐹 𝐹 𝑇 𝐹
𝐹 𝑇 𝑇 𝐹 𝐹
𝐹 𝐹 𝑇 𝑇 𝑇
56
Example 2.
Consider the compound proposition
[(𝑝 ⟶ 𝑟) ∧ (𝑞 → 𝑟)] → [(𝑝 ∨ 𝑞) → 𝑟]
Construct its truth table.
57
[(𝑝 ⟶ 𝑟) ∧ (𝑞 → 𝑟)] → [(𝑝 ∨ 𝑞) → 𝑟]
𝑝 𝑞 𝑟 𝑝⟶𝑟 𝑞→𝑟 (𝑝 ⟶ 𝑟) ∧ (𝑞 → 𝑟)
𝑇 𝑇 𝑇 𝑇 𝑇 𝑇
𝑇 𝑇 𝐹 𝐹 𝐹 𝐹
𝑇 𝐹 𝑇 𝑇 𝑇 𝑇
𝑇 𝐹 𝐹 𝐹 𝑇 𝐹
𝐹 𝑇 𝑇 𝑇 𝑇 𝑇
𝐹 𝑇 𝐹 𝑇 𝐹 𝐹
𝐹 𝐹 𝑇 𝑇 𝑇 𝑇
𝐹 𝐹 𝐹 𝑇 𝑇 𝑇 58
[(𝑝 ⟶ 𝑟) ∧ (𝑞 → 𝑟)] → [(𝑝 ∨ 𝑞) → 𝑟]
𝑝 𝑞 𝑟 𝑝∨𝑞 (𝑝 ∨ 𝑞) → 𝑟
𝑇 𝑇 𝑇 𝑇 𝑇
𝑇 𝑇 𝐹 𝑇 𝐹
𝑇 𝐹 𝑇 𝑇 𝑇
𝑇 𝐹 𝐹 𝑇 𝐹
𝐹 𝑇 𝑇 𝑇 𝑇
𝐹 𝑇 𝐹 𝑇 𝐹
𝐹 𝐹 𝑇 𝐹 𝑇
𝐹 𝐹 𝐹 𝐹 𝑇 59
[(𝑝 ⟶ 𝑟) ∧ (𝑞 → 𝑟)] → [(𝑝 ∨ 𝑞) → 𝑟]
(𝑝 ⟶ 𝑟) ∧ (𝑞 → 𝑟) (𝑝 ∨ 𝑞) → 𝑟 𝑝⟶𝑟 ∧ 𝑞→𝑟 → [(𝑝 ∨ 𝑞) → 𝑟]
𝑇 𝑇 𝑇
𝐹 𝐹 𝑇
𝑇 𝑇 𝑇
𝐹 𝐹 𝑇
𝑇 𝑇 𝑇
𝐹 𝐹 𝑇
𝑇 𝑇 𝑇
𝑇 𝑇 𝑇 60
Note that regardless of the truth
values of p, q, and 𝑟
𝑝⟶𝑟 ∧ 𝑞→𝑟 → 𝑝∨𝑞 →𝑟
is always true. Such propositions are
called 𝑡𝑎𝑢𝑡𝑜𝑙𝑜𝑔𝑖𝑒𝑠.
61
Definition.
A proposition that is always true is
called a 𝑡𝑎𝑢𝑡𝑜𝑙𝑜𝑔𝑦, while a proposition
that is always false is called a
𝑐𝑜𝑛𝑡𝑟𝑎𝑑𝑖𝑐𝑡𝑖𝑜𝑛 . We denote tautologies
by 𝜏 and contradictions by 𝜙
Example 3.
Let 𝑝 and 𝑞 be propositions. Using
truth tables, show the following:
63
a. 𝑝 ∨ 𝜏 is a tautology.
Solution:
a.Note that 𝝉 is always true. Hence in the
disjunction 𝑝 ∨ 𝜏 , there is at least one
true disjunct. Therefore, is a tautology
since regardless of the truth value of 𝑝 ,
𝑝 ∨ 𝜏 is true.
64
Truth Table:
𝑝 𝝉 𝑝∨𝜏
𝑇 𝑇 𝑇
𝐹 𝑇 𝑇
65
b. 𝑝 ∧ 𝜙 is a contradiction
Solution:
Since 𝜙 is always false, then the
second column of the truth table we
will be constructing will contain 𝐹 𝑠 .
We have the following truth table.
66
Truth Table:
𝑝 𝜙 𝑝∧𝜙
𝑇 𝐹 𝐹
𝐹 𝐹 𝐹
𝑇 𝑇 𝑇 𝑇
𝑇 𝐹 𝑇 𝑇
𝐹 𝑇 𝑇 𝑇
𝐹 𝐹 𝐹 𝑇 68
d. [𝑝 ∧ ~𝑞 ] ∧ (𝑝 ∧ 𝑞) is a contradiction.
Solution:
𝑝 𝑞 ~𝑞 𝑝 ∧ ~𝑞 𝑝∧𝑞 [𝑝 ∧ ~𝑞 ] ∧ (𝑝 ∧ 𝑞)
𝑇 𝑇 𝐹 𝐹 𝑇 𝐹
𝑇 𝐹 𝑇 𝑇 𝐹 𝐹
𝐹 𝑇 𝐹 𝐹 𝐹 𝐹
𝐹 𝐹 𝑇 𝐹 𝐹 𝐹 69
Logical
Equivalence and
Conditional
Propositions
Lesson Outline:
1. Define a logical equivalence.
2. Define different forms of
conditional proposition.
Definition.
Two propositions 𝑝 and 𝑞 are logically
equivalent, denoted by 𝑝 ⇔ 𝑞 , if they have
the same truth values for all possible truth
values of their simple components.
Logical equivalence can also be
expressed in terms of a biconditional
statement. Two propositions 𝑝 and 𝑞 are
logically equivalent if the proposition 𝑝 ↔ 𝑞 is
always true (or is a tautology).
Example 1.
Show that
𝑝 → 𝑞 ⇔ (~𝑝 ∨ 𝑞).
𝑇 𝑇 𝑇 𝐹 𝑇
𝑇 𝐹 𝐹 𝐹 𝐹
𝐹 𝑇 𝑇 𝑇 𝑇
𝐹 𝐹 𝑇 𝑇 𝐹 74
Notice that the third and fifth
columns of the truth table above
contains the same truth values in the
same sequence. Thus,
(𝒑 → 𝒒) ⇔ (~𝒑 ∨ 𝒒).
75
The table below shows the different logical
equivalences that are used when manipulating
compound propositions.
Theorem (Table of Logical Equivalences). Let
𝑝, 𝑞, and 𝑟 , and be propositions. We have the
following logical equivalences
76
77
78
79
80
Example 2.
Show that
∼ (𝑝 → 𝑞) ⇔ [𝑝 ∧ (∼ 𝑞)]
using logical equivalences.
81
Solution.
One way to do this is to construct a
truth table for each logical expression
then show that they have the same
truth values. Another method is to use
the logical equivalences to transform
∼ 𝑝 ∨ 𝑞 into 𝑝 ∧ ∼ 𝑞 .
82
Solution. ∼ (𝑝 → 𝑞) ⇔ [𝑝 ∧ (∼ 𝑞)]
∼ 𝑝⟶𝑞 𝑔𝑖𝑣𝑒𝑛
⇔ ∼ (~𝑝 ∨ 𝑞) Switcheroo Law
83
Example 3.
Let 𝑝 and 𝑞 be propositions.
Construct the truth tables for each of
the following conditionals:
𝑝 → 𝑞, 𝑞 → 𝑝, ∼ 𝑝 → ∼ 𝑞 , and
∼𝑞 → ∼𝑝 .
84
Solution.
85
Note that the fifth and eighth columns are
the same, so we have shown that𝑝 →
𝑞 ⇔ ∼ 𝑞 → ∼ 𝑝 . Likewise, since the
sixth and seventh columns are identical, it
follows that 𝑞 → 𝑝 ⇔ ∼ 𝑝 → ∼ 𝑞 .
The conditionals that we considered in the
previous example are the different forms
of conditional propositions.
86
Definition.
Suppose 𝑝 and 𝑞 are propositions. From
the conditional proposition 𝑝 → 𝑞 , we
derive three other conditional statements,
namely its
a. Converse: 𝒒→𝒑
b. Contrapositive: ∼𝒒 → ∼𝒑
c. Inverse: ∼𝒑 → ∼𝒒
Forms of Conditional Proposition
Converse Proposition happens when you
reverse the “if then” proposition
Conditional Proposition
𝑝→𝑞
If you are cute then you are smart
Converse Proposition
𝑞→𝑝
If you are smart then you are cute
Forms of Conditional Proposition
Inverse proposition is when each proposition is
being negated
Conditional Proposition
𝑝→𝑞
If you are cute then you are smart
Inverse Proposition
~𝑝 → ~ 𝑞
If you are not cute then you are not smart
Contrapositive Proposition is the combination of
Converse and Inverse proposition by reversing
and negating both propositions.
Conditional Proposition
𝑝→𝑞
If you are cute then you are smart
Contrapositive Proposition
~𝑞 → ~ 𝑝
If you are not smart then you are not cute
Example 4.
Verify the following logical equivalences
using (a) the known logical equivalences, and
(b) truth tables.
a. 𝑝 ∧ 𝑞 ⇔ ~( ∼ 𝑝 ∨ ∼ 𝑞 )
b. ∼ 𝑝 → (𝑞 → 𝑟) ⇔ 𝑞 → (𝑝 ∨ 𝑟)
c. 𝑝 ↔ 𝑞 ⇔ ∼ 𝑝 ↔ ∼ 𝑞
d. (~(𝑝 ∨ 𝑞)) ∨ ((~𝑝) ∧ 𝑞) ⇔∼ 𝑝
91
a. 𝑝 ∧ 𝑞 ⇔ ~( ∼ 𝑝 ∨ ∼ 𝑞 )
𝐒𝐨𝐥𝐮𝐭𝐢𝐨𝐧:
~( ∼ 𝑝 ∨ ∼ 𝑞 ) 𝑔𝑖𝑣𝑒𝑛
⇔ ∼ ~𝑝 ∧ ∼ ∼ 𝑞 De Morgan’s Law
92
b. ∼ 𝑝 → (𝑞 → 𝑟) ⇔ 𝑞 → (𝑝 ∨ 𝑟)
𝐒𝐨𝐥𝐮𝐭𝐢𝐨𝐧:
∼ 𝑝 → (𝑞 → 𝑟) 𝑔𝑖𝑣𝑒𝑛
⇔ ∼ ~𝑝 ∨ (𝑞 → 𝑟) Switcheroo Law
⇔ 𝑝 ∨ (𝑞 → 𝑟) Double Negation
⇔ 𝑝 ∨ (∼ (𝑞) ∨ 𝑟) Switcheroo Law
⇔ ∼ (𝑞) ∨ (𝑝 ∨ 𝑟) Associative Law
⇔ 𝑞 → (𝑝 ∨ 𝑟) Switcheroo Law
93
c. 𝑝 ↔ 𝑞 ⇔ ∼ 𝑝 ↔ ∼ 𝑞
𝐒𝐨𝐥𝐮𝐭𝐢𝐨𝐧:
𝑝↔𝑞 𝑔𝑖𝑣𝑒𝑛
Biconditional Material
⇔ (𝑝 → 𝑞) ∧ (𝑞 → 𝑝) Equivalence
⇔ [ ∼𝑞 → ∼𝑝 ] ∧ [ ∼𝑝 → ∼𝑞 ] Conditionals are logivally equivalent
to their contrapositives
⇔ [ ∼ 𝑝) → (∼ 𝑞 ] ∧ [ ∼ 𝑞 → ∼ 𝑝 ] Commutative Law
Biconditional Material
⇔ ∼ 𝑝 ↔ (∼ 𝑞) Equivalence
94
d. ~ 𝑝∨𝑞 ∨ [(~𝑝) ∧ 𝑞] ⇔∼ 𝑝
𝐒𝐨𝐥𝐮𝐭𝐢𝐨𝐧:
[~ 𝑝 ∨ 𝑞 ] ∨ [(~𝑝) ∧ 𝑞] 𝑔𝑖𝑣𝑒𝑛
⇔ ~𝑝 ∧ (~𝑞) ∨ [(~𝑝) ∧ 𝑞] De Morgan’s Law
⇔ {[ ~𝑝) ∧ (~𝑞 ] ∨ ~𝑝 } ∧ {[ ~𝑝 ∧ ~𝑞 ] ∧ 𝑞)} Distributive law
⇔ ~𝑝) ∨ ~𝑝 ] ∧ [(~𝑞 ∨ ~𝑝 ∧ { ~𝑝 ∧ 𝑞 ∧ ~𝑞 ∧ 𝑞 } Distributive law
Idempotent Law and
⇔ {(~𝑝) ∧ [(~𝑞) ∨ (~𝑝)]} ∧ {[(~𝑝) ∨ 𝑞] ∧ 𝜏} Inverse Law