1 Logic

1.7 The contrapositive

The following logical equivalence shows us that every WFF that uses can be written with ¬ and instead.

Theorem 1.7.1.

Let ϕ and ψ be WFFs. Then

(ϕψ)(ψ¬ϕ).

Here is the truth table that proves this result:

ϕ ψ (ϕψ) (ψ¬ϕ)
T T T T
T F F F
F T T T
F F T T

This equivalence is commonly used when proving a statement like “A implies B.” Proofs of statements in this form are often carried out by assuming that A is true and then deducing that B is also true. Why is that sufficient to prove AB?

Suppose that if A is true, so is B. If A is false then ¬A is true, so ¬AB is true no matter what the statements A and B were. On the other hand if A is true we know B is true as well, so ¬AB is true in that case too. So regardless of the truth value of A, the formula ¬AB is true. Because this is logically equivalent to AB, we’re done.

1.7.1 The contrapositive

The contrapositive of an implication AB is by definition ¬B¬A. For example, the contrapositive of “if it’s Monday, then it’s raining” is “if it’s not raining, then it’s not Monday.” We are going to use the logical equivalence of the previous section to show that an implication is logically equivalent to its contrapositive.

Theorem 1.7.2.

Let ϕ and ψ be WFFs. Then

(ϕψ)(¬ψ¬ϕ).
Proof.

You can check the truth tables for these two statements, or you can do this:

ϕψ ψ¬ϕ Theorem 1.7.1
¬¬ψ¬ϕ Theorem 1.6.2
¬ϕ¬¬ψ Theorem 1.5.1
¬ψ¬ϕ Theorem 1.7.1

Again this is very useful as a proof technique. If you want to prove AB, it is logically equivalent to prove the contrapositive (¬B)(¬A), and this is sometimes easier. An example is

x2 is an irrational number implies x is an irrational number.

This statement is true, but the contrapositive “x is rational implies x2 is rational” is easier to prove because x being rational actually tells you something specific (that x=p/q for some whole numbers p and q) which you can use to make the proof work. There are further examples given in this blog post by Timothy Gowers.

1.7.2 The converse

Don’t confuse the contrapositive of an implies statement with its converse. The converse of (ϕψ) is defined to be (ψϕ), and these two are not in general logically equivalent. (You should think of a truth assignment to show that (pq) and (qp) are not logically equivalent.)