Notes On Logic and Proof May2024
Notes On Logic and Proof May2024
You should check the website regularly for updates to these notes. You can tell if
there have been any updates by looking at the date and version number on the front
cover.
Introduction
The formal side of mathematics ‐ that of theorems and proofs ‐ is a major part of the
subject and is the main focus of Paper 2. These notes are intended to be a brief
introduction to the ideas involved, for the benefit of candidates who have not yet
met them within their mathematics classes or within their wider mathematical
reading.
Before you launch into reading through what we have written, there are a few things
to keep in mind:
if A then B
A if B
A only if B
A if and only if B
Note: candidates will not be expected to recognise or use symbolic notation for any
of these terms, nor will they be expected to complete formal truth tables.
Arg3 Understand and use the terms for all, for some (meaning for at least one),
and there exists.
Arg4 Be able to negate statements that use any of the above terms.
Mathematical Proof
Prf1 Follow a proof of the following types, and in simple cases know how to
construct such a proof:
Prf3 Make conjectures based on small cases, and then justify these conjectures.
Prf4 Rearrange a sequence of statements into the correct order to give a proof for
a statement.
The principle that a statement can only be either true or false but not both is known
as the law of the excluded middle. It is fundamental to all the logic and formal
mathematics that you will meet in these notes. 1
It does not matter if we cannot work out whether a statement is actually true or
false so long as it must be one or the other. For instance, here is a statement:
This is clearly either true or false but establishing which is not so easy. Here is a
second [rather famous] example of a sentence that is NOT a statement:
The only barber in a town shaves each and every man who does not shave himself.
1
There are systems that do not use the law of the excluded middle: we will not meet
these systems in these notes. Of course, these systems will have a different notion of
what a statement is from the ideas we are using here.
2
You do not need to worry at this stage why the sentence is not a statement under
our definition; that is, you do not need to worry why it is neither true nor false. If
you are interested in the statement and its history look up “Russell’s Paradox” or
“Barber Paradox”.
Here are some more examples of statements and non‐statements :
(1) “It rained yesterday in Auckland, New Zealand.” Again, this is a statement,
as it is either true or false.
(2) “Go home!” and “What is your name?” These are not statements, as it does
not make sense to say that they are true or false.
(3) “If 𝑥 3, then 𝑥 9.” This is certainly true, so it is a statement. We will
have more to say about “If … then …” statements later.
(4) “If 𝑥 3, then 𝑥 4.” This is certainly false, so it is a statement. There is
no requirement for statements to be true!
(5) “The sum of two odd numbers is an even number.” This is certainly true, so it
is a statement.
From now on, we will only be working with statements and relationships between
statements. We shall try to keep to the convention that we write all our logical
statements using italics when they are in words and as bold letters when a
statement is indicated by a letter [e.g. A, B, etc.]. Later we shall use bold for some
terms to help us see how they fit into sentences.
Now we know what we mean by a statement, we shall pause to dig a little deeper
into the sorts of statements you might meet and how we discern their truth or
falsity. Here is a statement:
24 is divisible by 2
This statement says something that is true and cannot be false, so it is an example of
a statement we know to be true just by looking at it. Here is another example:
This statement is very much like the first statement [24 is divisible by 2] in that it is
true. However, it is not as obvious as the first statement and some work needs to be
done to show why it must be true. Later we shall see how we can set out a proof to
show that this statement is true.
is definitely true even though each of the expressions that we have combined to
make the bigger statement cannot be said to be true or false by themselves.
those that are true or false, but which need some work to decide which;
We shall spend a lot of time building new statements out of basic statements.
In what follows we shall tend to learn how various logical rules work by dealing with
statements denoted just by letters – such as A or B or P or Q ‐ but then we shall
apply these rules to statements that have definite truth values. This is a little like
learning about quadratic equations by studying various things about
𝑎𝑥 𝑏𝑥 𝑐 0 and then applying what you discover to specific examples.
Truth values
In what follows we shall talk a lot about the “truth value” of a statement. By “truth
value” we simply mean whether the statement is true or false. For instance, the
truth value of the statement 2 is an even number is “true”, and the truth value of the
statement 2 is an odd number is “false”.
Logically equivalent
We shall often say that two statements are logically equivalent. This will mean that
the two statements have the same truth values in the same circumstances.3
3
This is a slightly casual definition, but it will suffice for these notes.
For instance, the following two statements are logically equivalent:
Today is Tuesday
Introduction
As we discussed briefly above, mathematics is in part about seeing how the truth or
falsity of one statement relates to the truth or falsity of other statements. To help us
begin to understand these relationships we shall learn how to build new (compound)
statements by formally combining other statements, and we shall learn how the
truth or falsity of the combinations depends on the truth or falsity of the statements
that we use to build them.
Before we begin to unpack compound statements in detail, here are some examples
of formal combinations of statements with the statements written in italics and the
formal ‘combining terms’ written in bold:
21 is divisible by 3 or 21 is divisible by 6 [A or B]
21 is divisible by 3 if 21 is divisible by 6 [A if B]
Exercise A:
1. Decide which of the above combinations you think must be true and which
must be false. Can you explain your answers?
2. What, if anything, happens to your answers if you replace 21 by 𝑥 in each of
the statements [assume 𝑥 can be drawn from the set of real numbers]?
When you replace 21 by x, are all the resulting expressions still statements ?
3. What happens to your answer to 2 if you change the set of 𝑥 values to which
the statements apply?
The negation of a statement: the term not
In this section we shall look at using not with statements. The formal use of not in
logic is very similar to the everyday use of the term ‘not’ so you will already have a
good intuitive grasp of how not works.
Formally, if we have a statement A then we can construct another statement from it,
which we shall write as not A, the negation of A. For instance:
A: 21 is divisible by 3
not A: not [21 is divisible by 3]
You should note that in formal logic, not applies only to what occurs immediately
after it unless there are brackets: so not A or B means (not A) or B and, as you will
find out later, this is different from not (A or B).
Here we shall learn how to understand the negation of a statement and the
relationship between the truth value of a statement and its negation.
Example:
29 is a prime number
So we have:
A: 29 is a prime number
Here it is obvious that A is true and not A is false, and this is a general property of
not: it changes true statements into false ones, and it changes false statements to
true ones. This rule will always work because, recall, we take statements to be
always either true or false [the law of the excluded middle] by definition.
We can display the way not works for general statements in one of two ways [in fact,
there are other ways but we shall stick to just two ways here]. We can either draw
out a ‘truth table’ or we can draw a picture. Let’s start with the truth table:
A not A
T F
F T
Here T is shorthand for “true” and F is shorthand for “false”. The first line in the table
tells us that whenever A is true then not A is false, while the second line in the table
tells us that whenever A is false then not A is true.
We can also think about A and not A using diagrams. The diagrams we will use come
from set theory – they are Venn diagrams – and you might have met them when
studying probability. The diagrams we use are less formal than truth tables and have
a slightly different emphasis – they tend to be useful mostly when talking about
general statements, although they can also be useful when thinking through
examples with statements that have definite truth values. Here the diagrams are
primarily intended to help you think about things.
In the diagrams that follow you should think of the area inside the A circle as
representing all the cases where A is true. And that means you should think of the
area outside the circle as representing all the cases when A is false; that is, all the
cases where not A is true. We shall use the convention that each shaded area in a
diagram shows where one particular statement is true: A is true inside the A circle
and not A is true outside the A circle. We shall write what area is shaded [and so
what area is true] under each diagram. Here are a couple of examples:
A
A
not A
If you know some set theory, then you can think of the circle A as representing the
set where A is true, so then not A is like the complement of that set. Similarly, if you
know about events in probability, then you can think of A as an event and not A as
the complementary event A’ – the event that A does not occur.
Exercise B:
1. If A is true, what can you say about not not A? What about not not not A?
2. Can you work out a general rule for the truth value of not not not….not A [𝑚
lots of not] when A is true, and when A is false?
Combining statements: using and
In this section we shall look at the logical term and. The word “and” appears all over
the place in everyday English. However, the use of “and” in logic is very precise ‐
perhaps more so than in colloquial English ‐ so you will need to be a little careful
when you use the logical version of “and”.
A: 21 is divisible by 3
B: all humans are mammals
In general, the statement A and B is true if each of A and B are true, and it is false if
at least one of the statements is false. We could write this up as a table4:
A B A and B
T T T
T F F
F T F
F F F
Recall, here we have written T as shorthand for “true” and F for “false”. The table
shows that for A and B to be true both A and B must be true.
Consider the statement: the monarch is a man and the Prince of Wales is
called William. Each of the parts the monarch is a man, and the Prince of
Wales is called William is true, so the whole statement is true. (At least this is
the case in the UK at the time of writing these notes.)
4
These, very useful, tables are called “truth tables”. They were introduced by the
philosopher Ludwig Wittgenstein in his book Tractatus Logico‐Philosophicus. We do
not use truth tables officially in the TMUA [they are not part of the test’s official
specification] so there will not be questions that depend on using them or knowing
about them. Nevertheless, truth tables are very useful, and we recommend that you
make sure you are familiar with them.
We can also think of the statement A and B using our diagrams. Remember that
everything inside the A circle is where A is true and everything inside the B circle is
where B is true. A and B is true when both A and B are true. So, A and B is
represented by the overlap of the A circle and the B circle:
A B
A and B
If you know set theory, you can think of A and B as being like A ∩ B [A intersect B] in
diagrams. Similarly, in the language of probability, you can think of A and B as the
event that both A and B occur (also written as A ∩ B).
The next way we might want to combine two statements is with the word “or”.
There are two possible meanings of this word. In general usage, “A or B” is often
understood to mean “either A is true, or B is true, but not both”. For instance, in
general usage we might hear things like “you can have jam roly‐poly or a mille feuille
for pudding” and we would usually take that to mean we could have one or the
other pudding but not both. This type of “or” is sometimes called an “exclusive or”
[this is often written as XOR, but we will not be using XOR at all in these notes or in
the TMUA]. However, mathematicians take the word “or” to mean “inclusive or”, so
that A or B means “either A is true, or B is true, or both are true”. Over the years, it
has been found to be much more convenient to use this version of “or” rather than
the “exclusive or”. When mathematicians want to mean exclusive or, they are
explicit about it, and write “either A is true, or B is true, but not both”. When they
just write “or” in a mathematical statement, they always mean “inclusive or”. This is
the meaning of “or” ‐ which we shall write in bold as or ‐ that will be used in the
admission test.
We can again write a truth table to show this:
A B A or B
T T T
T F T
F T T
F F F
For example, the statement the monarch is a man or the Prince of Wales is called
William is a [mathematically] true statement, even though it sounds a little strange
colloquially.
We can look at or using our diagrams. A or B is true when we are either inside A or
inside B or inside both. So, A or B is represented by the shaded region in the
following diagram:
A B
A or B
In set theory terms, A or B is like A ∪ B [A union B] and in probability terms, it is like
the event that either A or B or both occur, also written as A ∪ B.
Exercise C:
What do you notice? What do you think you can conclude about
A and B and C?
3. Revisit question 2 above but this time use diagrams to justify your
conclusion.
A or (B or C)
(A or B) or C
What do you notice? What do you think you can conclude about A or B or C?
5. Revisit question 4 but this time use diagrams to justify your conclusions.
A or (B and C)
(A or B) and (A or C)
What do you notice? Can you justify your conclusions using diagrams?
8. How do your results for questions 6 and 7 compare with the arithmetic
operations of multiplication and addition?
not (A or B)
What do you notice? Can you justify your conclusions using diagrams?
11. Can you come up with an alternative [logically equivalent] way of writing not
(A and B)? Justify your alternative statement using both truth tables and
diagrams.
Revisiting logical equivalence
“We shall often say that two statements are logically equivalent. This will mean that
the two statements have the same truth values in the same circumstances.”
From the above Exercise C you should have noticed that A or (B and C) and (A or B)
and (A or C) have the very same truth tables – each expression is true or is false in
the same way once you are given the truth values of A, B and C. When two
expressions match up in their truth tables in this way, we say that they are “logically
equivalent”. And so, identity of truth tables is another way to think about logical
equivalence.
We can also use logical equivalence to understand A or B or C and A and B and C.
We take it that the statement A or B or C is logically equivalent to either (A or B) or C
or to A or (B or C). We can do the same thing for A and B and C. We can justify this
as there is no ambiguity when we break A or B or C into statements that are of the
form “…or…” ; that is we can take the statement A or B or C and interpret it as
either saying (A or B) or C or as saying A or (B or C); in both cases we get the same
answers for the same truth values of A, B and C. And, we have to work this way –
i.e. breaking the statements down using brackets ‐ because we have only defined
“or” in situations of the form … or …
You should also note that A or B and B or A are logically equivalent [can you explain
why?] and also A and B and B and A are logically equivalent [again, can you explain
why?]
You should start to build up a good grasp of when combinations of statement are
logically equivalent: when can you swap the order of statements [for instance, A or
B vs B or A], when can you remove brackets, when can’t you remove brackets, how
do you deal with brackets using or and and .
Negating compound statements
Arg4: Be able to negate statements that use any of the above terms.
Negating more complicated statements can be tricky, and truth tables can often
help. For example, what is the negation of A and B? It is not (A and B), but that use
of brackets looks a little odd, and it would be tricky to write this as a sentence in
English! We can write a truth table for this situation:
Which table have we seen earlier which has three trues and one false in the final
column? It was the or table, so it seems that not (A and B) is actually an or
statement. To get false in an or statement, we need both parts to be false. If we
consider (not A) or (not B), both of the parts are false in just the first row, giving the
same resulting table:
So not (A and B) is the same as (not A) or (not B). And by “the same” we mean they
have the same truth values for any given truth values of A and B; recall that
sometimes we say that two statements that have the same truth tables are logically
equivalent, or just equivalent.
is
5
Here we are assuming 𝑥 is an integer but we haven’t explicitly mentioned it. Later
we will look at quantification which deals with this sort of issue formally.
𝑥 is odd or 𝑥 is not prime.
A B A or B not (A or B)
T T T F
T F T F
F T T F
F F F T
Which table have we seen earlier which has one true (T) and three falses (F) in the
final column? It was the and table, so it looks like not (A or B) is actually an and
statement. If we consider (not A) and (not B), we get exactly the same table:
So not (A or B) is the same as (not A) and (not B). And, again, by “same” we mean
they have the same truth values for any given truth values of A and B; they are
logically equivalent.
Exercise D:
We now turn to look at the part of the specification that involves the word “if”.
Before we start to look at how we might understand the formal ideas behind
statements that involve “if” in various ways, we shall step sideways to examine how
we deal with “if” in everyday English as this will help us when we come to look at the
way “if” statements are unpacked in logic.
Before we start to look at each statement in turn, take a moment to think through
what you would understand by each one. Ask yourself: what you would know if the
statement is true and it is Sunday; ask yourself what you would know if the
statement is true and the bells ring; ask yourself what you can claim about the bells
if the statement is true and it is not Sunday; and ask yourself what you can claim
about the day if the statement is true and the bells don’t ring.
Let’s start to look at each statement in turn to see if we can work out what it is
telling us and what it is not telling us. In each case we shall assume the statement is
true. We start with:
First, we ask what does it tell us if we know it is Sunday? It tells us that the church
bells will ring. What, then does it tell us about the church bells if it is not Sunday? It
tells us nothing; and it tells us nothing because it doesn’t tell us about whether the
church bells will ring on Wednesday or on Tuesday and so on.
What can we say if we know statement i is true and we hear the church bells? Can
we say it must be Sunday? The answer is we cannot say it is Sunday. We cannot say
it is Sunday as the bells might ring on Tuesday or Wednesday so hearing the bells
ring is, according to statement i, not enough to tell us what the day is. Finally, what
can we determine about the day if the bells do NOT ring? The answer is that we can
tell it is NOT Sunday. We can tell it is not Sunday because, if it were Sunday then the
bells definitely would ring.
We can summarise these findings as follows:
We can repeat this process for each of the other sentences. We shall summarise the
results in a series of tables but take some time to study each one to check it matches
any conclusions you have drawn. Some of the examples take some time to think
through, particularly statement iii:
Here we note that the tables for each of statements i and ii are identical. The two
statements are logically equivalent. That is to say, we take it that If it is Sunday, then
the church bells ring says the very same thing as The church bells ring if it is Sunday.
We shall say some more about this below when we start to look at “if” statements
formally.
So far we have learnt how to use the formal terms not, and and or. In this section we
shall look at statements of the form “if…then…”. In the previous section we looked
informally at this sort of statement when we examined if it is Sunday, then the
church bells ring and other similar statements. However, we need to be very careful
as there aren’t definitive rules as to how to interpret these sorts of statements in
everyday English, whereas in logic the meaning is precise.
For example, suppose that someone says the statement if it is raining then I will use
my umbrella. In everyday English, this sentence would be understood with one of
the following two meanings:
If it is raining, I will use my umbrella, while if it is not raining, then I will not
use my umbrella.
If it is raining, I will use my umbrella, while it says nothing at all about what
will happen if it is not raining.
In logic, the statement if A then B means that if A is true, then B must also be true.
But what if A is false? What can we say then? In everyday English, different
meanings might be understood depending upon the exact sentence and context.
But in mathematical logic, this statement has a precise meaning, namely:
Thus, the only way that if A then B can be false is if A is true and B is false.
A B if A then B
T T T
T F F
F T T
F F T
We can look at if A then B in a diagram by shading all the areas that make if A then B
true:
A B
if A then B
Finally, here are some examples of mathematical statements of the form if A then B:
1. Notice that the truth table for if A then B has three Trues and one False in
the final column. Can you guess how if A then B might be written in terms of
some or all of and, or, and not? Once you have written out your guesses for if
A then B using and, or and not, can you justify that they have the same truth
table as if A then B? Can you justify your answer using diagrams?
2. What can you say about the truth of:
if A then (A or B)
if A then (A and B)
Equivalent statement for if A then B using not, or, and and
In the exercise above we asked you to work out if you could express if A then B in an
equivalent form using the logical terms not, or and and. In this section we shall
explore this a little further as it will be useful for us later.
A B if A then B
T T T
T F F
F T T
F F T
The final column in this table is similar to the final column of an or table. This
suggests that if A then B is equivalent to some statement involving or, but the
difficulty is to find the correct or statement using statement A and statement B. We
can get a clue from looking at the row in the table where if A then B is false: the only
situation where an or statement can be false is when both the statements that make
the or statement are false. Looking at the row in the table where if A then B is false,
we can see that A is true and B is false so if we could replace the T under A with an F
in this row, we would have the correct line in an or table. The way to achieve this is
to replace A by not A. This all suggests that if A then B is equivalent to (not A) or B.
Let us construct the truth table for not A or B 6 and see if it gives us the same table
as for if A then B:
A B not A not A or B
T T F T
T F F F
F T T T
F F T T
We can see that the two tables do give the same results, so we have shown that
6
Recall, earlier we mentioned that not only ever applies to what immediately
follows it; so here, instead of writing (not A) or B we can write not A or B as there is
no ambiguity.
Exercise F:
1. Show, using truth tables, that not (A and not B) is equivalent to not A or B.
2. Show, using truth tables, that if A then B is equivalent to not (A and not B).
3. Find [logically] equivalent statements for each of the following:
a. if 𝑥 1 then 𝑥 1
b. if two triangles are similar then they have the same angles as each other
c. if a triangle obeys Pythagoras’ theorem then it has a right angle
Combining statements: A only if B
Above we met statements of the form if A then B (or equivalently B if A); now we
are going to look at statements of the form A only if B.
It is hard to untangle the everyday use of the term “only if” from the formal logical
use of only if. Earlier we asked you to work out what you thought the statement it is
Sunday only if the church bells ring told you. There you might have noticed that this
statement had the same table of conclusions as the statement if it is Sunday, then
the church bells ring. This motivates what is the case in formal logic: statements of
the form A only if B are logically equivalent to statements of the form if A then B.
if 𝑥 3, then 𝑥 9
𝑥 3 only if 𝑥 9
A B A only if B
T T T
T F F
F T T
F F T
Let’s draw a diagram for A only if B to show where it is true:
A B
A only if B
(A if B) and (A only if B)
and
Now we know this, we can use all the rules we have learnt above to construct a truth
table to work out when this statement is true and when it is false:
T T T T T
T F T F F
F T F T F
F F T T T
From this we can see that A iff B is true when A and B are both true or when A and B
are both false. That is to say that A iff B is true only when A and B always say the
same thing – they are true together and false together. This is why proving A iff B is
so important for mathematics as it is a way of telling us that two statements that
might appear different are really saying the same thing from a mathematical point of
view. For instance:
where ⌊𝑥⌋ is the greatest integer less than or equal to 𝑥 and ⌈𝑥⌉ is the smallest
integer greater than or equal to 𝑥. And here is another example:
A B
A if and only if B
Exercise G:
1. Draw the diagrams for if A then B [A only if B] and for if B then A [A if B] and
then use these two diagrams and the rules for and with diagrams to work out
the diagram for A iff B.
Swapping A and B
One thing we have not examined much so far is what happens to each of the logical
statements we have examined when we swap A with B. In this section we shall
briefly examine this.
First, we look at A and B. The question we want to ask is whether A and B is the
same as B and A; and by ‘the same’ we mean logically equivalent, that A and B has
the same truth value as B and A for any given truth values of A and of B. The simple
answer is ‘yes’ and this should be obvious from the way we defined A and B: our
definition was independent of the order of A and B.
Exercise H:
1. Examine the truth tables for A and B and convince yourself that A and B and
B and A are the same. Look at the diagram we drew for A and B and work out
what the diagram for B and A would look like.
What about if A then B? Does if A then B have the same truth table as if B then A?
The simple answer is ‘no’ and we demonstrate this either by looking at the
respective truth tables or drawing the respective diagrams. Let’s look at the truth
table:
A B if A then B if B then A
T T T T
T F F T
F T T F
F F T T
From this we can see that the last two columns are different, so the two statements
are not the same.
Let’s look at if A then B and if B then A in a little more detail. It’s a common error
when students are first learning logic to think that one statement is the same [has
the same truth profile] as the other. For instance, we might start with the statement:
if 0 𝑎 𝑏 then 𝑎 𝑏
and it is then tempting to say that this is the same as:
if 𝑎 𝑏 then 0 𝑎 𝑏
but a little thought shows that they are not equivalent statements. The first is always
true no matter what real values of 𝑎 and 𝑏 we substitute, whilst the second is false
as there are some values of 𝑎 and 𝑏 which make it false. For instance, if we set 𝑎
1 and 𝑏 2 then 𝑎 𝑏 but it’s not the case that 0 𝑎 𝑏.
Here it is worth pausing for a moment to examine how we have dealt with our
example. What do we do when we look at a statement such as if 0 𝑎 𝑏 then
𝑎 𝑏 ? First, we realise that what we have written, namely if 0 𝑎 𝑏 then
𝑎 𝑏 is shorthand for something a little more precise – we ignored the extra bits
above to avoid overloading you with information. What extra information have we
ignored here? Well, really the statement if 0 𝑎 𝑏 then 𝑎 𝑏 should tell us
what values of a and b it applies to; we ought to write:
Later we shall say a little more about phrases such as “for all”.
With the statement now written out in full, we can return to dealing with the
statement: we ask ourselves what happens to the statement when the left‐hand side
is true and when it is false – do we always find the whole statement is true no
matter what allowed values of 𝑎 and 𝑏 we substitute into the statement? In the case
of if 0 𝑎 𝑏 then 𝑎 𝑏 we see that whenever we have values of 𝑎 and 𝑏 that
obey [make true] 0 𝑎 𝑏 then those same values of 𝑎 and 𝑏 must also make the
right‐hand side – the expression 𝑎 𝑏 – true. So, to say it again, the statement for
all real values of a and b, if 0 𝑎 𝑏 then 𝑎 𝑏 is always true.
Now we can return to our main theme: we now consider what happens when we
swap A with B in the statement A only if B. Again, we can look at the truth table or
diagrams to decide whether A only if B is the same as B only if A:
A B A only if B B only if A
T T T T
T F F T
F T T F
F F T T
It is clear from the truth table that the two statements are not the same – they are
not logically equivalent.
Exercise I:
1. Draw diagrams for A only if B and for B only if A to convince yourself they
have different truth profiles.
2. Look at diagrams for all of the following together:
A or B
A and B
if A then B
A only if B
Examine the symmetry of the diagrams. What do you notice about the cases
that remain unchanged when you swap A and B and what do you notice
about the symmetry of those cases that have different truth tables when you
swap A and B?
3. Using your answer to 2, what can you say about A iff B and B iff A, are they
the same ‐ do they have the same truth tables for a given A and B? [Do this
before reading the next section.]
Finally, we shall look at the statement A iff B and compare it with the statement B iff
A. Recall that when we first met A iff B we said it was a statement that appears a lot
in mathematics because it tells us that A and B are saying the same thing – when A is
true then B is true and vice versa. We can examine whether A iff B and B iff A say
the same thing by looking at truth tables:
A B A iff B B iff A
T T T T
T F F F
F T F F
F F T T
As an aside, we can also look at how we construct the diagram of A iff B from (if A
then B) and (if B then A).
A B
if A then B
A B
if B then A
Then recall that and means we shade only those areas that are shaded on both
diagrams. When we do this, we get:
A B
A if and only if B
And we note that the diagram is symmetric in that it does not matter which circle we
label A and which we label B. Symmetry of diagrams is one way of spotting when the
A and the B can be swapped in a statement without changing the [logical] meaning
of the statement.
Summary
Statements
Same/logically equivalent
Two statements are the same – logically equivalent – when they have
identical truth tables. Or more informally: they are true and false in the same
way.
not A
A and B
True when either A or B or both are true – i.e., true when at least one of the
two statements A, B, is true.
Symmetry: A or B is logically equivalent to B or A
(A or B) or C is logically equivalent to A or (B or C) and is also logically
equivalent to A or B or C
Truth table:
A B A or B
T T T
T F T
F T T
F F F
Negating compound statements:
if A then B
A if and only if B
T T T T T
T F T F F
F T F T F
F F T T T
CONVERSES AND CONTRAPOSITIVES
Converse
Some of the statements we have met above have what is known as a converse. We
shall start this section by giving you the converses of a number of statements. Have a
look at each example and try to work out how you think we form the converse of a
statement. Here are the examples:
Statement Converse
if a and b are odd, then ab is odd if ab is odd, then a and b are odd
if a and b are even, then ab is even if ab is even, then a and b are even
if a is even, then a 2 is even if a 2 is even, then a is even
if a is odd, then a 2 is odd if a 2 is odd, then a is odd
if a and b are even, then a b is even if a b is even, then a and b are even
if a and b are odd, then a b is odd if a b is odd, then a and b are odd
Now we shall set out a table of the converses that are relevant to this specification:
Statement Converse
if A then B if B then A
A only if B B only if A
A if B B if A
A iff B B iff A
From this table you can see that the converse of a statement is constructed by
“swapping” A with B. We have already examined the truth tables of each of the
above statements and their converses in earlier sections and we concluded:
if A then B and its converse if B then A do NOT say the same thing: they are
NOT equivalent statements
A only if B and its converse B only if A do NOT say the same thing: they are
NOT equivalent statements
A if B and its converse, B if A do NOT say the same thing: they are NOT
equivalent statements
A iff B and its converse B iff A do say the same thing: they are equivalent
statements
We can rewrite the table to include logically equivalent statements:
Statement Converse
if A then B if B then A
A only if B B only if A
B if A A if B
A iff B B iff A
B iff A A iff B
Exercise J:
1. Look back at all the statements we have used as examples so far and write
out their converses. How many of the converses are true?
2. What is the converse of the converse of a statement?
3. What is the converse of each of the following:
a. if two triangles are congruent then they have the same area
b. if two triangles are similar then they have the same internal angles
c. if I am human then I am mortal [a classic example from philosophy]
d. if I am a bachelor then I am an unmarried man [another example from
philosophy: if you are interested in exploring further, look up analytic
and synthetic statements; and if you want to explore much more broadly,
you could also look at a priori and a posteriori knowledge, as well as the
notion of necessity from a philosophical perspective].
4. Which of the converses you have written out for question 3 are true?
Contrapositive
We have learnt that a statement and its converse are not always the same thing. A
natural follow‐up question to ask is what statements are there that are the same as
those we have met – the answer is found in the contrapositive of a statement. We
shall start by listing the contrapositives that are relevant to this specification, and
then we shall examine them in a little more detail:
Statement Contrapositive
if A then B if not B then not A
A only if B not B only if not A
A iff B not B iff not A
In each of these, A and B are both swapped and negated, whereas in the converse,
they were simply swapped. (There is also a third possibility, called the inverse of a
statement, where A and B are both negated, but not swapped. We will not consider
inverses further here.)
From this we can see that if A then B and its contrapositive, if not B then not A, are
logically equivalent statements.
From this we can see that A only if B and its contrapositive, not B only if not A, are
logically equivalent statements.
Here are a few practical examples of statements and their contrapositives – for each
one check you can see why they are equivalent statements and look carefully at how
not is used in some of the examples:
if 𝑥 2 then 𝑥 4 , if 𝑥 4 then 𝑥 2
if 𝑥 4 then 𝑥 2 , if 𝑥 2 then 𝑥 4
if two triangles have the same angles as each other then they are similar
if two triangles are not similar, then they do not have the same angles as
each other
Exercise K:
1. Look at all the conditional statements that we have set out so far [i.e. all
those involving ‘if’ in one way or another; that is: if… then…, …iff…, …only
if…] and work out what their contrapositives say. Can you see, in each case,
why the contrapositive is logically equivalent to the original statement?
2. What is the contrapositive of the converse of the statement if A then B? Are
if A then B and the contrapositive of its converse logically equivalent?
3. What is the converse of the contrapositive of the statement if A then B? Are
if A then B and the converse of the contrapositive logically equivalent?
4. What is the contrapositive of if 𝑎 and 𝑏 are odd, then 𝑎𝑏 is odd?
5. Why is it a mistake to write the contrapositive of if 𝑎 and 𝑏 are odd, then 𝑎𝑏
is odd as if 𝑎𝑏 is not odd then 𝑎 and 𝑏 are not odd?
Before you read on, make sure you have completed Exercise K questions 4 and 5
above.
The reason for this mistake is, of course, that negation is not as simple as it seems –
here we need to use not (A and B) is logically equivalent to not A or not B.
AN OFF‐SPECIFICATION ASIDE
Symbols
We have now finished looking at the main areas of logic listed in the specification;
we have still to look at the notions of necessity, sufficiency and the meaning of some
statements such as for all, for some and there exists and we shall return to these
below. In this section we shall briefly look at how what we have learnt above is
expressed using symbols. We are adding this because it is useful to know how we
can write everything we have met using symbols. You should note, however, that the
examination will NOT test your ability to use these symbols and these symbols will
NOT appear in any of the questions that we set – so, if you want, it is fine to skip this
section. Here is a table of common symbols used in formal logic:
Exercise L:
1. Revisit some [or all] of the statements we have met so far in these notes and
rewrite them using the symbols above.
2. If you have met electronic circuits, you will probably have met variants on
some of these such as A xor B, A nand B and so on. We will not look at these
here but, if you have met them, it would be a useful exercise to examine how
they fit with everything we have looked at.
Necessary and Sufficient
The terms necessary and sufficient turn up a lot in mathematics. You might, for
instance, have seen things like:
For two triangles to be congruent it is sufficient that they have two equal
sides and the enclosed angle in common.
Or:
For two triangles to be similar it is necessary, but not sufficient, that they
have an angle in common.
Or you might have seen parts of questions that say something like:
𝑔 𝑘 3 ℎ 𝑔𝑘
to hold
In this section, we shall explain how mathematicians use the term necessary and the
term sufficient. We need to explain them as they have subtly different features from
their everyday uses; the good thing is we have met the notions already, we just
didn’t refer to them as necessity and sufficiency.
A is sufficient for B means exactly the same as if A then B. Usually we think of this as
follows: A is sufficient for B if we can say that when A is true then we are
guaranteed that B is true as well. And further, we need to note that if A is sufficient
for B and we find that A is actually false, we cannot say whether B is true or false ‐ as
there might be cases where B is true and A is false.
The best way to think about A is sufficient for B is to think of it as saying that when
we know A is true then we are guaranteed that B is true [and also remember that we
cannot say anything about B when we are told A is false].
Here is an example:
𝑥 is an odd natural number greater than 1 and not divisible by any natural
number other than 1 and itself is sufficient for 𝑥 to be prime.
if 𝑥 is an odd natural number greater than 1 and not divisible by any natural
number other than 1 and itself then 𝑥 is prime.
is true. It is useful to note here that there is a case where 𝑥 is an odd natural number
greater than 1 and not divisible by any number other than 1 and itself is false but 𝑥 is
prime is true: i.e., the case 𝑥 2. This is fine, though, as it does not make the
statement itself false [check the truth table for if A then B] and, what is more, it
illustrates the point we made above: there we said ‘there might be cases where B is
true and A is false’ and here we have a case of this when 𝑥 2.
Now necessity: in simple terms we say that A is necessary for B when if B then A, or
equivalently A if B, is true. Usually, we think of this as follows: A is necessary for B if
we can say that when B is true then we are guaranteed that A is true as well and if A
is false then B must be false as well. And further, as before, we need to note that if A
is necessary for B and we find that B is actually false, we cannot say whether A is
true or false: there might be cases where A is true and B is false.
two triangles having one side of the same length is necessary for the two
triangles to be congruent.
We can see that this necessity condition is quite weak. It tells us something about
congruence but not enough to guarantee that two triangles are congruent – two
triangles each having one side of the same length is not sufficient to guarantee they
are congruent!
We can now look at the term necessary and sufficient. From what we have written
so far, it should be clear that if we write A is necessary and sufficient for B, then we
mean A iff B. In other words, we mean that when A is true B is true, and vice versa,
and when A is false then B is false, and vice versa.
Here is an example:
two triangles having the same three angles is a necessary and sufficient
condition for the two triangles to be similar.
So, to summarise:
if you are asked for a sufficient condition for B to be true then you need to
look for a condition that guarantees to make B true.
if you are asked for a necessary condition for B to be true then you need to
look for something that must be the case for B to be true but might not be
enough by itself to guarantee that B is true.
And if you are asked to find necessary and sufficient conditions for B then you need
to look for something that guarantees the truth of B in all circumstances: that is,
when your condition is true then B is true, and vice versa, and when your condition
is false then B is false, and vice versa.
We can also think about necessity and sufficiency using a diagram. This diagram is
slightly different from the diagrams we used earlier – although there are some
connections between them – so it is best to look at these diagrams in isolation and
treat them as a way of helping you grasp the notions of necessity and sufficiency.
Using the diagram, we can see that A is sufficient for B; that is to say, if we are inside
the A circle then we must be inside the B circle too. Note that whilst A is sufficient
for B, there are cases where we can be inside the B circle but outside the A circle;
that is to say that even if A is false there is still the possibility that B is true – you
should reconcile this with your formal understanding of A is sufficient for B, i.e. with
if A then B which is also written as A ⟹ B
A
B
Another way of looking at this second diagram is to think about necessity: the
diagram shows us that A is necessary for B; that is to say, we must be inside the A
circle in order to have any chance of being inside the B circle. What is important to
note here though is that being inside the A circle is not enough [i.e. is not sufficient]
by itself to guarantee we are also inside the B circle. So, we need A in order for B to
be true, but A alone is not enough to guarantee B is true – that is what necessity is
all about.
Let us finish here by summarising the notions of necessity and sufficiency in tables:
Arg3: Understand and use the terms for all, for some (meaning for at least one),
and there exists.
if 0 𝑎 𝑏 then 𝑎 𝑏
we wrote:
In this section we explore phrases such as for all, for some and there exists in more
detail.
This is clearly a true statement but what is important to notice for this section is the
phrase “for all”. This phrase tells us what our statement applies to – in this case it
tells us that the statement, 𝑥 0, applies to all real numbers. But why do we need
to specify what a statement refers to? The reason is that if we don’t there might be
scope for confusion or ambiguity and mathematics doesn’t like confusion or
ambiguity. Here is another example:
𝑥 is an integer
Now this is sometimes true and sometimes false, for instance it is true when 𝑥 7
and it is false when 𝑥 0.5. However, if we write:
it is not true because there are some real 𝑥 values for which 𝑥 is not an integer, for
instance 𝑥 0.5
Two things are important to note here:
Sometimes, in place of “for all” we can write “for every” or “for each” so we can take
a statement such as
or
for each integer 𝑥, 𝑥 is an integer
Mathematicians also like to assert that something [some mathematical thing, like a
number or a function etc.] can be found to make something true, in these cases they
tend to use the term “there exists” [usually along with the phrase ‘such that’]. For
instance:
Sometimes we might find that a “there exists” statement is actually false; for
instance:
Sometimes, in place of there exists we can write for some or for at least one so we
can take a statement such as:
When you see the phrase for all 𝑥 … you can think of it as telling you that you
can pick ANY 𝑥 you want from the given set of 𝑥′s and then the
corresponding statement will be true. The phrase is telling you that every
value of 𝑥 makes the statement true.
And when you see the phrase there exists an 𝑥 such that… you can think of it
as issuing a challenge: you are challenged to FIND an 𝑥 that makes the
statement that the phrase is applied to true. The phrase is telling you that
there is at least one 𝑥 that makes the statement true.
Be aware that there exists does not mean that there are any values for which the
corresponding statement is false. For example, the statement
Exercise M:
Arg3: Understand and use the terms for all, for some (meaning for at least one),
and there exists
You will often encounter statements in university mathematics that include both the
phrase for all and the phrase there exists. When this happens the order in which
they appear is very important. Here are a couple of statements to illustrate how
important the order is:
S1: for all positive real 𝑥 there exists a real 𝑦 such that 𝑦 𝑥
S2: there exists a real 𝑦 such that for all positive real 𝑥, 𝑦 𝑥
A little thought will show you that S1 is true but S2 is false. Let us explore why:
S1 is telling us that if we pick any positive 𝑥 value then we can always find a 𝑦 value
for that 𝑥 value that obeys the equation 𝑦 𝑥. In other words, we pick any positive
𝑥 value first and then look about to see if we can find a 𝑦 value to go with our
chosen 𝑥 value – and we always can find such a 𝑦 value so S1 is true. It is useful to
note that different choices of 𝑥 value have different 𝑦 values associated with them
and this is allowed by S1.
S2 is telling us that we can find one value of 𝑦 such that 𝑦 𝑥 no matter what 𝑥
value we choose from the positive reals. This is clearly not true. Here the difference
is that we are challenged to pick a 𝑦 value so that our chosen 𝑦 value then satisfies
the test set by the second bit of the statement – we need to test that for our chosen
𝑦 value it is true that 𝑦 𝑥 for all positive 𝑥 values. In other words, to make the
statement true we need to find at least one 𝑦 value such that this one 𝑦 value obeys
all the following [and many more!]: 𝑦 1, 𝑦 2, 𝑦 3, 𝑦 𝜋, …
What we take from these two examples is that the order of the phrases for all and
there exists is important when they occur together and we have to respect the order
in which they appear.7 Only once we have dealt with the first phrase can we then
deal with the second phrase in light of what the first phrase has told us.
And a final note: sometimes mathematicians write the phrase “for all real 𝑥” (or
similar) at the end of a statement instead of at the start, to emphasise the
embedded statement, for example:
7
There are alternative logics [which do NOT appear in the TMUA!] where the
ordering of the quantifiers is dealt with differently; look up “independence friendly
logic”.
This is fine for one occurrence of for all, but if it is mixed with for some or there
exists in the same statement, then confusion will result, so it is very unwise to do
this.
Exercise N:
Arg3: Understand and use the terms for all, for some (meaning for at least one),
and there exists.
Earlier we saw what happens when we negated [that is, put not in front of]
statements such as A and B, A or B and so on. A natural question to ask is what
happens when we use not together with for all and there exists. In this section we
shall explore this. Before we begin we should mention again that we tend not just to
write “not” in front of statements but translate them into more palatable English:
here we shall say “it is not the case that…” in place of not by itself.
N2: it is not the case that there exists a real 𝑥 such that 𝑥 0
What we want to do is see if we can translate N1 and N2 in some way into a simpler
statement. We start with N1: what does N1 say? It says that it’s not true that 𝑥 6
for all real 𝑥 values; in other words, it is telling is that there must be some 𝑥 value for
which it is not true that 𝑥 6. And in this case, we can easily find such an 𝑥, for
instance 𝑥 2. So we now have two equivalent ways of writing out N1:
Let’s look more carefully at these two versions of N1 to see if we can understand
their general structure:
We can actually go further with N1new, by translating “𝑥 6 is not the case” into a
simpler statement. If 𝑥 6 is not the case, then we must have 𝑥 6, so N1
finally becomes
N1newest: there exists a real 𝑥 such that 𝑥 6
Now let’s look at N2: What does N2 say? It says that no matter how hard we look we
will never find a real 𝑥 value that makes 𝑥 0 true. In other words, for every real 𝑥
value the statement 𝑥 0 must be false; or, we could say that for every real 𝑥
value it is not the case that 𝑥 0. So, we now have two equivalent ways of writing
out N2:
N2old: it is not the case that there exists a real 𝑥 such that 𝑥 0
Let’s look more carefully at these two versions of N2 to see if we can understand
their general structure:
Again, we can simplify our N2new statement one further step to get
Whilst you are not expected to know, and won’t be tested on, the symbols used for
the phrases for all and there exists, it is useful to know what they are and see how
the above examples can be translated using these symbols. In this section we shall
look, briefly, at the symbolism. In addition, it is worth noting that mathematicians
call the phrases for all and there exists quantifiers: for all is known as the universal
quantifier (because it sets the universe of things that you are allowed to consider),
and there exists is known as the existential quantifier for obvious reasons.
These symbols are often combined with set theory and other notation:
∈ to mean “belongs to”
: [a colon] to mean “such that”
to mean not
And it is always worth recalling from the discussions we had above that ∀ … ∃ is not
generally the same as ∃ … ∀
Mathematical Proof
Prf1 Follow a proof of the following types, and in simple cases know how to
construct such a proof
Introduction
Mathematical Proof
Simple deductive proofs tend to ask us to prove if A then B type statements. The
proof begins with a simple statement A that we take to be true and then proceeds
through a sequence of smallish, and usually obvious, steps [lots of uses of if…then…]
each one following from the previous ones. The proof finishes when it reaches the
statement B which is to be proved. Here is an example:
Let us prove:
We shall start with 𝑥 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 3 and keep using if…then… statements until we
reach 𝑥 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 9. Each if…then… carries the truth of the first statement
along with it [because we are using logically valid steps] until we reach the final
statement, the conclusion. The conclusion must be true because we will have shown
that its truth follows directly from the truth of the first statement in the sequence.
Proof:
𝑥 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 3
𝑖𝑓 𝑥 3𝑛 𝑡ℎ𝑒𝑛 𝑥 9𝑛
We can rewrite this proof more succinctly using some formal notation; remember
another way of stating if A then B is by saying A implies B, and in symbols, this is
written as A B. We can rewrite our proof as follows8:
𝑥 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 3
𝑥 3𝑛, 𝑤ℎ𝑒𝑟𝑒 𝑛 𝑖𝑠 𝑎𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟
𝑥 9𝑛
𝑥 ℎ𝑎𝑠 9 𝑎𝑠 𝑎 𝑓𝑎𝑐𝑡𝑜𝑟
𝑥 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 9
What we have done here is combine each line with the next, so rather than writing
𝑥 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 3 𝑥 3𝑛
𝑥 3𝑛 𝑥 9𝑛
𝑒𝑡𝑐
𝒙 𝒊𝒔 𝒅𝒊𝒗𝒊𝒔𝒊𝒃𝒍𝒆 𝒃𝒚 𝟑
𝑥 3𝑛
𝑥 9𝑛
𝑒𝑡𝑐
We can now look at the general structure of these simple deductive proofs:
A P, P Q, Q R, R B
APQRB
8
We just use rather than mixing in ⟺
As we mentioned above, this works because we make sure that each step inherits
truth from the previous step: remember that if P is true and P Q is true then Q is
true and so on – and we make sure that P is true and P Q are true by working
through a proof of if A then B in small steps starting at A and ending at B.
Proof by contradiction
Mathematical Proof
Another type of proof you need to know about is called “proof by contradiction”. We
shall start this section by setting out a proof that √𝟐 is irrational using this method.
We shall then explore how this type of proof works in a little more detail:
To prove: √2 is irrational
Proof:
We start by assuming that √2 is not irrational, that is we assume that √2 is rational.
If √2 is rational it can be written as a fraction in its lowest terms; that is, we can
write:
𝑎
√2
𝑏
𝑎
2
𝑏
which gives:
2𝑏 𝑎
What have we done here? We have taken what we wanted to prove, that √2 is
irrational, and assumed that it is not true. We have then, through a series of valid
logical steps, derived a contradiction. In this case our contradiction is found between
our assumption that √2 is rational and so can be expressed as a fraction in its lowest
terms and the conclusion that both 𝑎 and 𝑏 are even. As we have used nothing but
9
Mathematical proofs vary depending on the audience. You will often have to make
some assumptions as to what is well known to your audience. This step could itself
be proved but it is a generally accepted statement.
valid logical steps from start to finish, our assumption must have been incorrect. Our
assumption was that √2 is rational and this must have been incorrect.
As B and not B cannot both be true our assumption that not A was true must
have been an error.
Exercise O:
If we are asked to prove if A then B we can try to prove the contrapositive instead as
sometimes this can turn out to be much easier. Remember that the contrapositive of
if A then B is if not B then not A and these statements are logically equivalent – i.e.
both expressions say the same thing. Because if not B then not A is the very same
thing as if A then B we can prove the contrapositive of a statement instead of
proving the statement itself.
Here is an example:
𝑓𝑜𝑟 𝑎𝑛𝑦 𝑛𝑜𝑛 𝑧𝑒𝑟𝑜 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 𝑥: 𝐢𝐟 𝑥 𝑖𝑠 𝑛𝑜𝑡 𝑜𝑑𝑑 𝐭𝐡𝐞𝐧 𝑥 𝑖𝑠 𝑛𝑜𝑡 𝑜𝑑𝑑
And we note that for integers “not odd”, means “even” so we need to prove
Mathematical Proof
Example:
Example:
Exercise P:
a. A and B
b. A or B
c. A only if B
d. A iff B
2. Find a counterexample, if one exists, to each of the following:
There are lots of pitfalls in setting out proofs and you should start to collect a set of
examples of where proofs can go wrong and look out for these sorts of errors and
misunderstandings in your own work and in proofs that you are given to study. In
this section we shall look at a few examples of the sorts of mistakes and errors that
can occur in proofs; but, be warned, this is not an exhaustive list and there are many
errors that mathematicians can make when setting out proofs.
In this specification we shall take it that √𝑥 means the positive number 𝑦 such that
𝑦 𝑥; this is standard in mathematics. Generally, we need to be careful with
equations when we square them. We need to be careful in case we generate extra
solutions to the equation. Here are two examples:
Example 1:
Given 𝑥 √25 [recall this means 𝑥 5]
Square both sides: 𝑥 25
Find all values of 𝑥 which make 𝑥 25 true: 𝑥 5
So, we have generated an extra solution, namely 𝑥 5 which we didn’t have to
start with.
Example 2:
Find 𝑥 given 𝑥 1 4
Square both sides: 𝑥 1 16
Giving: 𝑥 2𝑥 1 16
or, 𝑥 2𝑥 15 0
Factorising: 𝑥 5 𝑥 3
Giving solutions: 𝑥 5 or 𝑥 3
Here we can see that by squaring the original equation we have generated an extra
solution, namely 𝑥 5
Exercise Q:
When students first meet inequality signs, they naturally assume they behave the
same way as equals signs: they don’t. For an equals sign, the general rule that
students go by is that “whatever you do to one side of the equals sign you must do
to the other” and this is usually fine for equals signs. However, if you use this rule
within inequality signs then it might be the case that the inequality is no longer
preserved. Here are some pitfalls that you need to watch out for:
is true but on taking the cosine of both sides we obtain the false cos cos
Exercise R:
Dividing both sides of an expression by a second expression that is equal to zero can
cause problems. Generally, we cannot divide by zero as it can generate nonsense.
For instance, we know 7 0 5 0 but we cannot divide both sides by 0 to give
7 5. This issue extends to examples that contain algebra. Here is a classic proof
that commits this error [can you spot exactly where the error occurs?]: