This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Not

!expr
is the logical NOT function. It gives False if expr is True, and True if it is False.
  • Not gives symbolic results when necessary, applying various simplification rules to them.
  • If you are using Mathematica with a text-based front end, then you cannot use the notation !expr for Not[expr] if it appears at the very beginning of a line. In this case, !expr is interpreted as a shell escape. »
Negate assertions:
Symbolic negation:
Enter using Esc not Esc:
Negate assertions:
In[1]:=
Click for copyable input
Out[1]=
 
Symbolic negation:
In[1]:=
Click for copyable input
Out[1]=
 
Enter using Esc not Esc:
In[1]:=
Click for copyable input
Out[1]=
Double negation simplifies to the identity:
Negate equations and inequalities:
Negate quantifiers:
TraditionalForm formatting:
Negate conditions in Mathematica code:
Find the area of the complement of a set given by algebraic conditions:
This shows the set:
Truth table for Not:
Use BooleanConvert to simplify the negation of Implies:
De Morgan's laws relate And, Or, and Not:
Negation of the condition for Boole function:
Use parentheses to ensure beginning a line is not taken as a shell escape when using a terminal interface:
New in 1 | Last modified in 3