{
  "id": "logical-equivalence",
  "title": "Logical Equivalence",
  "lang": "en",
  "source_lang": "en",
  "summary": "Logical equivalence is the relation between formulas that have the same truth value under every interpretation allowed by a specified logic.",
  "category": "mathematics",
  "subcategory": "discrete-logic",
  "type": "concept",
  "aliases": [
    "Semantic equivalence",
    "logical equipollence"
  ],
  "generated_at": "2026-11-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/logical-equivalence/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/logical-equivalence/",
      "json": "https://aiwiki.page/zh/logical-equivalence.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Logical equivalence is the relation between formulas that agree in truth value under every interpretation permitted by a specified system of logic. In classical propositional logic, two formulas are logically equivalent when every assignment of truth values to their propositional variables gives them the same truth value. In first-order logic, they must agree in every structure and under every assignment to their free variables. Logical equivalence makes it possible to replace one expression with another without changing its logical content."
    },
    {
      "heading": "Definition and notation",
      "text": "For classical propositional formulas \\(\\varphi\\) and \\(\\psi\\), logical equivalence is defined by\n\n\\[\\varphi \\equiv \\psi \\quad\\Longleftrightarrow\\quad v(\\varphi)=v(\\psi) \\text{ for every truth assignment }v.\\]\n\nHere, a truth assignment assigns either true or false to each propositional variable, and the meanings of the logical connectives determine the values of compound formulas.\n\nFor example,\n\n\\[p\\to q \\equiv \\neg p\\lor q.\\]\n\nBoth formulas are false precisely when \\(p\\) is true and \\(q\\) is false.\n\nCommon notations include \\(\\varphi\\equiv\\psi\\) and \\(\\varphi\\Leftrightarrow\\psi\\), although conventions vary. The notation\n\n\\[\\models\\varphi\\leftrightarrow\\psi\\]\n\nstates that the biconditional between the formulas is logically valid.\n\nLogical equivalence is an equivalence relation:\n\n- Reflexivity: \\(\\varphi\\equiv\\varphi\\).\n- Symmetry: if \\(\\varphi\\equiv\\psi\\), then \\(\\psi\\equiv\\varphi\\).\n- Transitivity: if \\(\\varphi\\equiv\\psi\\) and \\(\\psi\\equiv\\chi\\), then \\(\\varphi\\equiv\\chi\\).\n\nThe relation depends on the underlying logic and its semantics. Unless otherwise stated, elementary equivalence laws usually refer to classical logic."
    },
    {
      "heading": "Equivalence, biconditionals, and entailment",
      "text": "Logical equivalence must be distinguished from a biconditional. The expression \\(\\varphi\\leftrightarrow\\psi\\) is a formula in the language being studied; the assertion \\(\\varphi\\equiv\\psi\\) is ordinarily a statement about two formulas.\n\nA biconditional can be true under one interpretation without being valid under all interpretations. For example, \\(p\\leftrightarrow q\\) is true whenever \\(p\\) and \\(q\\) have matching truth values, but the independent variables \\(p\\) and \\(q\\) are not logically equivalent.\n\nLogical equivalence can also be characterized through mutual logical consequence:\n\n\\[\\varphi\\equiv\\psi \\quad\\Longleftrightarrow\\quad \\varphi\\models\\psi \\text{ and } \\psi\\models\\varphi.\\]\n\nOne-way consequence is weaker. For instance,\n\n\\[p\\land q\\models p,\\]\n\nbut \\(p\\) does not entail \\(p\\land q\\). The conjunction therefore is not equivalent to \\(p\\).\n\nEquivalence concerns logical truth conditions rather than wording, subject matter, or explanatory role. Two formulas may look very different yet be equivalent. Conversely, two statements that happen to be true in the actual world need not be logically equivalent."
    },
    {
      "heading": "Truth tables",
      "text": "A truth table gives a direct test of equivalence for propositional formulas. The formulas are equivalent exactly when their final columns match in every row.\n\nFor implication and its disjunctive form:\n\n\\(p\\) | \\(q\\) | \\(p\\to q\\) | \\(\\neg p\\lor q\\)\nT | T | T | T\nT | F | F | F\nF | T | T | T\nF | F | T | T\n\nA single row in which the values differ is enough to disprove equivalence. Such a row is a countervaluation.\n\nFor example, an implication is not generally equivalent to its converse:\n\n\\[p\\to q\\not\\equiv q\\to p.\\]\n\nSetting \\(p\\) false and \\(q\\) true makes the first implication true and the second false.\n\nFor \\(n\\) distinct propositional variables, a complete truth table has \\(2^n\\) rows. This makes the method decisive for any finite propositional input, but potentially expensive for large formulas."
    },
    {
      "heading": "Principal equivalence laws",
      "text": "Standard laws provide reusable transformations without constructing a full truth table each time. In the following formulas, \\(\\top\\) means truth and \\(\\bot\\) means falsehood.\n\nLaw | Equivalence\nDouble negation | \\(\\neg\\neg p\\equiv p\\)\nCommutativity | \\(p\\land q\\equiv q\\land p\\), and \\(p\\lor q\\equiv q\\lor p\\)\nAssociativity | \\((p\\land q)\\land r\\equiv p\\land(q\\land r)\\), with a corresponding law for \\(\\lor\\)\nDistributivity | \\(p\\land(q\\lor r)\\equiv(p\\land q)\\lor(p\\land r)\\), with the dual law interchanging \\(\\land\\) and \\(\\lor\\)\nIdempotence | \\(p\\land p\\equiv p\\), and \\(p\\lor p\\equiv p\\)\nAbsorption | \\(p\\lor(p\\land q)\\equiv p\\), and \\(p\\land(p\\lor q)\\equiv p\\)\nDe Morgan’s laws | \\(\\neg(p\\land q)\\equiv\\neg p\\lor\\neg q\\), and \\(\\neg(p\\lor q)\\equiv\\neg p\\land\\neg q\\)\nImplication | \\(p\\to q\\equiv\\neg p\\lor q\\)\nContraposition | \\(p\\to q\\equiv\\neg q\\to\\neg p\\)\nBiconditional | \\(p\\leftrightarrow q\\equiv(p\\to q)\\land(q\\to p)\\)\nExcluded middle | \\(p\\lor\\neg p\\equiv\\top\\)\nNoncontradiction | \\(p\\land\\neg p\\equiv\\bot\\)\n\nDe Morgan’s laws describe how negation interchanges conjunction and disjunction. Idempotence and absorption remove redundant components. Together with the other laws, these identities support systematic simplification and conversion to standard forms.\n\nThe letters in these laws can stand for arbitrary formulas, not merely individual variables."
    },
    {
      "heading": "Replacement and algebraic structure",
      "text": "In classical propositional logic, logical equivalence permits replacement: an occurrence of a formula may be replaced by an equivalent formula inside a larger formula without changing the larger formula’s truth conditions.\n\nIf \\(C[-]\\) is a formula with a designated position, then\n\n\\[\\varphi\\equiv\\psi \\quad\\Longrightarrow\\quad C[\\varphi]\\equiv C[\\psi].\\]\n\nFor example, replacing \\(p\\to q\\) with \\(\\neg p\\lor q\\) yields\n\n\\[r\\land(p\\to q) \\equiv r\\land(\\neg p\\lor q).\\]\n\nThis property follows because classical connectives determine their outputs solely from the truth values of their inputs.\n\nGrouping formulas into equivalence classes under logical equivalence produces an algebraic structure. Conjunction, disjunction, and negation induce operations on these classes, yielding a Boolean algebra. Thus, formulas with different syntax can represent the same Boolean element.\n\nReplacement requires more care in languages involving variable binding or operators whose meanings depend on context. First-order substitutions must avoid accidental capture of free variables. In natural-language reports about belief, expressions agreeing in truth value cannot automatically be substituted without changing the report’s meaning."
    },
    {
      "heading": "First-order equivalence and background theories",
      "text": "For first-order formulas, the semantic definition is\n\n\\[\\varphi\\equiv\\psi \\quad\\Longleftrightarrow\\quad \\mathcal M,s\\models\\varphi \\text{ exactly when } \\mathcal M,s\\models\\psi\\]\n\nfor every structure \\(\\mathcal M\\) and variable assignment \\(s\\).\n\nA structure supplies a domain and interpretations of the language’s nonlogical symbols. Assignments are needed for formulas with free variables; for sentences, truth is independent of assignments.\n\nImportant quantifier equivalences include\n\n\\[\\neg\\forall x\\,\\varphi\\equiv\\exists x\\,\\neg\\varphi, \\qquad \\neg\\exists x\\,\\varphi\\equiv\\forall x\\,\\neg\\varphi.\\]\n\nQuantifier order generally cannot be reversed:\n\n\\[\\forall x\\,\\exists y\\,R(x,y) \\not\\equiv \\exists y\\,\\forall x\\,R(x,y).\\]\n\nThe first allows a different witness \\(y\\) for each \\(x\\); the second requires a single witness that works for every \\(x\\).\n\nEquivalence can also be defined relative to a theory \\(T\\), a set of background assumptions:\n\n\\[\\varphi\\equiv_T\\psi \\quad\\Longleftrightarrow\\quad T\\models\\varphi\\leftrightarrow\\psi.\\]\n\nThe formulas then need to agree only in models of \\(T\\). For example, in the language of groups with identity symbol \\(e\\), the formulas \\(x\\cdot x=x\\) and \\(x=e\\) are equivalent relative to the group axioms, but not in arbitrary structures interpreting those symbols. This distinction is central to model theory."
    },
    {
      "heading": "Semantic and provable equivalence",
      "text": "Semantic equivalence is defined through interpretations. Provable equivalence is defined through a proof system: a biconditional can be derived, or each formula can be derived from the other under the system’s rules.\n\nThese notions are connected by soundness and completeness. Soundness guarantees that a derivable equivalence is semantically valid. Completeness guarantees that every semantic equivalence can be established within the proof system.\n\nFor standard classical first-order calculi, Gödel’s completeness theorem supplies this connection. Completeness does not mean that an algorithm can always decide first-order equivalence: there is no general terminating decision procedure for arbitrary first-order formulas.\n\nIn natural deduction, establishing a biconditional commonly requires two derivations: one from \\(\\varphi\\) to \\(\\psi\\), and another from \\(\\psi\\) to \\(\\varphi\\)."
    },
    {
      "heading": "Computational uses and limitations",
      "text": "Logical equivalence underlies formula simplification, digital circuit comparison, automated reasoning, and formal verification.\n\nFor classical propositional formulas, an equivalence test can be reduced to a satisfiability test:\n\n\\[\\varphi\\equiv\\psi \\quad\\Longleftrightarrow\\quad (\\varphi\\land\\neg\\psi)\\lor(\\neg\\varphi\\land\\psi) \\text{ is unsatisfiable}.\\]\n\nThe displayed formula expresses exclusive OR: it is true exactly when the original formulas disagree. A satisfying assignment therefore supplies a counterexample to equivalence.\n\nFor arbitrary propositional formulas, equivalence testing is coNP-complete under standard polynomial-time reductions. Practical solvers can nevertheless handle many large structured instances.\n\nAn important distinction is between equivalence and equisatisfiability. Equisatisfiable formulas merely agree on whether some satisfying interpretation exists; they need not have the same satisfying interpretations. Some efficient transformations introduce auxiliary variables and preserve satisfiability rather than equivalence over the enlarged vocabulary. This is sufficient for many satisfiability tasks, but not for unrestricted replacement."
    },
    {
      "heading": "Dependence on the logical system",
      "text": "Classical equivalences do not automatically remain valid in other logics.\n\nIn intuitionistic logic,\n\n\\[p\\to\\neg\\neg p\\]\n\nis valid, but double-negation elimination, \\(\\neg\\neg p\\to p\\), is not valid in general. Consequently, \\(p\\) and \\(\\neg\\neg p\\) are not generally equivalent there. Likewise, the classical identification of \\(p\\to q\\) with \\(\\neg p\\lor q\\) does not hold intuitionistically.\n\nIn many-valued and paraconsistent logics, equivalence must be defined with attention to the semantics. Having identical semantic values, mutually entailing one another, and having a valid biconditional need not characterize the same relation. An equivalence claim therefore requires an underlying logic and, where relevant, an explicit set of background assumptions."
    }
  ],
  "links": [
    "logic",
    "propositional-logic",
    "first-order-logic",
    "equivalence-relation",
    "logical-consequence",
    "truth-table",
    "de-morgans-laws",
    "idempotence",
    "equivalence-class",
    "boolean-algebra",
    "model-theory",
    "godels-completeness-theorem",
    "algorithm",
    "natural-deduction",
    "formal-verification",
    "exclusive-or",
    "intuitionistic-logic",
    "double-negation-elimination",
    "paraconsistent-logic"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}