GEC 005 MODULE Week 15
GEC 005 MODULE Week 15
WEEK NUMBER: 15
TIME ALLOTMENT: 3 Hours
LEARNING CONTENT:
CODES
Introduction
Logic is one of the oldest intellectual disciplines in human history. It dates back to Aristotle. It has
been studied through the centuries by people like Leibniz, Boole, Russell, Turing, and many others. And it
is still a subject of active investigation today.
Discussion
A. Logic and Computer Addition
The term “logic” is often used, but not always in its technical sense. Logic is technically defined as
“the science or study of how to evaluate arguments and reasoning.” Logic helps us to differentiate correct
reasoning from poor reasoning. It is important in the sense that it helps us to reason correctly. Others
defined logic as discipline that deals with the methods of reasoning. And logical reasoning is used on
mathematics to prove theorems, in computer science to verify correctness of programs and to prove
theorems.
Mathematical logic (or symbolic logic) is a branch of mathematics with close connections to
computer science. It includes both the mathematical study of logic and the applications of formal logic to
other areas of mathematics. Mathematical logic includes the study of the deductive formal proofs systems
and expressive formal systems. Mathematical logic has four divisions: Set Theory, Model Theory, Recursion
Theory and Proof Theory.
The existence of mathematical logic has contributed to, and has been aggravated by, the study of
foundations of mathematics. The study started in the late 19th century with the development of axiomatic
frameworks for analysis, geometry and arithmetic. In our time the work in the foundations of mathematics
often centered on establishing which parts of mathematics can be formalized, rather than trying to find
theories in which all of mathematics can be developed.
B. Propositions
A proposition (or statement) is a declarative sentence which is either true or false, but not both.
The truth value of the propositions is the truth and falsity of the proposition. Let us examine the examples
below:
Answer:
1. Mathematics is fun.
2. Calculus is more interesting than Trigonometry.
3. It was hot in Manila.
4. Street vendors are poor.
C. Logical Operators
There are six main logical connectives such as conjunction, disjunction, negation, conditional,
biconditional, and exclusive-or. The following are briefly discussed in this section. Note that T refers to true
proposition and F refers to false proposition.
Conjunction. The conjunction of the proposition p and q is the compound proposition “p and q.”
Symbolically, 𝑝 𝑞, where is the symbol for "and.”
Property 1: If p is true and q is true, then, 𝑝 𝑞 is true; otherwise, 𝑝 𝑞 is false. Meaning, the conjunction of
two propositions is true only if each proposition is true.
P q 𝒑 𝒒
T T T
T F F
F T F
F F F
Answer:
1. Since “2 + 6 = 9” is a false proposition (note that 2 + 6 = 9) and the proposition "man is a
mammal” is true, the conjunction of the compound proposition is false.
P q 𝒑 𝒒
F T F
2. In the proposition “Manny Pacquiao is a boxing champion” is true while the proposition ”Gloria
Macapagal Arroyo is the first female Philippine President” is false (note that Corazon Aquino is
the first female Philippine President), therefore the conjunction of the compound proposition is
false.
P q 𝒑 𝒒
T F F
3. Since both the propositions ”Ferdinand Marcos is the only three-term Philippine President” " and
"Philippine Senate is composed of 24 senators” are both true, thus the conjunction of the
compound proposition is true.
P q 𝒑 𝒒
T T T
Answer:
1. Note that the proposition “2 + 6 = 9” is false while the proposition “Manny Pacquiao is a boxing
champion” is true; hence the disjunction of the compound proposition is true.
p q 𝒑 𝒒
F T T
2. Since proposition “Philippine Senate is composed of 24 senators” is true and the proposition
"Gloria Macapagal Arroyo is the first female Philippine President” is false, therefore the disjunction
of the compound proposition is true.
p q 𝒑 𝒒
T F T
3. Given that both propositions ”Ferdinand Marcos is the only three-term Philippine President” and
“man is a mammal” are both true, thus the disjunction of the compound proposition is true.
p q 𝒑 𝒒
F T T
Negation. The negation of the proposition p is denoted by ~𝑝, where ~ is the symbol for “not.”
Property 3: If p is true, ~p is false. Meaning, the truth value of the negation of a proposition is always the
reverse of the truth value of the original proposition.
p ~𝒑
T F
F T
Example: The following are propositions for p, find the corresponding ~𝑝.
7. 3 + 5 = 8.
8. Sofia is a girl.
9. Achaiah is not here.
Answer:
1. 3 + 5 ≠ 8.
2. Sofia is not a girl. or Sofia is a boy.
3. Achaiah is here.6
Conditional. The conditional (or implication) of the proposition p and q is the compound proposition
“if p then q.” Symbolically, 𝑝 → 𝑞, where → is the symbol for “if then.” p is called hypothesis
(or antecedent or premise) and q is called conclusion (or consequent or consequence).
Property 4: The conditional proposition 𝑝 → 𝑞 is false only when p is true and q is false; otherwise 𝑝 → 𝑞 is
true. Meaning 𝑝 → 𝑞 states that a true proposition cannot imply a false proposition.
p q 𝒑→𝒒
T T T
T F F
F T T
F F T
Example: In the proposition “If vinegar is sweet, then sugar is sour.” The antecedent is “vinegar is sweet,”
and the consequent is “sugar is sour.”
Example: Obtain the truth value of each of the following conditional propositions.
10. If vinegar is sweet, then sugar is sour.
11. 2 + 5 = 7 is a sufficient condition for 5 + 6 = 1.
12. 14 – 8 = 4 is a necessary condition that 6 ÷ 3 = 2.
Answer:
1. Since the propositions “vinegar is sweet” and the “sugar is sour” are both false, therefore the
conditional of the compound proposition is true.
P q 𝒑→𝒒
F F T
2. Note that “2 + 5 = 7” is true and “5 + 6 = 1” is false, thus the conditional of the compound
proposition is false.
P q 𝒑→𝒒
T F F
Biconditional. The biconditional of the proposition p and q is the compound proposition “p if and
only if q.” Symbolically, 𝑝 ⟷ 𝑞, where ⟷ is the symbol for “if and only if.”
Property 5: If p and q are true or both false, then 𝑝 ⟷ 𝑞 is true; if p and q have opposite truth values, then
𝑝 ⟷ 𝑞 is false.
P q 𝒑⟷𝒒
T T T
T F F
F T F
F F T
Example: Determine the truth values of each of the following biconditional propositions.
13. 2 + 8 = 10 if and only if 6 – 3 = 3.
14. Manila is the capital of the Philippines is equivalent to fish live in the moon.
15. 8 – 2 = 5 is a necessary and sufficient for 4 + 2 = 7.
Answer:
1. Since the statements “2 + 8 = 10” and the “6 – 3 = 3” are both true, therefore the conditional
of the compound proposition is true.
P q 𝒑⟷𝒒
T T T
2. Note that “Manila is the capital of the Philippines” is true proposition while “fish live in the moon”
is false, thus the conditional of the compound proposition is false.
P q 𝒑⟷𝒒
T F F
3. Given that “8 – 2 = 5” and “4 + 2 = 7” are both false, thus the conditional of the compound
proposition is true.
P q 𝒑⟷𝒒
F F T
Exclusive-or. The exclusive-or of the proposition p and q is the compound proposition “p exclusive-
or q. Symbolically, 𝑝⨁𝑞, where ⨁ is the symbol for “exclusive-or .”
Property 6: If p and q are true or both false, then 𝑝⨁𝑞 is false; if p and q have opposite truth values, then
𝑝⨁𝑞 is true.
P q 𝑝⨁𝑞
T T F
T F T
F T T
F F F
It can be noted that the true values of 𝑝⨁𝑞 is the negation of the truth values of p ↔ q.
Given the proposition “Sofia will take her lunch in Batangas or she will have it in Singapore,” it can
be noted from the statement that “Sofia cannot have her lunch in Batangas and at the same time do it in
Singapore,” thus it is considered false.
If Sofia will have her lunch in Batangas or in Singapore, meaning she can only have it in one location
given a single schedule (the truth value is true).
Lastly, if she ought to decide to have her lunch elsewhere (neither in Batangas nor in Singapore),
therefore the truth value is false.
a. ∼ 𝑝 ∨∼ 𝑞
b. 𝑝 → (𝑝 ↔ ~𝑞)
c. ~𝑝 ∧ 𝑞) ∨ (𝑝 ∧∼ 𝑞)
d. (𝑝 → 𝑞) ∨ (𝑞 ∧∼ 𝑟)
e. (𝑝⨁𝑞) (𝑝 → 𝑞)] ∨ (𝑝 ↔ 𝑟)
Solution:
1. ∼ 𝑝 ∨∼ 𝑞
P q 𝒑 𝒒 ∼ 𝒑 ∨∼ 𝒒
T T F F F
T F F T T
F T T F T
F F T T T
2. 𝑝 → (𝑝 ↔ ~𝑞)
P q 𝒒 𝒑↔ 𝒒 𝒑 → (𝒑 ↔ ~𝒒)
T T F F F
T F T T T
F T F T T
F F T F T
3. (~𝑝 ∧ 𝑞) ∨ (𝑝 ∧∼ 𝑞)
P Q 𝒑 ~𝒑 𝒒 ~𝒒 (𝒑 ∧∼ 𝒒) ~𝒑 ∧ 𝒒) ∨ (𝒑 ∧∼ 𝒒)
T T F F F F F
T F F F T T T
F T T T F F T
F F T F T F F
4. (
p Q r 𝒑→𝒒 𝒓 𝒒 ∧∼ 𝒓 (𝒑 → 𝒒) ∨ (𝒒 ∧∼ 𝒓)
T T T T F F T
T T F T T T T
T F T F F F F
T F F F T F F
F T T T F F T
F T F T T T T
F F T T F F T
F F F T T F T
5. (𝑝⨁𝑞) (𝑝 → 𝑞)] ∨ (𝑝 ↔ 𝑟)
p Q r 𝑝⨁𝑞 𝑝→𝑞 (𝑝⨁𝑞) (𝑝 → 𝑞) 𝑝↔𝑟 (𝑝⨁𝑞) (𝑝 → 𝑞)] ∨ (𝑝 ↔ 𝑟)
T T T F T F T T
T T F F T F F F
T F T T F F T T
T F F T F F F F
F T T T T T F T
F T F T T T T T
F F T F T F F F
F F F F T F T T
There are three important classes of compound statements namely tautology, contradiction, and
contingency which are briefly discussed below.
1. Tautology is a compound statement that is true for all possible combinations of the truth values of the
propositional variables also called logically true.
2. Contradiction is a compound statement that is false for all possible combinations of the truth values of
the propositional variables also called logically false or absurdity.
3. Contingency is a compound statement that can be either true or false, depending on the truth values
of the propositional variables are neither a tautology nor a contradiction.
Example: Write the truth table for each of the following compound statements and determine whether the
compound statement is tautology, contradiction or contingency.
1. (~𝑝 ∧ 𝑞) → 𝑞
2. (𝑝 → 𝑞) (𝑝 → ~𝑞)
3. (~𝑝 ∨ 𝑞) ⊕ (𝑝 → 𝑞)
Solution:
1. (~𝑝 ∧ 𝑞) → 𝑞
p q 𝒑 ~𝒑 𝒒 (~𝑝 ∧ 𝑞) → 𝑞
T T F F T
T F F F T
F T T T T
F F T F T
Since all the truth values of the compound statement (~𝑝 ∧ 𝑞) → 𝑞 are true, thus it is a tautology.
2. (𝑝 → 𝑞) (𝑝 → ~𝑞)
p q 𝑝→𝑞 ~𝑞 𝑝 → ~𝑞 (𝑝 → 𝑞) (𝑝 → ~𝑞)
T T T F F F
T F F T T F
F T T F T T
F F T T T T
Note that the truth values of the statement (𝑝 → 𝑞) (𝑝 → ~𝑞) are combinations of true and false,
therefore the compound statement is contingency.
3. (~𝑝 ∨ 𝑞) ⊕ (𝑝 → 𝑞)
p q ~𝑝 ~𝑝 𝑞 𝑝→𝑞 (~𝑝 ∨ 𝑞) ⊕ (𝑝 → 𝑞)
T T F T T F
T F F F F F
F T T T T F
F F T T T F
Observe that all the truth values of the compound statement are false, thus it is a contradiction.
Two propositions are said to be logically equivalent if they have the same truth value for every row of the
truth table that is if 𝑥 ↔ 𝑦 is a tautology. Symbolically, 𝑥 ≡ 𝑦.
1. 𝑝 ∧ (𝑞 ∨ 𝑟) and (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟)
2. 𝑝 → 𝑞 and ~𝑞 → ~𝑝
3. 𝑝 ↔ 𝑞 and (𝑝 → 𝑞) (𝑞 → 𝑝)
Solution:
1. 𝑝 ∧ (𝑞 ∨ 𝑟) and (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑞)
p q r 𝒒 𝒓 𝒑 ∧ (𝒒 ∨ 𝒓) 𝒑 𝒒 𝒑 𝒓 (𝒑 ∧ 𝒒) ∨ (𝒑 ∧ 𝒓)
T T T T T T T T
T T F T T T F T
T F T T T F T T
T F F F F F F F
F T T T F F F F
F T F T F F F F
F F T T F F F F
F F F F F F F F
Observe that the truth values of compound statements 𝑝 ∧ (𝑞 ∨ 𝑟) and (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟) are the same,
thus we can say that they are logically equivalent.
2. 𝑝 → 𝑞 and ~𝑞 → ~𝑝
p q 𝒑→𝒒 ~𝒒 ~𝒑 ~𝒒 → ~𝒑
T T T F T T
T F F T F F
F T T F T T
F F T T F T
Notice that the truth values of compound statements 𝑝 → 𝑞 and ~𝑞 → ~𝑝 are equivalent; therefore we
can say that they are logically equivalent.
3. 𝑝 ↔ 𝑞 and (𝑝 → 𝑞) (𝑞 → 𝑝)
p q 𝑝↔𝑞 𝑝→𝑞 𝑞→𝑝 (𝑝 → 𝑞) (𝑞 → 𝑝)
T T T T T T
T F F F T F
F T F T F F
F F T T T T
The truth values of 𝑝 ↔ 𝑞 and (𝑝 → 𝑞) (𝑞 → 𝑝) are equal, thus we can say that they are logically
equivalent.
Summary
Logic is the study of reasoning. Logic investigates the level of correctness of the reasoning found in
arguments. An argument is a group of statements of which one (the conclusion) is claimed to follow from
the others (the premises). A statement is a sentence that is either true or false. Every statement is either
true or false; these two possibilities are called “truth values.” Premises are statements that contain
information intended to provide support or reasons to believe a conclusion. The conclusion is the statement
that is claimed to follow from the premises. In order to help recognize arguments, we rely on premise
indicator words and phrases, and conclusion indicator words and phrases.
REFERENCES:
1. Nocon, R. C., & Nocon, E. G. (2018). Essential Mathematics for the Modern World. Quezon City: C &
E Publishing, Inc.
2. Reyes, J. A. (2018). Mathematis in the Modern World. Intramuros Manila: Unlimited Books Library
Services & Publishing Inc.
3. Sirug, W. S. (2018). Mathematics in the Modern World. Intramuros, Manila: Mindshapers Co., Inc.
Prepared by:
Reviewed/Approved: