Any compound logical formula you can write down falls into exactly one of three buckets:
- Tautology — true no matter what truth values you assign. Bulletproof.
- Contradiction — false no matter what you assign. A logical dead end.
- Contingent — sometimes true, sometimes false. An ordinary formula whose truth depends on reality.
The detector below sweeps through four named formulas and classifies each on the spot. You read the truth table, the detector reports the verdict, and after four spins your pattern-recognition for the three bucket shapes is locked in.
Drag through the detector
The three buckets, one paragraph each
Tautology
A tautology is a formula whose result column is T in every row. The canonical example is p \lor \lnot p — the law of the excluded middle. Either p holds or its negation does; nothing else is possible, so the disjunction is true in every world. Another workhorse tautology is the contrapositive equivalence (p \Rightarrow q) \Leftrightarrow (\lnot q \Rightarrow \lnot p). Tautologies are the "theorems of logic itself" — true before any subject-matter facts enter the room.
Contradiction
A contradiction has F in every row. The canonical example is p \land \lnot p — you cannot simultaneously say "it is raining" and "it is not raining." The law of non-contradiction forbids it. Any formula logically equivalent to p \land \lnot p is also a contradiction, and landing on one of these inside a proof is exactly what Proof by Contradiction uses to refute an assumption.
Contingent
A contingent formula has at least one T row and at least one F row. Most formulas you meet are contingent: p \Rightarrow q, p \land q, p \lor q, and every ordinary statement about specific objects ("n is prime", "this triangle is equilateral"). Contingent formulas can be true or false depending on the world.
The one-paragraph algorithm
Why the algorithm works: a formula with n propositional variables has a truth table with 2^n rows — one for every assignment of T/F to the variables. Computing the result column fills in every possible scenario. If it is constant T everywhere, no assignment can falsify the formula (tautology). If constant F, no assignment can satisfy it (contradiction). Otherwise both T and F occur somewhere, which is the definition of contingent.
Algorithm.
- List the 2^n truth-value assignments for the n variables.
- Compute the final column.
- Scan it: all T → tautology; all F → contradiction; mixed → contingent.
For n up to about 4 you can do this by hand. Beyond that, logic software (SAT solvers) takes over — and the classification problem becomes the famous NP-complete problem.
A subtle pattern: the negation pattern
If \varphi is a tautology, then \lnot \varphi is a contradiction, and vice versa.
That is why \lnot(p \land \lnot p) on the detector's fourth card is a tautology — it is the negation of the contradiction on the second card. The two cards are twins through negation.
Contingent formulas, by contrast, stay contingent under negation. If p \Rightarrow q is contingent, so is \lnot(p \Rightarrow q) \equiv p \land \lnot q.
Why this classification matters
Tautologies are what proofs ultimately ride on. Every logical equivalence — De Morgan, contrapositive, double negation — is a tautology of the form \varphi \Leftrightarrow \psi. Whenever you "rewrite one expression into an equivalent form," you are applying a tautology as a substitution rule. Contradictions are the detectors that power Proof by Contradiction: deriving one means your starting assumption was false. Contingent formulas are the ordinary sentences of mathematics, whose truth values your theorems have to determine.
Related: Logic and Propositions · Implication as a Promise · Vacuous Truth — Empty-Box Demo · Proof by Contradiction