HOME

TheInfoList



OR:

In the lambda calculus, a term is in beta normal form if no ''
beta reduction Lambda calculus (also written as ''λ''-calculus) is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution. It is a universal model of computation tha ...
'' is possible. A term is in beta-eta normal form if neither a beta reduction nor an ''
eta reduction Lambda calculus (also written as ''λ''-calculus) is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution. It is a universal model of computation ...
'' is possible. A term is in head normal form if there is no ''beta-redex in head position''.


Beta reduction

In the lambda calculus, a beta redex is a term of the form: : (\mathbf x . A) M. A redex r is in head position in a term t, if t has the following shape (note that application has higher priority than abstraction, and that the formula below is meant to be a lambda-abstraction, not an application): : \lambda x_1 \ldots \lambda x_n . \underbrace_ M_2 \ldots M_m , where n \geq 0 and m \geq 1. A beta reduction is an application of the following rewrite rule to a beta redex contained in a term: : (\mathbf x . A) M \longrightarrow A := M where A := M/math> is the result of substituting the term M for the variable x in the term A. A ''head'' beta reduction is a beta reduction applied in head position, that is, of the following form: : \lambda x_1 \ldots \lambda x_n . (\lambda x . A) M_1 M_2 \ldots M_m \longrightarrow \lambda x_1 \ldots \lambda x_n . A := M_1M_2 \ldots M_m , where n \geq 0 and m \geq 1. Any other reduction is an ''internal'' beta reduction. A normal form is a term that does not contain any beta redex, ''i.e.'' that cannot be further reduced. A head normal form is a term that does not contain a beta redex in head position, ''i.e.'' that cannot be further reduced by a head reduction. When considering the simple lambda calculus (viz. without the addition of constant or function symbols, meant to be reduced by additional delta rule), head normal forms are the terms of the following shape: : \lambda x_1 \ldots \lambda x_n . x M_1 M_2 \ldots M_m , where x is a variable, n \geq 0 and m \geq 0. A head normal form is not always a normal form, because the applied arguments M_j need not be normal. However, the converse is true: any normal form is also a head normal form. In fact, the normal forms are exactly the head normal forms in which the subterms M_j are themselves normal forms. This gives an inductive syntactic description of normal forms. There is also the notion of weak head normal form: a term in
weak head normal form Lambda calculus is a formal mathematical system based on lambda abstraction and function application. Two definitions of the language are given here: a standard definition, and a definition using mathematical formulas. Standard definition Thi ...
is either a term in head normal form or a lambda abstraction. This means a redex may appear inside a lambda body.


Reduction strategies

In general, a given term can contain several redexes, hence several different beta reductions could be applied. We may specify a strategy to choose which redex to reduce. * Normal-order reduction is the strategy in which one continually applies the rule for beta reduction in head position until no more such reductions are possible. At that point, the resulting term is in head normal form. One then continues applying head reduction in the subterms M_j, from left to right. Stated otherwise, normal‐order reduction is the strategy that always reduces the left‐most outer‐most redex first. * By contrast, in applicative order reduction, one applies the internal reductions first, and then only applies the head reduction when no more internal reductions are possible. Normal-order reduction is complete, in the sense that if a term has a head normal form, then normal‐order reduction will eventually reach it. By the syntactic description of normal forms above, this entails the same statement for a “fully” normal form (this is the
standardization theorem Standardization or standardisation is the process of implementing and developing technical standards based on the consensus of different parties that include firms, users, interest groups, standards organizations and governments. Standardization ...
). By contrast, applicative order reduction may not terminate, even when the term has a normal form. For example, using applicative order reduction, the following sequence of reductions is possible: :\begin &(\mathbf x . z) ((\lambda w. w w w) (\lambda w. w w w)) \\ \rightarrow &(\lambda x . z) ((\lambda w. w w w) (\lambda w. w w w) (\lambda w. w w w))\\ \rightarrow &(\lambda x . z) ((\lambda w. w w w) (\lambda w. w w w) (\lambda w. w w w) (\lambda w. w w w))\\ \rightarrow &(\lambda x . z) ((\lambda w. w w w) (\lambda w. w w w) (\lambda w. w w w) (\lambda w. w w w) (\lambda w. w w w))\\ &\ldots \end But using normal-order reduction, the same starting point reduces quickly to normal form: : (\mathbf x . z) ((\lambda w. w w w) (\lambda w. w w w)) : \rightarrow z Sinot's
director string In mathematics, in the area of lambda calculus and computation, directors or director strings are a mechanism for keeping track of the free variables in a term. Loosely speaking, they can be understood as a kind of memoization for free variable ...
s is one method by which the computational complexity of beta reduction can be optimized.


See also

* Lambda calculus * Normal form (disambiguation)


References

{{DEFAULTSORT:Beta Normal Form Lambda calculus Normal forms (logic)