1. Home
  2. Explore
  3. Computer Science
  4. Lean’s Dependent Type Theory

Study methods

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

Lean’s Dependent Type Theory

  • 97Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Lean Foundations
Lean is an open-source interactive
prover.

97 questions

  1. 1
    Lean is an open-source interactive
    _____
    prover.
    Hint

    It is used to check formal proofs.

    Answer

    theorem prover

  2. 2
    Lean was developed by Leonardo de Moura at
    _____
    Research.
    Hint

    This organization is a major technology company.

    Answer

    Microsoft

  3. 3
    Lean is primarily based on
    _____
    type theory.
    Hint

    In this kind of type theory, types may depend on terms.

    Answer

    dependent

  4. 4
    Lean is a
    _____
    system rather than an intuitionistic system.
    Hint

    This system accepts principles such as the law of excluded middle.

    Answer

    classical

  5. 5
    Lean is not based on
    _____
    type theory.
    Hint

    This theory is commonly abbreviated HoTT.

    Answer

    homotopy

  6. 6
    Lean is very similar to the axiom system known as
    _____
    .
    Hint

    This abbreviation is associated with Coq's foundational calculus.

    Answer

    CIC

  7. 7
    The mathlib library develops pure mathematics as well as tools for programming and
    _____
    .
    Hint

    This involves writing programs that manipulate or generate programs.

    Answer

    metaprogramming

  8. 8
    The untyped lambda calculus was developed by
    _____
    Church.
    Hint

    He is also associated with the Church-Rosser theorem.

    Answer

    Alonzo

  9. 9
    The lambda calculus is a simple model of
    _____
    .
    Hint

    It describes how expressions are evaluated.

    Answer

    computation

  10. 10
    The computational power of the lambda calculus is equivalent to that of
    _____
    machines.
    Hint

    These machines are a standard model of computation.

    Answer

    Turing

  11. 11
    In the grammar of the untyped lambda calculus, an expression can be a variable, an application, or a
    _____
    .
    Hint

    This construct binds a variable inside a term.

    Answer

    lambda

  12. 12
    An application in the lambda calculus is represented by the adjacency of two
    _____
    .
    Hint

    One expression is applied to another.

    Answer

    expressions

  13. 13
    A lambda expression binds the value of a variable inside a
    _____
    .
    Hint

    The bound variable occurs within this syntactic object.

    Answer

    term

  14. 14
    The reduction rules described for the lambda calculus are
    _____
    because reductions may be performed in different locations.
    Hint

    There can be multiple possible reduction paths.

    Answer

    nondeterministic

  15. 15
    The principal reduction rule for applying a lambda is called
    _____
    reduction.
    Hint

    It substitutes an argument into the body of a function.

    Answer

    beta

  16. 16
    Different reduction paths in the lambda calculus can be joined because reduction is
    _____
    .
    Hint

    Two terms reached from a common starting term can reduce to a common term.

    Answer

    confluent

  17. 17
    The theorem stating that divergent reduction paths can be joined is the
    _____
    theorem.
    Hint

    Its name combines the surname of the lambda calculus's creator with another surname.

    Answer

    Church-Rosser

  18. 18
    Call-by-value and call-by-name are restrictions determined by how
    _____
    is performed.
    Hint

    They specify evaluation strategies.

    Answer

    reductions

  19. 19
    In simple type theory, lambda-bound variables are annotated with a
    _____
    .
    Hint

    The annotation constrains which arguments may be supplied.

    Answer

    type

  20. 20
    The basic types in the simple system consist of function types and a base type of
    _____
    .
    Hint

    This base type ensures that the theory contains at least one type.

    Answer

    individuals

  21. 21
    The typing rule that retrieves a variable's type from the context is the
    _____
    rule.
    Hint

    It looks for a declaration of the variable in Gamma.

    Answer

    variable

  22. 22
    To type an application, the function's domain must match the
    _____
    of its argument.
    Hint

    The argument must have the function's expected input type.

    Answer

    type

  23. 23
    If a function has domain alpha and codomain beta, applying it to an argument of type alpha produces a result of type
    _____
    .
    Hint

    This is the function's output type.

    Answer

    beta

  24. 24
    A lambda has function type alpha to beta when its body has type beta in a context extended with the variable having type
    _____
    .
    Hint

    This is the declared input type of the lambda.

    Answer

    alpha

  25. 25
    Unlike the untyped lambda calculus, simple type theory has the property of
    _____
    normalization.
    Hint

    This means every well-typed term eventually reaches a normal form.

    Answer

    strong

  26. 26
    The
    _____
    combinator can be written in the untyped lambda calculus but has no valid typing in simple type theory.
    Hint

    It is associated with general recursion and infinite unfolding.

    Answer

    Y

  27. 27
    Dependent function types are also called dependent
    _____
    types.
    Hint

    The notation commonly uses the Greek letter associated with a product-like binder.

    Answer

    Pi

  28. 28
    In a dependent function type, the codomain is allowed to refer to the bound variable
    _____
    .
    Hint

    This is the variable introduced by the forall binder.

    Answer

    x

  29. 29
    Application of a dependent function requires substituting the argument for the bound variable in the
    _____
    .
    Hint

    This is the result type that may depend on the input.

    Answer

    codomain

  30. 30
    A type of types is introduced so that the system can quantify over variables that are themselves
    _____
    .
    Hint

    This supports polymorphic constructions such as the identity function.

    Answer

    types

  31. 31
    The type of types in the basic presentation is denoted by
    _____
    .
    Hint

    It is a universe symbol rather than an ordinary base type.

    Answer

    U

  32. 32
    The ability to combine terms and types into one collection allows computation at the
    _____
    level.
    Hint

    This computation can determine or construct types.

    Answer

    type

  33. 33
    The rule asserting that type has type type leads to a version of
    _____
    's paradox.
    Hint

    This paradox concerns self-reference involving sets or types.

    Answer

    Russell

  34. 34
    The inconsistency from a self-containing universe is avoided by introducing a hierarchy of
    _____
    .
    Hint

    Each level is placed in a higher level rather than containing itself.

    Answer

    universes

  35. 35
    In the universe hierarchy, the universe at level n is a type at level
    _____
    .
    Hint

    A universe is classified one level above itself.

    Answer

    n+1

  36. 36
    When forming a Pi type from two universes, the ordinary universe-level operation is
    _____
    .
    Hint

    The larger of the two levels determines the result.

    Answer

    max

  37. 37
    The correspondence in which propositions behave like types and proofs behave like terms is the
    _____
    correspondence.
    Hint

    It connects logic with type theory.

    Answer

    Curry-Howard

  38. 38
    Under the Curry-Howard correspondence, a false proposition corresponds to an
    _____
    type.
    Hint

    Such a type has no inhabitants.

    Answer

    empty

  39. 39
    The universe of propositions is denoted by P and identified with
    _____
    .
    Hint

    It is the lowest universe level.

    Answer

    U0

  40. 40
    The special universe operation used for propositions is called
    _____
    .
    Hint

    It behaves like max except when one argument is zero.

    Answer

    imax

  41. 41
    The rule using imax to place certain high-level constructions back in the proposition universe is called
    _____
    .
    Hint

    It permits quantification over a collection that includes the resulting proposition universe.

    Answer

    impredicativity

  42. 42
    A judgment allowing a term of type alpha to be used where type beta is expected, when alpha and beta are definitionally equal, is the
    _____
    judgment.
    Hint

    It connects types that reduce to or otherwise count as the same.

    Answer

    convertibility

  43. 43
    The three basic properties of convertibility are reflexivity, symmetry, and
    _____
    .
    Hint

    This property chains two equality judgments together.

    Answer

    transitivity

  44. 44
    The compatibility rules state that definitionally equal parts yield definitionally equal
    _____
    terms.
    Hint

    The property is preserved when larger expressions are constructed.

    Answer

    whole

  45. 45
    The definitional equality corresponding to ordinary beta reduction is called the
    _____
    rule.
    Hint

    It performs substitution in an applied lambda.

    Answer

    beta

  46. 46
    The eta rule applies when the expression being abstracted does not depend on
    _____
    .
    Hint

    This is the variable bound by the lambda.

    Answer

    x

  47. 47
    The rule stating that a lambda abstraction applied to an expression is equal to the original expression is the
    _____
    rule.
    Hint

    It expresses extensionality for functions.

    Answer

    eta

  48. 48
    The mechanism for defining general new types through labeled constructors is called
    _____
    types.
    Hint

    Natural numbers and logical connectives can be defined this way.

    Answer

    inductive

  49. 49
    In an inductive specification, the labels attached to alternatives are called
    _____
    .
    Hint

    They create inhabitants of the inductive type.

    Answer

    constructors

  50. 50
    The natural numbers are generated by zero and the
    _____
    function.
    Hint

    This function maps a natural number to the next natural number.

    Answer

    successor

  51. 51
    The natural numbers form the smallest type freely generated by zero and
    _____
    .
    Hint

    This is the second natural-number constructor.

    Answer

    successor

  52. 52
    An inductive type automatically provides the type itself, its constructors, and a
    _____
    .
    Hint

    This principle supports recursive definitions and induction.

    Answer

    recursor

  53. 53
    The natural-number recursor requires a value for zero and a step function that produces the value for
    _____
    from the value for n.
    Hint

    The step case handles the next natural number.

    Answer

    successor n

  54. 54
    The computation rules for recursors are also definitional equalities and
    _____
    rules.
    Hint

    They describe how recursive computations evaluate.

    Answer

    reduction

  55. 55
    Using the natural-number recursor into Prop gives the principle of induction associated with the
    _____
    axioms.
    Hint

    These axioms characterize the natural numbers.

    Answer

    Peano

  56. 56
    The logical connective that can be defined with one constructor taking proofs of both p and q is
    _____
    .
    Hint

    An inhabitant requires both component propositions.

    Answer

    and

  57. 57
    The logical connective with one constructor for p and another for q is
    _____
    .
    Hint

    Either side independently provides an inhabitant.

    Answer

    or

  58. 58
    The proposition with no constructors represents
    _____
    or false.
    Hint

    It has no possible proof.

    Answer

    Bottom

  59. 59
    The proposition with exactly one named constructor represents
    _____
    .
    Hint

    It has one canonical proof.

    Answer

    true

  60. 60
    An inductive declaration must be strictly
    _____
    .
    Hint

    This restriction controls where the inductive type may appear in function domains.

    Answer

    positive

  61. 61
    Strict positivity prohibits the inductive type variable from appearing on the
    _____
    side of a function arrow.
    Hint

    The problematic occurrence is in a function's domain.

    Answer

    left

  62. 62
    Allowing the bad inductive definition would produce an injection from the powerset of the type into the type itself, contradicting
    _____
    theorem.
    Hint

    This theorem states that a set cannot be put into bijection with its powerset.

    Answer

    Cantor's

  63. 63
    Equality is defined as an inductive family with a constructor called
    _____
    .
    Hint

    It proves that an object is equal to itself.

    Answer

    refl

  64. 64
    The equality recursor expresses the
    _____
    property of equality.
    Hint

    If x equals y, a property holding of x can be transferred to y.

    Answer

    substitution

  65. 65
    Proof irrelevance says that any two proofs in the lowest universe are definitionally
    _____
    .
    Hint

    They are treated as indistinguishable for definitional equality.

    Answer

    equal

  66. 66
    Proof irrelevance is incompatible with the HoTT principle of
    _____
    .
    Hint

    This principle treats equivalent types as equal in a strong way.

    Answer

    univalence

  67. 67
    A proposition with multiple possible inhabitants can eliminate only into the lowest universe under the rule called
    _____
    elimination.
    Hint

    The eliminator is restricted to propositions.

    Answer

    small

  68. 68
    A proposition that can eliminate into any universe under special constructor conditions is called a
    _____
    eliminating type.
    Hint

    Such a type has at most one element.

    Answer

    subsingleton

  69. 69
    A type with at most one element is called a
    _____
    .
    Hint

    The name refers to having no more than one inhabitant.

    Answer

    subsingleton

  70. 70
    Propositional extensionality states that propositions equivalent in both directions are
    _____
    .
    Hint

    An inhabitant of p to q and one of q to p establishes the relation.

    Answer

    equal

  71. 71
    Quotient types are generated up to a relation rather than being freely
    _____
    .
    Hint

    The relation identifies certain elements.

    Answer

    generated

  72. 72
    The axiom that allows one to obtain an element of alpha from an inhabitant of nonempty alpha is the axiom of
    _____
    .
    Hint

    It selects an element from a nonempty type.

    Answer

    choice

  73. 73
    The axiom of choice has no computational
    _____
    .
    Hint

    It supports classical reasoning rather than evaluation.

    Answer

    interpretation

  74. 74
    From the classical axioms in the system one can derive the law of
    _____
    middle.
    Hint

    For a proposition, this principle asserts that it or its negation holds.

    Answer

    excluded

  75. 75
    The combination of axioms described makes the type system
    _____
    .
    Hint

    There is no terminating algorithm that always decides every typing judgment.

    Answer

    undecidable

  76. 76
    The accessibility type acc expresses that every element smaller than a given element is
    _____
    .
    Hint

    This is the inductive idea behind well-foundedness.

    Answer

    accessible

  77. 77
    The accessibility type is used to express that a relation is
    _____
    founded.
    Hint

    This property rules out infinite descending chains.

    Answer

    well

  78. 78
    The accessibility type is a
    _____
    eliminating type, so its recursor can eliminate into any universe.
    Hint

    Its nonrecursive argument appears in the target type.

    Answer

    subsingleton

  79. 79
    Lean's algorithmic typing judgment is an
    _____
    of the full typing rules.
    Hint

    It may reject some terms that are valid according to the ideal rules.

    Answer

    underapproximation

  80. 80
    The algorithmic definitional equality relation can fail to be
    _____
    because otherwise it would recover the undecidable full relation.
    Hint

    This is the property that would allow equality paths to be chained.

    Answer

    transitive

  81. 81
    The property that reduction preserves typing is called subject
    _____
    .
    Hint

    It concerns retaining a term's type after evaluation.

    Answer

    reduction

  82. 82
    The set-theoretic interpretation of Lean treats types as sets and elements of types as elements of those
    _____
    .
    Hint

    This is the standard mathematical model described in the talk.

    Answer

    sets

  83. 83
    In the set model, the proposition universe contains an empty set for false and a
    _____
    set for true.
    Hint

    This set contains exactly one proof object.

    Answer

    singleton

  84. 84
    The larger universe levels in the set model must be
    _____
    universes.
    Hint

    These are closed under the relevant type-forming operations.

    Answer

    Grothendieck

  85. 85
    The soundness theorem states that if e has type alpha, then the interpretation of e has
    _____
    in the interpretation of alpha.
    Hint

    The term is shown to belong to the set interpreting its type.

    Answer

    elementhood

  86. 86
    The theorem stating that a term with two types must have definitionally equal types is the unique
    _____
    theorem.
    Hint

    It concerns the uniqueness of a term's type.

    Answer

    typing

  87. 87
    Unique typing holds in Lean because Lean lacks universe
    _____
    .
    Hint

    Coq has this feature, which allows universes to be related by subtyping.

    Answer

    cumulativity

  88. 88
    Two types with different
    _____
    cannot be equal.
    Hint

    Equal types must have the same number of elements.

    Answer

    cardinality

  89. 89
    Even natural numbers and an independently defined identical copy of the natural numbers cannot generally be proved
    _____
    .
    Hint

    They can be shown isomorphic, but not necessarily distinct.

    Answer

    unequal

  90. 90
    The equality involving terms whose types may differ is called
    _____
    equality.
    Hint

    It contrasts with ordinary homogeneous equality.

    Answer

    heterogeneous

  91. 91
    The Lean virtual machine ignores casts between types during
    _____
    .
    Hint

    This is the process of executing terms.

    Answer

    evaluation

  92. 92
    A type erasure map removes all
    _____
    from terms while preserving the computation's result.
    Hint

    It discards static information before execution.

    Answer

    types

  93. 93
    Replacing one definition with another in the VM while preserving behavior is called a VM
    _____
    .
    Hint

    It substitutes an implementation during execution.

    Answer

    override

  94. 94
    A reduction procedure that eventually finds equal terms but may run forever when they are unequal is a
    _____
    -decision procedure.
    Hint

    It decides positive cases but not necessarily negative ones.

    Answer

    semi

  95. 95
    To regain decidability, the talk suggests restricting or eliminating
    _____
    elimination.
    Hint

    This feature enables problematic recursive reductions through propositions.

    Answer

    subsingleton

  96. 96
    The recursive nature of acc is important because it can keep
    _____
    indefinitely.
    Hint

    Its definition repeatedly expands during reduction.

    Answer

    unfolding

  97. 97
    The talk suggests that equality might retain subsingleton elimination because equality is not
    _____
    .
    Hint

    This contrasts with the accessibility type acc.

    Answer

    recursive

1 of 97
Question 1 of 97

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent