Unit 5 Logic
Unit 5 Logic
Logic
Introduction
It is not easy to summarize in a few paragraphs the subject matter known as logic. For lawyers
and judges, logic is the science of correct reasoning. They often use logic to communicate more
effectively, construct valid arguments, analyze legal contracts, and make decisions. Law schools
consider a knowledge of logic to be one of the most important predictors of future success for their new
students. A sizeable portion of the LSAT (Law School Admission Test), which is required by law school
applicants as part of their admission process, concerns logical reasoning.
Many other professions also make extensive use of logic. For instance, programmers use logic
to design computer software, electrical engineers use logic to design circuits for smart phones, and
mathematicians use logic to solve problems and construct mathematical proofs.
In this chapter, you will encounter several facets of logic. Specifically, you will use logic to:
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.
Logic Statements
Every language contains different types of sentences, such as statements, questions, and
commands. For instance,
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 and 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.
You may not know if the sentence 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.
c. 99 + 2 is a prime number.
d. 𝑥 + 1 = 5.
Connecting simple statements with words and phrases such as and, or, if ... then, and if and
only if creates a compound statement. For instance, “I will attend the meeting or I will go to school.” is
a compound statement. It is composed of the two simple statements, “I will attend the meeting." and "I
will go to school.” The word or is a connective for the two simple statements.
George Boole used symbols such as p, q, r, and s to represent simple statements and the
symbols →, ↔, ~,∧, and ∨ to represent connectives. See Table 5.1.
Table 5.1
Logic Connectives and Symbols
▪ 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 values of its simple statements
and its connectives.
▪ A truth table is a table that shows the truth value of a compound statement for all possible
truth values of its simple statements.
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 a statement. If a statement p is true,
its negation ~𝑝 is false, and if a statement 𝑝 is false, its negation ~𝑝 is true. See the table below.
𝒑 ~𝒑
T F
F T
The negation of the negation of a statement is the original statement. Thus ~(~𝑝) can be
replaced by 𝑝 in any statement.
2|P age
Example 02: Write the Negation of a Statement
𝑝: Today is Friday.
𝑞: It is raining.
𝑟: I am going to a movie.
a. 𝑞 ∧ 𝑝
b.∼ 𝑟 ∧ 𝑠
c. 𝑠 ↔ ~𝑝
3|P age
2. Consider the following statements.
𝑡: I am trading places.
a. 𝑒 ∧ ~𝑡
b. 𝑎 ∨∼ 𝑡
c. 𝑡 ↔ 𝑔
If a compound statement is written in symbolic form, then parentheses are used to indicate which
simple statements are grouped together. Table 5.2 illustrates the use of parentheses to indicate
groupings for some statements in symbolic form.
Table 5.2
Symbolic form The parentheses indicate that:
𝑝 ∧ ( 𝑞 ∨ ~𝑟) 𝑞 and ~𝑟 are grouped together.
(𝑝 ∧ 𝑞) ∨ 𝑟) p and 𝑞 are grouped together.
𝑝 and ~𝑞 are grouped together.
(𝑝 ∧∼ 𝑞) → (𝑟 ∨ 𝑠)
𝑟 and 𝑠 are also grouped together.
TABLE 5.3
If a statement in symbolic form is written as an English sentence, then the simple statements
that appear together in parentheses in the symbolic form will all be on the same side of the comma that
appears in the English sentence.
4|P age
𝑟: You will receive a bonus.
b. 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.
𝑟: Kesha is a rapper.
b. Write "If Kesha is not a rapper, then Kesha does not have messy hair and Kesha's singing
style is not similar to Uffie's." in symbolic form
The use of parentheses in a symbolic statement may affect the meaning of the statement. For
instance, ~(𝑝 ∨ 𝑞) indicates the negation of the compound statement
𝑝 ∨ 𝑞. However, ~𝑝 ∨ 𝑞 indicates that only the p statement is negated.
The statement ~(𝑝 ∨ 𝑞) is read as, "It is not true that, p or q. The statement ~𝑝 ∨ 𝑞 is read as,
“Not p or q.”
If you order cake and ice cream in a restaurant, the waiter will bring both cake and ice cream. In
general, the conjunction 𝑝 ∧ 𝑞 is true if both p and q are true, and the conjunction is false of either p or
q is false. The truth table below shows the four possible case that arise when we form a conjunction of
two statements.
𝒑 𝒒 𝒑∧𝒒
T T T
T F F
F T F
F F F
T: True F: False
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"
Any disjunction 𝑝 ∨ 𝑞 is true if p is true or q is true or both p and q are true. The truth table at
below shows that the disjunction p or q is false if both p and q are false, however, it is true in all other
cases.
The disjunction 𝑝 ∨ 𝑞 is true if and only if p is true, q is true, or both p and q are true.
a. 7 ≥ 5.
e. 4 ≥ 9
In a statement, the word some and the phrases there exists and at least one are called
existential quantifiers. Existential quantifiers are used as prefixes to assert the existence of
something.
In a statement, the words none, no, all, and every, are called universal quantifiers. The
universal quantifiers none and no deny the existence of something, whereas the universal quantifiers
all and every, are used to assert that every element of a given set satisfies some condition.
Recall that the negation of a false statement is a true statement and the negation of a true
statement is a false statement. It is important to remember this fact when forming the negation of a
quantified statement. For instance, what is the negation of the false statement, "All dogs are mean"?
You may think that the negation is "No dogs are mean," but this is also a false statement. Thus the
statement "No dogs are mean" is not the negation of "All dogs are mean." The negation of "All dogs
are mean," which is a false statement, is in fact "Some dogs are not mean," which is a true statement.
The statement "Some dogs are not mean" can also be stated as "At least one dog is not mean" or
"There exists a dog that is not mean."
What is the negation of the false statement, "No doctors write in a legible manner"? Whatever
the negation is, we know it must be a true statement. The negation cannot be "All doctors write in a
legible manner, because this is also a false statement. The negation is "Some doctors write in a legible
manner" This can also be stated as, "There exists at least one doctor who writes in a legible manner."
Table 5.4A illustrates how to write the negation of some quantified statements.
Table 5.4A
Quantified Statements and Their Negations
Statement Negation
All X are Y. Some X are not Y.
No X are Y. Some X are Y.
Some X are not Y. All X are Y.
Some X are Y. No X are Y.
In Table 5.4A, the negations of the statements in the first column are shown second column.
Also, the negation of the statements in the second column are the statements in the first column, Thus
the information in Table 5.4A can be shown more compactly as in Table 5.4B.
6|P age
Table 5.4B
Quantified Statements and Their Negations
Displayed in a Compact Format
negation
All X are Y. Some X are not Y.
negation
No X are Y. Some X are Y.
Truth Tables
In section 5.1, we defined truth tables for the negation of a statement, the conjunction of two statements,
and the disjunction of two statements. Each of these truth tables is shown below for review purposes.
In this section, we consider methods of constructing truth tables for a statement that involves a
combination of conjunctions, disjunctions, and/or negations. If the given statement involves only two
simple statements, then start with a table with four rows (see the table below), called the standard
truth table form, and proceed as shown in Example 1.
𝒑 𝒒 Given statement
T T
T F
F T
F F
Standard truth table form for a given statement
that involves only the two simple statements p and q
b. Use the truth table from part a to determine the truth value of~(𝑝 ∨ 𝑞) ∨ 𝑞, given that 𝑝 is
true and 𝑞 is false
Solution:
a. Start with the standard truth table form and then include a ~𝑝 column.
7|P age
𝒑 𝒒 ~𝒑
T T F
T F F
F T T
F F T
Now use the truth values from the ~𝑝 and 𝑞 columns to produce the truth values for ~𝑝 ∨ 𝑞, as
shown in the rightmost column of the following table.
𝒑 𝒒 ~𝒑 ~𝒑 ∨ 𝒒
T T F T
T F F F
F T T T
F F T T
𝒑 𝒒 ~𝒑 ~𝒑 ∨ 𝒒 ~(~𝒑 ∨ 𝒒)
T T F T F
T F F F T
F T T T F
F F T T F
As our last step, we form the disjunction of ~(~𝑝 ∨ 𝑞) with q and place the results in the
rightmost column of the table. See the following table. The shaded column is the truth table for
~(~𝑝 ∨ 𝑞) ∨ 𝑞
𝒑 𝒒 ~𝒑 ~𝒑 ∨ 𝒒 ~(~𝒑 ∨ 𝒒) ~(~𝒑 ∨ 𝒒) ∨ 𝒒
T T F T F T row 1
T F F F T T row 2
F T T T F T row 3
F F T T F F row 4
b. In row 2 of the above truth table, we see that when p is true, and q is false, the
statement ~(~𝑝 ∨ 𝑞) ∨ 𝑞 in the rightmost column is true.
Compound statements that involve exactly three simple statements require a standard truth table
form with 23 = 8 rows, as shown below.
𝒑 𝒒 𝒓 Given statement
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
b. Use the truth table from part a to determine the truth value of (𝑝 ∧ 𝑞) ∧ (~𝑟 ∨ 𝑞) given that p
is true, q is true, and r is false.
Solution:
a. Using the procedures developed in Example 1, we can produce the following table. The
shaded column is the truth table for (𝑝 ∧ 𝑞) ∧ (~𝑟 ∨ 𝑞). The numbers in the squares below the columns
8|P age
denote the order in which the columns were constructed. Each truth value in the column numbered 4
is the conjunction of the truth values to its left in the columns numbered 1 and 3.
𝒑 𝒒 𝒓 𝒑∧𝒒 ~𝒓 ~𝒓 ∨ 𝒒 (𝒑 ∧ 𝒒) ∧ (~𝒓 ∨ 𝒒)
T T T T F T T row 1
T T F T T T T row 2
T F T F F F F row 3
T F F F T T F row 4
F T T F F T F row 5
F T F F T T F row 6
F F T F F F F row 7
F F F F T T F row 8
1 2 3 4
b. In row 2 of the above truth table, we see that (𝑝 ∧ 𝑞) ∧ (~𝑟 ∨ 𝑞) is true when p is true, q is
true, and r is false.
1. If the given statement has 𝑛 simple statements, then start with a standard form that has 2𝑛
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.
Solution:
Step 1: The given statement 𝑝 ∨ [~(𝑝 ∧ ~𝑞)] has the two simple statements p and q. Thus, we
start with a standard form that has 22 = 4 rows. In each column, enter the truth values for the
statements 𝑝 and ~𝑞, as shown in the columns numbered 1, 2, and 3 of the following table.
𝒑 𝒒 𝒑 ∨ [~ (𝒑 ∧ ~𝒒)]
T T T T F
T F T T T
F T F F F
F F F F T
1 2 3
Step 2: Use the truth values in columns 2 and 3 to determine the truth values under the "and"
connective. See column in the following truth table. Now negate the truth values in column 4 to produce
the truth values in column 5.
𝒑 𝒒 𝒑 ∨ [~ (𝒑 ∧ ~𝒒)]
T T T T T F F
T F T F T T T
F T F T F F F
F F F T F F T
1 5 2 4 3
9|P age
Step 3: Use the truth values in the columns 1 and 5 to determine the truth values to enter
under the "or" connective. See column 6 in the following table. Shaded column 6 is the truth table for
𝑝 ∨ [~(𝑝 ∧ ~𝑞)].
𝒑 𝒒 𝒑 ∨ [~ (𝒑 ∧ ~𝒒)]
T T T T T T F F
T F T T F T T T
F T F T T F F F
F F F T T F F T
1 6 5 2 4 3
Equivalent Statements
Two statements are equivalent if they both have the same truth value for all possible truth values
of their simple statements. Equivalent statements have identical truth values in the final columns of
their truth tables. The notation 𝑝 ≡ 𝑞 is used to indicate that the statements p and q are equivalent
The truth tables in Table 5.5 show that ~(𝑝 ∨ 𝑞) 𝑎𝑛𝑑 ~𝑝 ∧ ~𝑞 are equivalent statements. The
truth tables in Table 5.6 show that ~(𝑝 ∧ 𝑞) and ~𝑝 ∨ ~𝑞 are equivalent statements.
~(𝑝 ∨ 𝑞) ≡ ~𝑝 ∧ ~𝑞
~(𝑝 ∧ 𝑞) ≡ ~𝑝 ∨ ~𝑞
De Morgan’s laws can be used to restate certain English sentences in an equivalent form.
Use one of De Morgan's laws to restate the following sentence in an equivalent form.
10 | P a g e
Solution:
Let p represent the statement "I graduated." Let q represent the statement "I got a job." In
symbolic form, the original sentence is ~(𝑝 ∨ 𝑞). One of De Morgan's laws states that this is equivalent
to ~𝑝 ∧ ~𝑞. Thus, a sentence that is equivalent to the original sentence is "I did not graduate and I did
not get a job."
Solution:
Enter the truth values for each simple statement and its negation as shown in the
columns numbered 1, 2, and 3. Use the truth values in columns 2 and 3 to determine
the truth values to enter in column 4, under the "or” connective. Use the truth values in columns 1
and 4 to determine the truth values to enter in column 5, under the "or" connective.
𝒑 𝒒 𝒑 ∨ (~𝒑 ∨ 𝒒)
T T T T F T T
T F T T F F F
F T F T T T T
F F F T T T F
1 5 2 4 3
Column 5 of the table shows that 𝑝 ∨ (~𝑝 ∨ 𝑞) is always true. Thus 𝑝 ∨ (~𝑝 ∨ 𝑞) is a
tautology.
Solution:
Enter the truth values for each simple statement and its negation as shown in the
columns numbered 1, 2, and 3. Use the truth values in columns 2 and 3 to determine
the truth values to enter in column 4, under the "and” connective. Use the truth values in columns
1 and 4 to determine the truth values to enter in column 5, under the "and" connective.
𝒑 𝒒 𝒑 ∧ (~𝒑 ∧ 𝒒)
T T T F F F T
T F T F F F F
F T F F T T T
F F F F T F F
1 5 2 4 3
Column 5 of the table shows that 𝑝 ∧ (~𝑝 ∧ 𝑞) is always false. Thus 𝑝 ∧ (~𝑝 ∧ 𝑞) is a self-
contradiction.
11 | P a g e