In
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
In mathematics, the Kronecker delta (named after Leopold Kronecker) is a function of two variables, usually just non-negative integers. The function is 1 if the variables are equal, and 0 otherwise:
\delta_ = \begin
0 &\text i \neq j, \\
1 ...
, 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:
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 ...
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
of the integer
,
(k)
OK Kosher Certification is a major kosher certification agency based out of Brooklyn, NY. It is one of the "Big Five," the five largest kosher certifying agencies in the United States. OK also has a large kosher presence in Asia.
Early history
In ...
= \sum_f(k).
By convention,
does not need to be defined for the values of for which the Iverson bracket equals ; that is, a summand
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
Donald Ervin Knuth ( ; born January 10, 1938) is an American computer scientist, mathematician, and professor emeritus at Stanford University. He is the 1974 recipient of the ACM Turing Award, informally considered the Nobel Prize of computer ...
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
In mathematics, the Kronecker delta (named after Leopold Kronecker) is a function of two variables, usually just non-negative integers. The function is 1 if the variables are equal, and 0 otherwise:
\delta_ = \begin
0 &\text i \neq j, \\
1 ...
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 ...
, 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 argume ...
,
sign function,
[ and absolute value function are also easily expressed in this notation:
\begin
H(x) &= 0"> > 0 \\
\sgn(x) &= 0"> > 0- < 0
\end
and
\begin
, x, &= x 0"> > 0- x < 0\\
&= x( 0"> > 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+ y \leq y/math> and
\min(x, y) = x \leq y+ y y"> > y
The ]floor and ceiling functions
In mathematics and computer science, the floor function is the function that takes as input a real number , and gives as output the greatest integer less than or equal to , denoted or . Similarly, the ceiling function maps to the least in ...
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
A trichotomy can refer to:
* Law of trichotomy, a mathematical law that every real number is either positive, negative, or zero
** Trichotomy theorem, in finite group theory
* Trichotomy (jazz trio), Australian jazz band, collaborators with Dan ...
of the reals is equivalent to the following identity:
< b+ = b+ b"> > b= 1.
The Möbius function
The Möbius function is a multiplicative function in number theory introduced by the German mathematician August Ferdinand Möbius (also transliterated ''Moebius'') in 1832. It is ubiquitous in elementary and analytic number theory and most of ...
has the property (and can be defined by recurrence as[ Ronald Graham, ]Donald Knuth
Donald Ervin Knuth ( ; born January 10, 1938) is an American computer scientist, mathematician, and professor emeritus at Stanford University. He is the 1974 recipient of the ACM Turing Award, informally considered the Nobel Prize of computer ...
, and Oren Patashnik. '' 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"> > 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 science, type conversion, type casting, type coercion, and type juggling are different ways of changing an expression from one data type to another. An example would be the conversion of an integer value into a floating point valu ...
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
Pointer may refer to:
Places
* Pointer, Kentucky
* Pointers, New Jersey
* Pointers Airport, Wasco County, Oregon, United States
* The Pointers, a pair of rocks off Antarctica
People with the name
* Pointer (surname), a surname (including a list ...
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 ...
References
{{reflist
Mathematical notation