SlideShare une entreprise Scribd logo
1  sur  14
Lambda Calculus
1
Origin
 First observed in the late 1890s
 Formalized in the 1930s
 Developed in order to study mathematical properties.
 Lambda calculus is a conceptually simple universal
model of computation
2
Motivation
 The lambda calculus can be called the smallest
universal programming language of the world
3
What is this?
 The name derives from the Greek letter lambda (λ) used to
denote binding a variable in a function
 Single transformation rule -> variable substitution
 Single function definition schema
 Any computable function can be expressed and evaluated
using this formalism
 Functional Programming essentially implements this
calculus
 The λ-calculus provides a simple semantics for
computation, enabling properties of computation to be
studied formally
4
Lambda Terms
 a variable is itself a valid lambda term
 if 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
5
lambda abstraction
 λ x.t
 X is the input
 T is the expression
 λ x.x+2 == f(x) = x +2
6
Lambda Property - 1
 Lambda:
 sqsum(x, y) = x*x + y*y
 (x, y) ↦ x*x + y*y
7
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.
8
Lambda Property-2
 In 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.
9
Lambda Property-2 - Equivalent
 In mathematics and comp
uter science, a higher-
order
function (also functional
form, functional or funct
or) is a function that does
at least one of the
following:
 take one or more functions
as an input
 output a function
10
Lambda Property 3
 1 - (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
11
Lambda Property 3 - Equivalent
 In mathematics and com
puter
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
12
Much more
 α-conversion: changing bound variables (alpha);
 β-reduction: applying functions to their arguments
(beta);
 η-conversion: which captures a notion of
extensionality (eta).
 Recursion
 Parallelism and concurrency
13
That is all
14
http://www.linkedin.com/in/diegomendonca

Contenu connexe

Tendances

Relational algebra in dbms
Relational algebra in dbmsRelational algebra in dbms
Relational algebra in dbms
shekhar1991
 

Tendances (20)

Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problem
 
2 R Tutorial Programming
2 R Tutorial Programming2 R Tutorial Programming
2 R Tutorial Programming
 
BNF & EBNF
BNF & EBNFBNF & EBNF
BNF & EBNF
 
RECURSION IN C
RECURSION IN C RECURSION IN C
RECURSION IN C
 
Power series convergence ,taylor & laurent's theorem
Power series  convergence ,taylor & laurent's theoremPower series  convergence ,taylor & laurent's theorem
Power series convergence ,taylor & laurent's theorem
 
Intro to Discrete Mathematics
Intro to Discrete MathematicsIntro to Discrete Mathematics
Intro to Discrete Mathematics
 
Introduction to the lambda calculus
Introduction to the lambda calculusIntroduction to the lambda calculus
Introduction to the lambda calculus
 
fuzzy_measures.ppt
fuzzy_measures.pptfuzzy_measures.ppt
fuzzy_measures.ppt
 
Application of Linear Algebra in Electrical Circuit
Application of Linear Algebra in Electrical CircuitApplication of Linear Algebra in Electrical Circuit
Application of Linear Algebra in Electrical Circuit
 
arrays and pointers
arrays and pointersarrays and pointers
arrays and pointers
 
Complex analysis
Complex analysisComplex analysis
Complex analysis
 
Relational algebra in dbms
Relational algebra in dbmsRelational algebra in dbms
Relational algebra in dbms
 
asymptotic notation
asymptotic notationasymptotic notation
asymptotic notation
 
Recursive Descent Parsing
Recursive Descent Parsing  Recursive Descent Parsing
Recursive Descent Parsing
 
DataFrame in Python Pandas
DataFrame in Python PandasDataFrame in Python Pandas
DataFrame in Python Pandas
 
Decision control and iterative statements
Decision control and iterative statementsDecision control and iterative statements
Decision control and iterative statements
 
Phases of compiler
Phases of compilerPhases of compiler
Phases of compiler
 
Laurent's Series & Types of Singularities
Laurent's Series & Types of SingularitiesLaurent's Series & Types of Singularities
Laurent's Series & Types of Singularities
 
R Programming: Mathematical Functions In R
R Programming: Mathematical Functions In RR Programming: Mathematical Functions In R
R Programming: Mathematical Functions In R
 
C – operators and expressions
C – operators and expressionsC – operators and expressions
C – operators and expressions
 

Similaire à Lambda calculus

Similaire à Lambda calculus (20)

Functional Programming Concepts for Imperative Programmers
Functional Programming Concepts for Imperative ProgrammersFunctional Programming Concepts for Imperative Programmers
Functional Programming Concepts for Imperative Programmers
 
Java 8 lambda
Java 8 lambdaJava 8 lambda
Java 8 lambda
 
Programming in Scala - Lecture Two
Programming in Scala - Lecture TwoProgramming in Scala - Lecture Two
Programming in Scala - Lecture Two
 
Functions in Python
Functions in PythonFunctions in Python
Functions in Python
 
Functional Programming by Examples using Haskell
Functional Programming by Examples using HaskellFunctional Programming by Examples using Haskell
Functional Programming by Examples using Haskell
 
Let Us Learn Lambda Using C# 3.0
Let Us Learn Lambda Using C# 3.0Let Us Learn Lambda Using C# 3.0
Let Us Learn Lambda Using C# 3.0
 
04_python_functions.ppt You can define functions to provide the required func...
04_python_functions.ppt You can define functions to provide the required func...04_python_functions.ppt You can define functions to provide the required func...
04_python_functions.ppt You can define functions to provide the required func...
 
List-based Monadic Computations for Dynamically Typed Languages (Python version)
List-based Monadic Computations for Dynamically Typed Languages (Python version)List-based Monadic Computations for Dynamically Typed Languages (Python version)
List-based Monadic Computations for Dynamically Typed Languages (Python version)
 
Advance python programming
Advance python programming Advance python programming
Advance python programming
 
Tools for reading papers
Tools for reading papersTools for reading papers
Tools for reading papers
 
List-based Monadic Computations for Dynamic Languages
List-based Monadic Computations for Dynamic LanguagesList-based Monadic Computations for Dynamic Languages
List-based Monadic Computations for Dynamic Languages
 
MatlabIntro.ppt
MatlabIntro.pptMatlabIntro.ppt
MatlabIntro.ppt
 
MatlabIntro.ppt
MatlabIntro.pptMatlabIntro.ppt
MatlabIntro.ppt
 
MatlabIntro.ppt
MatlabIntro.pptMatlabIntro.ppt
MatlabIntro.ppt
 
Matlab intro
Matlab introMatlab intro
Matlab intro
 
MatlabIntro.ppt
MatlabIntro.pptMatlabIntro.ppt
MatlabIntro.ppt
 
Lambda Expressions in Java
Lambda Expressions in JavaLambda Expressions in Java
Lambda Expressions in Java
 
Functional programming using haskell notes iitk
Functional programming using haskell notes iitkFunctional programming using haskell notes iitk
Functional programming using haskell notes iitk
 
Functional Programming - Past, Present and Future
Functional Programming - Past, Present and FutureFunctional Programming - Past, Present and Future
Functional Programming - Past, Present and Future
 
Functional Programming Past Present Future
Functional Programming Past Present FutureFunctional Programming Past Present Future
Functional Programming Past Present Future
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Lambda calculus

  • 2. Origin  First observed in the late 1890s  Formalized in the 1930s  Developed in order to study mathematical properties.  Lambda calculus is a conceptually simple universal model of computation 2
  • 3. Motivation  The lambda calculus can be called the smallest universal programming language of the world 3
  • 4. What is this?  The name derives from the Greek letter lambda (λ) used to denote binding a variable in a function  Single transformation rule -> variable substitution  Single function definition schema  Any computable function can be expressed and evaluated using this formalism  Functional Programming essentially implements this calculus  The λ-calculus provides a simple semantics for computation, enabling properties of computation to be studied formally 4
  • 5. Lambda Terms  a variable is itself a valid lambda term  if 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 5
  • 6. lambda abstraction  λ x.t  X is the input  T is the expression  λ x.x+2 == f(x) = x +2 6
  • 7. Lambda Property - 1  Lambda:  sqsum(x, y) = x*x + y*y  (x, y) ↦ x*x + y*y 7
  • 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. 8
  • 9. Lambda Property-2  In 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. 9
  • 10. Lambda Property-2 - Equivalent  In mathematics and comp uter science, a higher- order function (also functional form, functional or funct or) is a function that does at least one of the following:  take one or more functions as an input  output a function 10
  • 11. Lambda Property 3  1 - (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 11
  • 12. Lambda Property 3 - Equivalent  In mathematics and com puter 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 12
  • 13. Much more  α-conversion: changing bound variables (alpha);  β-reduction: applying functions to their arguments (beta);  η-conversion: which captures a notion of extensionality (eta).  Recursion  Parallelism and concurrency 13