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

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
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...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
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...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
[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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

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