|
|
Line 1: |
Line 1: |
| In the [[lambda calculus]], a term is in '''beta normal form''' if no ''[[lambda calculus#β-reduction|beta reduction]]'' is possible.<ref>{{cite web| url=http://encyclopedia2.thefreedictionary.com/Beta+normal+form | title=Beta normal form | work=[http://encyclopedia2.thefreedictionary.com/ Encyclopedia] | publisher=[[The Free Dictionary]] |accessdate=18 November 2013 }}</ref> A term is in '''beta-eta normal form''' if neither a beta reduction nor an ''[[lambda calculus#η-conversion|eta reduction]]'' is possible. A term is in '''head normal form''' if there is no ''beta-redex in head position''.
| | Oscar is how he's called and he completely loves this title. California is where I've usually been residing and I adore every working day living here. I am a meter reader but I plan on altering it. What I love doing is to collect badges but I've been using on new things lately.<br><br>Here is my web site [http://okalina.com/prevent-candida-albicans-before-hand-with-one-of-these-tips.php3 std home test] |
| | |
| ==Beta reduction==
| |
| In the lambda calculus, a '''beta redex''' is a term of the form
| |
| | |
| :<math> ((\mathbf{\lambda} x . A(x)) t) </math>
| |
| | |
| where <math>A(x)</math> is a term (possibly) involving variable <math>x</math>.
| |
| | |
| A ''beta reduction'' is an application of the following rewrite rule to a beta redex
| |
| | |
| :<math> ((\mathbf{\lambda} x . A(x)) t) \rightarrow A(t)</math> | |
| | |
| where <math>A(t)</math> is the result of substituting the term <math>t</math> for the variable <math>x</math> in the term <math>A(x)</math>.
| |
| | |
| A beta reduction is in head position if it is of the following form:
| |
| | |
| * <math> \lambda x_0 \ldots \lambda x_{i-1} . (\lambda x_i . A(x_i)) M_1 M_2 \ldots M_n \rightarrow
| |
| \lambda x_0 \ldots \lambda x_{i-1} . A(M_1) M_2 \ldots M_n </math>, where <math> i \geq 0, n \geq 1 </math>.
| |
| | |
| Any reduction not in this form is an internal beta reduction.
| |
| | |
| ==Reduction strategies==
| |
| In general, there can be several different beta reductions possible for a given term. '''Normal-order reduction''' is the [[evaluation 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''.
| |
| | |
| In 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. In 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:
| |
| | |
| :<math> (\mathbf{\lambda} x . z) ((\lambda w. w w w) (\lambda w. w w w)) </math>
| |
| :<math> \rightarrow (\lambda x . z) ((\lambda w. w w w) (\lambda w. w w w) (\lambda w. w w w))</math>
| |
| :<math> \rightarrow (\lambda x . z) ((\lambda w. w w w) (\lambda w. w w w) (\lambda w. w w w) (\lambda w. w w w))</math>
| |
| :<math> \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))</math>
| |
| :<math>\ldots</math>
| |
| | |
| But using normal-order reduction, the same starting point reduces quickly to normal form:
| |
| | |
| :<math> (\mathbf{\lambda} x . z) ((\lambda w. w w w) (\lambda w. w w w)) </math>
| |
| :<math> \rightarrow z </math>
| |
| | |
| Sinot's [[director string]]s is one method by which the computational complexity of beta reduction can be optimized.
| |
| | |
| ==See also==
| |
| * [[Lambda calculus]]
| |
| * [[Normal form (disambiguation)]]
| |
| | |
| ==References==
| |
| {{reflist}}
| |
| | |
| {{DEFAULTSORT:Beta Normal Form}}
| |
| [[Category:Lambda calculus]]
| |
| [[Category:Normal forms (logic)]]
| |
Oscar is how he's called and he completely loves this title. California is where I've usually been residing and I adore every working day living here. I am a meter reader but I plan on altering it. What I love doing is to collect badges but I've been using on new things lately.
Here is my web site std home test