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
further
In type theory, under a pure type system one understand and 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
a set of sorts, all of which are constants,
a set of axioms of the form with a constant and a sort,
a set of rules: triples of sorts.
Rules are abbreviated as .
These rules 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 rules appearing in the following have . So we can just as well regard as a binary relation (rather than a ternary one).
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 (Barendregt 91) consists of eight systems arranged in a cube. The most expressive is given by the following choice of sorts, axioms and rules:
symbol | actual value |
---|---|
(Here denotes the 2-element set, see Barendregt 91, 2.1)
The other systems omit some of the last three rules. 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 rules express the usual rule for dependent product type:
a dependent product over a generic dependent type is itself some type;
but the dependent product of a dependent proposition is itself a proposition, namely the universal quantification.
The most permissive pure type system:
symbol | actual value |
---|---|
But there is an example with even non-circular system of axioms (System ):
symbol | actual value |
---|---|
Pure type systems can be augmented with a cumulativity relation between sorts, so that if , then any type in is also in ; see Barras-Gregoire.
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 introducing inductive types.
Henk Barendregt, Introduction to generalized type systems, J. Funct. Program. 1(2), 1991 (pdf)
Henk Barendregt (Catholic University Nijmegen), Lambda calculi with types?, To appear in Samson Abramsky, D.M. Gabbay and T.S.E. Maibaum (eds.) Handbook of Logic in Computer Science, Volume II, Oxford University Press. (preprint pdf)
Survey includes
Frade, Calculus of inductive constructions (pdf)
Cody Roux, Pure type systems: Dependents when you need them, talk at Boston Haskell Meetup 2015 (slides,video)
A generalization to cumulativity can be found in
Last revised on February 28, 2023 at 14:44:22. See the history of this page for a list of all contributions to it.