# What are references for learning type theory?

What could be a good set of references for starting to learn type theory? We can assume that the students have a computer science background but not specifically on functional programming or lambda calculus, and that they know propositional and first-order logic but not constructive logic or proof theory (natural deduction or sequent calculi).

First, "type theory" is a broad concept encompassing many kinds of type theories and many use cases. For example, since this is the Proof Assistant Stack Exchange, there are two main kinds of type theories used for proof assistants:

• Simple type theory, including typed lambda calculus and Higher Order Logic (HOL): HOL is the basis for HOL-Light, HOL4, and Isabelle/HOL.
• Dependent type theory (DTT): DTT is the basis for Coq, Lean, Agda, Arend, and other proof assistants. Almost all of them use some variation on the Calculus of Inductive Constructions (CIC) which is a way to add computational rules to DTT to make it more automatic to generate some proofs. Also, a common extension of dependent type theory is Homotopy Type Theory (HoTT) which is used for some Coq projects, many Agda projects, and all of Arend. (Lean used to support HoTT, but mostly doesn't anymore.)

There are also many things you can do with type theory:

• Mathematics
• Type theory is used practically to build proof assistants and prove theorems in math (as already mentioned above).
• Type theory provides an alternative foundation of mathematics similar to set theory, but which more easily incorporates constructive logic and universe levels. Just like set theory, one can study the meta-logical properties of type theory such as its consistency and the properties of various extra rules and axioms (like univalence axiom and the axiom of choice).
• Type theory provides a way to describe special kinds of categories in category theory, including Cartesian-closed categories and Topos categories, as well as their higher-category versions.
• Conversely, category theory provides models of various type theories. (A major area of research is models of HoTT.)
• Computer science
• Type theory provides a framework for practically building functional programming languages. Simple type theory provides the framework for statically typed functional languages like OCaml, Haskell, and Scala. DTT provides a framework for dependently types languages like Idris and Lean 4.
• Type theories are closely related to computation, and as such there are a lot of computational questions about type theories such as if they compute or normalize. This is both theoretical, but also practical, since many theorem provers and programming languages use the computational properties of type theory and trust that terms in the language will reduce/compute and types in the language will type-check.
• Just as there are categorical models to type theories, there are also computational models which describe the type theory as a programming language.

Having said all this, you can see that there isn't just one aspect to type theory, and maybe unlike logic, there isn't an established Introduction to Type Theory curriculum that I'm aware of.

Here are a few suggestions:

• Thank you for the answer, alsp because I was not aware of Arend and I was precisely looking for a proof assistant based on HoTT. Aug 22, 2022 at 3:42
• not aware of Arend either .. wonder where there is a comparison of all those provers : lean, coq, agda, arend if that makes any sense. last I checked Agda was nice but buggy, whereas coq was robust and closer to ocaml Sep 12, 2022 at 17:32