# Contraposition

(Redirected from Proof by contrapositive)

In logic and mathematics, contraposition refers to the inference of going from a conditional statement into its logically equivalent contrapositive, and an associated proof method known as § Proof by contrapositive. The contrapositive of a statement has its antecedent and consequent inverted and flipped.

Conditional statement ${\displaystyle P\rightarrow Q}$. In formulas: the contrapositive of ${\displaystyle P\rightarrow Q}$ is ${\displaystyle \neg Q\rightarrow \neg P}$.[1]

If P, Then Q. — If not Q, Then not P. "If it is raining, then I wear my coat" — "If I don't wear my coat, then it isn't raining."

The law of contraposition says that a conditional statement is true if, and only if, its contrapositive is true.[2]

The contrapositive (${\displaystyle \neg Q\rightarrow \neg P}$) can be compared with three other statements:

Inversion (the inverse), ${\displaystyle \neg P\rightarrow \neg Q}$
"If it is not raining, then I don't wear my coat." Unlike the contrapositive, the inverse's truth value is not at all dependent on whether or not the original proposition was true, as evidenced here.
Conversion (the converse), ${\displaystyle Q\rightarrow P}$
"If I wear my coat, then it is raining." The converse is actually the contrapositive of the inverse, and so always has the same truth value as the inverse (which as stated earlier does not always share the same truth value as that of the original proposition).
Negation (the logical complement), ${\displaystyle \neg (P\rightarrow Q)}$
"It is not the case that if it is raining then I wear my coat.", or equivalently, "Sometimes, when it is raining, I don't wear my coat. " If the negation is true, then the original proposition (and by extension the contrapositive) is false.

Note that if ${\displaystyle P\rightarrow Q}$ is true and one is given that ${\displaystyle Q}$ is false (i.e., ${\displaystyle \neg Q}$), then it can logically be concluded that ${\displaystyle P}$ must be also false (i.e., ${\displaystyle \neg P}$). This is often called the law of contrapositive, or the modus tollens rule of inference.[3]

## Intuitive explanation

In the Euler diagram shown, if something is in A, it must be in B as well. So we can interpret "all of A is in B" as:

${\displaystyle A\to B}$

It is also clear that anything that is not within B (the blue region) cannot be within A, either. This statement, which can be expressed as:

${\displaystyle \neg B\to \neg A}$

is the contrapositive of the above statement. Therefore, one can say that

${\displaystyle (A\to B)\leftrightarrow (\neg B\to \neg A).}$

In practice, this equivalence can be used to make proving a statement easier. For example, if one wishes to prove that every girl in the United States (A) has brown hair (B), one can either try to directly prove ${\displaystyle A\to B}$ by checking that all girls in the United States do indeed have brown hair, or try to prove ${\displaystyle \neg B\to \neg A}$ by checking that all girls without brown hair are indeed all outside the US. In particular, if one were to find at least one girl without brown hair within the US, then one would have disproved ${\displaystyle \neg B\to \neg A}$, and equivalently ${\displaystyle A\to B}$.

In general, for any statement where A implies B, not B always implies not A. As a result, proving or disproving either one of these statements automatically proves or disproves the other, as they are logically equivalent to each other.

## Formal definition

A proposition Q is implicated by a proposition P when the following relationship holds:

${\displaystyle (P\to Q)}$

This states that, "if ${\displaystyle P}$, then ${\displaystyle Q}$", or, "if Socrates is a man, then Socrates is human." In a conditional such as this, ${\displaystyle P}$ is the antecedent, and ${\displaystyle Q}$ is the consequent. One statement is the contrapositive of the other only when its antecedent is the negated consequent of the other, and vice versa. Thus a contrapositive generally takes the form of:

${\displaystyle (\neg Q\to \neg P).}$

That is, "If not-${\displaystyle Q}$, then not-${\displaystyle P}$", or, more clearly, "If ${\displaystyle Q}$ is not the case, then P is not the case." Using our example, this is rendered as "If Socrates is not human, then Socrates is not a man." This statement is said to be contraposed to the original and is logically equivalent to it. Due to their logical equivalence, stating one effectively states the other; when one is true, the other is also true, and when one is false, the other is also false.

Strictly speaking, a contraposition can only exist in two simple conditionals. However, a contraposition may also exist in two complex, universal conditionals, if they are similar. Thus, ${\displaystyle \forall {x}(P{x}\to Q{x})}$, or "All ${\displaystyle P}$s are ${\displaystyle Q}$s," is contraposed to ${\displaystyle \forall {x}(\neg Q{x}\to \neg P{x})}$, or "All non-${\displaystyle Q}$s are non-${\displaystyle P}$s."[4]

## Proofs

### Simple proof by definition of a conditional

In first-order logic, the conditional is defined as:

${\displaystyle A\to B\,\leftrightarrow \,\neg A\lor B}$

which can be made equivalent to its contrapositive, as follows:

{\displaystyle {\begin{aligned}\neg A\lor B\,&\,\leftrightarrow B\lor \neg A\\\,&\,\leftrightarrow \neg B\to \neg A\end{aligned}}}

Let:

${\displaystyle (A\to B)\land \neg B}$

It is given that, if A is true, then B is true, and it is also given that B is not true. We can then show that A must not be true by contradiction. For if A were true, then B would have to also be true (by Modus Ponens). However, it is given that B is not true, so we have a contradiction. Therefore, A is not true (assuming that we are dealing with bivalent statements that are either true or false):

${\displaystyle (A\to B)\to (\neg B\to \neg A)}$

We can apply the same process the other way round, starting with the assumptions that:

${\displaystyle (\neg B\to \neg A)\land A}$

Here, we also know that B is either true or not true. If B is not true, then A is also not true. However, it is given that A is true, so the assumption that B is not true leads to a contradiction, which means that it is not the case that B is not true. Therefore, B must be true:

${\displaystyle (\neg B\to \neg A)\to (A\to B)}$

Combining the two proved statements together, we obtain the sought-after logical equivalence between a conditional and its contrapositive:

${\displaystyle (A\to B)\equiv (\neg B\to \neg A)}$

### More rigorous proof of the equivalence of contrapositives

Logical equivalence between two propositions means that they are true together or false together. To prove that contrapositives are logically equivalent, we need to understand when material implication is true or false.

${\displaystyle P\to Q}$

This is only false when ${\displaystyle P}$ is true and ${\displaystyle Q}$ is false. Therefore, we can reduce this proposition to the statement "False when ${\displaystyle P}$ and not-${\displaystyle Q}$" (i.e. "True when it is not the case that ${\displaystyle P}$ and not-${\displaystyle Q}$"):

${\displaystyle \neg (P\land \neg Q)}$

The elements of a conjunction can be reversed with no effect (by commutativity):

${\displaystyle \neg (\neg Q\land P)}$

We define ${\displaystyle R}$ as equal to "${\displaystyle \neg Q}$", and ${\displaystyle S}$ as equal to ${\displaystyle \neg P}$ (from this, ${\displaystyle \neg S}$ is equal to ${\displaystyle \neg \neg P}$, which is equal to just ${\displaystyle P}$):

${\displaystyle \neg (R\land \neg S)}$

This reads "It is not the case that (R is true and S is false)", which is the definition of a material conditional. We can then make this substitution:

${\displaystyle R\to S}$

By reverting R and S back into ${\displaystyle P}$ and ${\displaystyle Q}$, we then obtain the desired contrapositive:

${\displaystyle \neg Q\to \neg P}$

## Comparisons

name form description
implication if P then Q first statement implies truth of second
inverse if not P then not Q negation of both statements
converse if Q then P reversal of both statements
contrapositive if not Q then not P reversal and negation of both statements
negation P and not Q contradicts the implication

### Examples

Take the statement "All red objects have color." This can be equivalently expressed as "If an object is red, then it has color."

• The contrapositive is "If an object does not have color, then it is not red." This follows logically from our initial statement and, like it, it is evidently true.
• The inverse is "If an object is not red, then it does not have color." An object which is blue is not red, and still has color. Therefore, in this case the inverse is false.
• The converse is "If an object has color, then it is red." Objects can have other colors, so the converse of our statement is false.
• The negation is "There exists a red object that does not have color." This statement is false because the initial statement which it negates is true.

In other words, the contrapositive is logically equivalent to a given conditional statement, though not sufficient for a biconditional.

Similarly, take the statement "All quadrilaterals have four sides," or equivalently expressed "If a polygon is a quadrilateral, then it has four sides."

• The contrapositive is "If a polygon does not have four sides, then it is not a quadrilateral." This follows logically, and as a rule, contrapositives share the truth value of their conditional.
• The inverse is "If a polygon is not a quadrilateral, then it does not have four sides." In this case, unlike the last example, the inverse of the statement is true.
• The converse is "If a polygon has four sides, then it is a quadrilateral." Again, in this case, unlike the last example, the converse of the statement is true.
• The negation is "There is at least one quadrilateral that does not have four sides." This statement is clearly false.

Since the statement and the converse are both true, it is called a biconditional, and can be expressed as "A polygon is a quadrilateral if, and only if, it has four sides." (The phrase if and only if is sometimes abbreviated as iff.) That is, having four sides is both necessary to be a quadrilateral, and alone sufficient to deem it a quadrilateral.

### Truth

• If a statement is true, then its contrapositive is true (and vice versa).
• If a statement is false, then its contrapositive is false (and vice versa).
• If a statement's inverse is true, then its converse is true (and vice versa).
• If a statement's inverse is false, then its converse is false (and vice versa).
• If a statement's negation is false, then the statement is true (and vice versa).
• If a statement (or its contrapositive) and the inverse (or the converse) are both true or both false, then it is known as a logical biconditional.

## Proof by contrapositive

Because the contrapositive of a statement always has the same truth value (truth or falsity) as the statement itself, it can be a powerful tool for proving mathematical theorems (especially if the truth of the contrapositive is easier to establish than the truth of the statement itself). A proof by contrapositive is a direct proof of the contrapositive of a statement.[5] However, indirect methods such as proof by contradiction can also be used with contraposition, as, for example, in the proof of the irrationality of the square root of 2. By the definition of a rational number, the statement can be made that "If ${\displaystyle {\sqrt {2}}}$ is rational, then it can be expressed as an irreducible fraction". This statement is true because it is a restatement of a definition. The contrapositive of this statement is "If ${\displaystyle {\sqrt {2}}}$ cannot be expressed as an irreducible fraction, then it is not rational". This contrapositive, like the original statement, is also true. Therefore, if it can be proven that ${\displaystyle {\sqrt {2}}}$ cannot be expressed as an irreducible fraction, then it must be the case that ${\displaystyle {\sqrt {2}}}$ is not a rational number. The latter can be proved by contradiction.

The previous example employed the contrapositive of a definition to prove a theorem. One can also prove a theorem by proving the contrapositive of the theorem's statement. To prove that if a positive integer N is a non-square number, its square root is irrational, we can equivalently prove its contrapositive, that if a positive integer N has a square root that is rational, then N is a square number. This can be shown by setting N equal to the rational expression a/b with a and b being positive integers with no common prime factor, and squaring to obtain N = a2/b2 and noting that since N is a positive integer b=1 so that N = a2, a square number.

In mathematics, proof by contrapositive, or proof by contraposition, is a rule of inference used in proofs, where one infers a conditional statement from its contrapositive.[6] In other words, the conclusion "if A, then B" is inferred by constructing a proof of the claim "if not B, then not A" instead. More often than not, this approach is preferred if the contrapositive is easier to prove than the original conditional statement itself.

Logically, the validity of proof by contrapositive can be demonstrated by the use of the following truth table, where it is shown that pq and ${\displaystyle \lnot }$q${\displaystyle \lnot }$p share the same truth values in all scenarios:

p q ${\displaystyle \lnot }$p ${\displaystyle \lnot }$q pq ${\displaystyle \lnot }$q${\displaystyle \lnot }$p
T T F F T T
T F F T F F
F T T F T T
F F T T T T

### Difference with proof by contradiction

Proof by contradiction: Assume (for contradiction) that ${\displaystyle \neg A}$ is true. Use this assumption to prove a contradiction. It follows that ${\displaystyle \neg A}$ is false, so ${\displaystyle A}$ is true.

Proof by contrapositive: To prove ${\displaystyle A\to B}$, prove its contrapositive statement, which is ${\displaystyle \neg B\to \neg A}$.

### Example

Let ${\displaystyle x}$ be an integer.

To prove: If ${\displaystyle x^{2}}$ is even, then ${\displaystyle x}$ is even.

Although a direct proof can be given, we choose to prove this statement by contraposition. The contrapositive of the above statement is:

If ${\displaystyle x}$ is not even, then ${\displaystyle x^{2}}$ is not even.

This latter statement can be proven as follows: suppose that x is not even, then x is odd. The product of two odd numbers is odd, hence ${\displaystyle x^{2}=x\cdot x}$ is odd. Thus ${\displaystyle x^{2}}$ is not even.

Having proved the contrapositive, we can then infer that the original statement is true.[7]

## In nonclassical logics

### Intuitionistic logic

In intuitionistic logic, the statement ${\displaystyle P\to Q}$ cannot be proven to be equivalent to ${\displaystyle \lnot Q\to \lnot P}$. We can prove that ${\displaystyle P\to Q}$ implies ${\displaystyle \lnot Q\to \lnot P}$, but the reverse implication, from ${\displaystyle \lnot Q\to \lnot P}$ to ${\displaystyle P\to Q}$, requires the law of the excluded middle or an equivalent axiom.

### Subjective logic

Contraposition represents an instance of the subjective Bayes' theorem in subjective logic expressed as:

${\displaystyle (\omega _{P{\tilde {|}}Q}^{A},\omega _{P{\tilde {|}}\lnot Q}^{A})=(\omega _{Q|P}^{A},\omega _{Q|\lnot P}^{A})\,{\widetilde {\phi \,}}\,a_{P}\,,}$

where ${\displaystyle (\omega _{Q|P}^{A},\omega _{Q|\lnot P}^{A})}$ denotes a pair of binomial conditional opinions given by source ${\displaystyle A}$. The parameter ${\displaystyle a_{P}}$ denotes the base rate (aka. the prior probability) of ${\displaystyle P}$. The pair of derivative inverted conditional opinions is denoted ${\displaystyle (\omega _{P{\tilde {|}}Q}^{A},\omega _{P{\tilde {|}}\lnot Q}^{A})}$. The conditional opinion ${\displaystyle \omega _{Q|P}^{A}}$ generalizes the logical statement ${\displaystyle P\to Q}$, i.e. in addition to assigning TRUE or FALSE the source ${\displaystyle A}$ can assign any subjective opinion to the statement. The case where ${\displaystyle \omega _{Q\mid P}^{A}}$ is an absolute TRUE opinion is equivalent to source ${\displaystyle A}$ saying that ${\displaystyle P\to Q}$ is TRUE, and the case where ${\displaystyle \omega _{Q\mid P}^{A}}$ is an absolute FALSE opinion is equivalent to source ${\displaystyle A}$ saying that ${\displaystyle P\to Q}$ is FALSE. In the case when the conditional opinion ${\displaystyle \omega _{Q|P}^{A}}$ is absolute TRUE the subjective Bayes' theorem operator ${\displaystyle {\widetilde {\phi \,}}}$ of subjective logic produces an absolute FALSE derivative conditional opinion ${\displaystyle \omega _{P{\widetilde {|}}\lnot Q}^{A}}$ and thereby an absolute TRUE derivative conditional opinion ${\displaystyle \omega _{\lnot P{\widetilde {|}}\lnot Q}^{A}}$ which is equivalent to ${\displaystyle \lnot Q\to \lnot P}$ being TRUE. Hence, the subjective Bayes' theorem represents a generalization of both contraposition and Bayes' theorem.[8]

## In probability theory

Contraposition represents an instance of Bayes' theorem which in a specific form can be expressed as:

${\displaystyle \Pr(\lnot P\mid \lnot Q)={\frac {\Pr(\lnot Q\mid \lnot P)\,a(\lnot P)}{\Pr(\lnot Q\mid \lnot P)\,a(\lnot P)+\Pr(\lnot Q\mid P)\,a(P)}}.}$

In the equation above the conditional probability ${\displaystyle \Pr(\lnot Q\mid P)}$ generalizes the logical statement ${\displaystyle P\to \lnot Q}$, i.e. in addition to assigning TRUE or FALSE we can also assign any probability to the statement. The term ${\displaystyle a(P)}$ denotes the base rate (aka. the prior probability) of ${\displaystyle P}$. Assume that ${\displaystyle \Pr(\lnot Q\mid P)=1}$ is equivalent to ${\displaystyle P\to \lnot Q}$ being TRUE, and that ${\displaystyle \Pr(\lnot Q\mid P)=0}$ is equivalent to ${\displaystyle P\to \lnot Q}$ being FALSE. It is then easy to see that ${\displaystyle \Pr(\lnot P\mid \lnot Q)=1}$ when ${\displaystyle \Pr(Q\mid P)=1}$ i.e. when ${\displaystyle P\to Q}$ is TRUE. This is because ${\displaystyle \Pr(\lnot Q\mid P)=1-\Pr(Q\mid P)=0}$ so that the fraction on the right-hand side of the equation above is equal to 1, and hence ${\displaystyle \Pr(\lnot P\mid \lnot Q)=1}$ which is equivalent to ${\displaystyle \lnot Q\to \lnot P}$ being TRUE. Hence, Bayes' theorem represents a generalization of contraposition.[9]

In traditional logic, contraposition is a form of immediate inference in which a proposition is inferred from another and where the former has for its subject the contradictory of the original logical proposition's predicate. In some cases, contraposition involves a change of the former's quality (i.e. affirmation or negation).[10] For its symbolic expression in modern logic, see the rule of transposition. Contraposition also has philosophical application distinct from the other traditional inference processes of conversion and obversion where equivocation varies with different proposition types.

In traditional logic, the process of contraposition is a schema composed of several steps of inference involving categorical propositions and classes.[11] A categorical proposition contains a subject and predicate where the existential impact of the copula implies the proposition as referring to a class with at least one member, in contrast to the conditional form of hypothetical or materially implicative propositions, which are compounds of other propositions, e.g. "If P, then Q" (P and Q are both propositions), and their existential impact is dependent upon further propositions where quantification existence is instantiated (existential instantiation), not on the hypothetical or materially implicative propositions themselves.

Full contraposition is the simultaneous interchange and negation of the subject and predicate, and is valid only for the type "A" and type "O" propositions of Aristotelian logic, while it is conditionally valid for "E" type propositions if a change in quantity from universal to particular is made (partial contraposition). Since the valid obverse is obtained for all the four types (A, E, I, and O types) of traditional propositions, yielding propositions with the contradictory of the original predicate, (full) contraposition is obtained by converting the obvert of the original proposition. For "E" statements, partial contraposition can be obtained by additionally making a change in quantity. Because nothing is said in the definition of contraposition with regard to the predicate of the inferred proposition, it can be either the original subject, or its contradictory, resulting in two contrapositives which are the obverts of one another in the "A", "O", and "E" type propositions.[12]

By example: from an original, 'A' type categorical proposition,

All residents are voters,

which presupposes that all classes have members and the existential import presumed in the form of categorical propositions, one can derive first by obversion the 'E' type proposition,

No residents are non-voters.

The contrapositive of the original proposition is then derived by conversion to another 'E' type proposition,

No non-voters are residents.

The process is completed by further obversion resulting in the 'A' type proposition that is the obverted contrapositive of the original proposition,

All non-voters are non-residents.

The schema of contraposition:[13]

Original proposition Obversion (Full) Contraposition Obverted (full) contraposition
(A) All S is P (E) No S is non-P (E) No non-P is S (A) All non-P is non-S
(E) No S is P (A) All S is non-P None None
(I) Some S is P (O) Some S is not non-P None None
(O) Some S is not P (I) Some S is non-P (I) Some non-P is S (O) Some non-P is not non-S

Notice that contraposition is a valid form of immediate inference only when applied to "A" and "O" propositions. It is not valid for "I" propositions, where the obverse is an "O" proposition which has no valid converse. The contraposition of the "E" proposition is valid only with limitations (per accidens). This is because the obverse of the "E" proposition is an "A" proposition which cannot be validly converted except by limitation, that is, contraposition plus a change in the quantity of the proposition from universal to particular.

Also, notice that contraposition is a method of inference which may require the use of other rules of inference. The contrapositive is the product of the method of contraposition, with different outcomes depending upon whether the contraposition is full, or partial. The successive applications of conversion and obversion within the process of contraposition may be given by a variety of names.

The process of the logical equivalence of a statement and its contrapositive as defined in traditional class logic is not one of the axioms of propositional logic. In traditional logic there is more than one contrapositive inferred from each original statement. In regard to the "A" proposition this is circumvented in the symbolism of modern logic by the rule of transposition, or the law of contraposition. In its technical usage within the field of philosophic logic, the term "contraposition" may be limited by logicians (e.g. Irving Copi, Susan Stebbing) to traditional logic and categorical propositions. In this sense the use of the term "contraposition" is usually referred to by "transposition" when applied to hypothetical propositions or material implications.

## References

1. ^ "Definition of CONTRAPOSITIVE". www.merriam-webster.com. Retrieved 2019-11-26.
2. ^ "The Law of Contraposition". beisecker.faculty.unlv.edu. Retrieved 2019-11-26.
3. ^ "Modus ponens and modus tollens | logic". Encyclopedia Britannica. Retrieved 2019-11-26.
4. ^ "Predicates and Quantified Statements II". www.csm.ornl.gov. Retrieved 2019-11-26.
5. ^ Smith, Douglas; Eggen, Maurice; St. Andre, Richard (2001), A Transition to Advanced Mathematics (5th ed.), Brooks/Cole, p. 37, ISBN 0-534-38214-2
6. ^ Cusick, Larry. "Proofs by Contrapositive". zimmer.csufresno.edu. Retrieved 2019-10-26.
7. ^ Franklin, J.; A. Daoud (2011). Proof in Mathematics: An Introduction. Sydney: Kew Books. ISBN 978-0-646-54509-7. (p. 50).
8. ^ Audun Jøsang 2016:92
9. ^ Audun Jøsang 2016:2
10. ^ Brody, Bobuch A. "Glossary of Logical Terms". Encyclopedia of Philosophy. Vol. 5-6, p. 61. Macmillan, 1973. Also, Stebbing, L. Susan. A Modern Introduction to Logic. Seventh edition, p.65-66. Harper, 1961, and Irving Copi's Introduction to Logic, p. 141, Macmillan, 1953. All sources give virtually identical definitions.
11. ^ Irving Copi's Introduction to Logic, pp. 123-157, Macmillan, 1953.
12. ^ Brody, p. 61. Macmillan, 1973. Also, Stebbing, p.65-66, Harper, 1961, and Copi, p. 141-143, Macmillan, 1953.
13. ^ Stebbing, L. Susan. A Modern Introduction to Logic. Seventh edition, p. 66. Harper, 1961.

## Sources

• Audun Jøsang, 2016, Subjective Logic; A formalism for Reasoning Under Uncertainty Springer, Cham, ISBN 978-3-319-42337-1
• Blumberg, Albert E. "Logic, Modern". Encyclopedia of Philosophy, Vol.5, Macmillan, 1973.
• Brody, Bobuch A. "Glossary of Logical Terms". Encyclopedia of Philosophy. Vol. 5-6, p. 61. Macmillan, 1973.
• Copi, Irving. Introduction to Logic. MacMillan, 1953.
• Copi, Irving. Symbolic Logic. MacMillan, 1979, fifth edition.
• Prior, A.N. "Logic, Traditional". Encyclopedia of Philosophy, Vol.5, Macmillan, 1973.
• Stebbing, Susan. A Modern Introduction to Logic. Cromwell Company, 1931.