Iverson bracket
   HOME

TheInfoList



OR:

In
mathematics Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, the Iverson bracket, named after
Kenneth E. Iverson Kenneth Eugene Iverson (17 December 1920 – 19 October 2004) was a Canadian computer scientist noted for the development of the programming language APL. He was honored with the Turing Award in 1979 "for his pioneering effort in programming l ...
, 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 that statement. This function is defined to take the value 1 for the values of the variables for which the statement is true, and takes the value 0 otherwise. It is generally denoted by putting the statement inside square brackets: = \begin 1 & \text P \text \\ 0 & \text \end In other words, the Iverson bracket of a statement is the
indicator function In mathematics, an indicator function or a characteristic function of a subset of a set is a function that maps elements of the subset to one, and all other elements to zero. That is, if is a subset of some set , one has \mathbf_(x)=1 if x\i ...
of the set of values for which the statement is true. The Iverson bracket allows using capital-sigma notation without summation index. That is, for any property P(k) of the integer k, \sum_kf(k)\, (k)= \sum_f(k). By convention, f(k) does not need to be defined for the values of for which the Iverson bracket equals ; that is, a summand f(k) textbf/math> must evaluate to 0 regardless of whether f(k) is defined. Likewise for products: \prod_kf(k)^ = \prod_f(k). The notation was originally introduced by
Kenneth E. Iverson Kenneth Eugene Iverson (17 December 1920 – 19 October 2004) was a Canadian computer scientist noted for the development of the programming language APL. He was honored with the Turing Award in 1979 "for his pioneering effort in programming l ...
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.Donald Knuth, "Two Notes on Notation", ''
American Mathematical Monthly ''The American Mathematical Monthly'' is a mathematical journal founded by Benjamin Finkel in 1894. It is published ten times each year by Taylor & Francis for the Mathematical Association of America. The ''American Mathematical Monthly'' is an ...
'', Volume 99, Number 5, May 1992, pp. 403–422.
TeX
).


Properties

There is a direct correspondence between arithmetic on Iverson brackets, logic, and set operations. For instance, let ''A'' and ''B'' be sets and P(k_1,\dots) any property of integers; then we have \begin[] [\,P \land Q\,] ~ &= ~ [\,P\,]\,[\,Q\,]~~; \\ em [\,P \lor Q\,] ~ &= ~ ,P\,\; + \; ,Q\,\; - \; [\,P\,]\,[\,Q\,]~~; \\ em ,\neg \,P\,~ &= ~ 1 - ,P\,~; \\ em ,P Q\,~ &= ~ \Bigl, \, ,P\,\; - \; ,Q\,\, \Bigr, ~~; \\ em ,k \in A\,\; + \; ,k \in B\,~ &= ~ ,k \in A \cup B\,\; + \; ,k \in A \cap B\,~; \\ em ,x \in A \cap B\,~ &= ~ ,x \in A\,, ,x \in B\,~; \\ em ,\forall \,m\ : \, P(k, m)\,~ &= ~ \prod_m\, ,P(k, m)\,~; \\ em ,\exists \,m\ : \, P(k, m)\,~ &= ~ \min\Bigl\ = 1 \; - \;\prod_m \, ,\neg\, P(k, m)\,~~; \\ em\#\Bigl\ ~ &= ~ \sum_m \, ,P(k, m)\,~. \end


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

We mechanically derive a well-known sum manipulation rule using Iverson brackets: \begin \sum_f(k)+\sum_f(k) &=\sum_kf(k)\, \in A\sum_kf(k)\, \in B\ &=\sum_kf(k)\,( \in A \in B \\&=\sum_kf(k)\,( \in A\cup B \in A\cap B \\&=\sum_f(k)\ +\sum_f(k). \end


Summation interchange

The well-known rule \sum_^n \sum_^j f(j,k) = \sum_^n \sum_^n f(j,k) is likewise easily derived: \begin \sum_^n\,\sum_^j f(j,k) &=\sum_f(j,k)\, \leq j\leq n, \leq k\leq j\\&=\sum_f(j,k)\, \leq k\leq j\leq n\\&=\sum_f(j,k)\, \leq k\leq n, \leq j\leq n \\&=\sum_^n\,\sum_^n f(j,k). \end


Counting

For instance, the Euler phi function that counts the number of positive integers up to ''n'' which are coprime to ''n'' can be expressed by \varphi(n)=\sum_^ gcd(i,n)=1\qquad\text n\in\N^+.


Simplification of special cases

Another use of the Iverson bracket is to simplify equations with special cases. For example, the formula \sum_\!\!k = \fracn\varphi(n) is valid for but is off by for . To get an identity valid for all positive integers (i.e., all values for which \phi(n) is defined), a correction term involving the Iverson bracket may be added: \sum_\!\!k = \fracn(\varphi(n)+ =1


Common functions

Many common functions, especially those with a natural piecewise definition, may be expressed in terms of the Iverson bracket. The Kronecker delta notation is a specific case of Iverson notation when the condition is equality. That is, \delta_ = =j The
indicator function In mathematics, an indicator function or a characteristic function of a subset of a set is a function that maps elements of the subset to one, and all other elements to zero. That is, if is a subset of some set , one has \mathbf_(x)=1 if x\i ...
, often denoted \mathbf_A(x), \mathbf_A(x) or \chi_A(x), is an Iverson bracket with set membership as its condition: \mathbf_A(x) = \in A The
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argum ...
, sign function, and absolute value function are also easily expressed in this notation: \begin H(x) &= > 0 \\ \sgn(x) &= > 0- < 0 \end and \begin , x, &= x > 0- x < 0\\ &= x( > 0- < 0 \\ &= x \cdot \sgn(x). \end The comparison functions max and min (returning the larger or smaller of two arguments) may be written as \max(x, y) = x > y+ y \leq y/math> and \min(x, y) = x \leq y+ y > y The floor and ceiling functions can be expressed as \lfloor x \rfloor = \sum_n n \cdot \le x < n + 1/math> and \lceil x \rceil = \sum_n n \cdot - 1 < x \le n where the index n of summation is understood to range over all the integers. The ramp function can be expressed R(x) = x \cdot \geq 0 The trichotomy of the reals is equivalent to the following identity: < b+ = b+ > b= 1. The Möbius function has the property (and can be defined by recurrence as Ronald Graham, Donald Knuth, and
Oren Patashnik Oren Patashnik (born 1954) is an American computer scientist. He is notable for co-creating BibTeX, and co-writing '' Concrete Mathematics: A Foundation for Computer Science''. He is a researcher at the Center for Communications Research, La Jol ...
. '' Concrete Mathematics'', Section 4.9: Phi and Mu.
) \sum_ \mu(d) \ =\ =1


Formulation in terms of usual functions

In the 1830s, Guglielmo dalla Sommaja used the expression 0^ to represent what now would be written > 0/math>; he also used variants, such as \left(1 - 0^\right) \left(1 - 0^\right) for \leq x \leq a/math>. Following one common convention, those quantities are equal where defined: 0^ is 1 if , is 0 if , and is undefined otherwise.


Notational variations

In addition to the now-standard square brackets and the original parentheses wiggly 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

* Boolean function * Type conversion in computer programming: many
languages Language is a structured system of communication. The structure of a language is its grammar and the free components are its vocabulary. Languages are the primary means by which humans communicate, and may be conveyed through a variety of met ...
allow numeric or pointer quantities to be used as boolean quantities *
Indicator function In mathematics, an indicator function or a characteristic function of a subset of a set is a function that maps elements of the subset to one, and all other elements to zero. That is, if is a subset of some set , one has \mathbf_(x)=1 if x\i ...


References

{{reflist Mathematical notation