In logic and mathematics, contraposition, or transposition, refers to the inference of going from a conditional statement into its logically equivalent contrapositive, and an associated proof method known as . The contrapositive of a statement has its antecedent and consequent negated and swapped.

Conditional statement . In formulas: the contrapositive of is .

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.

Contraposition () can be compared with three other operations:

Inversion (the inverse), "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), "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), "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 is true and one is given that is false (i.e., ), then it can logically be concluded that must be also false (i.e., ). This is often called the law of contrapositive, or the modus tollens rule of inference.

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:

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:

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

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 by checking that all girls in the United States do indeed have brown hair, or try to prove 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 , and equivalently .

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:

This states that, "if , then ", or, "if Socrates is a man, then Socrates is human." In a conditional such as this, is the antecedent, and 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:

That is, "If not-, then not-", or, more clearly, "If 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, , or "All s are s," is contraposed to , or "All non-s are non-s."

Sequent notation

The transposition rule may be expressed as a sequent:

where is a metalogical symbol meaning that is a syntactic consequence of in some logical system; or as a rule of inference:

where the rule is that wherever an instance of "" appears on a line of a proof, it can be replaced with ""; or as the statement of a truth-functional tautology or theorem of propositional logic. The principle was stated as a theorem of propositional logic by Russell and Whitehead in Principia Mathematica as

where and are propositions expressed in some formal system.

Proofs

Simple proof by definition of a conditional

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

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

Simple proof by contradiction

Let:

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):

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

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:

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

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.

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

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

We define as equal to "", and as equal to (from this, is equal to , which is equal to just ):

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:

By reverting R and S back into and , we then obtain the desired contrapositive:

In classical propositional calculus system In Hilbert-style deductive systems for propositional logic, only one side of the transposition is taken as an axiom, and the other is a theorem. We describe a proof of this theorem in the system of three axioms proposed by Jan Łukasiewicz: A1. A2. A3.

(A3) already gives one of the directions of the transposition. The other side, , is proven below, using the following lemmas proven here: (DN1) - Double negation (one direction) (DN2) - Double negation (another direction) (HS1) - one form of Hypothetical syllogism (HS2) - another form of Hypothetical syllogism. We also use the method of the hypothetical syllogism metatheorem as a shorthand for several proof steps.

The proof is as follows:       (instance of the (DN2))       (instance of the (HS1)       (from (1) and (2) by modus ponens)       (instance of the (DN1))       (instance of the (HS2))       (from (4) and (5) by modus ponens)       (from (3) and (6) using the hypothetical syllogism metatheorem)       (instance of (A3))       (from (7) and (8) using the hypothetical syllogism metatheorem)

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.

Traditional logic

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).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. 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.