Essentially types are collections of terms. This is how they look from ``outside the theory.'' Inside the theory we see types as methods of construction; to specify a type is to say how to build a certain category of mathematical object. In order to say anything interesting about these objects, we need also to say when we regard two of them as equal. We follow Martin-Löf's method for doing this.
Definition: To specify a type
Definition: Membership
If A is a type, then
means that
and a' canonical of type A. Since A is a type, we know what its
canonical members are.
Examples of type constructionA new type Let
1 be a type, the unit type Let
be a value in 1, equal to itself,
or write
in 1.
product(1; 1) is a type pair(
;
) is an element function(1; 1) is a type
(x.x)
(x.
) are elements.
Also,
(x.x)=
(x.
) in
function(1; 1)
Membership
The notion of type membership, written
for A a type, is
defined by the mutually recursive inductive definition of typehood
given above. It is easy to see that membership is not decidable.
Let
be the ith Turing machine in some acceptable
indexing,
Define
iff
diverges