We have considered logic both as its own sub-discipline of mathematics, and as a means to help us better understand and write proofs. In either view, we noticed that mathematical statements have a particular logical form, and analyzing that form can help make sense of the statement.
At the most basic level, a statement might combine simpler statements using logical connectives. We often make use of variables, and quantify over those variables. How to resolve the truth or falsity of a statement based on these connectives and quantifiers is what logic is all about. From this, we can decide whether two statements are logically equivalent or if one or more statements (logically) imply another.
When writing proofs (in any area of mathematics) our goal is to explain why a mathematical statement is true. Thus it is vital that our argument implies the truth of the statement. To be sure of this, we first must know what it means for the statement to be true, as well as ensure that the statements that make up the proof correctly imply the conclusion. A firm understanding of logic is required to check whether a proof is correct.
There is, however, another reason that understanding logic can be helpful. Understanding the logical structure of a statement often gives clues as how to write a proof of the statement.
We are not going to try to prove the statement here, but we can at least say what a proof might look like, based on the logical form of the statement. Perhaps we should write the statement in an equivalent way which better highlights the quantifiers and connectives:
For all integers \(n\text{,}\) if \(n\) is even and greater than 2, then there exists integers \(p\) and \(q\) such that \(p\) and \(q\) are prime and \(n = p+q\text{.}\)
What would a direct proof look like? Since the statement starts with a universal quantifier, we would start by, ``Let \(n\) be an arbitrary integer." The rest of the statement is an implication. In a direct proof we assume the βifβ part, so the next line would be, βAssume \(n\) is greater than 2 and is even.β I have no idea what comes next, but eventually, we would need to find two prime numbers \(p\) and \(q\) (depending on \(n\)) and explain how we know that \(n = p+q\text{.}\)
Or maybe we try a proof by contradiction. To do this, we first assume the negation of the statement we want to prove. What is the negation? From what we have studied we should be able to see that it is,
There is an integer \(n\) such that \(n\) is even and greater than \(2\text{,}\) but for all integers \(p\) and \(q\text{,}\) either \(p\) or \(q\) is not prime or \(n \ne p+q\text{.}\)
Could this statement be true? A proof by contradiction would start by assuming it was and eventually conclude with a contradiction, proving that our assumption of truth was incorrect. And if you can find such a contradiction, you will have proved the most famous open problem in mathematics. Good luck.
Suppose you know that the statement βif Peter is not tall, then Quincy is fat and Robert is skinnyβ is false. What, if anything, can you conclude about Peter and Robert if you know that Quincy is indeed fat? Explain (you may reference problemΒ 3.3.1).
Notice that in every row for which both \(P \imp Q\) and \(P \imp R\) is true, so is \(P \imp (Q \wedge R)\text{.}\) Therefore, whenever the premises of the argument are true, so is the conclusion. In other words, the deduction rule is valid.
The statement is true. If \(n\) is an even integer less than or equal to 7, then the only way it could not be negative is if \(n\) was equal to 0, 2, 4, or 6.
There is an integer \(n\) such that \(n\) is even and \(n \le 7\) but \(n\) is not negative and \(n \not\in \{0,2,4,6\}\text{.}\) This is false, since the original statement is true.
For all integers \(n\text{,}\) if \(n\) is not negative and \(n \not\in\{0,2,4,6\}\) then \(n\) is odd or \(n > 7\text{.}\) This is true, since the contrapositive is equivalent to the original statement (which is true).
For all integers \(n\text{,}\) if \(n\) is negative or \(n \in \{0,2,4,6\}\) then \(n\) is even and \(n \le 7\text{.}\) This is false. \(n = -3\) is a counterexample.
For any number \(x\text{,}\) if it is the case that adding any number to \(x\) gives that number back, then multiplying any number by \(x\) will give 0. This is true (of the integers or the reals). The βifβ part only holds if \(x = 0\text{,}\) and in that case, anything times \(x\) will be 0.
The converse in words is this: for any number \(x\text{,}\) if everything times \(x\) is zero, then everything added to \(x\) gives itself. Or in symbols: \(\forall x (\forall z (x \cdot z = 0) \imp \forall y (x + y = y))\text{.}\) The converse is true: the only number which when multiplied by any other number gives 0 is \(x = 0\text{.}\) And if \(x = 0\text{,}\) then \(x + y = y\text{.}\)
The contrapositive in words is: for any number \(x\text{,}\) if there is some number which when multiplied by \(x\) does not give zero, then there is some number which when added to \(x\) does not give that number. In symbols: \(\forall x (\exists z (x\cdot z \ne 0) \imp \exists y (x + y \ne y))\text{.}\) We know the contrapositive must be true because the original implication is true.
The negation: there is a number \(x\) such that any number added to \(x\) gives the number back again, but there is a number you can multiply \(x\) by and not get 0. In symbols: \(\exists x (\forall y (x + y = y) \wedge \exists z (x \cdot z \ne 0))\text{.}\) Of course since the original implication is true, the negation is false.
The converse is: for all integers \(n\text{,}\) if \(7n\) is odd, then \(n\) is odd. We will prove this by contrapositive.
Proof.
Let \(n\) be an integer. Assume \(n\) is not odd. Then \(n = 2k\) for some integer \(k\text{.}\) So \(7n = 14k = 2(7k)\) which is to say \(7n\) is even. Therefore \(7n\) is not odd.
How many coins would you need to scoop up to be sure that you either had 4 coins that were all the same or 4 coins that were all different? Prove your answer.
Suppose you only had 5 coins of each denomination. This means you have 5 pennies, 5 nickels, 5 dimes and 5 quarters. This is a total of 20 coins. But you have more than 20 coins, so you must have more than 5 of at least one type.
Suppose you have 22 coins, including \(2k\) nickels, \(2j\) dimes, and \(2l\) quarters (so an even number of each of these three types of coins). The number of pennies you have will then be
But this says that the number of pennies is also even (it is 2 times an integer). Thus we have established the contrapositive of the statement, βIf you have an odd number of pennies then you have an odd number of at least one other coin type.β
You need 10 coins. You could have 3 pennies, 3 nickels, and 3 dimes. The 10th coin must either be a quarter, giving you 4 coins that are all different, or else a 4th penny, nickel or dime. To prove this, assume you donβt have 4 coins that are all the same or all different. In particular, this says that you only have 3 coin types, and each of those types can only contain 3 coins, for a total of 9 coins, which is less than 10.
Are there any trolls that are not scared of goats? Recall, of course, that all trolls are either knights (who always tell the truth) or knaves (who always lie).