Directory UMM :Journals:Journal_of_mathematics:TAC:
Theory and Appli
ations of Categories,
Vol. 6, No. 4, pp. 47{64.
A NOTE ON REWRITING THEORY FOR UNIQUENESS OF
ITERATION
Dedi
ated to our friend and
olleague Jim Lambek
M. OKADA1 AND P. J. SCOTT2
ABSTRACT. Uniqueness for higher type term
onstru
tors in lambda
al
uli (e.g.
surje
tive pairing for produ
t types, or uniqueness of iterators on the natural numbers) is
easily expressed using universally quantied
onditional equations. We use a te
hnique of
Lambek[18℄ involving Mal'
ev operators to equationally express uniqueness of iteration
(more generally, higher-order primitive re
ursion) in a simply typed lambda
al
ulus,
essentially Godel's T [29, 13℄. We prove the following fa
ts about typed lambda
al
ulus
with uniqueness for primitive re
ursors: (i) It is unde
idable, (ii) Chur
h-Rosser fails,
although ground Chur
h-Rosser holds, (iii) strong normalization (termination) is still
valid. This entails the unde
idability of the
oheren
e problem for
artesian
losed
ategories with strong natural numbers obje
ts, as well as providing a natural example of
the following
omputational paradigm: a non-CR, ground CR, unde
idable, terminating
rewriting system.
1. Introdu
tion
Consider the usual primitive re
ursion equations of the addition fun
tion: x + 0 = x,
x + (S y ) = S (x + y ). How do we know these uniquely spe
ify addition? More generally,
onsider a possibly higher-order primitive re
ursor, ahxy , where a : A
B; h : A
B
B , satisfying:
R
N) )
R
R
0 =
ahx(S y )
=
ahx
ax
hxy
(
R
ahxy
)
)
)
Again we may ask: how do we know su
h primitive re
ursive denitions uniquely spe
ify
the intended fun
tion?
Su
h uniqueness questions make sense in many
ontexts: arithmeti
theories [29℄,
rst-order term rewriting theories [9℄ , primitive re
ursive arithmeti
s [14℄, simply and
higher-order typed lambda
al
uli and related fun
tional languages[13, 20, 29℄,
ategori
al programming languages [5, 15℄ and more generally wherever we dene a pro
edure
iteratively on an indu
tive data type[15, 16℄. If mathemati
al indu
tion is provided expli
itly within the formal theory, the problem of uniqueness often be
omes trivial (e.g.
1 Resear
h
supported by Aids in Resear
h of the Ministry of Edu
ation, S
ien
e and Culture of Japan,
and the Oogata Kenkyu Josei grant of Keio University 2 Resear
h supported by an operating grant
from the Natural S
ien
es and Engineering Resear
h Coun
il of Canada
Re
eived by the editors 1999 Mar
h 8 and, in revised form, 1999 November 15.
Published on 1999 November 30.
Key words and phrases: typed lambda
al
ulus, rewriting theory, strong normalization, Mal'
ev
operations.
M. Okada1 and P. J. S
ott2 1999. Permission to
opy for private use granted.
47
Theory and Appli
ations of Categories,
Vol. 6, No. 4
48
[20℄, p.192.) But usual fun
tional programming languages, term rewriting languages,
or
ategori
al languages do not expli
itly have indu
tion, hen
e the uniqueness issue is
more problemati
. We should mention that similar problems also appear in the theory of
higher-order mat
hing [10℄.
The question of (provable) uniqueness of terms also arises quite naturally from the
viewpoint of
ategory theory [20, 21℄. For example, whenever we demand that arrows
arise from an asso
iated universal mapping property, then we are immediately led to the
question of the (provable) uniqueness of terms in an appropriate language. Here we are
on
erned with the property of being a (strong) natural numbers obje
t in a free
artesian
losed
ategory, equivalently the problem of uniqueness of iteration in Godel's T [29, 13℄.
For many equational
al
uli, a simple-minded solution to the uniqueness problem
involves adding a kind of extensionality or uniqueness rule. This rule says: \any term t
satisfying the same dening equations as a given term, must be equal to that term." The
uniqueness rule may be expressed in rst order logi
as a universally quantied
onditional
equation, possibly between terms of higher type [22℄ .
However, in many interesting
ases (e.g. produ
t and
oprodu
t types ) we
an do
mu
h better: we
an present uniqueness equationally and build a terminating (= strongly
normalizing) higher-typed rewrite system for the theory [20℄. 1 Here we use a te
hnique
of Lambek[18℄ involving Mal'
ev operations to equationally dene uniqueness of iterators
(re
ursors) in Godel's T. We then prove this lambda theory is unde
idable; thus it is
impossible to simultaneously have
on
uen
e (Chur
h Rosser) and termination. In fa
t,
we show that
on
uen
e fails, but give a proof of termination using a rened
omputability
predi
ate argument (Se
tion 4). This answers a question of J. Lambek. On the other
hand, the theory is ground-CR (= Chur
h-Rosser for
losed terms of base type), thus it
forms a natural, unde
idable
omputation theory. This suggests the existen
e of natural,
strongly normalizing fun
tional languages whi
h are Turing
omplete and
ould serve as
the basis of interesting programming languages. Another
onsequen
e of this work is the
unde
idability of the
oheren
e problem for
artesian
losed
ategories with strong natural
numbers obje
ts. We end with a brief dis
ussion of some extensions of these results, for
example to the data type of Brouwer ordinals.
2. Typed Lambda Cal
uli
We use the usual expli
itly typed lambda
al
ulus (with re
ursors) and its notational
onventions,
f. [13, 20, 29℄.
Types
Types are freely generated from a basi
type
N (for natural numbers) under the operation
For typed lambda
al
uli with produ
t types, uniqueness of pairing is given by the surje
tive pairing
equation [20℄. For
oprodu
t types, the dual equation is obvious in a
ategori
al language [20℄, Part I,
Se
tion 8. Curiously, the asso
iated rewriting theory for typed lambda
al
ulus with
oprodu
t types is
very diÆ
ult [11℄.
1
Theory and Appli
ations of Categories, Vol. 6, No. 4
49
).
Terms
For ea
h type A, there is an innite set of variables x of type A, as well as spe
ied
onstants for primitive re
ursion, typed as follows:
A
i
0:N
S:N
)N R
A;B
: (A
) B) ) (A ) N ) B ) B) ) A ) N ) B
Terms are freely generated from the variables and
onstants by appli
ation and abstra
tion, with the usual typing
onstraints. In shorthand, terms have the form
j
j
j
variable
onstant M `N x : A:'
where M : A
Equations
) B ; N : A. We usually write MN for M `N .
We identify terms up to
hange of bound variables (-
ongruen
e). Equality is the smallest
ongruen
e relation
losed under substitution, satisfying ; and
R
R
R
a : A; h : A ) N ) B ) B; x : A; y : N.
A;B
for all
ahx0 = ax
ahx(Sy ) = hxy (
A;B
A;B
ahxy )
Lambda Theories
Among standard extensions of lambda
al
uli to whi
h our methods apply, we mention:
(a) Lambda
al
uli with produ
t types and surje
tive pairing [20, 13℄. Su
h systems are
losely
onne
ted to
artesian
losed
ategories (=
's). However for the purposes
of
onstru
ting free
's, produ
t types are unne
essary ([25℄);
f Se
tion 5 below.
In the presen
e of produ
t types with surje
tive pairing, the re
ursor
may be
dened in terms of the simpler notion of iterator
: A (A A) N A (
f
[20℄, p. 259,[13℄, p. 90 ) The type N with iterators
orresponds to the
ategori
al
notion of weak natural numbers obje
t in
's [20℄.
I
R
A
) ) ) )
R
In this paper we shall use re
ursors sin
e (i) we do not ne
essarily assume produ
t types, (ii) re
ursors are ne
essary for more general type theories (e.g. Girard's
system ) as well as for more general
ategori
al frameworks (e.g. Lambek's multi
ategories, [19℄).
F
(b) We may
onsider extensions of typed lambda
al
ulus by adding rst-order logi
to
the equational theory [23, 22℄ . This will be dis
ussed in the next se
tion. Finally, we
may extend by additional data types. For example, in the last se
tion we
onsider
adding the data type of Brouwer ordinals, among others.
Theory and Appli
ations of Categories, Vol. 6, No. 4
50
As usual, the type expression A1 ) A2 ) ) A abbreviates A1 )
(A2 ) (A 2 ) (A 1 ) A )) ) , i.e. asso
iation to the right. Even if there
are no produ
t types, we sometimes abbreviate A1 ) A2 ) ) A by the Curried
expression (A1 A 1 ) ) A but we still write terms in the usual way without
pairing. The reader
an easily add pairing to terms if there are genuine produ
t types.
The term expression a1 a2 a abbreviates ( ((a1 `a2 )`a3 ) `a 1 )`a , i.e. asso
iation
to the left.
Notation:
n
n
n
n
n
n
n
n
n
n
3. Uniqueness of Re
ursors
3.1. Natural Numbers Obje
ts. In
ategori
al logi
[20℄, a natural numbers obje
t (=
NNO) in a
artesian
losed
ategory (=
) C is an obje
t N together with arrows
0
1!
N ! N whi
h is initial among all diagrams of the shape 1 ! A ! A . This means:
for all arrows a : 1 ! A and g : A ! A there is a unique iteration arrow It (a; g ) : N ! A
satisfying: (i) It (a; g )o0 = a and (ii) It (a; g )oS = g oIt (a; g ). A weak natural numbers
obje
t N in a
C merely postulates the existen
e, but not uniqueness, of the iterator
arrow above. In the typed lambda
al
ulus asso
iated to C , a weak NNO is equivalent to
having an iterator I : A (A ) A) N ) A in the language (
f. [20℄, p. 70).
S
a
g
A
A
A
A
A
3.2. Lambek's Uniqueness Conditions. We now
onsider uniqueness of lambda terms dened by iterators or, more generally, re
ursors. Girard dis
usses the subtleties of su
h
questions, and the defe
ts of standard syntax, in [13℄, pp. 51, 91.
The use of rst-order logi
to strengthen lambda
al
ulus is familiar, for example in
dis
ussing extensionality, lambda models, and well-pointedness of
's,
f. [22℄. In a
similar manner, uniqueness of It in
's
an be guaranteed by the following
onditional
rule: given arrows a : 1 ! A and g : A ! A, if f : N ! A is any arrow satisfying f o0 = a
and f oS = g of then f = It (a; g ). Let us translate this into lambda
al
ulus.
More generally, we
onsider typed lambda
al
uli L presented with re
ursors R .
Given any terms a and h of appropriate type, uniqueness of R ah may be guaranteed
by the following uniqueness rule: for any term f : A N ) B , and variables x; y of
appropriate types:
A
A
A;B
A;B
x y [fx(Sy ) = hxy (fxy )℄
f = R ah
8 8
(U )
A;B
f;h
where a = x : A:fx0
Here, for any x, the initial value of the re
ursion, fx0, is simply dened to be ax .
Lambek [18, 17℄ proved that it is possible to equationally represent the rst-order rule
U , provided we assume the existen
e of
ertain Mal'
ev operators. Let us re
all his
proof.
Suppose all the types A in the lambda
al
ulus L have a Mal'
ev operation; i.e. a
losed term m : A3 ) A satisfying the following equations (in un
urried form):
f;h
A
m xxy = y
A
m xyy = x
A
Theory and Appli
ations of Categories, Vol. 6, No. 4
51
for all x; y : A . Fix a family fm j A a typeg of su
h Mal'
ev operations (we omit type
subs
ripts). Consider the term H , where Hmf h = xyz:m(hxyz )(hxy (f xy ))(f x(Sy )) for
variables f; h (where f has the same type as R ah and Hmf h has the same type as h),
and the following equational rule:
A
A;B
R
(M )
f;h
Theorem.
(i) M
f;h
(ii) U
f;h0
a(Hmf h) = f
From now on, when the
ontext is
lear, we shall omit type subs
ripts.
Notation.
3.3.
A;B
[Lambek([18℄)℄ The following impli
ations hold:
implies U
f;h
implies M
f;h
where h = Hmf h .
0
In this proof, we freely use ( )-rule, i.e. extensionality. (i): Suppose M and
the hypotheses of U , i.e. suppose f x(Sy ) = hxy (f xy ). Sin
e m is a Mal'
ev operator,
Hmf h = h. Therefore by M , f xy = Ra(Hmf h)xy = Rahxy , so f = Rah, by ( ),
whi
h is the
on
lusion of U .
(ii) Suppose U . Note that the hypothesis of this rule is always true, sin
e it says
f x(Sy ) = h xy (f xy ) = m(hx(f xy ))(hx(f xy ))(f x(Sy )) = f x(Sy ): Thus, the
on
lusion
of the rule is true; so f = Rah , i.e. M , as required.
Proof.
f;h
f;h
f;h
f;h
f;h0
0
0
f;h
The theorem above expresses the sense in whi
h we
an repla
e the
onditional uniqueness rules U by the equations M . The problem of equationally dening the appropriate Mal'
ev operators is addressed in se
tion 3.2 below.
The rule U above guarantees uniqueness of the re
ursor R ah for given a; h, whi
h
suÆ
es for many purposes (e.g. in Lambek's work, it guarantees uniqueness of the iterator
arrow in a strong natural number obje
t). But it does not guarantee the uniqueness of
the term R
itself. The uniqueness of su
h R is a mu
h stronger
ondition whi
h we
shall not dis
uss here.
One advantage of assuming the uniqueness rule U is pointed out in [20℄, Proposition
2.9, p. 263: in simply typed lambda
al
ulus with the uniqueness rule (equivalently, in
the free
with NNO) all primitive re
ursive fun
tions and the A
kermann fun
tion may
be dened by their usual free variable equations. But in fa
t more is true: in the next
proposition we show many familiar set-theoreti
equations be
ome provable for variables
(not just for numerals). In what follows, +; .; . are terms dened (using R) by the usual
primitive re
ursive equations on N (
f. [14℄) .
f;h
f;h
f;h
A;B
A;B
f;h
3.4. Proposition. [Goodstein[14℄, Lambek[18℄, Roman[27℄℄ In typed lambda
al
ulus
with the uniqueness rule U , the following identities hold for variables x; y : N
f;h
Theory and Appli
ations of Categories, Vol. 6, No. 4
52
(i) Sx . Sy = x . y
(vi) Asso
iativity of + and
(ii) x . x = 0
(vii) jx; y j = jy; xj, where
.
.
jx; y j = (x y) + (y x)
(iii) x.(1 . x) = 0
.
.
(viii) Commutativity of + and
(iv) x (1 y) = x (x y)
.
.
.
.
(ix) x + (y . x) = y + (x . y)
(v) (x + y) . y = x
Detailed arguments are given in Goodstein [14℄ and/or Lambek[18℄ (
f. also
Roman [27℄). Re (ix), whi
h is an important identity, either follow [14℄, 5.17 (p.108)
or alternatively, note that both sides of (ix) (as fun
tions of x; y) satisfy the following
double re
ursion formula: '(0; 0) = 0; '(0; y + 1) = y + 1; '(x + 1; 0) = x + 1; '(x +
1; y + 1) = '(x; y) + 1. Hen
e by uniqueness the equality follows, provided we
an show
' is representable in typed lambda
al
ulus (equivalently, in the free
with NNO). We
omit the
onstru
tion of ' ex
ept to remark it is similar to the proof that A
kermann's
fun
tion is representable (
f. [1℄, p. 570,[20℄, p. 258 ).
.
Notation. We extend the arithmeti
al operations in the set S = f0; +; .; g to all types
by indu
tion: (i) at type N the operations in S have their usual meanings. (ii) Suppose
we know the operations in S at types A and B. Then we extend these operations to
type A ) B by lambda abstra
tion, i.e. 0 ) = x : A:0 , and f ? ) g = x :
A:fx ? gx, for any operation ? 2 f+; .; . g. Sin
e all types have the form A A1 )
A2 ) ) A 1 ) N, an operation a ? b is essentially x1 x :ax1 x N bx1 x
, where x : A . Finally, we may now dis
uss the usual dieren
e fun
tion in Goodstein
at higher types: jM; N j = (M . N) + (N . M)
If we add expli
it produ
t types, we
ould also dene the arithmeti
al operations
0 and ? \
omponentwise". We shall use the usual notation (without subs
ripts)
for +; .; . ; 0 at all types when the meaning is
lear.
Proof.
A
B
def
B
A
B
def
B
n
i
A
B
A
n
n
n
i
A
B
3.5. Proposition. In typed lambda
al
ulus with the uniqueness rule U , the following
rst-order s
hema holds for arbitrary terms M; N of the same type: ` jM; N j = 0 $
M =N :
f;h
The (!) dire
tion is the interesting one. Arguing informally, we prove the result
for variables of type N , the other
ases following from appropriate lambda abstra
tions
and substitutions. Suppose jx; y j = 0; then by Proposition 3.4(v; vii), jx; y j . (y . x) = 0,
so x . y = 0. Similarly, y . x = 0. Hen
e, using equation Proposition 3.4(ix) above, we
obtain: x = x + (y . x) = y + (x . y) = y.
3.6. Denable Mal'
ev Operations. The rule M is equational, provided the spe
i
ation
of the Mal'
ev operations m are. In the pure typed lambda
al
ulus, Lambek [19℄ showed
that Mal'
ev operations are a
tually denable from
ut-o subtra
tion . , provided we
adjoin some simple equations (see below). Consider the indu
tively dened family of
Proof.
f;h
A
Theory and Appli
ations of Categories, Vol. 6, No. 4
53
losed terms m : A3 ) A, uniquely determined (by fun
tional
ompleteness) by the
following
lauses in un
urried form:
A
1. mN xyz = (x + z ) . y , for variables x; y; z : N.
2. m ) uvw = x : A: m (ux)(vx)(wx), for variables u; v; w : A ) B .
A
B
B
If typed lambda
al
ulus is extended with produ
ts and terminal type, we may
extend m (using expli
it tupling) as follows: m1 hx; y; z i = , for variables x; y; z : 1 and
m = hm ohp 1 ; p 2 ; p 3 i; m ohp 1 ; p 2 ; p 3 ii, where p denotes the proje
tion onto
the ith-fa
tor of the A
omponent, et
.
Remark.
A
A
B
A
A
A
A
B
B
B
B
Ai
To say mN xyz = (x + z ) . y gives a Mal'
ev operator at type N means we must be
able to prove (x + z ) . x = z and (x + y ) . y = x for variables x; y; z . Alas, in the pure
theory these equations are only provable for
losed numerals 0; S 0; S 20; : to guarantee
the result for variables we must postulate it, as follows:
3.7. Theorem. Let L be pure typed lambda
al
ulus (all types freely generated from N).
The indu
tively-dened family of terms fm j A a typeg given above denes Mal'
ev operations at ea
h type, provided that at type N we add the axioms: (x + z ) . x = z and
(x + y ) . y = x, for variables x; y; z .
Proof. By dire
t
al
ulation.
3.8. Uniqueness, Indu
tion, and Unde
idability. We now show that the uniqueness rule
is in fa
t equivalent to a version of quantier-free indu
tion. We shall then give proofs of
the unde
idability of L with uniqueness.
3.9. Lemma. The following are equivalent for any type B :
A
1. Uniqueness rule: for any
losed term f : A ) (N ) B )
x y [fx(Sy ) = hxy (fxy )℄
f = R ah
8 8
(U )
f;h
A;B
where a = x : A:fx0
2. Goodstein Indu
tion at type B: for any
losed term f : A ) N ) B
x y [fx0 = 0 (1 . fxy ).fx(Sy ) = 0℄
f = xy:0
8 8
(Goodstein Ind:)
where x : A and y : N.
3. The indu
tion rule : for any
losed terms F; G : A ) N ) B
(Indu
tion)
[F xy =. Gxy ℄
..
.
8x; y: F x0 = Gx0
F x(Sy ) = Gx(Sy )
F =G
where x : A and y : N in the ante
edent are universally quantied.
Theory and Appli
ations of Categories, Vol. 6, No. 4
54
We show (1) (2) (3) (1), in ea
h
ase by indu
tion on the type B.
(a). (U ) (Goodstein indu
tion) : this is essentially Goodstein's argument, [14℄,
p.35, using the identities of Proposition 3.4 (this proposition assumes U .) For
ompleteness, we sket
h the proof.
Case 1. B = N. Let f : A N N be given satisfying the hypotheses of Goodstein
Indu
tion. Then
Proof.
)
)
)
)
f;h
f;h
)
)
(1 . fxy).(1 . fx(Sy)) = (1 . fxy) . ((1 . fxy).fx(Sy)) = 1 . fxy
(1)
Dene g : A N N by primitive re
ursion as follows (where x : A and y : N are
variables): gx0 = 1, gx(Sy) = gxy.(1 . fxy). Let hxy = gx(Sy). Then using equation (1)
)
)
hx(Sy )
= gx(Sy).(1 . fx(Sy)) = gxy.(1 . fxy) = gx(Sy)
(2)
Also hx0 = 1 = gx0. An easy argument ([14℄, p.34) then shows hxy = gxy. Hen
e,
gx0 = 1 and gx(Sy ) = gxy . By [14℄, 2.7304 (p. 55), g = xy:1 . In parti
ular, 1 . fxy = 1.
Hen
e fxy = fxy.(1 . fxy) = 0, by Proposition 3.4, (iii) .
Case 2: In general, any type has the form B = A1 A2
A 1
N. Thus a
losed term f : A N B means f : A N A1 A2
A 1
N. Thus
n 1
N
1
f = x y z1
z 1 :fxy~z , where fxy~z : N. Now apply the same argument as in
Case 1 (with extra parameters z~ ).
(b). (Goodstein Indu
tion) (Indu
tion):
Case 1: B = N. Let be the
losed term xy: F xy; Gxy . By Proposition 3.5, Indu
tion
is equivalent to saying:
[xy. = 0℄
...
x; y: x0 = 0 x(Sy ) = 0
=0
The proof that Goodstein Indu
tion implies the above rule is (slightly) modied from
Goodstein [14℄, p.109. Note that Goodstein's proof assumes terms F; G : N N; the
same proof goes through verbatim if we assume there is an extra parameter y of type A,
i.e. that F; G are a
tually of type A N N.
Case 2: B = A1 A2
A 1
N. Hen
e, as above, the problem redu
es to the
ase B = N, with extra parameters z : A .
(
). (Ind.)
(U ): The following proof is valid for all types B . Suppose the
hypotheses of U . Let F = xy:fxy and G = xy: ahxy . We wish to prove F = G,
i.e. F xy = Gxy, for all x; y. Clearly F x0 = fx0 = ax = ahx0 = Gx0. Now suppose
F xy = Gxy , i.e. fxy = ahxy . Then, using the hypothesis of U ,
)
)
A
A
)
)
)
)
)
)
n
)
n
)
A
i
n
i
i
)
j
j
8
)
)
)
)
n
)
i
)
)
i
f;h
R
fh
R
R
fh
F x(Sy ) = fx(Sy ) = hxy (fxy ) = hxy (Rahxy ) = Rahx(Sy ) = Gx(Sy ) :
So by Indu
tion, F = G.
Theory and Appli
ations of Categories, Vol. 6, No. 4
55
From the availability of indu
tion in the simply typed lambda
al
ulus with uniqueness,
it follows that the rst-order presentation is unde
idable. But there are dire
t proofs for
the equational presentation as well:
L
3.10. Theorem. The typed lambda
al
ulus with uniqueness Uf;h is unde
idable. Hen
e
we
annot simultaneously have SN and CR for any asso
iated rewriting system.
Observe that with uniqueness we
an represent polynomials with positive integer
oeÆ
ients (
f the remarks before Proposition 3.4). Thus, from the unde
idability of
Hilbert's 10th problem, the general question of de
iding if two su
h lambda terms are
equal or not is unde
idable. The
on
lusion about rewriting systems is familiar. SN and
CR imply the word problem is de
idable: to de
ide if two terms are equal or not, redu
e
them using SN to their unique normal forms, then
he
k if the normal forms are identi
al
(up to
hange of bound variables).
Proof.
Let us end this se
tion with a few remarks.
(i) A related result by G. Dowek [10℄ yields the unde
idability of pattern mat
hing in
lambda
al
uli supporting indu
tive types (as well as other theories).
L
(ii) Simply typed lambda
al
ulus with produ
t types and uniqueness + Uf;h is very
lose to Troelstra's theory qf--E-HA!p of the quantier-free part of extensional arithmeti
in all higher types, lambda operator and produ
t types with surje
tive pairing
[29℄, p. 46, 62 (
f. the form of indu
tion in the Lemma above.)
We
an also give an indire
t proof of unde
idability based on Troelstra's theory;
note, in parti
ular, our
al
ulus satises the -rule: s = t
x:s = x:t. We
follow Troelstra's proof [29℄, p. 62 that =
m ; n
m = n and
=
m ; n
m = n are re
ursively inseparable. Note, however, that Troelstra's
proof also requires ([29℄, pp. 51-59)
oding various equations of primitive re
ursive
arithmeti
, as well as simultaneous re
ursion, all proved using indu
tion. Our proofs
of similar equations in Proposition 3.4 used the uniqueness axiom Uf;h instead.
)
S fhd e d ei j `
fhd e d ei j ` 6 g
g
S
0
4. Rewriting theory for Uniqueness: SN and CR
L
Let
be the typed lambda
al
ulus with primitive re
ursors and Mal'
ev operators,
onsidered as a rewrite system[16, 20, 13℄. To this end we orient all basi
equations as
usual, i.e. from left-hand side to right-hand side, abbreviated LHS RHS . In parti
ular,
we orient in this manner the basi
Mal'
ev equations at type : mxxy x , mxyy y ,
the equations required for dening Mal'
ev operators (see Proposition 3.7), as well as
and .
N
L
4.1. Proposition. The system of typed lambda
al
ulus, re
ursors (without uniqueness) and Mal'
ev equations
onsidered as a rewriting theory oriented as above satises
SN and CR.
The proof is a
orollary of the work of Jouannaud-Okada[16℄.
Theory and Appli
ations of Categories, Vol. 6, No. 4
Ra(Hmfh)
Ra(Hmfh)xy
RRah
f
56
fxy
R
Rahxy
?
0
Figure 1: Failure of CR
We now turn to the Mal'
ev uniqueness rule. Consider the following two basi
orientations:
L
1.
Redu
tion
Ra(Hmfh) f
2.
Expansion
f
Ra(Hmfh)
Let L = the rewriting theory obtained from L with the above redu
tion rule and
= the rewriting theory obtained from L with the above expansion rule.
red
exp
4.2.
Proposition. The system
L
exp
is CR but not SN.
Proof. Sin
e the LHS of the expansion rule is a (higher-type) variable and the original
system L is CR, any
riti
al pair is joinable by 1-step parallel redu
tion, [2℄ Hen
e, the
system is CR. Obviously, the system L with the expansion rule above is not SN, sin
e
the RHS expands with ea
h redu
tion.
exp
The system L is
onsiderably more interesting. In what follows we show that
is SN, not CR, but is ground CR (i.e. CR for
losed terms of ground type ).
red
4.3.
Proposition. The system
L
red
L
red
is not CR. Indeed, it is not even CR for open terms
of ground type.
Consider f = xy:0 and h = xyz:0, where f is of the type of the re
ursor Rah.
Consider the following
riti
al pair between the redu
tion rule and the Mal'
ev rule:
Proof.
(i) Ra(Hmfh) f ,
(ii) Ra(Hmfh) Rah
Redu
tion (i)
omes from our orientation of the Mal'
ev equation M . Redu
tion (ii)
arises as follows: sin
e hxy (fxy ) = 0 = fx(Sy ), then
f;h
Hmfh = xyz:m(hxyz )(hxy (fxy ))(fx(Sy )) xyz:0 h
where f and Rah are irredu
ible. Note that all other
riti
al pairs are a
tually joinable.
See Figure 1(i). In Figure 1(ii), we see a modi
ation of (i) where Rahxy : is an open
term with variables x : A; y : . 2
N
N
Theory and Appli
ations of Categories,
4.4.
Proposition.
The system
Vol. 6, No. 4
L
red
57
is ground CR, i.e. CR for
losed terms of base type.
The only important
ase is shown by diagram (ii) of Figure 1, where we substitute
losed terms x^ : A and y^ : N for the variables x; y , respe
tively. Assuming L is SN
(see below), then by an indu
tive argument ([29℄, p. 104) one shows ` y^ = S 0 (for some
n 2 Z+ ) or ` y^ = 0. In either
ase, we note that (ii) is joinable in either one or two steps,
with Rahx^y^ 0.
Proof.
red
n
L
The system L
Strong Normalization of
4.5.
Theorem.
path starting from
t
red
red is SN, i.e. if
halts (at an irredu
ible).
t is an arbitrary term, then every redu
tion
The proof uses the Tait
omputability method ([29℄). For te
hni
al reasons it does
not suÆ
e to dire
tly dene
omputability for L , but rather we must introdu
e an
auxiliary language L0 (see Remark 4.8 below) 2 .
The language L0 is L but with a kind of \parametrized" Mal'
ev operator m0 : A3
N ) A dened as follows:
red
red
A
1. m0N xyzw = (x + z ) . y for variables x; y; z : N
2. m0
A
)B
fghw = x : Ay : N:m0 (fx)(gx)(hx)y for variables f; g; h : A ) B , w : N.
B
Note that for every type A, variables x; y; z : A, w : N, the two dened Mal'
ev operators
are indistinguishable, in the sense that: ` m0 xyzw = m xyz , i.e. m0 is essentially m
with an extra dummy variable w.
In L0 , analogously to L, we introdu
e the term
A
A
H 0 m0 fh = xyz~p:m0 (hxyz~p)(hxy (fxy )p~)(fx(Sy )p~)(fxy~p)
where ~p is a sequen
e of variables su
h that fxy~p is of type N.
We now form the lambda
al
ulus L0
ompletely analogously to L , but with M
repla
ed by the redu
tion
red
red
(M 0 )
R
fh
4.6.
L
A;B
a(H 0 m0 fh) f
The system 0red is SN, i.e. if
path starting from t halts (at an irredu
ible).
Theorem.
f;h
t is an arbitrary term, then every redu
tion
The proof is a modi
ation of the well-known Tait
omputability method [29℄. One
rst denes the
omputable terms of type A, Comp , by indu
tion on types as in [29℄:
A
t 2 Comp
t 2 Comp )
A
A
B
, t 2 SN for atomi
types A:
, 8a(a 2 Comp ) t`a 2 Comp
A
B
):
(3)
(4)
Known SN te
hniques do not suÆ
e. For example, in order to adapt Blanqui, Jouannaud, Okada[3℄
in the Mal'
ev uniqueness rule must be an a
essible subterm, whi
h is not generally true if f is of
higher type. In the earlier paper of Jouannaud and Okada [16℄ the SN te
hniques do not apply sin
e the
higher type variable h on the LHS disappears on the RHS.
2
f
Theory and Appli
ations of Categories, Vol. 6, No. 4
58
One now proves the following by indu
tion on types:
If is
omputable, then is SN.
If is
omputable and 0 then 0 is
omputable.
CR1.
t
CR2.
t
t
t
t
t
We now need to prove a lemma (by indu
tion on terms):
,
from whi
h the main theorem follows by CR1. In the proof of the lemma, one needs a
stronger indu
tive hypothesis to handle the
ase of lambda abstra
tion. This is summarized by the following (
f. [13℄, p. 46) :
4.7.
L0red
( 1 n) :
i : i
:
(
)
i
i
1
n
( 1 n) :
The proof is on the
omplexity of . We
onsider the substitution instan
e
[ ℄ , where the i are
omputable, and the j are also
omputable so that [ ℄ is
of type . It suÆ
es to verify that this term is SN. All
ases pro
eed as usual, ex
ept
the
riti
al
ase when [ ℄ is ( 0 0 ) 0 , the redex of the Mal'
ev redu
tion ( fh0 ).
We show that after ( fh0 ), 0 : is SN. There are essentially two key forms of su
h
: (i) either ^( 0 0 ^^ ) (so ^[ ℄ = (for the in ( 0 0 )) ) or (ii) is not
of the form (i); then must be a proper subterm of some i or j . Case (i) is very easy
to prove: by indu
tion hypotheses, sin
e ^ is a subterm of , ^[ ℄ is
omputable, so
is
omputable, so is SN. For
ase (ii) 0 0 is
ontained in either some i or some
0 0
is SN. In parti
ular
j . Hen
e, sin
e these are SN,
0
0
the subterm
is strongly normalizable for any
omputable terms
substituted for
; in parti
ular 0 is SN.
4.8.
The reader should note that in the proof above, the key fa
t that 0
ontains the subterms
is
riti
al{the original Mal'
ev rule, using
, will not
dire
tly work.
Sin
e the tree of redu
tions of is a subtree of that of 0 , we obtain:
(Theorem 4.5) Lred
4.9.
Although we do not assume genuine produ
t types here, they may be
a
ounted for, just as in the setting of Jouannaud-Okada [16℄. Produ
ts use the TaitGirard
omputability method [13℄, Chap. 6 (
f. also [20℄, pp. 88-92)), along with an
auxiliary notion of \neutral term" and an extended
omputability predi
ate satisfying
CR3 (
f. [13℄). All this extends to the setting here.
All terms are
omputable
Lemma. Let
be simply typed lambda
al
ulus with redu
tion on the new Mal'
ev
operator, as above. If t x ; :::; x
terms a
A
B is any term with free variables x
are all
omputable, then t a ; :::; a
variables are
omputable, any term t x ; :::; x
Proof.
A
, and if the
is itself
omputable. In parti
ular, sin
e
B is
omputable.
t
~ x~
t d=~
b
d
~ x~
t d=~
b
b
N
~ x~
t d=~
b
M
t
Ra H m f h
f~
b
Ra H m f h ~
b
N
t
~ x
f d=~
f
f
f
Ra H m f h
d
f
f~
b
t
H m fh
b
H
M
H m fh
in terms of m
t
b
~ x
f d=~
f
d
using the
hosen formula for
f xy~
p
f~
b
x; y; ~
p
Remark.
H
f xy~
p
H mf h
m
Corollary.
m
is SN.
Remark.
5. Appli
ations and Extensions
5.1. Coheren
e for CCC's. As an immediate
orollary of the above results, we obtain:
Theory and Appli
ations of Categories, Vol. 6, No. 4
59
5.2. Example. The unde
idability of the word problem (Coheren
e Problem) for equality of arrows in the free
artesian
losed
ategory with (strong) NNO generated by the
empty graph.
Here, the free
with strong NNO
models:
F
an be presented in several ways from term
(i) Following Pitts [25, 8℄ (4.2.1) we may
onstru
t F from simply typed lambda
al
ulus
without produ
t types (e.g. our language L above) as follows: the obje
ts of F will
be nite lists of types; arrows will be equivalen
e
lasses of nite lists of terms in
ontext. The Mal'
ev equations guarantee that the NNO is strong.
(ii) Following Lambek and S
ott [20℄, we may
onstru
t F using our language L with
produ
t and terminal types; here obje
ts are types, and arrows are equivalen
e
lasses of terms with at most one free variable. Again, the Mal'
ev equations guarantee that the NNO is strong.
In either
ase above we know the equational theory so generated is unde
idable, so
equality of arrows is too (for the Pitts'
onstru
tion use Theorem 3.10; for the LambekS
ott, we use the extension of Theorem 3.10 to produ
t types (
f. Remark 4.9).
Remarks:
1. Godel's T (i.e. simply typed lambda
al
ulus with re
ursors) is known to be de
idable, sin
e it is CR and SN. We wish to emphasize that the extended theory with
Uniqueness Lred is unde
idable be
ause of failure of Chur
h-Rosser, not be
ause of
failure of SN.
2. We should like to emphasize that simply typed lambda
al
ulus with uniqueness
of iterators (as an equational theory) is a mathemati
ally natural extension of T ,
ontaining a purely equational equivalent to indu
tion, and
losely related to familiar
theories of arithmeti
of nite types .
5.3. Example. The equational theory Lred of typed lambda
al
ulus with Mal'
ev's
equations is a natural example of an SN, non-CR, ground-CR, unde
idable rewriting
system.
Natural examples of su
h theories are not
ommon. Su
h a theory
an provide a
omputational model for fun
tional languages, sin
e
omputation of terms of ground type
(by normalization) gives unique values. Moreover, Lred is unde
idable, unlike most SN,
CR typed lambda
al
uli whi
h only represent a proper sub
lass of the total re
ursive
fun
tions.
Lred
an also be used for veri
ation of indu
tive properties: the uniqueness rule for
terms dened by re
ursion is equivalent to an indu
tion rule, and hen
e
ould be used
as an alternative proof te
hnique to traditional indu
tive arguments. We would like to
see how these te
hniques
ould apply to indu
tive theorem proving and related de
ision
problems in rewriting theory (
f. [6℄ ).
Theory and Appli
ations of Categories, Vol. 6, No. 4
60
5.4. Extension to Brouwer Ordinals. We shall now sket
h how to extend the treatment to
a larger
lass of data types. Su
h data types satisfy a domain equation
= A ) , where
the type variable appears
ovariantly; in parti
ular, we
onsider 62 A (
f. [20, 15℄).
To illustrate, we
onsider the data type of Brouwer Ordinals added to the simply type
lambda
al
uli L above.
Ord is a type with distinguished
onN ) Ord) ) Ord. The re
ursor R is dened on
5.5. Definition. The type of Brouwer
stants: 0 : Ord; S : Ord ) Ord; lim : (
Ord by postulating the following rules:
ordinals
Rahgx0
= ax
Rahgx(Sy) = hxy(Rahgxy)
Rahgx(lim k) = gxk(z(Rahgx(kz)))
N
(5)
(6)
(7)
N
N
Here: a : A ) Ord; h : A ) ) Ord; g : A ) (( ) Ord) ) ( ) Ord)); and x : A
. For simpli
ity we are assuming Rahgx0 is of type Ord, but it
ould be of any higher
type.
We wish to remark that this denition is merely the data type of Brouwer ordinals,
and has nothing to do with set-theoreti
transnite re
ursion.
We extend our analysis of Lambek's uniqueness
onditions in Se
tion 3 as follows. The
rule U
now has two premisses:
f;h;g
(U
f;h;g
8x8y[ fx(Sy) = hxy(fxy) ℄ 8xk[ fx(lim k) = gxk(z(fx(kz))) ℄
f = Rah
)
where a = x : A:fx0. Similarly, we have
(M
f;h;g
Ra(Hmfh)(H mfg) = f
)
0
Here, Hmfh is the same as before, while
H mfg =
0
def
xku[m(gxku)(gxk(z (fx(kz ))))(fx(lim k))℄:
The following is analagous to Lambek's Theorem 3.3, in Se
tion 3.
5.6.
Theorem.
(i)
M
(ii)
U
f;h;g
f;h0 ;g 0
The following impli
ations hold:
implies
U
implies
M
f;h;g
f;h;g
where
h = Hmfh and g = H mfg
0
0
0
.
Re (i), assume the two premises of U . In parti
ular, from the se
ond premise,
fx(limk) = gxk(z (fx(kz ))). Therefore, by the property of the Mal'
ev operator m and
by the denition of H mfg , we have H mfg = xku(gxku) = g . In the same way, from
the rst premise, we get Hmfh = h. Therefore, from M , Rahg = f . This proves (i).
Proof.
f;h;g
0
0
f;h;g
Theory and Appli
ations of Categories, Vol. 6, No. 4
61
Re (ii), below we prove the following two equations:
fx(Sy ) = h0 xy (fxy )
fx(limk) = g 0xk(z (fx(kz ))):
(8)
(9)
f = Rah0 g 0 ;
, then by U
By using equations (8) and (9) as the two premisses of U
namely, f = Ra(Hmfh)(H 0mfg ), i.e., M
holds.
Sin
e the proof of (8) is the same as the type N
ase in the original Lambek theorem, we prove (9) only: g 0 xk(z (fx(kz ))) =
(H 0 mfg )xk(z (fx(kz ))) =
m(gxk(z (fx(kz ))))(gxk(z (fx(kz ))))(fx(lim k)) = fx(lim k), as required.
f;h0 ;g 0
f;h0 ;g 0
f;h;g
def
As for the rewriting theory of this Ord system, the analog of Proposition 4.1, that the
ombined system of rst-order Mal'
ev rules and the Ord-re
ursor rules is SN follows from
a re
ent theorem of Blanqui, Jouannaud, and Okada [3℄. Letting again L denote this
new language with the redu
tion ordering, L is not CR but is ground CR by the same
proof as Proposition 4.3. The analog of Theorem 4.5 establishing SN similarly applies to
this extended language.
Finally,
on
erning the dis
ussion in Lemma 3.9 on the equivalen
e of uniqueness and
various forms of indu
tion, the situation is a little more
omplex here. First we observe
that the Ord-indu
tion rule is:
red
red
(Ord
Ind)
[ 8z (F x(fz ). = Gx(fz ) ℄
..
.
F x(lim f ) = Gx(lim f )
[F xy =. Gxy ℄
..
.
F x(Sy ) = Gx(Sy )
F =G
F x0 = Gx0
where y and f are eigen variables.
In order to naturally extend the equivalen
e in Lemma 3.9, it is ne
essary to dis
uss
the
omputations used in Goodstein Indu
tion in this more general framework. For this,
it appears ne
essary to set up a primitive re
ursive ordinal notation system to represent
+; . ; m, et
. in order to simulate (in our now more general system) the basi
properties
used in the standard N-
ase (
f. also the dis
ussion after Theorem 3.6). This appears
routine, but we omit the detailed veri
ation here.
Finally, we remark that from a
ategori
al viewpoint, the datatype Ord makes sense
in any
with natural numbers obje
t N : it is an obje
t Ord with arrows 1 ! Ord; S :
Ord ! Ord; lim : Ord ! Ord satisfying the appropriate equations (analogous to a
parametrized natural numbers obje
t [20, 27℄)
N
5.7. Remark. Con
erning more general indu
tive data types (
f. [7, 3℄) the above results
an be extended under the
ondition that we
an dene Mal'
ev operations on the
data type. In the examples we know, this involves dening some analog of . (or, for
multipli
ative operations, ( ) 1 ). This is not always easy to do. For example, for the
data type of lists of integers, `ist(N), there is no obvious
hoi
e for . . On the other hand,
the data type of lists of length k, `ist (N), does have a Mal'
ev operator using pointwise
subtra
tion: (a1 ; ; a ) . (b1 ; ; b ) = (a1 . b1 ; ; a . b ).
k
k
k
k
k
Theory and Appli
ations of Categories, Vol. 6, No. 4
62
Another way to extend these results is simply to postulate a Mal'
ev operator, and
the asso
iated rewriting rule, at ea
h type.
Referen
es
[1℄ H. P. Barendregt.
, North-Holland, 1984.
The Lambda Cal
ulus
[2℄ J. Bergstra and J. W. Klop, Conditional rewrite rules;
on
uen
e and termination.
J. Comput. Systems S
i. 32 (1986) pp. 323-362.
[3℄ Blanqui, J-P. Jouannaud, and M. Okada. Cal
ulus of Indu
tive Constru
tions, in:
RTA99 (Rewriting Theory and Appli
ations), Springer LNCS 1631, pp. 301-316.
[4℄ V. Breazu-Tannen and J. Gallier, Polymorphi
rewriting
onserves algebrai
normalization, Theoreti
al Computer S
ien
e, 83 (1), 1991, pp. 2-28.
[5℄ J.R.B. Co
kett and D. Spen
er. Strong Categori
al Datatypes I, Category Theory
1991, Pro
. Summer Category Theory Meeting, Montreal, CMS Conferen
e Pro
eedings v.13, Can. Math. So
. (ed. by R.A.G. Seely), 1992.
[6℄ H. Comon, P. Narendran, R. Nieuwenhuis, M. Rusinowit
h. De
ision Problems in
Ordered Rewriting, 13th Annual IEEE Symposium on Logi
in Computer S
ien
e
(LICS), 1998, pp. 276-286.
[7℄ T. Coquand and C. Paulin-Mohering, Indu
tively dened types. In P. Martin-Lof
and G. Mints, eds. Pro
. Colog '88, LNCS 417, Springer 1990, pp. 50-66
[8℄ D. Cubri
, P. Dybjer and P.J.S
ott, Normalization and the Yoneda Embedding,
Math. Stru
tures in Computer S
ien
e, Camb. U. Press, 8, No.2, 1998, pp. 153-192.
[9℄ N. Dershowitz and J.-P. Jouannaud, Rewrite Systems, Handbook of Theoreti
al Computer S
ien
e, Chapter 15, North-Holland, 1990.
[10℄ G. Dowek, The unde
idability of pattern mat
hing in
al
uli where primitive re
ursive
fun
tions are representable, Theoreti
al Computer S
ien
e 107 (1993) pp. 349-356.
[11℄ N. Ghani, -equality for
oprodu
ts.
SLNCS 902, 1995, pp. 171-185.
[12℄ J-Y. Girard, Linear Logi
, Theoreti
al
,
Typed Lambda Cal
uli and Appli
ations
, 50, 1987.
Computer S
ien
e
[13℄ J-Y. Girard, Y.Lafont, and P. Taylor. Proofs and Types, Cambridge Tra
ts in Theoreti
al Computer S
ien
e, v. 7, Cambridge University Press, 1989.
[14℄ R. L. Goodstein, Re
ursive
, North-Holland Publishing Co., 1957.
Number Theory
Theory and Appli
ations of Categories, Vol. 6, No. 4
[15℄ T. Hagino.
(1987).
63
, Phd Thesis, Univ. of Edinburgh
A
ategori
al programming language
[16℄ J-P. Jouannaud and M. Okada, Abstra
t Data Type Systems, Theoreti
al Computer
S
ien
e 173 (1997), pp. 349-391. This is a revised version of an extended abstra
t
by the same authors: A
omputation Model for Exe
utable Higher-Order Algebrai
Spe
i
ation Languages, in Logi
in Computer S
ien
e (LICS), 1991, Amsterdam,
IEEE Computer So
. Press, pp. 350-361. .
[17℄ J. Lambek, Cartesian
losed
ategories and typed -
al
uli, in: Cousineau, Curien,
and Robinet (eds.), Combinators and fun
tional programming languages, SLNCS
242 (1986), pp. 136-175.
[18℄ J. Lambek, On the Unity of algebra and Logi
, SLNM 1348, Categori
al Algebra and
its appli
ations, F. Bor
eux, ed. Springer-Verlag, 1988.
[19℄ J. Lambek, Multi
ategories Revisited. Contemp.
Math.
92, 1989, pp. 217-239.
[20℄ J.Lambek and P. J. S
ott. Introdu
tion to Higher Order Categori
al Logi
, Cambridge
Studies in Advan
ed Mathemati
s 7, Cambridge University Press, 1986.
[21℄ S. Ma
Lane. Categories for the Working
emati
s 5, Springer-Verlag, 1971.
, Graduate Texts in Math-
Mathemati
ian
[22℄ J. C. Mit
hell and P. J. S
ott,Typed Lambda Models and Cartesian Closed Categories, Contemp. Math. 92, 1989, pp. 301-316.
[23℄ J. C. Mit
hell, Foundations
for Programming Languages
, MIT Press, 1996.
[24℄ M. Okada, Strong normalizability of the
ombined system of simply typed lambda
al
ulus and an arbitrary
onvergent term rewriting system, Int. Symp. on Symboli
and Algebrai
Computation 89, ACM, 1989.
[25℄ A. M. Pitts , Categori
al Logi
, Handbook of Logi
in Computer S
ien
e S. Abramsky,
D. M. Gabbay and T. S. E. Maibaum, eds. Oxford University Press, 1996, Vol. 6 (to
appear)
[26℄ D. Prawitz. Natural
Dedu
tion
, Almquist & Wilksell, Sto
khom, 1965.
[27℄ L. Roman, Cartesian Categories with Natural Numbers Obje
t, J.
Algebra 58(1989), pp. 267-278.
[28℄ S. Stenlund,
Combinators, lambda terms, and proof theory
[29℄ A. S. Troelstra. Metamathemati
al
analysis, Springer LNM 344, 1973.
Pure and Applied
, D. Reidel, 1972.
investigations of intuitionisti
arithmeti
and
Theory and Appli
ations of Categories, Vol. 6, No. 4
64
[30℄ B. Werner, Une theorie des
onstru
tions indu
tives, These de do
torat, U. Paris 7,
1994.
Department of Philosophy, Keio University,
2-15-45 Mita, Minatoku, Tokyo,
Japan, 108
and
Department of Mathemati
s, University of Ottawa,
585 King Edward, Ottawa, Ont.,
Canada K1N6N5
Email:
mitsuabelard.flet.mita.keio.a
.jp and philmathstat.uottawa.
a
This arti
le may be a
essed via WWW at http://www.ta
.mta.
a/ta
/ or by anonymous ftp at ftp://ftp.ta
.mta.
a/pub/ta
/html/volumes/6/n4/n4.fdvi,psg
THEORY AND APPLICATIONS OF CATEGORIES (ISSN 1201-561X) will disseminate arti
les that
signi
antly advan
e the study of
ategori
al algebra or methods, or that make signi
ant new
ontributions to mathemati
al s
ien
e using
ategori
al methods. The s
ope of the journal in
ludes: all areas of
pure
ategory theory, in
luding higher dimensional
ategories; appli
ations of
ategory theory to algebra,
geometry and topology and other areas of mathemati
s; appli
ations of
ategory theory to
omputer
s
ien
e, physi
s and other mathemati
al s
ien
es;
ontributions to s
ienti
knowledge that make use of
ategori
al methods.
Arti
les appearing in the journal have been
arefully and
riti
ally refereed under the responsibility
of members of the Editorial Board. Only papers judged to be both signi
ant and ex
ellent are a
epted
for publi
ation.
The method of distribution of the journal is via the Internet tools WWW/ftp. The journal is ar
hived
ele
troni
ally and in printed paper format.
Subs
ription information. Individual subs
ribers re
eive (by e-mail) abstra
ts of arti
les as they
are published. Full text of published arti
les is available in .dvi and Posts
ript format. Details will be
e-mailed to new subs
ribers and are available by WWW/ftp. To subs
ribe, send e-mail to ta
mta.
a
in
luding a full name and postal address. For institutional subs
ription, send enquiries to the Managing
Editor, Robert Rosebrugh, rrosebrughmta.
a.
The typesetting language of the journal is TEX, and LaTEX is the preferred
avour. TEX sour
e of arti
les for publi
ation should be submitted by e-mail dire
tly to an appropriate
Editor. They are listed below. Please obtain detailed information on submission format and style
les from the journal's WWW server at URL http://www.ta
.mta.
a/ta
/ or by anonymous ftp from
ftp.ta
.mta.
a in the dire
tory pub/ta
/info. You may also write to ta
mta.
a to re
eive details
by e-mail.
Information for authors.
Editorial board.
John Baez, University of California, Riverside: baezmath.u
r.edu
Mi
hael Barr, M
Gill University: barrbarrs.org
Lawren
e Breen, Universite de Paris 13: breenmath.univ-paris13.fr
Ronald Brown, University of North Wales: r.brownbangor.a
.uk
Jean-Lu
Brylinski, Pennsylvania State University: jlbmath.psu.edu
Aurelio Carboni, Universita dell Insubria:
arbonifis.uni
o.it
P. T. Johnstone, University of Cambridge: ptjpmms.
am.a
.uk
G. Max Kelly, University of Sydney: maxkmaths.usyd.edu.au
Anders Ko
k, University of Aarhus: ko
kimf.au.dk
F. William Lawvere, State University of New York at Bualo: wlawverea
su.buffalo.edu
Jean-Louis Loday, Universite de Strasbourg: lodaymath.u-strasbg.fr
Ieke Moerdijk, University of Utre
ht: moerdijkmath.ruu.nl
Susan Nieeld, Union College: niefielsunion.edu
Robert Pare, Dalhousie University: parems
s.dal.
a
Andrew Pitts, University of Cambridge: ap
l.
am.a
.uk
Robert Rosebrugh, Mount Allison University: rrosebrughmta.
a
Jiri Rosi
ky, Masaryk University: rosi
kymath.muni.
z
James Stashe, University of North Carolina: jds
harlie.math.un
.edu
Ross Street, Ma
quarie University: streetmath.mq.edu.au
Walter Tholen, York University: tholenmathstat.yorku.
a
Myles Tierney, Rutgers University: tierneymath.rutgers.edu
Robert F. C. Walters, University of Sydney: walters bmaths.usyd.edu.au
R. J. Wood, Dalhousie University: rjwoodms
s.dal.
a
ations of Categories,
Vol. 6, No. 4, pp. 47{64.
A NOTE ON REWRITING THEORY FOR UNIQUENESS OF
ITERATION
Dedi
ated to our friend and
olleague Jim Lambek
M. OKADA1 AND P. J. SCOTT2
ABSTRACT. Uniqueness for higher type term
onstru
tors in lambda
al
uli (e.g.
surje
tive pairing for produ
t types, or uniqueness of iterators on the natural numbers) is
easily expressed using universally quantied
onditional equations. We use a te
hnique of
Lambek[18℄ involving Mal'
ev operators to equationally express uniqueness of iteration
(more generally, higher-order primitive re
ursion) in a simply typed lambda
al
ulus,
essentially Godel's T [29, 13℄. We prove the following fa
ts about typed lambda
al
ulus
with uniqueness for primitive re
ursors: (i) It is unde
idable, (ii) Chur
h-Rosser fails,
although ground Chur
h-Rosser holds, (iii) strong normalization (termination) is still
valid. This entails the unde
idability of the
oheren
e problem for
artesian
losed
ategories with strong natural numbers obje
ts, as well as providing a natural example of
the following
omputational paradigm: a non-CR, ground CR, unde
idable, terminating
rewriting system.
1. Introdu
tion
Consider the usual primitive re
ursion equations of the addition fun
tion: x + 0 = x,
x + (S y ) = S (x + y ). How do we know these uniquely spe
ify addition? More generally,
onsider a possibly higher-order primitive re
ursor, ahxy , where a : A
B; h : A
B
B , satisfying:
R
N) )
R
R
0 =
ahx(S y )
=
ahx
ax
hxy
(
R
ahxy
)
)
)
Again we may ask: how do we know su
h primitive re
ursive denitions uniquely spe
ify
the intended fun
tion?
Su
h uniqueness questions make sense in many
ontexts: arithmeti
theories [29℄,
rst-order term rewriting theories [9℄ , primitive re
ursive arithmeti
s [14℄, simply and
higher-order typed lambda
al
uli and related fun
tional languages[13, 20, 29℄,
ategori
al programming languages [5, 15℄ and more generally wherever we dene a pro
edure
iteratively on an indu
tive data type[15, 16℄. If mathemati
al indu
tion is provided expli
itly within the formal theory, the problem of uniqueness often be
omes trivial (e.g.
1 Resear
h
supported by Aids in Resear
h of the Ministry of Edu
ation, S
ien
e and Culture of Japan,
and the Oogata Kenkyu Josei grant of Keio University 2 Resear
h supported by an operating grant
from the Natural S
ien
es and Engineering Resear
h Coun
il of Canada
Re
eived by the editors 1999 Mar
h 8 and, in revised form, 1999 November 15.
Published on 1999 November 30.
Key words and phrases: typed lambda
al
ulus, rewriting theory, strong normalization, Mal'
ev
operations.
M. Okada1 and P. J. S
ott2 1999. Permission to
opy for private use granted.
47
Theory and Appli
ations of Categories,
Vol. 6, No. 4
48
[20℄, p.192.) But usual fun
tional programming languages, term rewriting languages,
or
ategori
al languages do not expli
itly have indu
tion, hen
e the uniqueness issue is
more problemati
. We should mention that similar problems also appear in the theory of
higher-order mat
hing [10℄.
The question of (provable) uniqueness of terms also arises quite naturally from the
viewpoint of
ategory theory [20, 21℄. For example, whenever we demand that arrows
arise from an asso
iated universal mapping property, then we are immediately led to the
question of the (provable) uniqueness of terms in an appropriate language. Here we are
on
erned with the property of being a (strong) natural numbers obje
t in a free
artesian
losed
ategory, equivalently the problem of uniqueness of iteration in Godel's T [29, 13℄.
For many equational
al
uli, a simple-minded solution to the uniqueness problem
involves adding a kind of extensionality or uniqueness rule. This rule says: \any term t
satisfying the same dening equations as a given term, must be equal to that term." The
uniqueness rule may be expressed in rst order logi
as a universally quantied
onditional
equation, possibly between terms of higher type [22℄ .
However, in many interesting
ases (e.g. produ
t and
oprodu
t types ) we
an do
mu
h better: we
an present uniqueness equationally and build a terminating (= strongly
normalizing) higher-typed rewrite system for the theory [20℄. 1 Here we use a te
hnique
of Lambek[18℄ involving Mal'
ev operations to equationally dene uniqueness of iterators
(re
ursors) in Godel's T. We then prove this lambda theory is unde
idable; thus it is
impossible to simultaneously have
on
uen
e (Chur
h Rosser) and termination. In fa
t,
we show that
on
uen
e fails, but give a proof of termination using a rened
omputability
predi
ate argument (Se
tion 4). This answers a question of J. Lambek. On the other
hand, the theory is ground-CR (= Chur
h-Rosser for
losed terms of base type), thus it
forms a natural, unde
idable
omputation theory. This suggests the existen
e of natural,
strongly normalizing fun
tional languages whi
h are Turing
omplete and
ould serve as
the basis of interesting programming languages. Another
onsequen
e of this work is the
unde
idability of the
oheren
e problem for
artesian
losed
ategories with strong natural
numbers obje
ts. We end with a brief dis
ussion of some extensions of these results, for
example to the data type of Brouwer ordinals.
2. Typed Lambda Cal
uli
We use the usual expli
itly typed lambda
al
ulus (with re
ursors) and its notational
onventions,
f. [13, 20, 29℄.
Types
Types are freely generated from a basi
type
N (for natural numbers) under the operation
For typed lambda
al
uli with produ
t types, uniqueness of pairing is given by the surje
tive pairing
equation [20℄. For
oprodu
t types, the dual equation is obvious in a
ategori
al language [20℄, Part I,
Se
tion 8. Curiously, the asso
iated rewriting theory for typed lambda
al
ulus with
oprodu
t types is
very diÆ
ult [11℄.
1
Theory and Appli
ations of Categories, Vol. 6, No. 4
49
).
Terms
For ea
h type A, there is an innite set of variables x of type A, as well as spe
ied
onstants for primitive re
ursion, typed as follows:
A
i
0:N
S:N
)N R
A;B
: (A
) B) ) (A ) N ) B ) B) ) A ) N ) B
Terms are freely generated from the variables and
onstants by appli
ation and abstra
tion, with the usual typing
onstraints. In shorthand, terms have the form
j
j
j
variable
onstant M `N x : A:'
where M : A
Equations
) B ; N : A. We usually write MN for M `N .
We identify terms up to
hange of bound variables (-
ongruen
e). Equality is the smallest
ongruen
e relation
losed under substitution, satisfying ; and
R
R
R
a : A; h : A ) N ) B ) B; x : A; y : N.
A;B
for all
ahx0 = ax
ahx(Sy ) = hxy (
A;B
A;B
ahxy )
Lambda Theories
Among standard extensions of lambda
al
uli to whi
h our methods apply, we mention:
(a) Lambda
al
uli with produ
t types and surje
tive pairing [20, 13℄. Su
h systems are
losely
onne
ted to
artesian
losed
ategories (=
's). However for the purposes
of
onstru
ting free
's, produ
t types are unne
essary ([25℄);
f Se
tion 5 below.
In the presen
e of produ
t types with surje
tive pairing, the re
ursor
may be
dened in terms of the simpler notion of iterator
: A (A A) N A (
f
[20℄, p. 259,[13℄, p. 90 ) The type N with iterators
orresponds to the
ategori
al
notion of weak natural numbers obje
t in
's [20℄.
I
R
A
) ) ) )
R
In this paper we shall use re
ursors sin
e (i) we do not ne
essarily assume produ
t types, (ii) re
ursors are ne
essary for more general type theories (e.g. Girard's
system ) as well as for more general
ategori
al frameworks (e.g. Lambek's multi
ategories, [19℄).
F
(b) We may
onsider extensions of typed lambda
al
ulus by adding rst-order logi
to
the equational theory [23, 22℄ . This will be dis
ussed in the next se
tion. Finally, we
may extend by additional data types. For example, in the last se
tion we
onsider
adding the data type of Brouwer ordinals, among others.
Theory and Appli
ations of Categories, Vol. 6, No. 4
50
As usual, the type expression A1 ) A2 ) ) A abbreviates A1 )
(A2 ) (A 2 ) (A 1 ) A )) ) , i.e. asso
iation to the right. Even if there
are no produ
t types, we sometimes abbreviate A1 ) A2 ) ) A by the Curried
expression (A1 A 1 ) ) A but we still write terms in the usual way without
pairing. The reader
an easily add pairing to terms if there are genuine produ
t types.
The term expression a1 a2 a abbreviates ( ((a1 `a2 )`a3 ) `a 1 )`a , i.e. asso
iation
to the left.
Notation:
n
n
n
n
n
n
n
n
n
n
3. Uniqueness of Re
ursors
3.1. Natural Numbers Obje
ts. In
ategori
al logi
[20℄, a natural numbers obje
t (=
NNO) in a
artesian
losed
ategory (=
) C is an obje
t N together with arrows
0
1!
N ! N whi
h is initial among all diagrams of the shape 1 ! A ! A . This means:
for all arrows a : 1 ! A and g : A ! A there is a unique iteration arrow It (a; g ) : N ! A
satisfying: (i) It (a; g )o0 = a and (ii) It (a; g )oS = g oIt (a; g ). A weak natural numbers
obje
t N in a
C merely postulates the existen
e, but not uniqueness, of the iterator
arrow above. In the typed lambda
al
ulus asso
iated to C , a weak NNO is equivalent to
having an iterator I : A (A ) A) N ) A in the language (
f. [20℄, p. 70).
S
a
g
A
A
A
A
A
3.2. Lambek's Uniqueness Conditions. We now
onsider uniqueness of lambda terms dened by iterators or, more generally, re
ursors. Girard dis
usses the subtleties of su
h
questions, and the defe
ts of standard syntax, in [13℄, pp. 51, 91.
The use of rst-order logi
to strengthen lambda
al
ulus is familiar, for example in
dis
ussing extensionality, lambda models, and well-pointedness of
's,
f. [22℄. In a
similar manner, uniqueness of It in
's
an be guaranteed by the following
onditional
rule: given arrows a : 1 ! A and g : A ! A, if f : N ! A is any arrow satisfying f o0 = a
and f oS = g of then f = It (a; g ). Let us translate this into lambda
al
ulus.
More generally, we
onsider typed lambda
al
uli L presented with re
ursors R .
Given any terms a and h of appropriate type, uniqueness of R ah may be guaranteed
by the following uniqueness rule: for any term f : A N ) B , and variables x; y of
appropriate types:
A
A
A;B
A;B
x y [fx(Sy ) = hxy (fxy )℄
f = R ah
8 8
(U )
A;B
f;h
where a = x : A:fx0
Here, for any x, the initial value of the re
ursion, fx0, is simply dened to be ax .
Lambek [18, 17℄ proved that it is possible to equationally represent the rst-order rule
U , provided we assume the existen
e of
ertain Mal'
ev operators. Let us re
all his
proof.
Suppose all the types A in the lambda
al
ulus L have a Mal'
ev operation; i.e. a
losed term m : A3 ) A satisfying the following equations (in un
urried form):
f;h
A
m xxy = y
A
m xyy = x
A
Theory and Appli
ations of Categories, Vol. 6, No. 4
51
for all x; y : A . Fix a family fm j A a typeg of su
h Mal'
ev operations (we omit type
subs
ripts). Consider the term H , where Hmf h = xyz:m(hxyz )(hxy (f xy ))(f x(Sy )) for
variables f; h (where f has the same type as R ah and Hmf h has the same type as h),
and the following equational rule:
A
A;B
R
(M )
f;h
Theorem.
(i) M
f;h
(ii) U
f;h0
a(Hmf h) = f
From now on, when the
ontext is
lear, we shall omit type subs
ripts.
Notation.
3.3.
A;B
[Lambek([18℄)℄ The following impli
ations hold:
implies U
f;h
implies M
f;h
where h = Hmf h .
0
In this proof, we freely use ( )-rule, i.e. extensionality. (i): Suppose M and
the hypotheses of U , i.e. suppose f x(Sy ) = hxy (f xy ). Sin
e m is a Mal'
ev operator,
Hmf h = h. Therefore by M , f xy = Ra(Hmf h)xy = Rahxy , so f = Rah, by ( ),
whi
h is the
on
lusion of U .
(ii) Suppose U . Note that the hypothesis of this rule is always true, sin
e it says
f x(Sy ) = h xy (f xy ) = m(hx(f xy ))(hx(f xy ))(f x(Sy )) = f x(Sy ): Thus, the
on
lusion
of the rule is true; so f = Rah , i.e. M , as required.
Proof.
f;h
f;h
f;h
f;h
f;h0
0
0
f;h
The theorem above expresses the sense in whi
h we
an repla
e the
onditional uniqueness rules U by the equations M . The problem of equationally dening the appropriate Mal'
ev operators is addressed in se
tion 3.2 below.
The rule U above guarantees uniqueness of the re
ursor R ah for given a; h, whi
h
suÆ
es for many purposes (e.g. in Lambek's work, it guarantees uniqueness of the iterator
arrow in a strong natural number obje
t). But it does not guarantee the uniqueness of
the term R
itself. The uniqueness of su
h R is a mu
h stronger
ondition whi
h we
shall not dis
uss here.
One advantage of assuming the uniqueness rule U is pointed out in [20℄, Proposition
2.9, p. 263: in simply typed lambda
al
ulus with the uniqueness rule (equivalently, in
the free
with NNO) all primitive re
ursive fun
tions and the A
kermann fun
tion may
be dened by their usual free variable equations. But in fa
t more is true: in the next
proposition we show many familiar set-theoreti
equations be
ome provable for variables
(not just for numerals). In what follows, +; .; . are terms dened (using R) by the usual
primitive re
ursive equations on N (
f. [14℄) .
f;h
f;h
f;h
A;B
A;B
f;h
3.4. Proposition. [Goodstein[14℄, Lambek[18℄, Roman[27℄℄ In typed lambda
al
ulus
with the uniqueness rule U , the following identities hold for variables x; y : N
f;h
Theory and Appli
ations of Categories, Vol. 6, No. 4
52
(i) Sx . Sy = x . y
(vi) Asso
iativity of + and
(ii) x . x = 0
(vii) jx; y j = jy; xj, where
.
.
jx; y j = (x y) + (y x)
(iii) x.(1 . x) = 0
.
.
(viii) Commutativity of + and
(iv) x (1 y) = x (x y)
.
.
.
.
(ix) x + (y . x) = y + (x . y)
(v) (x + y) . y = x
Detailed arguments are given in Goodstein [14℄ and/or Lambek[18℄ (
f. also
Roman [27℄). Re (ix), whi
h is an important identity, either follow [14℄, 5.17 (p.108)
or alternatively, note that both sides of (ix) (as fun
tions of x; y) satisfy the following
double re
ursion formula: '(0; 0) = 0; '(0; y + 1) = y + 1; '(x + 1; 0) = x + 1; '(x +
1; y + 1) = '(x; y) + 1. Hen
e by uniqueness the equality follows, provided we
an show
' is representable in typed lambda
al
ulus (equivalently, in the free
with NNO). We
omit the
onstru
tion of ' ex
ept to remark it is similar to the proof that A
kermann's
fun
tion is representable (
f. [1℄, p. 570,[20℄, p. 258 ).
.
Notation. We extend the arithmeti
al operations in the set S = f0; +; .; g to all types
by indu
tion: (i) at type N the operations in S have their usual meanings. (ii) Suppose
we know the operations in S at types A and B. Then we extend these operations to
type A ) B by lambda abstra
tion, i.e. 0 ) = x : A:0 , and f ? ) g = x :
A:fx ? gx, for any operation ? 2 f+; .; . g. Sin
e all types have the form A A1 )
A2 ) ) A 1 ) N, an operation a ? b is essentially x1 x :ax1 x N bx1 x
, where x : A . Finally, we may now dis
uss the usual dieren
e fun
tion in Goodstein
at higher types: jM; N j = (M . N) + (N . M)
If we add expli
it produ
t types, we
ould also dene the arithmeti
al operations
0 and ? \
omponentwise". We shall use the usual notation (without subs
ripts)
for +; .; . ; 0 at all types when the meaning is
lear.
Proof.
A
B
def
B
A
B
def
B
n
i
A
B
A
n
n
n
i
A
B
3.5. Proposition. In typed lambda
al
ulus with the uniqueness rule U , the following
rst-order s
hema holds for arbitrary terms M; N of the same type: ` jM; N j = 0 $
M =N :
f;h
The (!) dire
tion is the interesting one. Arguing informally, we prove the result
for variables of type N , the other
ases following from appropriate lambda abstra
tions
and substitutions. Suppose jx; y j = 0; then by Proposition 3.4(v; vii), jx; y j . (y . x) = 0,
so x . y = 0. Similarly, y . x = 0. Hen
e, using equation Proposition 3.4(ix) above, we
obtain: x = x + (y . x) = y + (x . y) = y.
3.6. Denable Mal'
ev Operations. The rule M is equational, provided the spe
i
ation
of the Mal'
ev operations m are. In the pure typed lambda
al
ulus, Lambek [19℄ showed
that Mal'
ev operations are a
tually denable from
ut-o subtra
tion . , provided we
adjoin some simple equations (see below). Consider the indu
tively dened family of
Proof.
f;h
A
Theory and Appli
ations of Categories, Vol. 6, No. 4
53
losed terms m : A3 ) A, uniquely determined (by fun
tional
ompleteness) by the
following
lauses in un
urried form:
A
1. mN xyz = (x + z ) . y , for variables x; y; z : N.
2. m ) uvw = x : A: m (ux)(vx)(wx), for variables u; v; w : A ) B .
A
B
B
If typed lambda
al
ulus is extended with produ
ts and terminal type, we may
extend m (using expli
it tupling) as follows: m1 hx; y; z i = , for variables x; y; z : 1 and
m = hm ohp 1 ; p 2 ; p 3 i; m ohp 1 ; p 2 ; p 3 ii, where p denotes the proje
tion onto
the ith-fa
tor of the A
omponent, et
.
Remark.
A
A
B
A
A
A
A
B
B
B
B
Ai
To say mN xyz = (x + z ) . y gives a Mal'
ev operator at type N means we must be
able to prove (x + z ) . x = z and (x + y ) . y = x for variables x; y; z . Alas, in the pure
theory these equations are only provable for
losed numerals 0; S 0; S 20; : to guarantee
the result for variables we must postulate it, as follows:
3.7. Theorem. Let L be pure typed lambda
al
ulus (all types freely generated from N).
The indu
tively-dened family of terms fm j A a typeg given above denes Mal'
ev operations at ea
h type, provided that at type N we add the axioms: (x + z ) . x = z and
(x + y ) . y = x, for variables x; y; z .
Proof. By dire
t
al
ulation.
3.8. Uniqueness, Indu
tion, and Unde
idability. We now show that the uniqueness rule
is in fa
t equivalent to a version of quantier-free indu
tion. We shall then give proofs of
the unde
idability of L with uniqueness.
3.9. Lemma. The following are equivalent for any type B :
A
1. Uniqueness rule: for any
losed term f : A ) (N ) B )
x y [fx(Sy ) = hxy (fxy )℄
f = R ah
8 8
(U )
f;h
A;B
where a = x : A:fx0
2. Goodstein Indu
tion at type B: for any
losed term f : A ) N ) B
x y [fx0 = 0 (1 . fxy ).fx(Sy ) = 0℄
f = xy:0
8 8
(Goodstein Ind:)
where x : A and y : N.
3. The indu
tion rule : for any
losed terms F; G : A ) N ) B
(Indu
tion)
[F xy =. Gxy ℄
..
.
8x; y: F x0 = Gx0
F x(Sy ) = Gx(Sy )
F =G
where x : A and y : N in the ante
edent are universally quantied.
Theory and Appli
ations of Categories, Vol. 6, No. 4
54
We show (1) (2) (3) (1), in ea
h
ase by indu
tion on the type B.
(a). (U ) (Goodstein indu
tion) : this is essentially Goodstein's argument, [14℄,
p.35, using the identities of Proposition 3.4 (this proposition assumes U .) For
ompleteness, we sket
h the proof.
Case 1. B = N. Let f : A N N be given satisfying the hypotheses of Goodstein
Indu
tion. Then
Proof.
)
)
)
)
f;h
f;h
)
)
(1 . fxy).(1 . fx(Sy)) = (1 . fxy) . ((1 . fxy).fx(Sy)) = 1 . fxy
(1)
Dene g : A N N by primitive re
ursion as follows (where x : A and y : N are
variables): gx0 = 1, gx(Sy) = gxy.(1 . fxy). Let hxy = gx(Sy). Then using equation (1)
)
)
hx(Sy )
= gx(Sy).(1 . fx(Sy)) = gxy.(1 . fxy) = gx(Sy)
(2)
Also hx0 = 1 = gx0. An easy argument ([14℄, p.34) then shows hxy = gxy. Hen
e,
gx0 = 1 and gx(Sy ) = gxy . By [14℄, 2.7304 (p. 55), g = xy:1 . In parti
ular, 1 . fxy = 1.
Hen
e fxy = fxy.(1 . fxy) = 0, by Proposition 3.4, (iii) .
Case 2: In general, any type has the form B = A1 A2
A 1
N. Thus a
losed term f : A N B means f : A N A1 A2
A 1
N. Thus
n 1
N
1
f = x y z1
z 1 :fxy~z , where fxy~z : N. Now apply the same argument as in
Case 1 (with extra parameters z~ ).
(b). (Goodstein Indu
tion) (Indu
tion):
Case 1: B = N. Let be the
losed term xy: F xy; Gxy . By Proposition 3.5, Indu
tion
is equivalent to saying:
[xy. = 0℄
...
x; y: x0 = 0 x(Sy ) = 0
=0
The proof that Goodstein Indu
tion implies the above rule is (slightly) modied from
Goodstein [14℄, p.109. Note that Goodstein's proof assumes terms F; G : N N; the
same proof goes through verbatim if we assume there is an extra parameter y of type A,
i.e. that F; G are a
tually of type A N N.
Case 2: B = A1 A2
A 1
N. Hen
e, as above, the problem redu
es to the
ase B = N, with extra parameters z : A .
(
). (Ind.)
(U ): The following proof is valid for all types B . Suppose the
hypotheses of U . Let F = xy:fxy and G = xy: ahxy . We wish to prove F = G,
i.e. F xy = Gxy, for all x; y. Clearly F x0 = fx0 = ax = ahx0 = Gx0. Now suppose
F xy = Gxy , i.e. fxy = ahxy . Then, using the hypothesis of U ,
)
)
A
A
)
)
)
)
)
)
n
)
n
)
A
i
n
i
i
)
j
j
8
)
)
)
)
n
)
i
)
)
i
f;h
R
fh
R
R
fh
F x(Sy ) = fx(Sy ) = hxy (fxy ) = hxy (Rahxy ) = Rahx(Sy ) = Gx(Sy ) :
So by Indu
tion, F = G.
Theory and Appli
ations of Categories, Vol. 6, No. 4
55
From the availability of indu
tion in the simply typed lambda
al
ulus with uniqueness,
it follows that the rst-order presentation is unde
idable. But there are dire
t proofs for
the equational presentation as well:
L
3.10. Theorem. The typed lambda
al
ulus with uniqueness Uf;h is unde
idable. Hen
e
we
annot simultaneously have SN and CR for any asso
iated rewriting system.
Observe that with uniqueness we
an represent polynomials with positive integer
oeÆ
ients (
f the remarks before Proposition 3.4). Thus, from the unde
idability of
Hilbert's 10th problem, the general question of de
iding if two su
h lambda terms are
equal or not is unde
idable. The
on
lusion about rewriting systems is familiar. SN and
CR imply the word problem is de
idable: to de
ide if two terms are equal or not, redu
e
them using SN to their unique normal forms, then
he
k if the normal forms are identi
al
(up to
hange of bound variables).
Proof.
Let us end this se
tion with a few remarks.
(i) A related result by G. Dowek [10℄ yields the unde
idability of pattern mat
hing in
lambda
al
uli supporting indu
tive types (as well as other theories).
L
(ii) Simply typed lambda
al
ulus with produ
t types and uniqueness + Uf;h is very
lose to Troelstra's theory qf--E-HA!p of the quantier-free part of extensional arithmeti
in all higher types, lambda operator and produ
t types with surje
tive pairing
[29℄, p. 46, 62 (
f. the form of indu
tion in the Lemma above.)
We
an also give an indire
t proof of unde
idability based on Troelstra's theory;
note, in parti
ular, our
al
ulus satises the -rule: s = t
x:s = x:t. We
follow Troelstra's proof [29℄, p. 62 that =
m ; n
m = n and
=
m ; n
m = n are re
ursively inseparable. Note, however, that Troelstra's
proof also requires ([29℄, pp. 51-59)
oding various equations of primitive re
ursive
arithmeti
, as well as simultaneous re
ursion, all proved using indu
tion. Our proofs
of similar equations in Proposition 3.4 used the uniqueness axiom Uf;h instead.
)
S fhd e d ei j `
fhd e d ei j ` 6 g
g
S
0
4. Rewriting theory for Uniqueness: SN and CR
L
Let
be the typed lambda
al
ulus with primitive re
ursors and Mal'
ev operators,
onsidered as a rewrite system[16, 20, 13℄. To this end we orient all basi
equations as
usual, i.e. from left-hand side to right-hand side, abbreviated LHS RHS . In parti
ular,
we orient in this manner the basi
Mal'
ev equations at type : mxxy x , mxyy y ,
the equations required for dening Mal'
ev operators (see Proposition 3.7), as well as
and .
N
L
4.1. Proposition. The system of typed lambda
al
ulus, re
ursors (without uniqueness) and Mal'
ev equations
onsidered as a rewriting theory oriented as above satises
SN and CR.
The proof is a
orollary of the work of Jouannaud-Okada[16℄.
Theory and Appli
ations of Categories, Vol. 6, No. 4
Ra(Hmfh)
Ra(Hmfh)xy
RRah
f
56
fxy
R
Rahxy
?
0
Figure 1: Failure of CR
We now turn to the Mal'
ev uniqueness rule. Consider the following two basi
orientations:
L
1.
Redu
tion
Ra(Hmfh) f
2.
Expansion
f
Ra(Hmfh)
Let L = the rewriting theory obtained from L with the above redu
tion rule and
= the rewriting theory obtained from L with the above expansion rule.
red
exp
4.2.
Proposition. The system
L
exp
is CR but not SN.
Proof. Sin
e the LHS of the expansion rule is a (higher-type) variable and the original
system L is CR, any
riti
al pair is joinable by 1-step parallel redu
tion, [2℄ Hen
e, the
system is CR. Obviously, the system L with the expansion rule above is not SN, sin
e
the RHS expands with ea
h redu
tion.
exp
The system L is
onsiderably more interesting. In what follows we show that
is SN, not CR, but is ground CR (i.e. CR for
losed terms of ground type ).
red
4.3.
Proposition. The system
L
red
L
red
is not CR. Indeed, it is not even CR for open terms
of ground type.
Consider f = xy:0 and h = xyz:0, where f is of the type of the re
ursor Rah.
Consider the following
riti
al pair between the redu
tion rule and the Mal'
ev rule:
Proof.
(i) Ra(Hmfh) f ,
(ii) Ra(Hmfh) Rah
Redu
tion (i)
omes from our orientation of the Mal'
ev equation M . Redu
tion (ii)
arises as follows: sin
e hxy (fxy ) = 0 = fx(Sy ), then
f;h
Hmfh = xyz:m(hxyz )(hxy (fxy ))(fx(Sy )) xyz:0 h
where f and Rah are irredu
ible. Note that all other
riti
al pairs are a
tually joinable.
See Figure 1(i). In Figure 1(ii), we see a modi
ation of (i) where Rahxy : is an open
term with variables x : A; y : . 2
N
N
Theory and Appli
ations of Categories,
4.4.
Proposition.
The system
Vol. 6, No. 4
L
red
57
is ground CR, i.e. CR for
losed terms of base type.
The only important
ase is shown by diagram (ii) of Figure 1, where we substitute
losed terms x^ : A and y^ : N for the variables x; y , respe
tively. Assuming L is SN
(see below), then by an indu
tive argument ([29℄, p. 104) one shows ` y^ = S 0 (for some
n 2 Z+ ) or ` y^ = 0. In either
ase, we note that (ii) is joinable in either one or two steps,
with Rahx^y^ 0.
Proof.
red
n
L
The system L
Strong Normalization of
4.5.
Theorem.
path starting from
t
red
red is SN, i.e. if
halts (at an irredu
ible).
t is an arbitrary term, then every redu
tion
The proof uses the Tait
omputability method ([29℄). For te
hni
al reasons it does
not suÆ
e to dire
tly dene
omputability for L , but rather we must introdu
e an
auxiliary language L0 (see Remark 4.8 below) 2 .
The language L0 is L but with a kind of \parametrized" Mal'
ev operator m0 : A3
N ) A dened as follows:
red
red
A
1. m0N xyzw = (x + z ) . y for variables x; y; z : N
2. m0
A
)B
fghw = x : Ay : N:m0 (fx)(gx)(hx)y for variables f; g; h : A ) B , w : N.
B
Note that for every type A, variables x; y; z : A, w : N, the two dened Mal'
ev operators
are indistinguishable, in the sense that: ` m0 xyzw = m xyz , i.e. m0 is essentially m
with an extra dummy variable w.
In L0 , analogously to L, we introdu
e the term
A
A
H 0 m0 fh = xyz~p:m0 (hxyz~p)(hxy (fxy )p~)(fx(Sy )p~)(fxy~p)
where ~p is a sequen
e of variables su
h that fxy~p is of type N.
We now form the lambda
al
ulus L0
ompletely analogously to L , but with M
repla
ed by the redu
tion
red
red
(M 0 )
R
fh
4.6.
L
A;B
a(H 0 m0 fh) f
The system 0red is SN, i.e. if
path starting from t halts (at an irredu
ible).
Theorem.
f;h
t is an arbitrary term, then every redu
tion
The proof is a modi
ation of the well-known Tait
omputability method [29℄. One
rst denes the
omputable terms of type A, Comp , by indu
tion on types as in [29℄:
A
t 2 Comp
t 2 Comp )
A
A
B
, t 2 SN for atomi
types A:
, 8a(a 2 Comp ) t`a 2 Comp
A
B
):
(3)
(4)
Known SN te
hniques do not suÆ
e. For example, in order to adapt Blanqui, Jouannaud, Okada[3℄
in the Mal'
ev uniqueness rule must be an a
essible subterm, whi
h is not generally true if f is of
higher type. In the earlier paper of Jouannaud and Okada [16℄ the SN te
hniques do not apply sin
e the
higher type variable h on the LHS disappears on the RHS.
2
f
Theory and Appli
ations of Categories, Vol. 6, No. 4
58
One now proves the following by indu
tion on types:
If is
omputable, then is SN.
If is
omputable and 0 then 0 is
omputable.
CR1.
t
CR2.
t
t
t
t
t
We now need to prove a lemma (by indu
tion on terms):
,
from whi
h the main theorem follows by CR1. In the proof of the lemma, one needs a
stronger indu
tive hypothesis to handle the
ase of lambda abstra
tion. This is summarized by the following (
f. [13℄, p. 46) :
4.7.
L0red
( 1 n) :
i : i
:
(
)
i
i
1
n
( 1 n) :
The proof is on the
omplexity of . We
onsider the substitution instan
e
[ ℄ , where the i are
omputable, and the j are also
omputable so that [ ℄ is
of type . It suÆ
es to verify that this term is SN. All
ases pro
eed as usual, ex
ept
the
riti
al
ase when [ ℄ is ( 0 0 ) 0 , the redex of the Mal'
ev redu
tion ( fh0 ).
We show that after ( fh0 ), 0 : is SN. There are essentially two key forms of su
h
: (i) either ^( 0 0 ^^ ) (so ^[ ℄ = (for the in ( 0 0 )) ) or (ii) is not
of the form (i); then must be a proper subterm of some i or j . Case (i) is very easy
to prove: by indu
tion hypotheses, sin
e ^ is a subterm of , ^[ ℄ is
omputable, so
is
omputable, so is SN. For
ase (ii) 0 0 is
ontained in either some i or some
0 0
is SN. In parti
ular
j . Hen
e, sin
e these are SN,
0
0
the subterm
is strongly normalizable for any
omputable terms
substituted for
; in parti
ular 0 is SN.
4.8.
The reader should note that in the proof above, the key fa
t that 0
ontains the subterms
is
riti
al{the original Mal'
ev rule, using
, will not
dire
tly work.
Sin
e the tree of redu
tions of is a subtree of that of 0 , we obtain:
(Theorem 4.5) Lred
4.9.
Although we do not assume genuine produ
t types here, they may be
a
ounted for, just as in the setting of Jouannaud-Okada [16℄. Produ
ts use the TaitGirard
omputability method [13℄, Chap. 6 (
f. also [20℄, pp. 88-92)), along with an
auxiliary notion of \neutral term" and an extended
omputability predi
ate satisfying
CR3 (
f. [13℄). All this extends to the setting here.
All terms are
omputable
Lemma. Let
be simply typed lambda
al
ulus with redu
tion on the new Mal'
ev
operator, as above. If t x ; :::; x
terms a
A
B is any term with free variables x
are all
omputable, then t a ; :::; a
variables are
omputable, any term t x ; :::; x
Proof.
A
, and if the
is itself
omputable. In parti
ular, sin
e
B is
omputable.
t
~ x~
t d=~
b
d
~ x~
t d=~
b
b
N
~ x~
t d=~
b
M
t
Ra H m f h
f~
b
Ra H m f h ~
b
N
t
~ x
f d=~
f
f
f
Ra H m f h
d
f
f~
b
t
H m fh
b
H
M
H m fh
in terms of m
t
b
~ x
f d=~
f
d
using the
hosen formula for
f xy~
p
f~
b
x; y; ~
p
Remark.
H
f xy~
p
H mf h
m
Corollary.
m
is SN.
Remark.
5. Appli
ations and Extensions
5.1. Coheren
e for CCC's. As an immediate
orollary of the above results, we obtain:
Theory and Appli
ations of Categories, Vol. 6, No. 4
59
5.2. Example. The unde
idability of the word problem (Coheren
e Problem) for equality of arrows in the free
artesian
losed
ategory with (strong) NNO generated by the
empty graph.
Here, the free
with strong NNO
models:
F
an be presented in several ways from term
(i) Following Pitts [25, 8℄ (4.2.1) we may
onstru
t F from simply typed lambda
al
ulus
without produ
t types (e.g. our language L above) as follows: the obje
ts of F will
be nite lists of types; arrows will be equivalen
e
lasses of nite lists of terms in
ontext. The Mal'
ev equations guarantee that the NNO is strong.
(ii) Following Lambek and S
ott [20℄, we may
onstru
t F using our language L with
produ
t and terminal types; here obje
ts are types, and arrows are equivalen
e
lasses of terms with at most one free variable. Again, the Mal'
ev equations guarantee that the NNO is strong.
In either
ase above we know the equational theory so generated is unde
idable, so
equality of arrows is too (for the Pitts'
onstru
tion use Theorem 3.10; for the LambekS
ott, we use the extension of Theorem 3.10 to produ
t types (
f. Remark 4.9).
Remarks:
1. Godel's T (i.e. simply typed lambda
al
ulus with re
ursors) is known to be de
idable, sin
e it is CR and SN. We wish to emphasize that the extended theory with
Uniqueness Lred is unde
idable be
ause of failure of Chur
h-Rosser, not be
ause of
failure of SN.
2. We should like to emphasize that simply typed lambda
al
ulus with uniqueness
of iterators (as an equational theory) is a mathemati
ally natural extension of T ,
ontaining a purely equational equivalent to indu
tion, and
losely related to familiar
theories of arithmeti
of nite types .
5.3. Example. The equational theory Lred of typed lambda
al
ulus with Mal'
ev's
equations is a natural example of an SN, non-CR, ground-CR, unde
idable rewriting
system.
Natural examples of su
h theories are not
ommon. Su
h a theory
an provide a
omputational model for fun
tional languages, sin
e
omputation of terms of ground type
(by normalization) gives unique values. Moreover, Lred is unde
idable, unlike most SN,
CR typed lambda
al
uli whi
h only represent a proper sub
lass of the total re
ursive
fun
tions.
Lred
an also be used for veri
ation of indu
tive properties: the uniqueness rule for
terms dened by re
ursion is equivalent to an indu
tion rule, and hen
e
ould be used
as an alternative proof te
hnique to traditional indu
tive arguments. We would like to
see how these te
hniques
ould apply to indu
tive theorem proving and related de
ision
problems in rewriting theory (
f. [6℄ ).
Theory and Appli
ations of Categories, Vol. 6, No. 4
60
5.4. Extension to Brouwer Ordinals. We shall now sket
h how to extend the treatment to
a larger
lass of data types. Su
h data types satisfy a domain equation
= A ) , where
the type variable appears
ovariantly; in parti
ular, we
onsider 62 A (
f. [20, 15℄).
To illustrate, we
onsider the data type of Brouwer Ordinals added to the simply type
lambda
al
uli L above.
Ord is a type with distinguished
onN ) Ord) ) Ord. The re
ursor R is dened on
5.5. Definition. The type of Brouwer
stants: 0 : Ord; S : Ord ) Ord; lim : (
Ord by postulating the following rules:
ordinals
Rahgx0
= ax
Rahgx(Sy) = hxy(Rahgxy)
Rahgx(lim k) = gxk(z(Rahgx(kz)))
N
(5)
(6)
(7)
N
N
Here: a : A ) Ord; h : A ) ) Ord; g : A ) (( ) Ord) ) ( ) Ord)); and x : A
. For simpli
ity we are assuming Rahgx0 is of type Ord, but it
ould be of any higher
type.
We wish to remark that this denition is merely the data type of Brouwer ordinals,
and has nothing to do with set-theoreti
transnite re
ursion.
We extend our analysis of Lambek's uniqueness
onditions in Se
tion 3 as follows. The
rule U
now has two premisses:
f;h;g
(U
f;h;g
8x8y[ fx(Sy) = hxy(fxy) ℄ 8xk[ fx(lim k) = gxk(z(fx(kz))) ℄
f = Rah
)
where a = x : A:fx0. Similarly, we have
(M
f;h;g
Ra(Hmfh)(H mfg) = f
)
0
Here, Hmfh is the same as before, while
H mfg =
0
def
xku[m(gxku)(gxk(z (fx(kz ))))(fx(lim k))℄:
The following is analagous to Lambek's Theorem 3.3, in Se
tion 3.
5.6.
Theorem.
(i)
M
(ii)
U
f;h;g
f;h0 ;g 0
The following impli
ations hold:
implies
U
implies
M
f;h;g
f;h;g
where
h = Hmfh and g = H mfg
0
0
0
.
Re (i), assume the two premises of U . In parti
ular, from the se
ond premise,
fx(limk) = gxk(z (fx(kz ))). Therefore, by the property of the Mal'
ev operator m and
by the denition of H mfg , we have H mfg = xku(gxku) = g . In the same way, from
the rst premise, we get Hmfh = h. Therefore, from M , Rahg = f . This proves (i).
Proof.
f;h;g
0
0
f;h;g
Theory and Appli
ations of Categories, Vol. 6, No. 4
61
Re (ii), below we prove the following two equations:
fx(Sy ) = h0 xy (fxy )
fx(limk) = g 0xk(z (fx(kz ))):
(8)
(9)
f = Rah0 g 0 ;
, then by U
By using equations (8) and (9) as the two premisses of U
namely, f = Ra(Hmfh)(H 0mfg ), i.e., M
holds.
Sin
e the proof of (8) is the same as the type N
ase in the original Lambek theorem, we prove (9) only: g 0 xk(z (fx(kz ))) =
(H 0 mfg )xk(z (fx(kz ))) =
m(gxk(z (fx(kz ))))(gxk(z (fx(kz ))))(fx(lim k)) = fx(lim k), as required.
f;h0 ;g 0
f;h0 ;g 0
f;h;g
def
As for the rewriting theory of this Ord system, the analog of Proposition 4.1, that the
ombined system of rst-order Mal'
ev rules and the Ord-re
ursor rules is SN follows from
a re
ent theorem of Blanqui, Jouannaud, and Okada [3℄. Letting again L denote this
new language with the redu
tion ordering, L is not CR but is ground CR by the same
proof as Proposition 4.3. The analog of Theorem 4.5 establishing SN similarly applies to
this extended language.
Finally,
on
erning the dis
ussion in Lemma 3.9 on the equivalen
e of uniqueness and
various forms of indu
tion, the situation is a little more
omplex here. First we observe
that the Ord-indu
tion rule is:
red
red
(Ord
Ind)
[ 8z (F x(fz ). = Gx(fz ) ℄
..
.
F x(lim f ) = Gx(lim f )
[F xy =. Gxy ℄
..
.
F x(Sy ) = Gx(Sy )
F =G
F x0 = Gx0
where y and f are eigen variables.
In order to naturally extend the equivalen
e in Lemma 3.9, it is ne
essary to dis
uss
the
omputations used in Goodstein Indu
tion in this more general framework. For this,
it appears ne
essary to set up a primitive re
ursive ordinal notation system to represent
+; . ; m, et
. in order to simulate (in our now more general system) the basi
properties
used in the standard N-
ase (
f. also the dis
ussion after Theorem 3.6). This appears
routine, but we omit the detailed veri
ation here.
Finally, we remark that from a
ategori
al viewpoint, the datatype Ord makes sense
in any
with natural numbers obje
t N : it is an obje
t Ord with arrows 1 ! Ord; S :
Ord ! Ord; lim : Ord ! Ord satisfying the appropriate equations (analogous to a
parametrized natural numbers obje
t [20, 27℄)
N
5.7. Remark. Con
erning more general indu
tive data types (
f. [7, 3℄) the above results
an be extended under the
ondition that we
an dene Mal'
ev operations on the
data type. In the examples we know, this involves dening some analog of . (or, for
multipli
ative operations, ( ) 1 ). This is not always easy to do. For example, for the
data type of lists of integers, `ist(N), there is no obvious
hoi
e for . . On the other hand,
the data type of lists of length k, `ist (N), does have a Mal'
ev operator using pointwise
subtra
tion: (a1 ; ; a ) . (b1 ; ; b ) = (a1 . b1 ; ; a . b ).
k
k
k
k
k
Theory and Appli
ations of Categories, Vol. 6, No. 4
62
Another way to extend these results is simply to postulate a Mal'
ev operator, and
the asso
iated rewriting rule, at ea
h type.
Referen
es
[1℄ H. P. Barendregt.
, North-Holland, 1984.
The Lambda Cal
ulus
[2℄ J. Bergstra and J. W. Klop, Conditional rewrite rules;
on
uen
e and termination.
J. Comput. Systems S
i. 32 (1986) pp. 323-362.
[3℄ Blanqui, J-P. Jouannaud, and M. Okada. Cal
ulus of Indu
tive Constru
tions, in:
RTA99 (Rewriting Theory and Appli
ations), Springer LNCS 1631, pp. 301-316.
[4℄ V. Breazu-Tannen and J. Gallier, Polymorphi
rewriting
onserves algebrai
normalization, Theoreti
al Computer S
ien
e, 83 (1), 1991, pp. 2-28.
[5℄ J.R.B. Co
kett and D. Spen
er. Strong Categori
al Datatypes I, Category Theory
1991, Pro
. Summer Category Theory Meeting, Montreal, CMS Conferen
e Pro
eedings v.13, Can. Math. So
. (ed. by R.A.G. Seely), 1992.
[6℄ H. Comon, P. Narendran, R. Nieuwenhuis, M. Rusinowit
h. De
ision Problems in
Ordered Rewriting, 13th Annual IEEE Symposium on Logi
in Computer S
ien
e
(LICS), 1998, pp. 276-286.
[7℄ T. Coquand and C. Paulin-Mohering, Indu
tively dened types. In P. Martin-Lof
and G. Mints, eds. Pro
. Colog '88, LNCS 417, Springer 1990, pp. 50-66
[8℄ D. Cubri
, P. Dybjer and P.J.S
ott, Normalization and the Yoneda Embedding,
Math. Stru
tures in Computer S
ien
e, Camb. U. Press, 8, No.2, 1998, pp. 153-192.
[9℄ N. Dershowitz and J.-P. Jouannaud, Rewrite Systems, Handbook of Theoreti
al Computer S
ien
e, Chapter 15, North-Holland, 1990.
[10℄ G. Dowek, The unde
idability of pattern mat
hing in
al
uli where primitive re
ursive
fun
tions are representable, Theoreti
al Computer S
ien
e 107 (1993) pp. 349-356.
[11℄ N. Ghani, -equality for
oprodu
ts.
SLNCS 902, 1995, pp. 171-185.
[12℄ J-Y. Girard, Linear Logi
, Theoreti
al
,
Typed Lambda Cal
uli and Appli
ations
, 50, 1987.
Computer S
ien
e
[13℄ J-Y. Girard, Y.Lafont, and P. Taylor. Proofs and Types, Cambridge Tra
ts in Theoreti
al Computer S
ien
e, v. 7, Cambridge University Press, 1989.
[14℄ R. L. Goodstein, Re
ursive
, North-Holland Publishing Co., 1957.
Number Theory
Theory and Appli
ations of Categories, Vol. 6, No. 4
[15℄ T. Hagino.
(1987).
63
, Phd Thesis, Univ. of Edinburgh
A
ategori
al programming language
[16℄ J-P. Jouannaud and M. Okada, Abstra
t Data Type Systems, Theoreti
al Computer
S
ien
e 173 (1997), pp. 349-391. This is a revised version of an extended abstra
t
by the same authors: A
omputation Model for Exe
utable Higher-Order Algebrai
Spe
i
ation Languages, in Logi
in Computer S
ien
e (LICS), 1991, Amsterdam,
IEEE Computer So
. Press, pp. 350-361. .
[17℄ J. Lambek, Cartesian
losed
ategories and typed -
al
uli, in: Cousineau, Curien,
and Robinet (eds.), Combinators and fun
tional programming languages, SLNCS
242 (1986), pp. 136-175.
[18℄ J. Lambek, On the Unity of algebra and Logi
, SLNM 1348, Categori
al Algebra and
its appli
ations, F. Bor
eux, ed. Springer-Verlag, 1988.
[19℄ J. Lambek, Multi
ategories Revisited. Contemp.
Math.
92, 1989, pp. 217-239.
[20℄ J.Lambek and P. J. S
ott. Introdu
tion to Higher Order Categori
al Logi
, Cambridge
Studies in Advan
ed Mathemati
s 7, Cambridge University Press, 1986.
[21℄ S. Ma
Lane. Categories for the Working
emati
s 5, Springer-Verlag, 1971.
, Graduate Texts in Math-
Mathemati
ian
[22℄ J. C. Mit
hell and P. J. S
ott,Typed Lambda Models and Cartesian Closed Categories, Contemp. Math. 92, 1989, pp. 301-316.
[23℄ J. C. Mit
hell, Foundations
for Programming Languages
, MIT Press, 1996.
[24℄ M. Okada, Strong normalizability of the
ombined system of simply typed lambda
al
ulus and an arbitrary
onvergent term rewriting system, Int. Symp. on Symboli
and Algebrai
Computation 89, ACM, 1989.
[25℄ A. M. Pitts , Categori
al Logi
, Handbook of Logi
in Computer S
ien
e S. Abramsky,
D. M. Gabbay and T. S. E. Maibaum, eds. Oxford University Press, 1996, Vol. 6 (to
appear)
[26℄ D. Prawitz. Natural
Dedu
tion
, Almquist & Wilksell, Sto
khom, 1965.
[27℄ L. Roman, Cartesian Categories with Natural Numbers Obje
t, J.
Algebra 58(1989), pp. 267-278.
[28℄ S. Stenlund,
Combinators, lambda terms, and proof theory
[29℄ A. S. Troelstra. Metamathemati
al
analysis, Springer LNM 344, 1973.
Pure and Applied
, D. Reidel, 1972.
investigations of intuitionisti
arithmeti
and
Theory and Appli
ations of Categories, Vol. 6, No. 4
64
[30℄ B. Werner, Une theorie des
onstru
tions indu
tives, These de do
torat, U. Paris 7,
1994.
Department of Philosophy, Keio University,
2-15-45 Mita, Minatoku, Tokyo,
Japan, 108
and
Department of Mathemati
s, University of Ottawa,
585 King Edward, Ottawa, Ont.,
Canada K1N6N5
Email:
mitsuabelard.flet.mita.keio.a
.jp and philmathstat.uottawa.
a
This arti
le may be a
essed via WWW at http://www.ta
.mta.
a/ta
/ or by anonymous ftp at ftp://ftp.ta
.mta.
a/pub/ta
/html/volumes/6/n4/n4.fdvi,psg
THEORY AND APPLICATIONS OF CATEGORIES (ISSN 1201-561X) will disseminate arti
les that
signi
antly advan
e the study of
ategori
al algebra or methods, or that make signi
ant new
ontributions to mathemati
al s
ien
e using
ategori
al methods. The s
ope of the journal in
ludes: all areas of
pure
ategory theory, in
luding higher dimensional
ategories; appli
ations of
ategory theory to algebra,
geometry and topology and other areas of mathemati
s; appli
ations of
ategory theory to
omputer
s
ien
e, physi
s and other mathemati
al s
ien
es;
ontributions to s
ienti
knowledge that make use of
ategori
al methods.
Arti
les appearing in the journal have been
arefully and
riti
ally refereed under the responsibility
of members of the Editorial Board. Only papers judged to be both signi
ant and ex
ellent are a
epted
for publi
ation.
The method of distribution of the journal is via the Internet tools WWW/ftp. The journal is ar
hived
ele
troni
ally and in printed paper format.
Subs
ription information. Individual subs
ribers re
eive (by e-mail) abstra
ts of arti
les as they
are published. Full text of published arti
les is available in .dvi and Posts
ript format. Details will be
e-mailed to new subs
ribers and are available by WWW/ftp. To subs
ribe, send e-mail to ta
mta.
a
in
luding a full name and postal address. For institutional subs
ription, send enquiries to the Managing
Editor, Robert Rosebrugh, rrosebrughmta.
a.
The typesetting language of the journal is TEX, and LaTEX is the preferred
avour. TEX sour
e of arti
les for publi
ation should be submitted by e-mail dire
tly to an appropriate
Editor. They are listed below. Please obtain detailed information on submission format and style
les from the journal's WWW server at URL http://www.ta
.mta.
a/ta
/ or by anonymous ftp from
ftp.ta
.mta.
a in the dire
tory pub/ta
/info. You may also write to ta
mta.
a to re
eive details
by e-mail.
Information for authors.
Editorial board.
John Baez, University of California, Riverside: baezmath.u
r.edu
Mi
hael Barr, M
Gill University: barrbarrs.org
Lawren
e Breen, Universite de Paris 13: breenmath.univ-paris13.fr
Ronald Brown, University of North Wales: r.brownbangor.a
.uk
Jean-Lu
Brylinski, Pennsylvania State University: jlbmath.psu.edu
Aurelio Carboni, Universita dell Insubria:
arbonifis.uni
o.it
P. T. Johnstone, University of Cambridge: ptjpmms.
am.a
.uk
G. Max Kelly, University of Sydney: maxkmaths.usyd.edu.au
Anders Ko
k, University of Aarhus: ko
kimf.au.dk
F. William Lawvere, State University of New York at Bualo: wlawverea
su.buffalo.edu
Jean-Louis Loday, Universite de Strasbourg: lodaymath.u-strasbg.fr
Ieke Moerdijk, University of Utre
ht: moerdijkmath.ruu.nl
Susan Nieeld, Union College: niefielsunion.edu
Robert Pare, Dalhousie University: parems
s.dal.
a
Andrew Pitts, University of Cambridge: ap
l.
am.a
.uk
Robert Rosebrugh, Mount Allison University: rrosebrughmta.
a
Jiri Rosi
ky, Masaryk University: rosi
kymath.muni.
z
James Stashe, University of North Carolina: jds
harlie.math.un
.edu
Ross Street, Ma
quarie University: streetmath.mq.edu.au
Walter Tholen, York University: tholenmathstat.yorku.
a
Myles Tierney, Rutgers University: tierneymath.rutgers.edu
Robert F. C. Walters, University of Sydney: walters bmaths.usyd.edu.au
R. J. Wood, Dalhousie University: rjwoodms
s.dal.
a