SlideShare una empresa de Scribd logo
1 de 29
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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 a 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 a 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)
 

Último

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
 
Speech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxSpeech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxpriyankatabhane
 
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.PraveenaKalaiselvan1
 
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
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxNandakishor Bhaurao Deshmukh
 
basic entomology with insect anatomy and taxonomy
basic entomology with insect anatomy and taxonomybasic entomology with insect anatomy and taxonomy
basic entomology with insect anatomy and taxonomyDrAnita Sharma
 
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 GenuineCall Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuinethapagita
 
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
 
《Queensland毕业文凭-昆士兰大学毕业证成绩单》
《Queensland毕业文凭-昆士兰大学毕业证成绩单》《Queensland毕业文凭-昆士兰大学毕业证成绩单》
《Queensland毕业文凭-昆士兰大学毕业证成绩单》rnrncn29
 
Servosystem Theory / Cybernetic Theory by Petrovic
Servosystem Theory / Cybernetic Theory by PetrovicServosystem Theory / Cybernetic Theory by Petrovic
Servosystem Theory / Cybernetic Theory by PetrovicAditi Jain
 
Environmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial BiosensorEnvironmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial Biosensorsonawaneprad
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxpriyankatabhane
 
trihybrid cross , test cross chi squares
trihybrid cross , test cross chi squarestrihybrid cross , test cross chi squares
trihybrid cross , test cross chi squaresusmanzain586
 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxBerniceCayabyab1
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPirithiRaju
 
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPirithiRaju
 
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
 
Topic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxTopic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxJorenAcuavera1
 

Último (20)

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
 
Speech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxSpeech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptx
 
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
 
User Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationUser Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather Station
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
 
basic entomology with insect anatomy and taxonomy
basic entomology with insect anatomy and taxonomybasic entomology with insect anatomy and taxonomy
basic entomology with insect anatomy and taxonomy
 
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 GenuineCall Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
 
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
 
《Queensland毕业文凭-昆士兰大学毕业证成绩单》
《Queensland毕业文凭-昆士兰大学毕业证成绩单》《Queensland毕业文凭-昆士兰大学毕业证成绩单》
《Queensland毕业文凭-昆士兰大学毕业证成绩单》
 
Servosystem Theory / Cybernetic Theory by Petrovic
Servosystem Theory / Cybernetic Theory by PetrovicServosystem Theory / Cybernetic Theory by Petrovic
Servosystem Theory / Cybernetic Theory by Petrovic
 
Environmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial BiosensorEnvironmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial Biosensor
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
 
Let’s Say Someone Did Drop the Bomb. Then What?
Let’s Say Someone Did Drop the Bomb. Then What?Let’s Say Someone Did Drop the Bomb. Then What?
Let’s Say Someone Did Drop the Bomb. Then What?
 
trihybrid cross , test cross chi squares
trihybrid cross , test cross chi squarestrihybrid cross , test cross chi squares
trihybrid cross , test cross chi squares
 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
 
Volatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -IVolatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -I
 
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
 
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
 
Topic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxTopic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptx
 

Lambda Calculus Introduction