The details will become clear as we build our interpreter. This is almost all there is to lambda calculus Only, instead of numbers, we plug in other formulas. Since we supply a single input tea, we only resolve the outer function with parameter P (leaving the brackets for some clarity):Īs for the final function, it still has the same problem that you are removing both functions, when only one input is given. In lambda calculus, this is called beta reduction, and we’d write this example as: ( a b. P(x)))(tea) where now each lambda function is surrounded by brackets. P(x)(tea) this can be better represented as (λP. You can think of it of peeling off the outer one and exposing the inner. The reduction operations include: : -conversion, renaming the bound variables in the expression. Since you have a single input, you only have to reduce one function - the first one, leaving the other. You are forgetting that you have a lambda function where the expression inside is another lambda function. We've substituted the x variable for Garfield and removed λx in the process leaving just the expression inside. katze(x)(Garfield) -> katze (Garfield) the reduction is correct. They dabbled in alternatives (for example the I calculus) but could not resolve the problem. The notation for that is and you pick up the first variable that is given. Not even the Lambda Calculus inventors were sure about this. Extensive use of -reduction can lead to Pointfree programming. When performing beta reduction, you substitute the bound variable to the lambda function with the value supplied. Converting from the first to the second would constitute an eta reduction, and moving from the second to the first would be an eta abstraction (also known as eta expansion).The term eta conversion can refer to the process in either direction.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |