Logical equivalence: meaning and examples
Two formulas are logically equivalent when they have the same truth value on every row of a truth table over their combined variables. Equivalent formulas can replace each other anywhere without changing any result.
Logical equivalence is written f ≡ g in textbooks, or as the tautology f <-> g; in the engine's word notation the biconditional is <->. It is a relation between formulas, not a value: the two formulas may be false on most rows, as long as they are false on the same ones. Every law of Boolean algebra is an equivalence, and so is every step the simplifier takes, which is why the simplifier can replace a subexpression by its rewritten form without affecting the function.
The artefact on this page compares f = A -> B with g = NOT A OR B, the implication-elimination law. Both output columns read true, true, false, true over the 4 rows, and the differing-rows list is empty. The equivalence check holds with the summary that f and g agree on every assignment. The checks on f alone show it is a contingency: the tautology check is violated with the counterexample A = TRUE, B = FALSE, the only row where an implication is false, and the satisfiable check holds with the witness A = FALSE, B = FALSE.
Equivalence is the question behind every refactoring of a condition, every rewrite of a rule into another normal form, and every claim that a circuit redesign preserves behaviour. In testing, a mutant that is equivalent to the original cannot be killed by any test, which is why equivalent mutants are a known nuisance. The term is confused with the biconditional operator (one formula) and with equality in a programming language, which compares two values on one row rather than two formulas on all rows.
Example
f := A -> B · outputg := NOT A OR B · output
Exact checks
Truth table (4 rows)
| # | A | B | f | g |
|---|---|---|---|---|
| 0 | FALSE | FALSE | TRUE | TRUE |
| 1 | FALSE | TRUE | TRUE | TRUE |
| 2 | TRUE | FALSE | FALSE | FALSE |
| 3 | TRUE | TRUE | TRUE | TRUE |
Plain-language reading
Beginnerf is true exactly when the following holds: if A is true, then B is true.
In every other case, f is false.
About the operators:
- An “if … then” condition only constrains the case where its “if” part holds: when the “if” part is false, the condition is satisfied whatever the “then” part is. It does not say the reverse.
Intermediatef is true exactly when the following holds: if A is true, then B is true.
In every other case, f is false.
Advancedf is true exactly when the following holds: if A is true, then B is true [material implication →].
In every other case, f is false.
Formal notation: A → B
The common slip
Testing equivalence on a few inputs and calling it done. Two formulas that agree on five rows can differ on the sixth; the equivalence check reads every row, and when the formulas differ it names the row with a counterexample assignment.
Questions
What if the two formulas use different variables?
The table is built over the union of their variables, and a variable missing from one formula simply does not affect that column. A and A OR (B AND NOT B) are equivalent over A and B, because the second formula ignores B on every row.
Related
See also
- Logical equivalence checker: two expressions, exact verdict, counterexample
- Implication elimination: A → B = NOT A OR B, and the →E rule
- Contrapositive in logic: meaning and examples
- Converse in logic: meaning and examples
- Biconditional (↔, if and only if): truth table and examples
- Implication as NOT A OR B, verified
Glossary
Generated from the Tangibool engine, semantics tangibool-semantics/1, engine 1.0.0, build . Every table, map, simplification and verdict on these pages was computed by the Tangibool engine when the site was built, and every claim was re-checked by the same exact checker the app uses. Limits are stated where they apply. © 2026 Foreranger LTD.