LogicGates.org Open the simulatorSimulator

Tautology, contradiction and contingency

Some statements are true however the world turns out, some are false however it turns out, and the rest depend on the facts. A truth table sorts every statement into one of those three, and the same test decides whether an argument is valid.

The three kinds of statement

Tautology

True in every row. Its form alone makes it true.

p ∨ ¬p

Contradiction

False in every row. It can never be true.

p ∧ ¬p

Contingency

True in some rows and false in others. It depends on its letters.

p → q

Every statement is exactly one of the three. Two more words cut across them. A statement is satisfiable when at least one row makes it true, which covers tautologies and contingencies; a contradiction is unsatisfiable. And a tautology is also called a valid statement, or a logical truth.

Negation swaps the outer two: the negation of a tautology is a contradiction and the negation of a contradiction is a tautology, while the negation of a contingency is again a contingency. So a statement is a tautology exactly when its negation is unsatisfiable, which is how automated provers check tautologies in practice.

How to check with a truth table

  1. List every combination of truth values for the letters: 2n rows for n letters.
  2. Work out each part of the statement, innermost first, in its own column.
  3. Read the final column. All T: tautology. All F: contradiction. A mix: contingency. One F is enough to show a statement is not a tautology.

Here is p ∧ q → p ∨ q, "if p and q, then p or q":

pq p ∧ qp ∨ qp ∧ q → p ∨ q
TT TTT
TF FTT
FT FTT
FF FFT

The last column is all T, so the statement is a tautology. Try your own in the truth table calculator, which names the kind for any single statement.

Classified examples

Each statement's final column, rows from all true down, and what it makes the statement:

Statement and its final column Kind
p ∨ ¬p TT tautology satisfiable
p ∧ ¬p FF contradiction unsatisfiable
p → q TFTT contingency satisfiable
(p → q) ↔ (p ∧ ¬q) FFFF contradiction unsatisfiable
p ∧ q → p ∨ q TTTT tautology satisfiable

Famous tautologies

Many laws of logic are tautologies. Each of these was checked by truth table when this page was built.

Name Statement
Law of excluded middle p ∨ ¬p ✓ true in 2 of 2 rows
Law of non-contradiction ¬(p ∧ ¬p) ✓ true in 2 of 2 rows
Law of identity p → p ✓ true in 2 of 2 rows
Double negation ¬¬p ↔ p ✓ true in 2 of 2 rows
Modus ponens (p → q) ∧ p → q ✓ true in 4 of 4 rows
Modus tollens (p → q) ∧ ¬q → ¬p ✓ true in 4 of 4 rows
Hypothetical syllogism (p → q) ∧ (q → r) → (p → r) ✓ true in 8 of 8 rows
Contraposition (p → q) ↔ (¬q → ¬p) ✓ true in 4 of 4 rows
De Morgan's law ¬(p ∧ q) ↔ ¬p ∨ ¬q ✓ true in 4 of 4 rows
Principle of explosion p ∧ ¬p → q ✓ true in 4 of 4 rows
Peirce's law ((p → q) → p) → p ✓ true in 4 of 4 rows

The first two are the classical laws of thought: everything is either true or false, and nothing is both. The principle of explosion says a contradiction implies anything at all, which is why a single contradiction wrecks a set of assumptions. Peirce's law is a tautology that is hard to see without the truth table, and one that intuitionistic logic rejects. Every logical equivalence A ≡ B gives a tautology A ↔ B, and every rule of inference gives one in the shape (premises) → conclusion.

Tautologies and valid arguments

An argument is valid when its conclusion is true in every row where all its premises are true. Put the premises together with ∧ and draw an arrow to the conclusion, and that condition is exactly what makes the conditional true in every row. So:

An argument is valid if and only if (premise1 ∧ ... ∧ premisen) → conclusion is a tautology.

Argument As one statement
Modus ponens p → q, p ∴ q valid (p → q) ∧ p → q tautology
Hypothetical syllogism p → q, q → r ∴ p → r valid (p → q) ∧ (q → r) → p → r tautology
Affirming the consequent p → q, q ∴ p invalid (p → q) ∧ q → p contingency
Denying the antecedent p → q, ¬p ∴ ¬q invalid (p → q) ∧ ¬p → ¬q contingency

Both verdicts come from the engine: every valid argument has a tautology beside it, and every invalid one does not. The two invalid ones are the classic fallacies.

Tautologies and equivalence

Two statements A and B are logically equivalent, written A ≡ B, when A ↔ B is a tautology. For example ¬(p ∧ q) ↔ ¬p ∨ ¬q is true in all 4 of its 4 rows, so De Morgan's law ¬(p ∧ q) ≡ ¬p ∨ ¬q holds. The logical equivalence calculator runs this check for any two statements.

In circuits

A tautology is a circuit whose output is 1 for every input, and a contradiction one whose output is always 0. A designer who finds either has found gates that can be replaced by a constant. Asking whether some input makes a circuit output 1 is asking whether its formula is satisfiable, the SAT problem that hardware verification tools solve every day. The truth table generator shows the output column of any circuit expression.

Questions

What is a tautology in logic?

A tautology is a statement that is true in every row of its truth table, whatever truth values its letters take. p ∨ ¬p ("it is raining or it is not raining") is the simplest example. Its truth comes from its form alone, not from any fact about the world.

How do you prove that a statement is a tautology?

Build its truth table and check that the final column is true in every row. Alternatively, use logical equivalences to rewrite it step by step until you reach ⊤ (true), or show that its negation is a contradiction. To show a statement is not a tautology, one row where it is false is enough.

What is the difference between a tautology, a contradiction and a contingency?

A tautology is true in every row, a contradiction is false in every row, and a contingency is true in some rows and false in others. Every statement is exactly one of the three. The negation of a tautology is a contradiction and the other way round; the negation of a contingency is another contingency.

Is a contingency satisfiable?

Yes. A statement is satisfiable when at least one row makes it true, so every tautology and every contingency is satisfiable, and only contradictions are not. Deciding satisfiability for large formulas is the SAT problem, the first problem shown to be NP-complete.

What is the relationship between tautologies and valid arguments?

An argument with premises P1, ..., Pn and conclusion C is valid exactly when the single statement (P1 ∧ ... ∧ Pn) → C is a tautology. A valid argument can never lead from true premises to a false conclusion, and a false row of that conditional would be exactly such a case.

Is "all bachelors are unmarried" a tautology?

Not in propositional logic. Its truth depends on what "bachelor" means, not on its logical form alone. Philosophers call such statements analytic truths. A logical tautology stays true whatever its letters stand for: "if it is a bachelor, then it is a bachelor" is one.

Why is tautology a bad thing in writing but a good thing in logic?

In writing, a tautology is needless repetition, such as "free gift" or "it is what it is", because it adds no information. A logical tautology adds no information about the world either, which is exactly why it is useful: it is a rule that holds in every case, so it can be used in any proof.