True
is the symbol for the Boolean value true.
Background & Context
- True is the symbol that represents the Boolean value true. Expressions that can be rigorously established to be true return this symbol. Examples of testing expressions that may return True include Equal, Unequal, SameQ, UnsameQ, Less/Greater/etc., Exists, and quantifier elimination via Resolve. While "Q"-functions (e.g. TrueQ, SameQ, UnsameQ) always return True or False, non-Q comparison and equality-testing functions (e.g. Equal, Unequal, Less, Greater) return unevaluated when they cannot be definitively resolved. Constructs that can be used to take a different evaluation path depending on if a condition is True or False include If, Which, and Piecewise.
- The negation Not[True] of True is given by False. The domain consisting of True and False is denoted Booleans.
- TrueQ is a special case of If that yields True if an expression is explicitly True, and otherwise yields False.
Examples
open allclose allBasic Examples (4)
Properties & Relations (6)
The symbol for the Boolean value false:
Truth table for a Boolean function:
The Boole function:
This equality is not resolved automatically:
Use FullSimplify to find its truth value:
A fully quantified expression:
Use Resolve to find its truth value:
Use Refine to find truth values of expressions under specified assumptions:
Text
Wolfram Research (1988), True, Wolfram Language function, https://reference.wolfram.com/language/ref/True.html.
CMS
Wolfram Language. 1988. "True." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/True.html.
APA
Wolfram Language. (1988). True. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/True.html