0% found this document useful (0 votes)
14 views13 pages

3. Math 121 Notes Propositional Logic

The document provides a comprehensive overview of propositional logic, defining propositions, logical operators, and their truth values. It includes examples of propositions, their negations, conjunctions, disjunctions, and conditional statements, along with truth tables for each. Additionally, it discusses tautologies, contradictions, logical equivalence, and various laws related to logical operations.

Uploaded by

rexlemillion
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views13 pages

3. Math 121 Notes Propositional Logic

The document provides a comprehensive overview of propositional logic, defining propositions, logical operators, and their truth values. It includes examples of propositions, their negations, conjunctions, disjunctions, and conditional statements, along with truth tables for each. Additionally, it discusses tautologies, contradictions, logical equivalence, and various laws related to logical operations.

Uploaded by

rexlemillion
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

3 PROPOSITIONAL LOGIC

3 PROPOSITIONAL LOGIC
Definition 3.1 (Proposition). A proposition is a declarative sentence that is either true
or false, but not both.

Example 3.1. The following sentences are propositions. Determine their truth or falsity.

(a) There is a number n0 ∈ N such that n0 + m = m for every m ∈ N.

(b) Two arbitrary numbers x, y ∈ Q whose sum is an integer are themselves integers.

(c) For every number a ∈ Z there is a number b ∈ Z with the property that a + b = 0.

(d) The square k 2 of any number k ∈ R is greater than or equal to zero.

(e) 2n = n2 for some n ∈ N.

Solution. (a) The proposition is false. This is because, if there is a number n0 ∈ N such
that n0 + m = m for every m ∈ N then (solving the equation n0 + m = m) n0 = 0.
However, 0 ∈
/ N.

(b) The proposition is false. Let us consider 31 , 23 ∈ Q. We see that 13 + 23 = 1 ∈ Z. However,


1 2
, ∈
3 3
/ Z.

(c) The proposition is true. If a = 0 then we can choose b = 0 ∈ Z. We note that


a + b = 0 + 0 = 0. If a ̸= 0 then we choose b = −a ∈ Z, which leads to a + b =
a + (−a) = a − a = 0.

(d) The proposition is true. If k = 0, then k 2 = 0. If k ̸= 0, then k 2 > 0.

(e) The proposition is true. To justify this we need to show that there exists at least one
element r ∈ N such that 2r = r2 . Let us choose 2 ∈ N. Then 22 = 4 = 22 . Hence
2n = n2 for some n ∈ N.

Example 3.2. The following sentences are not propositions. Justify.

(a) x + 1 = 0.

(b) Is 0 an integer?

(c) Solve the equation.

Solution. (a) Here, we are unable to determine whether x + 1 = 0 is true or false because
no value(s) has been assigned to x.

(b) The sentence is not declarative.

(c) The sentence is not declarative.


[email protected] 1
3 PROPOSITIONAL LOGIC
Propositions are denoted using letters. We usually use p, q, r, s, . . . or P , Q, R, S,
. . . . These letters are called propositional variables or statement variables. The truth
value of a proposition is true, denoted by T, if the proposition is true and false, denoted by F,
if it is a false proposition. We can form new propositions from one or more known propositions
using logical operators. The new propositions formed are called compound propositions.
Logical operators connecting two or more propositions are called connectives. To enable
us display the relationships between the truth values of propositions, we use truth tables.
A truth table is a table that displays how the truth or falsehood of the propositional
variables involved in a compound proposition affect the truth or falsehood of the compound
proposition.
Definition 3.2 (Negation of a proposition). Let p be a proposition. The statement “It
is not the case that p” is a proposition called the negation of p. The negation of p is denoted
by ¬p (also denoted by ∼ p or p̄). The proposition ¬p is read “not p.” The truth value of
¬p is true if p is false, and is false if p is true.

p ¬p
T F
F T

Table 3.1: The truth table for the negation of a proposition

Example 3.3. Find the negation of the following propositions.


1. p : 2 < 4.
2. q : 3 is an even integer.
Solution. 1. The negation ¬p of p is given by
¬p : It is not the case that 2 < 4.
This can also be written as “2 is not less than 4” or “2 ≥ 4.”
2. The negation ¬q of q is given by
¬q : It is not the case that 3 is an even integer.
We can simply write “3 is not an even integer” or “3 is an odd integer.”

Definition 3.3 (Conjunction of two propositions). Let p and q be propositions. The
proposition “p and q” is called the conjunction of p and q. The conjunction of p and q is
denoted by p ∧ q. The proposition p ∧ q is true when both p and q are true and is false
otherwise.

Example 3.4. Let the propositions p and q be given by


p : The integer 6 is greater than 0
q : The integer 6 is less than 8.
Find the conjunction of p and q.

[email protected] 2
3 PROPOSITIONAL LOGIC
p q p∧q
T T T
T F F
F T F
F F F

Table 3.2: The truth table for the conjunction of two propositions

Solution. The conjunction p ∧ q of p and q is given by

p ∧ q : The integer 6 is greater than 0 and the integer 6 is less than 8.

This can be written as “The integer 6 is > 0 and < 8,” or simply “0 < 6 < 8.” ■
Definition 3.4 (Disjunction of two propositions). 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.

p q p∨q
T T T
T F T
F T T
F F F

Table 3.3: The truth table for the disjunction of two proposition.

Example 3.5. Find the disjunction of the propositions p and q given by

p : 16 is a perfect square and q : 5 divides 16.

Solution. The disjunction of p and q is given by

p ∨ q : 16 is a perfect square or 5 divides 16.


Definition 3.5 (Conditional statement). Let p and q be propositions. The conditional
statement p → q is the proposition “if p, then 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). A conditional statement is also called an implication.

Example 3.6. Consider the propositions p and q given by

p : 2 is even and q : 2 + 1 is even,

respectively. Find the implication p → q.

[email protected] 3
3 PROPOSITIONAL LOGIC
p q p→q
T T T
T F F
F T T
F F T

Table 3.4: The truth table for the conditional proposition.

Solution. The implication p → q is given by

p → q : If 2 is even then 2 + 1 is even.


We can write q ← p instead of p → q. What is important is the logical relationship, not
the order of writing p and q. In addition to writing “if p, then q,” we can also express p → q
using any of the following terminologies:

1. if p, q

2. q provided that p

3. p is sufficient for q

4. q if p

5. q when p

6. a necessary condition for p is q

7. q given that p

8. p implies q

9. p only if q

10. a sufficient condition for q is p

11. q whenever p

12. q is necessary for p

13. q follows from p

Example 3.7. Consider the following statement:


For every integer c, if c is even, then c + 1 is odd.
Here are a few different ways to write the same statement:
a. For every integer c, c + 1 is odd, if c is even.

b. For every integer c, c + 1 is odd whenever c is even.

[email protected] 4
3 PROPOSITIONAL LOGIC
c. For every integer c, c is even only if c + 1 is odd.

d. For every integer c, c is even implies c + 1 is odd.

e. For every integer c, c is even is a sufficient condition for c + 1 is odd.

f. For every integer c, a sufficient condition for c + 1 is odd is c is even.

g. For every integer c, c + 1 is odd is a necessary condition for c is even.

h. For every integer c, a necessary condition for c is even is c + 1 is odd.

Associated with “p → q” are three other conditional statements:

q → p is called the converse of p → q,


¬q → ¬p is called the contrapositive of p → q,
¬p → ¬q is called the inverse of p → q.

The notation “p → q” is a statement; it is a compound statement built up out of the


statements p and q. The notation “p ⇒ q” is a meta-statement which means that “p → q” is
not just true in some particular instances, but it is true regardless of whether the component
statements are true or false (i.e. “p → q” is a tautology).

Example 3.8. Write down

(a) the converse

(b) the contrapositive

of the statement

For every integer c, if c is even, then c + 1 is odd.

Solution. We have the following:

(a) For any integer c, if c + 1 is odd, then c is even.

(b) For any integer c, if c + 1 is even then c is odd.

Definition 3.6 (Biconditional proposition). Let p and q be propositions. The bicondi-


tional statement p ↔ q is the proposition “p if and only if 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.

NB: The bi-implication p ↔ q is actually the conjunction (p → q) ∧ (q → p). This helps us


to understand Table 3.5.

[email protected] 5
3 PROPOSITIONAL LOGIC
p q p↔q
T T T
T F F
F T F
F F T

Table 3.5: The truth table for the biconditional statement.

Some terminologies used to describe p ↔ q are:

p if and only if q,
p is necessary and sufficient for q,
if p then q, and conversely.

We specify a rule that determines the order of application of the logical operators. This
is shown in the Table 3.6.

Operator ¬ ∧ ∨ → ↔
Precedence 1 2 3 4 5

Table 3.6: Precedence of logical operators

Definition 3.7 (Tautology). A compound proposition that is always true, no matter what
the truth values of the propositions that occur in it, is called a tautology.

Definition 3.8 (Contradiction). A compound proposition that is always false, no matter


what the truth values of the propositions that occur in it, is called a contradiction.

A compound proposition that is neither a tautology nor a contradiction is called a con-


tingency.

An example of a tautology is the disjunction of a proposition and its negation. An


example of a contradiction is the conjunction of a proposition and its negation.

p ¬p p ∨ ¬p p ∧ ¬p
T F T F
F T T F

Table 3.7: Examples of a Tautology and a Contradiction.

Example 3.9. Let q and q be propositions. Construct a truth table for the proposition
¬(p → q) ↔ (p ∧ ¬q).

[email protected] 6
3 PROPOSITIONAL LOGIC
Solution. We obtain the table below.

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


T T F F T F T
T F T T F T T
F T F F T F T
F F T F T F T

Table 3.8: A truth table for ¬(p → q) ↔ (p ∧ ¬q).

NB: Here, we see that the proposition ¬(p → q) ↔ (p ∧ ¬q) is a tautology. Note also that
the propositions ¬(p → q) and (p ∧ ¬q) have the same truth values. ■

Example 3.10. Let q, q and r be propositions. Construct a truth table for the proposition
(p ∨ q) → r.

Solution. We obtain the following table.

p q r p∨q (p ∨ q) → r
T T T T T
T T F T F
T F T T T
T F F T F
F T T T T
F T F T F
F F T F T
F F F F T

Table 3.9: A truth table for (p ∨ q) → r.


Definition 3.9 (Logical equivalence). Compound propositions that have the same truth
values in all possible cases are called logically equivalent. In other words, the compound
propositions p and q are called logically equivalent if p ↔ q is a tautology. The notation
p ⇔ q denotes that p and q are logically equivalent.
Listed in the theorem below are some equivalences of statements that will be particularly
useful.
Theorem 3.1. Let P , Q and R be statements. Let T denote the compound proposition
that is always true and F the compound proposition that is always false.
1. P ∧ T ⇔ P and P ∨ F ⇔ P (Identity Laws).

2. P ∨ T ⇔ T and P ∧ F ⇔ F (Domination Laws).

3. P ∧ P ⇔ P and P ∨ P ⇔ P (Idempotent Laws).

[email protected] 7
3 PROPOSITIONAL LOGIC
4. ¬(¬P ) ⇔ P (Double Negation).

5. P ∨ Q ⇔ Q ∨ P and P ∧ Q ⇔ Q ∧ P (Commutative Laws).

6. (P ∨ Q) ∨ R ⇔ P ∨ (Q ∨ R) and (P ∧ Q) ∧ R ⇔ P ∧ (Q ∧ R) (Associative Laws).

7. P ∨ (Q ∧ R) ⇔ (P ∨ Q) ∧ (P ∨ R) and P ∧ (Q ∨ R) ⇔ (P ∧ Q) ∨ (P ∧ R) (Distributive
Laws).

8. ¬(P ∨ Q) ⇔ ¬P ∧ ¬Q and ¬(P ∧ Q) ⇔ ¬P ∨ ¬Q (De Morgan’s Laws).

9. P ∨ (P ∧ Q) ⇔ P and P ∧ (P ∨ Q) ⇔ P (Absorption Laws).

10. P ∨ ¬P ⇔ T and P ∧ ¬P ⇔ F (Negation Laws).

11. P → (Q ∨ R) ⇔ (P → Q) ∨ (P → R) and P → (Q ∧ R) ⇔ (P → Q) ∧ (P → R).

12. (P ∨ Q) → R ⇔ (P → R) ∧ (Q → R) and (P ∧ Q) → R ⇔ (P → R) ∨ (Q → R).

13. ¬(P → Q) ⇔ P ∧ ¬Q and ¬(P → ¬Q) ⇔ P ∧ Q.

14. P → Q ⇔ ¬P ∨ Q and ¬P → Q ⇔ P ∨ Q.

15. P → Q ⇔ ¬Q → ¬P (Contrapositive).

Example 3.11. Let P and Q be propositions. Using a truth table, show that the statements
P → Q and ¬Q → ¬P are logically equivalent.

Solution. We obtain the following table.

P Q ¬P ¬Q P → Q ¬Q → ¬P (P → Q) ↔ (¬Q → ¬P )
T T F F T T T
T F F T F F T
F T T F T T T
F F T T T T T

Table 3.10: A truth table showing P → Q ⇔ ¬Q → ¬P .

Note that we showed in Table 3.8 that the negation of P → Q is logically equivalent to
P ∧ ¬Q. ■

Definition 3.10 (Propositional function). Let P (x) be a declarative sentence involving


the variable x and let D be a set. We call P a propositional function (w.r.t. D) if for each
x ∈ D, P (x) is a proposition. We call D the domain of discourse of P .

Example 3.12. Let P (x) be “x3 − 8 > 0” with D = Z. What are the truth values of P (2)
and P (3).

Solution. Let P (x) be “x3 − 8 > 0” with x ∈ Z. The proposition P (2) is “0 > 0,” which is
false. The proposition P (3) is “19 > 0,” which is true. ■
In general, a propositional function involving n variables x1 , x2 , . . . , xn can be denoted by
P (x1 , x2 , . . . , xn ).

[email protected] 8
3 PROPOSITIONAL LOGIC
2
Example 3.13. Let P (x, y) be “x − y < 1” with D = R . What are the truth values of
P (2, 0) and P (0, 2).
Solution. Let P (x, y) be “x − y < 1” with D = R2 . The proposition P (2, 0) is “2 < 1,”
which is false. The proposition P (0, 2) is “−2 < 1,” which is true. ■
Now, we know that when all variables in a propositional function are assigned values,
we obtain a proposition. However, we can also create a proposition from a propositional
function by quantification.
Definition 3.11 (Universal quantification). Let P (x) be a propositional function and let
x ∈ D (D the domain of discourse). The universal quantification of P (x) is the proposition
“P (x) for all x ∈ D,” denoted by ∀xP (x). The symbol ∀ is called the universal quantifier.
The statement ∀xP (x) can be expressed in many ways including the follows:
• for all x ∈ D, P (x)
• for every x ∈ D, P (x)
• for each x ∈ D, P (x)
• if x ∈ D, then P (x)
An example of a universal quantification is the following statement: For all x ∈ R, x2 ≥ 0.
Definition 3.12 (Existential quantification). Let P be a propositional function and let
x ∈ D where D is the domain of discourse. The existential quantification of P (x) is the
proposition “There exists an element x ∈ D such that P (x),” denoted by ∃xP (x). The
symbol ∃ is called the existential quantifier.
∃xP (x) can also be expressed in the following ways.
• There is an x ∈ D such that P (x).
• There is at least one x ∈ D such that P (x).
• For some x ∈ D, P (x).
The notation ∃!xP (x) denotes the proposition “There exists a unique x ∈ D such that
P (x).”
Example 3.14. Determine the truth or falsity of the following.
1. There is x ∈ N such that x ≤ 4.
2. The equation x = x + 1 holds for some x ∈ R.
Solution.
1. Choose 3 ∈ N. We see that 3 ≤ 4. Hence, the statement is true.
2. Suppose that x = x + 1 for some x ∈ R. Then, we get 0 = 1, which is a contradiction.
Hence, the statement is false.

[email protected] 9
3 PROPOSITIONAL LOGIC
Note that the negation of a universal statement is an existential statement and the negation
of an existential statement is a universal statement.
In summary, we have the following table.

p ¬p
∃xP (x) ∀x¬P (x)
∀xP (x) ∃x¬P (x)
∀x∀yP (x, y) ∃x∃y¬P (x, y)
∀x∃yP (x, y) ∃x∀y¬P (x, y)
∃x∀yP (x, y) ∀x∃y¬P (x, y)
∃x∃yP (x, y) ∀x∀y¬P (x, y)

Example 3.15. Obtain the negation of the following propositions.

1. There exists x ∈ R such that x2 = 2.

2. There exists a ∈ Z such that for all b ∈ Z, a + b = b.

3. For every x ∈ Z, x ≥ 0.

4. For all x ∈ R, there exists y ∈ R such that x + y = 0.

Solution.

1. For each x ∈ R, x2 ̸= 2.

2. For all a ∈ Z, there exists b ∈ Z such that a + b ̸= b.

3. x ≱ 0 for some x ∈ Z. That is, x < 0 for some x ∈ Z.

4. There exists x ∈ R such that for all y ∈ R, x + y ̸= 0.

Definition 3.13 (Counterexample). A value x in the domain of discourse that makes


P (x) false is called a counterexample to the statement ∀xP (x).

NB: Showing that a statement is false entails showing that its negation is true. Thus, to
find a counterexample to the statement ∀xP (x), we must first obtain its negation ∃x¬P (x).

Example 3.16. Determine the truth or falsity of the following.

1. For every x ∈ R, x ≥ 0.

2. For all x, y ∈ Z, x + y = x − y.

3. For all positive real values of x, 3
x ≤ x.

4. For each x ∈ R, x + 1 > x

Solution.

[email protected] 10
3 PROPOSITIONAL LOGIC
1. Choose −1 ∈ R. Then −1 ≱ 0, that is −1 < 0. The statement is false.

2. Choose 2, 1 ∈ Z. We notice that 2 + 1 = 3 ̸= 1 = 2 − 1. The statement is false.


r
1 + 1 1 1
3. Consider ∈ R . We deduce that 3 = > . Hence, the statement is false.
8 8 2 8
4. Let x ∈ R. Consider the inequality 1 > 0. Adding x to both sides of the inequality,
we obtain x + 1 > x. Therefore, the statement is true.

EXERCISE THREE

1. Determine whether the following are propositions, or not?

(a) Come here.


(b) 10n ≥ 99.
/ R+ .
(c) 0 ∈
(d) Are you Adzo?
(e) x + 1 = 0.
(f) 0 < 0.
(g) 18 is a composite number.
(h) 5 is a multiple of 3.
(i) Show that 7 divides 49.

2. Rewrite each of the following implications using at least 5 different terminologies used
to express conditional statements? State the hypothesis and the conclusion.

(a) The sum of two positive integers is positive.


(b) Every positive integer bigger than 1 is the product of prime numbers.
(c) The square of the length of the hypotenuse of a right-angled triangle is the sum
of the squares of the lengths of the other two sides.
(d) All prime numbers are even.

3. Show that each of the these conditional statements is a tautology by using truth tables.

(a) [∼ p ∧ (p ∨ q)] → q
(b) [(p → q) ∧ (q → r)] → (p → r)
(c) [p ∧ (p → q)] → q
(d) [(p ∨ q) ∧ (p → r)] ∧ (q → r)] → r

4. Write the converse and the contrapositive of the following conditional statements.

(a) If X ⊆ Y and Y ⊆ Z, then X ⊆ Z.


(b) For two arbitrary sets A and B, a ∈ A or a ∈ B whenever a ∈ A ∪ B.

[email protected] 11
3 PROPOSITIONAL LOGIC
2
(c) If a ∈ R, then a ≥ 0.
(d) For any (a, b) ∈ Z × Z, a and b are even only if a + b is even.
(e) The integer k is a multiple of 2, if k is a multiple of 4.

5. Prove the logical equivalences listed in Theorem 3.1.

6. Determine the truth value of each of the following propositions, where {1, 2, 3} is the
domain of discourse.

(a) ∃x ∀y, x2 < y + 1.


(b) ∀x ∃y, x2 + y 2 < 12.
(c) ∀x ∀y, x2 + y 2 < 12.
(d) ∃x ∀y, ∃z x2 + y 2 < 2z 2 .
(e) ∃x ∃y, ∀z x2 + y 2 < 2z 2 .

7. Determine the truth value of each of the following statements, where R is the domain
of discourse.

(a) ∀x, | x |= x.
(b) ∃x, x2 = x.
(c) ∀x, x + 1 > x.
(d) ∃x, x + 2 = x.
(e) ∃x, x2 − 2x + 5 = 0.

8. Negate each of the following statements:

(a) ∃x ∀y, p(x, y).


(b) ∀x ∃y, p(x, y).
(c) ∃y ∃x ∀z, p(x, y, z).
(d) ∀x ∃y, (p (x) ∧ q(y) ).
(e) ∃x ∀y, (p(x, y) ⇒ q(x, y)).

9. Find counterexamples to the following assertions. Given that A = {2, 3, 4, 5, 6, 7, 8, 9},

(a) 2n − 1 is prime for every n ≥ 2.


(b) 2n + 3n is prime ∀ n ∈ N.
(c) 2n + n is prime for every positive odd integer n.
(d) ∀ x ∈ A, x + 5 < 12.
(e) ∀ x ∈ A, x is prime.
(f) ∀ x ∈ A, x2 > 1.
(g) ∀ x ∈ A, x is even.

10. Find a counterexample for each of the following where {3, 5, 7, 9} is the universal set.

[email protected] 12
3 PROPOSITIONAL LOGIC
(a) ∀ x, x + 3 ≤ 7.
(b) ∀ x, x is odd.
(c) ∀ x, x is prime.
(d) ∀ x, | x |= x.

[email protected] 13

You might also like