Lambda Calculus Fundamentals
- 54Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What is the lambda calculus fundamentally a theory of?
Functions understood as mappings from inputs to outputs.
Or swipe the card
54 cards
What is the lambda calculus fundamentally a theory of?
Functions understood as mappings from inputs to outputs.
In the lambda calculus, what does a variable such as x represent?
An arbitrary input to a function.
What does it mean for two lambda expressions to be alpha equivalent?
They differ only in the name of a bound input variable and represent the same function.
What is alpha conversion?
Renaming a function's bound variable and its occurrences in the function body.
How is a function that maps input x to output m written as a lambda abstraction?
λx.m
What is a lambda abstraction?
A function written using lambda notation, such as λx.m.
What are the three kinds of expressions in the basic lambda calculus?
Variables, lambda abstractions, and function applications.
What does function application do in the lambda calculus?
It supplies an input to a function so that the function can be evaluated.
What is beta reduction?
Substituting a function's supplied input for its bound input variable in the function body.
How is a beta reduction conventionally marked?
With an arrow labeled beta: →β.
What is the general beta-reduction rule for applying λx.m to n?
(λx.m)n→βm[x:=n].
What does applying λx.x+1 to 3 produce?
3+1, which evaluates to 4.
What makes a lambda-calculus function higher order?
It can take functions as inputs or return functions as outputs.
How can a calculus in which each abstraction has one input represent a function with two inputs?
Make the first input produce a function that accepts the second input.
What is currying?
Representing a multi-input function as a sequence of functions, each taking one input.
How does the curried function λx.λy.x+y add two inputs?
Apply it to the first input to get a function, then apply that function to the second input.
What is the result of applying λx.λy.L first to m and then to n?
L[x:=m][y:=n].
Who was currying named after?
Logician Haskell Curry.
How is true represented using the lambda-calculus boolean encoding?
λx.λy.x.
How is false represented using the lambda-calculus boolean encoding?
λx.λy.y.
How can an if-then-else operation be represented in the lambda calculus?
λb.λx.λy.bxy.
How does the encoded if operation choose between its two terms?
It returns the first term when given true and the second when given false.
What does the encoded if operation return when given true, M, and N?
M.
What does the encoded if operation return when given false, M, and N?
N.
How can logical negation be expressed using the encoded booleans and conditional?
λb.if b then false else true.
Why can programmers reason about encoded booleans and conditionals without expanding their definitions every time?
Once their encodings are established, they can be treated as the concepts they represent.
Besides booleans and conditionals, what other programming concepts does the content say can be encoded in the lambda calculus?
Numbers, recursion, and data types such as pairs.
What problem is a type system intended to prevent in the lambda calculus?
Meaningless applications, such as using a number where a boolean is required.
Which basic types are used in the typed example from the content?
bool for booleans and num for numbers.
How is the type of a term indicated?
Write the type after a colon, as in true:bool.
What does the function type A→B mean?
A function that takes an input of type A and produces an output of type B.
How is the input type shown in a typed lambda abstraction?
Write the type next to the input variable.
When is a function application allowed in the simply typed lambda calculus?
When the argument has the same type as the function's specified input type.
What is the type of a negation function that takes a boolean and returns a boolean?
bool→bool.
Why does a boolean negation function reject the numeric term 1 in the typed calculus?
The function expects a bool input, while 1 has type num.
What is the simply typed lambda calculus?
The lambda calculus augmented with a type system.
How is the simply typed lambda calculus compared with languages such as C or Java?
Its use of types is reminiscent of statically typed programming languages such as C and Java.
In the Curry–Howard interpretation, what does a type represent?
A proposition.
In the Curry–Howard interpretation, what does a term of a given type represent?
A proof of the proposition represented by that type.
In the interpretation described, what does the absence of a term of type A indicate?
That the proposition represented by A is false.
What logical proposition corresponds to the function type A→B?
A implies B.
What does the proposition A implies B assert?
If A is true, then B is true.
How does a function of type A→B establish the implication from A to B?
Apply the function to a term of type A to obtain a term of type B.
If there is a term n of type A and a function of type A→B, what can be constructed?
A term of type B, by applying the function to n.
What is the Curry–Howard correspondence?
The relationship between types and propositions, and between program terms and proofs.
What are proof assistants?
Programming systems that use the correspondence between types and proofs to express and check mathematical proofs.
Which proof assistants are mentioned in the content?
Lean and Agda.
What example of a mathematical result is described as being proved in Lean?
That there are infinitely many prime numbers.
What does the Church–Turing thesis say about the computational power of the lambda calculus, as described in the content?
The lambda calculus can perform any computation that other programming languages can perform.
Why can the lambda calculus be computationally powerful despite its minimal syntax?
Its functions are higher order: they can accept functions and return functions.
Is the lambda calculus presented as a practical replacement for modern programming languages?
No. Its basic encodings are tedious, so it is not suited to ordinary real-world programming.
What is one major benefit of representing computation with the lambda calculus?
It provides a small mathematical framework for studying computation and reasoning about programs rigorously.
Who developed the lambda calculus, and when?
Alonzo Church developed it between the 1930s and 1940s.
What connection did Alonzo Church have to Alan Turing?
Church was Turing's doctoral adviser.

Ask anything
We've read this whole study set, so questions about it get the best answers.