Sei sulla pagina 1di 11

Chapter 1

Propositional Logic

Solved Problems
A. Define the following:

1. Angle 3. Theorem

2. Polygon 4. Annuity

B. Describe the following words:

1. PUP 3. House

2. Cat 4. Korean Drama

Answers:

1. An angle is formed when two lines come together at a point.

2. A polygon is a figure enclosed by straight sides.

3. A theorem is a mathematical statement that can be proven true.

4. An annuity is a positive amount of money from which regular withdrawals are made.

Truth Table
A truth table lists out all the possible values (true or false) of several statements. For example,
with two statements, A and B, there are four possibilities: both could be true, both could be false,
A could be true and B false, or A could be false and B true.

1
2 CHAPTER 1. PROPOSITIONAL LOGIC

1.1 Propositions

Definition 1
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” and is denoted by T or 1; otherwise, its
truth value is false and is denoted by F or 0.

The building blocks of logic are statements: sentences which must be either true or false. For
example, Mercury is more dense than copper is a statement. We might not know if it is true
or false, but the sentence leaves no third possibility. A sentence like You are 6 feet tall is not
a statement unless it is very clear to whom you refers. Opinions like Paris is beautiful are best
avoided in science, logic, and mathematics because they can be true for some people and false for
others.

Example 1. Determine whether each of the following statements is a proposition or not a propo-
sition. If the given is a proposition, give its truth value (if possible).

1. Jose Rizal is our National Hero. P, T

2. Welcome to the Philippines! NP

3. Find x such that x is a multiple of your age. NP

4. Who is the first president of the republic? NP

5. Douglas MacArthur arrived in the Philippines in 1521. P, F

6. Our president is either pretty or handsome. NP

7. 1 is a prime number. P, F

8. 2 is a irrational number. P, T

9. This statement is false. NP

10. There is life in planet Pluto. P, not yet determined if T or F

11. Statistics is important in research. P, T

12. Come here! NP

13. Granite is a metamorphic rock. P, T


1.1. PROPOSITIONS 3

14. Buy me a milkshake. NP, This is a command and not a true or false statement

15. All horses are mammals. P, T

16. Jose Manalo was a genius. NP

17. Math is fun. NP

18. Ren Descartes was primarily a mathematician. NP

Given a proposition, its truth table shows all its possible truth values.

p p q p q r
1 1 1 1 1 1
0 1 0 1 1 0
0 1 1 0 1
0 0 1 0 0
0 1 1
0 1 0
0 0 1
0 0 0

Remark: In general, truth table involving n distinct propositions has 2n rows.

Definition 2
Let p be a proposition. The negation of p, denoted by ¬p, is the statement “It is not the
case that p.” The proposition ¬p is read “not p.” The truth table for ¬p is

p ¬p
1 0
0 1

Example 2. State the negation of the following propositions.

1. r : Everyone in Visayas speak Cebuano.


¬r : Not everyone in Visayas speak Cebuano.
¬r : Some people in Visayas do not speak Cebuano.
x−1
2. p : The function f (x) = is a polynomial function.
x+1
x−1
¬p : The function f (x) = is not a polynomial function.
x+1
4 CHAPTER 1. PROPOSITIONAL LOGIC

3. q : 3 is a composite number.
¬q : 3 is not a composite number.
¬q : 3 is a prime number.

4. s : 2 is an irrational number.

¬s : 2 is not an irrational number.

¬s : 2 is a rational number.

1.2 Compound Propositions


A simple proposition is a proposition that cannot be deduced to simpler propositions. A com-
pound proposition is a proposition formed by two or more simple propositions.

Definition 3
Let p and q be propositions. The conjunction of p and q, denoted by p ∧ q, is the
proposition “p and q”. The conjunction p ∧ q is true when both p and q are true, and is false
otherwise. The propositions p and q are called conjuncts. The truth table of p ∧ q is

p q p∧q
1 1 1
1 0 0
0 1 0
0 0 0

Example 3. Let p and q be propositions such that


p : A bat is a mammal.
q : π is rational.
Express the following in sentence form.

1. p ∧ q : A bat is a mammal and π is rational.

2. p ∧ (¬q) : A bat is a mammal and π is not rational.


p ∧ (¬q) : A bat is a mammal but π is irrational.

3. (¬p) ∧ q : A bat is not a mammal while π is rational.

4. (¬p) ∧ (¬q) : A bat is a mammal and π is irrational.

5. ¬(p ∧ q) : It is not the case that a bat is a mammal and π is irrational.


¬(p ∧ q) : Neither a bat is a mammal nor π is rational.
Later it will be proved that: ¬(p ∧ q) ↔ ¬p ∨ ¬q
1.2. COMPOUND PROPOSITIONS 5

Definition 4
Let p and q be propositions. The disjunction of p and q, denoted by p∨q, is the proposition
“p or q”. The disjunction p ∨ q is false when both p and q are false, and is true otherwise.
The propositions p and q are called disjuncts. The truth table of p ∨ q is

p q p∨q
1 1 1
1 0 1
0 1 1
0 0 0

Example 4. Let p and q be propositions such that


p : Spider is an insect.
q : π is rational.
Express the following in sentence form.

1. p ∨ q : Either spider is an insect or π is rational.

2. p ∨ (¬q) : Either spider is an insect or π is irrational.

3. (¬p) ∨ q : Either spider is not an insect or π is rational.

4. (¬p) ∨ (¬q) : Neither spider is an insect nor π is rational.

5. ¬(p ∨ q) : It is not the case that spider is an insect or π is rational.


¬(p ∨ q) : Spider is not an insect and π is irrational.
Later it will be proved that: ¬(p ∨ q) ↔ ¬p ∧ ¬q

Solved Problems
1. Suppose statements A, B, and F were true and C, D, and E were known false. Find the truth
value (true or false) for each of the following:

1. A ∧ C 4. E ∨ F 7. ¬(B ∧ D)

2. ¬(B) ∨ ¬(F ) 5. (A ∧ B) ∨ C 8. (A ∨ B) ∧ C

3. A ∧ B 6. ¬B ∧ D 9. A ∨ (B ∧ C)
6 CHAPTER 1. PROPOSITIONAL LOGIC

Definition 5
Let p and q be propositions. The exclusive or of p and q, denoted by “p Y q” or “p ⊕ q”, is
the proposition that is true when exactly one of p and q is true, and is false otherwise. The
truth table of p Y q is

p q pYq
1 1 0
1 0 1
0 1 1
0 0 0

Example 5.

1. A person is either male or female. (A person is male or a person is female.)

2. An integer is either odd or even.

3. A positive integer greater than 1 is either prime or composite.

Definition 6
Let p and q be propositions. The conditional statement p → q is the proposition “If p,
then q.” or “p implies q”. The conditional statement p → q is false when p is true and q is
false, and true otherwise. In the conditional statement p → q, p is called the hypothesis
(or antecedent or premise) and q is called the conclusion (or consequence). The truth table
of p → q is

p q p→q
1 1 1
1 0 0
0 1 1
0 0 1

Other ways to express this conditional statement p → q:

1. if p, q 5. q if p

2. p only if q

3. p is sufficient for q

4. a sufficient condition for q is p 6. q whenever p


1.2. COMPOUND PROPOSITIONS 7

7. q when p 10. q follows from p

8. q is necessary for p

9. a necessary condition for p is q 11. q unless ¬p

Example 6. Let p and q be propositions such that


p : Victor is sleeping.
q : 2 + 5 = 8.
Express the following in sentence form.

1. p → q : If Victor is sleeping, then 2 + 5 = 8.


p→q : Victor is sleeping implies that 2 + 5 = 8. (p implies q)
p→q : 2 + 5 = 8 if Victor is sleeping. (q if p)
p→q : 2 + 5 = 8 unless Victor is not sleeping. (q unless ¬p)

2. q → p : If 2 + 5 = 8, then Victor is sleeping.

3. ¬p → ¬q : If Victor is not sleeping, then 2 + 5 6= 8.

4. ¬q → ¬p : If 2 + 5 6= 8, then If Victor is not sleeping.

5. ¬(p → q) : It is not the case that if Victor is sleeping, then 2 + 5 = 8.


¬(p → q) : Victor is sleeping but 2 + 5 6= 8.
Later it will be proved that: ¬(p → q) ↔ p ∧ ¬q

Remark: If p → q, then

1. q → p is called the converse of p → q.

2. ¬p → ¬q is called the inverse of p → q.

3. ¬q → ¬p is called the contrapositive of p → q.


8 CHAPTER 1. PROPOSITIONAL LOGIC

Definition 7
Let p and q be propositions. The biconditional statement p ↔ q is the proposition “p if
and only if q” (or simply “p iff q”). The biconditional statement p ↔ q is true when p and q
have the same truth values, and is false otherwise. Biconditional statements are also called
bi-implications. The truth table of p ↔ q is

p q p↔q
1 1 1
1 0 0
0 1 0
0 0 1

Other ways to express this biconditional statement p → q:

1. “p is necessary and sufficient for q”

2. “if p then q, and conversely”

Example 7. Let p and q be propositions such that


p : Victor is sleeping.
q : 2 + 5 = 8.
Express the following in sentence form.

1. p ↔ q : Victor is sleeping if and only if 2 + 5 = 8.


p ↔ q : Victor is sleeping is necessary and sufficient for 2 + 5 = 8.
p ↔ q : If Victor is sleeping, then 2 + 5 = 8, and conversely.

2. ¬p ↔ q : Victor is not sleeping if and only if 2 + 5 = 8.

3. ¬q ↔ ¬p : 2 + 5 6= 8 if and only if Victor is not sleeping.

Example 8. Consider the following propositions:


p : 2 is an even prime. (T)
q : Every rabbit that lay eggs studies at PUP. (T)
r : Today is Sunday. (F)
s : The moon is made of cheese. (F)
Express the following in symbols and determine its truth value (True or False).

1. Either every rabbit that lay eggs studies at PUP or today is Sunday.
Answer: q ∨ r, T

2. The moon is made of cheese and 2 is an even prime.


Answer: s ∧ p, F
1.3. PROPOSITIONAL EQUIVALENCES 9

3. If 2 is an even prime, then the moon is made of cheese.


Answer: p → s, F

4. Today is Sunday if and only if the moon is made of cheese.


Answer: r ↔ p, T

5. Neither today is Sunday nor the moon is made of cheese.


Answer: ¬(r ∧ s) or ¬r ∨ ¬s, T

6. If 2 is an even prime, then either today is Sunday or the moon is made of cheese.
Answer: p → (r ∨ s), F

7. Every rabbit that lay eggs studies at PUP if and only if either the moon is made of cheese
or 2 is an even prime.
Answer: r ↔ (s ∨ p), T

8. If 2 is not an even prime, then every rabbit that lay eggs studies at PUP implies that today
is Sunday.
Answer: ¬p → (q → r), T

9. The moon is made of cheese whenever either 2 is an even prime or today is Sunday.
Answer: (p ∨ r) → s, F, q whenever p is p → q

10. Every rabbit that lay eggs studies at PUP is necessary for 2 is an even prime.
Answer: p → q, T, q is necessary for p

1.3 Propositional Equivalences

Definition 8
A compound proposition that is always true, no matter what the truth values of the propo-
sitional variables that occur in it, is called a tautology. A compound proposition that is
always false is called a contradiction. A compound proposition that is neither a tautology
nor a contradiction is called a contingency.

Remark: A biconditional proposition which is a tautology is called an equivalence.

Example 9. Show that the following are equivalence.

1. De Morgan’s Law

(a) ¬(p ∧ q) ↔ ¬p ∨ ¬q
10 CHAPTER 1. PROPOSITIONAL LOGIC

(b) ¬(p ∨ q) ↔ ¬p ∧ ¬q (Exercise!)


Proof of De Morgan’s Law (a) using truth tables:

p q p∧q ¬(p ∧ q) ¬p ¬q ¬p ∨ ¬q ¬(p ∧ q) ↔ ¬p ∨ ¬q


1 1 1 0 0 0 0 1
1 0 0 1 0 1 1 1
0 1 0 1 1 0 1 1
0 0 0 1 1 1 1 1

2. ¬(p → q) ↔ (p ∧ ¬q)
Proof using truth tables:

p q p→q ¬(p → q) ¬q p ∧ ¬q ¬(p → q) ↔ (p ∧ ¬q)


1 1 1 0 0 0 1
1 0 0 1 1 1 1
0 1 1 0 0 0 1
0 0 1 0 1 0 1

Example 10. Using truth tables, determine if the following compound propositions is a tautology,
contingency, or contradiction.

1. x : [(p ∨ q) ∧ (¬p ∨ r)] → (q ∨ r)

p q r (p ∨ q) ¬p (¬p ∨ r) (p ∨ q) ∧ (¬p ∨ r) (q ∨ r) y
1 1 1 1 0 1 1 1 1
1 1 0 1 0 0 0 1 1
1 0 1 1 0 1 1 1 1
1 0 0 1 0 0 0 0 1
0 1 1 1 1 1 1 1 1
0 1 0 1 1 1 1 1 1
0 0 1 0 1 1 0 1 1
0 0 0 0 1 1 0 0 1

Therefore, [(p ∨ q) ∧ (¬p ∨ r)] → (q ∨ r) is a tautology.

2. y : [(p → r) ∧ (q → r)] ↔ [(p ∨ q) ∧ ¬r]


1.3. PROPOSITIONAL EQUIVALENCES 11

p q r (p → r) (q → r) (p → r) ∧ (q → r) (p ∨ q) ¬r (p ∨ q) ∧ ¬r y
1 1 1 1 1 1 1 0 0 0
1 1 0 0 0 0 1 1 1 0
1 0 1 1 1 1 1 0 0 0
1 0 0 0 1 0 1 1 1 0
0 1 1 1 1 1 1 0 0 0
0 1 0 1 0 0 1 1 1 0
0 0 1 1 1 1 0 0 0 0
0 0 0 1 1 1 0 1 0 0

Therefore, [(p → r) ∧ (q → r)] ↔ [(p ∨ q) ∧ ¬r] is a contradiction.

3. z : [(p → q) → r] ↔ [p → (q → r)]

p q r (p → q) (p → q) → r (q → r) p → (q → r) z
1 1 1 1 1 1 1 1
1 1 0 1 0 0 0 1
1 0 1 0 1 1 1 1
1 0 0 0 1 1 1 1
0 1 1 1 1 1 1 1
0 1 0 1 0 0 1 0
0 0 1 1 1 1 1 1
0 0 0 1 0 1 1 0

Therefore, [(p → q) → r] ↔ [p → (q → r)] is a contingency.

Potrebbero piacerti anche