![]() This is the identity function.Īlpha "reductions" are usually called alpha equivalences or alpha rewrite rules. Where y is bound to all occurrences of x in the lambda expression. (\x.x)y //y gets bound to all occurences of x to the right of the period The bound variables are the variables that match the variable left of the (.), so in this case x. Then you would substitute all the bound variables to the right of the (.) in your lambda term. It is applied through substitution as shown: applying this result to anything yields K.Beta reduction is just the primary application rule used for computation within the lambda calculus. 1] kill terms are absorbed and also increase the magnitude of bound terms Term until the substitution of all terms in the abstraction is complete. ![]() notation signifies the bound term is from the outer abstractionĪnd must be used to prevent decrementing and double replacement of the = KI -2 kill term is void due to surviving 2 term (1 2) bound terms become kill terms due to -1. 2 (1 2)] 1 was replaced with, remaining terms decremented Negative indexes are placed last in order of decreasing magnitude. Negative indexes are used for kill terms. Single positive indexes are used for bound terms. Compound abstractions reduce to a single normal form automatically, alpha reduction is not needed. The notation above is just a more compact and unambiguous way of expressing lambda abstractions. 1 ( 1 2)] 1 was replaced with, remaining terms decremented 2 (1 2 3)] 1 was replaced with, remaining terms decremented Abstractions are surrounded by 's (λmn.(λsz.ms(nsz)))(λsz.sz)(λsz.sz) Indexes are used instead of lettered terms based on the order of input. Application associates to the left, so $xyz$ is $(xy)z$.Īn alternative way of expressing a lambda abstraction and reduction.Lambda associates to the right, so $\lambda sz.sz$ is $\lambda s.(\lambda z.sz)$.The Wikipedia article gives formal definition of substitution and shows when it's necessary to rename bound variables. So first, you have to rename the bound variable first, for example to $\lambda z.xz$ and then you can safely substitute $x:=y$ to get $\lambda z.yz$. You'd get $\lambda y.yy$ which would change the meaning of the term. For example, you cannot substitute $x:=y$ into $\lambda y.xy$ because $y$ is bound under $\lambda$. Sometimes substitution is not directly possible.Substitution applies only to free variables.It is better to rename bound variables ($\alpha$-conversion) to be distinct, for example to: Note that we now have $\lambda sz$ inside $\lambda sz$ which isn't very convenient (yet allowed). Where we replaced $m$ with $\lambda sz.sz$. ![]() ![]() In your case, the first reduction would be: (Capital letters likes $M$ and $N$ are used to denote terms.) The replacement $M$ is often called contractum. It means, if you have a subterm that looks like $(\lambda x.M)N$ (called redex) you can replace it by $M$, which is $M$ with $N$ substituted for $x$. Lambda terms are simplified by the β-reduction rule: ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |