In logic, a contingency is a proposition that may be either true or false, and is not necessarily one or the other.
For example, the proposition “Sam is wearing a hat” is a contingency — it is not always or neccessarily the case that Sam is wearing a hat. The proposition is said to be contingent on whether or not Sam is, in actuality, wearing a hat.
The contingency of propositions is not normally an issue in propositional or first-order logic, but in modal logic, there is an important distinction there. However, contingency of formulae is universally important, as it distinguishes normal formulae from tautologies and contradictions.
In propositional logic, a formula is said to be contingent when it may be either true or false, depending on the valuation of its terms.
For example, the formulas ¬A and A ∨ B are both contingent. On the valuation A=True, B=False, the first formula is false and the second is true. On the valuation A=False, B=False, then the first formula is true and the second is false.