WOLFRAM

!expr

is the logical NOT function. It gives False if expr is True, and True if it is False.

Details

  • Not[expr] can be input in StandardForm and InputForm as ¬expr. The character ¬ can be entered as !, not, or [Not]. »
  • Not gives symbolic results when necessary, applying various simplification rules to them.
  • If you are using the Wolfram System with a textbased 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. »

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

Negate assertions:

Out[1]=1

Symbolic negation:

Out[1]=1

Enter using not:

Out[1]=1

Scope  (4)Survey of the scope of standard use cases

Double negation simplifies to the identity:

Out[1]=1

Negate equations and inequalities:

Out[1]=1
Out[2]=2

Negate quantifiers:

Out[1]=1
Out[2]=2

TraditionalForm formatting:

Applications  (2)Sample problems that can be solved with this function

Negate conditions in Wolfram Language code:

Out[1]=1

Find the area of the complement of a set given by algebraic conditions:

Out[1]=1

This shows the set:

Out[2]=2

Properties & Relations  (4)Properties of the function, and connections to other functions

Truth table for Not:

Out[1]=1

Use BooleanConvert to simplify the negation of Implies:

Out[1]=1

De Morgan's laws relate And, Or, and Not:

Out[1]=1
Out[2]=2

Negation of the condition for Boole function:

Out[1]=1
Out[2]=2

Possible Issues  (1)Common pitfalls and unexpected behavior

Use parentheses to ensure ! beginning a line is not taken as a shell escape when using a terminal interface:

Out[1]=1
Wolfram Research (1988), Not, Wolfram Language function, https://reference.wolfram.com/language/ref/Not.html (updated 1996).
Wolfram Research (1988), Not, Wolfram Language function, https://reference.wolfram.com/language/ref/Not.html (updated 1996).

Text

Wolfram Research (1988), Not, Wolfram Language function, https://reference.wolfram.com/language/ref/Not.html (updated 1996).

Wolfram Research (1988), Not, Wolfram Language function, https://reference.wolfram.com/language/ref/Not.html (updated 1996).

CMS

Wolfram Language. 1988. "Not." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/Not.html.

Wolfram Language. 1988. "Not." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/Not.html.

APA

Wolfram Language. (1988). Not. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Not.html

Wolfram Language. (1988). Not. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Not.html

BibTeX

@misc{reference.wolfram_2025_not, author="Wolfram Research", title="{Not}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/Not.html}", note=[Accessed: 16-April-2025 ]}

@misc{reference.wolfram_2025_not, author="Wolfram Research", title="{Not}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/Not.html}", note=[Accessed: 16-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_not, organization={Wolfram Research}, title={Not}, year={1996}, url={https://reference.wolfram.com/language/ref/Not.html}, note=[Accessed: 16-April-2025 ]}

@online{reference.wolfram_2025_not, organization={Wolfram Research}, title={Not}, year={1996}, url={https://reference.wolfram.com/language/ref/Not.html}, note=[Accessed: 16-April-2025 ]}