# Mathematical Proof and the Principles of Mathematics/Logic/Logical equivalence

There is a final logical connective we'll be covering.

## Equivalence

Again, we 'define' this in terms of other connectives and verify that it matches the definition given earlier. In this case we take

(${\displaystyle P}$  implies ${\displaystyle Q}$ ) and (${\displaystyle Q}$  implies ${\displaystyle P}$ )

to be the definition of

${\displaystyle P}$  iff ${\displaystyle Q}$ .

This definition is where the 'if and only if' expression comes from, since

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

can be phrased ${\displaystyle P}$  if ${\displaystyle Q}$  and

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

can be phrased as ${\displaystyle P}$  only if ${\displaystyle Q}$ .

So see that this matches the previous definition, notice that ${\displaystyle P}$  implies ${\displaystyle Q}$  is False when ${\displaystyle P}$  is True and ${\displaystyle Q}$  is False, meanwhile ${\displaystyle Q}$  implies ${\displaystyle P}$  is False when ${\displaystyle Q}$  is True and ${\displaystyle P}$  is False, so the expression (${\displaystyle P}$  implies ${\displaystyle Q}$ ) and (${\displaystyle Q}$  implies ${\displaystyle P}$ ) can only be true when ${\displaystyle P}$  and ${\displaystyle Q}$  are both True or both False.

By combining this definition with the other rules of inference we get the following:

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

So you can use equivalence like implication except it goes in both directions, and to proof an equivalence is the same as proving an implication except you do it in both directions.

## Example Proof #1

Prop 1: ${\displaystyle P}$  or ${\displaystyle Q}$  iff ${\displaystyle Q}$  or ${\displaystyle P}$

In this case we already have ${\displaystyle P}$  or ${\displaystyle Q}$  implies ${\displaystyle Q}$  or ${\displaystyle P}$  as Prop. 1 on the previous page. By switching the letters ${\displaystyle Q}$  with ${\displaystyle P}$  in the proposition we get ${\displaystyle Q}$  or ${\displaystyle P}$  implies ${\displaystyle P}$  or ${\displaystyle Q}$ . So the proof is just a matter of putting these two previous results together.

Line Statement Justification
1 ${\displaystyle P}$  or ${\displaystyle Q}$  implies ${\displaystyle Q}$  or ${\displaystyle P}$  Prop. 1 from the previous page.
2 ${\displaystyle Q}$  or ${\displaystyle P}$  implies ${\displaystyle P}$  or ${\displaystyle Q}$  Also Prop. 1 from the previous page.
3 ${\displaystyle Q}$  or ${\displaystyle P}$  iff ${\displaystyle P}$  or ${\displaystyle Q}$  From 1 and 2

## Example Proof #2

For a more complicated example, we'll need to use subproofs.

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

We're proving two implications, one in each direction, so the structure of the proof looks like:

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

At this point we've broken the proof into parts which can be tackled separately. In the first case we need to prove an implication, but it seems easier to do the usual way. In the second case we need to prove disjunction and there are two ways of doing this. It looks like the easier way is to assume not ${\displaystyle P}$  and prove ${\displaystyle Q}$ . Now that we have several ways of proving things it may be that some ways are simpler than others, but without enough experience to get a feel for it you may have to use trial and error to find the simplest way. Keep in mind though, that when you see a proof in a book or article, the author may have gone through quite a few failed attempts before finding a proof that worked, but you don't get to see the failures.

Filling in more of the structure we have:

Line Statement Justification
1 ${\displaystyle P}$  or ${\displaystyle Q}$  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 Q}$ ) implies ${\displaystyle Q}$  Hypothesis
n+2 not ${\displaystyle P}$  Hypothesis
(something)
n+p−1 ${\displaystyle Q}$  ?
n+p ${\displaystyle P}$  or ${\displaystyle Q}$  From n+2 and n+p−1
n+p+1 ${\displaystyle P}$  or ${\displaystyle Q}$  iff (${\displaystyle P}$  implies ${\displaystyle Q}$ ) implies ${\displaystyle Q}$  From 1 and n, n+1 and n+p

(To save space, we're constructing both halves of the proof at once; normally you'd do one at time though.)

In the first half we need to prove ${\displaystyle Q}$  and it appears that the best way to do this is using the method of contradiction. For the second half we already have enough results from previous pages to fill in the rest. As usual, we encourage you to try to fill in the rest yourself before looking at the final result. By different methods you may even find a simpler proof than the one given.

Line Statement Justification
1 ${\displaystyle P}$  or ${\displaystyle Q}$  Hypothesis
2 ${\displaystyle P}$  implies ${\displaystyle Q}$  Hypothesis
3 not ${\displaystyle Q}$  Hypothesis
4 ${\displaystyle P}$  From 1 and 3
5 not ${\displaystyle P}$  From 2 and 3
6 ${\displaystyle False}$  From 4 and 5
7 ${\displaystyle Q}$  From 3 and 6
8 (${\displaystyle P}$  implies ${\displaystyle Q}$ ) implies ${\displaystyle Q}$  From 2 and 7
9 (${\displaystyle P}$  implies ${\displaystyle Q}$ ) implies ${\displaystyle Q}$  Hypothesis
10 not ${\displaystyle P}$  Hypothesis
11 ${\displaystyle P}$  implies ${\displaystyle Q}$  Prop. 8 on the page on indirect proofs.
12 ${\displaystyle Q}$  From 9 and 11
13 ${\displaystyle P}$  or ${\displaystyle Q}$  From 10 and 12
14 ${\displaystyle P}$  or ${\displaystyle Q}$  iff (${\displaystyle P}$  implies ${\displaystyle Q}$ ) implies ${\displaystyle Q}$  From 1 and 8, 9 and 13

In prose form it's a good idea to label the statements and clearly mark which implication is being being proved when so that the reader can easily follow the proof.

Prop 2: ${\displaystyle P}$  or ${\displaystyle Q}$  iff (${\displaystyle P}$  implies ${\displaystyle Q}$ ) implies ${\displaystyle Q}$
Proof: We first prove that ${\displaystyle P}$  or ${\displaystyle Q}$  implies ((${\displaystyle P}$  implies ${\displaystyle Q}$ ) implies ${\displaystyle Q}$ ). Assume ${\displaystyle P}$  or ${\displaystyle Q}$ . Now assume ${\displaystyle P}$  implies ${\displaystyle Q}$ . We need to proof ${\displaystyle Q}$ , so suppose not ${\displaystyle Q}$ . Then ${\displaystyle P}$  by the first assumption and not ${\displaystyle P}$  by the second assumption. This is a contradiction so we have ${\displaystyle Q}$ . Therefore (${\displaystyle P}$  implies ${\displaystyle Q}$ ) implies ${\displaystyle Q}$ . From the original assumption ${\displaystyle P}$  or ${\displaystyle Q}$  it follows that (${\displaystyle P}$  implies ${\displaystyle Q}$ ) implies ${\displaystyle Q}$ , so we can conclude that ${\displaystyle P}$  or ${\displaystyle Q}$  implies ((${\displaystyle P}$  implies ${\displaystyle Q}$ ) implies ${\displaystyle Q}$ ).
Now we prove that ((${\displaystyle P}$  implies ${\displaystyle Q}$ ) implies ${\displaystyle Q}$ ) implies ${\displaystyle P}$  or ${\displaystyle Q}$ . Assume (${\displaystyle P}$  implies ${\displaystyle Q}$ ) implies ${\displaystyle Q}$ . Now assume not ${\displaystyle P}$ . Then ${\displaystyle P}$  implies ${\displaystyle Q}$  and therefore ${\displaystyle Q}$ , so ${\displaystyle P}$  or ${\displaystyle Q}$ .

We've now covered nearly all of the commonly used rules of inference, so there is no shortage of statements that can be proved now. Some of the following are relatively trivial extensions of previous results, and some will require one or more subproofs, but it's up to you to figure out which is which.

Prop. 3: (${\displaystyle P}$  or ${\displaystyle Q}$ ) or ${\displaystyle R}$  iff ${\displaystyle P}$  or (${\displaystyle Q}$  or ${\displaystyle R}$ )
Prop. 4: ${\displaystyle P}$  and ${\displaystyle Q}$  iff ${\displaystyle Q}$  and ${\displaystyle R}$
Prop. 5: (${\displaystyle P}$  and ${\displaystyle Q}$ ) and ${\displaystyle R}$  iff ${\displaystyle P}$  and (${\displaystyle Q}$  and ${\displaystyle R}$ )
Prop. 6: (${\displaystyle P}$  and ${\displaystyle Q}$ ) or ${\displaystyle R}$  iff (${\displaystyle P}$  or ${\displaystyle R}$ ) and (${\displaystyle Q}$  or ${\displaystyle R}$ )
Prop. 7: (${\displaystyle P}$  or ${\displaystyle Q}$ ) and ${\displaystyle R}$  iff (${\displaystyle P}$  and ${\displaystyle R}$ ) or (${\displaystyle Q}$  and ${\displaystyle R}$ ).
Prop. 8: (${\displaystyle P}$  iff ${\displaystyle Q}$ ) implies (${\displaystyle Q}$  iff ${\displaystyle P}$ )
Prop. 9: (${\displaystyle P}$  iff ${\displaystyle Q}$ ) and (${\displaystyle Q}$  iff ${\displaystyle R}$ ) implies (${\displaystyle P}$  iff ${\displaystyle R}$ )
Prop. 10: ${\displaystyle P}$  implies ${\displaystyle Q}$  iff not ${\displaystyle P}$  or ${\displaystyle Q}$
Prop. 11: not (${\displaystyle P}$  implies ${\displaystyle Q}$ ) iff ${\displaystyle P}$  and not ${\displaystyle Q}$
Prop. 11: not (${\displaystyle P}$  or ${\displaystyle Q}$ ) iff not ${\displaystyle P}$  and not ${\displaystyle Q}$
Prop. 12: not (${\displaystyle P}$  and ${\displaystyle Q}$ ) iff not ${\displaystyle P}$  or not ${\displaystyle Q}$
Prop. 13: (${\displaystyle P}$  iff ${\displaystyle Q}$ ) implies (${\displaystyle P}$  implies ${\displaystyle R}$  iff ${\displaystyle Q}$  implies ${\displaystyle R}$ )
Prop. 14: (${\displaystyle P}$  iff ${\displaystyle Q}$ ) implies (${\displaystyle R}$  implies ${\displaystyle P}$  iff ${\displaystyle R}$  implies ${\displaystyle Q}$ )
Prop. 15: ${\displaystyle P}$  iff not not ${\displaystyle P}$

## Groups of equivalent statements

In some cases a theorem may state that a group of several statements are equivalent to each other. For example the statement of the theorem might be in the form:

Theorem: The following are equivalent:
1. Statement 1
2. Statement 2
3. Statement 3
4. Statement 4

This says Statement 1 iff Statement 2, Statement 1 iff Statement 3, ... Statement 3 iff Statement 4, with all 6 possible variations. The usual way to proof this type of theorem is to prove implications in a cycle. In this case you would prove,

P1: Statement 1 implies Statement 2
P2: Statement 2 implies Statement 3
P3: Statement 3 implies Statement 4
P4: Statement 4 implies Statement 1

This is very efficient since by proving just four implications you've in effect proven all 12 possible implications between two of the four statements. The reason this works is by repeated application of the following

Prop. 13: (${\displaystyle P}$  implies ${\displaystyle Q}$ ) and (${\displaystyle Q}$  implies ${\displaystyle R}$ ) implies (${\displaystyle P}$  implies ${\displaystyle R}$ )
Proof: (This is an easy application of previous results and is left as an exercise.)

As a further exercise, prove that

P1 and P2 and P3 and P4 implies (Statement 1 iff Statement 3)

## Substitution

When two statements are logically equivalent they have the same truth value. So it seems reasonable to claim that if ${\displaystyle P}$  is equivalent to ${\displaystyle Q}$  and ${\displaystyle E(P)}$  is some expression involving ${\displaystyle P}$ , then ${\displaystyle E(P)}$  is equivalent to ${\displaystyle E(Q)}$ , where ${\displaystyle E(Q)}$  is obtained from ${\displaystyle E(P)}$  by replacing the statement ${\displaystyle P}$  by ${\displaystyle Q}$ .

As an example of how this might be applied, we have from Prop. 15 above that ${\displaystyle P}$  is equivalent to not not ${\displaystyle P}$ . It would be nice to conclude then that

not not ${\displaystyle P}$  implies ${\displaystyle R}$  or (${\displaystyle Q}$  iff ${\displaystyle S}$ )

is equivalent to

${\displaystyle P}$  implies ${\displaystyle R}$  or (${\displaystyle Q}$  iff ${\displaystyle S}$ )

without going through a separate proof.

This is a valid conclusion, but the tools to justify it belong to the realm of mathematical logic and are outside the scope of this book. We can give proofs on a case by case basis though, and some examples serve to demonstrate how these proofs can be constructed. If the expression ${\displaystyle E(P)}$  involves only implication and the logical constant ${\displaystyle False}$ , then we can apply repeatedly apply propositions 13 and 14 above.

For example, if ${\displaystyle E(P)}$  is

${\displaystyle Q}$  implies (${\displaystyle P}$  implies ${\displaystyle R}$ )

then we can prove

${\displaystyle Q}$  implies (${\displaystyle P}$  implies ${\displaystyle R}$ )

is equivalent to

${\displaystyle Q}$  implies (not not ${\displaystyle P}$  implies ${\displaystyle R}$ )

as follows:

not not ${\displaystyle P}$  iff ${\displaystyle P}$  (by Prop. 15)
not not ${\displaystyle P}$  implies ${\displaystyle R}$  iff ${\displaystyle P}$  implies ${\displaystyle R}$  (by Prop. 13)
${\displaystyle Q}$  implies (not not ${\displaystyle P}$  implies ${\displaystyle R}$ ) iff ${\displaystyle Q}$  implies (${\displaystyle P}$  implies ${\displaystyle R}$ ) (by Prop. 14)

For an expression involving other logical connectives we can use the definitions we gave in terms of implication to turn the expression into one of the previous type.