Boole—Wolfram Documentation
-
See Also
- If
- Piecewise
- DiscreteDelta
- UnitStep
- Unitize
- DiscreteIndicator
- Pick
- RegionPlot
- True
-
- Net Encoders
- Boolean
-
- Compiled Types
- Boolean
- Related Guides
- Tech Notes
Details
- Boole is also known as Iverson bracket, indicator function and characteristic function.
- Boole is typically used to express integrals and sums over regions given by logical combinations of predicates. It is also used as a dummy variable encoding for categorical variables in statistics.
- Boole[expr] remains unchanged if expr is neither True nor False.
- Boole[expr] is effectively equivalent to If[expr,1,0].
- Boole is Listable.
- Integrate[f Boole[pred],…] can be used to integrate f over the region in which pred is True.
Examples
open all close allBasic Examples (3)
Applications (4)
Properties & Relations (7)
Text
Wolfram Research (2004), Boole, Wolfram Language function, https://reference.wolfram.com/language/ref/Boole.html (updated 2007).
CMS
Wolfram Language. 2004. "Boole." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/Boole.html.
APA
Wolfram Language. (2004). Boole. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Boole.html
BibTeX
@misc{reference.wolfram_2025_boole, author="Wolfram Research", title="{Boole}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/Boole.html}", note=[Accessed: 22-February-2026]}
BibLaTeX
@online{reference.wolfram_2025_boole, organization={Wolfram Research}, title={Boole}, year={2007}, url={https://reference.wolfram.com/language/ref/Boole.html}, note=[Accessed: 22-February-2026]}