A.1 The first presentation
The objects and types of our type theory may be written as terms usingthe following syntax, which is an extension
of -calculus withvariables ,primitive constants, defined constants , and term formingoperations
The notation used here means that a term is either a variable , or ithas the form where is a variable and is a term, or it hasthe form where and are terms, or it is a primitive constant, or it is a defined constant . The syntactic markers ’’, ’(’,’)’, and ’.’ are punctuation for guiding the human eye.
We use as an abbreviation for the repeated application. We may also use infix notation, writing for when is a primitive or definedconstant.
Each defined constant has zero, one or more defining equations.There are two kinds of defined constant. An explicitdefined constant has a single defining equation
where does not involve .For example, we might introduce the explicit defined constant with defining equation
and use infix notation for . This of course is just composition of functions.
The second kind of defined constant is used to specify a (parameterized) mapping, where ranges over a type whose elements are generatedby zero or more primitive constants. For each such primitive constant thereis a defining equation of the form
where may occur in , but only in such a way that it is clear that theequations determine a totally defined function. The paradigm examples of suchdefined functions are the functions defined by primitive recursion on thenatural numbers. We may call this kind of definition of a function a totalrecursive definition.In computer science and logic this kind of definitionof a function on a recursive data type has been called a definition bystructural recursion.
Convertibility between terms and is the equivalence relation generated by the defining equations for constants,the computation rule
and the rules which make it a congruence with respect to application and -abstraction:
- •
if and then , and
- •
if then .
The equality judgment is then derived by the following single rule:
- •
if , , and , then .
Judgmental equality is an equivalence relation.