De Bruijn Notation
   HOME

TheInfoList



OR:

In
mathematical logic Mathematical logic is the study of logic, formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory. Research in mathematical logic commonly addresses the mathematical properties of for ...
, the De Bruijn notation is a
syntax In linguistics, syntax () is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure ( constituency) ...
for terms in the
λ calculus Lambda calculus (also written as ''λ''-calculus) is a formal system in mathematical logic for expressing computability, computation based on function Abstraction (computer science), abstraction and function application, application using variable ...
invented by the
Dutch Dutch commonly refers to: * Something of, from, or related to the Netherlands * Dutch people () * Dutch language () Dutch may also refer to: Places * Dutch, West Virginia, a community in the United States * Pennsylvania Dutch Country People E ...
mathematician A mathematician is someone who uses an extensive knowledge of mathematics in their work, typically to solve mathematical problems. Mathematicians are concerned with numbers, data, quantity, structure, space, models, and change. History On ...
Nicolaas Govert de Bruijn Nicolaas Govert (Dick) de Bruijn (; 9 July 1918 – 17 February 2012) was a Dutch mathematician, noted for his many contributions in the fields of analysis, number theory, combinatorics and logic.
. It can be seen as a reversal of the usual syntax for the λ calculus where the
argument An argument is a statement or group of statements called premises intended to determine the degree of truth or acceptability of another statement called conclusion. Arguments can be studied from three main perspectives: the logical, the dialectic ...
in an application is placed next to its corresponding binder in the
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
instead of after the latter's body.


Formal definition

Terms (M, N, \ldots) in the De Bruijn notation are either variables (v), or have one of two ''wagon'' prefixes. The ''abstractor wagon'', written /math>, corresponds to the usual λ-binder of the
λ calculus Lambda calculus (also written as ''λ''-calculus) is a formal system in mathematical logic for expressing computability, computation based on function Abstraction (computer science), abstraction and function application, application using variable ...
, and the ''applicator wagon'', written (M), corresponds to the argument in an application in the λ calculus. :M,N,... ::=\ v\ , \ ;M\ , \ (M)\;N Terms in the traditional syntax can be converted to the De Bruijn notation by defining an inductive function \mathcal for which:
\begin \mathcal(v) &= v \\ \mathcal(\lambda v.\ M) &= ;\mathcal(M) \\ \mathcal(M\;N) &= (\mathcal(N))\mathcal(M). \end
All operations on λ-terms commute with respect to the \mathcal translation. For example, the usual β-reduction, :(\lambda v.\ M)\;N\ \ \longrightarrow_\beta\ \ M := N/math> in the De Bruijn notation is, predictably, :(N)\; ;M\ \ \longrightarrow_\beta\ \ M := N A feature of this notation is that abstractor and applicator wagons of β-redexes are paired like parentheses. For example, consider the stages in the β-reduction of the term (M)\;(N)\; ;(P)\; ; ;(Q)\;z, where the redexes are underlined: The example is from page 384.
\begin (M)\;\underline\;(P)\; ; ;(Q)\;z & (M)\;\underline\; ;(Q :=N\;z \\ & \underline\;(Q :=N,v:=P[u:=N)\;z_\\ __& __(Q[u:=N,v:=P[u:=N.html" ;"title=":=N.html" ;"title=":=N,v:=P[u:=N">:=N,v:=P[u:=N)\;z \\ & (Q[u:=N,v:=P[u:=N">:=N.html" ;"title=":=N,v:=P[u:=N">:=N,v:=P[u:=N)\;z \\ & (Q[u:=N,v:=P[u:=Nw:=M])\;z. \end
Thus, if one views the applicator as an open paren ('(') and the abstractor as a close bracket (']'), then the pattern in the above term is '((]('. De Bruijn called an applicator and its corresponding abstractor in this interpretation ''partners'', and wagons without partners ''bachelors''. A sequence of wagons, which he called a ''segment'', is ''well balanced'' if all its wagons are partnered.


Advantages of the De Bruijn notation

In a well balanced segment, the partnered wagons may be moved around arbitrarily and, as long as parity is not destroyed, the meaning of the term stays the same. For example, in the above example, the applicator (M) can be brought to its abstractor /math>, or the abstractor to the applicator. In fact, ''all''
commutative In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Most familiar as the name o ...
s and permutative conversions on lambda terms may be described simply in terms of parity-preserving reorderings of partnered wagons. One thus obtains a ''generalised conversion'' primitive for λ-terms in the De Bruijn notation. Several properties of λ-terms that are difficult to state and prove using the traditional notation are easily expressed in the De Bruijn notation. For example, in a type-theoretic setting, one can easily compute the canonical class of types for a term in a typing context, and restate the
type checking In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a type to every "term" (a word, phrase, or other set of symbols). Usually the terms are various constructs of a computer progra ...
problem to one of verifying that the checked type is a member of this class. De Bruijn notation has also been shown to be useful in calculi for
explicit substitution In computer science, lambda calculi are said to have explicit substitutions if they pay special attention to the formalization of the process of substitution. This is in contrast to the standard lambda calculus where substitutions are performed by ...
in
pure type system __NOTOC__ In the branches of mathematical logic known as proof theory and type theory, a pure type system (PTS), previously known as a generalized type system (GTS), is a form of typed lambda calculus that allows an arbitrary number of sorts and d ...
s..


See also

*
Mathematical notation Mathematical notation consists of using symbols for representing operations, unspecified numbers, relations and any other mathematical objects, and assembling them into expressions and formulas. Mathematical notation is widely used in mathematic ...


References

{{reflist Lambda calculus