Module 5.
LOGIC STATEMENTS and QUANTIFIERS
Good day, learner! I hope that you had understood the
system of sets. The insights that you had learned from that
lesson is very vital to all of your next lessons. This time,
you are going to investigate the science of elementary
logic. This is the last lesson before your midterm exams.
After this one, please have the time to review your past
lessons!
Logic Statements and Quantifiers
One of the first mathematicians to make a serious study of symbolic logic was Gottfried
Wilhelm Leibniz (1646 – 1716). Leibniz tried to advance the study of logic from a merely
philosophical subject to a formal mathematical subject. Leibniz never completely achieved this
goal; however, several mathematicians, such as Augustus De Morgan (1806 – 1871) and
George Boole (1815 – 1864), contributed to the advancement of symbolic logic as a
mathematical discipline.
Boole published The Mathematical Analysis of Logic in 1848. In 1854 he published the more
extensive work, An Investigation of the Laws of Thought.
Concerning this document, the mathematician Bertrand Russell stated, “Pure mathematics
was discovered by Boole in a work which is called The Laws of Thought.
Historical Note:
George Boole (bool) was born in 1815 in Lincoln, England. He was raised in poverty,
but he was very industrious and had learned Latin and Greek by the age of 12. Later he
mastered German, French, and Italian. His first profession, at the young age of 16, was
that of an assistant school teacher. At the age of 20 he started his own school. In 1849
Boole was appointed the chairperson of mathematics at Queens College in Cork, Ireland.
Many of Boole’s mathematical ideas, such as Boolean Algebra, have applications in the
areas of computer programming and the design of electronic circuits.
Logic Statements
Every language contains different types of sentences, such as statements, questions, and
commands. For instance,
“Is the test today?” is a question.
“Go get the newspaper” is a command.
“This is a nice car” is an opinion.
“Denver is the capital of Colorado” is a statement of fact.
The symbolic logic that Boole was instrumental in creating applies only to sentences that are
statements as defined below.
A Statement
A statement is a declarative sentence that is either true or false, but not both true or false. It
may not be necessary to determine whether a sentence is true to determine whether it is a
statement. For instance, consider the following sentence.
Yosemite National Park is located in California.
You may not know if the statement is true, but you do know that the sentence is either true or
it is false, and that it is not both true and false. Thus, you know that the sentence is a
statement.
Example: Determine whether each sentence is a statement.
1. Florida is a state in the United Sates.
Page 1
Prepared by:
Prof. Ninfa Sua – Sotomil
Cell No: 09171022328
Tel No: 5035955
[email protected]
2. How are you?
3. 9 9 + 2 is a prime number.
4. x +1=5
Solution:
1. Florida is one of the 50 states in the United States, so this sentence is true and it is a
statement.
2. The statement “How are you?” is a question. It is not a declarative sentence. Thus, it is
not a statement.
3. You may not know whether 9 9 + 2 is a prime number, you do know that it is a whole
number larger than 1, so it is either a prime number or it is not a prime number. The
sentence is either true or it is false, and it is not both true and false, so it is a statement.
4. x + 1 = 5 is a statement. It is known as an open sentence. It is true for x = 4 and it is
false for any other values of x. for any given value of x, it is true or false but not both
Types of Statements
Simple statement – is a statement that conveys a single idea.
Compound statement – is a statement that conveys two or more ideas.
Logic Connectives and Symbols
Symboli Type of
Statement Connective
c form statement
not p not negation
p
p and q and pq conjunction
p or q or pq disjunction
If p, then q If… then p→q conditional
p if and only if q if and only if p↔q biconditional
Truth Value and Truth Tables
The truth value of a simple statement is either true (T) or false (F)
The truth value of a compound statement depends on the truth vales of its simple statements
and connectives.
A truth table is a table that shows the truth values of a compound statement for all possible
truth values or its simple statements.
Truth table for p
p
p
T F
F T
The negation of the statement “Today is Friday.” is the statement “Today is not Friday.” In
symbolic logic, the tilde symbol is used to denote the negation of the statement. If a
statement p is true, its negation pis false and if a statement p is false, its negation p
is true.
Example: Write Compound statements in symbolic form
Consider the following simple statements.
p: Today is Friday.
q : It is raining.
r: I am going to a movie.
Page 2
Prepared by:
Prof. Ninfa Sua – Sotomil
Cell No: 09171022328
Tel No: 5035955
[email protected] s: I am not going to the basketball game.
Write the following compound statements in symbolic form.
1. Today is Friday and it is raining.
2. It is not raining and I am going to a movie.
3. I am going to the basketball game or I am going to a movie.
4. If it is raining, then I am not going to the basketball game.
Solution
1. p q
2. qr
3. sr
4. q → s
Example: Translate Symbolic Statements
Consider the following statements.
p: The game will be played in Atlanta.
q : The game will be shown on CBS.
r: The game will not be shown on ESPN.
s: The Mets are favored to win.
Write each of the following statements in words.
1. q p
2. rs
3. s ↔ p
Solution
1. The game will be shown on CBS and the game will be played in Atlanta.
2. The game will be shown on ESPN and the Mets are favored to win.
3. The Mets are favored to win if and only if the game will not be played in Atlanta.
Compound Statements and Grouping Symbols
If a compound is written in symbolic form, then the parentheses are used to indicate which
statements are grouped together. The table below illustrates the use of parentheses to indicate
groupings for some statements in symbolic form.
Symbolic form The parentheses indicate that:
p (q r ) q and r are grouped together.
( p q )r p and q are grouped together
p and q are grouped together.
( p q) → ( r s )
r and s are grouped together
If a compound statement is written as an English sentence, then a comma is used to indicate
which simple statements are grouped together. Statements on the same side of a comma
are grouped together.
English sentence The comma indicates that:
q and r are grouped together because they are both on the
p, and q or not r.
same side of the comma.
p and q are grouped together because they are both on the same side of
p and q , or r.
the comma.
p and q are grouped together because they are both to the left
If p and not q , then of the comma.
r or s r and s are grouped together because they are both to the right of the
comma.
Page 3
Prepared by:
Prof. Ninfa Sua – Sotomil
Cell No: 09171022328
Tel No: 5035955
[email protected]
If a statement in symbolic form is written as an English sentence, then the simple statements
appear together in parentheses in the symbolic form will all be on the same side of the comma
that appears in the English sentence.
Example: Translate Compound Statements
Let p, q , and r, represent the following.
p: You get a promotion.
q : You complete the training.
r: You will receive a bonus.
1. Write ( p q ) → r as an English sentence.
2. Write “If you do not complete the training, then you will not get a promotion and you will
not receive a bonus.” In symbolic form
Solution
1. Because the p and the q statements both appear in parentheses in the symbolic form,
they are placed to the left of the comma in the English sentence.
Thus, the translation is: if you get a promotion and complete the training, then you will
receive a bonus.
2. Because the not p and the not r statement are both to the right of the comma in the
English sentence, they are grouped together in parentheses in the symbolic form/
Thus, the translation is: q → ( p r )
The use of parentheses in a symbolic statement may affect the meaning of the statement.
For instance, ( p q ) indicates the negation of the compound p q . However, p q indicates that only
the p statement is negated.
The statement ( p q ) is read as, “It is not true that, p∨q.” The statement p q is read as, “Not
p∨q .
If you order cake and ice cream in a restaurant, the waiter will bring both cake and ice cream.
In general, the conjunction p q is true if both p and q are true, and the conjunction is false if
either p or q is false. The truth table below shows the four possible cases that arise when we
form a conjunction of two statements.
1. Truth Value of a Conjunction
The conjunction p q is true if and only if both p and q are true.
Truth Table for p q
p q p⋀ q
T T T
T F F
F T F
F F F
Sometimes the word but is used in place of the connective and, for instance, “I ride my bike
to school, but I ride the bus to work,” is equivalent to the conjunction, “I ride my bike to school
and I ride the bus to work.
2. Truth Value of a Disjunction
The disjunction p q is true if and only if p is true, q is true, or both pand q are true.
Truth Table for p q
p q pq
T T T
T F T
Page 4
Prepared by:
Prof. Ninfa Sua – Sotomil
Cell No: 09171022328
Tel No: 5035955
[email protected]
F T T
F F F
Example: Determine the Truth Value of a Statement
Determine whether each statement is true or false.
1. 7 ≥ 5.
2. 5 is a whole number and 5 is an even number.
3. 2 is a prime number and 2 is an even number.
Solution
1. 7 ≥ 5 means 7 ¿ 5 or 7 ¿ 5 is true, the 7 ≥ 5 is a true statement.
2. This is a false statement because 5 is not an even number.
3. This is true statement because each simple statement is true.
Alternative Method for the Construction of a Truth Table.
1. If the given statement has n simple statements, then start with a standard form that has 2n
rows. Enter the truth values for each simple statement and their negations.
2. Use the truth values for each simple statement and their negations to enter the truth
values under each connective within a pair of grouping symbols, including parentheses (),
brackets [], and braces {}. If some grouping symbols are nested inside other grouping
symbols, then work from the inside out. In any situation in which grouping symbols have
not been used, then we use the following order of precedence agreement.
First assign truth values to negations from left to right, followed by conjunctions from
left to right, followed by disjunctions from left to right, followed by conditionals from left to
right, and finally by biconditionals from left to right.
3. The truth values that are entered into the column under the connective for which truth
values are assigned last, form the truth table for the given statement.
Example: Construct a table for:
1. ( p q) q
2. ( p q )( r q )
3. p [ ( p q ) ]
4. p ( p q)
A. Tautologies and Self – Contradiction
A tautology is a statement that is always true.
A self – contradiction is a statement that is always false.
Example: Verify whether the following is a tautology or self – contradiction
1. p ( p q )
2. p p
3. r r
4. q [ ( q r ) q ]
5. [ p ( p q ) ]
3. The Conditional
Conditional statements can be written in if p , thenq form or in if p , q form.
Page 5
Prepared by:
Prof. Ninfa Sua – Sotomil
Cell No: 09171022328
Tel No: 5035955
[email protected]
Examples.
1. If we order pizza, then we can have it delivered.
2. If you go to the movie, you will not be able to meet us for dinner.
3. If n is prime number greater than 2, then n is an odd number.
In any conditional statement represented by “if p , then q ” or by “if p , q , the p statement is
called the antecedent and the q statement is called the consequent.
Example: Identify the Antecedent and Consequent of a Conditional
1. If our school was this nice, I would go there more than once a week.
2. If you don’t get in that plane, you’ll regret it.
3. If you strike me down, I shall become more powerful than you can possibly imagine.
Solution:
1. Antecedent: our school was this nice
Consequent: I would go there more than once a week
2. Antecedent: you don’t get in that plane
Consequent: you’ll regret it
3. Antecedent: you strike me down
Consequent: I shall become more powerful than you can possibly imagine.
Arrow Notation
The conditional statement, “if p, then q , can be written using the arrow notation p → q . The
arrow notation p → q is read as “if p, then q or as implies q .
Truth Value of the Conditional p → q
The conditional p → q is false if p is true and q is false. It is true in all other cases.
Truth Table for p → q
p q p→q
T T T
T F F
F T T
F F T
Example: Find the Truth Value of a Conditional
Determine the truth value of each of the following conditional statements.
1. If 2 is an integer, then 2 is a rational number.
2. If 3 is a negative number, then 5 ¿ 7.
3. If 5 ¿ 3, then 2 +¿ 7 ¿ 4
Solution:
1. Because the consequent is true, this is a true statement.
2. Because the antecedent is false, this is a true statement.
3. Because the antecedent is true and the consequent is false, this is a false statement.
A. An Equivalent Form of the Conditional p → q
p→q≡ p
Example: Write a Conditional in Its Equivalent Disjunctive form.
1. If I could play the guitar, I would join the band.
2. If Cam Newton cannot play, then his team will lose.
Solution:
1. I cannot play the guitar or I would join the band.
2. Cam Newton can play or his team will lose.
B. The Negation of the Conditional
Page 6
Prepared by:
Prof. Ninfa Sua – Sotomil
Cell No: 09171022328
Tel No: 5035955
[email protected] Because p → q ≡ p q , an equivalent form of ( p →q ) is given by ( p q ) , which, by one of De
Morgan’s laws, can be expressed as the conjunction p q .
The Negation of p → q
( p →q ) ≡ p q
Example: Write the Negation of a Conditional Statement
1. If they pay me the money, I will sign the contract.
2. If the lines are parallel, then they do not intersect.
Solution: In each case, we write the conjunction of the antecedent and the negation of the
consequent.
1. They paid me the money and I did not sign the contract.
2. The lines are parallel and they intersect.
4. The Biconditional p ↔ q
The statement ( p → q ) ( q → p )is called a biconditional and is denoted by p ↔ q, which is read as
p if and only if q .
p ↔ q ≡ [ ( p →q ) ( q → p ) ]
Truth table for p ↔ q
p q p↔q
T T T
T F F
F T F
F F T
Example: Write the Symbolic Biconditional Statements in Words
Let p , q ,∧r represent the following:
p: She will go on vacation.
q : She cannot take the train.
r : She cannot get a loan.
Write the following symbolic statements in words:
1. p ↔ q
2. r ↔ p
Solution:
1. She will go on vacation if and only if she can take the train.
2. She can get a loan if and only if she does not go on vacation.
The Converse, the Inverse, and the
Contrapositive
The converse of p → q is q → p
The inverse of p → q is p → q
The contrapositive of p → q is q → p
The above definitions show the following:
The converse of p → q is formed by interchanging the antecedent p with the consequent
q.
The inverse of p → q is formed by negating the antecedent p and negating consequent q .
The contrapositive of p → q is formed by negating both the antecedent p with the
consequent q and interchanging these negated statements.
Example: Write the converse, inverse and contrapositive of
If I get the job, then I will rent the apartment.
Page 7
Prepared by:
Prof. Ninfa Sua – Sotomil
Cell No: 09171022328
Tel No: 5035955
[email protected]
Solution
Let: p : I get the job.
q : I rent the apartment.
Converse: If I rent the apartment, then I get the job.
Inverse: If I do not get the job, then I will not rent the apartment.
Contrapositive: If I do not rent the apartment, then I did not get the job.
Conditional Converse Inverse Contrapositive
p q
p→q q→ p p→ q 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
Exercise Set
I. Determine the truth value of the compound statement given that pis a false
statement and q is a true statement, and r is a true statement.
1. p ¿ ¿ 6. ( p q ) [ ( p q ) r ]
2. r ( p r ) 7. [ ( p q ) r ] ( q r )
3. ( p q )( p q ) 8. ( p q ) [ ( p q ) r ]
4. ( p q ) [ ( p q ) q ]
9. [ ( p q ) r ][ p ( q r ) ]
5. [ ( p q) r ] ( p r ) 10. {[ ( p q ) r ][ ( p q → r ) ] } [ p ( q r ) ]
II. Construct a truth table for each compound statement.
11. p q 16. ( p q ) [ ( p q ) ]
12. ( q p ) q 17. ( p q ) ( r q )
13. p q 18. [ ( r q ) ] ( p q )
14. p [ ( p q ) ]
19. ( p r ) [ q ( p r ) ]
15. ( p q ) [ ( p q ) ]
III. [ r ( p q ) ] ( r q ) Use a truth table whether the given statement is a tautology or a self –
contradiction.
20. p p
23. [ ( p q ) ( p q ) ]
21. r r
24. ( p q ) ( q r )
22. q [ ( q r ) q ]
IV. Write the Converse, Inverse, and Contrapositive of the following Conditional:
1. If we have a quiz today, then we will not have a quiz tomorrow.
2. If a number ends with a 5, then the number is divisible by 5.
3. If two lines in a plane do not intersect, then the lines are parallel.
4. If I live in Nashville, then I live in Tennessee.
5. If a geometric figure is a square, then it is a rectangle.
6. If x is an even integer, then x 3 is an even integer.
Page 8
Prepared by:
Prof. Ninfa Sua – Sotomil
Cell No: 09171022328
Tel No: 5035955
[email protected]
7. If today is not Wednesday, then tomorrow is not Thursday.
8. If he has the talent to play a keyboard, then he can join the band.
9. If x + 5 ¿ 12, then x ¿ 7.
10.If you can do it, then you can dream it.
Page 9
Prepared by:
Prof. Ninfa Sua – Sotomil
Cell No: 09171022328
Tel No: 5035955
[email protected]