Skip to main content

Section 5.3 Conditional Statements

Most statements in mathematics and computer science involve conditionals: if one thing happens, then another thing happens. Consider, for example, a database that tracks patients who have scheduled follow-up visits (or not). We might want to send a reminder to patients who have not yet scheduled their follow-up visits. That is, if the patient has not scheduled their follow-up visit, then we want to send them a reminder.
In this section, we study conditional statements and how to prove that they are true. We also look at their negations and construct counterexamples.

Subsection 5.3.A Promises: Conditional Statements

We begin with a definition.

Definition 5.3.1 Conditional statements.

ย 
  1. For statements \(P\) and \(Q\text{,}\) the statement โ€œif \(P\text{,}\) then \(Q\)โ€, denoted \(P \to Q\text{,}\) is a conditional statement. We also say \(P\) implies \(Q\text{.}\) The statement \(P \to Q\) promises that if \(P\) is true, then \(Q\) must also be true. For example, consider the following statement: For any integer \(k\text{,}\) if \(k=3\text{,}\) then \(k^2=9\text{.}\) This statement is true because when \(k=3\) we have \(k^2 = 3^2 = 9\text{.}\)
  2. In the statement \(P \to Q\text{,}\) the statement \(P\) is the hypothesis and \(Q\) is the conclusion. For example, consider the following statement: If a graph is a tree, then it has a leaf. The hypothesis is that a graph is a tree. The conclusion is that it has a leaf.
For \(P \to Q\) to be true, it must be the case that if \(P\) is true, then \(Q\) is 100% guaranteed to also be true. It might be the case that \(P\) causes \(Q\text{,}\) for example, if \(P\) is the statement โ€œTova dropped her glove in a puddleโ€ a nd \(Q\) is the statement โ€œTovaโ€™s glove got wetโ€, then \(P \to Q\) is the statement โ€œIf Tova dropped her glove in a puddle, then Tovaโ€™s glove got wetโ€, which is true. In this example, \(P\) caused \(Q\text{.}\)
Alternatively, it might be the case that \(Q\) had to happen in order for \(P\) to happen. For example, if \(P\) is the statement โ€œDerek got an A in Algorithms classโ€ and \(Q\) is the statement โ€œDerek took the Algorithms classโ€ then \(P \to Q\) is the statement โ€œif Derek got an A in Algorithms class, then Derek took the Algorithms classโ€ which is true. In this example, \(Q\) would have to happen before \(P\text{.}\)
Letโ€™s look more closely at when a conditional is true or false.

Example 5.3.2 Understanding when a conditional is true.

Consider the following conditional statement \(S\) which is โ€œIf you show up to class every day and do all of the homework on time, then you will get an A in this class.โ€
  1. Is \(S\) true or false if you show up to class every day and do all of the homework on time and you get an A in this class?
    Solution.
    It is true. When both the hypothesis and the conclusion are true, we have kept the promise.
  2. Is \(S\) true or false if you show up to class every day and do all of the homework on time but you do not get an A in this class?
    Solution.
    It is false. When the hypothesis is true but the conclusion is false, we have broken the promise.
  3. Is \(S\) true or false if I do not always show up to class and do not always get my homework in on time, but I still get an A in this class?
    Solution.
    It is true. When the hypothesis is false but the conclusion is false, we have not broken the promise.
  4. Is \(S\) true or false if I do not always show up to class and do not always get my homework in on time and I get a C in this class?
    Solution.
    It is true. When the hypothesis and the conclusion are false, we have not broken the promise.
We summarize our analysis from Exampleย 5.3.2 using a truth table.

Example 5.3.3 Truth table for if/then.

Construct a truth table for \(P \to Q\text{.}\)
Solution.
The truth table is shown in Tableย 5.3.4.
Table 5.3.4. Truth table for the logical connective implies
\(P\) \(Q\) \(P \to Q\)
\(\str{T}\) \(\str{T}\) \(\str{T}\)
\(\str{T}\) \(\str{F}\) \(\str{F}\)
\(\str{F}\) \(\str{T}\) \(\str{T}\)
\(\str{F}\) \(\str{F}\) \(\str{T}\)
It is important to note the case where the hypothesis of a conditional is false.

Remark 5.3.5 False implies anything is true.

The statement \(P \to Q\) is true when \(P\) is false, no matter what \(Q\) is.
Practice working with more complicated conditional statements.

Activity 5.3.A Promises.

In many parts of this activity, you are asked to construct a truth table. You may start a new truth table for each part, but consider adding columns to your existing truth table instead.
  1. Copy the truth table for \(P \to Q\text{.}\)
  2. Add a column for \(\neg P\) and another column for \(\neg P \to Q\text{.}\)
  3. Add a column for \(Q \to P\text{.}\)
  4. Use your truth table to show that \((P \land Q) \to P\) is a tautology by adding a column for \(P \land Q\) and another column for \((P \land Q) \to P\text{.}\)
  5. Add a column for \(\neg P \lor Q\text{.}\) What do you notice? Discuss why that makes sense.
Make sure that you have completed Activityย 5.3.A because we are about to reveal some of the answers.

Example 5.3.7 Truth tables for statements involving conditionals.

ย 
  1. Construct a truth table for \(Q \to P\text{.}\)
    Solution.
    Tableย 5.3.8 shows the truth table. Note that the hypothesis is now \(Q\) and the conclusion is now \(P\text{.}\) The only time \(Q \to P\) is false is when the hypothesis \(Q\) is true but the conclusion \(P\) is false.
    Table 5.3.8. Truth table for the converse \(Q \to P\)
    \(P\) \(Q\) \(Q \to P\)
    \(\str{T}\) \(\str{T}\) \(\str{T}\)
    \(\str{T}\) \(\str{F}\) \(\str{T}\)
    \(\str{F}\) \(\str{T}\) \(\str{F}\)
    \(\str{F}\) \(\str{F}\) \(\str{T}\)
  2. Use a truth table to show that \((P \land Q) \to P\) is a tautology.
    Solution.
    Tableย 5.3.9 shows the truth table. Because the last column is all true, we can conclude that \((P \land Q) \to P\) is a tautology.
    Table 5.3.9. Truth table showing the tautology for the simplification inference \((P \land Q) \to P\)
    \(P\) \(Q\) \((P \land Q)\) \((P \land Q) \to P\)
    \(\str{T}\) \(\str{T}\) \(\str{T}\) \(\str{T}\)
    \(\str{T}\) \(\str{F}\) \(\str{F}\) \(\str{T}\)
    \(\str{F}\) \(\str{T}\) \(\str{F}\) \(\str{T}\)
    \(\str{F}\) \(\str{F}\) \(\str{F}\) \(\str{T}\)
  3. Construct a truth table for \(\neg P \lor Q\text{.}\) What do you notice?
    Solution.
    Tableย 5.3.10 shows the truth table. Because the last column is the same as the truth table for \(P \to Q\) in Tableย 5.3.4, we can conclude that they are logically equivalent. That is, \(\neg P \lor Q \equiv P \to Q\text{.}\)
    Table 5.3.10. Truth table showing the implication equivalence \(P \to Q \equiv \neg P \lor Q\)
    \(P\) \(Q\) \(\neg P\) \(\neg P \lor Q\)
    \(\str{T}\) \(\str{T}\) \(\str{F}\) \(\str{T}\)
    \(\str{T}\) \(\str{F}\) \(\str{F}\) \(\str{F}\)
    \(\str{F}\) \(\str{T}\) \(\str{T}\) \(\str{T}\)
    \(\str{F}\) \(\str{F}\) \(\str{T}\) \(\str{T}\)
Note the new equivalence we found in Activityย 5.3.A (e).
Note that the second statement of Theoremย 5.3.11 follows from the first by substituting \(R = \neg P\) and therefore \(P = \neg R\text{.}\)
A common use of if/then in computer programming is the if/then/else construction.

Example 5.3.12 โ€œIf, then, elseโ€ construction.

A common command in computer programming is a statement of the form โ€œIf \(P\text{,}\) then \(Q\text{,}\) else \(R\text{.}\)โ€ This statement tells the computer that if \(P\) is true, then do what \(Q\) says and if \(P\) is false, then do what \(R\) says.
  1. Write the statement if \(P\text{,}\) then \(Q\text{,}\) else \(R\) in logical notation.
    Solution.
    The statement says if \(P\text{,}\) then \(Q\) and also if \(\neg P\text{,}\) then \(R\) so we have
    \begin{equation*} (P \to Q) \land (\neg P \to R) \end{equation*}
  2. Consider the following statement: for any integer \(n\text{,}\) if \(n\) is even, then the answer is \(\frac{n}{2}\text{,}\) else the answer is \(3n+1\text{.}\) What is the answer when \(n=30\text{?}\) What is the answer when \(n = 7\text{?}\)
    Solution.
    When \(n=30\) the statement \(n\) is even is true and so the answer is \(\frac{n}{2}=\frac{30}{2} = 15\text{.}\) On the other hand, when \(n=7\) the statement \(n\) is even is false and so the answer is \(3n+1 = 3(7)+1 = 22\text{.}\)

Subsection 5.3.B Proof Format: Direct Proof of a Conditional

Since \(P \to Q\) promises that if \(P\) is true, then \(Q\) is true, our proof format begins by assuming that \(P\) is true and concludes once we have shown that \(Q\) is true. The proof does not mention the case where \(P\) is false since \(P \to Q\) is automatically true if that happens, as stated in Remarkย 5.3.5.
As usual, when we introduce a new proof format, we present an example and ask you to edit it to prove a similar statement.

Activity 5.3.B Direct proof of a conditional statement.

ย 
  1. Copy the following proof of a direct proof of a conditional statement. Note that we are using Theoremย 5.2.18 because the statement is universally quantified as well as Theoremย 5.3.13. Prove for any integer \(m\text{,}\) if \(m\) is odd then \(3m\) is odd.

    Proof.

    Let \(m\) be an integer. Assume that \(m\) is odd. By the definition of odd Definitionย 4.1.4 we can write \(m=2k+1\) for some integer \(k\text{.}\) Then
    \begin{equation*} 3m=3(2k+1)=6k+3\text{.} \end{equation*}
    (Side note: to show that \(3m\) is odd, we need to write \(6k+3\) in the form \(2(\underline{\hspace{.5in}})+1\text{.}\))
    Note that
    \begin{equation*} 6k+3 = 6k+2+1 = 2(3k+1) + 1\text{.} \end{equation*}
    Since \(3k+1\) is an integer, it follows from the definition of odd that \(3m\) is odd.
  2. Edit the proof in (a) to prove that for any integer \(m\) if \(m\) is odd, then \(5m\) is odd.

Subsection 5.3.C Broken Promises: Negating Conditional Statements

We have just seen how to prove that a conditional statement is true. How do we construct a counterexample involving a conditional statement to prove that it is false?

Activity 5.3.C Counterexamples involving conditional statements.

Show that each the statements (a)-(c) is false by finding a counterexample for each statement.
  1. If a graph has chromatic number four, then it must be the complete graph \(K_4\text{.}\)
  2. Given real numbers \(x\) and \(y\text{,}\) if \(x + y = 2\text{,}\) then \(x \le 1\) and \(y \le 1\text{.}\)
  3. For any integers \(a\) and \(b\text{,}\) if \(6 \mid ab\text{,}\) then \(6 \mid a\) or \(6 \mid b\text{.}\)
  4. What do we need to be true in order to show that \(P \to Q\) is false?
  5. Construct a truth table for \(\neg (P \to Q)\text{.}\) Include an intermediate column for \(P \to Q\text{.}\)
  6. \(\neg (P \to Q)\) is logically equivalent to a statement involving \(\land\text{.}\) What is it?
Make sure that you have completed Activityย 5.3.C because we are about to reveal the answers.

Example 5.3.16 Counterexamples involving conditional statements.

For each statement from Activityย 5.3.C (a)-(c), find a counterexample to show the statement is false.
  1. If a graph has chromatic number four, then it must be the complete graph \(K_4\text{.}\)
    Solution.
    One possible counterexample is the wheel \(W_5\text{,}\) drawn in Figureย 3.2.26. (By the way, we could not use \(W_3\) as a counterexample because \(W_3 \cong K_4\text{.}\)) Notice that our counterexample has the hypothesis true and the conclusion false.
  2. Given real numbers \(x\) and \(y\text{,}\) if \(x + y = 2\text{,}\) then \(x \le 1\) and \(y \le 1\text{.}\)
    Solution.
    One possible counterexample is \(x = 0.8\) and \(y=1.2\text{.}\) While it is true that \(x=0.8 \le 1\text{,}\) because \(y = 1.2 > 1\) it follows that the conclusion that \(x \le 1\) and \(y \le 1\) is false. Notice that our counterexample has the hypothesis true and the conclusion false. To insure that the conclusion was false, we used DeMorganโ€™s Laws Theoremย 5.1.23 \(\neg(P \land Q) \equiv \neg P \lor \neg Q\text{.}\)
  3. For any integers \(a\) and \(b\text{,}\) if \(6 \mid ab\text{,}\) then \(6 \mid a\) or \(6 \mid b\text{.}\)
    Solution.
    One possible counterexample would be \(a = 3\) and \(b = 4\) because then \(6 \mid 12 = ab\) but \(6 \nmid 3\) and \(6 \nmid 4\text{.}\) Notice that our counterexample has the hypothesis true and the conclusion false. To insure that the conclusion was false, we used DeMorganโ€™s Laws Theoremย 5.1.23 \(\neg(P \lor Q) \equiv \neg P \land \neg Q\text{.}\)
As we saw in Activityย 5.3.C and Exampleย 5.3.16, a counterexample to \(P \to Q\) must have \(P\) true and \(Q\) false. After all, that is the only way to break the promise.
Letโ€™s look at an example of writing the negation of conditional statements.

Example 5.3.18 Negating conditional statements.

Write the negation of each statement in a sentence. Hint: The negation should be true for your counterexample.
  1. If a graph has chromatic number four, then it must be the complete graph \(K_4\text{.}\)
    Solution.
    Note that this statement does not state a specific quantifier, so following Remarkย 5.2.11, we interpret this statement as universally quantified. Using Theoremย 5.2.24 and Theoremย 5.3.17 we get the following negation: There exists a graph that has chromatic number four but is not the complete graph \(K_4\text{.}\) Our counterexample from Exampleย 5.3.16 found a graph, namely \(W_5\text{,}\) that has chromatic number four but is not the complete graph \(K_4\text{.}\)
  2. Given real numbers \(x\) and \(y\text{,}\) if \(x + y = 2\text{,}\) then \(x \le 1\) and \(y \le 1\text{.}\)
    Solution.
    We use Theoremย 5.2.24 and Theoremย 5.3.17 to find the following awkwardly-stated draft of the negation: There are real numbers \(x\) and \(y\) such that \(x+y=2\) but it is not the case that \(x \le 1\) and \(y \le 1\text{.}\) We can eliminate the awkward โ€œit is not the caseโ€ by using DeMorganโ€™s law Theoremย 5.1.23. Our negation is the following statement: There are real numbers \(x\) and \(y\) such that \(x+y=2\) but either \(x > 1\) or \(y > 1\text{.}\) Our counterexample from Exampleย 5.3.16 found real numbers \(x = 0.8\) and \(y = 1.2\) where \(x+y=2\) but \(y > 1\text{.}\)
  3. For any integers \(a\) and \(b\text{,}\) if \(6 \mid ab\text{,}\) then \(6 \mid a\) or \(6 \mid b\text{.}\)
    Solution.
    We use Theoremย 5.2.24 and Theoremย 5.3.17 to find the following awkwardly-stated draft of the negation: There are integers \(a\) and \(b\) such that \(6 \mid ab\) but it is not the case that \(6 \mid a\) or \(6 \mid b\text{.}\) We can eliminate the awkward โ€œit is not the caseโ€ by using DeMorganโ€™s law Theoremย 5.1.23. Our negation is the following statement: There are integers \(a\) and \(b\) such that \(6 \mid ab\) but \(6 \nmid a\) and \(6 \nmid b\text{.}\) Our counterexample from Exampleย 5.3.16 found integers \(a = 3\) and \(b = 4\) where \(6 \mid 12\) but \(6 \nmid 3\) and \(6 \nmid 4\text{.}\)

Subsection 5.3.D Proof Format: Or Using Implication

The implication equivalence Theoremย 5.3.11 gives us a new way to prove an โ€œorโ€ statement, which we saw earlier using cases in Theoremย 5.1.12. That is, to prove \(R \lor Q\) we can prove \(\neg R \to Q\text{.}\)
As usual, when we introduce a new proof format, we present an example and ask you to edit it to prove a similar statement.

Activity 5.3.D Direct proof of an โ€œorโ€ statement using an equivalent conditional.

ย 
  1. Copy the following proof of proof of an โ€œorโ€ statement using the implication equivalence. Note that we are using Theoremย 5.2.18 because the statement is universally quantified as well as Theoremย 5.3.19. Prove that for any positive real numbers \(a\) and \(b\) such that \(ab=100\text{,}\) either \(a \le 10\) or \(b \lt 10\text{.}\)

    Proof.

    Let \(a\) and \(b\) be positive real numbers such that \(ab = 100\text{.}\) Assume \(a > 10\text{.}\) Multiplying each side of this equation by the positive number \(b\) we get \(100=ab > 10b\text{.}\) Dividing each side of this equation by 10 we get \(b \lt 10\text{.}\) Thus either \(a \le 10\) or \(b \lt 10\text{.}\)
  2. Edit the proof in (a) to prove that for any positive real numbers \(a\) and \(b\) such that \(ab=5\text{,}\) either \(a \le \sqrt{5}\) or \(b \lt \sqrt{5}\text{.}\)
A common concern about proving an โ€œorโ€ statement using the implication equivalence is that we have proved that if \(P\) is false, then \(Q\) is true, but it feels like we are missing a proof that if \(Q\) is false, then \(P\) is true. It is not missing. Letโ€™s look at how to better understand Theoremย 5.3.19 by comparing it to proof by cases.

Example 5.3.21 Compare proving an โ€œorโ€ statement using implication versus proof by cases.

ย  Explain Theoremย 5.3.19 by considering how to prove \(P \lor Q\) using cases Theoremย 5.1.12 with the cases are \(P\) or \(\neg P\text{.}\)
Solution.
Prove: \(P \lor Q\) using cases Theoremย 5.1.12 with the cases \(P\) or \(\neg P\text{.}\)

Proof.

We consider two cases.
Case 1: Assume \(P\text{.}\) Thus, \(P\text{.}\)
Case 2: Assume \(\neg P\text{.}\) (Explain why \(Q\) follows.) Thus, \(Q\text{.}\)
In either case, \(P \lor Q\text{.}\)
When we cross out the obvious lines of the proof we get the following proof:

Proof.

We consider two cases.
Case 1: Assume \(P\text{.}\) Thus, \(P\text{.}\)
Case 2: Assume \(\neg P\text{.}\) (Explain why \(Q\) follows.) Thus, \(Q\text{.}\)
In either case, \(P \lor Q\text{.}\)
This proof is the Theoremย 5.3.19.

Subsection 5.3.E Exercises

Subsubsection Exercises for 5.3.A Promises: Conditional Statements

2. Practice.

Use a truth table to verify that \(P \to (P \lor Q)\) is a tautology. Include an intermediate column for \(P \lor Q\text{.}\)
Check.
Hint: The truth table should have four columns: \(P\text{,}\) \(Q\text{,}\) \(P \lor Q\text{,}\) \(P \to (P \lor Q)\text{.}\) The truth table should also have four rows, as in Exampleย 5.3.3. To show that the statement is a tautology, the last column of your truth table should be all \(\str{T}\) s.

4. Understand.

Construct a truth table to show that \((P \land (P \to Q)) \to Q\) is a tautology. This logical equivalence justifies modus ponens, a key logical inference we discuss in Sectionย 5.5.

6. Understand.

Construct a truth table to show that
\begin{equation*} (P \to R) \land (Q \to R) \equiv (P \lor Q) \to R\text{.} \end{equation*}
Include appropriate intermediate columns. This logical equivalence justifies Theoremย 4.2.12 (for two cases).
Check.
Hint: Your truth table should have eight columns: \(P\text{,}\) \(Q\text{,}\) \(R\text{,}\) \(P \to R\text{,}\) \(Q \to R\text{,}\) \((P \to R) \land (Q \to R)\text{,}\) \(P \lor Q\text{,}\) and \((P \lor Q) \to R\text{.}\) Your truth table should also have eight rows, as in Exampleย 5.1.9. The sixth and eighth columns should be the same.

7. Understand.

ย 
  1. Use the implication equivalence Theoremย 5.3.11 to rewrite the following statement as a conditional: Either you take a break from playing that video game or I will take away your controller for a week.
  2. Use the implication equivalence Theoremย 5.3.11 to rewrite the following statement using โ€œorโ€: If you do not text me by 6 PM, then I will text you.
Check.
  1. If you do not take a break from playing that video game, then I will take away your controller for a week.
  2. Hint: Your answer should not have any negative words (like โ€œnotโ€).

8. Recap.

Do you know โ€ฆ
  1. What the symbol \(\to\) means in this logic context?
  2. What the statement if \(P\text{,}\) then \(Q\) promises?
  3. When a conditional statement is true and when it is false?
  4. How to draw truth tables that involve conditional statements?
  5. Why \(P \to Q \equiv \neg P \lor Q\text{?}\)
  6. How to use a truth table to verify that a logical equivalence is valid?

9. Explore.

Is \(P \lor (Q \to R)\) logically equivalent to \((P \lor Q) \to R\text{?}\) Use a truth table to justify your answer. Include appropriate intermediate columns.

Subsubsection Exercises for 5.3.B Proof Format: Direct Proof of a Conditional

14. Understand.

ย  Use Theoremย 5.2.18, Theoremย 5.1.11, and Theoremย 5.3.13 to prove for any integers \(a\) and \(b\) if \(a\) is even and \(b\) is odd, then \(a+b\) is odd and \(ab\) is even. Hint: Write \(a = 2k_1\) and \(b = 2k_2+1\) for some integers \(k_1\) and \(k_2\text{.}\) (You cannot use the same integer \(k\) for both.)
Check.
Hint: Here is an outline of the proof.
โ€œ
Proof. Let \(a\) and \(b\) be integers. Assume \(\ldots\text{.}\) By the definitions of even and odd, we can write \(\ldots\) (use hint) Then, first, \(a+b= \ldots\text{.}\) Thus, \(\ldots.\) Next, \(ab =\ldots\text{.}\) Thus, \(\ldots.\)
โ€

15. Understand.

ย  Use Theoremย 5.2.18, Theoremย 5.3.13, and Definitionย 4.1.8 to prove that if \(a \mid b\) and \(b \mid c\text{,}\) then \(a \mid c\) for any integers \(a\text{,}\) \(b\text{,}\) and \(c\text{.}\) Hint: Write \(b=ak_1\) and \(c=bk_2\) for some integers \(k_1\) and \(k_2\text{.}\) You cannot use the same integer \(k\) for both.
Check.
โ€œ
Proof. Let \(a\text{,}\) \(b\text{,}\) and \(c\) be integers. Assume \(a \mid b\) and \(b \mid c\text{.}\) By the definitions of divides, we can write \(b=ak_1\) and \(c=bk_2\) for some integers \(k_1\) and \(k_2\text{.}\) Then,
\begin{equation*} c = bk_2 = (ak_1)k_2 = a(k_1k_2) = ak \end{equation*}
where \(k = k_1k_2\) is an integer. Thus, by definition of divides, \(a \mid c\text{.}\) \(\Box\)
โ€

17. Explore.

Prove that for any integer \(n\) and digit \(s\) that if \(s\) is even, then \(10n+s\) is even and if \(s\) is odd, then \(10n+s\) is odd. Use Theoremย 5.2.18, Theoremย 5.1.11, Theoremย 5.3.13, and Definitionย 4.1.4.
It follows from this exercise that if the last digit of an integer is even, then that integer is even and if the last digit of an integer is odd, then that integer is odd.
Check.
Hint: Here is an outline of the proof.
โ€œ
Proof. Let \(n\) be an integer and let \(s\) be a digit. First, assume \(s\) is even. By definition of even we can write \(s=\ldots\text{.}\) Then
\begin{equation*} 10n+s = \ldots = 2k' \end{equation*}
where \(k' = \ldots\) is an integer. Thus \(10n+s\) is even. Next, assume \(s\) is odd. By definition of odd we can write \(s= \ldots\text{.}\) Then
\begin{equation*} 10n+s = \ldots = 2k'+1 \end{equation*}
where \(k' = \ldots\) is an integer. Thus \(10n+s\) is odd.
โ€

18. Explore.

In this exercise, we prove Theoremย 4.5.6 (a). Let \(a\text{,}\) \(n\text{,}\) \(q\text{,}\) and \(r\) be integers such that \(a = nq + r\text{.}\) (We are most interested in the case where \(r = a\) \(\fn{mod}\) \(n\text{,}\) but the result holds in general.)
  1. Use Theoremย 5.2.18, Theoremย 5.3.13, and Definitionย 4.1.8 to prove that for any integer \(d\text{,}\) if \(d \mid n\) and \(d \mid r\text{,}\) then \(d \mid a\text{.}\)
  2. What does 18.(a) tell you is true about any common divisor of \(n\) and \(r\text{?}\)
  3. Use Theoremย 5.2.18, Theoremย 5.3.13, and Definitionย 4.1.8 to prove that for any integer \(d\text{,}\) if \(d \mid a\) and \(d \mid n\text{,}\) then \(d \mid r\text{.}\) Hint: Solve for \(r\text{.}\)
  4. What does 18.(c) tell you is true about any common divisor of \(a\) and \(n\text{?}\)
  5. Explain why it follows from 18.(a) and 18.(c) that the list of common divisors of \(a\) and \(n\) is the same as the list of common divisors of \(n\) and \(r\text{.}\)
  6. Explain why it follows from 18.(e) that \(\str{gcd}\)\((a,n) =\) \(\str{gcd}\) \((n,r)\text{.}\)

Subsubsection Exercises for 5.3.C Broken Promises: Negating Conditional Statements

19. Practice.

Each of the following statements is false. Find a counterexample to each statement.
  1. If a graph contains a 5-cycle, then contains a 4-cycle.
  2. If two graphs \(G\) and \(H\) have the same degree sequence, then they are isomorphic. Hint: Try 3-regular graph with six vertices.
  3. For any vertices \(v\) and \(w\) in the path \(P_6\text{,}\) if \(v\) and \(w\) are adjacent, then \(v\) and \(w\) have the same degree.
Check.
  1. Hint: Your graph should contain a 5-cycle.
  2. Hint: Your graphs should not be isomorphic.
  3. Hint: To show the counterexample, draw \(P_6\) and label two of the vertices \(v\) and \(w\text{.}\)

21. Understand.

Each of the following statements is false. Find a counterexample to each statement.
  1. For any integers \(a\) and \(b\text{,}\) if \(a \mid 12\) and \(b \mid 12\text{,}\) then \(ab \mid 12\text{.}\)
  2. For any integers \(a\) and \(b\text{,}\) if \(12 \mid ab\text{,}\) then \(12 \mid a\) or \(12 \mid b\text{.}\)
Check.
  1. Hint: One possible counterexample is \(a = 6\) and \(b = 4\text{.}\) Try to find a different counterexample.
  2. Hint: Check that your counterexample has \(12 \mid ab\text{,}\) \(12 \nmid a\text{,}\) and \(12 \nmid b\text{.}\) (We used DeMorganโ€™s laws.)

22. Understand.

Use Theoremย 5.3.17 to write the negation of each statement in a sentence.
  1. If a graph contains a 5-cycle, then contains a 4-cycle. Note that by Remarkย 5.2.11, this statement is universally quantified so use Theoremย 5.2.24.
  2. If two graphs \(G\) and \(H\) have the same degree sequence, then they are isomorphic. Again, use Theoremย 5.2.24.
  3. For any vertices \(v\) and \(w\) in the path \(P_6\text{,}\) if \(v\) and \(w\) are adjacent, then \(v\) and \(w\) have the same degree.
Check.
  1. There is a graph that contains a 5-cycle but does not contain a 4-cycle.
  2. Hint: Your negation should not include the word โ€œifโ€.
  3. Hint: Your negation should not include the word โ€œifโ€.

23. Understand.

Each of the following statements is false. First, find a counterexample and then use Theoremย 5.3.17 to write the negation of each statement in a sentence. Hint: Use DeMorganโ€™s laws Theoremย 5.1.23.
  1. For any integers \(a\) and \(b\text{,}\) if \(a+b\) is even, then \(a\) is even or \(b\) is even.
  2. For any integers \(a\) and \(b\text{,}\) if \(ab\) is even, then \(a\) is even and \(b\) is even.
Check.
  1. For some integers \(a\) and \(b\text{,}\) \(a+b\) is even, but \(a\) is odd and \(b\) is odd.
  2. Hint: Make sure you understand how we got the answer to part (a). Your negation should not include the words โ€œifโ€ or โ€œandโ€.

Subsubsection Exercises for 5.3.D Proof Format: Or Using Implication

26. Understand.

ย 
  1. Use a truth table to verify that \(P \to (Q \lor R)\) is equivalent to \((P \land \neg Q) \to R\text{.}\)
  2. Consider the following conditional statement \(S\text{:}\) For any integers \(a\) and \(b\text{,}\) if \(ab=0\text{,}\) then \(a=0\) or \(b=0\text{.}\) Use 26.(a) to rewrite \(S\) without โ€œorโ€.

27. Understand.

ย  Consider the following conditional statement \(S\) from Exercise 26: For any integers \(a\) and \(b\text{,}\) if \(ab=0\text{,}\) then \(a=0\) or \(b=0\text{.}\) Use Theoremย 5.2.18, Theoremย 5.3.13, and Theoremย 5.3.19 to prove \(S\text{.}\) Hint: if \(a \neq 0\text{,}\) then you may divide each side of the equation \(ab=0\) by \(a\text{.}\)