Here is the promised post that I hope will be easier to refer back to than the much longer posts I’ve written on individual aspects of basic logic. What I imagine people doing is reading the longer posts and using this one to jog their memories later. If you can think of any important points that I made in earlier posts and have forgotten to mention here, I’d be grateful to know of them.
Once again, the main topics dealt with were these.
Logical connectives. AND, OR, NOT, IMPLIES (or in symbols, ).
Quantifiers. “for every” and “there exists” (or in symbols, and ).
Relationships between statements. Negation, converse, contrapositive.
I think I’ll just write down a numbered list of points.
- AND has a similar meaning in mathematics to its meaning in ordinary English, but some care is needed if you use it to connect anything other than statements. If you do do that, then make sure you know how to translate what you have written into more formal mathematical language where AND connects statements only.
- OR is slightly more different from its ordinary English meaning than AND, since in mathematics it is always the inclusive OR. One should think of as saying “P is true or Q is true or both” or “At least one of P and Q is true” (or both).
- AND and OR are associative. That means that and In practice what this tells us is that we don’t need brackets. If we connect a bunch of statements with ANDs it means that all those statements are true, and if we connect them with ORs it means that at least one of them is true.
- However, brackets matter very much indeed when you mix ANDs and ORs. You are not allowed to write or (or more wordy statements of the same kind). You have to put the brackets in to make clear in which order you are doing things.
- AND is distributive over OR and vice versa. That means that and
- NOT is again similar but not identical to the ordinary English word. If is a statement, then the statement should be thought of as saying “It is not the case that ” The main thing to remember is that is not the opposite of For example, if is the statement “ is the largest element of ” then has nothing to do with the smallest element of It is simply the statement that is not the largest element of
- A good rule for checking whether your use of NOTs is correct is this: NOT turns weak statements into strong statements and vice versa.
- de Morgan’s laws are that and that .
- IMPLIES is, of all the connectives, the one that least resembles its ordinary English counterpart.
- If P and Q are specific statements, such as “23 is a prime number” or “there are infinitely many primes” then does not mean that there is any interesting relationship between the two statements. It merely means that it is not the case that P is true and Q is false. (An alternative definition is that if P is true then Q must be true. Though perfectly valid, this definition doesn’t convey quite as vividly just how unnecessary it is for the truth of P to “cause” the truth of Q.)
- However, most of the time, we do not use IMPLIES to relate specific statements. Rather, we use them to relate general statements — that is, statements that involve unknown variables. And once we do that, the picture becomes more complicated.
- The reason for the complication is that general statements often look like specific cases. For example, if I say that “ is a prime greater than 2″ implies “ is odd”, then it looks as though I’m talking about one particular case, that of . However, if you ask me which I’m talking about, I have to admit that I’m not talking about a specific number like 103. Rather, I am making the general statement that would normally be written using a quantifier: for every natural number if is a prime greater than 2 then is odd.
- This means that there are two notions of implication that it is important to be aware of and not to confuse. One, which I have called the truth-value notion, is the one mentioned above. The other, which I have called the “causal” notion, is best thought of as relating properties rather than statements. For instance, “is a prime greater than 2” implies (in the property sense) “is odd”.
- The two notions of implication are related as follows. Let P and Q be two properties and write and for the statements “ has property P” and “ has property Q”. Then the property P implies the property Q (in the more “causal”, property sense) if and only if for every the statement implies the statement (in the truth-value sense). If you don’t feel you understand this point properly, I recommend not worrying about it for now, but coming back and rereading what I’ve written if at some stage you find yourself confused about “implies”.
- Many English words and expressions contain inside them, sometimes not very explicitly, notions of “all” or “some”. For example, “There are always golf balls in the undergrowth over there,” could be translated into more formal language as follows: “For every time there exists a golf ball such that is in the undergrowth over there at time “
- Note that the quantifiers go at the beginning of the sentence and the variables we are talking about are specifically mentioned. That is to avoid ambiguities such as the following: “Every element of the set is less than some number.” Does that mean that for each element of you can find a that’s bigger than ? If so, then it’s not a very interesting thing to say. It’s more likely that the intended meaning is that there is some number that is bigger than every element of the set This can be made crystal clear if you follow the rule about putting quantifiers first and specifying the variables. Then you get the statement, “There exists a number such that for every element ” (Perhaps this particular sentence is even clearer in its symbolic form: )
- The negation of is and the negation of is These two rules are similar to de Morgan’s laws, and the similarity is not a coincidence.
- That isn’t surprising, as there are almost no coincidences in mathematics.
- Using the rules for negating single quantifiers, we can negate complicated sentences with lots of quantifiers in a purely mechanical way. We start with right outside the entire sentence, and we then drag it past the quantifiers, changing each into and each into
- That doesn’t finish the job, because we still have to negate the inner quantifier-free statement. To do that we have to use things like de Morgan’s laws. A particularly important case is when the inner statement takes the form (Here, and this is very important, I am thinking of and as statements that involve several variables that have also been involved in the quantifiers.) The negation of is Why? Because once we get inside all the quantifiers, we’re talking about the truth-value meaning of implication, and the condition for to be false is precisely that should be true and false.
- A quick example. Suppose that is some special set of integers and consider the statement “ is odd is prime.” The negation of this is “ is odd and is not prime.”
- It’s worth thinking about the meaning of “” in that previous example. A number’s being odd doesn’t cause it to be prime. However, the statement is saying that for every number that belongs to the set it so happens that if is odd then it is also prime. This is very much the truth-value meaning of “” and not the “causal” meaning.
- The converse of a statement is the statement . Also, we often say that the converse of a statement of the form is the statement .
- If a statement is true, that does not make its converse automatically true: it is very easy to think of true statements with false converses. Therefore, you should be careful not to confuse a statement with its converse.
- However, there are many interesting examples of true statements that do have true converses. When this happens, it is very often easier to prove the implication in one direction than it is to prove it in the other.
- The contrapositive of the statement is the statement . The contrapositive is equivalent to the original statement (in the sense that it is true if and only if the original statement is true), but it often turns out to be easier to prove.
- The contrapositive of the converse of is . It is sometimes easier to prove than it is to prove .
- If you need to prove the converse of , don’t accidentally prove that instead …
- A free variable is one that is not quantified over. A bound variable is one that is quantified over. For example, in the statement , and are bound variables and is free. (An intuitive test you can apply is this: of which variables does it make sense to say that the statement is telling us something about those variables? The above statement is telling us about and it doesn’t make sense to say that it is telling us about or .)
- Bound variables are a bit like the dummy variables that appear in expressions such as and . (In the first expression is a dummy variable and in the second one is a dummy variable.)
- When you are writing a proof, always be clear in your mind — and in your write-up, which variables are free and which bound.
- Always introduce your variables before talking about them.
- Give names to the objects you want to talk about. You’ll find it much easier to express yourself.
- An important way of introducing a variable is to use the “let” trick and the “suppose” trick. For instance, if you want to prove a statement of the form , then without thinking you can begin your proof, “Let and suppose that .” Another way of putting it is, “Let be an element of such that .
- If you have just proved a statement of the form then it is considered OK to go on and talk about as though you had just chosen it — even if you haven’t. For example, it’s OK to write, “There exists such that . It follows that .” which is a kind of shorthand for, “There exists such that . Let be such that . Then .”
I have written the posts so far because I want to be able to take this kind of thing for granted when I discuss some of the definitions and proofs that are covered in this term’s courses. I don’t mean that I’ll never mention any of these basic logical principles again — far from it. But when I do mention them, I’ll assume that you have some familiarity with them, so that it will be enough for me to offer reminders rather than explaining everything from scratch.
If you don’t feel entirely confident that you’re on top of basic logic, there is something you can do that you couldn’t do in my day, which is an online test. Devised by Terence Tao, this test consists of simple questions whose sole purpose is to let you see whether you understand the kind of logic you need to handle complicated mathematical statements. (The traditional way was to be thrown in at the deep end: you just had to handle the complicated statements and if your logic was shaky your supervisor would tell you.)
Rather than give you a link directly to the logic questions, I’m giving a link to a page with lots of quizzes on it. This really is a wonderful resource: I strongly recommend that before you do an examples sheet on a topic covered in one of the quizzes here, you first do the quiz to check that you are secure on the basics. And I strongly recommend doing the quiz entitled “Logic” before you do any (pure) examples sheets at all.