Function Repository Resource:

FalseQ

Source Notebook

Determine if an expression is explicitly False

Contributed by: Arnoud Buzing

ResourceFunction["FalseQ"][expr]

yields True if expr is False and yields False otherwise.

Details and Options

ResourceFunction["FalseQ"][expr] is essentially equivalent to If[expr,False,True,False].

Examples

Basic Examples (1) 

FalseQ will return True only if the input is explicitly False:

In[1]:=
ResourceFunction["FalseQ"][False]
Out[1]=
In[2]:=
ResourceFunction["FalseQ"][True]
Out[2]=
In[3]:=
ResourceFunction["FalseQ"][x]
Out[3]=

Properties and Relations (1) 

The relationship between TrueQ and FalseQ:

In[4]:=
Table[{expr, TrueQ[expr], ResourceFunction["FalseQ"][expr]}, {expr, {True, False, x}}] // Grid[Prepend[#, Style[#, Bold] & /@ {"", "TrueQ", "FalseQ"}], Frame -> All] &
Out[4]=

Publisher

Arnoud Buzing

Version History

  • 1.0.0 – 07 July 2020

Related Resources

License Information