# Mathematical Proof and the Principles of Mathematics/Logic/Direct proofs for implication

We've talked about what kinds of statements are used in mathematics, so now we can talk about how to put these statements together to prove theorems. At this point we can only prove tautologies, so if this were a video game then this would be the training level. The statements we're proving here can't really be called theorems, so we'll call them propositions.

As before, ${\displaystyle P}$, ${\displaystyle Q}$, ... will stand for mathematical statements in this section.

## Rules of inference

In mathematics, a proof must be based on logical deduction, in other words each step must be a logical consequence of previous steps. Just what, exactly, a logical consequence is is a matter of logic, which supplies us with 'rules of inference'. Each rule of inference is a rule for combining true statements which is guaranteed to produce another true statement. The simplest example is:

From ${\displaystyle P}$ deduce ${\displaystyle P}$.

This rule is is called 'iteration'; many of the rules of inference have names but in a mathematical proof it should be clear from the context which rule is being used.

There are several other rules which combine previous statements in a simple way, but it turns out you can't get very far with only them. One approach is add axioms of logic, for example

${\displaystyle P}$ or ${\displaystyle P}$ implies ${\displaystyle P}$.

But while this is a valid approach, proofs in mathematics would be much longer and harder to follow if axioms of logic were to be used directly. So the approach used in mathematics is to allow the use of 'auxiliary hypotheses'.

The most commonly used example of this type of rule is

If by making the assumption ${\displaystyle P}$ one can derive ${\displaystyle Q}$, then deduce ${\displaystyle P}$ implies ${\displaystyle Q}$.

That's going to take a while to sink in so we'll give some examples of proofs which use this rule of inference.

## Example proof #1

Our first example of a proof is for the statement

Prop. 1 ${\displaystyle P}$ implies ${\displaystyle P}$.

The first version of the proof will be in tabular format to make it clear how the rules of inference are being used.

Line Statement Justification
1 ${\displaystyle P}$ Hypothesis
2 ${\displaystyle P}$ Iterating line 1
3 ${\displaystyle P}$ implies ${\displaystyle P}$ From 1 and 2

In the table, the first line is indented to show that we're introducing a hypothesis or assumption and the next line is indented to show that we're operating under the assumption of line 1. The last line is not indented, meaning that the statement is valid without the assumption.

So let's examine how the rule of inference was applied in this case. First we made the assumption ${\displaystyle P}$. Then we derived ${\displaystyle P}$, which in this case was simply repeating ${\displaystyle P}$. Since by assuming ${\displaystyle P}$ we were able to derive ${\displaystyle P}$, the rule of inference says you can conclude ${\displaystyle P}$ implies ${\displaystyle P}$.

A tabular format for a proof is rarely used in mathematics. You could use it if you're being extraordinarily detailed and careful as we are now, or if you're just starting out with proofs, also as we are now. In mathematical literature you would use a more prose-like style. Our second version shows what the proof might look like in that format.

Prop. 1: ${\displaystyle P}$ implies ${\displaystyle P}$.
Proof: Assume ${\displaystyle P}$. Then ${\displaystyle P}$ by assumption. Therefore ${\displaystyle P}$ implies ${\displaystyle P}$.

In this version of the proof there is language to introduce the hypothesis. This is usually "Assume ..." or "Let ...". The second line draws a conclusion and gives the reason. The language for this is usually something like "Then ... because ...", "Hence ... by ...", "So ... since ...". The last line isn't really necessary since we already know which statement we're trying to prove. But since it is included, the word "therefore" is used to point out that this is an important point in the proof. In this case it's because we're removing the assumption to combine it with what we were able to derive from it.

Experienced mathematicians would normally be able to fill in the proof of the statement like this with little effort. So another acceptable proof might be:

Prop. 1: ${\displaystyle P}$ implies ${\displaystyle P}$.
Proof: Trivial.

But calling a statement "trivial", "obvious" or "clear" is a privilege you have to earn by doing enough proofs that you can fill in a logical proof automatically. It's not be used for statements which seem true according to your intuition. Keep in mind as well that what is trivial to some may not be trivial to others, so you have to keep your audience in mind when writing a proof, just as with all writing.

## Q.E.D. and tombstones

The abbreviation 'Q.E.D.' is sometimes seen at the end of proofs but it rarely used in modern mathematics. It's an abbreviation for the Latin phrase quod erat demonstrandum which roughly means "which was to be proved." Latin is not as widely known as it once was, and the abbreviation was used at a time when writers could safely assume that their readers had a basic knowledge of it. There are several variations including 'Q.E.F.' for quod erat faciendum meaning "which was to be done". If the end of a proof is marked at all in modern texts, then a tombstone, or small rectangle or square, is used. But if you're the old-fashioned type who uses phases like mutatis mutandis in everyday speech then there's nothing actually wrong with using Q.E.D. if you want to.

## Example Proof #2

The next example of a proof will be for the statement

Prop. 2: ${\displaystyle P}$ implies (${\displaystyle Q}$ implies ${\displaystyle P}$).

This is a bit more complex, but we encourage you make an attempt at it before reading further, keeping in mind that it can be proved using only the two rules of inference we've given so far.

More complex proofs aren't so much written as constructed. In other words you don't really write them from start to finish. Just as seeing a finished house doesn't tell you how to build one, seeing a finished proof doesn't tell you how to write one. So we'll try to show the processes that were used to create the example proofs and not just the final result.

We start by assuming that we have a proof and then try to figure out what it would look like. The statement is an implication, so in order for the rule of inference to work we need to assume the part before the word 'implies' and derive the part after the word 'implies'. So in tabular form, the structure of the proof is

Line Statement Justification
1 ${\displaystyle P}$ Hypothesis
(something)
n ${\displaystyle Q}$ implies ${\displaystyle P}$ ?
n+1 ${\displaystyle P}$ implies (${\displaystyle Q}$ implies ${\displaystyle P}$) From 1 and n

Now we need a proof of

${\displaystyle Q}$ implies ${\displaystyle P}$

to fill in the middle. This is another implication so we need to assume the first part, ${\displaystyle Q}$, and prove the second part, ${\displaystyle P}$. This means making a second assumption within the first assumption and our current version of the proof is

Line Statement Justification
1 ${\displaystyle P}$ Hypothesis
2 ${\displaystyle Q}$ Hypothesis
(something)
n−1 ${\displaystyle P}$ ?
n ${\displaystyle Q}$ implies ${\displaystyle P}$ From 2 and n−1
n+1 ${\displaystyle P}$ implies (${\displaystyle Q}$ implies ${\displaystyle P}$) From 1 and n

At this point we need to prove ${\displaystyle P}$, but it's already one of the assumptions so it's just a matter of restating it. This gives the final version of the proof:

Line Statement Justification
1 ${\displaystyle P}$ Hypothesis
2 ${\displaystyle Q}$ Hypothesis
3 ${\displaystyle P}$ Iterating line 1
4 ${\displaystyle Q}$ implies ${\displaystyle P}$ From 2 and 4
5 ${\displaystyle P}$ implies (${\displaystyle Q}$ implies ${\displaystyle P}$) From 1 and 5

Let's translate into prose format.

Prop. 2: ${\displaystyle P}$ implies (${\displaystyle Q}$ implies ${\displaystyle P}$)
Proof: Assume ${\displaystyle P}$. Now assume ${\displaystyle Q}$. We have ${\displaystyle P}$ by the original assumption. Therefore ${\displaystyle Q}$ implies ${\displaystyle P}$. From the original assumption ${\displaystyle P}$ it follows that ${\displaystyle Q}$ implies ${\displaystyle P}$, so we can conclude that ${\displaystyle P}$ implies (${\displaystyle Q}$ implies ${\displaystyle P}$).

## Example Proof #3

For this example we need a new rule of inference:

From ${\displaystyle P}$, ${\displaystyle P}$ implies ${\displaystyle Q}$ deduce ${\displaystyle Q}$.

In other words, if the statement ${\displaystyle P}$ and the statement ${\displaystyle P}$ implies ${\displaystyle Q}$ have both been proven, then you may add the statement ${\displaystyle Q}$.

You might consider this the inverse of the previous rule of inference since it uses an implication while the previous rules proves and implication.

Prop. 3: ${\displaystyle P}$ implies ((${\displaystyle P}$ implies ${\displaystyle Q}$) implies ${\displaystyle Q}$.

Again, we encourage you make an attempt at it before reading further, keeping in mind that it can be proved using only the three rules of inference we've given so far.

We leave it as an exercise to use the construction method discussed in the previous example to get to this point:

Line Statement Justification
1 ${\displaystyle P}$ Hypothesis
2 ${\displaystyle P}$ implies ${\displaystyle Q}$ Hypothesis
(something)
n−1 ${\displaystyle Q}$ ?
n (${\displaystyle P}$ implies ${\displaystyle Q}$) implies ${\displaystyle Q}$ From 2 and n−1
n+1 ${\displaystyle P}$ implies ((${\displaystyle P}$ implies ${\displaystyle Q}$) implies ${\displaystyle Q}$) From 1 and n

We need to prove

${\displaystyle Q}$

at this point, but we have

${\displaystyle P}$

and

${\displaystyle P}$ implies ${\displaystyle Q}$

as assumptions. So it's just a matter of applying our new rule of inference. The final form of the proof is then

Line Statement Justification
1 ${\displaystyle P}$ Hypothesis
2 ${\displaystyle P}$ implies ${\displaystyle Q}$ Hypothesis
3 ${\displaystyle P}$ Iterating line 1
4 ${\displaystyle Q}$ 3,2
5 (${\displaystyle P}$ implies ${\displaystyle Q}$) implies ${\displaystyle Q}$ From 2 and 5
6 ${\displaystyle P}$ implies ((${\displaystyle P}$ implies ${\displaystyle Q}$) implies ${\displaystyle Q}$) From 1 and 6

In prose format:

Prop. 3: ${\displaystyle P}$ implies ((${\displaystyle P}$ implies ${\displaystyle Q}$) implies ${\displaystyle Q}$)
Proof: Assume ${\displaystyle P}$. Now assume ${\displaystyle P}$ implies ${\displaystyle Q}$. We have ${\displaystyle P}$ by the original assumption, so ${\displaystyle Q}$. Therefore ${\displaystyle Q}$ implies (${\displaystyle P}$ implies ${\displaystyle Q}$). From the original assumption ${\displaystyle P}$ it follows that (${\displaystyle Q}$ implies ${\displaystyle P}$) implies ${\displaystyle Q}$), so we can conclude that ${\displaystyle P}$ implies ((${\displaystyle Q}$ implies ${\displaystyle P}$) implies ${\displaystyle Q}$)).

## Quoting previous results

Mathematics wouldn't progress very far if everything had to be proved from scratch. Fortunately, every time a new result is proved it can be used as a shortcut in other proofs. Often it will be clear which result is being used, otherwise if it's a result proven earlier in the same document then point to it in the proof. It's handy to have some sort of labeling or numbering system to make this easier. If you're quoting from another source then use your favorite referencing style to make it clear where you're quoting from, and also make it clear where to find the result within that source. Note that any result of the form ${\displaystyle P}$ implies ${\displaystyle Q}$ can be combined with the previous rule of inference to create a new rule of inference 'From ${\displaystyle P}$ deduce ${\displaystyle Q}$'. For example Prop. 2 creates a new rule of inference

From ${\displaystyle P}$ deduce ${\displaystyle Q}$ implies ${\displaystyle P}$.
Prop. 4: ${\displaystyle P}$ implies (${\displaystyle Q}$ implies (${\displaystyle R}$ implies ${\displaystyle P}$)).
Proof: Assume ${\displaystyle P}$. Then ${\displaystyle R}$ implies ${\displaystyle P}$ by Prop. 2. Also, ${\displaystyle Q}$ implies (${\displaystyle R}$ implies ${\displaystyle P}$) by by Prop. 2. Therefore ${\displaystyle P}$ implies (${\displaystyle Q}$ implies (${\displaystyle R}$ implies ${\displaystyle P}$)).

Note that in the first use of Prop. 2, the statement ${\displaystyle R}$ replaces ${\displaystyle Q}$ used in the proposition. In the second use the statement ${\displaystyle R}$ implies ${\displaystyle P}$ replaces ${\displaystyle P}$ used in the proposition.

The following are left to the reader to prove:

Prop. 5: (${\displaystyle P}$ implies ${\displaystyle Q}$) implies ((${\displaystyle Q}$ implies ${\displaystyle R}$) implies (${\displaystyle P}$ implies ${\displaystyle R}$)).
Prop. 6: (${\displaystyle P}$ implies (${\displaystyle Q}$ implies ${\displaystyle R}$)) implies (${\displaystyle Q}$ implies (${\displaystyle P}$ implies ${\displaystyle R}$)).
Prop. 7: (${\displaystyle P}$ implies (${\displaystyle P}$ implies ${\displaystyle Q}$)) implies (${\displaystyle P}$ implies ${\displaystyle Q}$).
Prop. 8: (${\displaystyle P}$ implies (${\displaystyle Q}$ implies ${\displaystyle R}$)) implies ((${\displaystyle P}$ implies ${\displaystyle Q}$) implies (${\displaystyle P}$ implies ${\displaystyle R}$)).
Prop. 9: ((${\displaystyle R}$ implies ${\displaystyle Q}$) implies ${\displaystyle P}$) implies (${\displaystyle Q}$ implies ${\displaystyle P}$)
Prop. 10: ((${\displaystyle R}$ implies ${\displaystyle Q}$) implies (${\displaystyle Q}$ implies ${\displaystyle P}$)) implies (${\displaystyle Q}$ implies ${\displaystyle P}$)

So far we've only dealt with implication, but that doesn't mean that we're done with it yet. There are some statements which, while true, can't be proved with the rules of inference we've given so far. One of these is

Prop. ??: ((${\displaystyle P}$ implies ${\displaystyle Q}$) implies ${\displaystyle P}$) implies ${\displaystyle P}$.

You might want to give this a try, remembering to only use the rules of inference on this page, to see how far you can get. If you do come up with a proof though then it means you're (probably) doing something wrong.