Wikipedia / Iverson bracket
Wikipedia / Iverson bracket
In mathematics, the Iverson bracket, named after Kenneth E. Iverson, is a notation that generalises the Kronecker delta, which is the Iverson bracket of the statement . It maps any statement to a function of the free variables In other words, the Iverson bracket of a statement is the indicator function of the set of values for which the statement is true.
The Iverson bracket allows using capital-sigma notation does not need to be defined for the values of for which the Iverson bracket equals is defined.
The notation was originally introduced by Kenneth E. Iverson in his programming language APL, though restricted to single relational operators enclosed in parentheses, while the generalisation to arbitrary statements, notational restriction to square brackets, and applications to summation, was advocated by Donald Knuth to avoid ambiguity in parenthesized logical expressions.
Properties
There is a direct correspondence between arithmetic involving Iverson brackets, logical expressions, and set operations. For instance, let A and B be properties of integers; then we have
Examples
The notation allows moving boundary conditions of summations (or integrals) as a separate factor into the summand, freeing up space around the summation operator, but more importantly allowing it to be manipulated algebraically.
Double-counting rule
Summation interchange
Counting
For instance, Euler's totient function that counts the number of positive integers up to n which are coprime to n
Simplification of special cases
is valid for but is off by for . To get an identity valid for all positive integers
Common functions
Many common functions, especially those with a natural piecewise definition, may be expressed in terms of the Iverson bracket. The Kronecker delta
The Heaviside step function, sign function, and absolute value
The floor and ceiling functions of summation is understood to range over all the integers.
The ramp function
The trichotomy
The Möbius function has the property (and can be defined by recurrence as.
Formulation in terms of usual functions
In the 1830s, Guglielmo dalla Sommaja. Following one common convention is 1 if , is 0 if , and is undefined otherwise.
Notational variations
In addition to the now-standard square brackets and the original parentheses blackboard bold brackets have also been used, e.g. as well as other unusual forms of bracketing marks available in the publisher's typeface, accompanied by a marginal note.
See also
Type conversion in computer programming: many languages allow numeric or pointer quantities to be used as boolean quantities