There are no approved revisions of this page, so it may
not have been
reviewed.
This article page is a stub, please help by expanding it.
The Iverson bracket, named after Kenneth E. Iverson, is a notation that denotes a number that is 1 if the condition in square brackets is satisfied, and 0 otherwise. More exactly,
${\begin{array}{l}\displaystyle {[P]={\begin{cases}1&{\text{if }}P{\text{ is true,}}\\0&{\text{otherwise.}}\end{cases}}}\end{array}}$
where
is a
predicate (i.e. a [
firstorder logic] statement that can be true or false). This notation was introduced by
Kenneth E. Iverson in his programming language APL
^{[1]}^{[2]} (named after the book
A Programming Language^{[3]}), while the specific restriction to square brackets was advocated by Donald Knuth to avoid ambiguity in parenthesized logical expressions.
^{[4]}
Uses
The notation is useful in expressing sums or integrals without boundary conditions. For example

In the first sum, the index
is limited to be in the range
1 to
10. The second sum is allowed to range over all integers, but where
is strictly less than
1 or strictly greater than
10, the summand is
0, contributing nothing to the sum. Such use of the
Iverson bracket can permit easier manipulation of these expressions.
^{(add an example of such a manipulation)} ^{[5]}
Another use of the Iverson bracket is to simplify equations with special cases. For example, the formula

which is valid only for
, and may be written

which is valid for all
positive integers .
Special cases
The Kronecker delta notation is a specific case of Iverson notation when the condition is equality

The
indicator function (or
characteristic function ) of a set
, another specific case, has set membership as its condition

IA (x) = χA (x) = [x ∈ A] . 
The sign function and Heaviside step function are also easily expressed in this notation

sgn (x) = [x > 0] − [x < 0] , 

H (x) = [x > 0] + [x = 0] . 
And the trichotomy of the reals can be expressed

[a < b] + [a = b] + [a > b] = 1. 
See also
Notes
 ↑ Ronald Graham, Donald Knuth, and Oren Patashnik. Concrete Mathematics, Section 2.2: Sums and Recurrences.
 ↑ Graham, Ronald L.; Knuth, Donald E.; Patashnik, Oren (1994). Concrete Mathematics (2nd ed.). Reading, MA: AddisonWesley Publishing Company. pp. xiii+657. ISBN 0201558025. http://wwwcsfaculty.stanford.edu/~uno/gkp.html.
 ↑ Iverson, Kenneth E. (1962). A Programming Language. Wiley. ISBN 0471430145. http://www.softwarepreservation.org/projects/apl/book/APROGRAMMING%20LANGUAGE/view.
 ↑ Graham, Knuth, and Patashnik (1994).
 ↑ To do: add an example of such a manipulation.
References
 Donald Knuth, “Two Notes on Notation,” American Mathematical Monthly, Volume 99, Number 5, May 1992, pp. 403–422. (TeX, arXiv:math/9205211)
 Kenneth E. Iverson, "A Programming Language", New York: Wiley, p. 11, 1962.
External links