{
  "id": "logical-negation",
  "title": "Logical Negation",
  "lang": "en",
  "source_lang": "en",
  "summary": "Logical negation is an operation that denies a proposition, reversing its truth value in classical logic and receiving different interpretations in nonclassical systems.",
  "category": "mathematics",
  "subcategory": "discrete-logic",
  "type": "concept",
  "aliases": [
    "Negation",
    "Logical NOT"
  ],
  "generated_at": "2026-11-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/logical-negation/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/logical-negation/",
      "json": "https://aiwiki.page/zh/logical-negation.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Logical negation is a unary operation in logic that forms the denial of a proposition. If \\(P\\) is a proposition, its negation is usually written \\(\\neg P\\) and read “not \\(P\\)” or “it is not the case that \\(P\\).” In classical logic, \\(\\neg P\\) is true exactly when \\(P\\) is false. Negation is fundamental to reasoning about contradictions, defining complements, expressing restrictions, and constructing mathematical proofs. Its interpretation is not identical in every logical system: some systems distinguish falsity from lack of evidence, or allow truth-value patterns beyond true and false."
    },
    {
      "heading": "Notation and scope",
      "text": "Common notations for negation include \\(\\neg P\\), \\(\\sim P\\), and, particularly in digital logic, \\(\\overline{P}\\). Programming languages often use !P or not P. These symbols belong to different notational conventions and need not have identical behavior outside their intended settings.\n\nNegation takes one formula as its argument, unlike binary operations such as conjunction and disjunction. Its scope is the formula to which it applies. Parentheses can therefore change the meaning substantially:\n\n- \\(\\neg(P\\land Q)\\): it is not the case that both \\(P\\) and \\(Q\\) hold.\n- \\((\\neg P)\\land Q\\): \\(P\\) does not hold, and \\(Q\\) does.\n- \\(\\neg(P\\lor Q)\\): neither \\(P\\) nor \\(Q\\) holds.\n\nNegation usually binds more tightly than conjunction or disjunction, so \\(\\neg P\\land Q\\) ordinarily means \\((\\neg P)\\land Q\\). Explicit parentheses avoid dependence on such conventions.\n\nNegation should also be distinguished from the denial of a particular word or predicate in ordinary language. The negation of “The object is red” is “The object is not red,” not “The object is blue.” A contrary assertion may exclude the original assertion without exhausting all the ways it could be false."
    },
    {
      "heading": "Classical semantics",
      "text": "In classical propositional logic, negation is truth-functional: its output depends only on the truth value of its argument. Its truth table is:\n\n\\(P\\) | \\(\\neg P\\)\nTrue | False\nFalse | True\n\nWriting true as \\(1\\) and false as \\(0\\), a classical truth valuation \\(v\\) satisfies\n\n\\[v(\\neg P)=1-v(P).\\]\n\nThus negation reverses the two truth values. This numerical representation describes a logical operation; it does not make negation ordinary numerical subtraction in general.\n\nThree central classical principles involve negation:\n\n- Double negation: \\(\\neg\\neg P\\) is logically equivalent to \\(P\\).\n- Noncontradiction: \\(\\neg(P\\land\\neg P)\\) is always true.\n- Excluded middle: \\(P\\lor\\neg P\\) is always true.\n\nThe law of excluded middle concerns truth, not knowledge: it does not assert that a person can determine which alternative holds.\n\nA proposition and its negation are contradictories in classical logic: exactly one is true. By contrast, two contrary propositions cannot both be true but may both be false."
    },
    {
      "heading": "Laws involving other logical operations",
      "text": "Negation interacts systematically with other connectives. De Morgan’s laws state that\n\n\\[\\neg(P\\land Q)\\equiv(\\neg P\\lor\\neg Q)\\]\n\nand\n\n\\[\\neg(P\\lor Q)\\equiv(\\neg P\\land\\neg Q).\\]\n\nHere \\(\\equiv\\) denotes logical equivalence: the formulas have the same truth value under every classical valuation.\n\nFor example, “It is not both cold and wet” permits three possibilities: cold but not wet, wet but not cold, or neither. It does not mean “It is neither cold nor wet.”\n\nFor material implication,\n\n\\[P\\to Q\\equiv\\neg P\\lor Q,\\]\n\nso its negation is\n\n\\[\\neg(P\\to Q)\\equiv P\\land\\neg Q.\\]\n\nThus a classical conditional is false precisely when its antecedent is true and its consequent is false. Negating “If the switch is on, the lamp is lit” requires the switch to be on and the lamp not to be lit; it does not merely reverse the direction of the conditional.\n\nClassical contraposition gives\n\n\\[(P\\to Q)\\equiv(\\neg Q\\to\\neg P).\\]\n\nThese equivalences depend on the logical system. Some are not available in their full classical form in constructive or other nonclassical logics."
    },
    {
      "heading": "Negation and quantifiers",
      "text": "In first-order logic, negation interacts with universal and existential quantification. Classically,\n\n\\[\\neg\\forall x\\,P(x)\\equiv\\exists x\\,\\neg P(x)\\]\n\nand\n\n\\[\\neg\\exists x\\,P(x)\\equiv\\forall x\\,\\neg P(x).\\]\n\nConsequently:\n\n- “Not every integer is even” means that at least one integer is not even.\n- “There is no integer with the stated property” means that every integer lacks that property.\n\n“Not all” must not be confused with “none.” The former denies universality; the latter denies the existence of any instance.\n\nWith multiple quantifiers, their order must be preserved while each quantifier is exchanged for the other as negation is moved inward. For example,\n\n\\[\\neg\\forall x\\,\\exists y\\,R(x,y) \\equiv \\exists x\\,\\forall y\\,\\neg R(x,y).\\]\n\nThese transformations are important when stating counterexamples, negating definitions, and checking the meaning of mathematical claims."
    },
    {
      "heading": "Negation in mathematical proof",
      "text": "In natural deduction, negation is often characterized through a symbol \\(\\bot\\), representing falsity or contradiction. A common definition is\n\n\\[\\neg P := P\\to\\bot.\\]\n\nTo prove \\(\\neg P\\), one temporarily assumes \\(P\\) and derives \\(\\bot\\), then discharges the assumption. This is negation introduction. From \\(P\\) together with \\(\\neg P\\), one may derive \\(\\bot\\).\n\nClassical proof by contradiction also permits proving \\(P\\) by assuming \\(\\neg P\\) and deriving a contradiction. The distinction matters: that argument first establishes \\(\\neg\\neg P\\), and the additional step to \\(P\\) uses double-negation elimination.\n\nA derivation of \\(P\\) and \\(\\neg P\\) is distinct from the rule that any conclusion follows from contradiction. The latter is called the principle of explosion. Classical and intuitionistic logic accept explosion, while some other systems do not.\n\nFailure to prove a proposition is not itself a proof of its negation. In a formal theory, a statement can be undecided by the available axioms: neither the statement nor its negation need be derivable. This distinction separates semantic claims about truth from syntactic claims about provability."
    },
    {
      "heading": "Algebraic and set-theoretic interpretations",
      "text": "In Boolean algebra, negation is represented by complementation. For an element \\(a\\), its complement \\(\\neg a\\) satisfies\n\n\\[a\\land\\neg a=0, \\qquad a\\lor\\neg a=1.\\]\n\nIn set theory, the corresponding operation is complement relative to a specified universe \\(U\\):\n\n\\[U\\setminus A=\\{x\\in U:\\neg(x\\in A)\\}.\\]\n\nThe universe is essential: a complement is not generally an unrestricted “set of everything not in \\(A\\).” Set union and intersection correspond to disjunction and conjunction, so De Morgan’s laws become identities about complements of unions and intersections.\n\nIn probability, if \\(A\\) is an event and \\(A^{c}\\) its complement, then\n\n\\[\\Pr(A^{c})=1-\\Pr(A).\\]\n\nThis describes the probability that an event does not occur, rather than a negative probability."
    },
    {
      "heading": "Nonclassical interpretations",
      "text": "Intuitionistic negation\n\nIn intuitionistic logic, \\(\\neg P\\) is ordinarily understood as \\(P\\to\\bot\\): a proof of \\(P\\) would yield a contradiction. Under the Brouwer–Heyting–Kolmogorov interpretation, proving a negation therefore requires a construction that transforms any proposed proof of \\(P\\) into a contradiction.\n\nIntuitionistic logic validates\n\n\\[P\\to\\neg\\neg P,\\]\n\nbut does not validate \\(\\neg\\neg P\\to P\\) for arbitrary \\(P\\). Refuting a refutation of a statement need not supply a constructive proof of the statement itself. Similarly, excluded middle is not a general intuitionistic theorem.\n\nSome classical negation laws survive unchanged, while others weaken. For instance,\n\n\\[\\neg(P\\lor Q)\\equiv\\neg P\\land\\neg Q\\]\n\nholds intuitionistically, whereas\n\n\\[\\neg(P\\land Q)\\to\\neg P\\lor\\neg Q\\]\n\nis not generally valid.\n\nMany-valued and paraconsistent systems\n\nMany-valued logics introduce additional truth values and specify how negation acts on them. In a common three-valued treatment, negation exchanges true and false while leaving an “unknown” value unchanged. There is no single negation operation shared by all many-valued systems.\n\nParaconsistent logic rejects the unrestricted inference of arbitrary conclusions from a contradiction. Depending on the system, \\(P\\) and \\(\\neg P\\) may coexist without making every formula derivable. Paraconsistency by itself does not require the philosophical claim that contradictions are actually true.\n\nThese differences show that negation is characterized partly by its surrounding semantics and inference rules, not solely by the symbol \\(\\neg\\)."
    },
    {
      "heading": "Computing and practical interpretation",
      "text": "In computer science, logical NOT is used in conditional expressions, search filters, digital circuits, and formal verification. A Boolean NOT gate implements the classical two-valued truth table.\n\nLogical negation must be distinguished from bitwise complement. Logical NOT reverses a Boolean condition, whereas bitwise complement reverses each bit in a representation. Their results and data types may differ.\n\nMissing information also complicates negation. In SQL’s three-valued treatment of NULL, negating an unknown comparison ordinarily yields unknown rather than true. In some logic-programming systems, negation as failure treats the failure of a specified proof search as grounds for accepting a negative condition. This is an operational convention, not unrestricted classical inference from absence of proof.\n\nNatural-language negation introduces further difficulties involving scope, context, and presupposition. “Everyone did not attend” may be read as either “Not everyone attended” or “Nobody attended.” Formal notation resolves such ambiguity by specifying exactly which proposition or quantified formula is negated."
    }
  ],
  "links": [
    "logic",
    "propositional-logic",
    "truth-table",
    "law-of-excluded-middle",
    "de-morgans-laws",
    "first-order-logic",
    "natural-deduction",
    "proof-by-contradiction",
    "double-negation-elimination",
    "boolean-algebra",
    "set-theory",
    "probability",
    "intuitionistic-logic",
    "bhk-interpretation",
    "paraconsistent-logic",
    "computer-science",
    "formal-verification"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}