We follow a method given by Per Martin-Lof.
Prior to, that is independently of, using terms to denote mathematical values in this way, one defines the raw, untyped computational behavior of terms. This behavior is then used in part to explain how mathematical values of various types shall be denoted.
All that the semantics of types requires is that we know how to execute, or "evaluate", closed terms. (A closed term is one with no free variables.) If such execution produces a result, that result is sometimes called the "value" of the term; beware that, in this sense, the value of
All closed terms are classified as having "canonical" or "non-canonical" form, and whether a term is in canonical form depends only on its outermost form. Specifically, whether a term is in canonical form is preserved by any change of binding variables or subterms.
Any closed term in canonical form simply evaluates to itself. Any result of evaluating a term must be closed and have canonical form. A key part of introducing a new primitive operator into the semantics is to explain how to evaluate it, and this explanation must be independent of type definition. A term can have at most one value.
Here is an example.
The pair constructor<a,b> is in canonical form.
A closed expression of formw/x,y. e(x;y) has a valueR iffw has some value<a,b> ande(a;b) has valueR . SeePairs .
And another.
The left- and right-injectorsinl(a) andinr(b) are in canonical form.
A closed expression of formInjCase(w; x. e(x); y. f(y)) has a valueR iff eitherw has some valueinl(a) ande(a) has valueR or elsew has some valueinr(b) andf(b) has valueR . SeeDisjoint Union .
See
See
About: