lambdacalculus-140108065323-phpapp01
-
Upload
adrian-iosif -
Category
Documents
-
view
1 -
download
0
description
Transcript of lambdacalculus-140108065323-phpapp01
1
Lambda Calculus
2
OriginFirst observed in the late 1890sFormalized in the 1930sDeveloped in order to study mathematical
properties.Lambda calculus is a conceptually simple
universal model of computation
3
MotivationThe lambda calculus can be called the
smallest universal programming language of the world
4
What is this?The name derives from the Greek letter lambda (λ)
used to denote binding a variable in a functionSingle transformation rule -> variable substitutionSingle function definition schemaAny computable function can be expressed and
evaluated using this formalismFunctional Programming essentially implements
this calculusThe λ-calculus provides a simple semantics for
computation, enabling properties of computation to be studied formally
5
Lambda Termsa variable is itself a valid lambda termif t is a lambda term, and x is a variable,
then ( λx.t) is a lambda term (called a lambda abstraction);
if t and s are lambda terms, then (ts) is a lambda term (called an application).
Thus a lambda term is valid if and only if it can be obtained by repeated application of these three rules
6
lambda abstraction λ x.t
X is the input T is the expression
λ x.x+2 == f(x) = x +2
7
Lambda Property - 1Lambda:
sqsum(x, y) = x*x + y*y
(x, y) ↦ x*x + y*y
8
Lambda Property – 1 -Equivalent
In computer programming, an anonymous function (also function constant, function literal, or lambda function) is a function (or a subroutine) defined, and possibly called, without being bound to an identifier.
9
Lambda Property-2In lambda calculus,
functions are taken to be 'first class values', so functions may be used as the inputs, or be returned as outputs from other functions.
10
Lambda Property-2 - EquivalentIn mathematics and
computer science, a higher-order function (also functional form, functional or functor) is a function that does at least one of the following:
take one or more functions as an input
output a function
11
Lambda Property 31 - (x, y) ↦ x*x + y*y
1.1 – (5,2) == 5*5 + 2*2 = 29
2 - ((x ↦ (y ↦ x*x + y*y))
2.2 - = (y ↦ 5*5 + y*y)(5)
2.2 - = 5*5 + 2*2 = 29
12
Lambda Property 3 - EquivalentIn mathematics and
computer science, currying is the technique of transforming a function that takes multiple arguments (or a tuple of arguments) in such a way that it can be called as a chain of functions, each with a single argument
13
Much moreα-conversion: changing bound variables
(alpha);β-reduction: applying functions to their
arguments (beta);η-conversion: which captures a notion of
extensionality (eta).RecursionParallelism and concurrency