SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

Booth and bit pair encoding
Booth and bit pair encodingBooth and bit pair encoding
Booth and bit pair encoding
Basit Ali
 
Numerical analysis multivariable unconstrained
Numerical analysis  multivariable unconstrainedNumerical analysis  multivariable unconstrained
Numerical analysis multivariable unconstrained
SHAMJITH KM
 

Mais procurados (20)

Lambda Calculus by Dustin Mulcahey
Lambda Calculus by Dustin Mulcahey Lambda Calculus by Dustin Mulcahey
Lambda Calculus by Dustin Mulcahey
 
Booth and bit pair encoding
Booth and bit pair encodingBooth and bit pair encoding
Booth and bit pair encoding
 
Fourier transform
Fourier transformFourier transform
Fourier transform
 
Constrained Optimization
Constrained OptimizationConstrained Optimization
Constrained Optimization
 
Lesson 25: Unconstrained Optimization I
Lesson 25: Unconstrained Optimization ILesson 25: Unconstrained Optimization I
Lesson 25: Unconstrained Optimization I
 
PROLOG: Matching And Proof Search In Prolog
PROLOG: Matching And Proof Search In PrologPROLOG: Matching And Proof Search In Prolog
PROLOG: Matching And Proof Search In Prolog
 
Numerical analysis multivariable unconstrained
Numerical analysis  multivariable unconstrainedNumerical analysis  multivariable unconstrained
Numerical analysis multivariable unconstrained
 
Computability and Complexity
Computability and ComplexityComputability and Complexity
Computability and Complexity
 
Chapter 1 Introduction to Digital Logic
Chapter 1 Introduction to Digital LogicChapter 1 Introduction to Digital Logic
Chapter 1 Introduction to Digital Logic
 
Linear differential equation of second order
Linear differential equation of second orderLinear differential equation of second order
Linear differential equation of second order
 
CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR
 
Simplex method
Simplex method Simplex method
Simplex method
 
System of linear equation and matrices
System of linear equation and matricesSystem of linear equation and matrices
System of linear equation and matrices
 
Predicate calculus
Predicate calculusPredicate calculus
Predicate calculus
 
Complex analysis
Complex analysisComplex analysis
Complex analysis
 
Lex
LexLex
Lex
 
Theory of computing
Theory of computingTheory of computing
Theory of computing
 
introduction to Numerical Analysis
introduction to Numerical Analysisintroduction to Numerical Analysis
introduction to Numerical Analysis
 
Dsp lab manual
Dsp lab manualDsp lab manual
Dsp lab manual
 
Importance & Application of Laplace Transform
Importance & Application of Laplace TransformImportance & Application of Laplace Transform
Importance & Application of Laplace Transform
 

Semelhante a Lambda calculus

Semelhante a 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
 

Último

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 

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