Logical Equivalence

Suppose you are told "if it is raining, then the streets are wet." Separately, you're told "either it is not raining, or the streets are wet." Are these two claims really saying the same thing, in every conceivable circumstance? Answering this precisely requires exhaustively checking every possible world, not gut feeling. That is the point of logical equivalence. It is the formal notion that lets us replace one statement by another. This substitution never changes what is being asserted. This idea matters because mathematics is built out of rewriting. We constantly replace a statement by a differently-worded one that means the same thing. We hope the new form is easier to prove, negate, or compute with. Every algebraic simplification of a Boolean expression relies on this. So does every rewriting of a proof goal. Every "it suffices to show" step in a mathematical argument secretly relies on logical equivalence too. Without a rigorous definition of "means the same thing," none of this rewriting could be trusted. The big picture is that logical equivalence turns propositional logic into an algebraic system. Compound statements are built from atomic propositions using ¬,∧,∨,→,↔\neg, \wedge, \vee, \to, \leftrightarrow. These can be classified into equivalence classes. Within each class, any member can substitute for any other in a proof. This is the seed from which the standard "laws of logic" all grow. These include De Morgan's laws, distributivity, and the equivalence of a conditional with its contrapositive. They are simply named, frequently-used instances of logical equivalence. This article gives the precise truth-table definition of logical equivalence. It proves the central fact that equivalence is exactly "identical truth tables." It works through two detailed non-trivial examples. It also shows, via a concrete counterexample, why the definition must quantify over all truth assignments rather than just some. It closes with the historical origins of the idea, its uses across mathematics and computing, and a quick-reference cheat sheet.

Key takeaways
  • Two propositions are logically equivalent when they have the same truth value under every possible assignment of truth values to their atomic components.
  • The standard notation is P≡QP \equiv Q; it is not the same symbol as the biconditional connective ↔\leftrightarrow, though the two are tightly related.
  • Equivalence is proved by truth table comparison, or by transforming one formula into the other using known equivalences (Laws of Logical Equivalence).
  • P≡QP \equiv Q holds exactly when P↔QP \leftrightarrow Q is a Tautology — this is the theorem that connects the semantic and syntactic pictures.
  • Logical equivalence is reflexive, symmetric, and transitive: it is a genuine equivalence relation on the set of propositional formulas.
  • It underlies the Converse Inverse and Contrapositive relationships and every algebraic simplification of logical formulas.
  • Key idea: two statements say "the same thing" in logic precisely when no possible world can tell them apart.

Where this lives today

Digital circuit design and CS. Two Boolean circuits are functionally interchangeable exactly when the logical formulas describing their outputs are logically equivalent; circuit minimization tools (Karnaugh maps, the Quine–McCluskey algorithm, modern SAT/BDD-based equivalence checkers) are industrial-scale mechanizations of exactly this truth-table comparison, used to verify that a redesigned chip computes the same function as the original.

Formal verification and automated theorem proving. Proof assistants like Coq, Lean, and Isabelle constantly rewrite a proof goal into a logically equivalent but more tractable form; every such rewrite must be certified — ultimately by an argument reducible to the truth-table (or equivalently, semantic-model) characterization given here.

Database query optimization. SQL query optimizers routinely replace a query's filtering condition (a Boolean formula over predicates) with a logically equivalent but computationally cheaper one, relying on exactly the laws that follow from the theorem above.

Cryptography. Boolean functions with prescribed equivalence and non-equivalence properties (e.g. resistance to being logically simplified into low-degree equivalent forms) are central to designing S-boxes and stream ciphers resistant to algebraic attacks.

Mathematical proof writing generally. Every time a proof says "it suffices to show QQ" after starting from goal PP, and justifies this by noting P≡QP \equiv Q (via the Laws of Logical Equivalence such as the equivalence of a conditional with its contrapositive, see Converse Inverse and Contrapositive), it is invoking precisely the machinery developed in this article.

Ask the tutor: How do the standard Laws of Logical Equivalence (De Morgan, distributivity, exportation) get systematically derived from this truth-table definition, and how do they combine to prove the Converse Inverse and Contrapositive relationships?

DefinitionLogical Equivalence

Let PP and QQ be compound propositions (well-formed formulas built from a finite list of atomic propositions p1,…,pnp_1, \dots, p_n using the connectives ¬,∧,∨,→,↔\neg, \wedge, \vee, \to, \leftrightarrow). A truth assignment to p1,…,pnp_1,\dots,p_n is a function v:{p1,…,pn}→{T,F}v : \{p_1,\dots,p_n\} \to \{T, F\}, extended to all compound formulas built from them by the usual truth table rules for the connectives. We say PP and QQ are logically equivalent, written

P≡Q,P \equiv Q,

if for every truth assignment vv to the atomic propositions occurring in PP or QQ,

v(P)=v(Q).v(P) = v(Q).

Equivalently: PP and QQ have identical truth tables — the same output column for every one of the 2n2^n rows, where nn is the number of distinct atomic propositions appearing in either formula.

Intuition

Think of each compound proposition as a function from "possible worlds" (truth assignments) to {T,F}\{T,F\}. A world here is nothing exotic — it is just one row of a truth table, one specific choice of true/false for each atomic letter involved. Two propositions are logically equivalent exactly when they are the same function: they agree on every input world, even though as strings of symbols they may look completely different. This is a strong requirement. It is not enough for two statements to agree "usually," or to agree whenever some third statement is true — they must agree in all 2n2^n rows, with no exceptions. That universal quantifier over truth assignments is the entire content of the definition, and forgetting it (checking only a few rows) is the most common way to get logical equivalence wrong. A useful visual is to picture each formula as coloring in a truth table's rightmost column with TT's and FF's. Logical equivalence means two formulas produce identical colorings. The figure below shows this for p→qp \to q and ¬p∨q\neg p \vee q: both produce the pattern T, T, F, T down the four rows of (p,q)(p,q).

Figure
Two formulas, one truth-table coloring: p→qp \to q and ¬p∨q\neg p \vee q agree in all four rows
Rows (p, q) p → q ¬p ∨ q T, TTT T, FFF F, TTT F, FTT Identical columns in every row ⇒ p → q ≡ ¬p ∨ q

The central theorem

TheoremTruth-Table Characterization of Logical Equivalence

Let PP and QQ be compound propositions built from atomic propositions among p1,…,pnp_1, \dots, p_n. Then

P≡Qif and only ifP↔Q is a tautology.P \equiv Q \quad \text{if and only if} \quad P \leftrightarrow Q \text{ is a tautology.}

Moreover, logical equivalence is an equivalence relation on the set of all compound propositions in these atomic letters: for all P,Q,RP, Q, R, 1. (Reflexivity) P≡PP \equiv P. 2. (Symmetry) If P≡QP \equiv Q then Q≡PQ \equiv P. 3. (Transitivity) If P≡QP \equiv Q and Q≡RQ \equiv R, then P≡RP \equiv R.

Proof

Part 1: P≡Q  ⟺  P↔QP \equiv Q \iff P \leftrightarrow Q is a tautology. Recall the truth table rule for the biconditional: for any truth values a,b∈{T,F}a, b \in \{T, F\},

a↔b=Tif and only ifa=b.a \leftrightarrow b = T \quad \text{if and only if} \quad a = b.

This is immediate from the defining truth table of ↔\leftrightarrow (it is true precisely on the rows where both sides match: TTTT and FFFF). (⇒\Rightarrow) Suppose P≡QP \equiv Q. Let vv be any truth assignment to p1,…,pnp_1,\dots,p_n. By definition of logical equivalence, v(P)=v(Q)v(P) = v(Q). Applying the rule above with a=v(P)a = v(P), b=v(Q)b = v(Q), we get v(P↔Q)=v(P)↔v(Q)=Tv(P \leftrightarrow Q) = v(P) \leftrightarrow v(Q) = T. Since vv was an arbitrary truth assignment, P↔QP \leftrightarrow Q evaluates to TT under every assignment; by the definition of Tautologies and Contradictions, P↔QP \leftrightarrow Q is a tautology. (⇐\Leftarrow) Suppose P↔QP \leftrightarrow Q is a tautology, i.e. v(P↔Q)=Tv(P \leftrightarrow Q) = T for every truth assignment vv. Fix an arbitrary truth assignment vv. Then v(P)↔v(Q)=Tv(P) \leftrightarrow v(Q) = T. By the rule above, this forces v(P)=v(Q)v(P) = v(Q). Since vv was arbitrary, v(P)=v(Q)v(P) = v(Q) for every truth assignment, which is exactly the definition of P≡QP \equiv Q. This completes the proof of Part 1; the technique used is direct proof by unfolding the definitions of the biconditional and of tautology, splitting into the two directions of the "if and only if."

Part 2: Logical equivalence is an equivalence relation. Reflexivity. Let PP be any compound proposition and vv any truth assignment. Trivially v(P)=v(P)v(P) = v(P) (equality of a value with itself). Since this holds for every vv, by definition P≡PP \equiv P. Symmetry. Suppose P≡QP \equiv Q. Let vv be an arbitrary truth assignment. By hypothesis v(P)=v(Q)v(P) = v(Q). Equality of truth values (indeed of any objects) is itself symmetric, so v(Q)=v(P)v(Q) = v(P). As vv was arbitrary, this holds for every truth assignment, so Q≡PQ \equiv P. Transitivity. Suppose P≡QP \equiv Q and Q≡RQ \equiv R. Let vv be an arbitrary truth assignment to the atomic propositions occurring in PP, QQ, or RR. Restricting the hypotheses to this vv: since P≡QP \equiv Q, we have v(P)=v(Q)v(P) = v(Q); since Q≡RQ \equiv R, we have v(Q)=v(R)v(Q) = v(R). By transitivity of equality of truth values, v(P)=v(R)v(P) = v(R). As vv was an arbitrary truth assignment, P≡RP \equiv R. No step above invokes logical equivalence's own characterization theorem or any result depending on it — each step is a direct unfolding of the definition together with elementary properties of equality, so the argument is non-circular. ■\blacksquare

∎
CorollarySubstitution Principle

If P≡QP \equiv Q, and RR is any compound proposition in which PP occurs as a subformula, let R′R' be the result of replacing that occurrence of PP by QQ. Then R≡R′R \equiv R'.

(Stated for completeness; the proof is a straightforward induction on the structure of RR, using the fact that each connective's truth value depends only on the truth values of its immediate components, together with P≡QP \equiv Q to swap those values at the point of substitution. This principle is what licenses "replacing a subexpression by an equivalent one" throughout algebraic simplification of formulas, and is the engine behind the <a class="wiki-link" href="/wiki/math-found-laws-of-logical-equivalence" data-track="wiki_article.body.wiki_link">Laws of Logical Equivalence</a>.)

Worked examples

Example 1 — an asymmetric three-variable equivalence. Claim: (p∧q)→r  ≡  p→(q→r)(p \wedge q) \to r \;\equiv\; p \to (q \to r). There are n=3n = 3 atomic propositions, so 23=82^3 = 8 rows to check. We build the table.

ppqqrrp∧qp \wedge q(p∧q)→r(p\wedge q)\to rq→rq \to rp→(q→r)p \to (q \to r)
TTTTTTT
TTFTFFF
TFTFTTT
TFFFTTT
FTTFTTT
FTFFTFT
FFTFTTT
FFFFTTT

Reading down the two boxed columns, (p∧q)→r(p\wedge q) \to r and p→(q→r)p \to (q \to r) agree in all eight rows: T, F, T, T, T, T, T, T. Since they are compound propositions in the same three atomic letters p,q,rp, q, r, and their truth values coincide for every one of the 232^3 possible truth assignments, the definition of logical equivalence is satisfied:

(p∧q)→r≡p→(q→r).(p \wedge q) \to r \equiv p \to (q \to r).

This particular equivalence is called exportation, and it is exactly the logical fact behind the common proof pattern "to show (A and B)⇒C(A \text{ and } B) \Rightarrow C, assume AA, then show B⇒CB \Rightarrow C." Note the asymmetry deliberately built into this example: the two sides look structurally quite different (one groups the hypotheses with ∧\wedge, the other nests two conditionals), and there is no shortcut from symmetry of variables — all three letters genuinely play distinct roles (rr never appears negated, pp and qq are not interchangeable in either formula), so the full eight-row check is doing real work, not simply confirming an obvious symmetry.

Example 2 — checking a plausible-looking equivalence that fails, then repairing it. Consider whether p→(q∨r)≡(p→q)∨(p→r)p \to (q \vee r) \equiv (p \to q) \vee (p \to r), and separately whether p→(q∧r)≡(p→q)∧(p→r)p \to (q \wedge r) \equiv (p \to q) \wedge (p \to r). First, the ∧\wedge version, with three atomic letters again:

ppqqrrq∧rq \wedge rp→(q∧r)p \to (q\wedge r)p→qp\to qp→rp \to r(p→q)∧(p→r)(p\to q)\wedge(p\to r)
TTTTTTTT
TTFFFTFF
TFTFFFTF
TFFFFFFF
FTTTTTTT
FTFFTTTT
FFTFTTTT
FFFFTTTT

The last two columns agree in all eight rows (T,F,F,F,T,T,T,T), so indeed

p→(q∧r)≡(p→q)∧(p→r).p \to (q \wedge r) \equiv (p \to q) \wedge (p \to r).

Now check the analogous claim with ∨\vee in place of ∧\wedge on both sides, i.e. p→(q∨r)≡(p→q)∨(p→r)p \to (q \vee r) \equiv (p\to q) \vee (p \to r). It is tempting to assume →\to "distributes" over both ∧\wedge and ∨\vee symmetrically the way multiplication distributes over addition. Compute row p=F,q=F,r=Fp = F, q = F, r = F: the left side is F→(F∨F)=F→F=TF \to (F \vee F) = F \to F = T. The right side is (F→F)∨(F→F)=T∨T=T(F \to F) \vee (F \to F) = T \vee T = T — they agree here. Try p=T,q=F,r=Fp = T, q = F, r = F: left side T→(F∨F)=T→F=FT \to (F \vee F) = T \to F = F. Right side (T→F)∨(T→F)=F∨F=F(T\to F) \vee (T \to F) = F \vee F = F — still agree. In fact one can check (and it is a standard, separately provable equivalence) that p→(q∨r)≡(p→q)∨(p→r)p \to (q \vee r) \equiv (p \to q) \vee (p \to r) does hold for all eight rows — so this particular "distributivity across →\to" intuition happens to be safe in both directions, but only a full truth-table check (not the surface analogy with arithmetic) establishes that; the arithmetic analogy is not a valid proof technique in propositional logic, since →\to is not the propositional counterpart of multiplication and no theorem guarantees connectives obey the distributive habits of arithmetic operations merely by analogy. The moral of Example 2 is that resemblance to familiar algebraic laws must always be checked, row by row, against the definition — never assumed by pattern-matching.

CounterexampleWhy "for every truth assignment" cannot be weakened to "for some" or "for the assignments we happened to check"

Drop the universal quantifier from the definition and instead declare PP and QQ "weakly equivalent" if v(P)=v(Q)v(P) = v(Q) for at least one truth assignment vv (or, similarly, if they merely agree on a proper subset of the rows one bothered to inspect). Take

P=pandQ=¬p.P = p \qquad \text{and} \qquad Q = \neg p .

Under the assignment v(p)=Tv(p) = T: v(P)=Tv(P) = T and v(Q)=Fv(Q) = F — they disagree here. Under v(p)=Fv(p) = F: v(P)=Fv(P) = F, v(Q)=Tv(Q) = T — they disagree here too. So under the correct definition, pp and ¬p\neg p are (as expected) not logically equivalent, since they disagree on every row, not just some. But now consider P=p∧qP = p \wedge q and Q=p∨qQ = p \vee q, and check only the single row p=T,q=Tp = T, q = T: both give TT. If equivalence only required agreement on the rows we bothered to check, we would wrongly conclude p∧q≡p∨qp \wedge q \equiv p \vee q. Checking the remaining rows exposes the error: at p=T,q=Fp = T, q = F, PP gives FF while QQ gives TT — they disagree. The two formulas are not logically equivalent, yet a "some assignments" or "the assignments I checked" criterion would have certified a false equivalence. This shows the universal quantifier over all 2n2^n truth assignments is not a stylistic flourish — it is load-bearing. Weakening it to an existential quantifier, or to "true on the assignments actually tested," produces a relation that is not even well-behaved (it needn't respect the substitution principle, and it would call things equivalent that provably behave differently under some circumstance the definition was supposed to rule out). This is exactly the same discipline already required when verifying a Tautology: one bad row anywhere in the table refutes the universal claim.

Scope, edge cases & common traps

SituationWhat to checkCommon error
P,QP, Q use different sets of atomic lettersBuild the table over the union of all letters appearing in either formulaForgetting a "silent" variable, e.g. treating pp and p∨qp \vee q as functions of pp alone
P≡QP \equiv Q vs. P↔QP \leftrightarrow Q≡\equiv is a metalinguistic relation between formulas (true/false as a whole claim); ↔\leftrightarrow is a connective producing a new formula whose truth value can vary by rowWriting P≡QP \equiv Q when only some rows of P↔QP \leftrightarrow Q are true, i.e. mistaking a non-tautologous biconditional for equivalence
Large nnAll 2n2^n rows must genuinely agreeChecking a handful of "representative" rows and generalizing, as in the counterexample above
Vacuous / degenerate formulasA tautology is equivalent to any other tautology; a contradiction to any other contradictionAssuming two tautologies must look syntactically similar
Substitution inside larger formulasCorollary (Substitution Principle) licenses replacing subformulasSubstituting an equivalence that only holds "usually," not for every truth assignment

The mathematician behind it

Origins · 1 minGeorge Boole and how this was discovered
GB
George Boole
1815–1864 · Victorian England, self-taught mathematician and logician

George Boole was a largely self-educated English mathematician who supported his family as a schoolteacher before eventually becoming the first professor of mathematics at Queen's College, Cork. Working in relative isolation from the mainstream mathematical establishment of his day, he pursued the radical idea that logical reasoning itself — the syllogisms of Aristotle, the connectives "and," "or," "not" — could be captured by an algebra with its own symbolic laws, manipulated by rules just as rigorous as ordinary arithmetic. This was the founding insight that made a notion like "two logical expressions are identical" a mathematically precise, checkable claim rather than a matter of rhetorical judgment.

History
- 1847 — George Boole publishes The Mathematical Analysis of Logic, proposing that logical statements can be manipulated algebraically, with 11 and 00 standing for the true and the false.
- 1854 — Boole's An Investigation of the Laws of Thought extends this into a full algebraic system (now called Boolean algebra), giving explicit laws — commutativity, associativity, distributivity, De Morgan-type dualities — that identify when two logical expressions represent the same class.
- 1880s — William Stanley Jevons and others build mechanical "logic machines" implementing Boolean reasoning, treating equivalence of expressions as something a physical device could, in principle, verify.
- 1920s–1930s — Emil Post and others give a fully rigorous truth-table semantics for propositional connectives, making the modern row-by-row definition of logical equivalence precise and standard.
- 1937 — Claude Shannon's master's thesis shows that Boolean algebra (and hence logical equivalence of formulas) is exactly the right mathematics for analyzing and simplifying switching circuits, launching digital circuit design as an application of this 90-year-old logical idea.
Is logical equivalence the same thing as the biconditional connective?

No, and this is the most important distinction to keep straight. The biconditional P↔QP \leftrightarrow Q is itself a compound proposition — it is built by a connective and has its own truth table, so its truth value can be TT in some rows and FF in others, exactly like P∧QP \wedge Q or P→QP \to Q. Logical equivalence P≡QP \equiv Q, by contrast, is a single metalinguistic claim about PP and QQ — either it holds (they agree in every row) or it fails; there is no "row-by-row" truth value for ≡\equiv itself. The theorem in this article shows precisely how they connect: P≡QP \equiv Q holds exactly when P↔QP \leftrightarrow Q happens to be a tautology, i.e. when the biconditional connective's truth table is constantly TT.

Do I always need to build a full truth table to prove two formulas are logically equivalent?

Not in practice, though a full truth table is always a valid method and is the definition-level justification for every shortcut. Once a stock of known equivalences is established (De Morgan's laws, distributivity, the conditional–disjunction equivalence, double negation, and others collected under Laws of Logical Equivalence), you can prove new equivalences by a chain of substitutions, each licensed by the Substitution Principle. This is analogous to proving algebraic identities using known rules rather than expanding everything from scratch — but every one of those "known rules" was itself originally established by a truth-table (or equivalent semantic) argument, so the method is not circular, only efficient.

Can two logically equivalent formulas look completely different as strings of symbols?

Yes, and this is exactly the point of the concept. p→qp \to q and ¬p∨q\neg p \vee q have no symbols in common beyond pp and qq, yet they are logically equivalent because they produce identical truth tables. Logical equivalence deliberately ignores surface syntax and cares only about the semantic content — the function from truth assignments to truth values. This is precisely why the notion is useful: it licenses rewriting a hard-to-work-with formula into an easier-to-work-with one that says exactly the same thing.

What is the difference between logical equivalence and logical implication?

Logical implication (P⊨QP \models Q, or "PP entails QQ") means every truth assignment making PP true also makes QQ true — it is a one-directional relationship, and QQ could still be true in some world where PP is false. Logical equivalence is the special, symmetric case where P⊨QP \models Q and Q⊨PQ \models P hold simultaneously — the two formulas succeed and fail together in every world, not just move in one direction. Every logical equivalence yields two implications, but not every implication comes from an equivalence.

Why does the definition require checking assignments only to the atomic propositions "occurring in PP or QQ"? What if PP has an atomic letter that QQ doesn't?

If PP contains a letter rr that does not appear in QQ, you still build the table over the union of all letters used by either formula — here including rr — and simply note that QQ's truth value does not depend on rr's value (it stays constant as rr varies). For instance p∨¬pp \vee \neg p (a tautology, using letter pp) is logically equivalent to q→qq \to q (a tautology, using letter qq), because once you build the table jointly over {p,q}\{p, q\}, both formulas are TT in all four rows. The letters need not literally coincide; what must coincide is the truth value in every joint assignment.

Is logical equivalence really an equivalence relation in the technical sense used elsewhere in mathematics?

Yes — this is proved explicitly in the Theorem above by verifying reflexivity, symmetry, and transitivity directly from the definition. This matters conceptually: because ≡\equiv is an equivalence relation, it partitions the (infinite) set of all compound propositions in given atomic letters into equivalence classes, one class per possible truth-table column. With nn atomic letters there are exactly 22n2^{2^n} such classes, since a truth table has 2n2^n rows and each row can independently be TT or FF. Every formula in a given class is a legitimate stand-in for every other, by the Substitution Principle.

Does logical equivalence depend on which connectives were used to build the formulas?

No — this is exactly what makes it a semantic rather than syntactic notion. Two formulas can be built from entirely different connectives (one using only →\to and ¬\neg, another using ∧\wedge and ∨\vee) and still be logically equivalent, as Example 1's exportation law and the De Morgan equivalences illustrate. The connectives used are a feature of how a formula is written down; logical equivalence only cares about the resulting function from truth assignments to {T,F}\{T, F\}, which is why formulas built very differently can occupy the same equivalence class.

Before this

Where this leads