The Lumenary · Advanced undergraduate
Type theory and propositions as types
Name: ______________________
Date: ______________________
You will learn to
- Type-check terms of the simply typed λ-calculus and read them as proofs in intuitionistic propositional logic
- Explain dependent function (Π) and dependent pair (Σ) types and use them to express ∀ and ∃
- Define the natural numbers and lists as inductive types and derive their induction principles from their recursors
- Prove, with a Kripke model, that some classical tautologies such as Peirce's law are uninhabited types
- Contrast a type-theoretic foundation such as Lean's, where every term has a type, with ZFC, where everything is a set
- 1.
Under the propositions-as-types correspondence, what is a proof of ?
- A.A pair of a proof of and a proof of
- B.A proof of or a proof of
- C.A function from proofs of to proofs of
- D.The truth value 'true' for both and
- 2.
What is the most general simple type of , and hence which tautology does it prove?
- A.
- B.
- C.
- D.
- 3.
Which of these types are inhabited by a closed term (equivalently, are theorems of intuitionistic propositional logic)? Here are base types and . Choose all that apply.
- A.
- B.
- C.
- D.
- E.
- 4.
In the two-state Kripke model with known only at , which formulas are forced at ? (Rules: iff every forcing forces ; is forced nowhere, ; iff or .) Choose all that apply.
- A.
- B.
- C.
- D.
- 5.
Let be a base type. How many closed β-normal terms of type are there (counting α-equivalent terms once)?
- 6.
In the proof of soundness for Kripke models (Theorem 3), the -introduction case goes: assume forces all of , let force ; then forces all of , so by induction. Which fact justifies ' forces all of '?
- A.Persistence: what is forced at stays forced at every
- B.Reflexivity of
- C.The induction hypothesis for
- D.Excluded middle at
- 7.
With addition on defined by and , why is true by computation while needs induction?
- A.The recursion is on the second argument, so unfolds by the first equation for any , but cannot unfold until is known to be or a successor.
- B.Because addition is not commutative in type theory.
- C.Because is false for some .
- D.Because proofs by computation are not allowed for statements with variables.
- 8.
The lesson's Lean file proves both
peirce_classical (A B : Prop) : ((A → B) → A) → Aandpeirce_uninhabited : ¬ ∃ t, HasType [] t (((Ty.base 0 ⇒ Ty.base 1) ⇒ Ty.base 0) ⇒ Ty.base 0). Why is this not a contradiction?- A.The first is about Lean's own propositions and uses the axiom
Classical.choice; the second is about a different formal system (the simply typed λ-calculus defined in the file), studied as a mathematical object. - B.One of the two proofs must contain
sorry. - C.Lean is inconsistent.
- D.
Ty.base 0andAare the same, so the statements contradict each other only whenAis false.
- A.The first is about Lean's own propositions and uses the axiom
- 9.
Write
forces(w, f, le, val)for implicational formulas in a finite Kripke model. A formula is either an atom (a string such as'p') or a tuple('imp', A, B).leis a set of pairs(u, v)meaning (reflexive and transitive), andval[w]is the set of atoms known atw. Use: atoms are forced when known;('imp', A, B)is forced atwiff everyvwith(w, v) in lethat forcesAalso forcesB.Computational — Practice