# Logical Construction of Final CoalgebrasAcademic research paper on "Computer and information sciences" CC BY-NC-ND 0 0
Share paper
OECD Field of science
Keywords
{}

## Abstract of research paper on Computer and information sciences, author of scientific article — Luigi Santocanale

Abstract We prove that every finitary polynomial endofunctor of a category C has a final coalgebra, provided that C is locally Cartesian closed, it has finite coproducts and is an extensive category, it has a natural number object.

## Academic research paper on topic "Logical Construction of Final Coalgebras"

﻿Electronic Notes in Theoretical Computer Science 82 No. 1 (2003) URL: http://www.elsevier.nl/locate/entcs/volume82.html 20 pages

Logical Construction of Final Coalgebras

Luigi Santocanale1

LaBRI, Université Bordeaux 1 santocan@labri.fr

Abstract

We prove that every finitary polynomial endofunctor of a category C has a final coalgebra, provided that C is locally Cartesian closed, it has finite coproducts and is an extensive category, it has a natural number object.

1 Introduction

In this note we prove that every polynomial endofunctor

P (X) = Qi x XAi (1)

i=1,...,ra

of a given category C has a final coalgebra, assuming that (1) C is locally Cartesian closed, (2) it has finite coproducts and is an extensive category, (3) it has a natural number object. It readily follows that the functor P generates a cofree comonad and that it is completely iterative.

Our proof is inspired by the many set theoretic representations - see  - of the final P-coalgebra: for example, if A is a large enough alphabet, this final coalgebra can be represented as a set of pairs (I,t), I C A* being a nonempty lower ideal w.r.t. the prefix order of the free monoid, and t being a labeling of words in I subject to typing constraints. Each such pair can also be identified with a particular complete A-branching tree over some set of labels, a tree being complete if each node has exactly one subtree in the direction a, for a E A. We illustrate this idea with the next example.

Example 1.1 The set of infinite terms over the signature Q = {f, g} - where f is a unary function symbol and g is a binary function symbol - is the final coalgebra of the functor P(X) = {f} x X + {g} x X2. Let A be the direction alphabet {(f, 1), (g, 1), (g, 2)} and let Q' be the signature Q augmented with

1 Research supported by the European Community through a Marie Curie Individual Fellowship.

a new symbol Then the infinite terms over the signature Q = {f, g} are in bijection with those complete A-branching trees labeled in Q' satisfying the following clauses:

(i) If a node is labeled by f, then the son along the direction (f, 1) is not labeled by the symbol ± while all the subtrees in the directions (g, 1), (g, 2) are constantly labeled by

(ii) If a node is labeled by g, then the subtree along the direction (f, 1) is constantly labeled by the symbol ± and the sons in the directions (g, 1), (g, 2) are not labeled by

(iii) The root of the tree is not labeled by the symbol

A complete tree satisfying these conditions is represented in figure 1.

Fig. 1. Ideals as complete trees

The final P-coalgebra is therefore a subset of the object Xa of complete A-branching trees with labels in some set X; and the object XA is itself a final coalgebra of some other functor. We shall investigate the process by which a final coalgebra of P is extracted from the final coalgebra of another functor by means of logical operations. We shall show that this process can be carried within the weak logic corresponding to the categorical properties (1)-(3). The reader should remark from the beginning the structure of the clauses (i)-(iii) of Example 1.1 and be aware that the use of classical logic is restricted to the constructive Boolean logic of extensive categories (see for example ).

Our interest in this problem stems from a general investigation [8,19] on the relationships between induction and coinduction, i.e. initial algebras and final coalgebras of functors. In  we proved that, given an adjoint pair of endofunctors F H G, if a free F-algebra functor F exists and has a right adjoint G, then G is a cofree G-coalgebra functor. For example, if A* is the free monoid generated by A in a Cartesian closed category, then A* x X is the free A x (—)-algebra generated by X, and the function space Xa turns out to be the cofree (—)A-coalgebra over X. Briefly, some final coalgebras arise from duality. A question suggested from the set theoretic example but left open in

 is whether and under which conditions the duality is the starting point for constructing other final coalgebras.

Among the categories satisfying conditions (1)-(3) are elementary toposes with a natural number object. For Grothendieck toposes - which as categories are locally presentable  - standard tools can be used to show that a polynomial endofunctor has a final coalgebra: this functor is accessible and its final coalgebra can be constructed as the inverse limit of the terminal chain (the chain of iterated functorial applications that begins at the terminal object [5,2,23]). Many toposes of interest in computer science are not complete; among them we list the effective topos  and the free topos generated by a countable language . Apparently the construction/representation of a final coalgebra as an inverse limit is not available since it depends on completeness. Nonetheless it is shown in  that these toposes admit final coalgebras of partial product functors, see ; the polynomial functors that we consider are indeed examples of partial product functors. These final coalgebras are constructed as internal limits of the terminal chain; the proof of their existence depends on the development of internal category theory  and on the theory of iterative data in an elementary topos  by which it is shown that some external iterative processes can be internalized.

Our goal is to present and analyze a construction of the final P-coalgebra alternative to the terminal chain construction. This construction depends only on a restricted (negative) fragment of the topos theoretic structure: we do not need a subobject classifier nor a factorization system corresponding to existential quantification. This remark could be exploited to further investigate preservation of final coalgebras under morphisms of toposes. Moreover, we are interested in modeling the arithmetic of typed programming languages in structured categories. To this goal the topos structure is often considered too strong and the weaker properties (1)-(3) are preferred, see for example  and, more recently, .

In the development we shall adopt the framework of  and prove a more general result: given adjoint pairs Fi H Gi, i = 1,...,n, an endofunctor of the form

P(X)= J] Qi x Gi(X)

i=1,...,n

has a final coalgebra under the assumption that C has the properties (1)-(2) and that both a free algebra functor of i=1 n F.i and a cofree coalgebra functor of]li=1 n G. exist. We recover the previous statement letting F.X = A. x X, G.X = XAi, and recalling that in a locally Cartesian closed category with a natural number object N (i) a free monoid A* is computed as the partial

product of A with the arrow N x N-^ N-^ N, (ii) the functor A* x X is

a free algebra functor of A x X (and XA* is a cofree coalgebra functor of XA). Using this general form, we can show that functorial systems of equations such

i,kx Xf(k) i=l,...,n / k=l,...,m

have a greatest solution. For this we observe that conditions (1)-(2) are stable under formation of products of categories and use results from .

This note is structured as follows: in section 2 we overview on the mathematical setting and introduce the notation. In section 3 we find sufficient conditions for a subobject of the object of complete trees to be the final coalgebra of the polynomial functor P. In section 4 we construct a subobject and show that the sufficient conditions holds; in this way we prove the main claim. Finally, in section 5, we argue that this construction of a final coalgebra is actually part of the construction of a left adjoint, and argue for the need of extensiveness.

2 Preliminaries

In this note we shall prove the following statement:

Theorem 2.1 Let C be a locally Cartesian closed category with finite coproduits and assume C is an extensive category. Let Fi H Gi, i E I, be a finite collection of adjoint endofunctors of a category C and put

F(X) = £ Fi(X), G(X) = n Gi(X).

iei iei

If a pair of adjoint endofunctors F H G - where F is a free F-algebra functor or equivalently G is a cofree G-coalgebra functor - exists, then the functor

P(X) = Y;Qi X Gi(X) (2)

has a final coalgebra.

We begin explaining the statement and the general setting in which we work; we introduce a useful lemma about universal quantification at the end of this section.

A category C is locally Cartesian closed if it has a terminal object 1 and each slice category C/C is a Cartesian closed category [10,18,20]. This implies that C is itself Cartesian closed, since it is equivalent to the slice category C/1. Moreover C is a distributive category, meaning that if we construct the

pullbacks

then the diagram (ni : Pi-^ A)ieI is again a coproduct diagram. C is an

extensive category if the converse condition holds: if (ni : Pi-^ A)ieI is a

coproduct diagram and the diagram above commutes, then it is a pullback. Rephrased, the coproduct injections are Cartesian natural transformations.

By saying that a free F-algebra functor exists, we mean that the forgetful

functor UF : Alg(F) -^ C has a left adjoint. Spelled out, for every object

X we can find an object FX and a diagram

zx : X

sx : FFX

with the initial property w.r.t. similar diagrams: for every pair (a, f), where

a : X-^ A and f : FA-^ A, there exists a unique arrow {|a, f |} :

FX-- A such that

zx •{ a, f } = a, sx •{ a, f } = F {| a, f }• f.

Similarly, by saying that a cofree G-coalgebra functor exists, we mean that

the forgetful functor UG : CoAlg(G)-^ C has a right adjoint. Spelled out,

for every object X we can find an object GX and a diagram

hx : GX-^ X tx : GX-^ GGX

with the the final property w.r.t. similar diagrams. Clearly, F and G are functors, obtained by composing the left adjoint with UF and the right adjoint with UG; z, s, h, t are natural transformations.

If a free F-algebra functor F is given and we define

ix = F zx • sx : FX-^ FX, mx = {| idFx, sx} : fFx-^ FX ,

then the tuple {F, i, z, m) is the free monad generated by F [4,22]. Dually, if a

cofree G-coalgebra functor G is given, then we can define px : GX-^ GX

and dx : GX-^ GGX so that {G, p, h, d) is the cofree comonad generated

by G. f „ f

In  we proved the following facts. If a pair (F, G) is given, F being a free F-algebra functor and G being a cofree G-coalgebra functor, then F is left adjoint to G. Conversely, if a free F-algebra functor F is given and has a right adjoint G, then G can be endowed with the structure of a cofree G-coalgebra functor. Dually, if a cofree G-coalgebra functor G is given and

has a left adjoint F, then F can be can be endowed with the structure of a free F-algebra functor.

Consequently, the structures of the free monad and the cofree comonad are related under transposition. The counit hX of the cofree comonad is zgX • evX

while the comultiplication dX : GX-^ GGX is obtained by transposing

twice the arrow

mGX • evX : FFGX-- FGX-- X ,

where ev is the counit of the adjunction. Transposing once this arrow, we obtain a natural action a of F over G satisfying the usual conditions:

In the statement of Theorem 2.1 the functor F is the sum ieI Ff, hence we shall consider several restrictions of the multiplication m and of the action a:

mi = inFiF ' 1f ' m ai = inFi5 ' ' a

= inF,p ' sp : FiF-^ F , = inFi5 ■ S5 : FiG-^ G .

Thus for each i in the finite set I let Qi be a given object of C and put Q = ieI Qi; 1 will be a chosen terminal object of C. We are interested in the object G(1 + Q) for which we shall use the abbreviated notation G. If X is a subobject of G, we shall use the notation kx to denote the intended

monic arrow kx : X-^ G. If X and Y are two subobjects of G such that

kx factors through ky , then we shall use kx for the inclusion of X into Y.

In order to prove the theorem we shall use the following fact: given an endofunctor F of a category C we can construct a new functor from the slice category C/C to the slice category C/FC according to the following rule: an

object over C (X, x) (where x : X-^ C) is sent to (FX, Fx) and a map

f : X-^ Y such that f ■ y = x is sent to Ff.

Lemma 2.2 If F has a right adjoint G and C has pullbacks then the functor F : C/C-^ C/FC has also a right adjoint WF which is computed by pulling

back along the unit of the adjunction:

Proof. The two diagrams

correspond under transposition, so that one commutes if and only if the other does. □

Observe that if q is monic then Gq is also monic, and therefore WFq is monic.

In the proof we have used the notation fb for the transpose of f : FX-^ Y.

We shall use the same notation in the rest of the paper, and the notation g# for the transpose of an arrow g : X-^ GY.

3 Representation of the Category of P-Coalgebras

In this section we give an adequate form to the category of P-coalgebras, P being the functor defined in (2). That is, we shall define a category D and argue that this category is equivalent to CoAlg(P). This is done to have explicitly available the reasoning by cases arising from pulling back against coproduct injections.

• An object of D is a tuple (ai : Ai-^ A, hi, si)ieI such that

• (ai : Ai-^ A)ieI is a coproduct diagram in C,

• for each i E I, hi : Ai-^ Qi and si : FiAi-^ A.

• An arrow f from (ai : Ai-^ A, hi, Si)ia to (ßi : Bi-^ B, hi, s'i)iei is an

arrow f : A-^ B in C such that

• ai • f factors through ßi, say ai • f = fi • ßi,

• for each i E I the following equations hold:

hi fi • hi , si • f Fifi • si .

Given an object (ai : Ai-^ A, hi, Sj)ieI of D a coalgebra is constructed on

A as follows:

Y^ihi^sl) : A-^ Hi x GiA.

iei iei

It is easily verified that an arrow f in D is a coalgebra morphism as well,

thus we have defined a functor C : D-^ CoAlg(F). Given a coalgebra

f3 : B-^ Y1 H x GiB, we construct a coproduct diagram [3i : Bi-^ B

and arrows (hi,ti) : Bi-^ Hi x GiB pulling back along injections ini :

Hi x GiB-^ ieI Hi x GiB; we obtain an object of D by transposing the

ti. The object (Pi : Bi-^ B,hi,tf) has the universal property needed to

define a functor right adjoint to C. Moreover, when the functor C is applied to it, we obtain back (ft,B). In order to conclude that C is an equivalence, it is enough to argue that each object of D is isomorphic to an object coming from CoAlg(F): for this we use the fact that C is an extensive category.

Recall that the category of F-algebras is isomorphic to the category of G-coalgebras and that the F-algebra (G, h, s^) is cofreely generated by 1 + H.

There is an F-algebra structure ! : F1-^ 1 and we let ± : 1-^ G be the

unique arrow such that

h = in : 1-- 1 + H

F± -s ^ = ! -_L: F1-- G .

Using this arrow we discover the following universal property:

Proposition 3.1 For every object (ai : Ai-^ A, hi, si)ieI of D there exists

a unique arrow da) such that the diagrams

FA-FiW» : FG Fj At : Fj G

commute.

Proof. Given an object (ai : Ai

A,hi,si)ieI of D there is an F-algebra

whose carrier is the object 1 + A and whose structure is

{ ! • ini,sh3} : F(1 + A)

= F1 + ^ Fi(£ Aj )

iei jei

= F 1 + 5] FtAj-- 1 + A

where ! • in : F1-^ 1-^ 1 + A, and the si,j are defined as follows:

Si • inr : FiAi

• ini: Fj Ai

1 + A, i = j, 1 + A , otherwise.

The F-algebra we have constructed is over 1 + Q and the map daD} is the unique arrow to the F-algebra cofreely generated by 1 + Q. □

Proposition 3.2 Suppose that we can find an object (KDi : Di-^ D, hj,, si)ieI

of D whose canonical arrow (| k D : D-^ G is monic and such that, for every

object (ai : Ai-^ A, hi, si)ieI of D, the canonical arrow (|aD factors through

D fibrewise: that is, for each i G I we can write ai • (| a D = ((aDDi • KDDi • (| k D for

a necessarily unique arrow ((aDDi■ Then this object is a terminal object in D. The arrow ((aDDi is unique since in a distributive category coproduct injec

tions are monic, see for example ; it follows that the arrows kD • dk D are

monic.

Proof. Write KDi for kjD • (| k D, so that the equations

hi • in = KDi • h Si • ( k D = FjKDi • aj

! = Fj KDi • aj i = j

hold. Let (ai : Ai-^ A, hi, si)ieI be an object of D, put ((aDD = ((aDDi,

and observe that (|a D = ((aDD ' d k D. In order to argue that si • ((aDD = F^aDDi • si use the fact that (|kD is monic and argue that si • ((aDD ' (IkD = F^aDDi • si • ( kD:

Si • ((aDD • (I k D

by (7)

Similarly, if f : A

D is another morphism in D, it is enough to show

that f • d k D has the properties that uniquely determine d a D, so that f • d k D =

da ) = (a)) • (| k ) implies f = (a)). This is easily achieved using equations (6), (7), and (8). □

According to the proposition, in order to construct a terminal object in D

it is enough to find a subobject kd : D-^ G with a structure of an object in

D such that the arrows (|a) factor through D fibrewise and equations (6), (7), and (8) hold, with (| k ) replaced by kd. We shall construct such a subobject in the next section. To end this section, we present a useful characterization of the maps (|a ).

Proposition 3.3 Given an object (ai : Ai

A,hi,si)ieI of D, an arrow

(| a) makes diagrams (3), (4), and (5) commutative if and only if the following conditions hold:

(i) We can find commutative diagrams

a—FA F^aM = G-— 1 + H

where the pasting of (10) and (3) is a pullback and ^i • ni = idAi (ii) The diagrams

FiPiFiAi-

Fiiny.^a) (11)

■A FjPiFjAi-

^ Fj (12)

FiFG-^-- G FjFG-^--

commute.

Proof. We argue first that (|a) has these properties. Let h = ieI hi and observe that the F-algebra we have constructed in the proof of Proposition

3.1 is over 1 + H by means of the arrow 1 + h : 1 + A-^ 1 + H. This algebra

is also over 1 + A, and as we have defined a map (|a) : A-^ G(1 + H) we can

define a map (| a) 1+A : A-^ G(1 + A) as well; the two maps are related by

(|a) = (|a) 1+A • G(1 + h). In the diagram below the square (13) is a pullback, since we are working in an extensive category; the other two squares in the top row are pullbacks by construction. Thus every composite square in the

top row is also a pullback.

A-f/^^1^ 1 + 1 + Q

FM (14) {±<a

We claim that ^i • ni = id^.: observe that z^ • F(|a D • ev = inr and that the commutative diagram corresponding to the relation ai • inr = id^. • (ai • inr) is a pullback since inr and ai are monic arrows.

We need to show that diagram (14) commutes. For this, recall that the category of F-algebras is isomorphic to the category of Eilenberg-Moore coalgebras for the comonad G see ; the map (|a D: 1 + A-^ (5(1 + A)

is therefore an Eilenberg-Moore coalgebra for the comonad G since, under this isomorphism, it corresponds to the algebra constructed in Proposition 3.1. Therefore:

Transposing this relation we deduce that diagram (14) commutes.

The proof that (| a D satisfies the other two relations is now straightforward:

The other relation is proved similarly.

Conversely, if (|aD satisfies the conditions of the Proposition, then also diagrams (4) and (5) commute. For example:

^ • 1 a) = Fi^i • Fn • si • 1a) = F^ • F^Fa • a )) • m • a by (11)

(I a ) i+A • G{ <| a )} = <| a ) i+a • G{ <|• GG(1 + h) = (| a ) i+a • di+A • GG(1 + h)

= (| a ) i+a • G(1 + h) • di+n = (| a ) • di+n .

Fi(nfa • Fa )) • mi • a = Fi(n fa • Fa)) • Fia • ai

= Fi(m • ai • 1 a)) • ai

by (10) by (4)

Fini • Si • 1 a ) .

Fi(ai • ZA • F(]a )) • mi • a

by (9)

Fi(ai • 1 a)) • FiZG • m • a = Fi(ai • 1 a)) • ai

In particular we see that the diagram

FP Fini > FiAi—^--Q

Fi(np.-F№) (15)

commutes. For this it is enough to past the commutative diagram corresponding to the relation (| a D • h = h • inr on the right of diagram (11).

4 The Construction

In this section we construct a subobject of G satisfying the constraints given in Proposition 3.2. The strategy is as follows: we shall construct a subobject

kc : C-^ G with some properties; we leave for the moment unspecified

these properties, we just think of C as being a modification of G. Then

we shall define the subobject kd : D-^ G and the coproduct diagram

(«D : Dt-* D) iei by means of the following pullbacks:

To understand the definition of D, consider the case when C is the category of sets and functions, A = Ai, Fi(X) = Ai x X, F(X) = A* x X, and G(X) = XA*. Then D is the set of all trees t E (1 + , having the property C, such that the root of the tree is not labeled by i.e. t(e) E Q. In this way we are mimicking clause (iii) from Example 1.1.

Next we need to put a structure of an object of D on the top of the

coproduct diagram (kd : Di-^ D)ieI. Observe that the hi : Di-^ Qi

come with the definition of the coproduct; thus we only need to construct

si : FiDi-^ D. The recipe is described by means of the following diagram:

■FiG

-^FiC———>

nn ■

We need the subobject C of G to be closed under the action of Fi (Lemma 4.1) and the arrow FKDi ■ ai ■ h to factor through inr (Lemma 4.2). Having these properties we can define si as the canonical arrow from FiDi to the pullback D.

We define now the object C. Proposition 3.3 suggests what are its building blocks: these are subobjects Qi of FG and Qijj of FjFG defined as the following pullbacks:

Qi Qi J

-^1+ Q

■■■ s

^ i = J.

The Qi and the Qitj are indeed subobjects of FG and Fj FG, respectively: the reason is that coproduct injections are monic in a distributive category; moreover, the relation h = in exhibits L as a monic. In a Cartesian closed category product and exponentiation give the collection of subobjects of the terminal object the structure of a Brouwerian semilattice. Considering this structure in the slice categories C/FG and C/G we define:

Ci = y F ( Qi ^ A ^Fj Qi,j )

C =/\ Ci.

The meaning of the universal quantification VF is explained in Lemma 2.2. The reader can also find there the reason for which all the Ci are indeed subobjects of G.

In order to understand the definition of the Ci, consider again the set theoretic example. Here Qi,i is the set of triples (a, w, t) in Ai x A* x (1 + Q)A such that t(wa) E Q; Qj,,j is the set of triples (a,w, t) in Aj xA* x (1 + Q)A such that the subtree of t rooted at wa (i.e. the function Xx.t(wax)) is constantly labeled by Therefore Ci is the collection of trees t E (1 + Q)A with the following property: for all w E A* .such that t(w) E Qi, for all j E I and a E Aj, if i = j then t(wa) is in Q, and otherwise, if i = j, then the subtree of t rooted at wa is constantly labeled by That is, the definition of the Ci mimics clauses (i)-(ii) of Example 1.1.

Lemma 4.1 The object C is closed under the action of F and therefore under the actions of F and of each Fi.

Proof. The second statement follows from the first since we can write ai = ii • a, where the ii : FiX-^ FX are natural in X.

Thus we shall show that the arrow F KCi • a factors through Ci; this will be enough since it is easily verified that the intersection of subobjects closed under the action of F is again closed under this action. By the definition of Ci, this is equivalent to the pullback of Qi along F(FKCi • a) to factor through VF■ Qi,j, for all j E I. To this end, observe first that in the following diagram we can factor the pullback P through Vp.Qj,,j:

FCi x Q

■Fa-

■ F G

Here the arrow ^ corresponds under the adjunctions to the identity of Ci. The result follows since the relations

mCi • FKCi • ev = FFKCi • mG • a • h

= FFKCi • Fa • a • h = F(FKCi • a) • ev

show that P is indeed the pullback of Qi along F(FKCi • a). Lemma 4.2 There is a factorization of the form

FiKDi • ai • h = no • inr ,

for some necessarily unique nn; moreover

FjKDi • aj = ! (19)

Proof. The diagram

Di-- a

shows that the arrow KDi • zg can be factored through WFjQitj over FG. Transposing this relation, we obtain that Fj (nDi • zg) can be factored through Qitj over Fj FG. Considering the definition of the Qitj as pullbacks, we obtain

that Fi (KDi • zg) • mi • ev can be factored through inr : Q-^ 1 + Q and

Fj(KDi • zg) • mj • a is constant:

Fi(KDi • zg) • mi • ev = nn • inr , Fj(KDi • zg) • mj • a = ! • ^ .

Finally, it is enough to observe that Fizg • mi • ev = ai • h and Fjzg • mj • a = aj. □

With the proofs of the two lemmas we have completed the definition of the object (kd : Di-^ D, hi,, si)ieI in D. We observe:

Proposition 4.3 Equations (6), (7), and (8) holds.

Proof. Equation (6) follows from the definition of Di. Equation (7) is the top row of squares in diagram (16). Equation (8) is the relation (19). □

In order to use Proposition 3.2 and conclude that this is a terminal object of D, we still need to prove:

Proposition 4.4 If (ai : Ai-^ A,hi,si)ieI is an object of D, then the

canonical arrow (|aD factors through D fibrewise.

Proof. We start showing that (|aD factors through C, that is, that (|aD factors through each Ci. Unraveling the definition of Ci, we need to show that F(| a D factors through Qi — AjeI Qij, or equivalently that the pullback Pi of

F(|aD • ev along the injection Qi-^ 1 + Q factors through each yFj Q-i,j over

FG. Transposing we need to show that Fj (npA • F(| a D) factors through each Qi,,j over Fj FG. Considering the definition of the Qj,,j as pullbacks (17) and (18), the statement follows from the commuting diagrams (15) and (12).

Finally we must show that (|a D factors through D fibrewise. It is enough to recall that ai • ^ a D • h = hi • ini, which implies that ai • ^ a D factors through Di. □

Hence we can state:

Theorem 4.5 The object (kD : Di-^ D,hi,si)ieI is a terminal object in

the category D and therefore the polynomial functor P(X) has a final coalgebra.

5 Further Observations

The construction presented in the previous section can be interpreted and generalized as follows. Let

C\ = (Q± ^ /\Vf3Q±j )

where Q± and Q±,j are defined as expected:

Define now

E = C± A C.

In Lemma 4.1 we have observed that C is sub-F-algebra of the final F-algebra over 1 + Q; similarly, E is such a sub-F-algebra. With Alg(F)1+q we shall denote the category of F-algebras over 1+Q: its objects are triples (H, aH, uH),

(H, aH) being an F-algebra and uH : H-^ 1 + Q; its morphisms are the

evident ones. We write E for the object (E, aE,ke ■ h) of Alg(F)1+n whose algebra structure is the restriction of a to E. In Proposition 3.1 we have

defined a functorial correspondence K : CoAlg(P)-^ Alg(F)1+n; the proof

of Proposition 4.4 can be generalized to observe that we can factor K through the slice category of E:

CoAlg(P)-* Alg(F)i+n/E-- Alg(F)i+n .

The construction presented in section 4 generalizes to a functor

Lk : Alg(F)i+o/E-- CoAlg(P)

which turns out to be left adjoint to K. Indeed, if (H, aH ,uH) is an F-algebra

over 1 + Q, then we can construct the coproduct diagram : Hi-^ Ho)ieI

by pulling back along the injections. Using the fact that (H, aH) comes with a map to (E, aE) the argument of Lemma 4.2 is adapted to show that Fi(^i • f3H) • aH • uH factors through inr. Hence we can construct the si as we have done for D:

3i -Ho—-—- H

Fi(3i3H

*H —

This construction is clearly functorial. Given f : H-^ 1 + A = K(A), its

transpose is defined by pulling back f • 1 + h against the injection Q-^ 1 + Q.

For the converse, recall that H is the coproduct of Ho and of the pullback

H± of uH : H-^ 1 + Q against the injection 1-^ 1 + Q; thus, given

g : Ho-^ A, we can define its transpose as ! + g : H± + Ho-^ 1 + A.

This gives the natural bijection

H-- 1 + A

Ho-- A

which is needed to establish the adjunction LK H K.

5.2 Extensiveness is Necessary

Since the construction presented in section 4 can be carried in an arbitrary distributive category, it might be asked whether the resulting object has the desired universal property in distributive categories that are not extensive. For example, does this construction define a greatest fixed point in an arbitrary Heyting algebra? The answer is negative. Observe, however, that if C is a poset then a top element in D is preserved by the left adjoint

C : D-^ CoAlg(P) whose counit is an isomorphism; it does not matter

that the category D is equivalent to CoAlg(P). Thus we need the assumption of extensiveness only to prove that diagrams (15) and (12) commute. The

argument relied on the fact that we found an arrow ni : Pi-^ Ai, for which

we needed diagram (13) to be a pullback.

Easy computations of Heyting algebras lead to ask whether the relation ^.( V (a A GiX)) = n a/\ G(Qi ^ Gift) (20)

ieI ieI

holds - we are using here standard notation for fixed points. While the unary version (i.e. when I is a singleton) of this equation holds and is indeed Segerberg's equation axiomatizing PDL , the binary version is false. This is shown by considering the transition system

n1, n2

over which we interpret two modal operators (1), (2) and the two propositional constants ni, n in the usual way. If we put ({1, 2}*)y = .(Y V(1)X V(2)X), then we observe that the relation

(fii A V ({1, 2}*)( -.fii A (1)(fii A n2)) V ({1, 2}*)(A (2)(fii A

< fiX.((Hi V(1)X) A (n2 V(2)X))

does not hold in the transition system. This relation is the dual of equation (20).

Acknowledgment

The author is grateful to professor Robin Cockett for useful discussion on the subject.

References

 M. Abbott, T. Altenkirch, and N. Ghani. Categories of containers. In A. D. Gordon, editor, Proceedings of FOSSACS 2003, volume 2620 of Lecture Notes in Comput. Sci., pages 23-38. Springer, 2003.

 J. Adamek and V. Koubek. On the greatest fixed point of a set functor. Theor. Comput. Sci., (1):57-75, 1995.

 J. Adamek and J. Rosicky. Locally presentable and accessible categories. Cambridge University Press, Cambridge, 1994.

 M. Barr. Coequalizers and free triples. Math. Z, 116:307-322, 1970.

 M. Barr. Terminal coalgebras in well-founded set theory. Theoret. Comput. Sci., 114(2):299-315, 1993.

 J.R.B. Cockett. Introduction to distributive categories. Math. Struct. in Comp. Science, 3:277-307, 1993.

 J.R.B. Cockett and S. Lack. The extensive completion of a distributive category. Theory Appl. Categ., 8:541-554, 2001.

 R. Cockett and L. Santocanale. Induction, coinduction, and adjoints. In Rick Blute and Peter Selinger, editors, Electronic Notes in Theoretical Computer Science, volume 69. Elsevier Science Publishers, 2003.

 B. Courcelle. Fundamental properties of infinite trees. Theoret. Comput. Sci., 25(2):95-169, 1983.

 B. Day. Limit spaces and closed span categories. In Category Seminar (Proc. Sem, Sydney, 1972/1973), pages 65-74. Lecture Notes in Math., Vol. 420. Springer, Berlin, 1974.

 R. Dyckhoff and W. Tholen. Exponentiable morphisms, partial products and pullback complements. J. Pure Appl. Algebra, 49:103-116, 1987.

 J. M. E. Hyland. The effective topos. In The L.E.J. Brouwer Centenary Symposium (Noordwijkerhout, 1981), pages 165-216. North-Holland, Amsterdam, 1982.

 C. B. Jay and J. R. B. Cockett. Shapely types and shape polymorphism. In Programming languages and systems—ESOP '94 (Edinburgh, 1994), volume 788 of Lecture Notes in Comput. Sci., pages 302-316. Springer, Berlin, 1994.

 P. Johnstone, J. Power, T. Tsujishita, H. Watanabe, and J. Worrell. On the structure of categories of coalgebras. Theoret. Comput. Sci., 260(1-2):87-117, 2001. Coalgebraic methods in computer science (Lisbon, 1998).

 P. T. Johnstone and G. C. Wraith. Algebraic theories in toposes. In Indexed categories and their applications, volume 661 of Lecture Notes in Math., pages 141-242. Springer, Berlin, 1978.

 P.T. Johnstone. Topos Theory, volume 10 of L.M.S. Monographs. Academic Press, 1977.

 J. Lambek and P. J. Scott. Introduction to higher order categorical logic. Cambridge University Press, Cambridge, 1988.

 J. Penon. Categories localement internes. C. R. Acad. Sci. Paris Ser. A, 278:1577-1580, 1974.

 L. Santocanale. ^-bicomplete categories and parity games. Theoretical Informatics and Applications, 36:195-227, September 2002.

 R. A. G. Seely. Locally Cartesian closed categories and type theory. Math. Proc. Cambridge Philos. Soc., 95(1):33-48, 1984.

 K. Segerberg. A completeness theorem in the modal logic of programs. Notices Amer. Math. Soc, 24:A552, 1977. Abstract 77T-E69.

 V. Trnkova, J. Adamek, V. Koubek, and J. Reiterman. Free algebras, input processes and free monads. Comment. Math. Univ. Carolinae, 16:339-351, 1975.

 J. Worrell. Terminal sequences for accessible endofunctors. In B. Jacobs and J. Rutten, editors, Electronic Notes in Theoretical Computer Science, volume 19. Elsevier Science Publishers, 2000.