Truth Tables
Compute a formula under every assignment to classify it and test logical equivalence.
A truth table lists every possible assignment of true/false to the atomic sentences and computes the formula’s value in each. With distinct atoms there are rows — two for one atom, four for two, eight for three.
The tool below builds the full table for any formula and classifies it. Try , then , then .
Type symbols or ASCII: ~ ! → ¬, & → ∧, | → ∨, -> → →, <-> → ↔.
| P | Q | (P → Q) ↔ (¬P ∨ Q) |
|---|---|---|
| T | T | T |
| T | F | T |
| F | T | T |
| F | F | T |
Three kinds of formula
Reading the final column tells you which kind of formula you have:
- A tautology is true in every row — a logical truth, e.g. .
- A contradiction is false in every row, e.g. .
- A contingent formula is true in some rows and false in others — most formulas are contingent.
Logical equivalence
Two formulas are logically equivalent when they have the same truth value in every row. A clean test: and are equivalent exactly when is a tautology. The default formula above shows one famous equivalence — is equivalent to , so the biconditional between them comes out true in every row.
Some equivalences worth knowing (each is a tautology when written as a biconditional):
- Double negation:
- De Morgan: and
- Contraposition:
Check any of these by typing it above — a true-in-every-row column confirms it.
Why this matters
Truth tables are a decision procedure: a mechanical, always-terminating method that answers “is this a logical truth?” and “are these equivalent?” for sentence logic. That is exactly the kind of guarantee that makes a logic formal — no cleverness required, just fill in the table.
Takeaways
- A formula over atoms has a -row truth table.
- Tautology (always true), contradiction (always false), contingent (mixed).
- and are logically equivalent iff is a tautology.
- The table is a complete decision procedure for sentence logic.
References
- Paul Teller, A Modern Formal Logic Primer, Prentice Hall (1989) — free at tellerprimer.ucdavis.edu. Curriculum follows the primer; explanations and examples here are original.