1. Home
  2. Explore
  3. Computer Science
  4. Lambda Calculus Fundamentals

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Lambda Calculus Fundamentals

  • 58Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Lambda Foundations
At its core, the lambda calculus is a theory of
.

58 questions

  1. 1
    At its core, the lambda calculus is a theory of
    _____
    .
    Hint

    Think about the mathematical objects that map inputs to outputs.

    Answer

    functions

  2. 2
    In the lambda calculus, a function is understood as a mapping from
    _____
    to outputs.
    Hint

    A function receives these and produces results.

    Answer

    inputs

  3. 3
    In a function such as one that maps an arbitrary input x to its square, x is called a
    _____
    .
    Hint

    It is a symbol standing for an arbitrary input.

    Answer

    variable

  4. 4
    Renaming a function's input variable without changing which inputs map to which outputs produces an
    _____
    function.
    Hint

    The term describes two functions that differ only in the name of a bound input.

    Answer

    alpha equivalent

  5. 5
    The process of renaming an input variable and its occurrences throughout a function is called
    _____
    .
    Hint

    It is the operation that creates an alpha-equivalent function.

    Answer

    alpha conversion

  6. 6
    In lambda notation, the Greek letter lambda is used as a visual marker that a
    _____
    is being defined.
    Hint

    It introduces an input and the result associated with that input.

    Answer

    function

  7. 7
    In a lambda abstraction, the dot separates the input variable from the function's
    _____
    .
    Hint

    It is the result expression that follows the dot.

    Answer

    output

  8. 8
    A function written using lambda, an input variable, a dot, and an output expression is called a
    _____
    .
    Hint

    This is the name for the basic written form of a function in the calculus.

    Answer

    lambda abstraction

  9. 9
    The three kinds of expressions in the lambda calculus are variables, lambda abstractions, and
    _____
    .
    Hint

    This expression form uses a function with an argument.

    Answer

    applications

  10. 10
    Applying a function to an input and substituting that input for the function's variable is called
    _____
    .
    Hint

    The name of this computation rule includes the Greek letter beta.

    Answer

    beta reduction

  11. 11
    To apply a lambda abstraction to an input, the input is written
    _____
    of the function.
    Hint

    The argument is placed after the function in the notation described.

    Answer

    to the right

  12. 12
    The arrow used to show a beta reduction is marked with the Greek letter
    _____
    .
    Hint

    It is the same Greek letter named in the term beta reduction.

    Answer

    beta

  13. 13
    Applying the function that maps x to x plus 1 to the input 3 produces
    _____
    .
    Hint

    Substitute 3 for x, then evaluate the resulting addition.

    Answer

    4

  14. 14
    During beta reduction, the argument replaces occurrences of the function's input variable in the
    _____
    .
    Hint

    It is the expression in the abstraction that comes after the dot.

    Answer

    output

  15. 15
    The lambda calculus can compute anything a computer can do using its three expression forms and
    _____
    .
    Hint

    It is the calculus's single rule of computation.

    Answer

    beta reduction

  16. 16
    A function is higher order when it can take functions as inputs or
    _____
    .
    Hint

    The function-valued result is another way functions can be used as inputs or results.

    Answer

    return functions as outputs

  17. 17
    Although a lambda abstraction has only one input variable, multiple inputs can be handled by having a function return another
    _____
    .
    Hint

    The returned object can then accept the next input.

    Answer

    function

  18. 18
    To represent addition with a function that accepts one input at a time, the first input x is used to create a function that adds x to a second input
    _____
    .
    Hint

    This is the variable used for the next input in the example.

    Answer

    y

  19. 19
    After a curried addition function receives 1 as its first input, the returned function adds 1 to its next
    _____
    .
    Hint

    The returned function is still waiting to receive a value.

    Answer

    input

  20. 20
    Applying the returned function that adds 1 to the input 2 produces
    _____
    .
    Hint

    The second application completes the addition.

    Answer

    3

  21. 21
    Using functions that return functions to apply multiple inputs sequentially is called
    _____
    .
    Hint

    This technique is named after the logician Haskell Curry.

    Answer

    currying

  22. 22
    In a curried two-input function, the first beta reduction substitutes the first argument for the first variable, leaving a function that awaits the
    _____
    argument.
    Hint

    The remaining function has not yet received the other input.

    Answer

    second

  23. 23
    After both reductions of a curried two-input function, the result contains the first and second arguments substituted for their respective
    _____
    .
    Hint

    These are the function's named inputs.

    Answer

    variables

  24. 24
    The lambda calculus represents true with a function that takes two inputs and returns the
    _____
    one.
    Hint

    This boolean encoding selects the earlier of its two arguments.

    Answer

    first

  25. 25
    The lambda calculus represents false with a function that takes two inputs and returns the
    _____
    one.
    Hint

    This encoding selects the other input from the one selected by true.

    Answer

    second

  26. 26
    In the encoded conditional, the boolean is applied to the two possible result terms, conventionally called
    _____
    and Y.
    Hint

    This is the first candidate result supplied to the boolean.

    Answer

    X

  27. 27
    The encoded if statement takes three inputs: a boolean B and two possible results,
    _____
    and Y.
    Hint

    It is the first of the two result choices.

    Answer

    X

  28. 28
    When the encoded conditional receives true, it returns the
    _____
    of its two candidate terms.
    Hint

    This follows from the definition of the true encoding.

    Answer

    first

  29. 29
    When the encoded conditional receives false, it returns the
    _____
    of its two candidate terms.
    Hint

    This follows from the definition of the false encoding.

    Answer

    second

  30. 30
    The not function can be expressed by using an if statement to return false when its boolean input is true and
    _____
    when it is false.
    Hint

    The function swaps the two boolean values.

    Answer

    true

  31. 31
    Beyond booleans and conditionals, the lambda calculus can encode numbers, recursion, and data types such as
    _____
    .
    Hint

    This data type groups two values together.

    Answer

    pairs

  32. 32
    Once a concept such as a conditional has been encoded, a programmer can reason about the concept itself without unfolding its low-level
    _____
    .
    Hint

    This is the detailed encoding that can be set aside after it is established.

    Answer

    implementation

  33. 33
    The lambda calculus is not suited to real-world programming in part because common features require
    _____
    encodings.
    Hint

    The encodings involve lengthy, low-level constructions rather than convenient built-in features.

    Answer

    tedious

  34. 34
    A type is a label assigned to a lambda-calculus term to indicate that the term
    _____
    .
    Hint

    Types help rule out nonsensical uses of terms.

    Answer

    makes sense

  35. 35
    The basic types introduced for the examples are bool for boolean values and
    _____
    for numeric values.
    Hint

    This type name abbreviates numbers.

    Answer

    num

  36. 36
    The type of a term is written after a
    _____
    .
    Hint

    It is the punctuation mark used between a term and its type.

    Answer

    colon

  37. 37
    A function that takes an input of type A and returns an output of type B has function type
    _____
    .
    Hint

    The function type records the input type first and the output type second.

    Answer

    A to B

  38. 38
    When writing a typed lambda abstraction, the type of its input is specified next to the
    _____
    .
    Hint

    The type annotation is placed beside the name that represents the function's argument.

    Answer

    input variable

  39. 39
    A typed lambda abstraction may be applied only to a term whose type matches the type specified for its
    _____
    .
    Hint

    The restriction concerns the function's expected argument.

    Answer

    input variable

  40. 40
    The not function takes a boolean and returns a boolean, so its type is
    _____
    .
    Hint

    Its input and output have the same boolean type.

    Answer

    bool to bool

  41. 41
    Applying the not function to 1 is disallowed because 1 has type num rather than
    _____
    .
    Hint

    The function expects a boolean input.

    Answer

    bool

  42. 42
    The lambda calculus with its type system attached is called the
    _____
    .
    Hint

    Its name distinguishes it from the untyped calculus by emphasizing its basic type system.

    Answer

    simply typed lambda calculus

  43. 43
    In the Curry Howard correspondence, types are interpreted as
    _____
    .
    Hint

    They are statements that can be true or false.

    Answer

    propositions

  44. 44
    Under the Curry Howard interpretation, a term of a given type is viewed as a
    _____
    that the corresponding proposition is true.
    Hint

    It is evidence supporting a logical statement.

    Answer

    proof

  45. 45
    In this interpretation, if no term of a type exists, the proposition corresponding to that type is treated as
    _____
    .
    Hint

    The content uses existence of a term as evidence that a proposition is true.

    Answer

    false

  46. 46
    The function type A to B corresponds to the logical proposition
    _____
    .
    Hint

    It states that truth of A guarantees truth of B.

    Answer

    A implies B

  47. 47
    If A represents the proposition that it is raining and B represents the proposition that the ground is wet, then A implies B means that if it is raining,
    _____
    .
    Hint

    This is the consequence associated with proposition B.

    Answer

    the ground is wet

  48. 48
    If a term N has type A and a function has type A to B, applying that function to N produces a term of type
    _____
    .
    Hint

    This is the output type recorded by the function type.

    Answer

    B

  49. 49
    In the logic interpretation, having both a proof of A and a proof of A implies B allows us to conclude
    _____
    .
    Hint

    It is the conclusion guaranteed by the implication.

    Answer

    B

  50. 50
    The relationship between propositions and types is called the
    _____
    .
    Hint

    It connects logical propositions and proofs with types and terms.

    Answer

    Curry Howard correspondence

  51. 51
    Programming languages designed to let users write mathematical proofs as computer code using this correspondence are called
    _____
    .
    Hint

    These systems assist with constructing and checking formal proofs.

    Answer

    proof assistants

  52. 52
    Lean and Agda are examples of
    _____
    .
    Hint

    They are systems used to write and check formal mathematical proofs.

    Answer

    proof assistants

  53. 53
    In a proof assistant, a proof can be checked for correctness by verifying that it
    _____
    .
    Hint

    The verification relies on the program satisfying the system's type rules.

    Answer

    type checks

  54. 54
    The lambda calculus provides a tiny mathematical definition of what it means to
    _____
    .
    Hint

    It gives a formal account of carrying out a calculation or procedure.

    Answer

    compute

  55. 55
    The lambda calculus allows researchers to reason rigorously about programs and
    _____
    .
    Hint

    It is the broader process that programs carry out.

    Answer

    computation

  56. 56
    The lambda calculus has been important not only in theoretical computer science but also in
    _____
    .
    Hint

    It is the field concerned with formal reasoning and systems of logic.

    Answer

    mathematical logic

  57. 57
    The simply typed lambda calculus is reminiscent of statically typed programming languages such as C and
    _____
    .
    Hint

    It is the other example language named alongside C.

    Answer

    Java

  58. 58
    The central value of the lambda calculus is less its use as a practical programming language and more its role as a tool for mathematical study of
    _____
    .
    Hint

    It enables formal reasoning about both writing programs and what they do.

    Answer

    programming and computation

1 of 58
Question 1 of 58

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent