Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Lambda calculus
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Motivation === [[Computable function]]s are a fundamental concept within computer science and mathematics. The lambda calculus provides simple [[Semantics#Computer science|semantics]] for computation which are useful for formally studying properties of computation. The lambda calculus incorporates two simplifications that make its semantics simple. {{anchor|anonymousForm}}The first simplification is that the lambda calculus treats functions "anonymously"; it does not give them explicit names. For example, the function : <math>\operatorname{square\_sum}(x, y) = x^2 + y^2</math> can be rewritten in ''anonymous form'' as : <math>(x, y) \mapsto x^2 + y^2</math> (which is read as "a [[tuple]] of {{mvar|x}} and {{mvar|y}} is [[maplet|mapped]] to <math display="inline">x^2 + y^2</math>").{{efn|name= mapsTo}} Similarly, the function : <math>\operatorname{id}(x) = x</math> can be rewritten in anonymous form as : <math>x \mapsto x</math> where the input is simply mapped to itself.{{efn|name= mapsTo|1= <math> \mapsto </math> is pronounced "[[maplet|maps to]]".}} The second simplification is that the lambda calculus only uses functions of a single input. An ordinary function that requires two inputs, for instance the <math display="inline">\operatorname{square\_sum}</math> function, can be reworked into an equivalent function that accepts a single input, and as output returns ''another'' function, that in turn accepts a single input. For example, : <math>(x, y) \mapsto x^2 + y^2</math> can be reworked into : <math>x \mapsto (y \mapsto x^2 + y^2)</math> This method, known as [[currying]], transforms a function that takes multiple arguments into a chain of functions each with a single argument. [[Function application]] of the <math display="inline">\operatorname{square\_sum}</math> function to the arguments (5, 2), yields at once : <math display="inline">((x, y) \mapsto x^2 + y^2)(5, 2)</math> : <math display="inline"> = 5^2 + 2^2 </math> : <math display="inline"> = 29</math>, whereas evaluation of the curried version requires one more step : <math display="inline">\Bigl(\bigl(x \mapsto (y \mapsto x^2 + y^2)\bigr)(5)\Bigr)(2)</math> : <math display="inline"> = (y \mapsto 5^2 + y^2)(2)</math> // the definition of <math>x</math> has been used with <math>5</math> in the inner expression. This is like Ξ²-reduction. : <math display="inline"> = 5^2 + 2^2</math> // the definition of <math>y</math> has been used with <math>2</math>. Again, similar to Ξ²-reduction. : <math display="inline"> = 29 </math> to arrive at the same result.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Lambda calculus
(section)
Add topic