Definition:Iverson's Convention

Definition
Iverson's Convention is a notation which allows a compact means of assigning a value of $1$ or $0$ to a proposition $P$, depending on whether $P$ is true or false:


 * $\left[{P}\right] = \begin{cases}

1 & : P \ \text { is true} \\ 0 & : P \ \text { is false} \end{cases}$

It is sometimes seen specified as:
 * $\left[{P}\right] = \begin{cases}

1 & : P \ \text { is true} \\ 0 & : P \ \text { otherwise} \end{cases}$

... which can be useful in fields of mathematics where the Law of the Excluded Middle does not apply.

It is also known as the Iverson bracket notation.

Also see
Compare with the Kronecker delta.

The specific use of square brackets was advocated by Donald Knuth to avoid ambiguity in parenthesized logical expressions.