SlideShare a Scribd company logo
1 of 29
Download to read offline
rafael de f. ferreira (@rafaeldff)
lambda calculus
David Hilbert
2
“Wir müssen wissen.
Wir werden wissen.”
We must know.
We will know.
3
Alonzo Church
Syntax
4
t ::=
x
λx. t
t t
terms:
variable
abstraction
application
Example expressions
5
x
x y
λx. x
λx. y
(λx. x) y
(λx. x x) z
(λx. x x) (λx. x x)
(λf. (λx. f (λy. x x y))

(λx. f (λy. x x y)))
Example expressions
6
(λx. x) y
variable
abstraction
variable
application
Substitution
7
[y↦z](λx. (λx. y x)) y

=

(λx. (λx. z x)) z
Semantics
8
(λx. t1) t2 ⟶ [x↦t2]t1

beta reduction
redex
Semantics - examples
9
(λx. x) y ⟶ y
Semantics - examples
10
(λx. x) (λy. y y) ⟶ (λy. y y)
Semantics - examples
11
(λx.(λz.x z)) y ⟶ (λz.y z)
12
Church Booleans
booleans
13
(λt. (λf. t))
(λt. (λf. f))
(λb. (λt. (λf. b t f))
true
false
if
booleans - example
14
if false (λx. x) (λz. z)

(λb. (λt. (λf. b t f)) false (λx. x) (λz. z) 

(λt. (λf. false t f)) (λx. x) (λz. z) 

(λf. false (λx. x) f) (λz. z) 

false (λx. x) (λz. z)
=

⟶

⟶

⟶
booleans - example
15
false (λx. x) (λz. z)

(λt. (λf. f)) (λx. x) (λz. z)

(λf. f) (λz. z)
(λz. z)
=

⟶

⟶

⟶
booleans - example
16
if false (λx. x) (λz. z) ⟶* (λz. z)
17
Church Numerals
numerals
18
λs. λz. z
λs. λz. s z
λs. λz. s (s z)
λs. λz. s (s (s z))
…
c0
c1
c2
c3
…
numerals
19
succ = λn. λs. λz. s (n s z)
numerals
20
succ c1

(λn. λs. λz. s (n s z)) c1

λs. λz. s ((λs. λz. s z) s z)
λs. λz. s ((λz. s z) z)
λs. λz. s (s z) = c2
…
=
=
⟶
⟶
⟶
numerals
21
plus = λm. λn. λs. λz. m s (n s z)
booleans - example
22
plus c0 c1 ⟶* c1
plus c1 c1 ⟶* c2
plus c2 c2 ⟶* c4
23
Recursion
recursion
24
ω = (λx. x x) (λx. x x)
recursion
25
ω = (λx. x x) (λx. x x)
(λx. x x) (λx. x x)
(λx. x x) (λx. x x)
(λx. x x) (λx. x x)
…
⟶

⟶

⟶

⟶

⟶
recursion
26
Y = λf. (λx. f (λy. x x y)) (λx. f (λy. x x y))
recursion
27
Y = λf. (λx. f (λy. x x y)) (λx. f (λy. x x y))
Y f = f (Y f) for all f
recursion
28
g = λfct. λn if (eq n c0) c1 (times n (fct (pred n)))

factorial = Y g
Y f = f (Y f) for all f
Propositions as Types
PhilipWadler
Introduction to
Lambda Calculus
Barendregt, Barendsen

More Related Content

What's hot

Applied Calculus Chapter 2 vector valued function
Applied Calculus Chapter  2 vector valued functionApplied Calculus Chapter  2 vector valued function
Applied Calculus Chapter 2 vector valued functionJ C
 
Rolle's Theorem
Rolle's TheoremRolle's Theorem
Rolle's TheoremShilpaM11
 
アプリカティブファンクターとHaskell 2014版
アプリカティブファンクターとHaskell 2014版アプリカティブファンクターとHaskell 2014版
アプリカティブファンクターとHaskell 2014版infinite_loop
 
Otter 2016-11-28-01-ss
Otter 2016-11-28-01-ssOtter 2016-11-28-01-ss
Otter 2016-11-28-01-ssRuo Ando
 
Organizing Numerical Theories using Axiomatic Type Classes
Organizing Numerical Theories using Axiomatic Type ClassesOrganizing Numerical Theories using Axiomatic Type Classes
Organizing Numerical Theories using Axiomatic Type ClassesLawrence Paulson
 
Applied Calculus Chapter 3 partial derivatives
Applied Calculus Chapter  3 partial derivativesApplied Calculus Chapter  3 partial derivatives
Applied Calculus Chapter 3 partial derivativesJ C
 
K11038 Mayur control ppt
K11038 Mayur control pptK11038 Mayur control ppt
K11038 Mayur control pptChetan Kumar
 
Module 01 Stack and Recursion
Module 01 Stack and RecursionModule 01 Stack and Recursion
Module 01 Stack and RecursionTushar B Kute
 
Application of partial derivatives with two variables
Application of partial derivatives with two variablesApplication of partial derivatives with two variables
Application of partial derivatives with two variablesSagar Patel
 

What's hot (18)

Functions
FunctionsFunctions
Functions
 
Applied Calculus Chapter 2 vector valued function
Applied Calculus Chapter  2 vector valued functionApplied Calculus Chapter  2 vector valued function
Applied Calculus Chapter 2 vector valued function
 
Limit & continuity, B.Sc . 1 calculus , Unit - 1
Limit & continuity, B.Sc . 1 calculus , Unit - 1Limit & continuity, B.Sc . 1 calculus , Unit - 1
Limit & continuity, B.Sc . 1 calculus , Unit - 1
 
Lec1
Lec1Lec1
Lec1
 
Rolle's Theorem
Rolle's TheoremRolle's Theorem
Rolle's Theorem
 
アプリカティブファンクターとHaskell 2014版
アプリカティブファンクターとHaskell 2014版アプリカティブファンクターとHaskell 2014版
アプリカティブファンクターとHaskell 2014版
 
Otter 2016-11-28-01-ss
Otter 2016-11-28-01-ssOtter 2016-11-28-01-ss
Otter 2016-11-28-01-ss
 
Aa1
Aa1Aa1
Aa1
 
Organizing Numerical Theories using Axiomatic Type Classes
Organizing Numerical Theories using Axiomatic Type ClassesOrganizing Numerical Theories using Axiomatic Type Classes
Organizing Numerical Theories using Axiomatic Type Classes
 
6. binary tree
6. binary tree6. binary tree
6. binary tree
 
Prgišče Lispa
Prgišče LispaPrgišče Lispa
Prgišče Lispa
 
Applied Calculus Chapter 3 partial derivatives
Applied Calculus Chapter  3 partial derivativesApplied Calculus Chapter  3 partial derivatives
Applied Calculus Chapter 3 partial derivatives
 
K11038 Mayur control ppt
K11038 Mayur control pptK11038 Mayur control ppt
K11038 Mayur control ppt
 
Newton
NewtonNewton
Newton
 
Module 01 Stack and Recursion
Module 01 Stack and RecursionModule 01 Stack and Recursion
Module 01 Stack and Recursion
 
Application of partial derivatives with two variables
Application of partial derivatives with two variablesApplication of partial derivatives with two variables
Application of partial derivatives with two variables
 
Assignment 3
Assignment 3Assignment 3
Assignment 3
 
Slides
SlidesSlides
Slides
 

Similar to Lambda Calculus Introduction

Truth, deduction, computation lecture g
Truth, deduction, computation   lecture gTruth, deduction, computation   lecture g
Truth, deduction, computation lecture gVlad Patryshev
 
Lambda? You Keep Using that Letter
Lambda? You Keep Using that LetterLambda? You Keep Using that Letter
Lambda? You Keep Using that LetterKevlin Henney
 
Difrentiation
DifrentiationDifrentiation
Difrentiationlecturer
 
Difrentiation 140930015134-phpapp01
Difrentiation 140930015134-phpapp01Difrentiation 140930015134-phpapp01
Difrentiation 140930015134-phpapp01rakambantah
 
February 11 2016
February 11 2016February 11 2016
February 11 2016khyps13
 
Limits
LimitsLimits
Limitssarcia
 
Chapter3partialderivatives 150105021210-conversion-gate02
Chapter3partialderivatives 150105021210-conversion-gate02Chapter3partialderivatives 150105021210-conversion-gate02
Chapter3partialderivatives 150105021210-conversion-gate02Cleophas Rwemera
 
Seismic data processing lecture 3
Seismic data processing lecture 3Seismic data processing lecture 3
Seismic data processing lecture 3Amin khalil
 
FunScript 2013 (with speakers notes)
FunScript 2013 (with speakers notes)FunScript 2013 (with speakers notes)
FunScript 2013 (with speakers notes)Zach Bray
 
Lesson 10 derivative of exponential functions
Lesson 10 derivative of exponential functionsLesson 10 derivative of exponential functions
Lesson 10 derivative of exponential functionsRnold Wilson
 
Tutorials--Graphs of Logarithmic Functions
Tutorials--Graphs of Logarithmic FunctionsTutorials--Graphs of Logarithmic Functions
Tutorials--Graphs of Logarithmic FunctionsMedia4math
 
Control digital: Tema 2. transformada Z
Control digital: Tema 2. transformada ZControl digital: Tema 2. transformada Z
Control digital: Tema 2. transformada ZSANTIAGO PABLO ALBERTO
 
Presentacion calculo jan
Presentacion calculo janPresentacion calculo jan
Presentacion calculo janjantrevino
 
Limits and derivatives
Limits and derivativesLimits and derivatives
Limits and derivativessahil9100
 
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...Marco Benini
 
Lesson 8: Basic Differentation Rules (slides)
Lesson 8: Basic Differentation Rules (slides)Lesson 8: Basic Differentation Rules (slides)
Lesson 8: Basic Differentation Rules (slides)Matthew Leingang
 

Similar to Lambda Calculus Introduction (20)

Truth, deduction, computation lecture g
Truth, deduction, computation   lecture gTruth, deduction, computation   lecture g
Truth, deduction, computation lecture g
 
Lambda? You Keep Using that Letter
Lambda? You Keep Using that LetterLambda? You Keep Using that Letter
Lambda? You Keep Using that Letter
 
Difrentiation
DifrentiationDifrentiation
Difrentiation
 
Matrix calculus
Matrix calculusMatrix calculus
Matrix calculus
 
Difrentiation 140930015134-phpapp01
Difrentiation 140930015134-phpapp01Difrentiation 140930015134-phpapp01
Difrentiation 140930015134-phpapp01
 
February 11 2016
February 11 2016February 11 2016
February 11 2016
 
Limits
LimitsLimits
Limits
 
1551 limits and continuity
1551 limits and continuity1551 limits and continuity
1551 limits and continuity
 
Chapter3partialderivatives 150105021210-conversion-gate02
Chapter3partialderivatives 150105021210-conversion-gate02Chapter3partialderivatives 150105021210-conversion-gate02
Chapter3partialderivatives 150105021210-conversion-gate02
 
Seismic data processing lecture 3
Seismic data processing lecture 3Seismic data processing lecture 3
Seismic data processing lecture 3
 
Grph quad fncts
Grph quad fnctsGrph quad fncts
Grph quad fncts
 
FunScript 2013 (with speakers notes)
FunScript 2013 (with speakers notes)FunScript 2013 (with speakers notes)
FunScript 2013 (with speakers notes)
 
Μαθηματικά Γ Λυκείου - Ν. Ράπτης
Μαθηματικά Γ Λυκείου - Ν. ΡάπτηςΜαθηματικά Γ Λυκείου - Ν. Ράπτης
Μαθηματικά Γ Λυκείου - Ν. Ράπτης
 
Lesson 10 derivative of exponential functions
Lesson 10 derivative of exponential functionsLesson 10 derivative of exponential functions
Lesson 10 derivative of exponential functions
 
Tutorials--Graphs of Logarithmic Functions
Tutorials--Graphs of Logarithmic FunctionsTutorials--Graphs of Logarithmic Functions
Tutorials--Graphs of Logarithmic Functions
 
Control digital: Tema 2. transformada Z
Control digital: Tema 2. transformada ZControl digital: Tema 2. transformada Z
Control digital: Tema 2. transformada Z
 
Presentacion calculo jan
Presentacion calculo janPresentacion calculo jan
Presentacion calculo jan
 
Limits and derivatives
Limits and derivativesLimits and derivatives
Limits and derivatives
 
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...
 
Lesson 8: Basic Differentation Rules (slides)
Lesson 8: Basic Differentation Rules (slides)Lesson 8: Basic Differentation Rules (slides)
Lesson 8: Basic Differentation Rules (slides)
 

Recently uploaded

trihybrid cross , test cross chi squares
trihybrid cross , test cross chi squarestrihybrid cross , test cross chi squares
trihybrid cross , test cross chi squaresusmanzain586
 
Base editing, prime editing, Cas13 & RNA editing and organelle base editing
Base editing, prime editing, Cas13 & RNA editing and organelle base editingBase editing, prime editing, Cas13 & RNA editing and organelle base editing
Base editing, prime editing, Cas13 & RNA editing and organelle base editingNetHelix
 
Davis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologyDavis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologycaarthichand2003
 
bonjourmadame.tumblr.com bhaskar's girls
bonjourmadame.tumblr.com bhaskar's girlsbonjourmadame.tumblr.com bhaskar's girls
bonjourmadame.tumblr.com bhaskar's girlshansessene
 
Thermodynamics ,types of system,formulae ,gibbs free energy .pptx
Thermodynamics ,types of system,formulae ,gibbs free energy .pptxThermodynamics ,types of system,formulae ,gibbs free energy .pptx
Thermodynamics ,types of system,formulae ,gibbs free energy .pptxuniversity
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxMurugaveni B
 
Servosystem Theory / Cybernetic Theory by Petrovic
Servosystem Theory / Cybernetic Theory by PetrovicServosystem Theory / Cybernetic Theory by Petrovic
Servosystem Theory / Cybernetic Theory by PetrovicAditi Jain
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024innovationoecd
 
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In DubaiDubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubaikojalkojal131
 
Speech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxSpeech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxpriyankatabhane
 
Microteaching on terms used in filtration .Pharmaceutical Engineering
Microteaching on terms used in filtration .Pharmaceutical EngineeringMicroteaching on terms used in filtration .Pharmaceutical Engineering
Microteaching on terms used in filtration .Pharmaceutical EngineeringPrajakta Shinde
 
Pests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPirithiRaju
 
Observational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive starsObservational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive starsSérgio Sacani
 
Introduction of Human Body & Structure of cell.pptx
Introduction of Human Body & Structure of cell.pptxIntroduction of Human Body & Structure of cell.pptx
Introduction of Human Body & Structure of cell.pptxMedical College
 
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptx
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptxGENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptx
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptxRitchAndruAgustin
 
FREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by naFREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by naJASISJULIANOELYNV
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫qfactory1
 
Biological classification of plants with detail
Biological classification of plants with detailBiological classification of plants with detail
Biological classification of plants with detailhaiderbaloch3
 
User Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationUser Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationColumbia Weather Systems
 
GenAI talk for Young at Wageningen University & Research (WUR) March 2024
GenAI talk for Young at Wageningen University & Research (WUR) March 2024GenAI talk for Young at Wageningen University & Research (WUR) March 2024
GenAI talk for Young at Wageningen University & Research (WUR) March 2024Jene van der Heide
 

Recently uploaded (20)

trihybrid cross , test cross chi squares
trihybrid cross , test cross chi squarestrihybrid cross , test cross chi squares
trihybrid cross , test cross chi squares
 
Base editing, prime editing, Cas13 & RNA editing and organelle base editing
Base editing, prime editing, Cas13 & RNA editing and organelle base editingBase editing, prime editing, Cas13 & RNA editing and organelle base editing
Base editing, prime editing, Cas13 & RNA editing and organelle base editing
 
Davis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologyDavis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technology
 
bonjourmadame.tumblr.com bhaskar's girls
bonjourmadame.tumblr.com bhaskar's girlsbonjourmadame.tumblr.com bhaskar's girls
bonjourmadame.tumblr.com bhaskar's girls
 
Thermodynamics ,types of system,formulae ,gibbs free energy .pptx
Thermodynamics ,types of system,formulae ,gibbs free energy .pptxThermodynamics ,types of system,formulae ,gibbs free energy .pptx
Thermodynamics ,types of system,formulae ,gibbs free energy .pptx
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
 
Servosystem Theory / Cybernetic Theory by Petrovic
Servosystem Theory / Cybernetic Theory by PetrovicServosystem Theory / Cybernetic Theory by Petrovic
Servosystem Theory / Cybernetic Theory by Petrovic
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024
 
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In DubaiDubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
 
Speech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxSpeech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptx
 
Microteaching on terms used in filtration .Pharmaceutical Engineering
Microteaching on terms used in filtration .Pharmaceutical EngineeringMicroteaching on terms used in filtration .Pharmaceutical Engineering
Microteaching on terms used in filtration .Pharmaceutical Engineering
 
Pests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdf
 
Observational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive starsObservational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive stars
 
Introduction of Human Body & Structure of cell.pptx
Introduction of Human Body & Structure of cell.pptxIntroduction of Human Body & Structure of cell.pptx
Introduction of Human Body & Structure of cell.pptx
 
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptx
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptxGENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptx
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptx
 
FREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by naFREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by na
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫
 
Biological classification of plants with detail
Biological classification of plants with detailBiological classification of plants with detail
Biological classification of plants with detail
 
User Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationUser Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather Station
 
GenAI talk for Young at Wageningen University & Research (WUR) March 2024
GenAI talk for Young at Wageningen University & Research (WUR) March 2024GenAI talk for Young at Wageningen University & Research (WUR) March 2024
GenAI talk for Young at Wageningen University & Research (WUR) March 2024
 

Lambda Calculus Introduction