In this final lecture we will look at connecting the output of parsing to the input of evaluation. We will see how dependent types supports correct-by-construction description of type-checking such that we can prove that our type-checking algorithm, and typing rules, are both sound & complete. Furthermore, we will reuse the proof and proposition to construct a working type checker that only produces intrinsically typed terms or an informative error message of why type checking failed.

By the end of this lecture you will be able to:

  1. understand how to describe type checking algorithms using dependent types;
  2. proof that a type-checking algorithm is sound and complete and produce useful error message at the same time.

The lecture is split into the following sections: