Logic
Logic
Logic
Logic is the study of correct thinking and reasoning. It uses principles and methods
to distinguish valid arguments from those that are not. It is the foundation for expressing
logical methods used to prove theorems, design computer software, and to solve
mathematical problems.
Logic is a tool for working with complicated statements. It illustrates the
importance of precision and conciseness. It allows us to determine the validity of an
argument in and out of mathematics. For lawyers, they use logic to communicate
effectively, construct arguments, analyze legal contracts, and make decisions.
In logic, assertions are made by combining words and symbols in the form of
sentences. Such assertions are called statements or propositions, which are declarative
sentences that are either true or false – but not both.
A statement or proposition may be denoted by a variable like P, Q, R,…
Example 1.
P: University of Northern Philippines is located in Vigan City.
Q: Light travels faster than sound.
R: 1 + 3 = 4.
S: 7 is an even number.
Example 3.
Let p: I review my lessons.
q: I play video games.
r: I go to the beach.
s: I get a reward.
The following are compound statements formed by using logical connectives.
Write the following statements:
a. q ˄ p
b. q ˅ r
c. ⁓ r
d. p → s
e. s ↔ p
Solution:
a. I play video games and review my lessons.
b. I play video games or go to the beach.
c. I do not go to the beach.
d. If I review my lessons, then I get a reward.
e. I get a reward if and only if I review my lessons.
Example 4. Indicate the simple statements by p and q and express the
compound statement in symbolic form of the following compound statements.
a. John can program in C++ and he can program in Java.
b. If x is an even number, then it is a multiple of 2.
Solution:
a. p: John can program in C++.
q: John can program in Java.
p˄q
b. p: x is an even number.
q: x is a multiple of 2.
p→s
The truth values of a compound statement are respectively determined by the truth
values of the original statements and the connectives used to form them. The decision of
accepting or rejecting a statement depends on the truth values of a proposition. An
acceptable statement is given a truth value “true” and unacceptable statement is given a
truth value “false”
a. Negation.
If a proposition p is true, then the proposition ⁓ p is false. However, if p is false,
then ⁓ p is true.
For example:
Let p: “I study at University of Northern Philippines.” be a true statement. Then, ⁓
p is stated as “I do not study at the University of Northern Philippines.” or “It is false that
I study at the University of Northern Philippines.” Which is a negation of the original
proposition p.
b. Conjunction
The conjunction of two statements p and q denoted by p ⋀ q is defined by the
following truth table.
p q p⋀q
T T T
T F F
F T F
F F F
The only condition for p ⋀ q to be a true statement is when both p and q are true.
c. Disjunction
The disjunction of two statements p and q denoted by p q is defined by the
following truth table.
p q p⋁q
T T T
T F T
F T T
F F F
This means that the disjunction of two statements is true if and only if at least one
of the statements is true.
d. Implication or Conditional
In a conditional statement, the truth of p implies the truth of q. If p is true, then q
must be true. The only way that this can fail (or be false) is when p is true while q is false.
The truth table of p → q is given in the following table.
p q p →q
T T T
T F F
F T T
F F T
e. Biconditional
The biconditional statement p ↔ 𝑞, is defined by the following truth table.
p q p ↔𝐪
T T T
T F F
F T F
F F T
a. [⁓ p → ( p ⋀ q)]
b. [ (p ↔ q) ⋁ (p → r)] → ⁓ (q ⋀ r)
Solution:
a. [⁓ p → ( p ⋀ q)]
P Q ⁓p p⋀q [⁓ p → ( p ⋀ q)]
T T F T T
T F F F T
F T T F F
F F T F F
b. [(p ↔ q) ⋁ (p → r)] → ⁓ (q ⋀ r)
T T T T T T T F F
T T F T F T F T T
T F T F T T F T T
T F F F F F F T T
F T T F T T T F F
F T F F T T F T T
F F T T T T F T T
F F F T T T F T T