SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (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
 

Ähnlich wie Lambda Calculus

Difrentiation
DifrentiationDifrentiation
Difrentiation
lecturer
 
Difrentiation 140930015134-phpapp01
Difrentiation 140930015134-phpapp01Difrentiation 140930015134-phpapp01
Difrentiation 140930015134-phpapp01
rakambantah
 
Limits
LimitsLimits
Limits
sarcia
 
Chapter3partialderivatives 150105021210-conversion-gate02
Chapter3partialderivatives 150105021210-conversion-gate02Chapter3partialderivatives 150105021210-conversion-gate02
Chapter3partialderivatives 150105021210-conversion-gate02
Cleophas Rwemera
 
Lesson 10 derivative of exponential functions
Lesson 10 derivative of exponential functionsLesson 10 derivative of exponential functions
Lesson 10 derivative of exponential functions
Rnold Wilson
 
Presentacion calculo jan
Presentacion calculo janPresentacion calculo jan
Presentacion calculo jan
jantrevino
 
Limits and derivatives
Limits and derivativesLimits and derivatives
Limits and derivatives
sahil9100
 

Ähnlich wie Lambda Calculus (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)
 

Kürzlich hochgeladen

The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptx
seri bangash
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Sérgio Sacani
 
Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
MohamedFarag457087
 
Conjugation, transduction and transformation
Conjugation, transduction and transformationConjugation, transduction and transformation
Conjugation, transduction and transformation
Areesha Ahmad
 

Kürzlich hochgeladen (20)

The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptx
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdf
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts ServiceJustdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
 
Clean In Place(CIP).pptx .
Clean In Place(CIP).pptx                 .Clean In Place(CIP).pptx                 .
Clean In Place(CIP).pptx .
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
 
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRLKochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
 
Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
 
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
 
chemical bonding Essentials of Physical Chemistry2.pdf
chemical bonding Essentials of Physical Chemistry2.pdfchemical bonding Essentials of Physical Chemistry2.pdf
chemical bonding Essentials of Physical Chemistry2.pdf
 
Molecular markers- RFLP, RAPD, AFLP, SNP etc.
Molecular markers- RFLP, RAPD, AFLP, SNP etc.Molecular markers- RFLP, RAPD, AFLP, SNP etc.
Molecular markers- RFLP, RAPD, AFLP, SNP etc.
 
Conjugation, transduction and transformation
Conjugation, transduction and transformationConjugation, transduction and transformation
Conjugation, transduction and transformation
 
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
 
Sector 62, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 62, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Zoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfZoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdf
 
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptxCOST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
 
SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICESAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
 

Lambda Calculus