In logic, negation, also called the logical not or logical complement, is an operation that takes a proposition P {\displaystyle P} to another proposition "not P {\displaystyle P} ", written ¬ P {\displaystyle \neg P} , ∼ P {\displaystyle {\mathord {\sim }}P} , P ′ {\displaystyle P^{\prime }} or P ¯ {\displaystyle {\overline {P}}} . It is interpreted intuitively as being true when P {\displaystyle P} is false, and false when P {\displaystyle P} is true. For example, if P {\displaystyle P} is "The dog runs", then "not P {\displaystyle P} " is "The dog does not run". An operand of a negation is called a negand or negatum. Negation is a unary logical connective. It may furthermore be applied not only to propositions, but also to notions, truth values, or semantic values more generally. In classical logic, negation is normally identified with the truth function that takes truth to falsity (and vice versa). In intuitionistic logic, according to the Brouwer–Heyting–Kolmogorov interpretation, the negation of a proposition P {\displaystyle P} is the proposition whose proofs are the refutations of P {\displaystyle P} .
Definition Classical negation is an operation on one logical value, typically the value of a proposition, that produces a value of true when its operand is false, and a value of false when its operand is true. Thus if statement P {\displaystyle P} is true, then ¬ P {\displaystyle \neg P} (pronounced "not P") would then be false; and conversely, if ¬ P {\displaystyle \neg P} is true, then P {\displaystyle P} would be false. The truth table of ¬ P {\displaystyle \neg P} is as follows:
Negation can be defined in terms of other logical operations. For example, ¬ P {\displaystyle \neg P} can be defined as P → ⊥ {\displaystyle P\rightarrow \bot } (where → {\displaystyle \rightarrow } is logical consequence and ⊥ {\displaystyle \bot } is absolute falsehood). Conversely, one can define ⊥ {\displaystyle \bot } as Q ∧ ¬ Q {\displaystyle Q\land \neg Q} for any proposition Q (where ∧ {\displaystyle \land } is logical conjunction). The idea here is that any contradiction is false, and while these ideas work in both classical and intuitionistic logic, they do not work in paraconsistent logic, where contradictions are not necessarily false. As a further example, negation can be defined in terms of NAND and can also be defined in terms of NOR. Algebraically, classical negation corresponds to complementation in a Boolean algebra, and intuitionistic negation to pseudocomplementation in a Heyting algebra. These algebras provide a semantics for classical and intuitionistic logic.
Notation The negation of a proposition p is notated in different ways, in various contexts of discussion and fields of application. The following table documents some of these variants:
The notation N p {\displaystyle Np} is Polish notation. In set theory, ∖ {\displaystyle \setminus } is also used to indicate 'not in the set of': U ∖ A {\displaystyle U\setminus A} is the set of all members of U that are not members of A. Regardless how it is notated or symbolized, the negation ¬ P {\displaystyle \neg P} can be read as "it is not the case that P", "not that P", or usually more simply as "not P".
Precedence
As a way of reducing the number of necessary parentheses, one may introduce precedence rules: ¬ has higher precedence than ∧, ∧ higher than ∨, and ∨ higher than →. So for example, P ∨ Q ∧ ¬ R → S {\displaystyle P\vee Q\wedge {\neg R}\rightarrow S} is short for ( P ∨ ( Q ∧ ( ¬ R ) ) ) → S . {\displaystyle (P\vee (Q\wedge (\neg R)))\rightarrow S.}
Here is a table that shows a commonly used precedence of logical operators.
Properties
… excerpt ends here. Continue reading the full article.


