Theory and Applications of Categories, Vol. 8, No. 5, pp. 63–99.

FINITE SUM – PRODUCT LOGIC

J.R.B. COCKETT^{1} AND R.A.G. SEELY^{2}

ABSTRACT. In this paper we describe a deductive system for categories with finite products and coproducts, prove decidability of equality of morphisms via cut elimination, and prove a “Whitman theorem” for the free such categories over arbitrary base categories. This result provides a nice illustration of some basic techniques in categorical proof theory, and also seems to have slipped past unproved in previous work in this field. Furthermore, it suggests a type-theoretic approach to 2–player input–output games.

Introduction

In the late 1960’s Lambek introduced the notion of a “deductive system”, by which he meant the presentation of a sequent calculus for a logic as a category, whose objects were formulas of the logic, and whose arrows were (equivalence classes of) sequent derivations. He noticed that “doctrines” of categories corresponded under this construction to certain logics. The classic example of this was cartesian closed categories, which could then be regarded as the “proof theory” for the ∧ – ⇒ fragment of intuitionistic propositional logic. (An excellent account of this may be found in the classic monograph [Lambek–Scott 1986].) Since his original work, many categorical doctrines have been given similar analyses, but it seems one simple case has been overlooked, viz. the doctrine of categories with finite products and coproducts (without any closed structure and without any extra assumptions concerning distributivity of the one over the other). We began looking at this case with the thought that it would provide a nice simple introduction to some techniques in categorical proof theory, particularly the idea of rewriting systems modulo equations, which we have found useful in investigating categorical structures with two tensor products (“linearly distributive categories” [Blute et al. 1996]). In addition, it also serves as a simple introduction to categorical cut elimination, in a style which has recently been studied by Joyal [Joyal 1995], and which he attributes to Whitman [Whitman 1941]. As a pedagogical tool, then, we think this case merits a closer look. There may be no surprises in the result, though there are some subtleties that make the proof of some interest.

In addition to an instructive case study in categorical proof theory there may be further reasons to be interested in this logic. There are suggestive connections with game theory, (see particularly the recent work of Luigi Santocanale [Santocanale 1999] on meet and join posets with fixed points). The types may be viewed as finite games which lack the usual requirement that play should alternate strictly between player (product structure) and opponent (coproduct structure). Games, in turn, are related to the protocols one expects to be obeyed by a communication channel. Thus, it is possible that this logic could be a useful foundation in understanding channel-based concurrent communication. In a sequel we intend to show that a type-theoretic foundation for games (i.e. for such communication) can be presented based on a variation of the type theory presented in this paper.

1Research partially supported by NSERC, Canada. ^{2}Research partially supported by Le Fonds FCAR, Québec, and NSERC, Canada. Diagrams in this paper were produced with the help of the TEXcad drawing program of G. Horn and the XY-pic diagram macros of K. Rose and R. Moore.

Received by the editors 2000 March 30 and, in revised form, 2001 February 20.

Transmitted by Michael Barr. Published on 2001 March 5.

2000 Mathematics Subject Classification: 03B70, 03F05, 03F07, 03G30 .

Key words and phrases: categories, categorical proof theory, finite coproducts, finite products, deductive systems .

\begin{matrix}c \\ ◯ \end{matrix} J.R.B. Cockett^{1} and R.A.G. Seely^{2}, 2001. Permission to copy for private use granted.

In the following we shall present a sequent calculus suitable for categories with finite products and coproducts (or “sums”). We adopt a slightly non-traditional presentation, in terms of products and coproducts indexed by arbitrary finite sets. This is easily seen to be equivalent to binary sums and products together with the nullary cases, the constants 0 and 1. We think this approach simplifies the details. Our axioms A ⊢ A are restricted to the cases where A is atomic; in a later section we show how X ⊢ X may be derived for arbitrary X. We show cut elimination for this system, giving eight cut elimination schema which suffice for the proof. Then for the categorical semantics, we show four equivalence schema which must be valid for the categorical properties to hold. We construct a term calculus for sequent derivations, and then show it is Church–Rosser, modulo these four equivalences. In order to be able to decide equality of maps, we must be able to determine if two (cut-free) terms of the same type (i.e. cut-free derivations of the same sequent) are related by the four equivalence schema.

We have various presentations of this decision procedure. The first, presented in the main body of the paper, is symmetric with respect to the duality between sum and product and involves a simple algorithm for deciding the equivalences. We present this procedure graphically using trees which, we hope, suggest the link to games, as these trees do indeed specify strategies. The second technique (in Appendix A) was suggested to us by Luigi Santocanale and orients the equivalences in such a way that, together with the original elimination schema, we have a confluent rewriting system. This rewriting system is a little curious, however, as it does not respect the sum–product duality (so there are actually two possible orientations of the equations). We have not made this approach our primary attack on the decision question, since although it provides an immediate way to establish decidability, we felt that it does not flow as naturally from the proof theory. Finally, we can view the terms as planar geometric diagrams (“cellular squares”) (Appendix B) in a manner suggested to us by Peter Selinger, which gives an immediate decision procedure. This last method is the most intuitive but perhaps the least rigorous approach. Furthermore, in so far as we have tried to develop this idea, it appears that cellular squares fail to handle the units (viz. the initial and final objects); we believe, in fact, that cellular squares may be related to Girard’s suggestion for handling the additives in linear logic [Girard 1995] which also fails to handle the (additive) units.

One point of interest is that although we do need to put an equivalence relation on derivations, induced by the cut-elimination steps, we do not need to suppose the general identity equations, nor the associativity of composition — these follow from the cut elimination process. We conclude the paper with the “Whitman” theorem for this logic, which gives a characterization of the free category with finite products and coproducts over a base category in terms of characterizations of the hom sets.

So, we present a correspondence between the doctrine of categories with finite sums and products, and a “Lambek style” deductive system ΣΠ. This correspondence will no doubt seem quite like similar results proven over the past several decades (e.g. consider the rules for the additives in linear logic [Girard 1987]): we think some comments concerning its novelty will help the reader attune himself to some points that otherwise might slip past unnoticed.

First, note that unlike the work of Joyal’s [Joyal 1995] on the bicompletion of categories, our construction of the free category does not use an inductive chain of constructions, alternating between completions and cocompletions. In this finite case, one can do both finite completions (but only for sums and products) in one step. Our proof of cut elimination and the Church–Rosser property does not make sense without finiteness however. Furthermore, unlike the related work on categories with finite products (or sums, but not both), with or without cartesian closedness, if we wish to maintain sum–product symmetry we cannot rely only on directed rewrites (“reductions”) but must also make essential use of two-way rewrites (which we might call “equations”). Hence we need to use the theory of reduction systems modulo equations; in particular, we need to strengthen an old result of Huet’s in this connection. Our use of such systems to provide a decision procedure for the equality of derivations is not particularly common in categorical cut elimination, but it was a key ingredient in our earlier work on linearly distributive categories and ∗-autonomous categories [Blute et al. 1996]. Its reappearance here in a slightly different guise is one of the highlights of the present paper, we think. Finally, we have already drawn the reader’s attention to the fact that in setting up the equivalence relation for the category induced by the deductive system, we need not assume the categorical axioms of identity (apart from atomic instances) and associativity — these follow from the cut elimination process. This is not unusual in working with free logics, but may be somewhat less familiar to the reader in the present case of logic over an arbitrary category. Small points individually, but together they give this result a slightly different flavour from its long-familiar relations.

1. The sequent calculus

Define a sequent calculus for products and coproducts as follows. The propositions are either atoms (which we shall write as A, B, ..) or compound formulas (which we shall write as X, Y, ..). A compound formula is either an I-ary sum, where I is a finite set, written ∑_{i∈I} X_{i}, or a product, written ∏_{i∈I} X_{i}. The special cases of these sums and products for when the index set is empty, I = ∅, shall be written respectively as ∑_{∅} = 0 and ∏_{∅} = 1. For binary sums and products we shall write X + Y and X × Y respectively.

A sequent will be an ordered pair of formulas, denoted in the usual manner with a “proof turnstile”: X ⊢ Y. The rules of inference for this logic are as follows:

[figure: \begin{matrix}A ⊢ A & identity on atoms \\ \begin{matrix}\{X_{i} ⊢ Y \} & i∈I \\ ∑_{i∈I} X_{i} ⊢ Y \end{matrix} cotuple & \begin{matrix}\{X ⊢ Y_{i}\} & i∈I \\ X ⊢ ∏_{i∈I} Y_{i} \end{matrix} tuple \\ X ⊢ Y_{k} ; X ⊢ ∑_{i∈I} Y_{i} injection & X_{k} ⊢ Y ; ∏_{i∈I} X_{i} ⊢ Y projection \\ where k ∈ I, I ≠ ∅ \\ \begin{matrix}X ⊢ Y & Y ⊢ Z \\ X ⊢ Z \end{matrix} & cut \end{matrix}]

Note that in the cotuple and tuple rules, I may be empty, though not in the injection and projection rules.

Here are some typical proofs in this logic:

1.

\begin{matrix}\begin{matrix}{A ⊢ A \atop A × B ⊢ A} & {B ⊢ B \atop B ⊢ B + C} ; A × B ⊢ B + C \\ A × B ⊢ A × (B + C) \end{matrix} & \begin{matrix}{A ⊢ A \atop A × C ⊢ A} & {C ⊢ C \atop A × C ⊢ C} ; A × C ⊢ B + C \\ A × C ⊢ A × (B + C) \end{matrix} \\ (A × B) + (A × C) ⊢ A × (B + C) \end{matrix}

Note that this proves one direction of the distributive law: it will be clear shortly that the other direction cannot be proven in the system.

2.

\begin{matrix}{A ⊢ A \atop A × (B + C) ⊢ A} & \begin{matrix}{B ⊢ B \atop B ⊢ B + C} & {C ⊢ C \atop C ⊢ B + C} \\ B + C ⊢ B + C \end{matrix} ; A × (B + C) ⊢ B + C \\ A × (B + C) ⊢ A × (B + C) \end{matrix}

This proves the identity inference! Note that the proof has a non-trivial structure which involves decomposing repeatedly the top level structure until the identities at the atomic level are reached.

Notice that this logic does not have the usual structural rules of thinning, exchange, and weakening. Clearly the projection and injection rules provide the effect of weakening (on either side of the “turnstile”). The effect of thinning is provided by the diagonal sequent which can be constructed by:

\begin{matrix}A ⊢ A & A ⊢ A \\ A ⊢ A × A \end{matrix}

The codiagonal sequent is constructed, of course, by the dual proof. Finally, since we have sets of premises (in the tupling and cotupling rules) instead of sequences of premises, we can deduce exchange in the form of sequents expressing the commutativity of sum and product.

We shall denote this logic by ΣΠ, and we shall consider various augmentations of this basic logic:

• The “initial logic” is the logic with no atoms: notice that this is still a non-trivial logic because of the symbols ∑_{∅} and ∏_{∅} from which more complex formulae can be constructed. We shall write this as ΣΠ_{∅}.

• The “pure logic” is the logic with an arbitrary set of atoms, A: we shall write this as ΣΠ_{A}.

• The “free logic” is the logic with an arbitrary set of atoms and an arbitrary set of axioms relating those atoms. Although we could regard this as a graph, we shall also allow a notion of equality of paths, and so the atoms are actually the objects of a category and the axioms are maps in that category (with the “essential cuts” being provided by composition in that category). If we denote this category by A, we shall denote the resulting logic by ΣΠ_{A}.

We may think of the atoms of a pure logic as forming a discrete category, the free logic on this discrete category is then just the “pure” logic. Clearly, therefore, each variant above includes the previous variants. We shall thus only deal with the last variant, unless otherwise noted, since it is the most general.

It is worth noting that the inference system for ΣΠ is self-dual, that is, it has an obvious sum–product symmetry. Explicitly, we may swap the direction of the sequents while, at the same time, turning sums into products and products into sums to obtain the same system. This means that each proof has a dual interpretation and can be “reused” to prove a dual theorem. The systems we introduce in the main body of this paper are designed to maintain this symmetry.

There is a simple cut elimination theorem for the logic ΣΠ_{A} which eliminates all cuts by rewriting the proof trees. Of course, the process will get stuck on the introduced atomic axioms or sequents. A cut between atomic axioms is an essential cut.

1.1. Proposition. [Cut elimination:] Any proof in the free logic ΣΠ_{A} can be transformed to a proof in which the only cuts are essential.

Proof. We shall provide a family of rewrites for proofs and show that they terminate. Any canonical proof (that is a proof which cannot be further rewritten) for this set of rewrites will be a “cut eliminated” proof in the sense of having no inessential cuts.

We shall use the duality to reduce the number of rewrites we present.

Sequent–Identity (Identity–Sequent): This rewrite removes the cut below an identity axiom on the right:

\begin{matrix}{π \atop X ⊢ A} & A ⊢ A \\ X ⊢ A \end{matrix} ⟹ {π \atop X ⊢ A}

Its dual rule removes the cut below an identity axiom on the left.

Sequent–Injection (Projection–Sequent): This rewrite moves a cut which is below an arbitrary sequent and an injection above the injection.

\begin{matrix}{π \atop Y ⊢ Z} & {π′ \atop Z ⊢ X_{k}} ; Z ⊢ ∑ X_{i} \\ Y ⊢ ∑ X_{i} \end{matrix} ⟹ \begin{matrix}{π \atop Y ⊢ Z} & {π′ \atop Z ⊢ X_{k}} \\ Y ⊢ X_{k} \end{matrix} ; Y ⊢ ∑ X_{i}

The dual rewrite moves a cut above a projection.

Cotupling–Sequent (Sequent–Tupling): This rewrite moves a cut which is below a cotupling and an arbitrary sequent above the cotupling.

\begin{matrix}\begin{matrix}\left\{{π_{i} \atop Y_{i} ⊢ X}\right\} & i∈I \\ ∑ Y_{i} ⊢ X \end{matrix} & {π \atop X ⊢ Z} \\ ∑ Y_{i} ⊢ Z \end{matrix} ⟹ \begin{matrix}\begin{cases}{π_{i} \atop Y_{i} ⊢ X} & {π \atop X ⊢ Z} \\ Y_{i} ⊢ Z \end{cases}\} & i∈I \\ ∑ Y_{i} ⊢ Z \end{matrix}

The dual moves the cut above tupling on the right.

Tupling–Projection (Injection–Cotupling): This rewrite moves the cut above tupling and projection:

\begin{matrix}\begin{matrix}\left\{{π_{i} \atop X ⊢ Y_{i}}\right\} & i∈I \\ X ⊢ ∏ Y_{i} \end{matrix} & {π \atop Y_{k} ⊢ Z} ; ∏ Y_{i} ⊢ Z \\ X ⊢ Z \end{matrix} ⟹ \begin{matrix}{π_{k} \atop X ⊢ Y_{k}} & {π \atop Y_{k} ⊢ Z} \\ X ⊢ Z \end{matrix}

The dual of this rewrite moves the cut above injection and cotupling.

We have now accounted for all the ways in which compound formulas are introduced either on the left or right above a cut and have shown how to move the cut above these rules. Thus, a proof which cannot be rewritten further must have an axiom above the cut on each side. This is an essential cut.

It remains only to show that this process terminates. To show this we use a bag of “cut heights”. In essence, each cut-elimination step removes a cut and replaces it by a finite bag of cuts at a lesser height. This shows that this rewriting terminates. (The technical details will be presented in Section 2 with the proof of the Church–Rosser property for the cut elimination process.)

1.2. Identity derivations. The cut elimination process above introduces a number of proof identifications. All these identifications involve the cut rule as our purpose was to remove it: we shall shortly see that the system has some further proof identifications which do not involve the cut rule.

Our purpose is to view this proof system as a category where cut is the composition. The cut elimination process, above, therefore provides part of the dynamics of composition: the activity which takes place when two proofs are plugged together.

In order to prove that cut acts as a composition we must start by showing that there are identity derivations which behave in the correct manner. We define the identity derivations inductively by:

Atoms: The identity atomic sequent:

A ⊢ A.

Sums: The identity derivation on sums is given by:

\begin{matrix}\{ {ι_{X_{i}} \atop X_{i} ⊢ X_{i}} ; X_{i} ⊢ ∑ X_{i}\} & i \\ ∑ X_{i} ⊢ ∑ X_{i} \end{matrix}

where the identity derivation ι_{X_{i}} of X_{i} ⊢ X_{i} is given by induction on the structure of X_{i}.

Products: The identity on products is given by the dual of the proof above.

1.3. Lemma. The Sequent–Identity and Identity–Sequent cut-elimination reductions are derivable reductions for the general identity derivations as defined above.

\begin{matrix}{π \atop X ⊢ Y} & {ι_{Y} \atop Y ⊢ Y} \\ X ⊢ Y \end{matrix} ⟹ {π \atop X ⊢ Y}

and similarly for the dual rule.

Proof. We shall suppose the identity derivation is on the right; duality covers the other case. We argue by structural induction on the proof π. We assume, therefore that the result is true for any subformula of π.

1. The base case is a cut with an atomic sequent: here cut elimination removes the atomic identity so the result is immediate.

2. Next we suppose the identity is on a sum type:

\begin{matrix}π ; X ⊢ ∑ Y_{i} & ι ; ∑ Y_{i} ⊢ ∑ Y_{i} \\ X ⊢ ∑ Y_{i} \end{matrix}

There are three possibilities for the root inference of π.

(a) If the root inference is a cotupling, the cut elimination step moves the cut onto smaller proofs and so the inductive assumption does the job.

\begin{matrix}\begin{matrix}\left\{{π_{j} \atop X_{j} ⊢ ∑ Y_{i}}\right\} & j∈J \\ ∑ X_{j} ⊢ ∑ Y_{i} \end{matrix} & ι ; ∑ Y_{i} ⊢ ∑ Y_{i} \\ ∑ X_{j} ⊢ ∑ Y_{i} \end{matrix} ⟹ \begin{matrix}\begin{cases}π_{j} ; X_{j} ⊢ ∑ Y_{i} & ι ; ∑ Y_{i} ⊢ ∑ Y_{i} \\ X_{j} ⊢ ∑ Y_{i} \end{cases}\} & j∈J \\ ∑ X_{j} ⊢ ∑ Y_{i} \end{matrix}

(b) The root inference is an injection.

\begin{matrix}{π \atop X ⊢ Y_{i}} ; X ⊢ ∑ Y_{i} & \begin{matrix}\{ {ι \atop Y_{i} ⊢ Y_{i}} ; Y_{i} ⊢ ∑ Y_{i}\} & i∈I \\ ∑ Y_{i} ⊢ ∑ Y_{i} \end{matrix} \\ X ⊢ ∑ Y_{i} \end{matrix} ⟹ \begin{matrix}{π \atop X ⊢ Y_{i}} & {ι \atop Y_{i} ⊢ Y_{i}} \\ X ⊢ Y_{i} \end{matrix} ; X ⊢ ∑ Y_{i}

(c) The root inference is a projection: in this case the cut step immediately moves the identity onto a smaller proof so we are done.

3. Next we suppose the identity is on a product type:

\begin{matrix}π ; Y ⊢ ∏ X_{i} & ι ; ∏ X_{i} ⊢ ∏ X_{i} \\ Y ⊢ ∏ X_{i} \end{matrix}

There are two possibilities for the root inference of π.

(a) The root inference is a tupling:

\begin{matrix}\begin{matrix}\left\{{π_{j} \atop Y ⊢ X_{j}}\right\} & j∈I \\ Y ⊢ ∏ X_{i} \end{matrix} & \begin{matrix}\{ {ι_{i} \atop X_{i} ⊢ X_{i}} ; ∏ X_{i} ⊢ X_{i}\} & i∈I \\ ∏ X_{i} ⊢ ∏ X_{i} \end{matrix} \\ Y ⊢ ∏ X_{i} \end{matrix} ⟹ \begin{matrix}\begin{cases}\begin{matrix}\left\{{π_{j} \atop Y ⊢ X_{j}}\right\} & j∈I \\ Y ⊢ ∏ X_{i} \end{matrix} & {ι_{i} \atop X_{i} ⊢ X_{i}} ; ∏ X_{i} ⊢ X_{i} \\ & Y ⊢ X_{i} \end{cases} \} & i∈I \\ Y ⊢ ∏ X_{i} \end{matrix}

⟹ \begin{matrix}\{ \begin{matrix}{π_{i} \atop Y ⊢ X_{i}} & {ι_{i} \atop X_{i} ⊢ X_{i}} \\ Y ⊢ X_{i} \end{matrix} \} & i∈I \\ Y ⊢ ∏ X_{i} \end{matrix}

(b) The root inference is a projection: here as before we can immediately move the identity onto a smaller proof tree.

1.4. Permuting conversions. In order to obtain a normal form for sequent derivations, we shall want to prove the cut-elimination rewrites are Church–Rosser. However, a brief consideration of these rewrites will show some obviously problematic critical pairs; for example, given a derivation with a cotupling and a tupling immediately above a cut, there are two ways we can reduce the derivation: (Cotupling–Sequent) or (Sequent– Tupling), with no apparent way to resolve these rewrites. So in order to even hope for a Church–Rosser rewrite system, we shall need additional rewrites which allow us to interchange these two rules. Similar considerations for other critical pairs (viz. projection vs. tupling, cotupling vs. injection, and projection vs. injection) lead us to the following four conversions (which we shall denote by [figure]).

• Projection/tuple interchange:

[figure: \begin{matrix}\{ {π_{i} \atop X_{k} ⊢ Y_{i}} ; ∏ X_{j} ⊢ Y_{i}\} & i \\ ∏ X_{j} ⊢ ∏ Y_{i} \end{matrix}; \begin{matrix}\left\{{π_{i} \atop X_{k} ⊢ Y_{i}}\right\} & i \\ X_{k} ⊢ ∏ Y_{i} \end{matrix} ; ∏ X_{j} ⊢ ∏ Y_{i}]

• Cotuple/injection interchange: this is dual to the previous proof equality.

• Projection/injection interchange:

[figure: {π \atop X_{l} ⊢ Y_{k}} ; ∏ X_{j} ⊢ Y_{k} ; ∏ X_{j} ⊢ ∑ Y_{i}; {π \atop X_{l} ⊢ Y_{k}} ; X_{l} ⊢ ∑ Y_{i} ; ∏ X_{j} ⊢ ∑ Y_{i}]

• Tuple/cotuple interchange:

[figure: \begin{matrix}\begin{cases}\left\{{π_{ij} \atop X_{i} ⊢ Y_{j}}\right\} & i \\ ∑ X_{i} ⊢ Y_{j} \end{cases}\} & j \\ ∑ X_{i} ⊢ ∏ Y_{j} \end{matrix}; \begin{matrix}\begin{cases}\left\{{π_{ij} \atop X_{i} ⊢ Y_{j}}\right\} & j \\ X_{i} ⊢ ∏ Y_{j} \end{cases}\} & i \\ ∑ X_{i} ⊢ ∏ Y_{j} \end{matrix}]

1.5. A term calculus. The proof theory of ΣΠ_{A} is intended to be the free category with products and coproducts generated by A. (Note that we are not assuming any sort of distributivity.) It will turn out if we define an equivalence relation on sequent derivations induced by the cut-elimination steps and the conversions above, that this is indeed the case. To this end, it will be convenient to have a more compact notation for sequent derivations: this leads us to impose a system of terms, typed by sequents, which in effect will also give us the categorical semantics for the logic. The term formation rules are given in Table 1.

We shall use the notation ⟨⟩ for the map from the empty sum and () for the map to the empty product.

[figure: \begin{matrix}A ⊢_{1_{A}} A & identity \\ \begin{matrix}\{X_{i} ⊢_{f_{i}} Y \} & i∈I \\ ∑_{i∈I} X_{i} ⊢_{⟨f_{i}⟩_{i∈I}} Y \end{matrix} cotuple & \begin{matrix}\{X ⊢_{f_{i}} Y_{i}\} & i∈I \\ X ⊢_{(f_{i})_{i∈I}} ∏_{i∈I} Y_{i} \end{matrix} tuple \\ X ⊢_{f} Y_{k} ; X ⊢_{b_{k}(f)} ∑_{i∈I} Y_{i} injection & X_{k} ⊢_{f} Y ; ∏_{i∈I} X_{i} ⊢_{p_{k}(f)} Y projection \\ where k ∈ I, I ≠ ∅ \\ \begin{matrix}X ⊢_{f} Y & Y ⊢_{g} Z \\ X ⊢_{f;g} Z \end{matrix} & cut \end{matrix}]

Table 1: ΣΠ term formation rules

There is something still a bit odd from the categorical viewpoint about these terms — namely, the projections and injections seem to be a little unfamiliar in their presentation. This may be “remedied” as follows. Using the notation above, there are projection derivations ∏_{i∈I} X_{i} ⊢_{p_{k}} X_{k} for k ∈ I given by p_{k} = p_{k}(ι_{X_{k}}). With these more “standard” projections, the general projection terms may be identified with p_{i} ; f. Note this is a valid identification, since there is a reduction of derivations

\begin{matrix}X_{k} ⊢ X_{k} ; ∏ X_{i} ⊢ X_{k} & X_{k} ⊢ Y \\ ∏ X_{i} ⊢ Y \end{matrix} ⟹ X_{k} ⊢ Y ; ∏ X_{i} ⊢ Y

Using the terms defined in Table 1, we can summarize the cut-elimination reductions and the permuting conversions as in Table 2. (We omit typing information, since it may be inferred from the terms, and in any case we have displayed these as sequent derivations in the previous subsections.)

Note these come in dual pairs — apart from (11) and (12) which are self-dual — so we have four reductions, one conversion, and their duals, and two other conversions: essentially just 7 rewrites.

We ought to point out that we do allow the index sets I, J to be empty, except for the reductions (3), (4), (7), and (8) and except for the permuting conversion (11); in these cases, since reference is made to an element k or l, it does not make sense for the corresponding index set I or J to be empty. In (9), (10), the index set J for the named element k must not be empty, but the other index set I may be. In (12) either (or both or neither) index set may be empty. An explicit treatment of these nullary cases may be found in Appendix C.

It is an easy exercise to verify that these cut-elimination reductions and permuting

[figure: \begin{aligned}f ; 1 & ⟹ & f & (1) \\ 1 ; f & ⟹ & f & (2) \\ f ; b_{k}(g) & ⟹ & b_{k}(f ; g) & (3) \\ p_{k}(f) ; g & ⟹ & p_{k}(f ; g) & (4) \\ ⟨f_{i}⟩_{i∈I} ; g & ⟹ & ⟨f_{i} ; g⟩_{i∈I} & (5) \\ f ; (g_{i})_{i∈I} & ⟹ & (f ; g_{i})_{i∈I} & (6) \\ b_{k}(f) ; ⟨g_{i}⟩_{i∈I} & ⟹ & f ; g_{k} & (7) \\ (f_{i})_{i∈I} ; p_{k}(g) & ⟹ & f_{k} ; g & (8) \end{aligned}; b_{k}(⟨f_{i}⟩_{i∈I}); ⟨b_{k}(f_{i})⟩_{i∈I}; (9); (p_{k}(f_{i}))_{i∈I}; p_{k}((f_{i})_{i∈I}); (10); b_{l}(p_{k}(f)); p_{k}(b_{l}(f)); (11); (⟨f_{ij}⟩_{i∈I})_{j∈J}; ⟨(f_{ij})_{j∈J}⟩_{i∈I}; (12)]

Table 2: ΣΠ conversion rules

conversions are valid in any category with finite products and coproducts. We shall leave that for the reader, however, and instead concentrate on proving Church–Rosser for the system of cut-elimination rewrites, modulo the conversions.

2. Proof of the Church–Rosser property

We wish to show that, given any two ΣΠ-morphisms related by a series of reductions and permuting conversions

[figure: t_{1}; t_{2}; t_{3}; · · · · · ·; t_{n−2}; t_{n−1}; t_{n}]

there is an alternate way of arranging the reductions and equalities so that t_{1} and t_{n} can be reduced to terms which are related by permuting conversions. This means there is a convergence of the following form:

[figure: t_{1}; ∗; t_{n}; ∗; t′_{1}; ∗; t′_{n}]

When the rewriting system terminates (in the appropriate sense) this allows the decision procedure for the equality of terms to be reduced to the decision procedure for the permuting conversions. In order to test the equality of two terms one can rewrite both terms into a reduced normal form (one from which there are no further reductions). These will be equal if and only if the two reduced forms are equivalent through the permuting conversions alone.

In the current situation the reduction process is the cut elimination procedure. We have already argued informally that it is a terminating process: in this section we will formalize this. In the next section we shall discuss a decision procedure for the permuting conversions.

2.1. Resolving critical pairs locally. The core of the proof of Church–Rosser in this situation involves looking at all the possible critical pairs of reductions and conversions, although there are some significant subtleties in showing that this does actually achieve the desired result. In this subsection we shall show how to resolve all critical pairs of reductions, and likewise all critical pairs consisting of a reduction and a conversion, in such a way that the first rewrite following the conversion (in the latter cases) is a reduction (not a permuting conversion). We shall see in the subsequent subsections that this is sufficient to deduce the existence of normal forms modulo the conversions; once we establish the decision procedure for conversions, this will give us a decision procedure for the equivalence relation induced by the reductions and permuting conversions.

(1) - (2) obvious.

(1) - (4) p_{k}(f ; 1) ⟸ p_{k}(f) ; 1 ⟹ p_{k}(f) is resolved by p_{k}(f ; 1) ⟹ p_{k}(f) (apply reduction (1) inside p_{k}( )).

(1) - (5) is handled similarly.

With the evident dualities, this handles all critical pairs with (1) and (2).

(3) - (4) We indicate the resolution of the critical pair by the following reduction dia-

gram.

[figure: p_{k}(f) ; b_{l}(g); (4); (3); b_{l}(p_{k}(f) ; g); b_{l}((4)); p_{k}(f ; b_{l}(g)); p_{k}((3)); b_{l}(p_{k}(f ; g)); (11); p_{k}(b_{l}(f ; g))]

(3) - (5) is similar, using the conversion (9).

(3) - (9) b_{k}(f ; ⟨g_{i}⟩_{i}) ⟸ f ; b_{k}(⟨g_{i}⟩_{i}) [figure]f ; ⟨b_{k}(g_{i})⟩_{i}

For this critical pair (a reduction vs. a permuting conversion) we have three cases to consider.

Case (i) f = ⟨f_{j}⟩_{j} In this case we can resolve the critical pair as follows.

[figure: ⟨f_{j}⟩_{j} ; b_{k}(⟨g_{i}⟩_{i}); 1;(9); (3); b_{k}(⟨f_{j}⟩_{j} ; ⟨g_{i}⟩_{i}); b_{k}((5)); ⟨f_{j}⟩_{j} ; ⟨b_{k}(g_{i})⟩_{i}; (5); b_{k}(⟨f_{j} ; ⟨g_{i}⟩_{i}⟩_{j}); (9); ⟨f_{j} ; ⟨b_{k}(g_{i})⟩_{i}⟩_{j}; ⟨1;(9)⟩_{j}; ⟨b_{k}(f_{j} ; ⟨g_{i}⟩_{i})⟩_{j}; ⟨f_{j} ; b_{k}(⟨g_{i}⟩_{i})⟩_{j}; ⟨(3)⟩_{j}]

Case (ii) f = b_{j}(f′) In this case, the critical pair resolves itself easily using the reductions (7) and (3), to end up with b_{k}(f′ ; f_{j}) as common reduct.

Case (iii) f = p_{j}(f′) Using reduction (4) we immediately reduce the right hand side to p_{j}(f′ ; ⟨b_{k}(g_{i})⟩_{i}), and then by (9) to p_{j}(f′ ; b_{k}(⟨g_{i}⟩_{i})) and by (3) to

p_{j}(b_{k}(f′ ; ⟨g_{i}⟩_{i})) which converts to b_{k}(p_{j}(f′ ; ⟨g_{i}⟩_{i})) by (11).

(3) - (11) b_{l}(f ; p_{k}(g)) ⟸ f ; b_{l}(p_{k}(g)) [figure]f ; p_{k}(b_{l}(g)) This is resolved in a manner similar to the previous case. Again there are three cases: f = (f_{j})_{j}, f = ⟨f_{j}⟩_{j}, and f = p_{j}(f′), which are resolved as above essentially using (11) in place of (9).

With the evident dualities, this handles all critical pairs with (3) and (4).

(5) - (6)

[figure: ⟨f_{i}⟩_{i} ; (g_{j})_{j}; (5); (6); (⟨f_{i}⟩_{i} ; g_{j})_{j}; ((5))_{j}; ⟨f_{i} ; (g_{j})_{j}⟩_{i}; ⟨(6)⟩_{i}; (⟨f_{i} ; g_{j}⟩_{i})_{j}; (12); ⟨(f_{i} ; g_{j})_{j}⟩_{i}]

(5) - (9) b_{k}(⟨f_{i}⟩_{i}) ; g [figure]⟨b_{k}(f_{i})⟩_{i} ; g ⟹ ⟨b_{k}(f_{i}) ; g⟩_{i} This pair may be divided into three cases.

Case (i): g = ⟨h_{j}⟩_{j} This is resolved by a simple use of (7) and (5).

Case (ii): g = (h_{j})_{j} We have ⟨b_{k}(f_{i}) ; (h_{j})_{j}⟩_{i} ⟹ ⟨(b_{k}(f_{i}) ; h_{j})_{j}⟩_{I} [figure](⟨b_{k}(f_{i}) ; h_{j}⟩_{i})_{j} and b_{k}(⟨f_{i}⟩_{i}) ; (h_{j})_{j} ⟹ (b_{k}(⟨f_{i}⟩_{i}) ; h_{j})_{j} ⟹ (⟨b_{k}(f_{i})⟩_{i} ; h_{j})_{j} ⟹

(⟨b_{k}(f_{i}) ; h_{j}⟩_{i})_{j}.

Case (iii): g = b_{j}(h) This pair may be resolved directly. ⟨b_{k}(f_{i}) ; b_{j}(h)⟩_{i} ⟹ ⟨b_{j}(b_{k}(f_{i}) ; h)⟩_{i} [figure]b_{j}(⟨b_{k}(f_{i}) ; h⟩_{i}) ⟸ b_{j}(⟨b_{k}(f_{i})⟩_{i} ; h) [figure]b_{j}(b_{k}(⟨f_{i}⟩_{i}) ;

h) ⟸ b_{k}(⟨f_{i}⟩_{i}) ; b_{j}(h) .

(5) - (12) (⟨f_{ij}⟩_{i})_{j} ; g [figure]⟨(f_{ij})_{j}⟩_{i} ; g ⟹ ⟨(f_{ij})_{j} ; g⟩_{i} This pair may be divided into three cases.

Case (i): g = p_{k}(h) This is resolved by (8) and (5): ⟨(f_{ij})_{j} ; p_{k}(h)⟩_{i} ⟹ ⟨f_{ik} ; h⟩_{i}

and (⟨f_{ij}⟩_{i})_{j} ; p_{k}(h) ⟹ ⟨f_{kj}⟩_{i} ; h ⟹ ⟨f_{ik} ; h⟩_{i}

Case (ii): g = b_{k}(h) This is resolved by (3) and (5):

(⟨f_{ij}⟩_{i})_{j} ; b_{k}(h) ⟹ b_{k}((⟨f_{ij}⟩_{i})_{j} ; h) [figure]b_{k}(⟨(f_{ij})_{j}⟩_{i} ; h) ⟹ b_{k}(⟨(f_{ij})_{j} ; h⟩_{i})

[figure]⟨b_{k}((f_{ij})_{j} ; h)⟩_{i} ⟸ ⟨(f_{ij})_{j} ; b_{k}(h)⟩_{i}

Case (iii): g = (h_{k})_{k} This is resolved simply with (6) and (12).

With the evident dualities, this handles all critical pairs with (5) and (6).

(7) - (9)

[figure: b_{k}(⟨f_{i}⟩_{i}) ; ⟨g_{j}⟩_{j}; (7); (9); ⟨b_{k}(f_{i})⟩_{i} ; ⟨g_{j}⟩_{j}; (5); ⟨f_{i}⟩_{i} ; g_{k}; (5); ⟨b_{k}(f_{i}) ; ⟨g_{j}⟩_{j}⟩_{i}; ⟨(7)⟩_{i}; ⟨f_{i} ; g_{k}⟩_{i}]

(7) - (11)

[figure: b_{i}(p_{j}(g)) ; ⟨f_{k}⟩_{k}; (7); (11);1; p_{j}(b_{i}(g)) ; ⟨f_{k}⟩_{k}; (4); p_{j}(g) ; f_{i}; (4); p_{j}(b_{i}(g) ; ⟨f_{k}⟩_{k}); p_{j}((7)); p_{j}(g ; f_{i})]

(7) - (12)

[figure: b_{k}(h) ; ⟨(f_{ij})_{j}⟩_{i}; (7); 1;(12); b_{k}(h) ; (⟨f_{ij}⟩_{i})_{j}; (6); h ; (f_{kj})_{j}; (6); (b_{k}(h) ; ⟨f_{ij}⟩_{i})_{j}; ((7))_{j}; (h ; f_{kj})_{j}]

With the evident dualities, this handles all critical pairs with (7) and (8).

To see that this is sufficient to obtain the Church–Rosser property, we must look a little more carefully at rewrite systems modulo equations.

2.2. Confluence modulo equations. We consider the general theory of rewrite systems modulo equations; note that the case we have in mind will have the cut elimination reductions (1)–(8) as “reductions”, and the permuting conversions (9)–(12) as “equations”.

In Huet [Huet 1980] it is proven that a rewrite system modulo equations, which is noetherian (modulo those equations), is confluent modulo equations if and only if it is “locally confluent modulo the equations.” By locally confluent Huet meant that each (one step) divergence of the form

[figure: t_{0}; t_{1}; t_{2}; or; t_{0}; t_{1}; t_{2}]

should have a convergence of the form

[figure: t_{1}; ∗; t_{2}; ∗; t′_{1}; ∗; t′_{2}]

To suit the resolutions of the last section, we shall use a more general form of this result which allows a significantly more permissive form for the resolutions of the divergences. Henceforth, in this paper we shall say that a system is locally confluent modulo equations in case we have the following convergences (respectively) for the two divergences above:

[figure: t_{1}; ∗; t_{2}; ∗; t′; and; t_{1}; t_{2}; ∗; t′_{1}; ∗; t′]

where the new arrow [figure: t_{1}; t_{2}] indicates either an equality or a reduction in the indicated direction. Note that this is precisely our previously noted condition that the rewrite immediately following the equation (in our case, permuting conversion) is a reduction, after which equations or reductions are permitted.

2.3. Proposition. Suppose (N, R, E) is a rewriting system with equations equipped with a measure on the terms α: N [figure] W where W is a well-ordered set and

\xymatrix{t_{1} \ar@{=>}[r] & t_{2}} implies α(t_{1}) > α(t_{2})

[figure: t_{1}; t_{2}] implies α(t_{1}) = α(t_{2}) then the system is confluent modulo equations if and only if it is locally confluent modulo equations.

Notice that this really does subsume Huet’s result, since if the system is noetherian modulo the equations then the well-ordering W can be provided by the quotient of the terms by the equations with respect to the evident reduction ordering. We have chosen to express the result in this form as we shall shortly provide an explicitly measure α for our system.

Proof. If the system is confluent modulo equations it is certainly locally confluent modulo equations. Conversely suppose we have a chain of reductions and equations (as above) then we may associate with it the bag of measures of the terms in the sequence:

[α(t_{1}), α(t_{2}), ....]

These bags are well-ordered under the usual bag ordering [Dershowitz–Manna 1976].

The crux of the argument is to show that replacing any local divergence in this chain by a local confluence will result in a new chain whose bag measure is strictly smaller. However, this can be seen by inspection as we are removing the apex of the divergence and replacing it by the bag of values associated to the terms on the interior of the convergence: these all will have strictly smaller associated α-measures.

Thus, each rewriting reduces this bag ordering and thus any sequence of rewriting on such a chain must terminate. However, it can only terminate when there are no local divergences to resolve. This easily implies that the end result must be a confluence modulo the equations.

In our application of this result α: T [figure]bag(N^{2}) is the map which associates to each ΣΠ-morphism a bag of cut costs. We shall argue that, as each reduction strictly reduces these cut costs while each equality leaves it stationary, this is a criterion of the desired form. The construction of this cost criterion is our next task.

2.4. The cut measure on ΣΠ-morphisms. The measure on the terms in this calculus is forced to be fairly complex because a cut elimination step can duplicate subterms, e.g. reductions (5) and (6). The measure of the cuts in subterms which are duplicated must be reduced even though they may not be directly involved in the reduction step. To further complicate matters we also have to take into account the effect of singleton and empty tuples and cotuples: here reductions (5) and (6) may no longer duplicate subterms but our measure still has to give a strict reduction in these situations.

We shall use two different measures to quantify the cut costs: duplicity and height. The first, roughly speaking, gives an upper bound on the number of times the term can be duplicated in the reduction (or cut elimination) process; the second measures how far the cut is from the leaves. Our aim is to show that the lexicographical combination of these costs is strictly reduced on the principal and on all duplicated cuts, that it is non-increasing on other cuts, and that it is unchanged by equalities.

Theory and Applications of Categories, Vol. 8, No. 5 79

We shall first describe the duplicity cost of a cut. This is calculated in two phases: the first from the leaves downward (synthesized) and the second from the root upward (inherited). In the first phase we calculate the width at each subterm as follows:

• width[a] = 1 where a is an atomic map (or an identity),

• width[⟨f_{i}⟩_{i∈I}] = width[(f_{i})_{i∈I}] = max(∑_{i∈I} width[f_{i}], 1),

• width[b_{k}(f)] = width[p_{k}(f)] = width[f],

• width[f ; g] = width[f] · width[g]. We observe the rewritings and equalities never increase the width of a term:

2.5. Lemma.

(i) If \xymatrix{t_{1} \ar@{=>}[r] & t_{2}} then width[t_{1}] ≥ width[t_{2}], (ii) If [figure: t_{1}; t_{2}] then width[t_{1}] = width[t_{2}]. Proof.

(i) Clearly rewrites (1), (2), (3), and (4) do not affect the width. For rewrite (5) and

the set I non-empty we have:

width[⟨f_{i}⟩_{i∈I} ; g] = width[⟨f_{i}⟩_{i∈I}] · width[g]
= (∑_{i∈I} width[f_{i}]) · width[g]
= ∑_{i∈I}(width[f_{i}] · width[g])
= ∑_{i∈I} width[f_{i} ; g]
= width[⟨f_{i} ; g⟩_{i∈I}]

When the set I is empty the width will decrease when g has significant width. The situation for (6) is the same. For (7) and (8) the width will decrease when the set I is not a singleton and will remain the same otherwise.

(ii) (9), (10), and (11) do not affect the width as they involve the projections and injections. Similarly (12) is a double sum when the sets are non-empty; when either is empty the width is 1.

Next we associate with each subterm of t a duplicity as follows:

• dupl[t] = 1 the duplicity of the whole term is 1,

• If the duplicity of a subterm of the form ⟨f_{i}⟩_{i∈I} or (f_{i})_{i∈I} is n then dupl[f_{i}] = n for each i ∈ I

• If the duplicity of a subterm of the form b_{k}(t′) or p_{k}(t′) is n then dupl[t′] = n.

• If the duplicity of f ; g is n then dupl[f] = n · width[g] and dupl[g] = n · width[f].

Notice that the duplicity of all subterms of a cut-eliminated term is 1 as the only way that duplicity can be increased is through the presence of a cut. We define the duplicity of a cut to be the product of the widths of its subterms with the duplicity:

cutdupl[f ; g] = dupl[f ; g] · width[f] · width[g].

We observe the following:

2.6. Lemma.

(i) If \xymatrix{t_{1} \ar@{=>}[r] & t_{2}} then the bag of the cut duplicities of t_{1} is greater or equal to that of t_{2},

(ii) If \xymatrix{t_{1} \ar@{=>}[r] & t_{2}} is a reduction which duplicates subterms (that is an application of (5) or (6) with the set I having more than one element) then the bag of the cut duplicities of t_{1} is strictly greater than that of t_{2},

(iii) If [figure: t_{1}; t_{2}] then the bag of the cut duplicities of t_{1} is the same as that of t_{2}.

Proof.

(i) Clearly (1) and (2) strictly reduce the bag, (7) and (8) will generally reduce the bag when the set I is not a singleton (but will certainly never increase the bag), and (3) and (4) never affect the bag. This leaves (5) and (6): we shall consider (5) in detail ((6) is dual).

The rewrite is

\xymatrix{⟨f_{i}⟩_{i∈I} ; g \ar@{=>}[r] & ⟨f_{i} ; g⟩_{i∈I}}

Notice that on the left hand side the duplicity of g is

dupl[g] = n · ∑_{i∈I} width[f_{i}]

where n is the duplicity at the root of the rewriting. On the right hand side g occurs in (possibly) multiple places but the duplicity of the cuts in the g in each f_{i} ; g depends multiplicatively on the root duplicity value n · width[f_{i}]. So the sum of the duplicities of these cuts does not change. This in turn means that the bag will not increase, since if there is duplication, each new cut must have strictly lower duplicity (as their sum is invariant).

Finally we must consider the principal cut of the reduction (when I is non-empty):

cutdupl[⟨f_{i}⟩_{i∈I} ; g] = dupl[⟨f_{i}⟩_{i∈I} ; g] · width[⟨f_{i}⟩_{i∈I}] · width[g]
= dupl[⟨f_{i}⟩_{i∈I} ; g] · (∑_{i∈I} width[f_{i}]) · width[g]
= ∑_{i∈I} dupl[⟨f_{i}⟩_{i∈I} ; g] · width[f_{i}] · width[g]
= ∑_{i∈I} dupl[⟨f_{i} ; g⟩_{i∈I}] · width[f_{i}] · width[g]
= ∑_{i∈I} dupl[f_{i} ; g] · width[f_{i}] · width[g]
= ∑_{i∈I} cutdupl[f_{i} ; g]

Which shows that the sum of the duplicity of the introduced cuts does not exceed that of the original cut. Therefore, again the bag of duplicities does not increase.

(ii) It is an easy observation now from the proof of (i) that when the rewrite duplicates terms there is a strict reduction in the bag (as all costs are at least 1).

(iii) Notice that the duplicity of subterms is not affected by any of the equalities.

The other measure we shall use is the height of the cut. The problem with the duplicity is that it may not decrease with a rewriting when there is no duplication of subterms. This means that we need a second measure essentially to catch the case when there is no duplication. We define the height of a term as:

• hgt[a] = 1 where a is an atomic map (or an identity),

• hgt[⟨f_{i}⟩_{i∈I}] = hgt[(f_{i})_{i∈I}] = max{hgt[f_{i}]|i ∈ I} + 1,

• hgt[b_{k}(f)] = hgt[p_{k}(f)] = hgt[f] + 1,

• hgt[f ; g] = max{hgt[f], hgt[g]} + 1.

We then say that the height of a cut is

cuthgt[f ; g] = hgt[f] + hgt[g] 2.7. Lemma.

(i) If \xymatrix{t_{1} \ar@{=>}[r] & t_{2}} then

• hgt[t_{1}] ≥ hgt[t_{2}],

• The height of each non-principal cut does not increase,

• The height of any cut produced from the principal cut is strictly less than the height of the principal cut.

(ii) If [figure: t_{1}; t_{2}] then hgt[t_{1}] = hgt[t_{2}] and the height of each cut in t_{1} and t_{2} is unchanged.

Proof. By inspection the height of a term across a rewrite does not increase. This means that cuts below a redex will not increase their cut height on a rewriting. Similarly, cuts whose terms do not contain the redex of the rewriting will not change cost. Finally observe that the cuts which replace principal cuts always have smaller height.

Now we define α(t) (the measure we actually want!) to be the bag whose elements are, for each cut in t, the pair consisting of the cut duplicity followed by the height. We order these pairs lexicographically. Notice that the lexicographical ordering is a well-ordering and consequently these bags are well ordered.

2.8. Lemma. α: T [figure]bag(N^{2}), as defined above, has the following properties:

\xymatrix{t_{1} \ar@{=>}[r] & t_{2}} implies α(t_{1}) > α(t_{2})

[figure: t_{1}; t_{2}] implies α(t_{1}) = α(t_{2}).

Proof. Clearly the equalities do not affect these bags. The reductions (3), (4), (7), and (8) do not affect the duplicity of any cuts nor do they cause any duplication of subterms. Thus, the number of cuts is unchanged, however, their cut heights are strictly decreased. In (5) and (6) when there is no duplication (the set I is a singleton) the cut heights decrease. When there is duplication (the set I has more than one element) the duplicity of all the cuts affected decrease. When the set I is empty then all the cuts of g (and the principal cut) are removed, thus there is an obvious strict decrease. Similarly as (1) and (2) remove a cut these rules give a strict decrease.

Neither duplicity nor height are affected by the equalities thus these bags are not affected by the equalities.

This completes the proof of the proposition:

2.9. Proposition. ΣΠ_{A} under the rewrites (1) – (8) is confluent modulo the equations (9) – (12).

3. Deciding the ΣΠ-conversions

From the above, it is clear that given any two derivations, deciding their equivalence (or equality in the term model category) reduces to deciding equivalence of cut-free proofs. To this end, we must replace any cuts involving atomic formulas with the atomic sequents given by the appropriate composition in the generating category A. In effect this makes the decision procedure a relative one depending on a decision procedure for A.

We have two graphically-inspired approaches to this decision procedure. We shall present one here, which allows further generality and so seems superior; further, it easily allows an interpretation in a compositional variant of Blass games, where the types are thought of as 2–player input–output games, and the terms as strategies (or also as single-channel communications between processes). An alternate approach is presented in Appendix B. It is also possible to orient the conversions (left to right as presented above) to have a Church–Rosser system. This is discussed in Appendix A.

Before proceeding to a detailed presentation of the decision procedure, it will perhaps be helpful to consider the process graphically, with an example. The decision procedure operates on pairs of terms representing cut-free derivations of a given sequent. We use one term as a “template” for transforming the other term into one of the same shape. The key idea is to try to force the second term to start with the same proof rule as the template; if this is possible, then proceed inductively with the subterms. If this fails then the two terms are not equivalent. By using one term as a template in this manner one provides an order to the search for the conversions which can make the terms equivalent.

This can be described using the term calculus displayed above, but is clearer with a simple graphical representation of the terms along the following lines. With a term we can associate a term-graph, whose nodes represent the subterms of the term. We shall denote tupling by a black triangle, which has “output” edges for each component of the tuple, and cotupling by similar white triangles. We shall denote projections by decorated black boxes, the decoration indicating which component is being projected; similar white boxes denote injections. Atomic sequents will be represented by oval nodes containing the atomic term, as will identities on atomic formulas.

With these conventions, the four permuting conversions may be represented by the following graph equivalences.

[figure: i; i; ⋯; i; ⋯; i; ▲; i; ⋯; ▲; i; ⋯]

[figure: ▲; ▲; ▲; ⋯; ⋯; ⋯; ⋯; ⋯; ⋯; f_{11}; f_{1n}; f_{m1}; f_{mn}; f_{11}; f_{m1}; f_{1n}; f_{mn}; i; i; j; j]

To illustrate the graphical representation, the derivation (1) at the start of the paper can be represented either by the term ⟨(p_{1}(ι_{A}), p_{2}(b_{1}(ι_{B}))) , (p_{1}(ι_{A}), b_{2}(p_{2}(ι_{C})))⟩, or equivalently by the following graph on the left, where for simplicity we have indicated the injection and projection indices by an output edge sloped to the left or the right. Note that clearly the graph is a quite direct representation of the derivation tree.

[figure: ι_{A}; ι_{A}; ι_{B}; ι_{C}; ▲; ▲; ι_{A}; ι_{A}; ι_{B}; ι_{C}; ▲]

Notice that the derivation (1) at the start of the paper is equivalent to the following derivation:

\begin{matrix}\begin{matrix}{A ⊢ A \atop A × B ⊢ A} & {A ⊢ A \atop A × C ⊢ C} \\ (A × B) + (A × C) ⊢ A \end{matrix} & \begin{matrix}{B ⊢ B \atop A × B ⊢ B} ; A × B ⊢ B + C & {C ⊢ C \atop C ⊢ B + C} ; A × C ⊢ B + C \\ (A × B) + (A × C) ⊢ B + C \end{matrix} \\ (A × B) + (A × C) ⊢ A × (B + C) \end{matrix}

which is given by the term (⟨p_{1}(ι_{A}), p_{1}(ι_{A})⟩, ⟨b_{1}(p_{2}(ι_{B})), p_{2}(b_{2}(ι_{C}))⟩), or equivalently by the graph on the right above.

We shall illustrate the decision procedure with this example. Take the left graph as template. The first step in the procedure is to see if the graph on the right can start the same way as the graph on the left. This means we have to move a white triangle up into the topmost level. We search down the paths of the right tree until we find a white triangle that can be moved upwards in the necessary manner — in this case we quickly find one at the second level. Moving it up gives us the graph on the left below.

[figure: ι_{A}; ι_{A}; ι_{B}; ι_{C}; ▲; ▲; ι_{A}; ι_{A}; ι_{B}; ι_{C}; ▲; ▲]

Moving down a level we repeat (inductively) the process for all subtrees starting at second level nodes. Of course in this case this is already done, so we proceed down to the third level, where we check the subtrees left to right (say). The first node is “correct” but the second is not — we must move a black (projection) box up into this position, replacing the white (injection) box. Looking down the path(s) from this node, we search for the first black box which can be moved up — we find it one level down, and so move it up, which produces the tree at the right above. The third node is correct, so we turn to the last node. This requires a move of a white box up into the third level, analogous to the previous move; this produces the required graph, (i.e. we have transformed the original right graph into the “template” graph), and so completes the proof that the two original derivations are equivalent. In general, the decision procedure proceeds in this recursive manner.

3.1. Deciding the conversions: the details. A term is Π-inert if it can be built inductively by the rules:

• A variable x_{1}, ... is Π-inert,

• b_{k}(t) is Π-inert whenever t is Π-inert,

• (t_{i})_{i∈I} is Π-inert whenever each t_{i} is Π-inert.

Similarly a term is Σ-inert if it can be built inductively by the rules:

• A variable x_{1}, ... is Σ-inert,

• p_{k}(t) is Σ-inert whenever t is Σ-inert,

• ⟨t_{i}⟩_{i∈I} is Σ-inert whenever each t_{i} is Σ-inert.

We observe:

3.2. Lemma. If t is a Π or Σ-inert term then there is no equality which applies to it.

The result is immediate as the redex for an equality always involves a mixture of Σ-inert and Π-inert structure. Of course, this is the point of inert terms!

Let C be the constructors b_{k}( ), p_{k}( ), ⟨ ⟩_{i∈I}, or ( )_{i∈I}, We shall say that a term starts with constructor C in case the first constructor in the term is C.

If t is a term the C-prefix of t, prefix_{C}[t], is defined as:

• If t starts with C then prefix_{C}[t] = (where is the “anonymous” variable, that is a distinct variable which has not been used before and will not be used again).

• If t does not start with C then:

– if t = b_{k}(t′) then prefix_{C}[b_{k}(t′)] = b_{k}(prefix_{C}[t′]),

– if t = p_{k}(t′) then prefix_{C}[p_{k}(t′)] = p_{k}(prefix_{C}[t′]),

– if t = ⟨t_{i}⟩_{i∈I} then prefix_{C}[⟨t_{i}⟩_{i∈I}] = ⟨prefix_{C}[t_{i}]⟩_{i∈I},

– if t = (t_{i})_{i∈I} then prefix_{C}[(t_{i})_{i∈I}] = (prefix_{C}[t_{i}])_{i∈I}.

3.3. Lemma. Suppose t starts with constructor C then in any series of equalities

[figure: t; t_{1}; t_{2}; ..............; t_{n−2}; t_{n−1}; t_{n}] ,

the C-prefix of each t_{i} is (either Π or Σ) inert.

Proof. We shall say the C-frontier of a term with a C-prefix is those first occurrences across the term of the constructor C. Thus the C-frontier is the last constructor (necessarily C) of the C-prefix. Suppose that t = b_{k}(t′) and t_{i} = w[b_{k}(t_{1})/x_{1}, b_{k}(t_{2})/x_{2}, ...] where w is Σ-inert. Either [figure: t_{i}; t_{i+1}] is an application of an equality at the b_{k}( )-frontier of the inert term w or beyond. If it is beyond the frontier then prefix_{b_{k}( )}[t_{i}] = prefix_{b_{k}( )}[t_{i+1}]; if it is on the frontier either it moves structure out of the inert term by shrinking the frontier (in which case prefix_{b_{k}( )}(t_{i+1}) is certainly still inert (if smaller)), or it moves structure in to the prefix by expanding the frontier. However, only Σ-inert structure can be moved over b_{k}( ), so again prefix_{b_{k}( )}[t_{i+1}] is Σ inert.

Similar arguments hold for the remaining constructors.

In a series of equalities emanating from a term which starts with C we may distinguish the steps which increase the C-inert prefix, [figure: t_{i}] t_{i+1}, those which decrease the C-inert prefix, [figure: t_{i}]t_{i+1}, and those steps which do not affect the C-inert prefix, [figure: t_{i}]t_{i+1}.

3.4. Lemma.

[figure: t_{i}; α; t_{i+1}; β; t_{i+2}]

can be rearranged as

t_{i} [figure: β′]t′_{i+1} [figure: α′] t_{i+2}.

Proof. The redex of β cannot be within the inert tree, nor by assumption is it on the frontier. Thus, it must be independent of α: so the equalities can be rearranged.

This means that we can rearrange the steps in any proof of equality so that no C-inert prefix-increasing step happens before a step which does not affect the inert prefix. However, we cannot take these increasing steps past an inert prefix-decreasing step. However, a decreasing step is only possible if there has already been the corresponding (reverse) increasing step. However, this means we can cancel the decreasing step with the increasing step. We conclude:

3.5. Lemma. In any series of steps

t [figure: ∗]t_{1} [figure: {∗ \atop α}] t_{2} [figure: β]t_{3}

where the starting construct of t determined the direction indicated on the arrows the decreasing step β can be cancelled.

This means:

3.6. Proposition. Any proof of equality from t to t′ can be rearranged as

t [figure: {∗ \atop α}]t_{1} [figure: {∗ \atop β}] t′

where the initial equalities do not touch the root constructor.

Notice that the second part of this proof, β, is essentially unique. There can be independent expansions of the inert frontier which can be reordered but every proof must do the same expansions. Notice that this part of the proof β can be read in reverse as a procedure which pulls the root structure of t to the root of t′.

3.7. Lemma.

(i) The structure C = b_{k}( ) or C = ( ) can be pulled to the root of t if and only if the C-prefix of t is Σ-inert,

(ii) The structure C = p_{k}( ) or C = ⟨ ⟩ can be pulled to the root of t if and only if the C-prefix of t is Π-inert.

Proof. We have already observed that such a pulling up process results in an inert prefix (of the appropriate sort). Conversely given an inert prefix of the appropriate sort clearly means that that C-frontier can be contracted.

Thus, we can test quite easily to see whether the last stage in this proof is possible. Because the equalities in the first part of this proof, α, do not touch the root constructor each equality must apply to one of the arguments of that constructor. Thus, for each argument we then have an equality proof: but each of these proofs can now be “normalized” into the form of the corollary. This gives us a normal form for (directed) equality proofs and whence an algorithm for determining equality which amounts to trying to grow such a proof by progressively matching the structure of t starting from the root by pulling up that structure to the root of the second term.

Let us call the procedure to pull a constructor up to the top of a term pullup(C,t): it will return success(t') if the constructor can be pulled up and fail otherwise. We shall schematically represent a term with the construction C at the root by C(t1,..,tn). We then have:

3.8. Algorithm. The following algorithm determines whether t = t′ with respect to the ΣΠequalities:

def PSequel(C(t_1,...,t_n),t') =
            (case pullup(C,t') of
                     success(C(t'_1,..,t'_n)) => PSequal(t_1,t'_1)
                                                 and ... and PSequal(t_n,t'_n)
                   | fail => false )
  | PSequal(atom(t),atom(t')) = atomequal(t,t')

The fact that proofs of equality have the normal form discussed above suffices to show that this algorithm is correct.

4. Categorical semantics

We now wish to establish that ΣΠ_{A} is a category; note that in particular, we have neither assumed nor shown that the composition given by cut is associative. In this section we shall establish this and show that ΣΠ_{A} is the free category with products and coproducts generated by A. Following Joyal, we will summarize this by a “Whitman theorem” which characterizes the free category with products and coproducts up to equivalence.

The main logical result that allows all these results to follow, more or less as immediate corollaries, is the following consequence of cut elimination.

4.1. Proposition. In ΣΠ_{A}:

(i) Any cut-free derivation of a sequent ∑ X_{i} ⊢ Y is equivalent to one whose principal rule is cotupling,

(ii) Any cut-free derivation of a sequent X ⊢ ∏ Y_{j} is equivalent to one whose principal rule is tupling,

(iii) Any cut-free derivation of a sequent ∏ X_{i} ⊢ ∑ Y_{j} has its principal rule either a projection or an injection,

(iv) Any cut-free derivation of a sequent A ⊢ ∑ Y_{j}, where A is an atom, has its principal rule an injection,

(v) Any cut-free derivation of a sequent ∏ X_{i} ⊢ A, where A is an atom, has its principal rule a projection.

(vi) Any cut-free derivation of a sequent A_{1} ⊢ A_{2}, where A_{1} and A_{2} are atoms, must be an axiom ( i.e. a morphism of A).

Notice that this result can be extended to arbitrary derivations (not only cut-free ones) using the cut elimination procedure. For example, any derivation of a sequent ∑ X_{i} ⊢ Y can be transformed to one whose principal rule is cotupling.

Proof. The last four statements are immediate from an inspection of which (non-cut) sequent rules could be applied to the given situation. The first two statements are dual, and so it suffices to prove the first statement.

We shall argue by induction on the structure of the second formula, Y.

• If Y is an atom then the only rule which can be applied is the cotuple rule, so this must be the principal rule.

• If Y = ∏_{j∈I} Y_{j} then the principal rule of the derivation must either be a cotupling or a tupling. If it is a tupling

\begin{matrix}\{ ∑ X_{i} ⊢ Y_{j}\} & j∈J \\ ∑ X_{i} ⊢ ∏_{j∈J} Y_{j} \end{matrix} tuple

then, using our inductive hypothesis, the proofs above this may be transformed to have cotupling as their principal rules. This allows us to use (12) to transform the derivation so that cotupling is the principal rule for the original proof.

• If Y = ∑_{j∈J} Y_{j} then the principal rule of the derivation must either be a cotupling or an injection. If it is an injection

∑ X_{i} ⊢ Y_{k} ; ∑ X_{i} ⊢ ∑_{j∈J} Y_{j} injection

then by induction the proof above may be transformed to have its principal rule a cotupling. However, this allows us to use (9) to transform the cotupling into the principal rule for the whole proof.

4.2. Associativity of cut. The reduction rules and the permuting conversions together define an equivalence relation (which we shall denote ∼) on derivations of a sequent. Our categorical semantics will have derivations modulo this equivalence as morphisms. We have already established that there are identity morphisms (Lemma 1.3); now we can use Proposition 4.1 to establish that the composition given by cut is associative. (The analogous result for several related systems is established by Dos̆en in [Dos̆en 1999].)

4.3. Lemma. Given derivations W ⊢_{f} X, X ⊢_{g} Y, Y ⊢_{h} Z, the derivations W ⊢_{(f;g);h} Z and W ⊢_{f;(g;h)} Z are ∼–equivalent.

Proof. We prove this by structural induction on f, g, h; without loss in generality we may assume f, g, h are all cut-free.

Case i: W = ∑ W_{i} and f = ⟨f_{i}⟩_{i}. In this case note that (f ; g) ; h [figure] (⟨f_{i} ; g⟩_{i}) ; h [figure] ⟨(f_{i} ; g) ; h⟩_{i} and f ; (g ; h) [figure] ⟨f_{i} ; (g ; h)⟩_{i} and so by induction these are equivalent. Note that the case where Z = ∏ Z_{i} and h = (h_{i})_{i} is dual. Since any derivation of a sequent ∑ W_{i} ⊢ X may be written equivalently to end with a cotuple, if W = ∑ W_{i} we are done. Similarly if Z = ∏ Z_{i} we may suppose h is a tuple, and so we are done.

Case ii: W = ∏ W_{i} and f = p_{k}(f′). In this case (f ; g) ; h [figure] p_{k}(f′ ; g) ; h [figure] p_{k}((f′ ; g) ; h) and f ; (g ; h) [figure] p_{k}(f′ ; (g ; h)) and again these are equivalent by induction. The case where Z = ∑ Z_{i} and h = b_{i}(h′) is dual.

Case iii: W = ∏ W_{i}, X = ∑ X_{j} and f = b_{k}(f′). Here we may suppose that g = ⟨g_{j}⟩_{j} (since X is a sum), so (f ; g) ; h [figure] (f′ ; g_{k}) ; h and f ; (g ; h) [figure] b_{k}(f′) ; ⟨g_{j} ; h⟩_{j} [figure] f′ ; (g_{k} ; h) so by induction these are equivalent. The case where h = p_{k}(h′) is dual.

Case iv: W = ∏ W_{i}, X = ∏ Y_{j} and f = (f_{i})_{i}. Here we consider two subcases: (a) g = b_{k}(g′) (and so Y = ∑ Y_{l} and we may suppose that h = ⟨h_{l}⟩_{l}), and (b) g = (g_{j})_{j} (and then the only case we need worry about is if h = p_{k}(h′), since we have done the other possible cases).

In case (a), (f ; g) ; h [figure] b_{k}(f ; g′) ; ⟨h_{l}⟩_{l} [figure] (f ; g′) ; h_{k} and f ; (g ; h) [figure] f ; (g′ ; h_{k}) and so by induction these are equivalent.

In case (b) (f ; g) ; h [figure] (f ; g_{j})_{j} ; p_{k}(h′) [figure] (f ; g_{k}) ; h′ and f ; (g ; h) [figure] f ; (g_{k} ; h′) and so by induction these are equivalent.

This concludes all the essential cases; if any of W, X, Y, Z are atomic, a quick check of the possibilities will show that one ends up with a case essentially just like one of the cases above. So this concludes the proof.

We can now immediately conclude the following.

4.4. Proposition. ΣΠ_{A} is a category, whose objects are the formula of the logic, and whose morphisms are ∼–equivalence classes of derivations.

4.5. Categorical products and coproducts. Clearly ΣΠ_{A} is a category which has additional structure: namely finite products and coproducts. Moreover, this additional structure is free. These facts are direct corollaries of Proposition 4.1.

4.6. Proposition. ΣΠ_{A} is the free category generated from A with finite products and coproducts.

There is a potential set-theoretic problem concerning the size of ΣΠ_{A} since the index sets for the products and coproducts are arbitrarily chosen. This is a side-effect of our somewhat non-traditional syntax (presentation) for finite sums and products. We shall take the view that there is a small way of specifying “all” the finite sets so that these size problems do not arise and to say a category has all finite coproducts and products is to say that there is a specified method of getting from these finitely indexed sets of objects to their products and coproducts. Essentially this means that freeness can be given “on the nose” rather than up to equivalence.

Proof. First we must establish that ΣΠ_{A} has the necessary products and coproducts. To do this we shall use Proposition 4.1 to establish the necessary hom-set bijections:

Hom (∑_{i∈I}X_{i}, Y ) ≅ ∏_{i∈I} Hom(X_{i}, Y) and Hom (X, ∏_{i∈I}Y_{i}) ≅ ∏_{i∈I} Hom(X, Y_{i})

where ∏_{i} H_{i} (for sets H_{i}) is the product in the category of sets. We know each morphism in Hom(∑_{i∈I} X_{i}, Y) can be expressed in a cut free manner so that the principal rule is a cotupling. With this presentation of the morphism we may associate a morphism of ∏_{i∈I} Hom(X_{i}, Y). We must show that this correspondence respects the equivalence relation ∼. However, this is actually immediate from our decision procedure since, once the cotuple structure is made principal, equality is determined by equality of the arguments. The inverse of this correspondence is provided by cotupling derivations. This therefore provides the desired bijection. It remains to establish that it is natural in Y: this, however, is immediate in view of (5). Products are treated dually. Thus, ΣΠ_{A} has coproducts and products.

To show that ΣΠ_{A} is the free category generated from A with coproducts and products it suffices to observe that all the identities (1) – (12) must hold in any category with coproducts. This we have already observed is an easy exercise which we leave to the reader.

The coproducts and products of ΣΠ_{A} satisfy a further important property.

4.7. Lemma. (Softness of finite sums and products) The following diagram is a pushout in the category of sets.

\xymatrix{∑_{ij} Hom(X_{i}, Y_{j}) \ar[r] \ar[d] & ∑_{i} Hom (X_{i}, ∑_{j} Y_{j}) \ar[d] \\ _{∑_{j} Hom ( ∏_{i} X_{i}, Y_{j})} \ar[r] & _{Hom (∏_{i} X_{i}, ∑_{j} Y_{j})}}

Proof. This is almost immediate from Proposition 4.1: the necessary identification of derivations of ∏_{i} X_{i} ⊢ ∑_{j} Y_{j} whose last step was an injection with those whose last step was a projection needs the permuting conversion (11).

This property is called “softness” by Joyal [Joyal 1995, and other references]. Here we are using the version suitable for finite products and coproducts rather than for arbitrary colimits and limits. This was an essential component in establishing what Joyal called a “Whitman theorem”; we follow Joyal’s lead in paying tribute to [Whitman 1941], who established the lattice case of the theorem. This result is, in a strong sense, a categorical formulation of cut-elimination.

4.8. Theorem. ΣΠ_{A} has the following properties:

• ΣΠ_{A} is “soft”, meaning that it satisfies Corollary 4.7.

• For any atomic A,

Hom(A,_{∑j}Y_{j}) ≅ ∑_{j} Hom(A, Y_{j}) and Hom(_{∏i}X_{i}, A) ≅ ∑_{i} Hom(X_{i}, A)

• ΣΠ_{A} is generated by A under finite sums and products.

• The inclusion A [figure: ; i] ΣΠ_{A} is full and faithful. Moreover, these properties characterize A [figure: ; i] ΣΠ_{A} up to equivalence of categories. Proof. It is clear from the above that ΣΠ_{A} satisfies these properties. So suppose that A [figure: F] B also satisfies the properties. Freeness guarantees that there is a comparison functor ΣΠ_{A} [figure: F^{∗}] B, and it follows from cut-elimination (in particular, from Proposition 4.1 — this is essentially Joyal’s main argument) that F^{∗} must be full, faithful, and essentially surjective. We sketch the argument.

F^{∗} is full, because any b: F^{∗}(X) [figure] F^{∗}(Y) can be “decomposed” into a “ΣΠ-word” of simpler functions, depending on the form of F^{∗}(X) and F^{∗}(Y), using the Whitman properties (the hypothesis of the theorem). Then by induction the simpler functions must be in the image of F^{∗}, and since F^{∗} preserves sums and products we can use the same ΣΠ-word to place b in the image of F^{∗}. (A formal proof by induction can be constructed along these lines.)

To show F^{∗} faithful, consider a parallel pair of arrows F^{∗}(f), F^{∗}(g): F^{∗}(X) [figure] F^{∗}(Y) so that F^{∗}(f) = F^{∗}(g): as above we can decompose F^{∗}(f) and F^{∗}(g) into words. Since F^{∗}(f), F^{∗}(g) are typed the same, both are decomposed into different substitution instances of the same ΣΠ-word. Since F^{∗} is full, these words involve simpler functions of the form F^{∗}(h). By induction the corresponding subterms h are equal, and so then too f = g.

To see that F^{∗} is essentially surjective, notice that since B is generated from A, each object of B is isomorphic to an object in the image of F^{∗}.

Appendices

A. The equivalences as rewrites

In Section 3 we gave a decision procedure for the ΣΠ conversions, in a fashion that maintained the symmetry of the logic. Following a suggestion of Luigi Santocanale, we also note that it is possible to orient the conversions as rewrites, in a manner that produces a confluent and terminating rewrite system. These rewrites are given as follows.

[figure: \begin{aligned}b_{k}(⟨f_{i}⟩_{i∈I}) & ⟹ & ⟨b_{k}(f_{i})⟩_{i∈I} \\ (p_{k}(f_{i}))_{i∈I} & ⟹ & p_{k}((f_{i})_{i∈I}) \\ b_{l}(p_{k}(f)) & ⟹ & p_{k}(b_{l}(f)) \\ (⟨f_{ij}⟩_{i∈I})_{j∈J} & ⟹ & ⟨(f_{ij})_{j∈J}⟩_{i∈I} \end{aligned}]

These are slightly unsatisfactory, in that they do not respect the symmetry we have been emphasizing, but since they do not have any critical pairs among themselves, and introduce no intractable critical pairs when combined with the cut elimination rewrites, they do lead to a very simple decision procedure. Note that since they do not exhibit the sum–product symmetry, they can be dualized to produce another such rewrite system. It would be nice to see one or the other of these systems arise from natural logical considerations such as produced the other rewrites.

B. Cellular Squares

In this section we illustrate a second alternate approach to deciding equivalence of derivation terms (in the cut-free case only), which was suggested to the authors by Peter Selinger. We do this by introducing an alternate presentation of these terms, one which is particularly good at catching the identities (9, 10, 11, 12). This method does not seem to be able to handle the units 0 and 1 however; a similar disadvantage occurred with Girard’s approach [Girard 1995], an approach that seems to have some connections with these cellular squares.

Atomic derivations will be represented by labelled squares. We then introduce four operations on arrays of rectangular cells as illustrated in Figure 1.

Some notes concerning Figure 1: we have illustrated only the binary case, since it allows some simplifications. In general, we would have to decorate the shaded vertical and horizontal bars to indicate which projection is involved — here we have indicated that by shading to the left (for the first projection) or to the right (for the second projection), and similarly for the injections. Likewise we would concatenate more rectangles for tupling and cotupling. Notice also that the dimensions of the cells provide clues as to what operations have been applied — these are not topological diagrams, invariant under stretching. The shaded bars are placed inside the rectangles concerned, whereas the concatenated cells are placed adjacent to one another. This may be illustrated by the cellular “square” in Figure 2, which represents the derivation (1) at the beginning of the paper, or equivalently, the term ⟨(p_{1}(ι_{A}), p_{2}(b_{1}(ι_{B}))) , (p_{1}(ι_{A}), b_{2}(p_{2}(ι_{C})))⟩. Note that the lower two squares have horizontal bars, since they are injections (as well as projections — all four squares have vertical bars).

Of course, we must then also describe the permuting conversions — these are listed in Figures 3, 4. We have illustrated only some cases — in the cases of Equations (9), (10), there is a restriction that the same projection (or injection) must be involved on each side of the equation. In Equation (11), any projections (or injections) may be involved. In these four equations, we have exaggerated the joins to indicate the order of the operations concerned.

Since it is clear that once drawn, these conversions really are identities (one can no longer distinguish the order in which the relevant operations were applied), it is clear that equivalent terms will have the same cellular square representation. But the converse is also true: if one considers the various pairs of operations that may be applied in building

[figure: X; X; X; X; X; p_{0}(f) =; b_{0}(f) =; p_{1}(f) =; b_{1}(f) =; f =; Given; define]

X f = Given  define Y g =  X  Y X  Y ⟨f, g⟩ =(f, g) =

Figure 1: Cellular Squares

[figure: C; B; A; A; ⟨(p_{1}(ι_{A}), p_{2}(b_{1}(ι_{B}))), (p_{1}(ι_{A}), b_{2}(p_{2}(ι_{C})))⟩]

Figure 2: An example of a cellular “square”

up a cellular square, it will be apparent that the only cases where there is any ambiguity are the four considered here, and so if two terms with the same type have the same cellular square representation, they must indeed be equivalent. Note the restriction that the terms have the same type is necessary, with the presentation given here: for example, ⟨p_{i}(f), g⟩ and p_{i}(⟨f, g⟩) might both be represented by a pair of squares, one on the left with a vertical bar, and its neighbour on the right without a bar. These terms are differently typed, however, and so cannot be equal. This ambiguity is caused by the fact that the scope of the bars is only half indicated; we could amplify the notation by including some marker for the other half of the scope, but this seems an unnecessary complication since this representation of terms need only be applied once the terms are known to have the same type.

C. The nullary cases

There may be some confusion about how to apply our term calculus and the reductions and permuting conversions in the case I = ∅: we make those special cases explicit here. In the following, we use the abbreviations ∑_{∅} = 0 and ∏_{∅} = 1.

First, the nullary versions of cotupling and tupling:

0 ⊢_{⟨⟩} Y cotuple  X ⊢_{()} 1 tuple

In fact, the notation here could be improved: although with the typing the notation is unambiguous, adding the typing to the terms makes it easier to read them as free-standing entities. So we shall write the terms above as ⟨⟩_{Y} and ()_{X} respectively.

[figure: X; X; Y; X; Y; X; X; X; =; =; Equation (9); Equation (10)]

Figure 3: Permuting conversions (9), (10)

[figure: W; X; X; X; Y; Z; W; X; Y; Z; =; =; Equation(11); Equation (12)]

Figure 4: Permuting conversions (11), (12)

There are two reductions that are relevant to this setting, corresponding to the cases of (5) and (6) where I = ∅. Given terms f: X ⊢ Y and g: Y ⊢ Z we have the following reductions. (To aid the reader, we indicate the typing, though it may be deduced easily from the terms.)

\begin{aligned}⟨⟩_{Y} ; g & ⟹ & ⟨⟩_{Z} & : 0 ⊢ Z & (5) \\ f ; ()_{Y} & ⟹ & ()_{X} & : X ⊢ 1 & (6) \end{aligned}

In addition there are five permuting conversions, corresponding to the cases of (9) and (10) when I = ∅, and to three variants of (12), corresponding to the cases when only I = ∅, only J = ∅, and both I = J = ∅.

[figure: b_{k}(⟨⟩_{X_{k}}); ⟨⟩_{Σ_{J} X_{j}}; : 0 ⊢ ∑_{J} X_{j}; (9); ()_{Π_{J} X_{j}}; p_{k}(()_{X_{k}}); : ∏_{J} X_{j} ⊢ 1; (10); (⟨⟩_{Y_{j}})_{j∈J}; ⟨⟩_{Π_{J} Y_{j}}; : 0 ⊢ ∏_{J} Y_{j}; (12); ()_{Σ_{I}X_{i}}; ⟨()_{X_{i}}⟩_{i∈I}; : ∑_{I} X_{i} ⊢ 1; (12); ()_{0}; ⟨⟩_{1}; : 0 ⊢ 1; (12)]

With the reductions above, these are all (of course) special cases of the axioms (which we do not need to explicitly add) f = ⟨⟩_{Y} and g = ()_{X} for f: 0 ⊢ Y and g: X ⊢ 1. These follow from the reductions and conversions given here, in view of our “Whitman theorem”.

References

[Blute et al. 1996] R.F. Blute, J.R.B. Cockett, R.A.G. Seely, and T.H. Trimble (1996) Natural deduction and coherence for weakly distributive categories. Journal of Pure and Applied Algebra 113 229–296.

[Dershowitz–Manna 1976] N. Dershowitz, Z. Manna (1976) Proving termination with multiset orderings. Comm. of the ACM 22, No. 8 (465–475).

[Dos̆en 1999] K. Dos̆en (1999) Cut Elimination in Categories. Trends in Logic 6, Kluwer Academic Pub.

[Girard 1987] J.-Y. Girard (1987) Linear logic. Theoretical Computer Science 50 1–102.

[Girard 1995] J.-Y. Girard (1995) Proof-nets: the parallel syntax or proof-theory. In Logic and Algebra, New York, Marcel Dekker.

[Huet 1980] G. Huet (1980) Confluent reductions: abstract properties and applications to term rewriting systems. JACM 27, No. 4 (797–821).

[Joyal 1995] A. Joyal (1995) Free bicompletion of enriched categories. Math. Reports XVII, Acad. Sci. Canada, 213–218.

[Lambek–Scott 1986] J. Lambek and P.J. Scott (1986) Introduction to Higher-Order Categorical Logic. Cambridge studies in advanced mathematics 7, Cambridge University Press.

[Santocanale 1999] L. Santocanale (1999) Sur les μ-treillis libres. Ph.D. Thesis, Université de Québec à Montréal.

[Whitman 1941] P.M. Whitman (1941) Free lattices. Ann. of Math. 42, 325–330.

Department of Computer Science, University of Calgary, 2500 University Drive, Calgary, AL, T2N 1N4, Canada. Department of Mathematics, McGill University, 805 Sherbrooke St., Montréal, PQ, H3A 2K6, Canada.

Email: robin@cpsc.ucalgary.ca and rags@math.mcgill.ca

This article may be accessed via WWW at http://www.tac.mta.ca/tac/ or by anony-

mous ftp at ftp://ftp.tac.mta.ca/pub/tac/html/volumes/8/n5/n5.{dvi,ps}

THEORY AND APPLICATIONS OF CATEGORIES (ISSN 1201-561X) will disseminate articles that significantly advance the study of categorical algebra or methods, or that make significant new contributions to mathematical science using categorical methods. The scope of the journal includes: all areas of pure category theory, including higher dimensional categories; applications of category theory to algebra, geometry and topology and other areas of mathematics; applications of category theory to computer science, physics and other mathematical sciences; contributions to scientific knowledge that make use of categorical methods.

Articles appearing in the journal have been carefully and critically refereed under the responsibility of members of the Editorial Board. Only papers judged to be both significant and excellent are accepted for publication.

The method of distribution of the journal is via the Internet tools WWW/ftp. The journal is archived electronically and in printed paper format.

Subscription information. Individual subscribers receive (by e-mail) abstracts of articles as they are published. Full text of published articles is available in .dvi, Postscript and PDF. Details will be e-mailed to new subscribers. To subscribe, send e-mail to tac@mta.ca including a full name and postal address. For institutional subscription, send enquiries to the Managing Editor, Robert Rosebrugh,

rrosebrugh@mta.ca.

Information for authors. The typesetting language of the journal is TEX, and LaTEX is the preferred flavour. TEX source of articles for publication should be submitted by e-mail directly to an appropriate Editor. They are listed below. Please obtain detailed information on submission format and style files from the journal’s WWW server at http://www.tac.mta.ca/tac/. You may also write to tac@mta.ca to receive details by e-mail.

Editorial board.

John Baez, University of California, Riverside: baez@math.ucr.edu Michael Barr, McGill University: barr@barrs.org, Associate Managing Editor Lawrence Breen, Université Paris 13: breen@math.univ-paris13.fr Ronald Brown, University of North Wales: r.brown@bangor.ac.uk Jean-Luc Brylinski, Pennsylvania State University: jlb@math.psu.edu Aurelio Carboni, Università dell Insubria: carboni@fis.unico.it P. T. Johnstone, University of Cambridge: ptj@dpmms.cam.ac.uk G. Max Kelly, University of Sydney: maxk@maths.usyd.edu.au Anders Kock, University of Aarhus: kock@imf.au.dk F. William Lawvere, State University of New York at Buffalo: wlawvere@acsu.buffalo.edu Jean-Louis Loday, Université de Strasbourg: loday@math.u-strasbg.fr Ieke Moerdijk, University of Utrecht: moerdijk@math.uu.nl Susan Niefield, Union College: niefiels@union.edu Robert Paré, Dalhousie University: pare@mathstat.dal.ca Andrew Pitts, University of Cambridge: Andrew.Pitts@cl.cam.ac.uk Robert Rosebrugh, Mount Allison University: rrosebrugh@mta.ca, Managing Editor Jiri Rosicky, Masaryk University: rosicky@math.muni.cz James Stasheff, University of North Carolina: jds@math.unc.edu Ross Street, Macquarie University: street@math.mq.edu.au Walter Tholen, York University: tholen@mathstat.yorku.ca Myles Tierney, Rutgers University: tierney@math.rutgers.edu Robert F. C. Walters, University of Insubria: walters@fis.unico.it R. J. Wood, Dalhousie University: rjwood@mathstat.dal.ca