In predicate logic, the contrapositive (or transposition) of the statement "p implies q" is "not-q implies not-p." These are logically equivalent. We can find examples in ordinary English. We might form the contrapositive of "If there is fire here, then there is oxygen here," like this: "If there is no oxygen here, then there is no fire here."
This can be also proved using truth table:
p q | p -> q | not(q) -> not(p)
+--------+------------------ T T | T | T T F | F | F F T | T | T F F | T | T
Notice that while in the conditional statement, while the converse is not equivalent, the converse with each negation is equivalent.
In Aristotelian logic (or categorical logic), moreover, categorical propositions can have contrapositives.
- The contrapositive of "All S is P" is "All P is S." (These are "A" propositions.)
- The contrapositive of "No S is P" is "No P is S." (These are "E" propositions.)
- The contrapositive of "Some S is P" is "Some P is S." (These are "I" propositions.)
- The contrapositive of "Some S is not P" is "Some P is not S." (These are "O" propositions.)
However, so-called "A" and "O" propositions are not logically equivalent to their contrapositives. For example, from "all violins are musical instruments," we cannot infer "all musical instruments are violins." Similarly, from "some plants are not trees," we cannot infer "some trees are not plants."