Indicator function

maths
Indicator function

The indicator function takes a boolean value and maps it to $0$ or $1$ based on if the value is true or not.

$$\mathbb{I}[x] = \begin{cases} 1 & \mbox{if } x \mbox{ is true}\\ 0 & \mbox{if } x \mbox{ is false} \end{cases}$$