In logic, contraposition is an inference that says that a conditional statement is logically equivalent to its contrapositive. The contrapositive of the statement has its antecedent and consequent inverted and flipped: the contrapositive of is thus . For instance, the proposition "All bats are mammals" can be restated as the conditional "If something is a bat, then it is a mammal". Now, the law says that statement is identical to the contrapositive "If something is not a mammal, then it is not a bat."
The contrapositive can be compared with three other relationships between conditional statements:
Note that if is true and we are given that Q is false, , it can logically be concluded that P must be false, . This is often called the law of contrapositive, or the modus tollens rule of inference.