natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism = propositions as types +programs as proofs +relation type theory/category theory
basic constructions:
strong axioms
A pure type system is an explicitly typed lambda calculus using dependent product as the type of lambda expressions: the basic idea is that
implies
In other words a pure type system is
a system of natural deduction;
for dependent types;
and with (only) the dependent product type formation rule specified.
A pure type system is defined by
These relations will appear in the type formation rule for dependent product types below. They will say that for a type of sort depending on a type of sort its dependent product is a type of sort .
In fact all such triples appearing in the following have . So we can just as well regard them as binary relations (rather than ternary ones).
From the above input data we derive the following
The terms of a pure type system are the following (recursive definition):
Here is a variable and , are terms. The operators and bind the variable .
The typing of terms is inductively defined by the following rules.
A typing is of the form
meaning that the types of the variables declared on the left induces the term has type . Note that types are also terms.
The order of variable declarations is significant: the declaration may depend on declarations to its left.
The natural deduction rules are defined to be the following, for all and where ranges over the set of variables.
| name | rule | condition |
|---|---|---|
| (axioms) | if is an axiom; | |
| (start) | if | |
| (weakening) | if | |
| (product) | if ; | |
| (application) | ||
| (abstraction) | ||
| (conversion) |
The lambda cube consists of eight systems arranged in a cube. The most expressive is given by the following choice of sorts, axioms and relations:
| symbol | actual value |
|---|---|
(Here denotes the 2-element set.)
The other systems omit some of the last three relations. Some specific systems are the following:
| name | ||||
|---|---|---|---|---|
| simply typed lambda calculus | yes | |||
| logical framework | yes | yes | ||
| system F? | yes | yes | ||
| yes | yes | |||
| calculus of constructions | yes | yes | yes | yes |
For instance for the calculus of constructions we have
Prop, the type of propositions
Type, the type of types.
The single axiom hence says that , hence that Prop is a type.
The relations express the usual rule for dependent product type:
a dependent product over a generic dependent type is itself some type;
but if the dependent product is over a proposition then it is in fact itself a proposition, namely the universal quantification of the given definition.
The most permissive pure type system:
| symbol | actual value |
|---|---|
But there is an example with even non-circular system of axioms:
| symbol | actual value |
|---|---|
The calculus of inductive constructions can be formulated as a particular pure type system (with a hierarchy of type of types) augmented by rules for introduing inductive types.
A quick survey is in