Type Theory

Type theory, I will caricature, is an approach to present a formal language plus its operational semantics. It could be thought of as a method of analyzing a formal language.

The basic building blocks in this manner of analyzing languages are “terms” and “types”. Each term has a type, specified by a “typing relation” usually written as <term> : <type>.

Definition. A term t is “typable” (or well typed) if there is some T such that t : T. (End of Definition)

A “good language” has, for any given well-typed term t, a unique type T such that t : T. This property (uniqueness of type) is called “Uniticity of Types”.

Other properties we want for a language:

Type theory (in practice, for programmers and the foundations of math alike) amounts to an “add-on” to lambda calculus, in the sense that it adds power to an underlying computational model…and lambda calculus is the easiest one to work with. So simply-typed lambda calculus is the “floor model” for type theory. The possible additions form the core of the lambda cube.

There are two “routes” to type theory enlightenment: (1) as a foundations of mathematics, and (2) for programming languages. And when one attains supreme perfect enlightenment, one realizes the non-duality of these paths.

In practice, most type checkers and proof assistants have definitions, which are seldom discussed in the literature. They are very similar to judgments, but introduce constants and “macros” (abbreviations depending on parameters).

References