Questions: Dependent Type Theory

3 questions to test your understanding

Score: 0 / 3
Question 1 Multiple Choice

What can dependent types express that simple types (like those in Haskell or Java) cannot?

ADependent types can express recursive data structures
BDependent types can express properties that relate values to types, such as 'a list of length n' or 'a sorted array,' embedding specifications into the type itself so that type-checking enforces correctness
CDependent types can express higher-order functions
DDependent types can express polymorphism
Question 2 True / False

In dependent type theory, the type Vec(A, 0) (a vector of zero elements) has exactly one inhabitant: the empty vector nil.

TTrue
FFalse
Question 3 Short Answer

Explain the Pi type (x : A) -> B(x) and how it generalizes both ordinary function types and universal quantification.

Think about your answer, then reveal below.