# 2.1: Introduction to Formal Logic

- Page ID
- 92953

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

\( \newcommand{\Span}{\mathrm{span}}\)

\( \newcommand{\id}{\mathrm{id}}\)

\( \newcommand{\Span}{\mathrm{span}}\)

\( \newcommand{\kernel}{\mathrm{null}\,}\)

\( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\)

\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\)

\( \newcommand{\norm}[1]{\| #1 \|}\)

\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)

\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)

\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vectorC}[1]{\textbf{#1}} \)

\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)In our everyday life we constantly evaluate statements as being true or false. The truth of these statements help us determine whether arguments used to persuade us to vote a certain way or to buy a certain product are valid or invalid. We should always create our arguments as persuasively and logically as we can. All this we do using informal (intuitive) and formal logical thinking. We are surrounded and guided by apps and algorithms written by use of formal logic as any programming code is an exercise in use of formal logic. Having a well-developed intuition and an ability to apply formal logical analysis to an argument are equally important for a fulfilling successful life.

**Logic** is the study of reasoning.

This chapter will look at the foundations of formal logic and apply them to determine whether an argument is valid and sound. This section, in particular, will examine statements and logical connectors that are the building blocks of arguments. Just as arithmetic operates with numbers and set theory operates with sets, formal logic operates with *statements*.

A **statement** is a declarative sentence that can be objectively determined to be either true or false but not both at the same time.

A *simple statement* conveys only one idea. A *compound statement* conveys two or more ideas. Phrases, questions, and commands can never be statements in logic because it would be impossible to determine whether the ideas are true or false.

Determine whether the following are statements. For each statement, say whether it is simple or compound and whether it is true or false.

- PGCC is a four-year college.
- Show me the money.
- The Mississippi River flows into the Gulf of Mexico.
- I like ice cream and I like cookies.
- If \(m = 6\), then \(2m = 12\).
- \(9+6=16\)
- Where are you going?

### Solution

- This is a statement because its truth value can be determined. It is false that PGCC is a four-year college. The statement expresses only one idea so this is a simple statement that is false.
- This is not a statement. Rather, this is a command which has no truth value that can be determined.
- This is a statement because its truth value can be determined. It is true that the Mississippi River flows in the Gulf of Mexico. The statement expresses only one idea so this is a simple statement that is true.
- This is a statement because its truth value can be determined -- although its truth value depends on the person referred to by "I." The statement express two ideas so this is a compound statement.
- This is a statement because its truth value can be determined. By multiplying both sides of the equation \(m=6\) by \(2\), we see that \(2m=12\) regardless of the value of \(m\). There are two ideas expressed in the statement (the
*if*part and the*then*part), so this is a compound statement that is true. - This is a statement because its truth value can be determined. It is false that that \(9+6=16\). The statement expresses only one idea so this is a simple statement that is false.
- This is not a statement. Questions are never statements because a truth value cannot be determined.

Statements may be** **negated** **or combined with connector words like "and", "or", "if", and "then." Let’s take a closer look at how negations and logical connectors are used with simple statements to create more complex statements. In the definitions that follow, we assume that \(p\) and \(q\) represent two simple statements.

One way to change a statement is to use its *negation*, or opposite meaning. We often use the word "not" to negate a statement.

If \(p\) is a statement, the **negation** of \(p\) is another statement that is exactly the opposite of \(p\). The symbol for negation is \(\sim\).

The negation of a statement \(p\) is notated \(\sim p\) and means "not \(p\)."

A statement \(p\) and its negation \(\sim p\) will always have opposite truth values. That is, if statement \(p\) is true, then \(\sim p\) is false. If statement \(p\) is false, then \(\sim p\) is true. It is impossible to have a situation in which a statement and its negation will have the same truth value.

Write the negation of each statement in words.

- I am reading a math book.
- Math is fun!
- The sky is not green.
- Cars have wheels.

### Solution

- I am
reading a math book.*not* - Math is
fun!**not** - The sky is green. (or, The sky is
not green.)**not** - Cars do
have wheels.**not**

It is possible to use more than one negation in a statement. If you’ve ever said something like, “*I can’t not go*,” you are really saying you must go. It’s a lot like multiplying two negative numbers which gives a positive result.

In the media and in ballot measures we often see multiple negations, and it can be confusing to figure out what a statement means.

Read the statement to determine the result of the voting measure.

“*This voting measure repeals the ban on plastic bags.*”

### Solution

The measure enables plastic bag usage. The ban stopped plastic bag usage, so to repeal the ban would allow it again. This statement has a double negation and is also not very good for the environment.

Try it Now 1

Write the negation of each statement in words.

- I like getting up early in the morning.
- I will not go to work.
- Tom is unable to attend class.

**Answer**-
- I do not like getting up early in the morning.
- I will go to work.
- Tom is able to attend class. (or, Tom is not unable to attend class.)

When we use the word "and" between two statements, it connects them to create a new statement that is compound. For example, if you said, “*When you go to the store, please get eggs and cereal*,” you would be expecting both items. For an

*and*statement to be true, the connected statements must both be true. If even one statement is false (for instance, you get eggs but not cereal), the entire connected

*and*statement is false.

When two statements are connected with the word "and," this new compound statement is called a *conjunction*.

If \(p\) and \(q\) are statements, their **conjunction** is the statement "\(p\) *and* \(q\)." The symbol for the conjunction of two statements is \(\wedge\).

The conjunction of statement \(p\) and statement \(q\) is notated \(p \wedge q\).

For any statement of the form \(p \wedge q\) to be true, both statement \(p\) and statement \(q\) must be true.

Let \(p\) be the statement "*I have a penny*" and \(q\) be the statement "*I have a dime*."

\(p \wedge q\) is the compound statement "*I have a penny and I have a dime*."

Determine the truth value of each conjunction.

- Annapolis is in Maryland and Baltimore is in Virginia.
- 7 is an odd number and 10 is an even number.

### Solution

- \(p\) is the statement "
*Annapolis is in Maryland*," which is true, while \(q\) is the statement "*Baltimore is in Virginia*," which is false. Because only one statement is true and the other statement is false, the truth value of this conjunction is false. - \(p\) is the statement "
*7 is an odd number*," which is true, while \(q\) is the statement "*10 is an even number*," which is true. Because both statements are true, the truth value of this conjunction is true.

The word "or" between two statements similarly connects the statements to create a new statement that is compound. In this case, if you said, “*Please get eggs or cereal*,” you would be expecting one or the other (but probably not both). For an

*or*statement to be true,

*at least one*of the statements must be true. That is, an

*or*statement is true when one or both statements are true.

It should be pointed out that in the English language we often mean for *or* to be exclusive: one or the other, but not both. In math, however, *or* is usually * inclusive*: one or the other, or both.

When two statements are connected with the word "or" this new compound statement is called a *disjunction*.

If \(p\) and \(q\) are statements, their **disjunction** is the statement "\(p\) *or* \(q\)." The symbol for the disjunction of two statements is \(\vee\).

The disjunction of statement \(p\) and statement \(q\) is notated \(p \vee q\).

For any statement of the form \(p \vee q\) to be true, at least one of statement \(p\) and statement \(q\) must be true. The only time when a disjunction is false is when both of its statements are false.

Let \(p\) be the statement "*Today is Tuesday*" and \(q\) be the statement "*\(1+1=2\)*."

\(p \vee q\) is the compound statement "Today is Tuesday* or *

*\(1+1=2\)*."

Determine the truth value of each disjunction.

- Annapolis is in Maryland or Baltimore is in Virginia.
- 7 is an odd number or 10 is an even number.
- There are 60 stars on the United States flag or a banana is red.

### Solution

- \(p\) is the statement "
*Annapolis is in Maryland*," which is true, while \(q\) is the statement "*Baltimore is in Virginia*," which is false. Because at least one statement is true, the truth value of this disjunction is true. - \(p\) is the statement "
*7 is an odd number*," which is true, while \(q\) is the statement "*10 is an even number*," which is true. Because at least one statement is true (both are true!), the truth value of this disjunction - \(p\) is the statement "
*There are 60 stars on the United States flag*," which is false, while \(q\) is the statement "*A banana is red*," which is also false. Because neither statement is true, the truth value of this disjunction is false.

Try it Now 2

Consider these simple statements:

\(p\): \(5\) is an odd number. \(q\): \(6+4=12\)

Translate these symbolic statements to words and tell whether the resulting statement is true or false.

- \(\sim p\)
- \(\sim q\)
- \(p \wedge q\)
- \(p \vee q\)

**Answer**-
- \(5\) is not an odd number. False.
- \(6+4 \neq12\). True.
- \(5\) is an odd number and \(6+4=12\). False.
- \(5\) is an odd number or \(6+4=12\). True.

We often want to be able to *conditionally* do something. That is, we want to be able to say "*If this thing is true, then do X.*" It's like when we leave our house in the morning -- "*If it's cold outside, then I will wear a coat.*"

A *conditional statement* connects two statements using *if ... then*.

Another example of a conditional statement is “*I** f it is raining, then we’ll go to the mall.*” The statement “

*If it is raining*,” may be either true or false for any given day. If the condition is true, then we will follow the course of action and go to the mall. If the condition is false though, we haven’t said anything about what we will or won’t do. Truth values of conditional statements will be discussed in a later section.

A **conditional statement **is a compound statement of the form "If \(p\), then \(q\)." Often, we say this as "*\(p\) implies \(q\).*" The symbol used to indicate a conditional statement is \(\rightarrow\).

Statement \(p\) is the "*if* part" and is called the *antecedent. *Statement \(q\) is the "*then* part" and is called the consequent.

The conditional statement "If \(p\), then \(q\)" is notated \(p \rightarrow q\).

Let \(p\) be the statement "*You are hungry*" and \(q\) be the statement "*You are cranky*."

In this case \(p \rightarrow q\) is the compound statement "* If you are hungry, then you are cranky.*"

Here, "*You are hungry*" is the antecedent, and "*You are cranky*" is the consequent. When the condition of a person being hungry has been met, it implies that the person will be be cranky.

Let \(p\) be the statement "*It rains*" and \(q\) be the statement "*The game is cancelled.*"

Write each statement using correct symbols.

- If it rains, then the game is cancelled.
- If the game is not cancelled, then it doesn't rain.
- The game is cancelled if it rains.
- It is not the case that if it rains, then the game is cancelled.

### Solution

- The antecedent is "
*It rains*" because this statement is the*if*part of the conditional. The consequent is "*The game is cancelled*" because this statement is the*then*part of the conditional. In symbols, the conditional statement is \(p \rightarrow q\). - The antecedent is "
*The game is not cancelled*" because this statement is the*if*part of the conditional. This is the negation of statement \(q\). The consequent is "*It doesn't rain*" because this statement is the*then*part of the conditional. This is the negation of statement \(p\). In symbols, the conditional statement is \(\sim q \rightarrow \; \sim p\). - This statement is the same as the statement in part a with the
*if*and*then*parts written in different orders. The antecedent is "*It rains*" because this statement is the*if*part of the conditional. The consequent is "*The game is cancelled*" because this statement is the*then*part of the conditional. In symbols, the conditional statement is \(p \rightarrow q\). - Note that in this case it is the entire “
*if…then*” statement that is being negated, rather than just one or both of its components. This statement is the negation of the conditional statement in part a. In symbols, this is written \(\sim(p \rightarrow q\)).

As noted above for a conditional statement involving two statements, there are two roles: one statement is the antecedent and one statement is the consequent. In general, the antecedent and the consequent *cannot* be interchanged. To illustrate why this is true, consider these two conditional statements:

- Conditional 1:
*If today is Saturday, then it is the weekend.* - Conditional 2:
*If it is the weekend, then today is Saturday*.

Conditional 1 is always a true statement. However, Conditional 2 may or may not be true because today may be Sunday. Interchanging the *if* part and the *then* part makes a big difference in whether the resulting conditional statement is true or not. '*Today is Saturday*" implies "*It is the weekend*," but "*It is the weekend*" does not imply "*It is Saturday*."

As we just saw, \(p \rightarrow q\) does not always mean that \(q \rightarrow p\). However, in certain instances it may happen that both \(p \rightarrow q\) and \(q \rightarrow p\). To illustrate this with an example, consider the statements "*Today is January 1*" and "*Today is New Year’s Day*." If we form conditional statements, we have

- Conditional 1:
*If today is January 1, then today is New Year's Day.* - Conditional 2:
*If today is New Year's Day, then today is January 1.*

It is possible to interchange the simple statements in the *if* and *then* parts because each simple statement implies the other simple statement. This type of powerful situation is represented using a *biconditional statement.*

When two statements form a biconditional in this way, we can express this more compactly using the phrase "..*. if and only if*...". For the previous example, we could write "

*Today is January 1 if and only if*" A double-headed arrow \(\leftrightarrow\) is used to indicate a biconditional statement instead of the one-headed arrow \(\rightarrow\) used for a conditional statement.

**today is New Year's Day.**A **biconditional statement** is a statement of the form "\(p\) if and only if \(q\)." It is a conjunction of the two conditional statements "*If \(p\), then \(q\)*" and "*If \(q\), then \(p\)*." The symbol used to indicate a biconditional statement is \(\leftrightarrow\).

The biconditional statement "\(p\) if and only \(q\)" is notated \(p \leftrightarrow q\).

\(p\) is the statement "*I eat*" and \(q\) is the statement "*I am hungry*."

In this case \(p \leftrightarrow q\) is the compound statement "*I eat if and only if I am hungry.*"

Here, "*I eat if and only if I am hungry" *is a short way of saying both "*If I eat, then I am hungry*" and "*If I am hungry, then I eat*."

Consider these simple statements:

\(p\): The sun is shining. \(q\): It is raining. \(r\): The grass is green.

Translate these statements to symbolic form using \(p\), \(q\), \(r\), \(\sim\), \(\rightarrow\), and \(\leftrightarrow\).

- It is not raining.
- If it is raining, then the sun is not shining.
- It is raining and the grass is green.
- It is false that the sun is shining or it is raining.
- The grass is green, if it is raining and the sun is shining.
- The sun is shining or it is raining.
- The grass is green if and only if it is raining.

### Solution

- \(\sim q\). This is the negation of statement \(q\).
- \(q \rightarrow \; \sim p\). This is a conditional statement where statement \(q\) is the antecedent and the negation of statement \(p\) is the consequent.
- \(q \wedge p\). This is a conjunction with statement \(q\) and statement \(r\).
- \(\sim (p \vee q)\). This is the negation of the disjunction of statement \(p\) and statement \(q\).
- \((q \wedge p) \rightarrow r\). This is a conditional statement where the antecedent is the conjunction of statement \(q\) and statement \(p\) and the consequent is statement \(r\). We must use grouping symbols to show the antecedent is itself a compound statement.
- \(p \vee q\). This is a disjunction with statement \(p\) and statement \(q\).
- \(r \leftrightarrow q\). This is a biconditional using statement \(r\) and statement \(q\).

Try it Now 3

Consider these simple statements:

\(p\): Tom plays hard. \(q\): Tom is a guitar player. \(r\): Tom's commute to work is long. \(s\): Tom gets bored in the car.

Translate these statements to symbolic form using \(p\), \(q\), \(r\), \(s\), \(\sim\), \(\rightarrow\), and \(\leftrightarrow\).

- Tom plays hard or Tom is a guitar player.
- Tom's commute to work is not long.
- It is false that Tom's commute is long and Tom gets bored in the car.
- If Tom's commute to work is long, then Tom gets bored in the car.
- If Tom gets bored in the car and the commute to work is long, then Tom does not play hard.
- Tom is not a guitar player if and only Tom does not play hard.

**Answer**-
- \(p \vee q\)
- \(\sim r\)
- \(\sim (r \wedge s)\)
- \(r \rightarrow s\)
- \((s \wedge r) \rightarrow \; \sim p\)
- \(\sim q \leftrightarrow \; \sim p\)

Consider these simple statements:

\(a\): Roses are red. \(b\): The sky is blue. \(c\): Turtles are green.

Translate these symbolic statements to words.

- \(a \wedge b\)
- \(\sim c \vee b\)
- \(\sim (c \vee b)\)
- \(a \wedge (b \vee c)\)
- \(b \rightarrow \; \sim c\)
- \(\sim b \rightarrow (\sim a \; \wedge \sim c)\)
- \(a \leftrightarrow \; \sim b\)

### Solution

- Roses are red and the sky is blue.
- Turtles are not green or the sky is blue.
- It is false that turtles are green or the sky is blue.
- Roses are red, and the sky is blue or turtles are green.
- If the sky is blue, then turtles are not green.
- If the the sky is not blue, then roses are not red and turtles are not green.
- Roses are red if and only if the sky is not blue.

Try it Now 4

Consider these simple statements:

\(p\): I go to class every day. \(q\): I do my homework. \(r\): I get a good grade in this class.

Translate these symbolic statements to words.

- \(p \wedge q\)
- \(q \; \vee \sim r\)
- \(\sim (p \vee r)\)
- \(\sim q \rightarrow \; \sim r\)
- \(p \leftrightarrow r\)

**Answer**-
- I go to class everyday and I do my homework.
- I do my homework or I do not get a good grade in this class.
- It is false that I go to class every day or I get a good grade in this class.
- If I don't do my homework, then I don't get a good grade in this class.
- I go to class every day if and only if I get a good grade in this class.