Fundamentals of Logic
Fundamentals of Logic
Fundamentals of Logic
Learning Outcomes
At the end of this chapter, the students is expected to:
1. Define a propositional logic and its categories;
2. Explain logical connectives and exemplify truth values status of a proposition;
3. Transform logical statements into symbolic form (or vice versa); and 4.
Construct combined truth table of propositions Introduction
Why do most people argue over some issue and never get to the bottom of it? Sometimes
people in dispute say that “they do not see eye to eye.” This expression means that the people
invloved in an argument never get to agree on the issues at hand. In many cases, the
disagreement lies on not being able to present sound arguments based on facts, or the failure
to convince the conteding party using logical arguments. To avoid such a scenario in
Mathematics and to uphold certainly in the validity of mathemtical statements, mathematics
employs the powerful language of logic in asserting truths of statements. The use of logic
illustrates the importance of precision and conciseness in communicating Mathematics.
A propositional logic, also known as statement logic, is the branch of mathematical logic
that studies the truth and falsity of propositions. In propositional logic, the simplest statements
are considered as indivisible units, and hence, propositional logic does not study those logical
properties and relations that depend upon parts of statements that are not themselves
statements on their own, such as the subject and predicate of a statement. A proposition is a
declarative sentence subject for affirmation or denial. It is a statement with truth value; either
true (T) or false (F), but not both.
Examples:
Determine if each sentence is a proposition or not.
a. All parallelograms are quadrilaterals.
b. Rhombuses are squares.
c. Is an equilateral triangle an isosceles triangle?
d. Triangle ABC is a right triangle.
e. Draw two parallel lines that are cut by a transversal.
f. 3 + 4 = 7
g. The sum of two prime numbers is even.
h. x > 10
i. n is a prime number.
j. 2 + 5 = 5
Answers:
a. Proposition
b. Proposition
c. Not a Proposition
d. Proposition
e. Not a Proposition
f. Proposition
g. Proposition
h. Proposition
i. Proposition
j. Proposition
Categories of Propositions
When quality and quantity are combined, propositions may be classified based on its mood as
follows:
Universal Particular
A I
Affirmative
All x is y. Some x is y.
E O
Examples:
To understand the use of symbols in logic, consider the following simple statements.
Let p: The Earth is round. q: The
Sun is cold.
r: It rains in Spain.
p p
T F
F T
Examples:
What is the negative of the following statements?
a. p: √2 is a rational number.
b. q: 6 is an odd number.
Solution:
a. is not a rational number. or is an
irrational number. In symbols, p.
b. 6 is not an odd number. or 6 is an even
number. In symbols, q.
Conjunction Statement
The conjunction of p and q, denoted p q, is a statement that is true if both p and q are true,
and is false otherwise. We read p q as “p and q”
This definition can be represented by the “truth table”:
p q p q
T T T
T F F
F T F
F F F
Note: This truth table shows whether the new statement is true or false for each possible
combination of the truth or falsity of each p and q.
Example 1
Let p: It is raining.
q: The streets are wet.
Then, the statement p q is “It is raining and the streets are wet.”
Example 2
Let r: 9 is an even number.
s: Ten is greater than 9.
Then, the statement r s is “9 is an even number and ten is greater than 9.”
Disjunction Statement
The disjunction of p and q, denoted p q, is a statement that is true if either p is true or q is
true or both are true, and is false otherwise. We read p q as “p or q”.
p q p q
T T T
T F T
F T T
F F F
Note: The truth of the statement p q means that at least one of p or q is true.
Example 1
Let p: It is raining.
q: The streets are
wet.
Then, the statement p q is “It is raining or the streets are wet.”
Example 2
Let r: 9 is an even number.
s: Ten is greater than 9.
Then, the statement r s is “9 is an even number or ten is greater than 9.”
Conditional Statement
The conditional from p to q, denoted p → q, is a statement that is true if it is never the
case that p is true and q is false. We read p → q as “if p then q”. p is called the “antecedent or
hypothesis” and q is called the “consequent or conclusion”.
Consider the following statement: "If you earn an A in logic, then I'll buy you a Yellow
Mustang." It seems to be made up out of two simpler statements:
p: "You earn an A in logic," and q: "I will buy you a Yellow Mustang."
What the original statement is then saying is this: if p is true, then q is true, or, more simply, if p,
then q. We can also phrase this as p implies q, and we write p→q.
Now let us suppose for the sake of argument that the original statement: "If you earn an A in
logic, then I'll buy you a Yellow Mustang," is true. This does not mean that you will earn an
A in logic; all it says is that if you do so, then I will buy you that Yellow Mustang. If we think
of this as a promise, the only way that it can be broken is if you do earn an A and I do not buy
you a Yellow Mustang. In general, we use this idea to define the statement p→q.
Notes:
1. The only way that p→q can be false is if p is true and q is false—this
is the case of the "broken promise."
2. If you look at the truth table again, you see that we say that "p→q" is
true when p is false, no matter what the truth value of q. This again makes
sense in the context of the promise — if you don't get that A, then whether or
not I buy you a Mustang, I have not broken my promise. However, it goes
against the grain if you think of "if p then q" as saying that p causes q. The
problem is that there are really many ways in which the English phrase "if ...
then ..." is used. Logicians have simply agreed that the meaning given by the
truth table above is the most useful for mathematics, and so that is the meaning
we shall always use. Shortly we'll talk about other English phrases that we
interpret as meaning the same thing.
Here are some examples that will help to explain each line in the truth table.
If p and q are both true, then p→q is true. For instance: If 1+1 = 2
then the sun rises in the east.
Notice that the statements p and q need not have anything to do with one another. We are
not saying that the sun rises in the east because 1+1 = 2, simply that the whole statement is
logically true.
Here p: "It is raining," and q: "I am carrying an umbrella." In other words, we can rephrase
the sentence as: "If it is raining then I am carrying an umbrella." Now there are lots of days
when it rains (p is true) and I forget to bring my umbrella (q is false). On any of those days
the statement p→q is clearly false.
If p is false, then p→q is true, no matter whether q is true or not. For instance:
If the moon is made of green cheese, then I am the King of England.
Here p: "The moon is made of green cheese," which is false, and q: "I am the King of
England." The statement p→q is true, whether or not the speaker happens to be the King of
England (or whether, for that matter, there even is a King of England).
Biconditional Statement
The biconditional from p to q, denoted p ↔ q, is a statement that is true if p and q are both
true or both false, and is false otherwise. We read p ↔ q as “p if and only if q” or “p iff q”.
Note that, from the truth table, we see that, for p↔q to be true, both p and q must have the
same truth values; otherwise it is false.
p if and only if q.
p is necessary and sufficient for q. p is
equivalent to q.
Examples:
a. True or false? "1+1 = 3 if and only if Mars is a black
hole."
b. Rephrase the statement: "I teach math if and only if I am
paid a large sum of money." Solution:
a. True. The given statement has the form p↔q, where p: "1+1=3" and q: "Mars
is a black hole." Since both statements are false, the biconditional p↔q is true.
b. Here are some equivalent ways of phrasing this sentence:
"My teaching math is necessary and sufficient for me to be paid a large sum of money."
"For me to teach math it is necessary and sufficient that I be paid a large sum of money."
More Examples:
I. Write the following in symbolic form using p, q, and r for statements and the symbols
¬, ⋀, ⋁, →, where
p: Pres. Duterte is a good president. q:
Government officials are corrupt. r: People are
happy.
Answers:
a. p→ (¬𝑞)
b. ¬𝑞 → 𝑟
c. (𝑝 ∧ 𝑟) → (¬𝑞)
d. ¬𝑝 ↔ (𝑞 ∧ (¬𝑟))
Illustrative Examples:
a. Construct a truth table for (¬ p˅q)˅q.
b. Use the truth table in the previous discussion to determine the truth value of (¬
p˅q)˅q, given that p is true and q is false.
Solution:
a. Start with the standard truth table form and then include a ¬ p column.
p q p
T T F
T F F
F T T
F F T
Now use the truth values from the ¬ p and q columns to produce the truth values for p˅q, as
shown in the rightmost column of the following table.
p q p p˅q
T T F T
T F F F
F T T T
F F T T
Negate the truth values in the p˅q column to produce the following.
p q p p˅q ( p˅q)
T T F T F
T F F F T
F T T T F
F F T T F
As the last step, form the disjunction of (¬ p˅q)˅q with q and place the results in the
rightmost column of the table. See the following table. The shaded column is the truth table
for (¬ p˅q)˅q.
p q p p˅q ( p˅q) (¬ p˅q)˅q
T T F T F T
T F F F T T
F T T T F T
F F T T F F
b. In row 2 of the above truth table, we see that when p is true, and q is false, the
statement (¬ p˅q)˅q in the rightmost column is true.
EXERCISES 3.3
I. Write each sentence in symbolic form. Use p, q, r, and s as defined below. Tell whether if
each statement is true or false by applying the truth table.
p: Stephen Curry is a football player. (False) q:
Stephen Curry is a basketball player. (True) r:
Stephen Curry is a rock star. (False) s: Stephen Curry plays
for the Warriors. (True)
__________________________ 1. Stephen Curry is a football player or a basketball player, and
he is not a rock star.
__________________________ 2. Stephen Curry is a rock star, and he is not a basketball player
or a football player.
__________________________ 3. If Stephen Curry is a basketball player and a rock star, then he
is not a football player.
__________________________ 4. Stephen Curry is a basketball player, if and only if he is not
a football player and he is not a rock star.
__________________________ 5. If Stephen Curry plays for the Warriors, then he is a
basketball player and he is not a football player.
p q p →q ¬p→ ¬q q p ¬q→ ¬p
T T T T T T
T F F T T F
F T T F F T
F F T T T T
Examples:
Give the converse, inverse, and contrapositive of the following implications:
a. If this movie is interesting, then I am watching it.
b. If p is prime number, then it is odd.
Answers:
a. Inverse: If this movie is not interesting, then I am not
watching it. Converse: If I am watching this movie,
then it is interesting.
Contrapositive: If I am not watching this movie, then it is not interesting.