Initial Algebras and Terminal Coalgebras

Download as pdf or txt
Download as pdf or txt
You are on page 1of 80
At a glance
Powered by AI
The document discusses initial algebras and terminal coalgebras from a categorical perspective. Initial algebras provide a canonical minimal model for defining functions recursively over data types. Terminal coalgebras dually characterize coinductive types.

Initial algebras and terminal coalgebras are dual concepts in category theory that characterize inductive and coinductive types respectively. An initial algebra provides the initial object in a category for defining functions recursively. A terminal coalgebra dually provides the final object for characterizing coinductive types.

Some examples of initial algebras mentioned are natural numbers, lists and trees - common data types in functional programming where functions are defined recursively over their structure.

Initial algebras and terminal coalgebras: a survey

Draft: June 29, 2010


Jir Ad amek Stefan Milius Lawrence S. Moss
Contents
1 Introduction 3
1.1 Why are initial algebras interesting? . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Why are terminal coalgebras interesting? . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Algebras versus Coalgebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 Finitary Iteration 8
2.1 Initial algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 Examples of Initial Algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 Terminal coalgebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4 Weakly terminal coalgebras, and nitary functors . . . . . . . . . . . . . . . . . . . . 22
2.5 A terminal coalgebra for P
f
using strongly extensional trees . . . . . . . . . . . . . . 29
2.6 Terminal coalgebras for nitary Set functors . . . . . . . . . . . . . . . . . . . . . . . 31
2.7 Terminal coalgebras as quotients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.8 CPO

-enriched categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.9 CMS-enriched categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3 Transnite Iteration 45
3.1 Initial Chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.2 Terminal Chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4 Sufcient Conditions for Terminal Coalgebras 55
4.1 Using the Adjoint Functor Theorems . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.2 Finitary and Accessible Functors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
5 Interaction between Initial Algebras and Terminal Coalgebras 60
6 Terminal Coalgebras as Algebras 60
6.1 Completely Iterative Algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
6.2 Iterative Algebras and the Rational Fixed Point . . . . . . . . . . . . . . . . . . . . . 66
7 Logic and Set Theory 69
7.1 An expressive coalgebraic logic for nitary set functors . . . . . . . . . . . . . . . . . 69
7.2 Adjunctions and Dualities in Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
7.3 Sufcient Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
1
7.4 Goldblatt-Kupke-Leal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
7.5 Foundation and Antifoundation Axioms . . . . . . . . . . . . . . . . . . . . . . . . . 72
8 Special topics 72
8.1 Measurable Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.2 Liftings of Terminal Coalgebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
8.3 Terminal Coalgebras in Accessible Categories . . . . . . . . . . . . . . . . . . . . . . 73
9 Conclusions 73
Index 73
2
1 Introduction
1.1 Why are initial algebras interesting?
Recursion and induction are important tools in programming. In functional programming, for example,
recursion is a denition principle for functions over the (inductive) structure of data types such as natural
numbers, lists or trees. And induction is the corresponding proof principle used to prove properties
of programs. An important question of theoretical computer science concerns the semantics of such
denitions. Initial Algebra Semantics, studied since the 1970s, uses the tools of category theory to unify
recursion and induction at the appropriate abstract conceptual level. In this approach, the type of data
on which one wants to dene functions recursively and to prove properties inductively is captured by
an endofunctor F on the category of sets (or another appropriate base category). This functor describes
the signature of the data type constructor. And an initial algebra for the functor F provides a canonical
minimal model of a data type with the desired constructors. Let us illustrate this by a concrete example:
Consider the endofunctor on sets given by FX = X+1, i. e., the set construction adding a fresh element
to the set X. An algebra for F is just a set equipped with a unary operation and a constant, and the initial
algebra is the algebra of natural numbers Nwith the successor function and the constant 0. The abstract
property of initiality of that algebra is precisely the usual principle of recursion on natural numbers:
given an F-algebra X, i. e., a unary operation on u : X X and a constant x X, there exists
precisely one function f from the natural numbers to X with f(0) = x and f(n + 1) = u(f(n)). The
existence of f is the fact that functions from N to X can be dened by recursion, and the uniqueness
yields the proof principle of induction.
As a second example consider the set functor FX = X X + 1 (whose algebras have a binary
operation and a constant) then the initial algebra is the algebra of nite binary trees, and initiality yields
a tree-recursion principle.
In the present survey initial algebras are studied for all endofunctors F : A A. It was Jim
Lambek who rst studied in
lambek
[L] algebras for F as pairs consisting of an object A of A and a morphism
a : FA A; the corresponding homomorphisms from (A, a) to (A

, a

) are those morphisms h : A


A

in A which full h a = a

Fh. If a is invertible (thus FA A) we call the algebra a xed point


of A.
The category of algebras is denoted by Alg F. By an initial algebra F of F is meant its initial
object: this is an algebra such that for every algebra there exists a unique homomorphism from F.
Lambeks Lemma If F has an initial algebra, then it is a xed point.
We conclude immediately that even for A = Set there are important examples of endofunctors that
do not have an initial algebra: consider the power-set functor P. A fundamental result of set theory
known as Cantors Theorem says that no set A is in bijective correspondence with PA. So for all sets
A, A is not a xed point of the power set operation.
In the present paper, we study the existence and construction of initial algebras. There is a general
procedure for constructing the initial algebra of F starting from the initial object 0 of A, rst used by J.
Ad amek in
A74
[A74]. Starting from the unique morphism ! : 0 F0, we form the corresponding -chain:
0
!

F0
F!

F(F0)
F(F!)

F
3
0
F
3
!


3
If the colimit exists and is preserved by F, then that colimit carries the initial algebra
F = colim
n
F
n
0.
If F does not preserve that colimit, we iterate further and obtain a transnite chain. Again, if in that
chain F preserves the colimit at some stage, we obtain an initial algebra.
We illustrate the behaviour of this construction and other methods for obtaining initial algebras by
numerous examples. For example the functor FX = X X + 1 (of binary algebras with a constant)
yields the chain with F
1
0 = 1 and F
n+1
0 = F
n
0 F
n
0 + 1. This recursion allows us to represent
F
n
0 by the set all binary trees of depth less than n. The initial algebra colim
n<
F
n
0 =

n<
F
n
0 is
the algebra of all nite binary trees, the binary operation is tree tupling, and the constant is the trivial
singleton tree. Shortly:
X.(X X + 1) = nite binary trees.
1.2 Why are terminal coalgebras interesting?
sec:introcoalg
A coalgebra for a functor F is the dual concept of F-algebra: it consists of an object A and a morphism
a : A FA. Jan Rutten
rutten
[Ru
1
] presented a persuasive survey of the applications of this idea to
the theory of discrete dynamical systems which are ubiquitous in computer science. For example, a
sequential deterministic automaton with input set S can be described by the set A of its states together
with a function
a : A A
S
0, 1
whose rst component
A A
S
AS A
describes the next-state function, and the second one
A 0, 1
describes the predicate accepting state. This is a coalgebra for the functor F given by
FX = X
S
0, 1.
And a nondeterministic automaton is given by a function from A to (PA)
S
0, 1 and is thus a
coalgebra for the endofunctor F P composed of the power-set functor and the above functor F.
For another example, consider a dynamic system with states accepting binary input and having also
deadlock states (not reacting to inputs). This is given by a set A of states and a function
a : A AA+ 1
assigning to every deadlock the element of 1 and to every other state the pair of the possible next states.
This is a coalgebra for FX = X X + 1.
The category CoalgF of coalgebras has as morphisms from (A, a) to (A

, a

) the coalgebra homo-


morphisms which are the morphisms h : A A

with a

h = Fh a. The terminal coalgebra F,


also called nal
1
coalgebra, is (if it exists) the terminal object of this category: For every coalgebra
1
Both terms are found in the literature, with terminal used in all older works and nal in most work done after the renewal
of interest in coalgebras sparked by Aczel
aczel:88
[Ac].
4
there exists a unique homomorphism into F. If a system is represented by a coalgebra (A, a), then the
unique homomorphism f : A F expresses the abstract behaviour of the states in A, as Jan Rutten
demonstrated on numerous examples.
example-languages Example 1.2.1. The functor FX = X
S
0, 1 has the terminal coalgebra PS

, the set of all formal


languages over the alphabet S:
X.(X
S
0, 1) = PS

.
Given an automaton (A, a), the unique homomorphismf : A PS

assigns to every state the language


this state accepts.
example-dynamic Example 1.2.2. For the dynamic systems with deadlock above we have the coalgebra of all (nite and
innite) binary trees as the terminal coalgebra, shortly:
X.(X X + 1) = binary trees.
Given a dynamic system (A, a) the unique homomorphism f : A F assigns to every state the
binary tree of all possible future developments in which the names of states are abstracted away and
only the distinction deadlock/non-deadlock remains.
By dualizing Lambeks Lemma, we see that F is always a xed point of F. Thus, we can consider
F also to be an algebra for F. (Example: binary trees form an algebra for FX = X X + 1, with
tree tupling and the single-node tree, analogously to F). This algebra F has a strong property of
solvability of recursive equations. Let us illustrate this with the functor FX = XX+1 of one binary
and one nullary operation. Given a system of recursive equations
x
1
= t
1
x
2
= t
2
.
.
.
where t
i
is a term using the variables x
1
, x
2
, . . . and the binary operation and constant (forming the
signature of F-algebras in this case) there exists a solution in F. This means that to every x
i
we can
assign a binary tree x

i
such that the formal equations above become identities when the simultaneous
substitution x

i
/x
i
is performed on the left and right sides of each equation in the system. Moreover,
the solution of the system is unique, provided none of the right-hand sides is a bare variable. Algebras
with this recursion property are called completely iterative. S. Milius proved in
milius
[M
1
] that whenever
F exists, it is a completely iterative algebrain fact, it can be characterized as the initial completely
iterative algebra. We provide an overview of completely iterative algebra in Section
sec:ciarat
6.
Jan Rutten also discusses in
rutten
[Ru
1
] corecursion as an important construction principle dual to re-
cursion, and coinduction as an important proof principle dual to induction. In fact, induction can
be formulated abstractly as follows: given the initial algebra (F, ) of F, then for a parallel pair
f
1
, f
2
: F A of morphisms in the base category A in order to prove f
1
= f
2
it is sufcient to
present a morphism a: FA A for which f
1
and f
2
are algebra homomorphisms from (F, ) to
(A, a). The coinduction is the dual principle which for the terminal coalgebra F allows us to prove
equality of morphisms f
1
, f
2
: A F.
It goes without saying that not every functor possesses a terminal coalgebra. This follows from the
dual of Lambeks Lemma: the power-set functor does not have a terminal coalgebra. We study the dual
5
of the above initial algebra construction (explicitly used by Michael Barr
barr
[Barr] for the rst time): Start
with the terminal object 1 of A and the unique morphism ! : F1 1 and form the
op
-chain
1
!
F1
F!
F(F1)
F(F!)
F
3
1
F
3
!
. (1.1) first-opchain
If the limit exists and is preserved by F, this is the terminal coalgebra of F:
F = lim
n<
F
n
1.
Example 1.2.3. The above functors FX = X
S
0, 1 and FX = X X + 1 preserve all limits of

op
-chains (called
op
-limits, for short), and in particular their terminal coalgebras may be obtained by
taking the limit of the
op
-chain in (
first-opchain
1.1).
If F does not preserve
op
-limits, one may try iterating F on 1 further (transnite chain), see
Section
sec:transfinite
3 below.
example-graphs Example 1.2.4. Graphs are nothing else than coalgebras for the power-set functor P: given a : A PA
then consider, for every vertex x A, the set a(x) A as the set of all neighbours of x. But be careful:
there are fewer coalgebra homomorphisms than graph homomorphisms. Given graphs (A, a) and (B, b)
a coalgebra homomorphism f : A B fulls not only
if x x

in A then f(x) f(x

) in B
but also
if f(x) y

in B then x y in A for some y with f(y) = y

.
Lambeks Lemma tells us that there exists no terminal graph. However, if P
f
is the subfunctor of P
on all nite subsets, then coalgebras are precisely the nitely branching graphs, and a terminal coalgebra
exists, see Section
sec:powfin
2.5 for an extensive discussion. We mention this example because the limit of the

op
-chain in (
first-opchain
1.1) is not preserved by the functor, and so one needs a more sophisticated construction.
As we shall see, there are several different constructions of the terminal coalgebra for P
f
. For other
functors on other categories, there are yet other constructions.
1.3 Algebras versus Coalgebras
Although algebra and coalgebra are dual terms, and although this duality persists to the level of initial
algebra and terminal coalgebra, it is by no means the case that Alg F is dual to Coalg F. There are easy
examples of this, the simplest being the identity endofunctor of a poset x, y, z with x y, x z.
This poset has an initial object x but no terminal object. Thus the identity functor has an initial algebra
but no terminal coalgebra.
What is true is the following: every functor F : A A denes a functor F
op
: A
op
A
op
, by the
same rule as F. The category of algebras for F (in A) is dual to the category of coalgebras for F
op
(in
A
op
). Shortly,
(AlgF)
op
= CoalgF
op
.
We present in Figure
figure-cc
1 a conceptual comparison between two sets of ideas. As it indicates, the Clearly there
needs to be
more here!
coalgebraic concepts on the right are interesting partly because they are the structures used in the math-
ematics of transition and observation, as opposed to operations. Terminal coalgebras in this sense are
6
algebra for a functor coalgebra for a functor
initial algebra terminal coalgebra
least xed point greatest xed point
congruence relation bisimulation equivalence relation
equational logic modal logic
recursion: map out of an initial algebra corecursion: map into a terminal coalgebra
Foundation Axiom Anti-Foundation Axiom
iterative conception of set coiterative conception of set
set with operations set with transitions and observations
useful in syntax useful in semantics
bottom-up top-down
Figure 1: The conceptual comparison figure-cc
like the most abstract collections of transitions or observations. We know that this is very vague,
and so we hope that the examples throughout this paper will help. However, we also would like to men-
tion other sources, such as Moss
moss:SEP
[Mo
4
] (this is the source of the chart, and includes much conceptual
discussion related to the set-theoretic topics), and also Rutten
rutten
[Ru
1
], a highly recommendable general
source on coalgebra. For more recent surveys see
gumm
[GU] or
jacobs
[JA].
The questions of interest in this survey include: what are general conditions which guarantee the
existence of an initial algebra or a terminal coalgebra? We are also interested in representations of
terminal coalgebras. The reason for this is that the existence theorems themselves frequently are fairly
abstract, and so concrete representations make the terminal coalgebras more intuitive.
At this point, we want to mention the main categories and functors of interest in our study.
We begin with Set, the category of sets and functions. We are interested in the polynomial functors
obtained from the identity functor and the constant functors by products and coproducts (including
exponents from a xed set B).
Another functor which we shall study is the discrete probability measure functor D, where D(X) is
the set of nite functions fromX to [0, 1] which sumto 1. The denition of Don morphisms f : X Y
is
Df()(y) = (f
1
(y)) =

xf
1
(y)
(x).
We already mentioned the power set functor P; this gives the set of subsets of X. The action of P
on functions is f : X Y is
Pf : A f[A] = f(x) : x A
There are also a few renements of P, including P
f
, the nite power set functor. More generally, for
each cardinal number , we have a functor P

, where P

(X) is the set of subsets of X of size < . (So


P
f
is P

.)
Part of our interest in these renements comes from the fact that whereas P itself has no terminal
coalgebra, every functor built from all of the functors above except P using composition does have a
terminal coalgebra. Here is another example, again indicating the difference between the categories of
algebras and coalgebras for a functor.
7
Example 1.3.1. On Set, let FX be the power set functor, but modied so that F() = . Then (, id)
is the initial algebra. But there is no terminal coalgebra: the only xed point is = F(), and this is not
terminal, since it is not the codomain of any coalgebra morphism from a non-empty coalgebra.
nodual
Other categories include the posets and monotone maps, and CPO (the complete partial orders and
continuous maps). Further, we shall consider Met, the category of metric spaces with distances bounded
by 1 and non-expanding maps, and also the full subcategory CMS of such complete metric spaces. Both
of these categories have a power-set-like operation, and this will be of special interest. We are also
intersected in the categories Set
S
of S-sorted sets (for a set S).
The aim of this survey. We have tried and collected interesting results about terminal coalgebras (and
initial algebras) scattered throughout the literature. We found some results not quite complete and we
completed them. We usually indicate the idea of the proof, but otherwise we provide references to where
proofs can be found.
2 Finitary Iteration
Ininitial algebras and terminal coalgebras are xed points, and so we ground our discussion by relating
it to one of the most well-known xed point results in mathematics. This is a result often attributed
to Stephen Kleene, a theorem on least xed points of monotone, continuous operations on posets with
suprema of countable chains. Generalizing from orders to categories yields a theorem on initial algebra,
Theorem
theorem-initial-algebra-omega
2.1.9. Then the dual result appears in Theorem
thm:finalconstr
2.3.3. This dual result is actually the rst
terminal coalgebra theorem in this paper.
2.1 Initial algebras
section-initial-algebras
Throughout our paper we assume that a category Aand an endofunctor F on Aare given. The following
concept of algebra and homomorphism was studied by J. Lambek
lambek
[L] for the rst time: an algebra for
F (or F-algebra) is an object Aof Atogether with a morphisma: FA A, a homomorphism between
algebras (A, a) and (B, b) is a morphism h : A B in A for which the square
FA
a

Fh

A
h

FB
b

B
commutes. The category of F-algebras is denoted by AlgF. Its initial object (in case it exists) is called
the initial algebra for F. Recall also that two morphisms f : A B and g : B A are inverses if
g f = id
A
and f g = id
B
. And an isomorphism is a morphism with an inverse. An algebra for which
a: FA A is an isomorphism is called a xed point of F.
lemma-Lambek Lemma 2.1.1 (Lambek
lambek
[L]). If an initial F-algebra exists, then it is a xed point of F.
8
Proof. Let (A, a) be initial. Since (FA, Fa) is an algebra, we have a homomorphism h:
FA
a

Fh

A
h

FFA
Fa

Fa

FA
a

FA
a

A
Now a h is an endomorphism of (A, a) in AlgF. Thus a h = id
A
by initiality. Then h a = Fa Fh =
id
FA
. Thus h = a
1
.
Example 2.1.2. The power set functor P: Set Set does not have an initial algebra: Cantors Theorem
tells us that for all sets A, there is no map of A onto P(A). Therefore, there exists no xed point of P
on Set.
Notation 2.1.3. An initial object of A is denoted by 0. If F has an initial algebra, we denote it by
F or X.F(X).
More precisely: initial algebras are unique up to isomorphism, and if we choose one, the underlying
object is denoted by F.
In Example 2.2 we saw a trivial negative example, let us mention a trivial afrmative one: If F
preserves initial objects then F = 0.
In what follows we investigate F in the remaining interesting cases: for functors not preserving
0 but having xed points.
Our opening result is a classical theorem on xed points of monotone functions on complete partial
orders. A poset is a pair A = (A, ) with a partial order on A. In case is reexive and transitive
but not necessarily antisymmetric (A, ) is called a preorder. A monotone function from one poset to
another is a function preserving the order: a b implies f(a) f(b).
D-omega-CPO Denition 2.1.4. A poset (A, ) is a complete partial order (or, cpo, for short) if every countable chain
(also called -chain) has a least upper bound and A has a least element; we usually use for this
element. A map f : A B is continuous if it preserves joins of -chains.
theorem-Kleene Theorem 2.1.5 (Kleene). Let A be a cpo. Then every continuous endofunction F has the least xed
point
F = sup
n
F
n
().
Proof. First, an induction on n < shows that F
n
() F
n+1
(). So F
n
() : n < is
a chain. Write F for its join. By continuity, F(F) =
_
n
F(F
n
()). It is easy to check that
_
n
F
n
() =
_
n
F
n+1
(), and so F(F) = F. Thus, we have a xed point of F. If Fx x, then
we show by induction on n that F
n
() x; hence F x as well.
remark-prefixed Remark 2.1.6. More generally, a pre-xed point of F is an element x with Fx x; the argument
above proves that F is the least pre-xed point of F.
9
order-theoretic concept category-theoretic generalization
preorder (A, ) category A
x y and y x A and B are isomorphic objects
least element 0 initial object 0
monotone F : A A functor F : A A
pre-xed point: Fx x F-algebra: f : FA A
-chain functor from (, ) to A
F is continuous F preserves -colimits
least pre-xed point: Fx x initial F-algebra: : F(F) F
Figure 2: Generalizing Kleenes Theorem to categories figure-Kleene
In this paper, we are not really interested in Kleenes Theorem but in generalizations of it, and
in dualizations of those generalizations, etc. Figure
figure-Kleene
2 shows how we generalize the order-theoretic
concepts in Kleenes Theorem to the level of categories. In each line, the order-theoretic concept on the
left is a special case of the category-theoretic concept to its right. (To see this, recall that a pre-order
(P, ) is exactly a category in which every homset is either empty or singleton set.) Of special interest
is the generalization of the completeness condition on the poset and the continuity condition on the
function. We assume that every -chain, that is, a functor from to A has a colimit, and in particular
we consider the initial -chain shown in (
initialsequence
2.1).
definition-initialsequence Denition 2.1.7. By the initial -chain of an endofunctor F is meant the -chain
0
!

F0
F!

F
2
0
F
2
!


F
n1
!

F
n
0
F
n
!

F
n+1
0
F
n+1
!

(2.1) initialsequence
Here ! : 0 F0 is the unique morphism given by initiality. This diagram gives a functor from
(, ) to A.
We must mention that later in the paper we shall need transnite iterations of the initial sequence.
But in this section, we only consider the nite iterations as in (
initialsequence
2.1), along with the notions of cocone
and colimit, our next points.
A cocone over the initial -chain is an object A of A together with a family of morphisms a
n
:
F
n
0 A such that a
n
= a
n+1
F
n
! for all n < . A colimit of the initial -chain is a cocone
(C, c
n
: F
n
0 C) over it with the universal property that if (A,
n
: F
n
1 A) is any cocone over
the initial -chain, then there is a unique factorizing morphism f : C A such that for all n < ,
a
n
= f c
n
.
Notation
,
n
and
: F A
to be ad-
justed
everywhere.
constr:cocone Construction 2.1.8. Every F-algebra (A, ) induces a canonical cocone
n
: F
n
0 Aover the initial
-chain as follows:
0
: 0 A is unique (since 0 is initial) and
n+1
= F
n
: F(F
n
0) A. The
cocone property,
n
=
n+1
F
n
!, is easy to verify by induction. We call the cocone (A,
n
) the cocone
induced by A.
Let c
n
: F
n
0 F be the colimit of the initial -chain. Applying F to each object and morphism
in (
initialsequence
2.1) yields another -chain
F0
F!

F
2
0
F
2
!

F
3
0
F
3
!


F
n
!

F
n+1
0
F
n+1
!

F
n+2
0
F
n+2
!

(2.2) initialsequencetwo
10
which obviously has the same colimit as (
initialsequence
2.1).
This leads to the following result:
Theorem 2.1.9.
A74
[A74] Let A be a category with initial object 0 and with colimits of -chains. If
F : A A preserves -colimits, then it has the initial algebra
F = colim
n<
F
n
0.
theorem-initial-algebra-omega
Proof. If c
n
: F
n
0 F denotes the colimit cocone of (
initialsequence
2.1), then we can dene a unique morphism
: F(F) F by
Fc
n
= c
n+1
: F(F
n
0) F (n < ).
To check the initiality, let (A, ) be any F-algebra and consider the cocone
n
: F
n
0 A induced
by A. The unique morphism h: F A with h c
n
=
n
(n < ) is an F-algebra homomorphism:
the equality h = Fh follows, since (Fc
n
)
n<
is a colimit cocone, from each Fc
n
merging
the parallel pair h , Fh : F(F) A. Conversely, if k: F A is a homomorphism, then
k c
n
=
n
= h c
n
for all n < ; indeed, since c
n+1
= Fc
n
, this is easy to prove by induction.
Thus, k = h as desired.
Remark 2.1.10. To obtain an initial algebra of an endofunctor F, it is not really necessary that F
preserve all -colimits. It is sufcient to assume that F preserve the colimit of its initial -chain (
initialsequence
2.1)
(see the proof of Theorem
theorem-initial-algebra-omega
2.1.9 just above).
2.2 Examples of Initial Algebras
section-initial-algebras-examples section-HF
We present examples of initial algebras on Set obtained by nite iteration as in Theorem
theorem-initial-algebra-omega
2.1.9. We
discuss these at some length because the same functors will appear throughout the paper.
Example 2.2.1. The functor FX = X + 1. First, we consider this as a functor on Set. As such, it has
an initial algebra obtained as the colimit of the initial chain
0

1

1 + 1

1 + 1 + 1


So we may identify its n-th term with the natural number n. The colimit is the set Nof natural numbers,
with the algebra structure
: N+ 1 N (2.3) eq:nat
the isomorphism taking the right-hand summand 1 to 0 N, and taking the left summand N to itself
via the successor function.
Here are some additional details on these points. Under our identication, F
n
! : n n + 1 is
i i + 1 for 0 i < n. The colimit is the disjoint union of the factors, identifying points merged by
functions on the chain. In this case, this disjoint union is (n, i) : i < n, and we identify (n, i) with
(n +k, i +k) for all k. Then the colimit map c
n
: n Nis given by c
n
(i) = n i 1. To determine
the initial algebra structure : N + 1 N, we make two calculations using the fact that for all n,
Fc
n
= c
n+1
. Taking n = 0, we see that Fc
0
= c
1
. Thus 0 = c
1
(0) = (Fc
0
(0)) = (), where
is the unique element of 1. And for all n, we have n + 1 = c
n+2
(0) = (Fc
n+1
(0)) = (n).
11
Observe that classical induction on Nis precisely the statement that the algebra above is F. Indeed,
in order to dene a function g : N A, one needs only specify an element a A giving the value
f(0), and an endofunction of A for the recursion. These two data are precisely an algebra structure
A + 1 A for the functor FX = X + 1. The function they dene is exactly the unique algebra
morphism g : N A.
example-nat-1 examples-QA
Example 2.2.2. We consider the same functor FX = X + 1 but now on the category Pos of posets
and order-preserving functions. Here coproducts are disjoints unions of partially ordered sets, i. e., with
elements of different coproduct components incomparable. So our endofunctor takes a poset and adds a
fresh element incomparable to the elements of X. Then F
n
0 is 0, . . . , n 1 discretely ordered, and
F = N with the same structure as in (
eq:nat
2.3). There is also the functor FX = X

adding a new least


element to a poset. Here, F
n
0 is the linear order 0 < 1 < 2 < n 1 and F is N with the usual
order and the algebra structure with () = 0 and (n) = n + 1.
Similarly, we have the endofunctor FX = X

adding a new top element having F the set of


natural numbers with the reverse of the usual order: 0 > 1 > 2 > . example-nat-2
Example 2.2.3. Continuing with the same example functor FX = X + 1, we turn to the category
CPO

of cpos (with a least element ) and continuous functions preserving the least element. The
initial object is the one-point cpo 0 = . Notice that coproducts in CPO

are disjoint unions with


the least elements merged. So we have FX

= X, whence F

= 0 = . However, let 2 be the two-
chain, then for FX = X + 2 we see that F
n
0 is the at cpo 0, 1, . . . , n 1

, i. .e, n uncomparable
elements with the least element added, and F = N

is a at cpo, too. Next let FX = X

be the
endofunctor adding a fresh least element to a cpo. Then F
n
0 is the cpo 0 < 1 < 2 < n, and the
colimit is N

: the set N with the usual order and above all.


example-nat-3
Example 2.2.4. Let MS be the category of 1-bounded metric spaces and non-expanding maps. That is,
objects are sets endowed with a metric d : X X [0, 1] which satises
(i) d(x, y) = 0 iff x = y
(ii) d(x, y) = d(y, x)
(iii) d(x, z) d(x, y) +d(x, z) (the triangle inequality)
Morphisms are non-expanding functions, i. e., functions f : X X

such that for all x, y X,


d

(f(x), f(y)) d(x, y).


Coproducts are disjoint unions with distance 1 between points in different summands. The functor
FX = X+1 now has as an initial algebra the set Nof natural numbers, but as a discrete space: distinct
points have distance 1.
example-nat-MS
Example 2.2.5. We consider the full subcategory
CMS
of MS of complete metric spaces; i.e., such that every Cauchy sequence has a limit. This subcategory is
closed under the products and coproducts in MS, and it contains 0. Thus, once again X.(X + 1) = N
with the discrete metric.
12
The situation changes when we scale the metric by
1
2
(or by any other constant between 0 and 1).
Let
1
2
: MS MS scale a space by
1
2
. We now consider GX =
1
2
X + 1. This time the initial algebra
is a Cauchy sequence together with its limit point. As a subset of [0, 1], it may be identied with the
points below:

. . .

0
1
2
3
4
7
8
1
example-nat-CMS
rem:trees Remark 2.2.6. In the next example, and at many later points, we use trees to describe algebras and
coalgebras of special interest. Let us recall that a tree is a directed graph with a distinguished node
called the root from which every other node can be reached by a unique directed path. We always
identify isomorphic trees. Thus
x
y
z

G
G
G
G
and
1
2 3

G
G
G
G
are for us the same tree.
We distinguish between unordered trees, dened as above, and ordered trees. An ordered tree comes
with a linear order on the children of every node. In pictures, this linear order is the left-to-right order.
Thus the tree above on the left would represent the ordered tree with the order y < z on the children of
x. When we say just tree we always mean an unordered tree.
A node is a leaf if it has no children. A tree is binary if every node which is not a leaf has precisely
two children.
Example 2.2.7. Let FX = (X X) + 1. When dealing with this functor and related ones, it is often
useful to adopt a graphical notation. We shall draw (x, y) X X FX as
x
y

G
G
G
G
G
We start with F
0
0 = . Now we picture the elements of F
i
0 for i = 1, 2, and 3:
F
1
0 :
F
2
0 : ,

G
G
G
G
G
G
F
3
0 : ,

G
G
G
G
G
G
,

G
G
G
G
G
G
G

G
G
G
G
G
G
,


G
G
G
G
G
G

G
G
G
G
G
G
,

G
G
G
G
G
G
G

!
!
!
!
!
!
A
A
A
A
A
A
!
!
!
!
!
!
A
A
A
A
A
A
Then the carrier of the initial algebra F may be taken to be the union

n<
F
n
0:
X.(X X) = all nite binary ordered trees.
The structure map
: (F F) + 1 F
is given by tree tupling as the left-hand component, and the unique element of 1 is taken to the single
node tree. example-tree-pictures-one
13
Example 2.2.8. We return to the category MS introduced in Example
example-nat-MS
2.2.4. In this category, products
X X

are cartesian products with the maximum metric:


d((x, x

), (y, y

)) = maxd(x, y), d

(x

, y

).
Thus, FX = X X + 1 can be considered as an endofunctor of MS. Its initial chain is
0

1

(1 1) + 1

((1 1) + 1) ((1 1) + 1) + 1


the same as that of Example
example-nat-1
2.2.1, but with each set F
n
0 taken to be the discrete space: all distances
between distinct points are 1. The colimit is then, not surprisingly, F of all binary trees equipped with
the discrete metric. example-nat-4
Example 2.2.9. Let us now study the same functor FX = X X + 1, but now on the category CMS
of complete metric spaces. As we have seen the colimit of the initial
op
-chain for this functor on MS
is the set of all nite binary trees with the discrete metric. The same goes for CMS.
The situation changes when we consider the scaled functor as in Example
example-nat-CMS
2.2.5. This would be the
functor
GX =
1
2
(X X) + 1.
Here G
n+1
0 consists of pairs of ordered trees (t
1
, t
2
) G
n
0 G
n
0 and of the single node tree, whose
distance from any (t
1
, t
2
) is 1. And the distance between (t
1
, t
2
) and (s
1
, s
2
) is the maximum of the
distances d(t
i
, s
i
), i = 1, 2, in G
n
0 scaled by
1
2
. From this it follows that G
n
0 can be described as the
set of all binary trees of depth less than nwith the metric
d(t, u) =
_
2
k
if t ,= u
0 if t = u
(2.4) eq:treemet
for the least number k such that t and u have the same cuttings at level k.
The colimit of the initial -chain G
n
0 (of isometric embeddings) in MS is, then, the space of all
nite binary ordered trees with the above metric (
eq:treemet
2.4).
However, this space is not complete. In fact, every innite binary tree t yields a Cauchy sequence
t
0
, t
1
, . . ., where t
k
cuts t at level k. It is not difcult to see that the colimit in CMS of G
n
0 is
G = the set of all (nite and innite) ordered binary trees, with the metric (
eq:treemet
2.4) above
We shall see a more general reason for this in Section
section-CMS
2.9 below.
Example 2.2.10. The functor FX = M X, where M is a xed object in one of our categories.
(i) As an endofunctor on Set, F = . The same holds in Pos, MS, and CMS.
(ii) We next consider the situation in CPO

. For a cpo M the initial chain


M

M M


The tuples in each factor are ordered componentwise. We write M

for the set of sequences of


elements of M. The colimit in Pos is the set of elements in M

which have all but nitely many


14
components equal to . This is not a cpo: every innite word (m
0
, m
1
, . . . , ) M

is a join of
a chain:
(m
0
, m
1
, . . .) =

k
(m
0
, m
1
, . . . , m
k1
, , , . . .).
With a litte more work, it can be shown that
X.(M X) = M

.
The algebra structure M M

adjoins a new head to a sequence in the evident manner.


example-product-CPO
ex:poly Example 2.2.11. Polynomial functors. Let be a (possibly non-nitary) signature, that is, a set to-
gether with arities, which are cardinals assigned to members of . So is a family
k
indexed by
cardinal numbers k.
We denote by H

the corresponding polynomial functor


H

X =

k
X
k
where the coproduct ranges over all cardinals k with
k
,= . An algebra for H

is a general -algebra:
a set A equipped with a family of functions (called operations) f

: A
k
A indexed by
k
.
As an example we consider the algebras of -trees. By a -tree is meant an ordered tree with nodes
labelled in in such a way that every node with n children is labelled by an n-ary symbol. We can form
the -algebra
T

= all -trees
whose -operations are given by tree tupling.
For nitary signatures (i. e.,
k
,= holds for nite cardinal numbers only), the initial chain yields
H

= F

= the algebra of nite -trees,


(for innitary signatures we describe H

in Example
E-initial-polynomial
3.1.7 below). In fact, we can identify H
1

0 =
H

=
0
with the set of one-point trees labelled by an element of
0
, and
H
2

0 = H

(
0
) =
0
+

k>0

k

k
0
with the set of all -trees of depth at most 1; more generally, H
n

0 with the set of -trees of height less


than n. We obtain the chain of inclusion maps
H
1

0 H
2

0
whose colimit (union) is F

.
example-polynomial-endofunctor
ex:Pk Example 2.2.12. For any cardinal , P

: Set Set is dened by taking a set to the collection of


all subsets of size < , and on functions by image sets. (That is, for a X and f : X Y ,
P

f(a) = f[a] = f(x) : x a.) When = , we write P


f
in lieu of P

. For , P

preserves
-colimits, and so we may obtain an initial algebra by the initial sequence.
(1) The nite power set endofunctor P
f
: Set Set will be of special interest in this paper. Its initial
sequence is


,


15
This sequence is also written
V
0

V
1

V
2



where V
0
= , and V
n+1
= PV
n
.
Hence P
f
= V

where V

=

n<
V
n
. The algebra structure is the identity: observe that
P
f
(V

) = V

. V

is also called the set of hereditarily nite (well-founded) sets. These are the sets
which are well-founded and have a nite transitive closure. (That is, all elements are nite, all elements
of elements are nite, etc.)
(2) An alternative important representation of P
f
is by nite extensional trees. Recall from Re-
mark
rem:trees
2.2.6 that trees are considered up to isomorphism.) A tree is extensional if for every pair of
children of a given node the two corresponding subtrees are different. Every unordered tree has an ex-
tensional quotient obtained by successively identifying children of a given node with the same subtrees.
(See also Section
sec:powfin
2.5 for more on extensional and strongly extensional quotients of trees.)
Observe that if P
f
() is represented by the singleton tree, then we have a natural representation of
P
n
f
() by all nite extensional trees of depth less than n: the tree representing a set x
1
, . . . , x
n
has n
children (representing x
i
):
P
1
f
() = is represented by
P
2
f
() = , is represented by

P
3
f
() = , , , , is represented by

G
G
G
G
G
G

Etc. Therefore, we obtain


P
f
= all nite extensional trees
with the algebra operations P
f
(P
f
) P
f
given by tree tupling.
(3) We analogously have the functor P
3
of all subsets of at most two elements.
P
3
= all nite extensional trees with branching degree at most 2.
Alternatively, P
3
is given by all binary (unordered) trees: we represent a subset a, b by the binary
tree with children a and b. Thus, P
3
3
() is nowrepresented by the trees corresponding to , , , ,
as follows:

G
G
G
G
G
G

G
G
G
G
G
G
!
!
!
!
!
A
A
A
A
A
!
!
!
!
!
A
A
A
A
A

G
G
G
G
G
G
!
!
!
!
!
A
A
A
A
A
It is not surprising that we have two (quite natural) representations of P
3
: recall that initial algebras
are only unique up to isomorphism.
16
Example 2.2.13. A bag is a pair (X, b), where X is a set and b : X N has the property that for all
but nitely many x, b(x) = 0. (These are also called nite multisets.) The size of (X, b) is

xX
b(x).
A morphism of bags m : (X, b) (Y, c) is a function m: X Y with c(y) =

m(x)=y
b(x) for all
y Y .
We have a functor B : Set Set taking X to the bags on X. It preserves -colimits, and so
Theorem
theorem-initial-algebra-omega
2.1.9 applies. The set B has a single element which we represent as the single-node tree.
Given a representation of B
n
by (unordered) trees, represent B
n+1
as follows: every bag consisting
of trees t
1
, . . . , t
n
B
n
with multiplicities k
1
, . . . , k
n
is represented by the tree having k
i
children
given by t
i
for i = 1, . . . , n. Thus, BB are all trees

G
G
G
G
G
G

G
G
G
G
G
G

and B
3
are all nite trees of depth at most 2, etc.
The colimit of the initial sequence is again the union. The initial algebra B can be described as the
algebra of all nite (unordered) trees.
E-bags
Example 2.2.14. Generalizing several of the above examples, we recall the concept of an analytic
functor introduced by Andre Joyal
joyal81,joyal86
[J1, J2]: given a group G of permutations on k = 0, . . . , k 1, we
denote by X
k
/G the set of orbits under the action of G on X
n
by coordinate interchange, i. e., X
n
/G
is the quotient of X
n
modulo the equivalence
G
with (x
1
, . . . , x
n
)
G
(x
p(1)
, . . . , x
p(n)
) for each
p G. The analytic functors are precisely the coproducts of functors of the form X
k
/G: in symbols,
an analytic functorF is of the form
FX =

X
k
/G

, (2.5) eq:analytic
where is a nitary signature, k the arity of and G

a group of permutations on k. Thus, every


polynomial functor H

is analytic, and P
3
is analytic:
P
2
X = 1 + (X X)/S
2
,
where S
2
is the symmetric group of order 2. In contrast, P
f
is not analytic. But an important example
is the bag functor
BX =

kN
X
k
/S
k
, (2.6) eq:bagfin
where S
k
is the symmetric group of all permutations on k, is analytic.
E-analytic
For every analytic functor F the initial -chain yields a quotient of the algebra F

of Exam-
ple
example-polynomial-endofunctor
2.2.11.
F = F

/
where is the least equivalence such that for every tree t F

, every node x of t labelled by


and every member g of the group G

for we have t t

, where t

is obtained from t by permuting the


children of x according to g.
In fact, this is completely analogous to Example
example-polynomial-endofunctor
2.2.11. We identify F
1
0 =
0
with one-point trees
labelled in
0
. And since F
n+1
0 =

(F
n
0)
k
/G

, where is a k-ary symbol, we can identify, for


every n N, the set F
n
0 with the quotient of the set of all -trees of depth less than n modulo the
17
above equivalence . We again obtain a chain of inclusion maps whose colimit (union) is F

/. This
is illustrated by the cases B in Example
E-bags
2.2.13 and P
3
in Example
ex:Pk
2.2.12(3).
The examples presented so far are probably the main ones for our paper. We mention an additional
example of initial algebra obtainable by iteration via the initial chain in a category different from Set.
ex:BiP Example 2.2.15. Here is an example on a category which will re-appear in Section
section-real-intervals
6.1. Let BiP be the
category of bipointed sets: objects are sets with distinguished elements and that are required to
be different. A morphism in BiP is a function preserving the distinguished points. There is a binary
operation on BiP taking (X,
X
,
X
) and (Y,
Y
,
Y
) to the disjoint union X +Y , identifying
X
and
Y
, and then using as distinguished points
X
and
Y
. Then FX = XX extends to an obvious
functor.
One example of an F-algebra is the the set D of dyadic rationals in [0, 1] with 0 as and 1 as .
The algebra structure d: FD D takes x in the left-hand copy of D to
x
2
and y in the right-hand copy
to
y+1
2
. Then (D, d) is an initial F-algebra. One way to see this is to check that F preserves -colimits,
and then to build an isomorphism between (D, d) and the algebra obtained by iteration.
example-BiP
Continuing with a discussion of examples of initial algebras obtained by -iteration on categories
other than Set, we mention a result implying that for some special categories, every endofunctor has an
initial algebra obtained that way.
Denition 2.2.16 (Freyd).
freyd:Springer
[Fr1] A category is called algebraically complete if every endofunctor has
an initial algebra.
T-alg-complete
Theorem 2.2.17 (Ad amek
adamek1995
[Ad
1
]). The categories Set
c
(countable sets and functions), Rel
c
(countable
sets and relations), and K-Vec
c
(countably-dimensional vector spaces over a eld K and linear func-
tions) are algebraically complete; moreover, for every endofunctor F:
F = colim
n<
F
n
0.
P-alg-complete
Remark 2.2.18. (i) Every complete lattice is algebraically complete by the classical xed-point theorem
of G. Birkhoff.
(ii) Among categories with products there are essentially no other examples:
Theorem 2.2.19 (Ad amek and Koubek
ak79
[AK79]). Every algebraically complete category with products
is equivalent to a preorder.
T-alg-complete-products
The following beautiful proof was provided by Peter Freyd, see
freyd:Springer
[Fr1]: suppose A has products and
is not equivalent to a preorder. That is, some hom-set A(A, B) has at least two elements. Then the
functor
FX = B
S(X)
(power of B to the set S(X))
where
S = Set(A(A, ), 2): A Set
op
does not have xed points. In fact, assuming D FD, we conclude that A(A, D) is isomorphic to
A(A, D) A(A, FD) A(A, B)
S(D)
.
But the cardinality of the right-hand side is at least
2
S(D)
2
2
A(A,D)
a contradiction.
18
2.3 Terminal coalgebras
section-final-coalgebra-finite-iteration
It is straightforward to dualize the general results of the last section. Recall from Section
sec:introcoalg
1.2 that a
coalgebra for an endofunctor F is an object A together with a morphism a: A FA. One dualizes
initial objects 0 to terminal objects 1, -chains to
op
-chains (that is, functors from
op
to A), colimits
to limits, and the initial -chain of Denition
definition-initialsequence
2.1.7 to the terminal
op
-chain given by
1 F1
!

F
2
1
F!


F
2
!

F
n
1
F
n1
!

F
n+1
1
F
n
!


F
n+1
!

(2.7) terminalsequence
Notation 2.3.1. We denote by

n
: lim
i
op
F
i
1 F
n
1
the projections of the limit of the terminal
op
-chain of F. If F has a terminal coalgebra, we denote it
by
F or X.F(X).
constr:cone Construction 2.3.2. Dually to Construction
constr:cocone
2.1.8 every coalgebra : A FA induces a canonical
cone over the terminal
op
-chain of F by induction:
0
: A 1 is uniquely determined and
n+1
=
F
n
: A F
n+1
1.
It is worthwhile putting down the dual statement of Theorem
theorem-initial-algebra-omega
2.1.9. This was rst explicitly formu-
lated by Michael Barr
barr
[Barr]:
thm:finalconstr Theorem 2.3.3. Let Abe a category with terminal object 1 and with limits of
op
-chains. If F : A A
preserves limits of
op
-chains, then it has the terminal coalgebra
F = lim
n
op
F
n
1.
theorem-terminal-chain
Remark 2.3.4. It is sufcient to assume that F preserves the limit of its terminal chain.
R-terminal-chain
We revisit the examples from Section
section-initial-algebras-examples
2.2.
ex:terminal Examples 2.3.5. (i) The functor FX = X + 1 on Set. The terminal chain is
1 1 + 1

1 + 1 + 1

The n-th term may be identied with n = 0, 1, . . . , n 1, and the connecting function F
n
! =
f
n
: n + 1 n is then given by f
n
(i) = i for i < n, and f
n
(n) = n 1. The limit of this
chain is the set of -tuples (x
0
, . . . , x
n
, . . .) with f
n
(x
n+1
) = x
n
for all n. One such tuple is
= (0, 1, 2, . . .). Every other tuple is of the form (0, 1, . . . , k, k, . . . , k, . . .). Thus we describe
the terminal coalgebra as
X.(X + 1) = N

,
the set of natural numbers with an element added. The coalgebra structure N

+ 1 has
as a xed point, sends 0 to the point in the right summand 1, and is otherwise the predecessor
function on N.
A coalgebra for FX = X + 1 is a set A together with a partial endofunction (a function from
A to A + 1, where we think of the element of 1 as an undened element). Thus we get the
19
following dual to classical induction on Nas we have seen it in Example
example-nat-1
2.2.1: in order to dene
a function f : A N

, all we need is a partial endofunction : A A on A. Then f is the


unique coalgebra morphism from (A, ) to N

. Explicitly, if there is some n such that


n
(a) is
undened, then f(a) = n 1 for the least such n. Otherwise
n
(a) is dened for all n, and we
have f(a) = .
As a concrete example of this method of denition by corecursion , let be a set which we think
of as an alphabet, and let

be the set of all nite and innite words on . We can dene the length function l :

as soon as we specify a partial function :

. We take (w) to be the tail of w if w is


not-empty; that is, removes the rst letter whenever possible. Then the resulting l :

is the desired length function, and l(w) = for innite words w.


(ii) The functor FX = X+1 on Pos. Here the terminal coalgebra is N

with the discrete order. The


structure is the same map as in item (i) above.
The functor FX = X

(cf. Example
example-nat-2
2.2.2) has F = N

with the usual order 0 < 1 < 2 <


< and the same structure as before.
(iii) The functor FX = X + 1 on CPO

essentially is the identity functor, whence F = 1 = .


The functor FX = X

has as terminal coalgebra the same poset as in item (ii) above. This is not
surprising: CPO

is closed in Pos under limits (but not colimits).


(iv) On the category MS of 1-bounded metric spaces, the terminal coalgebra of the same functor
FX = X + 1 is again N

, this time with a discrete metric. The structure is the same as we have
seen.
(v) On CMS, the terminal coalgebra of FX = X + 1 is what we saw in item (iv) just above. When
we change the functor to scale the metric by
1
2
in each summand, we get the same complete metric
space that we had Example
example-nat-CMS
2.2.5. However, the structure is the inverse. This is an example of a
more general phenomenon that we shall explore in Section
section-CMS
2.9 below.
ex:stream Example 2.3.6. The functor FX = M X where M is a xed (but arbitrary) object in the category.
On Set, we identify each set with its product with a singleton and therefore write the terminal chain as
1 M

M M

M M M

The connecting morphisms are all the projections onto the left-most factors. We obtain as a limit the set
of all streams on M, also known as the innite words on M:
X.(M X) = M

.
The coalgebra structure M

M M

is head, tail), where


head(a
1
, a
2
, a
3
. . .) = a
1
tail(a
1
, a
2
, a
3
. . .) = (a
2
, a
3
. . .)
20
As a concrete example, take M = R, the set of real numbers. A coalgebra for RX is then a set A (of
states) and a function : A R A. We think of the coalgebra as an automaton which, in each state,
yields an output number and then proceeds to the next state. Here are two examples:
7654 0123

7654 0123
0
7654 0123
1

7654 0123
1

7654 0123
0

One way to represent real valued streams is by taking the set A of real analytic functions, see
pe
[PE].
Here one considers f : R R such that for every n there is an open interval around 0 such that f

(x)
is in the interval, and f agrees with its Taylor series. The coalgebra structure on A is given by
(x) ((0),

(x))
for every analytic function. This coalgebra is isomorphic to the a subcoalgebra of the stream coalgebra
that we saw above; to every analytic function (x) one associates the stream of coefcients of the
Taylor series of (x), i. e., A is isomorpic to the subcoalgebra of those streams in R

such that

i=0

i
i!
x
i
< . The above automata thus present analytic functions by corecursion. In the coalgebra
on the left, we have a function whose value at 0 is r and equal to its own derivative: (x) = re
x
. On
the right, we obtain four functions:
sin x, cos x, sin x, cos x.
example-R-times-final
ex:trees Example 2.3.7. For every signature the terminal
op
-chain for the functor H

yields the terminal


coalgebra
H

= T

of all (ordered, nite and innite) -trees. This holds not only for the nitary case but for general
signatures:
In fact, let us identify 1 = H
0

1 with the set consisting of the singleton tree labelled by a symbol


/ . Then H
1

1 =

k
1
k
can be identied with the set of all trees of depth 1 whose
root is labelled in and whose k (for root label of arity k) leaves are labelled by . Analogously
H
2

1 =

k
(H

1)
k
are trees with a root labelled in
k
and the k subtrees are the above trees in
H
1

1; thus all leaves of depth 2 have label etc. Put

= + , with nullary. We see that for


every n < we can identify
H
n

1 = all

-trees of depth at most n with all leaves at depth n labelled by .


Moreover, the connecting map
H
n+1

H
n

1
simply cuts the -labelled leaves away and relabels all leaves of depth n by . Now the limit of this

op
-chain is
H

1 = T

,
the set of all -trees, with the limit cone T

H
n

1 given by cutting all trees at level n and labelling


all leaves of depth n by .
We revisit this example in Section
section-CMS
2.9 where we use metrics on trees.
21
Example 2.3.8. A deterministic automaton with input set S is a set A (of states) and the next-state
function A S A that we can write in the curried form A A
S
, plus the predicate A 0, 1
of accepting states. This can be viewed as a coalgebra for FX = 0, 1 X
S
. This is the polynomial
functor of two S-ary operations. Applying the previous example we see that the terminal coalgebra
consists of all labellings of nodes of the complete S-ary tree by 0 or 1. Now the complete S-ary tree can
be represented by the set S

of all words over S: the empty word is the root, and the children of every
node x
1
x
n
are all the nodes x
1
x
n
y where y ranges over S. In this sense a binary labelling of the
complete S-ary tree is simply a subset of S

. We get that
F = PS

is the coalgebra of all formal languages on M.


E-terminal-acceptor
E-analytic-terminal Example 2.3.9. For every analytic functor F (see Example
E-analytic
2.2.14) the terminal coalgebra is obtained
by the terminal
op
-chain. In fact, it is easy to derive from the formula (
eq:analytic
2.5) that analytic functors
preserve limits of
op
-chains. We will see a description of this terminal coalgebra in Example
ex:infeq
2.7.6(iii)
below. The following example is a special case.
E-bags-final Example 2.3.10. The bag functor B of Example
E-bags
2.2.13 has the terminal coalgebra
B = all nitely branching unordered trees.
In fact, we can identify B
n
1, analogously as in Example
ex:trees
2.3.7, with all unordered nitely branching
trees of depth n whose leaves at level n are labelled by , The limit B is then as stated.
E-terminal-powfin Example 2.3.11. The nite power-set functor P
f
is an example of a set functor which does not preserve
limits of
op
-chains, and, moreover, the limit of its terminal
op
-chain is not the terminal P
f
-coalgebra,
see
ak95
[AK95]. We will describe the terminal coalgebra below, see Section
section-weak
2.4.
2.4 Weakly terminal coalgebras, and nitary functors
section-weak
This section blends several topics. One aim is to present constructions of the terminal coalgebra for
the nite power set functor P
f
(we eventually get to that in Example
ex:descr
2.4.19, Theorem
thm:worrell
2.6.3 and Ex-
ample
ex:infeq
2.7.6(ii)). Unfortunately, this functor does not preserve limits of
op
-chains, and the terminal
coalgebra is not obtained as the limit of the terminal
op
-chain, cf. Theorem
theorem-terminal-chain
2.3.3. It would be possible
to directly construct P
f
, but we have chosen a more general and expansive presentation. The other
ideas in this section are those of a weakly terminal coalgebra, nitary functors, and congruences.
Denition 2.4.1. Let F : A A be an endofunctor on an arbitrary category. An F-coalgebra A is
weakly terminal if for every coalgebra B there is at least one homomorphism of B into A.
example-weak-final-1 Examples 2.4.2. (i) The terminal coalgebra of the identity functor Id : Set Set is the singleton
coalgebra. A coalgebra : A A is weakly terminal iff has a xed point.
(ii) If A is a weakly terminal coalgebra and f : A B a coalgebra homomorphism, then B is again
weakly terminal.
22
(iii) We next consider the nite power-set functor P
f
: Set Set. The coalgebra T

of all ordered
nitely branching trees is weakly terminal for P
f
. The corresponding coalgebra structure :
T

P
f
T

is dened by
2
(t) = t
x
: x a child of the root of t (2.8) eq:deltaS
Indeed, recall that every P
f
-coalgebra A is considered to be a nitely branching graph: the func-
tion : A P
f
A gives to every node x the set (x) of all neighbors. From every coalgebra we
have a canonical, albeit not unique homomorphism h into T

. It maps every vertex x of A to its


tree unfolding obtained by breadth-rst search starting in x. It is easy to see that h is a homomor-
phism. But it is not unique: the one-point loop graph has many homomorphisms; for example
we can map it to the innite binary tree and to the innite chain. We shall see in Example
ex:descr
2.4.19(i)
below a quotient of T

which is a terminal coalgebra.


(iv) The power-set functor P : Set Set does not have a weakly terminal coalgebra. Indeed, from a
weakly terminal coalgebra we can always construct a terminal one, see Theorem
thm:cong
2.4.16.
An important source of weakly terminal coalgebras stems from presentations of set functors F as
quotients of polynomial functors H

. Recall that quotients of an object A in a category are (represented


by) epimorphisms with domain A; here this means natural transformations with domain H

having all
components surjective.
def:pres Denition 2.4.3. An epitransformation G F is a natural transformation having epimorhic compo-
nents. By a presentation of a set functor F we mean a signature and an epitransformation : H


F.
ex:pres Examples 2.4.4. (i) We shall be using a presentation of P
f
given by the signature having, for each
n, just one function symbol
n
of arity n. Thus,
H

X =

n<
X
n
= X

.
The natural transformation : H

P
f
is given by

X
(x
1
, . . . , x
n
) = x
1
, . . . , x
n

(ii) A presentation for the bag functor B can easily be obtained from (
eq:bagfin
2.6). Take the same as
in the previous item and let
X
: H

X BX be given as the coproduct of the quotients


X
n
X
n
/S
n
, n N, where S
n
is the symmetric group.
(iii) The Aczel-Mendler (see
aczelmendler:89
[AcM]) functor ()
3
2
is given by
(A)
3
2
= (a, b, c) AAA : (a = b) or (a = c) or (b = c).
Note that if (a, b, c) (A)
3
2
and f : A B, then (fa, fb, fc) (B)
3
2
. We therefore take the
action of ()
3
2
on morphisms by pointwise application, as expected. For a presentation of ()
3
2
we take to have three binary symbols, say , , and . Then we dene : H

()
3
2
by:

A
((a, b)) = (a, a, b),
A
((a, b)) = (a, b, a), and
A
((a, b)) = (b, a, a).
2
From now on we often write tx for the subtree rooted at a node x of a tree t.
23
Observation 2.4.5. Note that every presentation : H

F induces an embedding from the category


of H

-coalgebras to the category of F-coalgebras by post-composition:


( A

A ) ( A

A

A

FA ).
For example, the terminal coalgebra H

= T

of all -trees can be understood as an F-coalgebra.


Lemma 2.4.6. Let : H

F be a presentation of the functor F : Set Set. Then the F-coalgebra


T

is weakly terminal.
lemma-weak-presentation
Proof. Let : A FA be any F-coalgebra. Since
A
: H

A FA is a surjection, we can choose a


morphism m : FA H

A such that
A
m = id. So we obtain an H

-coalgebra m : A H

A.
We thus have an H

-coalgebra homomorphismh : A T

, and we show that h is also an F-coalgebra


homomorphism from (A, ) to (T

,
T

), where : T

is the structure of the terminal


coalgebra for H

. Indeed, consider the diagram below:


A
m

A

A

FA
Fh

ED GF

T

FT

The top commutes because


A
m = id, the square on the left by denition of h, and the one on the
right by naturality of . Thus the outside commutes, showing h to be a morphism of F-coalgebras.
ex:weak Examples 2.4.7. (i) The coalgebra T

of all nitely branching trees is weakly terminal for P


f
. We
saw this in Example
example-weak-final-1
2.4.2(iii). But we can also apply Lemma
lemma-weak-presentation
2.4.6 to the presentation of P
f
in
Example
ex:pres
2.4.4(i).
(ii) The functor P
c
of countable subsets can be presented by the signature with one -ary symbol
and one constant c. The natural transformation has components
X
: X

+ 1 P
c
X that
take (x
n
)
n<
to x
n
[ n < and the element of the right-hand component to P
c
X. Thus,
we see that the terminal H

-coalgebra of all countably branching trees is weakly terminal for P


c
.
Recall that the main point of this section is to investigate terminal coalgebras for P
f
. One key
property that this functor enjoys is that it is nitary, and practically all results about P
f
in this paper
generalize to the setting of nitary functors. For general functors nitary means preservation of
ltered colimits, see Section
section-finitary
4.2. below. For endofunctors on Set we use the following denition
(which is equivalent, see
ap
[AP04]):
For nitary endofunctors we shall prove that the limit of their terminal
op
-chain is a weakly termi-
nal coalgebra (which is in general not a terminal coalgebra).
Denition 2.4.8 (
ap
[AP04]). An endofunctor F of Set is called nitary if for each element x FX there
exists a nite subset M X such that x Fi[FM] where i : M X is the inclusion map.
ex:fin Example 2.4.9. (i) For a signature the polynomial functor H

is nitary iff is a nitary signa-


ture.
24
(ii) If F is nitary, then we have a presentation by a nitary signature . Indeed, given F let be
the signature dened by
n
= F(n) for all n N. Dene
X
: H

X FX by assigning to
f : n X in the summand X
n
corresponding to
n
the value
X
() = Ff(). It follows
immediately that
n
is surjective for each n N, and since F is nitary, we conclude that all
components are surjective.
lem:fin Lemma 2.4.10 (
ATbook
[AT]). Let F : Set Set. Then the following are equivalent:
(i) F is nitary.
(ii) There is a nitary signature such that F is a quotient of H

.
Finitariness is an important concept, and we shall see later that the equivalent formulations above
can also be stated in more general categories: see Sections
section-bounded-set-functor
4.1 and
section-finitary
4.2.
Now let F : Set Set be an endofunctor and recall the terminal
op
-chain for F (see (
terminalsequence
2.7)) in
Section
section-final-coalgebra-finite-iteration
2.3). Let us denote its limit by
F

1 = lim
n
op
F
n
1 with limit projections
n
: F

1 F
n
1 for all n
op
.
Then we obtain a unique map m : F(F

1) F

1 having the property that for all n, the triangles


below commute:
F(F

1)
m

Fn

u
u
u
u
u
u
u
u
u
u
F

n+1
v
v
v
v
v
v
v
v
v
F
n+1
1
(2.9) diag:m
The above limit F

1 is the terminal F-coalgebra whenever it is preserved by F. We shall prove


below that F

1 is a weakly terminal coalgebra whenever the cone F


n
, n
op
, is collectively monic:
for every pair f, g : X F(F

1) if F
n
f = F
n
g holds for all n
op
then f = g. For nitary
endofunctors the cone F
n
is indeed collectively monic, see the proof of Lemma
lem:mono
2.4.12 below.
lem:finsub Lemma 2.4.11. Let
n
: L L
n
be a limit cone of an
op
-chain in Set. For every nite subset
f : S L there exists n such that
n
f is a monomorphism.
Proof. Recall that L may be taken to be the set of functions g with domain such that for all n,
g(n) L
n
and such that for all n,
n+1,n
(g(n + 1)) = g(n). Moreover, we have
n
(g) = g(n) for all
n.
Let a and b be different members of f[S]. We think of a and b as functions on the natural numbers,
and each
n
works by applying these to the number n. Since a ,= b, we must have some n = n(a, b)
such that
n
(a) = a(n) ,= b(n) =
n
(b). And for all m > n, we also have
m
(a) ,=
m
(b). The set
S = (a, b) f[S] f[S] : a ,= b
is also nite, and so maxn(a, b) : (a, b) S is a natural number, say k. For this k,
k
f is
injective.
lem:mono Lemma 2.4.12 (Worrell
worrell:05
[W2]). Let F : Set Set be nitary. Then m : F(F

1) F

1 in (
diag:m
2.9) is a
split monomorphism.
25
Proof. The desired statement holds trivially if F is constantly . If not, then clearly F1 ,= , thus, there
exists a coalgebra : 1 F1. The canonical cone
n
: 1 F
n
1 of Construction
constr:cone
2.3.2 induces a
morphism

: 1 F

1. This proves F

1 ,= .
We now prove that (F
n
) is a collectively monomorphic cone. Let x, y F(F

1). Assuming that


for all k, F
k
(x) = F
k
(y), we show that x = y. By the assumption that F is nitary, there is a nite
subset f : S F

1 and x

, y

FS such that x = (Ff)x

and y = (Ff)y

. Without loss of generality


we may assume that S is non-empty. We see that
(F
k
Ff)x

= F
k
(x) = F
k
(y) = (F
k
Ff)y

.
By Lemma
lem:finsub
2.4.11, there exists some n such that
n
f is injective. Functors on Set preserve injectivity
of maps with non-empty domain because they are split monomorphisms. Thus, F(
k
f) is injective.
So x

= y

, and thus x = y.
From the denition (
diag:m
2.9) of m it now follows that it is monic. It is a split mono since F(F

1) ,=
(indeed, consider F

: F1 F(F

1).
prop:weakly Proposition 2.4.13. For every nitary endofunctor F the coalgebra on F

1 given by an arbitrary split-


ting of m is weakly terminal.
Proof. Let m : F

1 F(F

1) be a splitting of m, i. e., m m = id. Let : A FA be a


coalgebra. From Construction
constr:cone
2.3.2 we know, we have a cone
k
: A F
k
1 satisfying
0
= ! and

k+1
= F
k
. This cone then yields a unique h : A F

1 such that for all k,


k
h =
k
. Notice
also that
k+1
m = F
k
implies
k+1
= F
k
m.
We wish to prove that Fh = mh. Because the cone (F
k
) is collectively monic, it is sufcient to
show that for all k, F
k
Fh = F
k
m h. As the two computations below show, both compositions
are
k+1
:
F
k
Fh = F
k

=
k+1
F
k
m h =
k+1
h
=
k+1
This completes the proof.
Recall that one of the goals in this section is to construct a terminal coalgebra for the nite power set
functor P
f
. At this point, we have only a weakly terminal coalgebra. One construction involves taking
a quotient of a weakly terminal coalgebra, and we turn to this next.
Denition 2.4.14. Let : A FA be a coalgebra, and let A be a quotient of A represented by an
epimorphism e : A A. We say that e is a congruence if there is an (obviously unique) coalgebra
structure : A FA making e a coalgebra homomorphism:
A

FA
Fe

FA
Since we are dealing with sets in this section, we often identify the epimorphism e with its kernel
equivalence given by a b iff e(a) = e(b). We write A/ for the above coalgebra A.
26
ex:zigzag Example 2.4.15. Let G be a nitely branching graph, considered as a coalgebra for P
f
. A congruence
on Gis then precisely an equivalence relation on Gwhich is also a graph bisimulation, i. e., a relation
R GG on the nodes such that whenever xRy, then
for every child x

of x there is some child y

of y such that x

Ry

, and
for every child y

of y there is some child x

of x such that x

Ry

.
(2.10) eq:zigzag
We leave the easy proof of the fact that bisimulation equivalences are precisely the congruences to the
reader.
Although we will not be using the concept of bisimulation in this section, we remind readers familiar
with it that the largest bisimulation relation on a graph is always an equivalence relation, and hence a
congruence of P
f
-coalgebras.
thm:cong Theorem 2.4.16. Let F be an endofunctor of Set. Then for every weakly terminal coalgebra A there
exists the largest congruence , and the coalgebra A/ is terminal.
rem:cong Remark 2.4.17. Notice that the statement of the above theorem holds for endofunctors on every co-
complete and cowellpowered category. The proof is a standard argument using Freyds Adjoint Functor
Theorem, we include it for completeness.
Proof. Let : A FA be a weakly terminal coalgebra. Since Set fulls both conditions in Re-
mark
rem:cong
2.4.17, there exists the greatest congruence e : A A: take the join of all congruences in the
complete lattice of all quotients of A; this is easily seen to be a congruence. The unique : A FAfor
which e is a coalgebra homomorphism is, obviously, a weakly terminal coalgebra (since A is, cf. Exam-
ple
example-weak-final-1
2.4.2(ii)). It remains to prove that if f, g : B A are two coalgebra homomorphisms, then f = g.
To this end, take the coequalizer k : A

A of f and g. Then since f and g are coalgebra homomor-
phisms, Fk merges them, and consequently there exists a unique coalgebra structure :

A F

A
such that k is a coalgebra homomorphism. Thus, k e : A

A is a congruence on A, but the choice of
e as the largest congruence implies that k is an isomorphism. Therefore f = g, as desired.
ex:fincong Example 2.4.18. For every nitary functor F with a presentation H

F we see that F is the


quotient of the weakly terminal coalgebra T

of all -trees (cf. Lemma


lemma-weak-presentation
2.4.6) modulo the largest
congruence . In Section
sec:quotient
2.7 below we shall provide a more explicit description of .
ex:descr Examples 2.4.19. We now have several descriptions of the terminal coalgebra for P
f
.
(i) As a quotient T

/ of the coalgebra of all ordered nitely branching trees modulo the greatest
congruence , cf. Examples
ex:weak
2.4.7 and
example-weak-final-1
2.4.2.
(ii) As a quotient of the coalgebra D of all unordered nitely branching trees (with the same structure
as in (
eq:deltaS
2.8)) modulo the greatest congruence. Indeed, this coalgebra D is a weakly terminal P
f
-
coalgebra (cf. Example
example-weak-final-1
2.4.2(ii)) since the canonical quotient map q : T

D is obviously a
coalgebra homomorphism.
(iii) As a subcoalgebra of the coalgebra P

f
1. In fact, Worrel
worrell:05
[W2] has shown that every nitary set
functor F has a terminal coalgebra which is a subcoalgebra of F

1 (cf. Theorem
thm:worrell
2.6.3 below).
For P
f
we are interested in sharpening Theorem
thm:cong
2.4.16 by having a more explicit formulation of the
largest congruence on T

. That is, our work up until now has worked with as a relation on the
whole of T

. But to see whether t u for two particular trees t and u, we would prefer to look only at
t, u, and their subtrees. The corresponding description in Corollary
cor:barr
2.4.23 is due to Barr
barr
[Barr].
27
An operator on the CPO of equivalence relations on T

. We mentioned the weakly terminal P


f
-
coalgebra T

of all ordered nitely-branching trees. Let (Eq(T

), ) be the CPO of all equivalence


relations on T

, with the reverse inclusion: R S iff S R. The least element is T

. Our
operator f is dened so that an equivalence relation R is a congruence of the coalgebra T

iff it is a
xed point of f (cf. Example
ex:zigzag
2.4.15). Let f : Eq(T

) Eq(T

) be given by assigning to a relation R


the relation f(R) dened by
t f(R) u iff for all children x of the root of t there is some
child y of the root of u such that t
x
R u
y
; and vice-versa.
(2.11) fdef
Lemma 2.4.20. The operator f is continuous, and f is the greatest congruence on the P
f
-coalgebra
T

.
lemma-261
Proof. We must verify that f is -continuous, and this is where the fact that T

consists of nitely
branching trees enters. Suppose that R
0
R
1
R
n
, and write R

for

n
R
n
and S

for

n
f(R
n
). Clearly, f is monotone, and so f(R

) is contained in S

. We must show that if t S

u, then
t f(R

) u. Let x be a child of the root of t. For all n, there is some child y of the root of u (depending
on n) so that x R
n
y. Since u is nitely branching, there is some xed y so that for innitely many
n, x R
n
y. But since the R
n
are non-increasing, we have some y such that for all n, x R
n
y. This
concludes our verication of the continuity of f. By Kleenes Theorem
theorem-Kleene
2.1.5, we obtain the least xed
point of f in steps: f =

n
f
n
().
That this is the greatest congruence comes from the denition of the order on Eq(T

) as reverse
inclusion and the fact that an equivalence R on T

is a congruence iff f(R) = R.


Henceforth, we denote the congruence f by . As an example, the two trees shown below are
related by :

.
.
.



.
.
.
.
.
.
o
o
o
o
o
o
y
y
y
y
y
y



c
c
c
z
z
z
z

D
D
D
h
h
h
h
(2.12) eq:exttrees
Indeed, every nitely branching tree without leaves is again in the relation to these two trees. The
easiest way to see this is to check by induction on n that for all trees t and u without leaves, t f
n
() u.
We conclude this section with a statement of the representation of a terminal coalgebra for P
f
,
analogous to that of Barr
barr
[Barr]. To get started, recall the concept of an extensional quotient of an
unordered tree fromExample
ex:Pk
2.2.12. Analogously, for an ordered tree t, we take the extensional quotient
of the tree obtained from t by forgetting the ordering of children.
not:olt Notation 2.4.21. For any tree t we write
n
t for the extensional quotient of the cutting of t at a height
of n. Formally, this is the set of points whose distance from the root of t is at most n, considered as an
induced subgraph of t. For example,
0
t is a one-point tree.
Proposition 2.4.22. The congruence merges two trees t and s iff

n
t =
n
u for all n < . (2.13) eq:congdef
28
Proof. Since is f =

n
f
n
(), we only need to verify by induction on n that f
n
() relates t and
u iff
n
t =
n
u. The case n = 0 is clear: is T

, and
0
t =
0
u is the root only tree. For the
induction step we use (
fdef
2.11): f
n+1
() relates t und u iff for every child x of the root of t there exists
a child y of the root of u with
n
t
x
=
n
u
y
, and vice versa. Since the subtrees rooted at children of
the root of
n+1
t are precisely the trees
n
t
x
, and analogously for
n+1
u, we conclude that f
n+1
()
relates t and u iff
n+1
t =
n+1
u.
cor:barr Corollary 2.4.23 (Barr
barr
[Barr]). The quotient of the coalgebra D of all nitely branching trees modulo
the congruence dened in (
eq:congdef
2.13) is terminal for P
f
.
2.5 A terminal coalgebra for P
f
using strongly extensional trees
sec:powfin
We have already seen several descriptions of a terminal coalgebra for P
f
: Set Set in Section
section-weak
2.4.
This section gives another description, using strongly extensional trees. It is due to James Worrell
worrell:05
[W2].
Recall that a tree t is extensional if distinct children of the same node dene different subtrees, see
Example
ex:Pk
2.2.12(2).
D-strongly-ext Denition 2.5.1. A tree bisimulation between two trees t and u is a bisimulation (cf. Example
ex:zigzag
2.4.15)
R between the sets of nodes such that the roots of t and u are related by R, and whenever two nodes are
related by R, then they have the same distance from the root.
Two trees are called tree bisimilar if there is a tree bisimulation between them.
A tree t is called strongly extensional if every tree bisimulation on it is a subrelation of the identity.
More explicitly, t is strongly extensional iff distinct children x and y of the same node dene subtrees
t
x
and t
y
which are not tree bisimilar.
rem:strongext Remark 2.5.2. (i) In (
eq:exttrees
2.12) we see two extensional trees: the left-hand one is strongly extensional,
the right-hand one is not; indeed, consider the relation relating all nodes of the same depths.
(ii) Every strongly extensional tree is clearly extensional.
(iii) It is trivial to prove that every composition of tree bisimulations is again a tree bisimulation. In
addition, the opposite of every tree bisimulation is a tree bisimulation: if R is a tree bisimulation
from t to u, then R
op
is a tree bisimulation from u to t.
(iv) Observe that the notion of tree bisimulation is different from the usual graph bisimulation. For
example, the picture below

d
d
d
d
,~
~
~
~

(2.14) tree-graph
depicts a strongly extensional tree but there is a graph bisimulation relating the two leaves.
Proposition 2.5.3. Let t be a nite tree. Then t is extensional iff t is strongly extensional.
prop-equiv-extensionality
Proof. Let t be extensional, and let R be any tree bisimulation on t. We claim that for all n, if x R y
and x and y have height n in t, then the corresponding subtrees t
x
and t
y
are equal. The proof is by
induction on n. For n = 0, the result is obvious because the nodes of height 0 are leaves. Assume our
result for n, and let x and y be related by R and of height n + 1. Then by the induction hypothesis and
29
extensionality of t, for every child x

of x there is a unique child y

of y and t
x
= t
y
; and vice-versa.
This implies that t
x
= t
y
.
It now follows that if t is an extensional tree, then t must be strongly extensional.
Denition 2.5.4. The strongly extensional quotient t of a tree t is the quotient tree obtained from t via
its largest tree bisimulation.
Observe that every tree t is tree bisimilar to its extensional and strongly extensional quotients; the
canonical quotient maps obviously are tree bisimulations.
lem:w1 Lemma 2.5.5. If t and u are strongly extensional trees related by a tree bisimulation, then they are
equal.
Proof. Suppose we have a tree bisimilation R between t and u. Then R
op
R is a tree bisimulation on
t, whence R
op
R by strong extensionality. But every node of t is related to at least one node of u
(use induction on the distance of nodes from the root). Thus R
op
R = . Similarly, RR
op
= . Thus,
R (is a function and it) is an isomorphism of trees, and we identify such trees, see Remark
rem:trees
2.2.6.
Now recall from Example
ex:descr
2.4.19(ii) the coalgebra D of all (unordered) nitely branching trees. We
write for the greatest congruence on D. This is dened by (
eq:congdef
2.13).
thm:stronglyext Theorem 2.5.6 (Worrell
worrell:05
[W2]). The coalgebra of all nitely branching strongly extensional trees (as a
subcoalgebra of D) is a terminal coalgebra for P
f
.
Proof. The set D
0
D of all strongly extensional trees clearly forms a subcoalgebra. We prove that
this is isomorphic to the terminal coalgebra D/. For that we need to verify that given trees t, u D
then
t u iff t = u.
Then the map [t] t is an isomorphism from D/ to D
0
.
() If t u we prove that t and u are tree bisimilar. Then, by Remark
rem:strongext
2.5.2, it follows that t and u are
tree bisimilar, which implies that t = u by Lemma
lem:w1
2.5.5.
Dene R t u by relating nodes x t and y u iff they have the same depth n and for every
m n the node of
m
t corresponding to x equals the node of
m
u =
m
t corresponding to y. Using
that t and u are nitely branching, it is not difcult to prove that R is a tree bisimulation. We leave the
details to the reader.
() Conversely, suppose we have t = u. Then we have, by composing with the quotient maps, a tree
bisimulation R t u. By restricting R to all pairs of nodes of depth at most n we obtain a tree
bisimulation R
n
between the cuttings of t and u at level n. Then also the extensional quotients
n
t
and
n
u are bisimilar. Since
n
t and
n
u are strongly extensional by Proposition
prop-equiv-extensionality
2.5.3, we see that

n
t =
n
u by Lemma
lem:w1
2.5.5. Thus, t u.
We conclude this section by mentioning three concrete descriptions of the limit P

1. Two of them
make use of strongly extensional trees.
ex:L Example 2.5.7. The limit P

f
1 can be described as
(i) the set of all compactly branching strongly extensional trees as we shall see in Example
ex:compactly
2.9.5
below,
30
(ii) the set of all saturated extensional trees, see
amms
[AMMS], and
(iii) the set of maximal consistent theories of modal logic, see
amms
[AMMS].
2.6 Terminal coalgebras for nitary Set functors
As we have seen, for a nitary endofunctor of Set the limit of the terminal
op
-chain need not be the
terminal coalgebra. However, James Worrell
worrell:05
[W2] provided a construction of the terminal coalgebra
that works for every nitary endofunctor (see Section
section-weak
2.4) of Set.
Actually, Worrell proved a more general result about accessible endofunctors of Set (cf. Theo-
rem
thm:worrell-2
4.2.10). Our proof presented here for nitary functors is simpler than the one given in
worrell:05
[W2]. We
recall from Lemma
lem:mono
2.4.12 that if F : Set Set is nitary, then the canonical map m : F(F

1) F

1
is monic.
not:Fomega Construction 2.6.1. Recall the terminal
op
-chain of F and let
F

1 = lim
n
op
F
n
1 with limit projections
n
: F

1 F
n
1, n < .
We write m : FF

1 F

1 for the factorizing morphism of (


diag:m
2.9).
We write F
+n
1 for F
n
(F

1). Notice that we have an


op
-chain with the connecting morphisms
F

1 F
+1
m

F
+2
1
Fm


FFm

(2.15) eq:chain2
ex:P Example 2.6.2 (Worrell
worrell:05
[W2]). For the nite power-set functor P
f
we have that P

f
1 is the set of all
compactly branching trees. Here m : P
+1
f
1 P

f
1 is the subset of those trees in P

f
1 nitely
branching at the root, and P
f
m : P
+2
f
1 P
+1
f
1 is the subset of trees nitely branching at levels 0
and 1, etc.
thm:worrell Theorem 2.6.3 (Worrell
worrell:05
[W2]). The terminal coalgebra for F is given as the limit of the
op
-chain
from (
eq:chain2
2.15); in symbols:
F = lim
n
op
F
+n
1,
and this is an intersection of subobjects since all connecting morphisms are injective.
rem:lim2 Remark 2.6.4. If F denotes this limit with projections p
n
: F F
+n
1 then there exists a unique
morphism
r : F(F) F with p
n+1
r = Fp
n
for all n < . (2.16) eq:r
It is our taks to prove that r is invertible, and its inverse yields the terminal coalgebra for F. We prove
an auxiliary result rst.
We need the notion of a distinguished element of F. This is an element contained in FX for every
non-empty set X. More precisely, let C
01
be the functor with C
01
= and C
01
X = 1 for non-
empty X. Then x FX is distinguished if there is a natural transformation : C
01
F with

X
= x : 1 FX. Notice that every element x of F gives rise to a distinguished element; more
precisely, for the unique map t : X, X ,= , the element Ft(x) is distinguished.
lem:trnkova Lemma 2.6.5 (Trnkov a
trnkova69
[Tr]). Every set functor F preserves nonempty nite intersections and maps
empty intersections to distinguished elements.
31
More precisely, given two subsets m
i
: X
i
X, i = 1, 2, with m
1
m
2
nonempty, F preserves
the corresponding pullback. And if m
1
m
2
is empty then all elements of the pullback of Fm
1
and
Fm
2
are distinguished.
lem:intersect Lemma 2.6.6. Every nitary endofunctor F of Set preserves all non-empty intersections.
Proof. We can assume, without loss of generality, that F preserves non-empty inclusions, i. e., given
a subset , = A B then FA FB and F maps the inclusion map A B to the inclusion map
FA FB. Indeed, every set functor is naturally isomorphic to one preserving non-empty inclusions,
see
ATbook
[AT].
Now x sets X
i
X for i I, and assume that

X =

iI
X
i
is non-empty. We are to show
that F

X =

iI
FX
i
. The inclusion is obvious. For the reverse inclusion, assume that x FX
i
for all i I. Since F is nitary, we may choose a minimal nite A X such that x FA. If
x is a distinguished element, then x F

X holds since

X is non-empty. Assume then that x is not
distinguished. For all i we see from Lemma
lem:trnkova
2.6.5 that FX
i
FA = F(X
i
A). Thus x F(X
i
A).
By minimality of A, A X
i
A. So at this point we know that A X
i
for all i. Thus, A

X.
Therefore x FA F

X, as desired.
Proof of Theorem
thm:worrell
2.6.3. (1) For every coalgebra : A FA we observe that the canonical cone

n
: A F
n
1 of Construction
constr:cone
2.3.2 yields a canonical cone
+n
: A F
+n
1, n < , of the

op
-chain (
eq:chain2
2.15) as follows:

: A F

1
is the unique morphism such that
n

=
n
holds for all n < , and given
+n
, put
+n+1
=
F
+n
. For the limit in Remark
rem:lim2
2.6.4 we get the unique
: A F with p
n
=
+n
for all n < . (2.17) eq:olalpha
(2) If F1 = , then F is constant with value and the theorem is trivial. Assume F1 ,= 1. Then we have
a coalgebra : 1 F1 and from : 1 F above we conclude F ,= (and also F
+n
1 ,= for
every n). By Lemma
lem:mono
2.4.12 we conclude that m is a split monomorphism. Hence, (
eq:chain2
2.15) is a chain of
subobjects. So its limit F is an intersection of the
op
-chain of subobjects. From F ,= we conclude
that F preserves this intersection, and it follows that r in (
eq:r
2.16) is invertible.
(3) The coalgebra (F, r
1
) is a terminal coalgebra because for every coalgebra : A FAthe above
morphism : A F is a coalgebra homomorphism: we show, equivalently, that r F = :
A F. Indeed, for every n we have due to (
eq:r
2.16) and (
eq:olalpha
2.17)
p
n+1
(r F ) = F(p
n
) = F
+n
=
+n+1
= p
n+1
.
Given another coalgebra homomorphism h : A F then it is easy to prove p
n
h =
+n
for all
n < , thus from (
eq:olalpha
2.17) we get p
n
h = p
n
, proving h = .
corollary-to-Worrell Corollary 2.6.7. For every nitary set functor F, the terminal coalgebra is the union of images of all
coalgebra homomorphisms with codomain F

1.
Proof. Indeed, let m turn F

1 into a weakly terminal coalgebra, see Proposition


prop:weakly
2.4.13. Then the limit
projection p
0
: F F

1 is a homomorphism, i. e., Fp
0
r
1
= m p
0
: this follows from m p
1
= p
0
(which implies p
1
= m p
0
) and p
1
r = Fp
0
. We know that p
0
is a monomorphism. Since F
is the terminal coalgebra for F, the union of images of all coalgebra homomorphisms with codomain
(F

1, m) is nothing else than p


0
: F F

1.
32
2.7 Terminal coalgebras as quotients
sec:quotient
In this section we present a concrete description of the terminal coalgebras for nitary set functors
due to
am
[AM] and which is inspired by Barrs description of the terminal coalgebra for P
f
(cf. Corol-
lary
cor:barr
2.4.23). In essence we shall provide a concrete description of the largest congruence on the coalge-
bra T

of all -trees coming from a presentation of a given nitary functor, cf. Example
ex:fincong
2.4.18.
Assumption 2.7.1. For the rest of this section we assume that we are given a nitary endofunctor
F : Set Set and we x a corresponding nitary signature and epitransformation : H

F,
cf. Denition
def:pres
2.4.3.
Our goal is to represent a terminal F-coalgebra in terms of a terminal H

-coalgebra and certain


data implicit in . The overall idea is that since H

is a signature functor, its terminal coalgebra is much


easier to understand than that of F, see Example
ex:trees
2.3.7.
Being surjective, each component of is fully described by its kernel equivalence. Indeed, may
be described in terms of a set of -equations of the form
(x
1
, . . . , x
n
) = (y
1
, . . . , y
m
), (2.18) eq-eps
where
n
and
m
. That is, we take a countable set X, and then the kernel equivalence of
X
is
a set E of pairs of elements of H

(X) which we write as in (


eq-eps
2.18). The variables occurring on the left
and right are taken from X; each side might well have repeated variables, and there might be variables
common to both sides. The relationship between the epitransformation and the -equations is that for
all sets A, the kernel of
A
is the equivalence relation generated by
(H

f(u), H

f(v)) : (u = v) is an -equation and f : X A. (2.19) needtc


ex:eps Examples 2.7.2. (i) The functor P
3
takes a set X to the set of subsets of size at most 2. It is a quotient
of H

X = 1 + (X X), where has one constant symbol c and one binary operation symbol . We
also take : H

X P
3
X to be c , and x y x, y. (We use inx notation for the binary
symbol, as usual.) There is just one -equation, x y = y x, expressing the commutativity of .
(ii) Let FX =

X
k
/G

be an analytic functor, where k is the arity of and G

is the given group


of permutations on k. Then F is presented by the signature and the -equations are
(x
1
, . . . , x
k
) = (x
p(1)
, . . . , x
p(k)
) for all and all p G

.
(iii) We have seen the Aczel-Mendler ()
3
2
functor in Example
ex:pres
2.4.4(ii). This functor corresponds to
the -equations
(x, x) = (x, x) and (x, x) = (x, x).
Note that the set dened in (
needtc
2.19) is not transitive in this example, and this is why our description of the
kernel of
X
takes the generated equivalence relation.
(iv) The nite power set functor P
f
is a quotient of H

(X) = 1 +X +X
2
+ . This corresponds to
a signature with one n-ary operation symbol
n
for each n (cf. Example
ex:pres
2.4.4(i)). The -equations are
all equations between at terms with the same set of variables appearing on both sides. For example,

2
(x, y) =
3
(x, x, y)
would be one of the -equations.
example-quotient-signatures
33
The following proposition formalizes the well-known fact that the initial algebra of an equational
class of -algebras is the quotient of F

= H

(the algebra of nite -trees) modulo the congruence


generated by the given equations. A proof can be found e. g. in
am
[AM].
Proposition 2.7.3. Let (F, ) be an initial F-algebra. Consider F as a H

-algebra:
H

(F)

F

F(F)

F
Let : H

F be the unique H

-algebra morphism. Then F is a quotient of H

by : this
map is surjective, and its kernel is the smallest -congruence on H

containing all instances of the


-equations.
In other words
F = F

/,
where for two nite -trees s, t we have
t s iff s and t can be equated by nitely many applications of the -equations. (2.20) eq:sim
As shown in
am
[AM], a similar description holds for the terminal coalgebra; we have
F = T

/,
where is the congruence of nite and innite applications of the -equations. Of course, we have to
make clear what is meant by innite application of -equations.
Recall that for every -tree t, the limit projection
n
: T

= H

H
n

1 is the cutting of t at
level n where all leaves of that level are relabelled by . We dene an equivalence relation on T

as
follows: for two -trees s and t we put
s t iff for all n < we have
n
s
n
t. (2.21) eq:approx
Here is the congruence of (
eq:sim
2.20) for the endofunctor (H

() + ) induced by the quotient with


components
X
+ : H

X + FX + (observe that all trees of the form


n
t, lie in
(H
()
+)).
thm:am Theorem 2.7.4 (
am
[AM]). Consider the following F coalgebra
T

FT

(2.22) eq:tau
and let : T

: F be the corresponding unique F-coalgebra homomorphism. Then is epic and F


is a quotient of T

via . Moreover, the kernel equivalence of is the above equivalence ; in symbols:


F = T

/.
Remark 2.7.5. There is an interesting connection of the last result and the congruence to the terminal

op
-chains of H

and F. Firstly, induced a natural transformation from the terminal chain of H

to
the terminal chain of F by induction:
0
= id
1
and

n+1
= (H

H
n

H
n

FH
n

1
Fn

FF
n
1).
34
It is not difcult to prove that
n
: H
n

1 F
n

1 is an epimorphism with the kernel equivalence given by


the congruence of nite applications of -equations from (
eq:sim
2.20). Thus, for every s, t T

we have
s t iff
n

n
(s) =
n

n
(t) for all n < ,
where
n
is cutting trees at level n and
n
is the quotient of nite application of -equations. It turns out
that the maps
n

n
: T

F
n
1 form the canonical cone of the coalgebra from (
eq:tau
2.22).
ex:infeq Example 2.7.6. (i) We continue Example
ex:eps
2.7.2(ii) where F = P
3
. We have congruent trees

c
c
.
.
.

G
G
G
G

G
G
G
G

c
c
.
.
.
G
G
G
G

G
G
G
G

since we have
(n = 0),

G
G
G
G

G
G
G
G
(n = 1),

G
G
G
G

G
G
G
G

c

G
G
G
G

G
G
G
G

(n = 2),
etc.
(ii) For the nite power-set functor P
f
recall Example
ex:eps
2.7.2(iv). Here we have

1
.
.
.

3

4

5

6

7

8

9

10

11
.
.
.
.
.
.





c
c
c
c
c

G
G
G
G

!
!
!
!
A
A
A
A
`
`
`
`
`
similarly as in (i) above. (Notice that these -trees represent the extensional trees in (
eq:exttrees
2.12).)
An isomorphic description of H

is as the coalgebra of all nitely branching ordered trees, and


computes for every such tree the strongly extensional quotient: one forgets the order of children of
a given tree t and then forms the quotient of t modulo the greatest tree bisimulation (cf. Section
sec:powfin
2.5).
Similarly, the maps
n
, n < , compute extensional quotients of nitely branching trees of height n.
So s t iff for all n < we have:
n
s and
n
t have the same extensional quotient, cf. (
eq:congdef
2.13).
(iii) We mentioned analytic functors F on Set in Examples
ex:eps
2.7.2(ii). By Theorem
thm:am
2.7.4 we have a direct
description of F: Let F =

X
k
/G

be an analytic functor, where k is the arity of and G

is
the given group of permutations on k. Then the terminal coalgebra is the quotient
F = T

/
35
of the -tree coalgebra modulo the equivalence analogous to of Example
E-bags
2.2.13 but allowing
innitely many permutations of children of nodes, i. e., F is the coalgebra of all -trees modulo per-
mutations of children of any -labelled node (using elements of the permutation group asssociated with
).
In particular, for the bag functor BX =

nN
X
n
/S
n
(cf. Example
E-analytic
2.2.14) the terminal coalgebra
B is the coalgebra of all nitely branching non-ordered trees. In fact, the corresponding polynomial
functor is the nite-list functor FX = X

. We know that F is the algebra of all nitely branching


trees. And B is the quotient of the coalgebra allowing arbitrary permutations of children. This means
that the carrier consists of all unordered trees.
2.8 CPO

-enriched categories
The famous construction of a model of the untyped--calculus presented by Dana Scott in
scott
[Sc] also
applied
op
-limits. The category he used was that of domains and embedding-projection maps, and
we dene these below. Later, Gordon Plotkin and Mike Smyth introduced the concept of a locally
continuous endofunctor and noticed that in the category of domains, the nitary constructions of the
initial algebra and the terminal coalgebra coincide for these endofunctors, yielding a canonical xed
point, see
SmythPlotkin:82
[SP]. Paul Taylor proved the same result in the (more natural) category of domains and
adjoint pairs
taylor
[Ta], and this was generalized further in the unpublished Ph.D. thesis of Jir Velebil
velebil
[Ve].
Ad amek
A97
[A87] derives a general form concerning the categories of domains and continuous functions.
The details follow. In fact, in this subsection we decided to give the full details since we have the feeling
that the material has not been presented in this comprehensive way before.
Denition 2.8.1. Let F be an endofunctor on a category A having both F and F. Since the cor-
responding structures of F is an isomorphisms by Lambeks Lemma, we have a unique F-algebra
homomorphism i : F F. We say that F has a canonical xed point, if i is an isomorphism, so
that F = F.
We have seen this phenomenon for FX = X

on CPO

in Examples
example-nat-3
2.2.3 and
ex:terminal
2.3.5(iii). In this
section we shall study canonical xed points in categories of cpos, and in the next section we consider
complete metric spaces.
Remark 2.8.2. Recall the category
CPO

of cpos (see Denition


D-omega-CPO
2.1.4) and strict continuous maps, i. e., continuous maps preserving the least
element .
E-strict-cpo Examples 2.8.3. (i) The poset Pfn(X, Y) of partial functions from X to Y ordered by (set-theoretical)
inclusions is a strict cpo with the nowhere dened function.
(ii) For every set X the at cpo X + is the strict cpo with all pairs in X incomparable.
(iii) A coproduct in CPO

is the disjoint union with all -elements merged to one.


(iv) A product in CPO

is the cartesian product ordered componentwise.


R:enriched Remark 2.8.4. The category CPO

is cartesian closed: the internal hom-objects [X, Y ] are the hom-


sets CPO

(X, Y ) ordered pointwise. We denote by


X,Y
the least element (constant function of value

Y
) and by

f
i
the joins of -chains f
i
: X Y .
The CPO

-enriched categories are thus categories A whose hom-set carry a cpo structure, and
composition is strict and continuous.
36
Examples 2.8.5. (1) CPO

is, of course, CPO

-enriched.
(2) The category Pfn of sets and partial functions is CPO

-enriched by inclusion: the least element of


Pfn(X, Y) is the nowhere dened function, and

f
i
is the set-theoretic union.
(3) The category Rel of sets and relations is also CPO

-enriched by inclusion.
(4) If A is CPO

-enriched, then so is A
op
: consider the same ordering of morphisms; just the direction
is reversed.
(5) A product of CPO

-enriched categories is CPO

-enriched (w. r. t. componentwise ordering).


R-enriched Remark 2.8.6. Let A be a CPO

-enriched category.
(1) All limits in A are automatically enriched. In fact, given a limit cone p
x
: P D
x
of a diagram D,
then for every chain (g
i
)
i<
in A(X, P) we have
f =
_
i<
g
i
iff p
x
f =
_
i<
p
x
g
i
for every x in D.
This follows from the continuity of composition:

i<M
p
x
g
i
= p
x

i<
g
i
.
(2) Dually: all existing colimits are enriched.
(3) An initial object 0, whenever it exists, is also terminal: by strictness of composition the unique
morphism in A(X, 0) is
X,0
.
(4) As observed by
barr
[Barr] whenever A ,= has colimits of -chains, 0 exists: choose any object A, then
the chain
A

A

A

. . .
has colimit 0.
Denition 2.8.7 (D. Scott). In a CPO

-enriched category a morphism e: X Y is called an embed-


ding if there exists a morphism e: Y X with
e e = id
X
and e e _ id
Y
. (2.23) eq:emb
The morphism e is clearly uniquely determined by (
eq:emb
2.23) and is called the projection for e.
Examples 2.8.8. (1) In CPO

the embeddings are precisely those monomorphisms e: X Y such


that for every y Y there exists the largest x X with e(x) _ y. In fact, this condition allows us
to dene e: Y X by choosing this largest x as e(y), then e e = id
X
(since e is one-to-one) and
e e _ id
Y
. The verication that the condition is also necessary is trivial.
(2) Every split monomorphism in Pfn is an embedding: here e = e
op
(the opposite relation).
(3) Every split monomorphism in Rel is an embedding: split monomorphisms are precisely those rela-
tions e: X Y which are injective maps and for these e = e
op
.
O-self-dual Observation 2.8.9. (1) Objects of A and embeddings form a category
A
E
which is self-dual. In fact, a composite e f of embeddings is an embedding with

e f = e

f.
37
Thus, we have an isomorphism of categories
I : A
E
(A
E
)
op
IX = X and Ie = e.
(2) A general example of an embedding is a coproduct injection v
i
of an arbitrary coproduct X =

iI
X
i
; indeed, v
i
: X X
i
has components id
X
i
and
X
i
,X
j
for j ,= i. In particular, the morphisms
with domain 0 are always embeddings.
(3) The name projection stems fromthe dual of (2): for every product X =

iI
X
i
the projection

i
has the form e
i
where e
i
: X
i
X has components id
X
i
and
X
i
X
j
.
basic-lemma Lemma 2.8.10 (Basic Lemma (
SmythPlotkin:82
[SP])). Let A be a CPO

-enriched category with colimits of -chains.


Then the category A
E
of embeddings is closed under colimits of - chains in A. Moreover a cocone
c
i
: E
i
C of a -chain (E
i
) of embeddings is a colimit cocone in A iff
c
i
c
i
is a -chain in A(C, C) with
_
i<
c
i
c
i
= id
C
. (2.24) eq:colim
rem:basic Remark 2.8.11. Although formulated for -chains only, the Basic Lemma holds for -chains for all
limit ordinals (in categories enriched so that hom-sets are posets with joins of all chains and compo-
sition preserves joins of chains). This is immediately seen from the proof below.
Proof of Lemma
basic-lemma
2.8.10. (a) Given an -chain with embeddings as connecting maps e
ij
: E
i
E
j
we
rst prove that for every cocone of embeddings c
i
: E
i
C with (
eq:colim
2.24) we have C = colimE
i
. For
every cocone d
i
: E
i
D in A, we rst prove
d
i
c
i
_ d
j
c
j
for i j. (2.25) eq:2
Indeed, since (c
i
)
i<
is a cocone, we have c
i
= e
ij
c
j
, thus
d
i
c
i
= d
j
e
ij
e
ij
c
i
_ d
j
c
j
.
Therefore there exists
d =
_
i<
d
i
c
i
: C D. (2.26) eq:3
This is the desired factorization: to see the the equality
d
i
= d c
i
(2.27) eq:4
observe that for each i we have
d c
i
=
_
j<
d
j
c
j
c
i
and we can take the join over all j i (see (
eq:2
2.25)). Since for each such j we have
d
j
c
j
c
i
= d
j
c
j
c
j
e
ij
= d
j
e
ij
= d
i
,
we obtain (
eq:4
2.27). The factorization is unique: from d c
i
= d
i
we obtain, using (
eq:colim
2.24),
d = d
_
i<
c
i
c
i
=
_
i<
d
i
c
i
.
38
(b) Consider a -chain (E
i
)
i<
. Let c
i
: E
i
C be a colimit cocone in A. We prove that c
i
are
embeddings satisfying (
eq:colim
2.24), and for every cocone of embeddings d
i
: E
i
D the unique factorization
d: C D is also an embedding. For every i < the shortened chain of all E
j
with i j < has the
colimit (c
j
)
ji
, and the morphisms e
ij
: E
j
E
i
form a cocone: we have a commutative diagram
E
i
e
i,j

e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
E
j
e
j,k

e
ij

E
k
ED GF
e
i,k
e
ik
}
}
}
}
}
}
}
}
E
i
Indeed, from e
jk
e
ij
= e
ik
we obtain
e
ik
e
jk
= e
ij
e
jk
e
jk
= e
ij
.
Thus, there exists a unique factorization c
i
: C E
i
such that the following triangles commute:
E
j
e
ij

e
e
e
e
e
e
e
c
j

C
c
i

E
i
for all j i. (2.28) eq:5
In particular, c
i
c
i
= id.
(b1) We prove (
eq:colim
2.24). Due to c
i
= c
j
e
ij
we have, for j i, c
i
= e
ij
c
j
, which yields
c
i
c
i
= c
j
e
ij
e
ij
c
j
_ c
j
c
j
(2.29) eq:6
Thus the join in (
eq:colim
2.24) exists, and we need to prove
_
_
_
j<
c
j
c
j
_
_
c
i
= c
i
for every i < .
Again we can restrict ourselves to j i, and here c
j
c
j
= id (cf. (
eq:5
2.28)) implies
c
j
c
j
c
i
= c
j
c
j
c
j
e
ij
= c
j
e
ij
= c
i
.
(b2) c
i
is an embedding with projection c
i
. Indeed, we have (
eq:5
2.28) and c
i
c
i
_ id
C
follows from (
eq:colim
2.24).
(b3) For every cocone of embeddings d
i
: E
i
D the factorizing morphism d: C D is an embed-
ding. Since we already proved (
eq:colim
2.24) we see from part (a) that (
eq:3
2.26) holds. Also, for i j we have

d
i
= e
ij


d
j
, thus
c
i


d
i
= c
j
e
ij
e
ij


d
j
_ c
j


d
j
for i j
and we can dene

d =
_
i<
c
i


d
i
: D C. (2.30) eq:43
39
We now prove that d is an embedding with projection

d. We have
d

d _ id
D
because the left-hand side is the join of (d
i
c
i
) (c
j
d
j
), and we can restrict ourselves to j i and get
d
i
c
i
c
j


d
j
= d
i
e
ij
c
j
c
j


d
j
since c
i
= e
ij
c
j
= d
i
e
ij


d
j
since c
j
c
j
= id
= d
i


d
i
since e
ij


d
j
=

d
i
_ id
D
since d
i
is an embedding.
And

d d = id
follows from

d d c
i
= c
i
for all i: indeed, the left-hand side is, by (
eq:4
2.27) and (
eq:43
2.30), the join of
c
j


d
j
d
i
, and restricting again to j i we have
c
j


d
j
d
i
= c
j


d
j
d
j
e
ij
= c
j
e
ij
= c
i
.
Denition 2.8.12. A functor F : A B between CPO

-enriched categories is called locally continu-


ous if it preserves -joins in hom-sets: given f
0
_ f
1
_ f
2
. . . in A(X, Y ), then F(

f
n
) =

Ff
n
.
def-locally-continuous
E-locally-continuous Examples 2.8.13. (1) Id is a locally continuous endofunctor.
(2) A composite, product or coproduct of locally continuous functors is locally continuous, cf. Exam-
ples
E-strict-cpo
2.8.3.
(3) All polynomial functors are locally continuous.
(4) The functor FX = X

from Example
example-nat-3
2.2.3 is locally continuous.
T-Smyth Theorem 2.8.14 (Smyth, Plotkin). Every locally continuous endofunctor of a CPO

-enriched category
with colimits of -chains has a canonical xed point F = F.
Proof. If F : A A is locally continuous, then F clearly preserves embeddings. Consequently, it
yields an -chain of embeddings as the initial -chain (see (
initialsequence
2.1)), and from the Basic Lemma
basic-lemma
2.8.10
we conclude that F preserves its colimit F

0 = colim
n<
F
n
0. Indeed, the colimit is character-
ized by the join

n<
c
n
c
n
= id in A(C, C) which F preserves. Thus, F exists and is equal to
colim
n<
F
n
0. Using the self-duality of A
E
, see Observation
O-self-dual
2.8.9, we conclude that this colimit is at
the same time a limit of the
op
-chain of projectionsand this is the terminal
op
-chain for F. Thus,
F = colimF
n
0 = limF
n
1 = F.
thm:2.43 Theorem 2.8.15. Let A be a CPO

-enriched category with -colimits. Every locally continuous func-


tor F : A
op
A A denes an endofunctor F
E
of A
E
by
F
E
X = F(X, X) and F
E
e = F( e, e),
and F
E
has an initial algebra.
40
Proof. The colimit (F
E
)

0 = colim
n<
(F
E
)
n
0 is, by the Basic Lemma
basic-lemma
2.8.10, characterized by (
eq:colim
2.24).
In A
op
A we have

n<
( c
n
c
n
, c
n
c
n
) = id which implies, since F is locally continuous,
_
n<
F( c
n
, c
n
) F(c
n
, c
n
) = id.
Since F
E
c
n
= F( c
n
, c
n
) is an embedding whose projection is F(c
n
, c
n
), the last join tells us that
(F
E
c
n
) is the colimit cocone in A
E
, thus, F
E
preserves the colimit of its initial -chain.
Corollary 2.8.16. For every locally continuous endofunctor F : A
op
A Aan object X

= F(X, X)
exists.
Example 2.8.17. Scotts model of untyped -calculus. The formulas t of -calculus have the form
t ::= k [ x [ tt [ x.t
where k ranges through a set K of constants, and x through a countable set of variables. The meaning
of t
1
t
2
is application: we evaluate t
2
(a function) in t
1
. The meaning of x.t is -abstraction: this
function takes a value a and responds with t[a/x], the term t in which x is substituted by a. Thus if D
is the set of all closed terms, we obtain an isomorphism
D

= K +D D + [D, D].
No such set D exists because card[D, D] > card D whenever D is not a singleton set.
Dana Scott
scott
[Sc] decided to use a cartesian closed category with products and coproducts, and inter-
pret the above equation in that category. He used originally continuous lattices, but Smyth and Plotkin
SmythPlotkin:82
[SP] made it clear that CPO

is (simpler and) sufcient. In fact, consider the at cpo


K

= K +
with all pairs in K incomparable, in place of the set K. Interpret + and as usual in CPO

and re-
call from Example
E-locally-continuous
2.8.13 that D D D is locally continuous. Finally, the function D [D, D]
of internal hom-objects, which are the posets CPO

(D, D) ordered pointwise, is a locally continu-


ous functor from CPO
op

CPO

to CPO

. In fact, recall that this functor is dened on morphisms


(f, g): (X, A) (Y, B) of CPO
op

CPO

as follows: the value of [f, g] : [X, A] [Y, B] at


u: X A is
Y
f
X
u
A
g
B.
This value is continuous in u because composition is continuous in CPO

. We thus obtain a locally


continuous functor
F : CPO
op

CPO

CPO

with F(X, Y ) = K

+Y Y + [X, Y ].
If D is the initial algebra for F
E
, see Theorem
thm:2.43
2.8.15, then
D

= K

+D + [D, D]
is a model of -calculus. (Observe that the articial of K disappears in the formation of coproduct.)
41
Remark 2.8.18. Surprisingly, for a number of set functors F the terminal coalgebra also carries a struc-
ture of a cpo and it is obtained from the initial algebra as a free cpo completion. Moreover, lim
n<
F
n
1
is a limit of an
op
-chain of projections.
This concerns all endofunctors F : Set Set which
(i) preserve colimits of
op
-chains and
(ii) are grounded, i.e., F , = .
For such a functor F we choose an element of F
p: 1 F.
Use the notation w
n,k
: F
n
F
k
and v
k,n
: F
k
1 F
n
1 for the connecting morphisms of the initial
and terminal -chain, and put u: 1. We then obtain the morphisms
e
k,n
F
n
1
F
n
p
F
n+1

w
n+1,k
F
k

F
k
u
F
k
1 for k > n.
This enables us to dene an ordering on F
n
1 as follows:
x _ y iff x = y or y = v
k,n
(e
k,n
(x)) for some k > n.
Theorem 2.8.19. (Ad amek
adamek2002
[Ad
2
]) Each F
n
1 is a cpo with least element e
n,1
p: 1 F
n
1, and each
e
k,n
is an embedding with projection v
k,n
. Moreover,
F is a limit of the projections v
k,n
in CPO

and
F is a subposet of F whose free CPO

-completion is F.
Example 2.8.20. A polynomial functor H

is grounded iff contains a nullary symbol p. Recall from


Example
ex:trees
2.3.7 that set H
n

1 can, for 1 = , be identied with the set of all trees of depth at most
n whose nodes of depth n are labelled by and other nodes with k successors are labelled by k-ary
symbols in . The above ordering is the least one for which is the smallest element and all operations
are monotone. The connecting map H
n+1

1 H
n

1 cuts level n + 1 and relabels level n with . The


limit of this
op
-chain in CPO

is the set of all -trees with the above ordering.


The initial algebra is the set of all well-founded -trees, see Example
example-polynomial-endofunctor
2.2.11; its free CPO

-
completion is H

because every -tree t is a join of a sequence t


n
in H

: take t
n
to be the cutting
of t at level n and relabelling level n by .
2.8.1 Scott complete categories
A higher-order variation of Theorem
T-Smyth
2.8.14 was established in Ad amek
A97
[A87]. Cpos are generalized
as follows: A category A is called Scott complete if it has (i) ltered colimits, (ii) an initial object ,
(iii) limits of diagrams with a cone, and (iv) a set of nitely presentable objects whose closure under
ltered colimits is A. We obtain a 2-category of Scott-complete categories, using as 1-cells the functors
preserving ltered colimits and the terminal object, and as 2-cells the natural transformations.
T-Scott-complete Theorem 2.8.21 (Ad amek
A97
[A87]). Every locally continuous 2-endofunctor of the category of Scott com-
plete categories has a canonical xed point.
42
This result was inspired by the related paper of Michael Barr
barr
[Barr] where the functor F was as-
sumed to preserve both -colimits and
op
-limits.
Denition 2.8.22. (Freyd
freyd:Cambridge
[Fr2] A category is called algebraically compact if every endofunctor has a
canonical xed point.
D-alg-compact
Remark 2.8.23. According to Theorem
T-Smyth
2.8.14 all CPO

-enriched categories are algebraically com-


pact w. r. t. locally continuous functors. However, no reasonable category is algebraically compact:
R-alg-compact
C-alg-compact Corollary 2.8.24. If an algebraically compact category has products (or coproducts), then it is equiva-
lent to the terminal one-morphism category.
This follows easily from Theorem
T-alg-complete-products
2.2.19.
2.9 CMS-enriched categories
section-CMS
Another structure, besides complete partial orderings, which leads to canonical xed points, is complete
metric. We consider the category CMS of complete metric spaces with distances bounded by 1, see
Example
example-nat-MS
2.2.4. Every hom-set CMS(X, Y ) is again a complete metric space with the pointwise metric
given by
d
X,Y
(f, g) = sup
xX
d
Y
(f(x), g(x)) .
For example, the terminal coalgebra H

of all -trees, see Example


example-polynomial-endofunctor
2.2.11, is a complete metric
space under the metric , where (t, t) = 0, and for t ,= u,
(t, u) = 2
n
, where n is least such that t and u differ on some point of level n (2.31) eq-metric
This was rst considered by Arnold and Nivat
arnoldnivat
[AN].
Our study builds on the following classical result:
Theorem 2.9.1 (Banach Fixed Point Theorem). Let f : X X be a contracting function on a non-
empty complete metric space. Then f has a unique xed point.
T-Banach
Denition 2.9.2 (America, Rutten
americarutten
[AmR]). A functor F on CMS is called -contracting for a constant
< 1 provided that each derived function CMS(X, Y ) CMS(FX, FY ) is an -contracting map;
that is, d
FX,FY
(Ff, Fg) d
X,Y
(f, g) for all non-expanding maps f, g : X Y .
D-contracting
Example 2.9.3. (i) Any polynomial functor H

on Set has a contracting lifting H

to CMS. This
means that the following square
CMS
U

CMS
U

Set
H

Set
commutes, where U is the functor taking a metric space to its set of points. For a simple example,
the functor FX = X
n
, lifts to F

(X, d) = (X
n
,
1
2
d
max
) (where d
max
is the maximum metric)
which is a contracting functor with =
1
2
. And coproducts of
1
2
-contracting liftings are
1
2
-
contracting liftings of coproducts. The initial algebra as well as the terminal terminal coalgebra
of H

on CMS is the set of all -trees equipped with the metric of (


eq-metric
2.31) as we will see below.
43
(ii) Lifting of P
f
to complete metric spaces. Let us rst recall that in a metric space (X, d) the distance
d(a, A) of a point a X to a set A X is the inmum of d(a, x) for x A. The Hausdorff
distance of sets A, B X is the join of distances of points of one of the sets to the other one.
Notation:
d

(A, B) = maxsup
aA
d(a, B), sup
bB
d(A, b). (2.32) eq:Hausdorff
The Hausdorff functor is the functor
H : CMS CMS
assigning to every metric space (X, d) the space of all compact subsets of X equipped with the
above Hausdorff metric d

. This gives a functor on the category MS, and as shown in


kuratowski
[Ku]
(Lemma 3), for a complete metric space X the space HX is also complete. Also notice that His
indeed a lifting of P
f
: for a discrete space X we have HX = P
f
X. The Hausdorff functor itself
is not contracting, but the every functor Hobtained from it by scaling all distances by < 1 is.
E-polynomial-lifting
thm:nucontr Theorem 2.9.4. Every contracting endofunctor F of CMS has a terminal coalgebra
F = lim
n
op
F
n
1.
The proof is analogous to that of Theorem
thm:nucontr
2.9.4 below. Moreover, whenever F = the functor
has a canonical (in fact unique) xed point.
The next example is due to J. Worrell
worrell:05
[W2]; although he used complete ultrametric spaces, his result
also holds for the category CMS, see
amms
[AMMS].
ex:compactly Example 2.9.5. We denote by
P

f
: CMS CMS
the lifting of P
f
obtained by scaling the Hausdorff functor by =
1
2
. More detailed, for a complete
metric space (X, d) we have
P

f
(X, d) = all compact subsets of X with metric
1
2
d

.
This scaling makes P

f
obviously contracting, therefore
P

f
= lim
n
op
P

f
1
is the terminal coalgebra, see Theorem
thm:nucontr
2.9.4. In fact, James Worell described it as
P

f
= all compactly branching strongly extensional trees.
Here a strongly extensional tree (see Denition
D-strongly-ext
2.5.1) is called compactly branching if for any vertex the
set of all maximal subtrees in compact in the metric (
eq-metric
2.31) on the set of unordered trees. The argument
used in
worrell:05
[W2] is: for this metric space it is easy to verify that it is (the unique) xed point of P

f
.
In order to obtain a terminal coalgebra using Theorem
thm:nucontr
2.9.4 above we needed to scale the Hausdorff
functor by
1
2
. Later, in Theorem
T-accessible
4.2.12, we shall obtain a result that allows us to obtain a terminal
coalgebra for the class of functors formed by coproducts, products and compositions of polynomial
functors and the Hausdorff functor without any scaling, see Example
ex:Hausfin
4.2.14.
44
A negative result If X is discrete, every subset is closed, whereas the compact subsets of X are
exactly the nite ones. Let P
c
: MS MS be the functor taking a space (X, d) to the set of its
closed subsets, again with the Hausdorff metric d

of (
eq:Hausdorff
2.32). As shown by van Breugel
vanBreugel
[vB], there is no
terminal coalgebras for P
c
: MS MS.
Denition 2.9.6. A category Ais CMS-enriched if its hom-sets come equipped with a complete metric,
and composition is non-expanding in both variables.
D-CMS-enriched
Not surprisingly, CMS is CMS-enriched. Complete metric spaces were rst applied by de Bakker
and Zucker
deBakkerZucker
[dBZ], and their method was further developed by America and Rutten
americarutten
[AmR]. In both of
these papers, the morphisms are a little different from the non-expansive maps: they are the projection-
embedding pairs consisting of an isometric embedding e : X Y together with a non-expanding
map e

: Y X, such that e

e = id
X
. Later, the result of
americarutten
[AmR] was extended to CMS-enriched
categories by Ad amek and Reiterman
are
[ARe]. Their work introduced the following notion related to the
concept of hom-contractive functor in
americarutten
[AmR].
Denition 2.9.7. An endofunctor F of a CMS-enriched category is weakly contracting if there is a
number 0 < < 1 such that for every endomorphism f : X X, we have
d
FX
(Ff, id
FX
) d
X
(f, id
X
).
weakly-D-contracting
Remark 2.9.8. The following result is a variation on a theorem proved by P. America and J. Rutten in
americarutten
[AmR] where they use the category of complete metric spaces and embeddings (split monos):
Theorem 2.9.9 (Ad amek and Reiterman
are
[ARe]). Let A be a CMS-enriched category with a zero-object
0 = 1. Then every weakly contracting endofunctor F has a canonical xed point
F = F = lim
n
op
F
n
1.
If F is contracting, then it has a unique xed point (up to isomorphism).
T-contracting
Example 2.9.10. Let CMS
p
be the category of pointed complete metric spaces and non-expanding maps
(preserving the distinguished point). Then CMS
p
is CMS-enriched, and the one-point space is a zero
object. Denote by 2 the two-element object with distance 1. The functor F : CMS
p
CMS
p
given by
(X, d) (X,
1
2
d) + 2 has a canonical xed point: Its initial algebra N , cf. Theorem
theorem-initial-algebra-omega
2.1.9, is
also the terminal coalgebra.
E-pointed
3 Transnite Iteration
sec:transfinite
3.1 Initial Chain
In this section, we pursue the transnite iteration of the initial and terminal chains. We begin with a
famous result on xed points of monotone maps on directed complete partial orders (dcpos): A dcpo is
45
a poset P with the property that all directed subsets
3
have least upper bounds, and with a least element
0. Let f : P P be monotone. Then f generates an ordinal-indexed sequence in P:
f
0
(0) = 0,
f
j+1
(0) = f(f
j
(0)) for all ordinals j,
and
f
j
(0) =
_
i<j
f
i
(0) for all limit ordinals j.
Theorem 3.1.1 (Zermelo, Tarski, Knaster). Every monotone endofunction of a dcpo has a least xed
point F. Moreover,
f = f
j
(0)
for some ordinal .
T-Knaster
Proof. The central point is that given a dcpo D of cardinality less than there must be some j < such
that f
j
(0) = f
j+1
(0); if not, then f
j
: j < is a subset of D of size , and this is a contradiction.
Thus, f

(0) is a xed point of f. Also, an easy induction shows that every xed point of f must be at
least as large as each iterate f
j
(0).
We attribute this theorem to Zermelo, since the mathematical content of the result appears in his
1904 paper proving the Wellordering Theorem. Although it is common to refer to it as the Tarski-
Knaster Theorem, their result dealt with a slightly different situation, see
knaster
[K].
A category-theoretic generalization of Theorem
T-Knaster
3.1.1 was formulated by Ad amek
A74
[A74]. It was
applied there to the functor F()+A; in other words, the free F-algebra on an object Awas considered
instead of the initial F-algebra.
def-ordinals Denition 3.1.2. Let A be a category with an initial object 0 and with colimits of chains. For every
endofunctor F the initial chain is the chain in A indexed by Ord, the ordered class of all ordinals j, and
having objects F
j
0 dened by
F
0
0 = 0,
F
j+1
0 = F(F
j
0) for all ordinals j,
and
F
j
0 = colim
i<j
F
i
0 for all limit ordinals j.
Its connecting morphisms w
j,k
: F
j
0 F
k
0 for j k are uniquely determined by
w
0,1
: 0 F0 is unique ,
w
j+1,k+1
= Fw
j,k
: F(F
j
0) F(F
k
0),
w
i,k
(i < k) is the colimit cocone for limit ordinals j.
Denition 3.2 is correct: there exists a chain W : Ord Aunique up to natural isomorphism whose
values w
ij
= W(i j) are those given above. For example, w
,+1
: F

0 F(F

0) need not be
specied: since W preserves composition, we have w
,+1
w
,n+1
= w
+1,n+1
= Fw
,n
for all
n < and this determines w
,+1
uniquely.
3
A poset is directed if it is non-empty and every pair of elements has an upper bound.
46
D-initial-chain Denition 3.1.3. We say that the initial chain of a functor F converges in steps if w
,+1
is an iso-
morphism.
Theorem 3.1.4.
A74
[A74] Let Abe a category with an initial object 0 and with colimits of chains. If the ini-
T-initial-chain
tial chain of a functor F converges in steps, then F

0 is the initial algebra w.r.t. w


1
,+1
: F(F

0)
F

0.
The proof is completely analogous to that of
theorem-initial-algebra-omega
2.1.9. Given an F-algebra (A, ), we obtain a unique
cocone
j
: F
j
0 A with
j+1
= F
j
for all ordinals j. And

is then proved to be the unique


homomorphism from (F

0, w
1
,+1
) into (A, ).
C-initial-chain Corollary 3.1.5. Let A be a category with an initial object 0 and with colimits of chains. Then the
initial chain of a functor F preserving colimits of -chains converges in steps, hence, F = F

0.
Example 3.1.6. Consider the countable power set functor P
c
on Set. For =
1
(the rst uncountable
cardinal), P
c
preserves colimits of -chains. Then P

c
is an initial algebra. It is often called HC, the
set of hereditarily countable sets, cf. Example
ex:Pk
2.2.12.
E-initial-polynomial Example 3.1.7. For polynomial functors H

, see Example
example-polynomial-endofunctor
2.2.11, we show that the initial chain yields
the algebra
H

= well-founded -trees.
We introduced -trees in Example
example-polynomial-endofunctor
2.2.11; well-founded means that every path in the tree is nite. Before
analyzing the initial chain for H

, we introduce the concept of depth which generalizes the traditional


one (for nite trees) to an ordinal depth for innite trees. Recall that for a nite tree t the depth d(t) is
always equal to the join of d(t
i
) + 1 for all children t
i
of t:
(a) if t has no children, its depth is 0 = sup , and
(b) if t has children t
1
, . . . , t
k
then d(t) = sup
i=1,...,k
(d(t
i
) + 1).
Recall also the ordinal sum + 1: this is the ordinal successor of .
D-depth Denition 3.1.8. The depth of a tree t is dened to be
(a) the ordinal d(t) = sup(d(t
i
) +1) where the join ranges over all children t
i
of t, in case each d(t
i
)
is an ordinal, or
(b) in case d(t
i
) = for some child t
i
of t.
E-depth Example 3.1.9. Every ordinal is the depth of some tree. For a precise proof see Theorem
T-well-founded
3.1.12 below.
Let us illustrate this on some examples:
If is a -ary operation and is unary, then
t
0
= (x, x,
2
x, . . . ) has depth
t
1
= (x, x,
2
x, . . . ) has depth + 1
t
2
=
2
(x, x,
2
x, . . . ) has depth + 2
.
.
.
(t
0
, t
1
, t
2
, . . . ) has depth +.
An example of a tree of depth is the innite path tree (( . . .
47
Lemma 3.1.10. A tree has depth less than iff it is well-founded.
L-depth
Proof. If t has depth i Ord then it is well-founded: this is a trivial transnite induction on i. Con-
versely, if t is well-founded and has depth , we nd a contradiction: there exists a child t
i
1
of t of
depth and a child t
i
2
of t
i
1
of depth etc., and these indices i
1
, i
2
, . . . yield an innite path in t.
Example 3.1.11. Let us analyze the initial chain of H

: we can represent elements of


H
1

=
0
as the -trees of depth 0 (that is, singleton trees labelled by nullary symbols). Then the elements of
H
2

k

k
0
are represented by precisely all -trees of depths 0 or 1. In general, for every ordinal j we have
H
j

= all -trees of depth less than j.


This is easy to see by transnite induction: the case j = 0 is clear (no -tree has depth less than 0), the
isolated induction step follows from H
j+1

k
(H
j

)
k
, and in the limit step j we see that the
colimit of the chain of inclusions is the union:
H
j

=
_
m<j
H
m

= all -trees of depths less than j.


T-well-founded Theorem 3.1.12. For every signature , the initial algebra of H

is the algebra of all well-founded


-trees. The initial chain converges in 0 steps if
0
= , in one step if =
0
,= , and otherwise in
precisely steps for the rst regular cardinal
4
larger than all arities.
Proof. Assume
0
,= and ,=
0
.
(1) The initial chain converges in steps and yields H

= all well-founded -trees. This follows


from
L-depth
3.1.10 and the fact that if a tree of depth < is -branching, then it has depth less than (an
easy proof by transnite induction).
(2) The initial chain does not converge in less than steps. This follows from the fact that every
ordinal i < is the depth of some -tree. We prove this in two steps:
(a) Assume that is the supremum of arities in . For i = 0 take any member of
0
, for i + 1
let t
0
have depth i and form t
1
= (t
0
, t
0
, . . . ) where the root is labelled by any member
0
.
If i < is a limit ordinal, take of arity k > i and for every j < i take a -tree t
j
of depth j
(induction hypothesis). Extend this notation for all i j < k by t
j
:= t
0
. Then the -tree (t
j
)
j<k
has depth i.
(b) Let be larger than the supremum of all arities of . Then either is nite and = . In this
case it is easy to see that every natural number is the depth of some -tree (recall
0
,= , =
0
).
Or is innite and has conality
0
< , in which case is the cardinal successor of . The proof that
all i < are depths of -trees is as in (a) above, it remains to verify that there is a -tree of depth .
Choose an operation of arity
0
. Since
0
is the conality of , we have ordinals
i
< indexed
by all i <
0
with = sup
i
: i <
0
. For every i choose a -tree t
i
of depth
i
, and for i
0
put
t
i
= t
0
. Then (t
i
)
i<
has depth .
4
A cardinal is regular if it is innite and does not have a conal smaller than itself. (The smallest non-regular innite
cardinal is .)
48
R-problem-initial Remark 3.1.13. We see from Theorem
T-well-founded
3.1.12 that for every regular cardinal there is a set functor
whose convergence of the initial chain takes precisely steps. How about other ordinals? In Theo-
rem
T-well-founded
3.1.12 we saw that 0 or 1 step are possible for H

. For the functor C


2,1
constantly equal to 1 except
C
2,1
= 2 the initial chain takes 2 steps. One can construct (a bit more technically) a set functor that
needs 3 steps. And this is all:
Theorem 3.1.14 (
AT09
[AT09]). For every endofunctor of Set with an initial algebra, the initial chain con-
verges either in at most 3 steps or in steps for some regular cardinal .
Are all initial algebras obtainable by iteration? As it happens, the answer is negative: consider the
category Ord

, the ordinals with a new element added on top. Let F : Ord

Ord

given by
F() = + 1, and F() = . Clearly, is the only xed point, and this is not F

1 for any .
However, as we mention shortly, this does not happen in reasonable categories, at least not for
functors preserving monomorphisms.
D-constructive Denition 3.1.15 (
takr
[TAKR]). A class Mof monomorphisms in a category A is called constructive pro-
vided that it is closed under composition, and for every chain of monomorphisms in M, (i) a colimit
exists and is formed by monomorphisms in M, and (ii) the factorization morphism of every cocone of
monomorphisms in Mis again a monomorphism in M.
Remark 3.1.16. In particular A has an initial object 0 and all morphisms with domain 0 lie in M.
E-constructive Examples 3.1.17. (i) The categories of sets, graphs, posets, and semigroups all have the constructive
class of all monomorphisms.
For a non-example, we consider the category BiP of Example
ex:BiP
2.2.15. The point is that the unique
morphism 0 X is not always monic.
(ii) In CPO

-enriched categories the class of all embeddings is constructive: see Basic Lemma
basic-lemma
2.8.10
and Observation
O-self-dual
2.8.9 (2).
T-constructive Theorem 3.1.18 (
takr
[TAKR]). Let Ahave a constructive class Mof monomorphisms and be M-wellpowered.
Let F : A A preserve monomorphisms in M. The following are equivalent:
(i) F has a xed point, i.e., an object A

= FA.
(ii) F exists,
and
(iii) the initial chain converges.
Proof. Lambeks Lemma tells us that (ii) implies (i). To see that (i)(iii), we argue as in the proof of
Theorem
T-initial-chain
3.1.4: for every ordinal j the morphism
j
: F
j
0 A from the induced cocone of the algebra
A is a member of M(an easy proof by transnite induction). If the initial failed to converge, the xed
point object A would have a proper class of subobjects in M. For (iii) (ii) see Theorem
T-initial-chain
3.1.4.
E-three-conditions Example 3.1.19. (i) For every endofunctor of Set the three conditions of Theorem
T-constructive
3.1.18 are equiv-
alent.
This follows from Theorem
T-constructive
3.1.18 in the case that F preserves monomorphisms. For general F,
see
akp
[AKP]. However, we present here a substantially shorter proof:
49
Assume F , = (else the initial chain converges in zero steps) and let : FA

=
A be a xed
point with the corresponding cocone
j
: F
j
0 A, see Theorem
T-initial-chain
3.1.4. We prove that

is a
monomorphism. Choose a morphism u
0
: A F and observe that ! = u
0

0
: F. Then
the morphisms u
n
: A F
n+1
0 dened by u
n+1
= Fu
n

1
clearly full
w
n,n+1
= u
n

n
: F
n
0 F
n+1
0 for all n < .
Given elements x, y F

0 merged by

, we prove x = y. Choose n < and elements x

, y

of F
n
0 mapped by w
n,
to the given pair. Then
n
=

w
n,
merges x

and y

, thus, these
elements are also merged by
(w
n+1,
u
n
)
n
= w
n+1,
w
n,n+1
= w
n,
,
which proves x = y.
Since

is a monomorphism with nonempty domain, it splits, thus, F

is also a monomor-
phism. This proves that
+1
= F

is a monomorphism. In this manner we see that all


j
with j are monomorphisms, and then we argue as in Theorem
T-constructive
3.1.18.
(ii) The category Pfn of sets and partial functions has the property that split monomorphisms (which
are precisely the monomorphisms of Set) form a constructive class. Thus, also here the three
conditions are equivalent for every endofunctor.
(iii) Also in the category Rel of sets and relations the three conditions are equivalent for all endofunc-
tors (for the same reason).
E-two-sorted Example 3.1.20 (
AT09
[AT09]). Unfortunately, Theorem
T-constructive
3.1.18 does not generalize to settings such as many-
sorted sets. For example, consider two-sorted sets. Let F : Set Set Set Set be given by
F(X, Y ) =
_
(1, 1) if X ,=
(, PY ) if X =
Although (1, 1) is a xed point, F has no initial algebra: the F-algebras (, PY ) (, Y ) cannot
be initial by Lambeks Lemma, and from those algebras of the form (1, 1) (X, Y ) there exist no
homomorphisms to those of the form (, PY ) (, Y ).
E-coproduct-set Example 3.1.21 (
ATbook
[AT]). Another unfortunate fact: the collection of all set functors possessing initial
algebras is not well behaved. There are set functors F
1
, F
2
having initial algebras such that neither
F
1
+F
2
nor F
1
F
2
has one. In fact, given a set of cardinals, let P

be the following modication of


the power-set functor:
P

X = M X : card M /
dened on morphism f : X Y by
P

f
(M) =
_
f[M] if card M / and f[
M
is a monomorphism,
else.
It is easy to see that every innite set X with card X is a xed point of P

, thus, P

has an initial
algebra.
Take any disjoint pair of non-empty classes with
1

2
= card. Then the functors F
i
= P

i
have
initial algebras, but F
1
+F
2
and F
1
F
2
have no xed points.
Theorem 3.1.22 (
AT09
[AT09]). For the category Set
S
of many sorted sets whenever an endofunctor has an
initial algebra, then the initial chain converges.
50
3.2 Terminal Chain
This is nothing else than the dual of the initial chain of Denition
def-ordinals
3.1.2. This was formulated explicitly
by M. Barr
barr
[Barr]:
D-terminal-chain Denition 3.2.1. Let A be a category with a terminal object 1 and with limits of (co)chains. For every
endofunctor F the terminal chain is the chain in A indexed by Ord
op
, the dual of the ordered class of
ordinals
j
, having objects F
j
1 dened by
F
0
1 = 1
F
j+1
1 = F(F
j
1) for all ordinals j
and
F
j
1 = lim
i<j
F
i
1 for all limit ordinals j.
We write v
k,j
: F
k
1 F
j
1, j k, for the uniquely determined connecting morphisms, and we say
that the terminal chain converges in steps if v
+1,
is an isomorphism.
For nitary set functors the chain (
eq:chain2
2.15) is precisely the part of the above chain from to + .
For example m = v
+1,
.
Theorem 3.2.2. Let A be a category, let be a cardinal, and assume that (i) A has limits of
op
-chains
of length at most , and (ii) F preserves limits of
op
-chains. t Then F has the terminal coalgebra
F = F

1.
This is just the dual of Corollary
C-initial-chain
3.1.5. As an example, recall that for every (not necessarily nitary)
signature , the polynomial functor H

preserves
op
-limits. Thus, the transnite chain does not bring
anything new. In contrast, for the nite power-set functor P
f
the terminal chain converges in +
steps, see Example
ex:P
2.6.2.
Example 3.2.3. In contrast to Example
E-three-conditions
3.1.19 (i), a set functor with a xed point need not have a
terminal coalgebra. Here is an example from
ak95
[AK95]. For = the set functor
P
{}
(see Example
E-coproduct-set
3.1.21)
has an initial algebra but not a terminal coalgebra. Recall from
E-coproduct-set
3.1.21 that P
{}
X is the set of all subsets
of X of cardinality different from . Obviously, N is a xed point of P
{}
: the set P
{}
N of all nite
subsets is countable.
The reason why P
{}
does not have a terminal coalgebra follows from the fact that the terminal
-chain is the same for P
{}
and P
f
. It is not difcult to derive from the description in Example
ex:L
2.5.7
that the limit P

f
1 is uncountable. From this it follows that the th iteration of P
{}
at 1 has power
card(P
{}
)

(1) > for all innite cardinals .


Open Question 3.2.4. For which ordinals does there exist a set functor whose convergence of the
terminal chain requires precisely steps? We have
= 0 whenever F1 = 1,
= 1 for example for constant functors C
M
, M , 1,
= for H

,
= + for P
f
,
51
and not much more seems to be known. However, whenever a terminal coalgebra exists, it can be
constructed by the terminal chain. This holds, more generally, for many-sorted sets:
Theorem 3.2.5.
AT09
[AT09] Whenever an endofunctor of Set
S
has a terminal coalgebra, then the terminal
T-many-sorted
chain converges.
Remark 3.2.6. This generalizes the previous result on endofunctors of Set in Ad amek and Koubek
ak95
[AK95].
Both proofs heavily depend on the theory of algebraized chains developed by Jan Reiterman in his PhD
thesis and summarized in Koubek and Reiterman
kr
[KR].
The expected generalization of Theorem
T-many-sorted
3.2.5 to, say, all presheaf categories does not hold. In
AT09
[AT09] an endofunctor of the category of graphs is constructed that has a terminal coalgebra although
the coalgebra chain does not converge.
We now turn to the category of dcpos and consider sufcient conditions for endofunctors with a
xed point to have a canonical one.
Notation 3.2.7. We write
CPO

for the category of dcpos (posets with directed joins and therefore a least element) and functions which
are continuous (they preserve directed joins) and strict (preserving the least element. Analogously to
Remark
R:enriched
2.8.4 a category is CPO

-enriched if its hom-sets carry a dcpo structure and composition is


strict and continuous.
Denition 3.2.8. A functor F between CPO

-enriched categories is called stable if for every idempo-


tent endomorphism f : X X, f = f f, we have:
f _ id
X
implies Ff _ id
FX
.
Examples 3.2.9. (i) Every locally continuous functor (see Denition
def-locally-continuous
2.8.12), is stable.
(ii) Id is always stable. A composite, a product or coproduct of stable endofunctors of CPO

is
stable.
(iii) For every stable functor F : CPO

CPO

the lifting given by F

X = FX ( a
new bottom element) is stable.
Remark 3.2.10. The H

-algebras in CPO

are the strict continuous -algebras: they are given


by a cpo, A, which is a -algebra such that every operation : A
n
A is continuous and strict:
(, , , . . . ) = .
The non-strict continuous -algebras are the algebras for the endofunctor
H

X =

X
n

n = ar(),
where each summand is lifted. We know that H

is also stable.
O-stable Observation 3.2.11. (i) Stable functors F preserve embeddings. In fact, F e is the projection for
Fe.
52
(ii) The converse holds in categories with split idempotents, i.e., given g g = g there exists a factor-
ization g = e u with u e = id. (This weak condition holds in CPO

, Pfn (the category of sets


and partial functions, Rel (the category of sets and relations) and all categories having equalizers.)
That is: for endofunctors of categories with split idempotents we have:
F stable F preserves embedding-projection pairs.
Indeed, let F preserve these pairs and let g g = g _ id
X
. For the above factorization we have
e u = g _ id
X
, thus, e is an embedding with u = e, therefore Fu =

Fe and we conclude
Fg = Fe

Fe _ id
FX
.
(iii) If F is a stable endofunctor, then the initial chain
0
u
F0
Fu
FF0
FFu
. . .
is given by embeddings, and the corresponding projections form the terminal chain for F. In fact,
0 = 1 by (3) in Remark
R-enriched
2.8.6 and so u: F0 0 is unique. Thus, up to the ordinal we get the
embedding-projection pairs
0
u

F0
u

Fu

FF0
FFu

F u

FF u

For step (and all limit steps) we know from Basic Lemma
basic-lemma
2.8.10 that a colimit of a chain of
embeddings, formed in A, stays as a colimit in A
E
.
C-can-fixed-point Corollary 3.2.12. Let A be a CPO

-enriched category with colimits of chains. Then every stable


endofunctor F with a xed point has a canonical xed point F = F.
This follows from Theorem
T-constructive
3.1.18 applied to the class Mof all embeddings. This is a constructive
class, see Lemma
basic-lemma
2.8.10 and Remark
rem:basic
2.8.11. Due to Observation
O-stable
3.2.11 F preserves embeddings, and
wellpoweredness w.r.t. embeddings follows from the observation that the number of split subobjects of
an object A is bounded by the number of endomorphisms of A.
Remark 3.2.13. The above Corollary
C-can-fixed-point
3.2.12 stems from
barr
[Barr], where the slightly stronger assumption
that F be locally monotone was made, and the proof is somewhat more technical.
Example 3.2.14. A stable endofunctor of CPO

without xed points. We denote by C(X) the free


CPO

-completion of X, that is, C is the composite (= monad) of the forgetful functor CPO


Pos and its left adjoint. This can be described as
C(X) = all directed, down-closed subsets of X including
ordered by inclusion. The directed joins in C(X) are unions, and the universal arrow X C(X) takes
x to x = y : y x. The endofunctor C is stable: if e _ id
X
, then the set
a C(X) : Ce(a) _ a
contains all a = x and a = and is closed under directed joins thus, this is all of C(X).
53
The functor C has no xed points. In fact, assuming the contrary, we have an isomorphism
: C(A) A
and we derive a contradiction. Dene a chain
a
i
C(A) for i Ord
by transnite induction
a
0
=
a
i+1
= (a
i
)
and for all limit ordinals j
a
j
=
_
i<j
a
i
.
It iqs easy to see that a
i
is indeed a chain in C(A): assuming a
i
_ a
i+1
we have, since () is
monotone, a
i+1
_ a
i+2
. Thus, there exists an ordinal i
0
with
a
i
0
= a
i
0
+1
.
However, the least such ordinal i
0
cannot be 0 because () = implies
a
1
= , = a
0
.
It also cannot be a successor ordinal, since from a
i
0
1
,= a
i
0
we derive (a
i
0
1
) ,= (a
i
0
), that is,
a
i
0
,= a
i
0
+1
. And i
0
cannot be a limit ordinal: from
a
i
0
=
_
i<i
0
a
i
we have, by continuity of , that
x =
_
i<i
0
(a
i
) for x = (a
i
0
).
Now x x = a
i
0
+1
, however, x / a
i
0
because for every i < i
0
we have
x / a
i
.
Indeed, this follows from the fact that since is a monotone monomorphism, (a
i
) is a strictly increas-
ing i
0
-chain with join x. Thus, (a
i
) ,= x, which implies x / (a
i
) = a
i+1
. Therefore, we get a
contradiction to a
i
0
= a
i
0
+1
.
Remark 3.2.15. The concept of a locally continuous endofunctor F can be generalized to that of a
locally -continuous one, where is a given innite cardinal: This means that for every -chain (f
i
)
i<
in A(X, Y ) we have
F(
_
i<
f
i
) =
_
i<
Ff
i
in A(FX, FY ).
For these endofunctors we have, whenever A is CPO

-enriched and has colimits of chains of conal-


ity at most , the following:
F has a canonical xed point F = F = lim
n<
F
n
1.
This is completely analogous to Theorem
T-Smyth
2.8.14.
54
4 Sufcient Conditions for Terminal Coalgebras
4.1 Using the Adjoint Functor Theorems
section-using-AFT
Recall that for every endofunctor F of A we have a forgetful functor
U : CoalgF A (A, ) A.
When A has (any type of) colimits, the same type exists in CoalgF and is preserved by U. (This is
why initial coalgebras are not interesting . . . .) Consequently, if A is cocomplete and cowellpowered
(i. e., every object has only a set of quotients), then so is CoalgF. Indeed, quotients are represented by
epimorphisms, and e: A B is an epimorphism iff the square
A
e

B
id

B
id

B
is a pushout.
Recall the following formof Freyds Adjoint Functor Theorem(see e. g.
maclane
[ML]): if Kis a cocomplete
and cowellpowered category with a weakly terminal set A of objects (meaning that every object of K
has a morphism into an object of A), then K has a terminal object. Applying this to CoalgF we get
thm:adj Theorem 4.1.1 (
barr
[Barr]). Let A be a cocomplete and cowellpowered category, and let F : A A have
a weakly terminal set of coalgebras. Then F has a terminal coalgebra.
Remark 4.1.2. The proof of Freyds Adjoint Functor Theorem yields the following construction og the
terminal coalgebra: let S be a weakly terminal set of coalgebras. Take the coproduct : C FC of
all coalgebras in S. Now form the coequalizer of all the F-coalgebra homomorphisms from (C, ) to
itself; one readily shows that this coequalizer is the terminal F-coalgebra.
Observe that the coproduct (C, ) is a weakly terminal coalgebra and the coequalizer of all its endo-
morphisms is the largest congruence on (C, ). So Theorem
thm:adj
4.1.1 is a generalization of Theorem
thm:cong
2.4.16
above.
R-generating Remark 4.1.3. A related criterion concerns the concept of a generating set, which is a set G of objects
such that whenever parallel morphisms p, q : X Y are distinct, then there exists a morphism g : G
X with G G and p g ,= q g. Generalizing the notion of bounded set functor of Kawahara and Mori
kawaharamori
[KM], we can dene
section-bounded-set-functor
D-bounded-functor Denition 4.1.4. A functor F : A A is called bounded by a set G of objects if for every coalgebra
: A FA and every morphism g : G A with G G there exists a coalgebra

: A

FA

with
A

G and a coalgebra homomorphism m: (A

) (A, ) through which g factorizes:


A

FA

Fm

G
g

~
~
~
~
A

FA
55
In
kawaharamori
[KM] this was dened for A = Set and G the (essentially small) collection of all sets of cardinality
at most .Then F is called bounded by . Observe that in this case it is sufcient to request that for
every element x A there exists a subcoalgebra A

A containing x and with card A

. In fact,
the general case follows from the observation that a union of subcoalgebras is always a subcoalgebra.
The following is an easy generalization of the result of
kawaharamori
[KM] for sets.
T-cocom-cowell Theorem 4.1.5. Let A be a cocomplete and cowellpowered category with a terminal object. Every
endofunctor bounded by a generating set (
R-generating
4.1.3) has a terminal coalgebra.
Proof. This uses Freyds Special Adjoint Functor Theorem: we prove that U : CoalgF A has a right
adjoint U R (then R1 is terminal in CoalgF). For that we need, since CoalgF is cocomplete and
cowellpowered and U preserves colimits, just a generating set in CoalgF. In fact, let G be a generating
set in A such that F is bounded by it. Then the set of all coalgebras : A FA with A G is
generating. In fact, given homomorphisms p, q : (B, ) (

B,

) if p ,= q there exists g : G A with
G G and p g ,= q g. Let m: (B

) (B, ) be a subcoalgebra with B



G such that g factorizes
through m, then clearly p m ,= q m.
The following theorem due to Gumm and Schr oder
gummschroeder
[GS] shows the existence of terminal coalgebras
of quotients of functors with terminal coalgebras. In the special case of nitary endofunctors of Set we
have already considered quotients of functors in Section
sec:quotient
2.7.
Denition 4.1.6. A quotient functor of a functor F : A A is represented by a functor G: A A
and a natural transformation e: F G with epimorphic components.
Another such transformation e

: F G

represents the same quotient iff some natural isomorphism


h: G G

fulls e

= h e.
Theorem 4.1.7. Let A be a cocomplete and cowellpowered category in which epimorphisms split. Let
: H F be a quotient functor. Then if H has a terminal coalgebra, then so has F and F is a
quotient coalgebra of H via the unique coalgebra homomorphism from the coalgebra
H

H(H)

H

F(H). (4.1) eq:tauH


to F.
Proof. (1) Let

: H F(H) be the coalgebra in (


eq:tauH
4.1). Then the same argument as in Lemma
lemma-weak-presentation
2.4.6
shows tat (H,

) is a weakly terminal F-coalgebra. Thus, by Theorem


thm:adj
4.1.1, the terminal F-coalgebra
: F F(F) exist, and therefore we have the unique F-coalgebra homomorphism from (H,

)
to (F, ).
(2) It remains to show that is a (split) epimorphism. By part (1) of our proof we have an F-coalgebra
homomorphism s from (F, ) to (H,

). By denition is the unique F-coalgebra homomorphism


from (H,

) to the terminal F-coalgebra (F, ). Thus, s is an F-coalgebra homomorphism from


F to itself, whence s = id so that is indeed a split epimorphism.
4.2 Finitary and Accessible Functors
section-finitary
We proved in Section
section-weak
2.4 that nitary endofunctors of Set have a terminal coalgebra. We now generalize
this to accessible endofunctors of Set and also of more general categories. P. Gabriel and F. Ulmer used
in
gabrielulmer
[GU] this concept to generalize niteness:
56
def:lfp Denition 4.2.1. An object Aof a category Ais called nitely presentable if the hom-functor A(A, ): A
Set is nitary (i.e., preserves ltered colimits).
Examples 4.2.2. In sets, posets, graphs and metric spaces nitely presentable means nite. In CPO

no nontrivial object is nitely presentable.


More generally, a -ltered colimit for an innite regular cardinal is a colimit of a diagram
D: D A such that (i) for less than objects there always exists a cocone in D and (ii) for less
than parallel morphisms f
i
: A B (i I) there exists a coequalizing morphism g : B C (that is,
g f
i
: A C is independent of i I). An object is called -presentable if its hom-functor preserves
-ltered colimits. In sets, posets, graphs and metric spaces this means precisely that the cardinality is
less than . In CPO

for any > again -presentable objects are precisely those of cardinality less
than .
D-accessible Denition 4.2.3. A functor F is called accessible if it preserves -ltered colimits for some cardinal .
(Thus, F is called nitary in case = .)
E-accessible Examples 4.2.4. (i) The set functor X X
n
is nitary for every natural number n. It is accessible
for every cardinal n.
(ii) A coproduct of accessible functors is accessible. Thus, all polynomial functors H

are accessible.
They are nitary iff the signature is nitary.
(iii) The functor P
3
and P
f
are nitary, P

1
is accessible (choose =
1
in Denition
D-accessible
4.2.3) and P is
not accessible.
thm:gs Theorem 4.2.5 (
adamekporst
[AP01],
gummschroeder
[GS]). For a set functor F the following conditions are equivalent:
(i) F preserves -ltered colimits;
(ii) every element of FA, for any set A, lies in the image of Fb for some subset b: B A of less
than elements.
Moreover, they imply that F is bounded by sets of cardinality .
Remark 4.2.6. Thus, every accessible set functor is bounded. The converse is also true: every bounded
functor is accessible (but in general not for the same ).
Proof of Theorem
thm:gs
4.2.5. Indeed, (i) (ii) follows fromF preserving the -directed union of all subsets
b: B A of less than elements. The other implications are slightly more involved. Let us present
just one of them:
(ii) (iii) Given a coalgebra a: A FA and a subset b
0
: B
0
A of less than elements, we
dene a -chain of subsets b
i
: B
i
A (i < ) of less than elements for which the union
B =
_
i<
B
i
turns out to be the desired subcoalgebra containing B
0
. In the induction step, given b
i
: B
i
A use the
fact that F preserves the -directed union (= colimit) of all subsets of less than elements containing
B
i
. Consequently, our subobjects b
i
factorize through one of F-images of these subsets. That is, there
exists a morphism f
i
as follows:
57
B
i
f
i

b
i

FB
i+1
Fb
i+1

A
a

FA
where b
i+1
: B
i+1
A is a subset containing B
i
and having less than elements. For limit ordinals:
put B
i
=

j<i
B
j
. Clearly, the union b: B A of this -chain is a subcoalgebra (use the above maps
f
i
) containing B
0
.
Proposition 4.2.7 ((Ad amek, Porst
ap
[AP04], Gumm, Schr oder
gummschroeder
[GS])). For every set functor F the fol-
lowing conditions are equivalent:
(i) F is accessible (= bounded),
(ii) F is a quotient of a polynomial endofunctor H

,
(iii) F is a quotient of the endofunctor
G
CM
: X C X
M
for some sets C and M.
Observe that coalgebras for G
C,M
are deterministic automata with output set C and input set M:
every coalgebra a: A C A
M
yields an output map A C and a next-state map in curried from
A A
M
:
AM A
A A
M
.
Corollary 4.2.8. The collection of accessible set functors is closed under products, coproducts, sub-
functors and quotient functors.
Just subfunctors need explanations: use Denition
D-accessible
4.2.3 and Example
E-accessible
4.2.4 (ii). The next result
follows from Theorem
T-cocom-cowell
4.1.5.
cor:km Corollary 4.2.9 (
kawaharamori
[KM]). Every accessible set functor has a terminal coalgebra.
Makkai and Par e
makkaipare
[MP] proved a stronger result: the categories of coalgebras of accessible functors
are complete. For accessible set endofunctors Worrell provided an upper bound for the terminal chain
to converge:
Theorem 4.2.10. (Worrell
worrell:05
[W2]) For every set endofunctor F preserving -ltered colimits , the termi-
thm:worrell-2
nal coalgebra is obtained by taking at most + steps in the terminal chain:
F = F
+
1.
The proof of this theorem is similar to the proof of Theorem
thm:worrell
2.6.3. Moreover, if F preserves count-
able intersections, then
F = F
+
1.
We can generalize Corollary
cor:km
4.2.9 to an important class of categories:
58
Denition 4.2.11. (Gabriel, Ulmer
gabrielulmer
[GU]) Let be an innite cardinal. A category A is called locally
-presentable if it is cocomplete and it has a set A

of -presentable objects whose closure under -


ltered colimits is all of A. And A is called locally presentable if it is locally -presentable for some
.
Examples of locally nitely presentable categories ( = ) are sets, posets, graphs, groups (in
fact, all varieties of algebras, also many-sorted). The categories CPO

, MS and CMS are locally


1
-
presentable.
T-accessible Theorem 4.2.12. Every accessible endofunctor if a locally presentable category has a terminal coalge-
bra.
This result follows from a more general result of M. Makkai and R. Par e
makkaipare
[MP] which shows that
U : CoalgF A has a right adjoint. But we present a full proof here for the convenience of the reader.
A direct proof for set functors is presented by Barr
barr
[Barr].
Proof of Theorem
T-accessible
4.2.12. Since A is locally presentable, it is cocomplete and cowellpowered and the
set A

is generating, see
ar
[AR] or
gabrielulmer
[GU] for these facts. Moreover, we can nd for which A is locally
-presentable and F is -accessible. For the set G = A

we form the closure



G under colimits of
-chains and verify the remark in Theorem
T-cocom-cowell
4.1.5. Let : A FA be a coalgebra and g : G A a
morphism where G is -presentable. We dene a -chain B, i < , of -presentable objects together
with a cocone b
i
: B
i
A analogously to Theorem
T-cocom-cowell
4.1.5: rst
b
0
= g and B
0
= G.
Given b
i
: B
i
A express A as a -ltered colimit of -presentable objects G
t
and with the colimit
cocone g
t
: G
t
A. Since B
i
is -presentable, A(B
i
, ) preserves this colimit, thus, b
i
factorizes
through g
t
for some t, and we put B
i+1
= G
t
and b
i+1
= g
t
G
t
= B
i+1
gt

B
i
b
i

t
t
t
t
t
A
Also FA = colimFG
t
is a -ltered colimit (since F is -accessible), so a b
i
: A FA factorizes
through some Fg
t
, and without loss of generality this is the same t as above:
B
i
f
i

b
i

FB
i+1
Fb
i+1

FA
For limit ordinals put B
i
= colimB
j
and obtain the induced morphism b
i
: B
i
A. Also for
i = we form a colimit colim
i<j
B
j
B = colim
i<
B
i


G
which is -ltered, thus, preserved by F. The above morphisms f
i
yield a coalgebra structure
colim
i<
f
i
: B FB
59
such that
b = colim b
i
: B A
is a coalgebra homomorphism. We have factorization of g through b: recall g = b
0
and use the rst
colimit morphism of B = colimB
i
.
Theorem 4.2.13 (
AT10
[AT10]). Let F be an accessible endofunctor of a locally presentable category pre-
serving monomorphisms. Then the terminal chain converges:
F = F
j
1 for some ordinal number j.
ex:Hausfin Example 4.2.14. All endofunctors of CMS formed by products, coproducts and compositions of poly-
nomial functors and the Hausdorff functor have a terminal coalgebra. In fact, the follows from Theo-
rem
T-accessible
4.2.12: all these functors are accessible. For Hthis was proved in
vanBreugel
[vB]; in fact, His even a nitary
functor: see
amms
[AMMS].
5 Interaction between Initial Algebras and Terminal Coalgebras
by Jirka
6 Terminal Coalgebras as Algebras
sec:ciarat by Stefan
In this section we are going to provide an equivalent characterization of terminal coalgebras. Recall that
by (the dual of) Lambeks Lemma
lemma-Lambek
2.1.1 the structure morphism of a terminal coalgebra F for a functor
F is an isomorphism. Thus, F can be considered as an F-algebra. The equivalent characterization of
F arises in connection with an important property of this algebra: it is a completely iterative algebra,
i. e., it allows for the unique solution of recursive equations. An object of A carries a terminal coalgebra
for F iff it carries an initial cia, see Theorem
thm:cianuF
6.1.12.
The second part of this section deals with a third interesting xed point of a functor besides its initial
algebra and its terminal coalgebra. For nitary endofunctors of Set this rational xed point R, as we
call it here, has two equivalent characterizations: as an F-algebra R is the initial iterative algebra for F,
where an algebra is iterative if it allows for the unique solution of nite systems of recursive equations
(the niteness being the difference to completely iterative algebras). As a coalgebra, R is the terminal
locally nite coalgebra for F, i. e., for every F coalgebra with a nite carrier there exists a unique
coalgebra homomorphism into R. So R precisely collects all the behaviors of nite systems considered
as F-coalgebras. Accordingly, examples of rational xed points are: regular languages, rational streams,
rational (or regular) trees for a signature etc. We discuss rational xed points in Subsection
sec:rat
6.2.
6.1 Completely Iterative Algebras
sec:cia
The idea of algebras with unique solutions of recursive equations stems from work in general algebra by
Evelyn Nelson
nelson
[N] und Jerzy Tiuryn
tiuryn
[T]. Nelson introduced iterative algebras for a signature as algebras
with unique solutions of nite recursive systems of equations. Dropping the niteness assumption one
arrives at the notion of a completely iterative algebra. The latter notion was introduced in
milius
[M
1
] and
this paper also investigates the connection to terminal coalgebras. One of the results is that terminal
coalgebras are equivalently characterized as initial completely iterative algebras. But before we make
this more precise let us explain the notion of completely iterative algebras with a concrete example.
60
Consider a polynomial functor H

on Set arising from a signature . The general algebras for the


signature are precisely the algebras for the functor H

, see Example
ex:poly
2.2.11. A -algebra A is called
completely iterative if every system of mutually recursive equations
x
i
t
i
, i I, (6.1) eq:system
where I is some (possibly) innite set, X = x
i
[ i I is a set of variables and each t
i
is a term over
X + A none of which is just a single variable, has a unique solution in A. By a solution we mean a set
x
i

[ i I of elements of A such that the formal equations in the given system (


eq:system
6.1) become actual
identities in A.
Example 6.1.1. For example, the functor FX = X X + 1 is the polynomial functor associated to
the signature with a binary operation symbol and a constant symbol c. The terminal coalgebra
F consists of all binary trees (see Example
ex:trees
2.3.7); let us consider inner nodes of binary trees as being
labelled by and leaves as labelled by c. Now for any binary tree t F consider the following systems
of equations:
x
1
x
2
t x
1
x c
Then the solution of this equation in F is formed by the two innite trees
x
1

( ( c) t) c) t) and x
2

( ( t) c) t) c) (6.2) eq:binsys
written as innite -terms. At some
point we
should put
pictures.
Notice that in general, it is sufcient to allow as the right-hand sides of equation systems (
eq:system
6.1) only
at-terms, i. e., terms which are either of the form (x
1
, . . . , x
n
) for some operation symbol from
or are elements a A. In fact, every arbitrary system can be attened by introducing enough fresh
auxiliary variables to represent subterms of non-at terms. For example, the above system (
eq:binsys
6.2) can be
attened as follows:
x
1
x
2
z
1
x
2
x
1
z
2
z
1
t z
2
c
Each at system of equations can be presented as a function e : X H

X + A, and solutions in an
H

-algebra : H

A A are presented as functions e

: X A such that
e

= [, id
A
] (H

+ id
A
) e.
Again, this equation just expresses the fact that the formal equations are turned into identities in A. This
motivates Denition
def:solcia
6.1.3 below.
Assumption 6.1.2. Throughout the rest of this subsection we assume that A denotes a category with
binary coproducts.
Denition 6.1.3.
milius
[M
1
] Let F be an endofunctor on A. By a at equation morphism in an object A we
def:solcia
mean a morphism e : X FX + A. For an algebra : FA A we call e

: X A a solution of e
in A if the square below commutes:
X
e

A
FX +A
Fe

+id
A

FA+A
[,id
A
]

(6.3) diag:sol
61
Finally, an algebra (A, ) for F is called completely iterative (or, cia for short) provided that every at
equation morphism in A has a unique solution.
ex:final Examples 6.1.4.
(i) The algebra of addition on the extended natural numbers

N = 1, 2, 3, . . . is a cia for
the functor FX = X X, see
amv
[AMV
1
].
(ii) Innite binary trees form a cia for FX = X X +1. All nitely branching strongly extensional
trees form a cia for P
f
. All unordered nitely branching trees form a terminal coalgebra for the
bag functor B. These are instances of the more general fact in Proposition
prop:finalcia
6.1.5 below.
(iii) Unary algebras over Set are precisely the algebras for the identity functor F = Id on Set. A
unary algebra : A A is a cia if and only if
(a) there exists a unique xed point a
0
A of and
(b) there exists a well-founded strict order on A a
0
such that is increasing, i. e., (a) > a
for all a A, a ,= a
0
.
(iv) Classical algebras are seldom cias. A group is a cia for the functor HX = X X expressing
the binary operation iff its unique element is the unit 1, since the recursive equation x x 1
has a unique solution. A lattice is a cia for H iff it has a unique element; consider the equation
x x x.
prop:finalcia Proposition 6.1.5. The terminal coalgebra F is a cia.
More precisely, let t : F F(F) be a terminal F-coalgebra. By Lambeks Lemma
lambek
[L], t is
invertible, and then t
1
: F(F) F is the structure of a cia.
Proof. Let e : X FX+F be a at equation morphism. Frome we form the following F-coalgebra
e X +F
[e,inr]

FX +F
FX+t

FX +F(F)
can

F(X +F) ,
where can = [Finl, Finr]. Let h : X + F F be the corresponding unique coalgebra homomor-
phism and dene
e

= (X
inl

X +F
h

F ).
One readily shows that h inr is a coalgebra homomorphism from F to itself, whence h inr = id.
Now it is not difcult to prove that e

is a solution of e iff [e

, id] is a coalgebra homomorphism from


(X + F, e) to the terminal coalgebra (F, t). Since the latter exists uniquely, so does the former. For
further details details see
milius
[M
1
], Example 2.5.
Next we prove that algebras over complete metric spaces are cias. Recall that CMS is the category
of complete metric spaces, where distances are measured in the interval [0, 1], and non expanding maps.
We shall consider a contracting endofunctor F on CMS, see Denition
D-contracting
2.9.2.
prop:cmscia Proposition 6.1.6 (
amvElgot
[AMV
3
]). Let F : CMS CMS be a contracting endofunctor. Then every non-
empty F-algebra is completely iterative.
62
Proof. Suppose that F is contracting with a contraction factor < 1. Let : FA A be a non-empty
F-algebra and let e : X FX + A be a at equation morphism. Recall that the hom-set CMS(X, A)
is a complete metric space with the supremum metric and this space is non-empty as A is non-empty.
Denition
def:solcia
6.1.3 of a solution of a at equation morphism e : X HX + A states that e

is a xed
point of the function on CMS(X, A) given by
: (s : X A) ([, A] (Fs +A) e).
We shall now prove that this function is a contraction on CMS(X, A). Indeed, for two nonexpanding
maps s, t : X A we have
d
X,A
(s, t) = d
X,A
([, A] (Fs +A) e, [, A] (Ft +A) e)
(by the denition of )
d
FX,FA
(Fs +A, Ft +A) (since composition is nonexpanding)
= d
FX,FA
(Fs, Ft)
d
X,A
(s, t) (since F is -contracting).
By Banachs Fixed Point Theorem
T-Banach
2.9.1, there exists a unique xed point of , viz. a unique solution
of e.
ex:metrizable Example 6.1.7. Completely metrizable algebras are cias. Many set functors F have a lifting to con-
tracting endofunctors F

of CMS. We have seen this for polynomial endofunctors in Example


E-polynomial-lifting
2.9.3. We
call an F-algebra : FA A completely metrizable if A if there exists a complete metric d on A such
that the algebra structure is a non-expanding map : F

(A, d) (A, d).


Every non-empty completely metrizable F-algebra is a cia. Indeed, to every equation morphism
e : X FX +A its unique solution is the unique solution of e : (X, d
0
) F

(X, d
0
) + (A, d) in the
where d
0
is the discrete metric.
Cias constitute a full subcategory of the category of all F-algebras. That the choice of all homomor-
phisms of F-algebras is appropriate for cias follows from the fact, established in
milius
[M
1
], Proposition 2.3,
that these morphisms correspond precisely to the morphisms preserving solutions of at equations in
the obvious sense. We omit the details in this survey.
We now turn to constructions of cias in our general category A, which will then lead to the proof
that initial cias and terminal coalgebras are the same.
lem:Fa Lemma 6.1.8. For every endofunctor F : A A, if (A, ) is a cia for F, then so is (FA, F).
Proof. Let e : X FX +FA be a at equation morphism in FA. Form the equation morphism
e = (X
e

FX +FA
id+

FX +A)
and dene
e

= (X
e

FX +FA
[e

,id]

FA. )
It is not difcult to check that e

is a unique solution of e in FA. For the details see


milius
[M
1
], Proposition
2.6
prop:limit Proposition 6.1.9. The category of cias for an endofunctor F of A is closed under all limits that exist
A.
63
Example 6.1.10. The trivial terminal algebra F1 1 is trivially a cia.
The proof of Proposition
prop:limit
6.1.9 is analogous to the proof of a similar result (Proposition 2.20)
in
amv
[AMV
1
] concerning the weaker notion of iterative algebras, and so we omit a proof. From this
result we see that all objects in the terminal coalgebra chain are cias (even if the terminal coalgebra
itself does not exist).
Corollary 6.1.11. Let A be a complete category. Then in the terminal chain of F all algebras F
i
! :
F(F
i
1) = F
i+1
1 F
i
1 are cias.
Proof. This is easy to see by transnite induction. In fact, ! : F1 1 is trivially a cia. For successor
steps use the fact that for any cia (A, ) the F-algebra (FA, F) is a cia, too, see Lemma
lem:Fa
6.1.8. Finally,
for the limit step apply Proposition
prop:limit
6.1.9.
thm:cianuF Theorem 6.1.12. The initial cia for F is precisely the same as the terminal F-coalgebra.
More precisely, we shall prove that for an endofunctor F : A A:
(i) If (T, ) is an initial cia for F, the inverse
1
is the structure of a terminal F-coalgebra.
(ii) If (F, ) exists, then the inverse
1
is the structure of an initial cia for F.
Proof. For a coalgebra : C FC and an algebra : FA A consider the following diagram:
C

A
FC
Fh

inl

FA

inl

FC +A
Fh+id

FA+A
[,id]

(6.4) diag:cianuF
Let us dene e = inl so that the left-hand part of this diagram commutes. Notice also that the right-
hand part and the lower square of the diagram obviously commute. Now the outside of the diagram
commutes iff the upper square does; in other words, h is a coalgebra-to-algebra homomorphism from
(C, ) to (A, ) iff it is a solution of the at equation morphism e in the algebra A. We are now ready
to prove our theorem.
Ad (i), suppose that : FT T is an initial cia. Since (FT, , F) is a cia by Lemma
lem:Fa
6.1.8 an
argument similar to Lambeks Lemma
lemma-Lambek
2.1.1 shows that is an isomorphism. So we have the coalgebra

1
: T FT, and we need to verify that it terminal. Indeed, for every coalgebra (C, ) take (A, )
in diagram (
diag:cianuF
6.4) to be the algebra (T, ). Then since this algebra is a cia we have a unique coalgebra-
to-algebra homomorphism, i. e., a unique coalgebra homomorphism from (C, ) to (T,
1
).
Ad (ii), suppose that the terminal coalgebra : F F(F) exists. Then it is a cia by Proposi-
tion
prop:finalcia
6.1.5, and it remains to verify its initiality. So let (A, ) be any cia and let (C, ) in diagram (
diag:cianuF
6.4) be
(F, ). Since Ais a cia we have a unique solution of e in A, equivalently a unique coalgebra-to-algebra
homomorphism from (F, ) to (A, ), i. e., a unique F-algebra homomorphism from the cia F to the
cia A.
64
Remark 6.1.13. (i) An analogous result to Theorem
thm:cianuF
6.1.12 can be stated for free cias: TX is a
free cia on the object X iff it is a terminal coalgebra for the functor F() + X. Assuming the
existence of free cias TX for a functor, it turns out that T is the object assigment of a monad
on A. Furthermore this monad is characterized by a universal property: it is the free completely
iterative monad on F. These results appear in
milius,aamv
[M
1
, AAMV].
(ii) In many settings, one is less interested in obtaining unique solutions (or xed points) than in
canonical ones, e. g., least xed points in complete partial orders. It is the idea of Blooms and

Esiks iteration theories


be
[B

E] to study the equational properties that characterize least xed points


in complete partial orders. It turns out that similar ideas are important in connection with cias,
and they lead to the notion of a complete Elgot algebra. A complete Elgot algebra for a functor
F is a triple (A, a, ( )

) where a : FA A is an algebra for F and ( )

is an operation taking
a at equation morphism e : X FX + A to a solution e

: X A such that two simple and


well-motivated properties are satised. Complete Elgot algebras were introduced in
amvElgot
[AMV
3
] and
the main result of that paper is that they form precisely the category of Eilenberg-Moore algebras
for the monad T of item (i) above.
Every cia is, of course, a complete Elgot algebra. Further examples are continuous algebras (i. e.,
algebras for locally continuous functors on CPO) or complete lattices, which are complete Elgot
algebras for FX = X X on Set.
(iii) Completely iterative algebras and complete Elgot algebras as in item (ii) play a signicant r ole
in the category-theoretic semantics of recursive program schemes as presented in
mm
[MM]. This
approach to the semantics of recursive function denitions is based on terminal coalgebras for
functors in lieu of concepts from general algebra like signatures and innite trees. In the category
theoretic setting completely iterative algebras serve as those classes of algebras in which one in-
terprets recursive program schemesin those algebras one can uniquely solve recursive program
schemes. The article
mms
[MMS] discusses various applications of completely iterative algebras for
the semantics of recursive specications: Milners CCS, stream circuits, non-well founded sets
and formal languages.
section-real-intervals
The interval [0, 1] as a terminal coalgebra. In the remainder of this section, we study a category A
and an endofunctor F : A A whose terminal coalgebra is carried by the unit interval [0, 1]. The
category is BiP, the category of of bipointed sets in Example
example-BiP
2.2.15, and we also mentioned the functor
F : BiP BiP, where FX = XX. We discuss its terminal coalgebra. We consider the F-coalgebra
I = ([0, 1], 0, 1) with structure a : I FI given by a(x) = inl(2x) for x [0,
1
2
), a(x) = inr(2x 1)
for x (
1
2
, 1], and a(
1
2
) = m, where m is the midpoint of X X. Notice that a is an isomorphism.
Theorem 6.1.14 (Freyd
freyd:realcoalgebra
[Fr]). (I, a) is a terminal coalgebra of F on BiP.
theorem-Freyd-R
Proof. Let e : X X X be a morphism in BiP. Regard X as a complete ultrametric space in the
trivial way, with distance 1 between distinct points. Also, recall the lifting of the coproduct operation
+ to CMS: it takes two spaces, scales the distance in each by a factor of
1
2
and then sets the distance
between the copies to 1. Consider also
X
e

X X
f

(X +X) +I
65
Here f takes the midpoint m of X X to
1
2
I. Otherwise, f is the obvious injection into X +X.
The functor X X + X is
1
2
-contracting on CMS, and thus I is a cia for it with the structure
b : I + I I with inl(x)
x
2
, and inr(x)
x+1
2
; I is also a cia for X X + X on Set, see
Example
ex:metrizable
6.1.7. Now consider the diagram below:
X
e

X X
f

(X +X) +I
(+)+I

I
a

I I
(I +I) +I
c
y
y
y
y
y
y
y
y
y
y
y @A
[b,I]

We must c, but we should rst explain that this diagram is in Set: we use CMS to get a solution , but
then we forget the CMS structure. As for c, on the right summand I it is a, and on the left summand
I +I it takes inl(1) and inr(0) to m, and otherwise is the obvious map.
Note that b : I + I I is a non-expanding map. By the cia property, there is a unique : X I
such that the outside of the gure above commutes. Clearly, is a morphism of BiP.
Note also that the region on the bottom commutes, as does the region on the right. So the square
in the upper-left commutes, showing that is an F-coalgebra homomorphism. For the uniqueness, any
F-coalgebra morphism determines also ( + ) + I on the right side of the gure. Using that a is
an isomorphism this shows to be a solution to the at equation morphism f e. By the uniqueness of
solutions, = .
We should mention that the work here is only partially successful. As Freyd points out, To this
date, no one has found a functor whose terminal coalgebra is usefully the reals.
6.2 Iterative Algebras and the Rational Fixed Point
sec:rat
We have mentioned the concept of an iterative algebra. It is weaker than the notion of a completely
iterative algebra in that one only requires nite systems (
eq:system
6.1) to have unique solutions.
Iterative algebras for a signature were introduced by Nelson
nelson
[N] (see Tiuryn
tiuryn
[T] for a related con-
cept) as an easy approach to iterative theories of Elgot
e
[El]. In
amv,amvrat
[AMV
1
, AMV
2
] this was generalized
from Set to arbitrary locally nitely presentable categories (cf. Denition
def:lfp
4.2.1). In this subsection we
mention the most important results on iterative algebras. Most importantly, an initial iterative algebra
for a Set endofunctor is, equivalently, a terminal locally nite coalgebra.
Assumption 6.2.1. Throughout the rest of this subsection we assume that A is a locally nitely pre-
sentable category and the F : A A is a nitary endofunctor.
Denition 6.2.2. A at equation morphism e : X FX + A is called nitary if X is a nitely
presentable object of A.
An H-algebra : FA A is called iterative if every nitary at equation morphism e : X
FX + A has a unique solution in A, i. e., there exists a unique morphism e

: X A such that the


square (
diag:sol
6.3) commutes.
66
Let us remark that iterative algebras constitute a full subcategory of the category of all F-algebras:
every homomorphism of F-algebras preserves solutions of at equation morphisms in the expected
sense, see
amvrat
[AMV
2
].
ex:ia Examples 6.2.3. We list a number of examples of iterative algebras in various categories. All but the
rst three examples are in fact initial iterative algebras.
(i) Every completely iterative algebra for F is, of course, an iterative algebra for the same functor.
(ii) A unary algebra : A A is iterative if and only if has a unique xed point and no other
cycles in A; cf. Example
ex:final
6.1.4(iii).
(iii) The algebra of addition on the extended real numbers

R = R is an iterative algebra for
the functor FX = XX, see
amvrat
[AMV
2
]. Notice that this is not a completely iterative algebra: the
system of equations x
0
x
1
+ 1, x
1
x
2
+ 1, . . . has more than one solution (e. g. x
n

= or
x
n

= n).
(iv) Consider FX = X X + 1 on Set. Its initial cia is the algebra of all binary trees, see Exam-
ple
ex:final
6.1.4(ii). The subalgebra formed by all rational binary trees, i. e., those trees having (up to
isomorphism) only nitely many different subtrees, is an iterative algebra for F. For example, the
trees in (
eq:binsys
6.2) are rational, and the tree represented by
( ( x
2
) x
1
) x
0
)
is not.
(v) Similarly, all rational nitely branching strongly extensional trees form an iterative algebra for P
f
(see
amvrat
[AMV
2
]), and all rational unordered nitely branching trees form an iterative algebra for the
bag functor B, cf. Theorem
thm:stronglyext
2.5.6 and Example
E-bags-final
2.3.10.
(vi) Let FX = X
A
2 be the functor whose coalgebras are deterministic automata. Recall from
Example
E-terminal-acceptor
2.3.8 that the initial cia F consists of all formal languages. Its subalgebra formed by
all regular languages is the initial iterative algebra for F, see
amvrat
[AMV
2
].
(vii) Let FX = RX with F = R

the streams of reals, i. e., sequences = ((0), (1), (2), . . .)


of real numbers, cf. Example
ex:stream
2.3.6. Streams have been studied in a coalgebraic setting by Jan
Rutten
r_streams,r_rat
[Ru
2
, Ru
3
]. The convolution product of two streams is given by
( )(n) =
n

i=0
(i) (n i)
and for streams with (0) ,= 0 there exists an inverse
1
, i. e.,
1
= (1, 0, 0, 0, . . .).
A rational stream is a stream of the form
1
, where and have nitely many non-zero
entries and (0) ,= 0. When F is considered as an endofunctor on the category of real vector
spaces then rational streams form an initial iterative algebra for F. However, when we consider F
as an endofunctor of Set the initial iterative algebra for F is given by streams that are eventually
periodic, i. e., those streams = uv, where u and v are nite words on R. See
m_streams
[M
2
].
67
(viii) Consider the category of sets in context, i. e., the presheaf category [F, Set] where F is the
category of nite sets and all maps between them. Objects of F are regarded as contexts of
variables and we think of a presheaf X : F Set as assigning to every context a set X() of
terms in context . This setting has been considered by Fiore, Plotkin and Turi
fpt
[FPT] to capture
variable binding and in particular -terms categorically. Indeed, let FX = V +X X +(X),
where V : F Set is the inclusion and (X)() = X( + 1). Then F is the presheaf of
-terms up to -equivalence. The initial cia F is formed by all (nite and innite) -trees, and
the initial iterative algebra by all rational ones (up to -equivalence). See
amvHigher
[AMV
4
].
Constructions of iterative algebras can be performed on the level of underlying objects and this
implies that free iterative algebras exist:
Proposition 6.2.4 (
amvrat
[AMV
2
]). The category of iterative algebras for F is closed under limits and ltered
colimits in the category of F-algebras. Thus, limits and lterted colimits are constructed on the level of
the base category A.
Corollary 6.2.5. Every object of A generates a free iterative algebra.
Indeed, full subcategories of an locally nitely presentable category closed under limits and ltered
colimits are reective, see
ar
[AR]. It follows that the reection of F in the category of iterative F-
algebras is the initial iterative F-algebra.
In
amvrat
[AMV
2
] we also gave a coalgebraic construction of free iterative algebras. We mention this here
only for the special case of initial iterative algebras.
constr:rat Construction 6.2.6. Let Dbe the full subcategory of Coalg F given by all coalgebras X FX with a
nitely presentable carrier X. Let D : D Abe the restriction of the forgetful functor U : Coalg F
A. Then D is an essentially small, ltered diagram, and we dene
R = colimD.
There exists a unique coalgebra structure : R FR such that for every X FX in D the
corresponding colimit injection e

: X R is an F-coalgebra homomorphism.
Theorem 6.2.7 (
amvrat
[AMV
2
]).
(i) R is a xed point of F; more precisely, : R FR is an isomorphism,
(ii)
1
: FR R is an initial iterative algebra for F.
Denition 6.2.8. We call R the rational xed point of F.
Example 6.2.9. As we have seen in Examples
ex:ia
6.2.3, for the set functor FX = X
A
2 with deterministic
automata as F-coalgebras we have
R = all regular languages over alphabet A.
For FX = RX the rational xed point in the category of vector spaces
R = all rational streams of real numbers.
Furthermore, all examples in
ex:ia
6.2.3(iv)(vii) provide rational xed points.
68
Remark 6.2.10. Similarly as in Construction
constr:rat
6.2.6 we obtain for every object Y of A a free iterative
algebra RY on Y . The corresponding monad R on A is then characterized as the free iterative monad
on the endofunctor F. This generalizes and extends classical work on iterative theories by Elgot
e
[El]
and on iterative algebras for a signature by Nelson
nelson
[N] and Tiuryn
tiuryn
[T].
For more details on the topic of iterative algebras and (free) iterative monads we refer the reader
to
amvrat
[AMV
2
].
We now turn to an equivalent coalgebraic characterization of the rational xed point Rof our nitary
endofunctor F. This is a result from
m_streams
[M
2
]. We explain this here only for the special case A = Set.
Denition 6.2.11. For F : Set Set a coalgebra X FX is called locally nite if every nite subset
of X is contained in a nite subcoalgebra of X.
thm:locfin Theorem 6.2.12. The rational xed point : R FR is a terminal locally nite coalgebra for F.
Indeed, this follows from the fact established in
m_streams
[M
2
] that the locally nite coalgebras are precisely
the ltered colimits of diagrams of coalgebras with a nite carrier.
Remark 6.2.13. Theorem
thm:locfin
6.2.12 generalizes to arbitrary locally nitely presentable categories A (for
a suitably generalized notion of local niteness). For example, the coalgebra of rational streams men-
tioned in Example
ex:ia
6.2.3(vii) is the terminal locally nite dimensional coalgebra for FX = R X on
the category of real vector spaces.
7 Logic and Set Theory
logic
7.1 An expressive coalgebraic logic for nitary set functors
section-first-expressive
The goal of this section is to associate with each nitary F : Set Set a logical language L
F
which
may be interpreted on coalgebras (A, ) of F, and with the following two properties:
(i) The kernel of the terminal coalgebra map for A is exactly the relation of elementary equivalence
in L
F
: two points have the same image in the terminal coalgebra iff they satisfy all of the same
sentences of L
F
.
(ii) The set of all L
F
-theories of all points in all coalgebras carries the structure of a terminal coalge-
bra for F.
I think this
lemma is not
needed in
this section.
S.
Lemma 7.1.1. Let F : Set Set be a functor, let (A, ) be a coalgebra for F, and let
n
: A F
n
1,
n , be the canonical cone. Then the graph of
n
is the set S
n
AF
n
1, where
S
0
= A1
S
n+1
= (a, ) : (w F(S
n
)) (F
1
)w = (a) and (F
2
)w =
Here
1
: S
n
A and
2
: S
n
F
n
1 are the obvious projections.
centrallemma
Proof. Here is a sketch. We proceed by induction on n, using the relation lifting F of F to the category
Rel of sets and relations. Without assumptions on F, F need not be an endofunctor on the category Rel
but this is not an obstacle to its use here. Observe that S
n+1
is by denition the relational composition
Gr() F(S
n
). (We are using Gr(f) for the graph relation of a function, and denotes relational
composition.) It is a general fact about relation lifting that F(Gr(f)) = Gr(Ff). An easy induction
then shows that S
n
= Gr(
n
).
69
We specialize this now to the case when F is a nitary functor on sets. Let L = L
F
be

n=0
F
n
1,
where we understand F
0
1 = 1, and take 1 to be a singleton set which we call . We also write a [=
to mean that
n
(a) = , where F
n
1. Notice that for every n, a [= folds for exactly one sentence
F
n
1. In this way, we think of L
F
as a logical language which may be interpreted on coalgebras.
Lemma 7.1.2. Coalgebra morphisms preserve the semantics. That is, if f : (A, ) (B, ) is a
coalgebra morphism and L, then a [= iff fa [= .
lemma-coalogic-morphism
Proof. It is easy to show by induction on n that
n
f =
n
. Let F
n
1 and a A. Then we have I have hidden
this inductive
verication,
since clearly
we have
it earlier
anyways.
the following chain of equivalences:
a [= iff
n
(f(a)) = by the denition of [=
iff f(a) [= as above
This completes the proof.
Theorem 7.1.3. Let F be nitary, and let (C, ) be a terminal coalgebra for F. Let (A, ) be a
coalgebra for F, and let : A C be a terminal coalgebra morphism. Then a, b A satisfy the same
sentences of L iff (a) = (b).
theorem-expressivity1
Proof. Suppose that a and b satisfy the same sentences of L. Then, clearly, for all n,
n
(a) =
n
(b).
Then by Corollary
corollary-to-Worrell
2.6.7, we see that merges a and b. Conversely, if (a) = (b), then by two appli-
cations of Lemma
lemma-coalogic-morphism
7.1.2, the three points a, b, and (a) = (b) all satisfy exactly the same sentences of
L.
section-expressive-logics
Theorem
theorem-expressivity1
7.1.3 appears as Theorem 4.1 of Pattinson
Pattinson
[P
1
], and (with a proof) in Theorem 3.1.11 of
Pattinson
Pattinson:nasslli
[P
2
].
The view of L
F
as a language leads to the following denition. For each coalgebra (A, ) and each
a A, we have a theory
Th
(A,)
(a) = : a [= in (A, ).
Each such theory corresponds to a point in lim
n
F
n
1, due to the fact that F
n
!
n+1
=
n
. Indeed,
Th(a) is essentially a point in the image of (A, ) inside F

1. And conversely, each point in the


union of all images inside F

1 is the theory of some point in some model. Recall that for a nitary
F : Set Set, the union of images in F

1 carries the structure of a terminal coalgebra. We have


therefore proved the following fact:
Theorem 7.1.4. Let F : Set Set be nitary. The set of all L
F
-theories of all points in all F-
coalgebras carries the structure of a terminal F-coalgebra.
The following result relates the coalgebraic modal logic of this section with the equational presen-
tations of nitary functors that we saw in Section
sec:quotient
2.7.
I have yet
to write this
out, and also
to motivate
it. But the
result itself
could also
motivate
coalgebraic
logic in the
rst place.
Theorem 7.1.5. Let F be nitary, and let : H = H

F be an epitransformation presenting F.
Let (A, : A HA) be an H-coalgebra, so that (A,
A
) is its associated F-coalgebra. Let

: A H be the terminal coalgebra map for H, and let l


n
: H H
n
1 be the canonical
morphism. Suppose that a
1
and a
2
satisfy the same sentence in F
n
1. Then (l
n

)a
1
and (l
n

)a
2
are related by the smallest congruence which includes the instances of all -equations.
70
7.2 Adjunctions and Dualities in Logic
7.3 Sufcient Conditions
In this section, we consider some terminal coalgebra results obtained by using adjunctions or duality.
These are especially applicable to topological settings.
The main idea in using adjunctions is quite simple. If G : A B is a functor with a left adjoint,
then since G preserves limits, it preserves terminal objects. So if one has an adjunction between the
categories of coalgebras for two functors, then the right adjoint takes a terminal coalgebra to a terminal
coalgebra. What is needed is a sufcient condition for the adjunction in the rst place. Here is a basic
result on this, due to Hermida and Jacobs
hj
[HJ], Corollary 2.15. [HJ] seems
to credit the
result (part
of it) to
someone
else, so
we should
follow that
up.
Theorem 7.3.1. Let : GS TG below:
B
T

A
G

(i) There is a functor G : Coalg(S) Coalg(T), given on objects by


(X, f : X SX) (GX,
X
Gf),
and on morphisms by G.
(ii) Assume that is an isomorphism, and we have an adjunction F G with unit . Then G has a
left adjoint F : Coalg(T) Coalg(S), given by
(X, f : X TX) (FX,
X
Ff),
where : FT SF is the adjoint transpose of
1
F T : T TGF GSF.
theorem-hj
Proof. The verications that G and F are functors are easy. The natural transformation that serves as
the unit has as component at (X, f) the morphism
X
, and similarly for the counit. Then the triangular
identities for the original adjunction imply those for the new one, and they also gure in to the verica-
tion that
X
and
X
are coalgebra morphisms. Here is the argument for
X
. Let (X, f : X TX) be I can of
course drop
all of this.
But the orig-
inal proof is
much more
high-level,
and also
longer.
a T-coalgebra. Then GF(X, f) is shown on the bottom below:
X

TX

GFX

T
X

TGFX

TGFX

1
FX

GSFX

GSFX

GFX
GFf

GFTX
GFT
X

GFTGFX
GF
1
FX

GFGSFX
G
SFX

GSFX

FX

TGFX
The triangle commutes by one of the triangular identities, all the squares by naturality. The passage
from X to TGFX across the top is T
X
f. This veries that
X
: (X, f) GF(X, f) is a coalgebra
morphism.
The rest of the verications are routine.
71
Corollary 7.3.2. Let A and B be concrete categories, and let F, U, T, and S be as below:
B
T

A
U

(i) If US = TU and (X, f : X SX) is a terminal S-coalgebra, then (UX, Uf) is a terminal T:
coalgebra.
(ii) If SF = FT and (X, f : TX X) is an initial T-algebra, then (FX, Ff) is an initial S-
algebra.
cor-to-theorem-hj
The rst assertion follows from Theorem
theorem-hj
7.3.1 and the fact that right adjoints preserve (limits and
thus) terminal objects. The second assertion uses a dual formulation of Theorem
theorem-hj
7.3.1.
In the application of Corollary
cor-to-theorem-hj
7.3.2 below, let MS be the category of metric spaces with distances
in [0, 1], taking the non-expansive functions as morphisms.
Corollary 7.3.3. Let S be a contracting lift of a polynomial functor H : Set Set to CMS. So the
same denition lifts H to a functor T : MS MS. Then T has a terminal coalgebra by Corollary
cor-to-theorem-hj
7.3.2.
Proof. Consider the diagram below:
MS
T

CMS
U
.
S
.
F is the functor taking a metric space to its completion, and U is the forgetful functor. By Theorem
T-contracting
2.9.9,
S has a terminal coalgebra. Then by Theorem
theorem-hj
7.3.1 and the preservation of terminal objects under right
adjoints, so does T.
7.4 Goldblatt-Kupke-Leal
7.5 Foundation and Antifoundation Axioms
8 Special topics
8.1 Measurable Spaces
Denote be Meas is the category of measurable spaces and measurable functions. We consider this
category and also the subcategory SB of standard Borel spaces. These are the measurable spaces (M, )
such that for some Polish topology (i.e., a topology generated by a complete separable metric) T on M,
is the family of Borel sets generated by T.
A morphism of measurable spaces f : (M, ) (N,

) is a function f : M N such that for


each A

, f
1
(A) . The category Meas is complete and cocomplete. Also every morphism
factors as f = m e, where e is epi and m is a strong mono. Finally, the class of strong monos is closed
under limits and coproducts.
72
There is an endofunctor : Meas Meas dened by: (M) is the set of probability measures
on M with the -algebra

generated by B
p
(E) [ p [0, 1], E , where
B
p
(E) = (M) [ (E) p.
Here is how acts on morphisms. If f : M N is measurable, then for (M) and A

,
(f)()(A) = (f
1
(A)). That is, (f)() = f
1
.
We also note some additional structure. First, there is a natural transformation : Id dened
by
M
(m)(E) = 1 if m E and 0 if m / E. We also write
m
instead of
M
(m); this is the
Dirac measure supported at m. Second, there is a natural transformation : given by

M
()(E) =
_
(M)
(E) d. These natural transformations and turn into a monad.
A related functor is the subprobability measure functor S : Meas Meas. A subprobability
measure on a space M is a -additive function from the Borel subsets of M to [0, 1]. We do not
require that (M) = 1. The subprobability measures on a space themselves form a measurable space
with the -algebra dened as for . It is known that there is a metric on S(M) making S(M) into a
standard Borel space; see e.g., Doberkat
doberkat07
[Dob],
The category SB is closed under countable coproducts and countable limits in Meas (see
schubert
[Sch]).
Theorem 8.1.1 (Viglizzo
viglizzo
[V]). The functor : Meas Meas does not preserves limits of
op
-chains.
theorem-from-Kolmogorov1
Theorem 8.1.2. The functor : SB SB preserves the limit of its terminal
op
-chain.
theorem-from-Kolmogorov2
This result follows from the celebrated Kolmogorov Extension Theorem, stated below:
Heifetz got it for regular measures on a Hausdorff space.
8.2 Liftings of Terminal Coalgebras
by Stefan
8.2.1 Complete Partial Orders
8.2.2 Complete Metric Spaces
8.2.3 Kleisli Categories
8.2.4 Eilenberg Moore Algebras
8.3 Terminal Coalgebras in Accessible Categories
by Jirka
9 Conclusions
73
Index
HF, 16
algebra, 4
initial, 4
algebraically complete, 19
bag, 17
bisimulation
tree , 30
category
BiP, 19
CMS, 13, 15, 4546
CMS
p
, 46
CPO, 15
CPO

, 13
MS, 13, 15
Pos, 13, 15
SB, 73
Set, 15
Set
S
, 51, 53
coalgebra
homomorphisms, 5
terminal, 5
cocone, 11
colimit, 11
directed, 57
ltered, 57
congruence, 27
corecursion, 6, 21
cpo, 10
distinguished element, 33
extensional quotient, 17
nitary functor, 58
nitely presentable, 58
xed point, 9
functor
B, 37
accessible, 33, 58
Aczel-Mendler, 24
analytic, 37
bounded set, 56
nitary, 25, 3234
grounded, 44
polynomial, 8, 42, 44, 45, 48, 52, 53, 58
presentation of, 24
initial algebra, 9
initial sequence, 11
Lambeks Lemma, 9
locally presentable, 59
measure
discrete probability, 8
subprobability, 73
metric space, 13
discrete, 15
multiset, 17
polynomial functor, 16
poset, 10
recursion, 4
root, 14
set
hereditarily countable, 48
hereditarily nite, 16
stream, 21
strongly extensional, 27
terminal sequence, 20
theorem
Cantors, 10
Kleenes, 10, 12
tree
binary, 14
extensional, 17
leaf of, 14
ordered, 14
strongly extensional quotient, 31
unordered, 14
weakly nal, 23
74
References
abramsky [Ab] S. Abramsky, ACooks Tour of the Finitary Non-Well-Founded Sets, in We Will ShowThem:
Essays in honour of Dov Gabbay, S. Artemov (et al) eds., College Publications, Vol. 1, 2005,
118.
aczel:88 [Ac] P. Aczel, Non-Well-Founded Sets. CSLI Lecture Notes Number 14, CSLI Publications, Stan-
ford, 1988.
aamv [AAMV] P. Aczel, J. Ad amek, S. Milius and J. Velebil, Innite trees and completely iterative theories:
a coalgebraic view, Theoret. Comput. Sci. 300 (2003), 145.
aczelmendler:89 [AcM] P. Aczel and N. Mendler, A nal coalgebra theorem, in D. H. Pitt et al (eds.) Category
Theory and Computer Science, Springer-Verlag, Heidelberg, 1989, 357365.
A74 [A74] J. Ad amek, Free algebras and automata realizations in the language of categories, Com-
ment.Math. Univ. Carolinae 14 (1974), 589602.
A97 [A87] J. Ad amek, A categorical generalization of Scott domains, Math. Structures Comput. Sci. 7
(1997), 419443.
adamek1995 [Ad
1
] J. Ad amek, Recursive data types in algebraically -complete categories, Inform. and Com-
put. 118 (1995), no. 2, 181190.
adamek2002 [Ad
2
] J. Ad amek, Final coalgebras are ideal completions of initial algebras, J. Logic and Compu-
tation 12 (2002), 217242.
adamek2003 [Ad
3
] J. Ad amek, On nal coalgebras of continuous functors. Theoret. Comput. Sci. 294 (2003),
no. 12, 329.
ak79 [AK79] J. Ad amek and V. Koubek, On the least xed point of a set functor, J. Comput. Syst. Sci. 19
(1979), 163178.
ak95 [AK95] J. Ad amek and V. Koubek, On the greatest xed point of a set functor, Theoret. Comput. Sci.
150 (1995), 5775.
akp [AKP] J. Ad amek, V. Koubek, and V. Pohlov a, The colimits in the generalized algebraic categories.
Acta Univ. CarolinMath. et Phys. 13 (1972), no. 2, 2940.
am [AM] J. Ad amek and S. Milius, Terminal coalgebras and free iterative theories, Inform. and Com-
put. 204 (2006), 11391172.
amms [AMMS] J. Ad amek, S. Milius, L. S. Moss and L. Sousa, On nitary endofunctors, manuscript, 2010.
amv [AMV
1
] J. Ad amek, S. Milius and J. Velebil, Free iterative theories: a coalgebraic view, Math. Struc-
tures Comput. Sci. 13 (2003), 259320.
amvrat [AMV
2
] J. Ad amek, S. Milius and J. Velebil, Iterative Algebras at Work, Math. Structures Com-
put. Sci. 16 (2006), no. 6, 1085-1131.
75
amvElgot [AMV
3
] J. Ad amek, S. Milius and J. Velebil, Elgot Algebras, Log. Methods Comput. Sci., Vol. 2
(5:4), 31 pp.
amvHigher [AMV
4
] J. Ad amek, S. Milius and J. Velebil, Semantics of Higher-Order Recursion Schemes, sub-
mitted, available at http://www.stefan-milius.eu, extended abstract appeared
in: Proc. Coalgebraic and Algebraic Methods in Computer Science (CALCO09), Lecture
Notes Comput. Sci. 5728, Springer-Verlag, 2009, 4963.
adamekporst [AP01] J. Ad amek and H. E. Porst, From varieties of algebras to covarieties of coalgebras, In:
Proc. Coalgebraic Methods in Computer Science, Electron. Notes Theor. Comput. Sci. 44,
2001, 2746.
ap [AP04] J. Ad amek and H. E. Porst, On Tree Coalgebras and Coalgebra Presentations, Theoret. Com-
put. Sci. 311 (2004), 257283.
are [ARe] J. Ad amek and J. Reiterman, Banachs xed-point theorem as a base for data-type equations,
Appl. Categ. Structures 2 (1994), 7790.
ar [AR] J. Ad amek and J. Rosicky, Locally Presentable and Accessible Categories, Cambridge Uni-
versity Press, 1994.
agt [AGT] J. Ad amek, P. Gumm and V. Trnkov a, Presentation of set functor: a coalgebraic perspective,
to appear in J. Logic Comput.
ATbook [AT] J. Ad amek and V. Trnkov a, Automata and Algebra in Categories, Kluwer Academic Pub-
lishers, 1990.
AT09 [AT09] J. Ad amek and V. Trnkov a, Many-sorted initial algebra and terminal coalgebras, submitted.
AT10 [AT10] J. Ad amek and V. Trnkov a, Relatively terminal coalgebras, preprint 2010.
americarutten [AmR] P. America and J. Rutten, Solving reexive domain equations in a category of complete
metric spaces, J. Comput. System Sci. 39 (1989), no. 3, 343375.
arnoldnivat [AN] A. Arnold and M. Nivat, The metric space of innite trees, Fund. Inform. 4 (1980), 445476.
deBakkerZucker [dBZ] J. W. de Bakker and J. I. Zucker, Processes and the denotational semantics of concurrency,
Inform. and Control 54 (1982), no. 12, 70120.
baranga [Bara] A. Baranga, The contraction principle as a particular case of Kleenes xed point theorem.
Discrete Mathematics 98, no. 1, 7579 (1991).
barr [Barr] M. Barr, Terminal coalgebras in well-founded set theory, Theoret. Comput. Sci. 114 (1993)
no. 2, 299315. Additions and corrections in Theoret. Comput. Sci. 124 (1994), no. 1, 189
192.
be [B

E] S. L. Bloom and Z.

Esik, Iteration Theories: the equational logic of iterative processes,
EATCS Monographs on Theoretical Computer Science, Springer-Verlag, 1993.
booth [Bo] D. Booth, Hereditarily nite Finsler sets, J. Symbolic Logic 55 (1990), no. 2, 700706.
76
vanBreugel [vB] F. van Breugel, De Bakker-Zucker processes revisited, Inform. and Comput. 188 (2004), no.
1, 6876.
vanbreugel05domain [vBMOW] F. van Breugel, M. Mislove, J. Ouaknine, J. Worrell, Domain theory, testing and simulation
for labelled Markov processes, Theoret. Comput. Sci. 333 (12) (2005) 171197.
vBetal [vBHMW] F. van Breugel, C. Hermida, M. Makkai, and J. Worrell, Recursively dened metric spaces
without contraction. Theoret. Comput. Sci. 380 (2007), no. 12, 143163.
doberkat07 [Dob] E.-E. Doberkat, Stochastic Relations: Foundations for Markov Transition Systems. Chap-
man Hall & CRC Press, Boca Raton, 2007.
e [El] C. C. Elgot, Monadic computation and iterative algebraic theories, in H. E. Rose, J. C. Shep-
herdson (Eds.), Logic Colloquium 73, North-Holland Publishers, Amsterdam, 1975.
engelking [En] R. Engelking, General Topology, Heldermann Verlag, 1989.
Fine [F] K. Fine, Normal forms in modal logic. Notre Dame J. Formal Logic 16 (1975), 229237.
fpt [FPT] M. Fiore, G. D. Plotkin and D. Turi, Abstract syntax and variable binding, In: Proc. Logic
in Computer Science 1999, IEEE Press, 1999, 193202.
freyd:realcoalgebra [Fr] P. Freyd, Algebraic real analysis. Theory Appl. Categ. 20 (2008), No. 10, 215306.
freyd:Springer [Fr1] P. Freyd, Algebraically complete categories, Lecture Notes in Math. 1488, Springer 1991,
95104.
freyd:Cambridge [Fr2] P. Freyd, Remarks on algebraically compact categories, Applications of category theory in
computer science, M. P. Fourman, P. Johnstone and A. M. Piths, editors, Cambridge Univ.
Press 1992, 95106.
gabrielulmer [GU] P. Gabriel and F. Ulmer, Lokal pr asentierbare Kategorien, Lecture Notes in Math. 221,
Springer-Verlag, Berlin.
goldblatt [G
1
] R. Goldblatt, Final coalgebras and the Hennessy-Milner property. Ann. Pure Appl. Logic
138 (2006), no. 13, 7793.
goldblatt:toappear [G
2
] R. Goldblatt, Deduction systems for coalgebras over measurable spaces, J. Logic and Com-
put., to appear.
gumm [GU] H. P. Gumm, Universelle Coalgebra, an appendix of T. Ihringer, Allgemeine Algebra, Hel-
derman Verlag, Berlin 2003 (in German)
gummschroeder [GS] H. P. Gumm and T. Schr oder, Coalgebras of bounded type, Math. Structures Comput. Sci.,12
(2002), no. 5, 565578.
harsanyi67games1 [H] J. C. Harsanyi, Games with incomplete information played by Bayesian players. I. The
basic model, Management Sci. 14 (1967), 159182.
hasuojacobs [HJ] I. Hasuo and B. Jacobs, Context-free languages via coalgebraic trace semantics. In: Proc. 1st
Conference on algebra and coalgebra in computer science, Lecture Notes in Comput. Sci.
3629, Springer, Berlin, 2005, 213231.
77
hj [HJ] C. Hermida and B. Jacobs, Structural induction and coinduction in a brational setting,
Inform. and Comput. 145 (1998), 107152.
jacobs [JA] B. Jacobs, Introduction to coalgebra, manuscript, see www.cs.nu.nl/B. Jacobs/PAPERS
joyal81 [J1] A. Joyal, Une th eorie combinatoire des s eries formelles. Adv. in Math. 42 (1981), no. 1,
182.
joyal86 [J2] A. Joyal, Foncteurs analytiques et espaces des structure, Lecture Notes in Math. 1234,
Springer 1986, 126159.
kawaharamori [KM] Y. Kawahara and M. Mori, A small nal coalgebra theorem, Theoret. Comput. Sci. 233
(2000), no. 12, 129145.
knaster [K] B. Knaster, Un the eor` eme sur les fonctions densembles, Ann. Soc. Pol. Math. 6 (1928),
133134.
kkv [KKV] C. Kupke, A. Kurz, and Y. Venema, Stone coalgebras, Theoret. Comput. Sci. 327, 12,
(2004), 109132.
kuratowski [Ku] K. Kuratowski, Sur une m ethode de m etrisation compl` ete des certain espaces densembles
compacts, Fundamenta Mathematic 43 (1956), no. 1, 114138.
KP [KP] A. Kurz and D. Pattinson, Coalgebraic modal logic of nite rank. Math. Structures Comput.
Sci., 15 (2005), no. 3, 453473.
kr [KR] V. Koubek and J. Reiterman, Categorical constructions of free algebras, colimits, and com-
pletions of partial algebras. J. Pure Appl. Algebra 14 (1979), no. 2, 195231.
lambek [L] J. Lambek, A Fixpoint Theorem for Complete Categories, Math. Z. 103 (1968), 151161.
maclane [ML] S. MacLane, Categories for the working mathematician, 2nd ed., Springer-Verlag, 1998.
makkaipare [MP] M. Makkai and R. Par e, Accessible categories: the foundation of categorical model theory.
Contemporary Math. 104, Amer. Math. Soc., Providence.
milius [M
1
] S. Milius, Completely iterative algebras and completely iterative monads, Inform. and Com-
put. 196 (2005), 141.
m_streams [M
2
] S. Milius, A Sound and Complete Calculus for Finite Stream Circuits, to appear in:
Proc. 25th Annual Symposium on Logic in Computer Science (LICS10), IEEE Computer
Society, 2010.
mm [MM] S. Milius and L. S. Moss, The category-theoretic solution of recursive program schemes,
Theoret. Comput. Sci. 366 (2006), no. 12, 359.
mms [MMS] S. Milius, L. S. Moss and D. Schwencke, CIA Structures and the Semantics of Recursion,
In: Proc. Foundations of Software Science and Computation Structures (FoSSaCS), Lecture
Notes Comput. Sci. 6014, Springer, 2010, 312327.
mmo [MMO] M. W. Mislove, F. J. Oles, and L. S. Moss, Non-Well-Founded Sets Modeled As Ideal Fixed
Points, Inform. and Comput. 93 (1991), no. 1, 1654.
78
pc [Mo
1
] L. S. Moss, Parametric corecursion, Theoret. Comput. Sci. 260 (12), 2001, 139163.
moss:06 [Mo
2
] L. S. Moss, Uniform functors on sets, in K. Futatsugi et al. (eds.): Algebra, Meaning, and
Computation: A Festschrift in Honor of Prof. Joseph Goguen, Springer-Verlag LNCS 4064,
2006, 420448.
moss:07 [Mo
3
] L. S. Moss, Finite models constructed from canonical formulas, J. Philos. Logic 36 (2007),
no. 6, 605640.
moss:SEP [Mo
4
] L. S. Moss, Non-wellfounded set theory, Stanford En-
cyclopedia of Philosophy, 2008, 42 pp., available at
http://plato.stanford.edu/entries/nonwellfounded-set-theory/
moss:toappear [Mo
5
] L. Moss, A note on expressive coalgebraic logics for nitary set functors, Journal of Logic
and Computation, to appear, 12 pp.
mossviglizzo [MV] L. S. Moss and I. D. Viglizzo, Final coalgebras for measurable spaces, Inform. and Comput.
204 (2006), no. 4, 610636.
nelson [N] E. Nelson, Iterative algebras, Theoret. Comput. Sci. 25 (1983), 6794.
Pattinson [P
1
] D. Pattinson, Expressive logics for coalgebras via terminal sequence induction. Notre Dame
Journal of Formal Logic, 45(1):19-33, 2004.
Pattinson:nasslli [P
2
] D. Pattinson, An Introduction to the Theory of Coalge-
bras, course notes from NASSLLI2003, available from
http://www.indiana.edu/nasslli/program.html.
pe [PE] D. Pavlovi c, M. H. Escard o, Calculus in coinductive form, In: Proc. Thirteenth Annual
IEEE Symposium on Logic in Computer Science (Indianapolis, IN, 1998), 408417, IEEE
Computer Soc., Los Alamitos, CA, 1998.
pavlovicpratt [PP] D. Pavlovi c and V. Pratt, The continuum as a nal coalgebra, Theoret. Comput. Sci. 280
(2002), no. 1-2, 105122.
roessiger [Ro] M. R oiger, From modal logic to terminal coalgebras, Theoret. Comput. Sci. 260 (2001),
no. 12, 209228.
rutten [Ru
1
] J. Rutten, Universal coalgebra: a theory of systems, Theoret. Comput. Sci. 249(1), 2000,
380.
r_streams [Ru
2
] J. Rutten, Acoinductive calculus of streams, Math. Structures Comput. Sci. 15 (2005), No. 1,
93147.
r_rat [Ru
3
] J. Rutten, Rational Streams Coalgebraically, Log. Methods Comput. Sci. 4 (2008), 3:9, 22
pp.
scott [Sc] D. Scott, Continuous lattices, In: Toposes, algebraic geometry and logic, Lecture Notes in
Math. 274, Springer, 1972, 97136.
79
schubert [Sch] C. Schubert, Final coalgebras for measure-polynomial functors. In: Proc. Conference on
Theory and Applications of Models of Computation (TAMC2009), ShangSha, P.R. China,
to appear in Lecture Notes Comput. Sci.
SmythPlotkin:82 [SP] M. B. Smyth, and G. D. Plotkin, The category-theoretic solution of recursive domain equa-
tions. SIAM J. Comput. 11 (1982), no. 4, 761783.
taylor [Ta] P. Taylor, The limit-colimit coincidence for categories, unpublished preprint, Imperial Col-
lege, London.
trnkova69 [Tr] V. Trnkov a, Some properties of set functors, Comment. Math. Univ. Carolinae 10 (1969),
323352.
takr [TAKR] V. Trnkov a, J. Ad amek, V. Koubek, J. Reiterman, Free algebras, input processes and free
monads, Comment. Math. Univ. Carolinae 16 (1975), 339351.
Turi:Phd [Tu] D. Turi, Functorial Operational Semantics and its Denotational Dual, Ph.D. thesis, CWI,
Amsterdam, 1996.
turirutten:98 [TR] D. Turi and J.J.M.M. Rutten, On the foundations of nal semantics: non-standard sets,
metric spaces, partial orders, Math. Structures Comput. Sci. 8 (1998), no. 5, 481540.
tiuryn [T] J. Tiuryn, Unique xed points vs. least xed points, Theoret. Comput. Sci. 12 (1980), 229
254.
velebil [Ve] J. Velebil, Categorical domain theory, PhD thesis, Czech Technical University Prague 1998,
available at http://math.feld.cvut.cz/velebil/research/papers.html
viglizzo [V] I. Viglizzo, Coalgebras on Measurable Spaces. Ph.D. thesis, Indiana University, Blooming-
ton, 2005.
worrell:99 [W1] J. Worrell, Terminal sequences for accessible endofunctors, In: Proc. Coalgebraic Methods
in Computer Science, Electron. Notes Theor. Comput. Sci. 19, Elsevier, Amsterdam, 1999,
15pp.
worrell:05 [W2] J. Worrell, On the nal sequence of a nitary set functor, Theoret. Comput. Sci. 338 (2005),
no. 13, 184199.
80

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy