The Nature of
Logic
What you will do in this chapter:
+Study the nature and concept of logic as a tool to prove results.
+Write compound propositions using the language of logic.
+Analyze and explore various types of statements and the
conditions under which they are true.
+Explore equivalent statement forms, including the conditional
form "if ... then....".
+Use truth tables to determine whether propositions are
tautologies, contradictions, or contingencies.
+Use the rules of inference to determine the validity of arguments.
+Use different proof techniques to prove the validity of arguments.
At the end of this chapter, you should
be able to:
+ determine the nature of a proposition;
+write compound propositions using logical connectives;
+identify compound propositions that are tautologies,
contingencies, and contradictions;
+ identify and use the rules of inferences;
+construct a formal proof of the validity of arguments; and
+use direct, conditional, and indirect proofs to prove the
validity of logical arguments.
In everyday life,
reasoning proves
different points.
For example:
How will you prove to a service
provider that you have paid
your bills on time?
you can show the official
receipt of payment
For example:
To prove to an airline that
you have booked for a flight,
you can show your online
reservation or your ticket
Similarly, mathematics
and computer science use
mathematical logic or
simply logic to prove the
results.
In particular,
mathematical logic is
used in mathematics to
prove theorem.
In computer science, logic is
used to prove the results of
computer algorithms or the
correctness of a computer
program.
Logic is commonly known as
the science of reasoning.
Mathematical reasoning and
arguments are based on the
rules of logic.
PROPOSITIONS AND RELATED
CONCEPTS
A proposition is any meaningful statement that is either
true or false, but never both. Throughout this chapter,
lowercase letters, such as a, b, c,..., p, q, r... will be used to
represent propositions. The truth value of a proposition
is true, denoted by T or 1, if it is a true statement. The
truth value of a false statement is F or 0.
Consider the following examples:
a: Aidan loves Aimee.
b: Batman is left-handed.
c: Columbus discovered the Philippines.
d: Dynamite is dangerous.
e: Elephants have wings.
f: Five is less than 10.
All these statements are propositions. You can determine the truth or falsity of each
statement.
Consider the following:
p: How are you?
q: The square of an integer X.
r: Study your lessons every day!
These are not propositions. The first one is a not a proposition because it is a question. The
second one is not a proposition because you cannot determine the truth value of that phrase,
and the third is not a proposition because it is a command.
The negation of a proposition 𝑝, is the
proposition not 𝑝. It is denoted by ~𝑝. The truth
table of 𝑝 is given below:
𝒑 ~𝒑
𝑇 𝐹
𝐹 𝑇
COMPOUND PROPOSITIONS
New propositions called compound propositions can be
obtained from old ones by using propositional connectives or
logical connectives or operators. The propositions that form
compound propositions are called propositional variables. The
truth table provides the truth value for the result of applying
the operation on each possible set of truth values for the
operands.
COMPOUND PROPOSITIONS
The essential point about assigning truth values to compound
statements is that it allows you-using logic alone—to judge the
truth of a compound statement on the basis of your
knowledge of the truth of its component parts. Logic does not
help you determine the truth or falsity of the component
statements but rather logic helps link these separate pieces of
information together into a coherent whole.
COMPOUND
PROPOSITIONS
Let p and q be propositions.
The conjunction of p and q,
denoted by 𝑝⋀𝑞, is the
proposition, p and q. This
proposition is defined to be
true only when both p and q
are true, and false, otherwise.
The truth table of the
conjunction of p and q is
given in the following table:
COMPOUND
PROPOSITIONS
The disjunction of p or q, denoted by
𝑝 ∨ 𝑞, is the proposition, p or q. This
proposition is defined to be false only
when both p and q are false, and true,
otherwise. The truth table of the
disjunction of p or q is given in the
following table:
COMPOUND
PROPOSITIONS
The exclusive-or of p or q, denoted
by 𝑝 ⊕ 𝑞, is the proposition that is
true when exactly one of p and q is
true and is false otherwise. The
truth table of the exclusive or of p
and q is given in the following table:
COMPOUND PROPOSITIONS
The proposition 𝑝 𝑁𝐴𝑁𝐷 𝑞,
written 𝑝|𝑞 is the
proposition that is true
when either p or q, or both
are false and it is false
when both p and q are
true. The truth table of
𝑝|𝑞 is given in the following
table:
COMPOUND PROPOSITIONS
The proposition p NOR q,
written p ↓ q is the
proposition that is true
when both p and q are false
and it is false otherwise.
The truth table of p ↓ q is
given in the following table:
Construct the truth table of [~(𝑝^𝑞)] 𝑉 𝑟.
Construct a truth table for the
statement (𝑝^𝑞) 𝑉 − 𝑟.
Consider the following statements:
p: 5 is an integer.
q: 3 is an integer.
r: 2 divides 4.
Construct the following statements and determine the truth
values.
1. (2 divides 4 or 5 is an integer) and 2 divides 4.
2. (5 is an integer and √3 is an integer) and 2 divides 4.
Solution 1
p: 5 is an integer.
q: 3 is an integer.
r: 2 divides 4.
The statement (2 divides 4 or 5 is an integer) and 2 divides 4 can be written in
propositional form as (𝑟 ∨ 𝑝) ∧ 𝑟. Since p is true, q is false, and r is true, the truth
value is
𝑝 𝑞 𝑟 (𝒓⋁𝒑) (𝒓⋁𝒑) ∧ 𝒓
T F T T T
Solution 2
p: 5 is an integer.
q: 3 is an integer.
r: 2 divides 4.
The statement (5 is not an integer and 3 is an integer) and 2 divides 4 can be written
in propositional form as (∽ 𝑝 ∧ 𝑞) ∧ 𝑟.
Since p is true, not p is false, q is false, and r is true, the truth value is
𝑝 𝑞 𝑟 ∼𝑝 (∽ 𝑝 ∧ 𝑞) (∽ 𝑝 ∧ 𝑞) ∧ 𝑟
T F T F F F
Show that 𝑝 ∧ 𝑞 = 𝑞 ∧ 𝑝.
Solution: Construct the truth table.
Since they have the same truth values, they are equivalent.
Show that 𝑝 ∧ 𝑞 ∨ 𝑟 = 𝑝 ∨ 𝑟 ∧ 𝑞 ∨ 𝑟 .
Solution. Construct the truth table.
Hence, 𝑝 ∧ 𝑞 ∨ 𝑟 = 𝑝 ∨ 𝑟 ∧ 𝑞 ∨ 𝑟 .
Show that ∼ (𝑝 ∧ 𝑞) ≢∼ 𝑝 ∧∼ 𝑞
Solution: Use the truth table to prove the claim.
Since the two lines in the truth tables are not equal, the claim is
correct.
1 p q r
Get crosswise,
2 T T T
and answer the
T T F
following:
T F T
1. Construct the truth table for the
compound proposition: T F F
(∼ 𝑝 ∨ 𝑞) ∧ (∼ 𝑞 ∨ 𝑟) F T T
F T F
2. Construct the truth table for the
compound proposition: F F T
(𝑝 ∧ (𝑞 ∨ ∼ 𝑟)) ∨ ∼ 𝑞 F F F
CONDITIONAL STATEMENTS
AND BICONDITIONAL
STATEMENTS
CONDITIONAL AND BICONDITIONAL
STATEMENTS
You may have encountered statements such as "If it rains, then our
outing is cancelled," and "If I pass this course, then I will graduate
next year." In mathematics, there are statements such as
"If the sum of the digits in a number is divisible by 9, then the
number is divisible by 9," and "If a triangle is isosceles, then the two
sides are equal."
Notice in the aforementioned examples, the statements are
connected by "if... then." If p and q are two statements, "if p, then q"
is a statement called an implication, or a conditional statement,
which is written as p→ q; p is called the hypothesis, or premise, or
antecedent; and q is called the conclusion or consequence.
The statement 𝑝 → 𝑞 is called a conditional statement because
𝑝 → 𝑞 asserts that 𝑞 is true on the condition the 𝑝 holds. The
truth table of 𝑝 → 𝑞 is given below.
𝒑 𝒒 𝑝→𝑞
T T T
T F F
F T T
F F T
Notice that the statement 𝑝 → 𝑞 is true when both 𝑝 and 𝑞 are
true, and when 𝑝 is false, no matter what truth value 𝑞 has.
Other ways to express a conditional statement are as
follows:
“𝒊𝒇 𝒑, 𝒕𝒉𝒆𝒏 𝒒" "𝒑 𝒐𝒏𝒍𝒚 𝒊𝒇 𝒒"
"𝒑 𝒊𝒔 𝒔𝒖𝒇𝒇𝒊𝒄𝒊𝒆𝒏𝒕 𝒇𝒐𝒓 𝒒" "𝒒 𝒘𝒉𝒆𝒏𝒆𝒗𝒆𝒓 𝒑"
"𝒒 𝒊𝒇 𝒑" "𝒒 𝒘𝒉𝒆𝒏 𝒑"
"𝒒 𝒊𝒔 𝒏𝒆𝒄𝒆𝒔𝒔𝒂𝒓𝒚 𝒇𝒐𝒓 𝒑" "𝒒 𝒇𝒐𝒍𝒍𝒐𝒘𝒔 𝒇𝒓𝒐𝒎 𝒑"
You can form some new conditional statements from
the implication 𝑝 → 𝑞 . The proposition 𝑞 → 𝑝 is called
the converse of 𝑝 → 𝑞. The contrapositive of 𝑝 → 𝑞 is
the proposition ~𝑞 → ~𝑝. The statement ~𝑝 → ~𝑞 is
called the inverse of the implication 𝑝 → 𝑞.
Example 1
Consider the following statement "If 3 is not even integer, then the
square root of 4 is even.“ Write the converse, inverse, and contrapositive
of this implication.
Solution: Let p: 3 is not an even integer; q: the square root of 4 is even
The above statement can be expressed in propositional form as 𝑝 → 𝑞.
The converse is 𝑞 → 𝑝. If the square root of 4 is even, then 3 is not an
even integer.
The inverse is ~𝑝 → ~𝑞. In the context of the statement, it can be
expressed as "If 3 is an even integer, then the square root of 4 is not
even."
The contrapositive is ~𝑞 → ~𝑝 which can be expressed in words as "If the
square root of 4 is not an even integer, then 3 is an even integer."
Another way to combine propositions that
express that two propositions have
the same truth values is by using biconditional
statements or bi-implications.
The biconditional statement 𝑝 𝑞, (read as p is
logically equivalent to q) is the
proposition "p if and only if q." The bi-implication
𝑝 𝑞 can also be written as 𝑝 ≡ 𝑞. This
statement is true when p and q have the same
truth values.
The truth table is given below:
𝒑 𝒒 𝑝 𝑞
T T T
T F F
F T F
F F T
Other ways to express 𝑝 𝑞 are as follows:
"𝑝 𝑖𝑠 𝑛𝑒𝑐𝑒𝑠𝑠𝑎𝑟𝑦 𝑎𝑛𝑑 𝑠𝑢𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡 𝑓𝑜𝑟 𝑞"
"𝑖𝑓 𝑝 𝑡ℎ𝑒𝑛 𝑞 𝑎𝑛𝑑 𝑐𝑜𝑛𝑣𝑒𝑟𝑠𝑒𝑙𝑦"
p if q𝑜𝑟 "𝑝 𝑖𝑓 𝑎𝑛𝑑 𝑜𝑛𝑙𝑦 𝑖𝑓 𝑞"
Example: Determine if 𝑝 ∨ 𝑞 ∧ 𝑟 𝑎𝑛𝑑 (𝑝 ∨
𝑞) ∧ (𝑝 ∨ 𝑟) are logically equivalent.
Solution: Construct a truth table and determine if they have
the same truth values.
𝑝 𝑞 𝑟 𝑞∧𝑟 𝑝 ∨ (𝑞 ∧ 𝑟) 𝑝∨𝑞 𝑝∨𝑟 (𝑝 ∨ 𝑞) ∧ (𝑝 ∨ 𝑟)
T T T T T T T T
T T F F T T T T
T F T F T T T T
T F F F T T T T
F T T T T T T T
F T F F F T F F
F F T F F F T F
F F F F F F F F
Because the truth values 𝑝 ∨ 𝑞 ∧ 𝑟 𝑎𝑛𝑑 (𝑝 ∨ 𝑞) ∧ (𝑝 ∨ 𝑟) agree, these compound propositions
are logically equivalent. This is called the distributive law of disjunction over conjunction.
Show that ~(𝑝 ∧ 𝑞) ≡∼ 𝑝 ∨∼ 𝑞
The truth table given below:
𝑝 𝑞 𝑝∧𝑞 ∼ (𝑝 ∧ 𝑞) ∼𝑝 ∼𝑞 ∼ 𝑝 ∨∼ 𝑞
T T T F F F F
T F F T F T T
F T F T T F T
F F F T T T T
From the truth table, ~ 𝑝 ∧ 𝑞 𝑎𝑛𝑑 ∼ 𝑝 ∨∼ 𝑞 have the same truth values, hence they are logically
equivalent. This form is called De Morgan’s Law, specifically the first law in Boolean Algebra which
states
∼ (𝐴 ∧ 𝐵) =∼ 𝐴 ∨∼ 𝐵
This means that the negation of an AND operation is equivalent to the OR of the negations.
TAUTOLOGIES, CONTRADICTIONS, AND
CONTINGENCIES
Compound propositions can be a tautology, a
contradiction or an absurdity, or a contingency.
A compound proposition is called a tautology if it is
always true for all possible values of its propositional
variables. A contradiction or absurdity is a
propositional form which is always false for all possible
values of its propositional variables. A propositional
form which is neither a tautology
nor a contradiction is called a contingency.
Example: Construct the truth table for the given propositions
and determine whether the propositions is a tautology,
contradiction, or contingency.
𝑎. (𝑝 ∧ 𝑞) → (𝑝 → 𝑞) 𝑑. (𝑝 ∧∼ 𝑝) → 𝑞
𝑏. 𝑝 → ~(~𝑝) 𝑒. (𝑝 → 𝑞) ∧ (𝑞 → 𝑝)
𝑐. 𝑝 ∧∼ 𝑞
Solution: 𝑎. (𝑝 ∧ 𝑞) → (𝑝 → 𝑞)
𝒑 𝒒 𝒑∧𝒒 𝒑→𝒒 (𝒑 ∧ 𝒒) → (𝒑 → 𝒒)
T T T T T
T F F F T
F T F T T
F F F T T
Since the truth values of the proposition are all true for all
possible values of the variables 𝑝 and 𝑞, it follows that the
proposition is a tautology.
Solution: 𝑏. 𝑝 → ~(~𝑝)
Since the truth values of the proposition are all true for all possible
values of the variables 𝑝 and 𝑞, it follows that the proposition is a
tautology.
Solution: 𝑐. 𝑝 ∧∼ 𝑞
Since the truth values of the proposition are all false for all possible
values of the variable p, it follows that the proposition is a
contradiction or an absurdity.
Solution: d. (𝑝 ∧∼ 𝑝) → 𝑞
Since the truth values of the proposition are all
true for all possible values of the variables 𝑝 and 𝑞,
it follows that the proposition is a tautology.
Solution: 𝑒. (𝑝 → 𝑞) ∧ (𝑞 → 𝑝)
Since the truth values of the proposition are neither true nor false for
all possible values of the variables 𝑝 and 𝑞, it follows that the
proposition is a contingency.
Exercises
Construct a truth table for each
proposition involving either conditional,
biconditional, and compound
propositions, and identify whether the
final column represents a tautology,
contradiction, or contingency.
Construct a truth table for (𝑝 ∧ 𝑞) → 𝑝
Construct a truth table for (𝑝 ∨ 𝑞) 𝑞
Construct a truth table for ~(𝑝 ∧ 𝑞) → (𝑝 ∨∼ 𝑞)
Construct a truth table for (𝑝 ∧∼ 𝑝)
1
Get 𝐶𝑊 and answer the following:
2
1. Construct a truth table for the Use the reference below:
compound statement ~(𝑝 ∧
𝑞) ⟷ (~𝑝 ∨∼ 𝑞), and determine
whether the compound p q
statement is a tautology,
contradiction, or contingency. T T
2. Construct a truth table for the
compound statement (𝑝 ∧∼
T F
𝑞) ⟶ ~(𝑝 ⟶ 𝑞), and determine
whether the compound F T
statement is a tautology,
contradiction, or contingency.
F F