A Study of Categories of Algebras
and Coalgebras
Jesse Hughes
May, 2001

Department of Philosophy
Carnegie Mellon University
Pittsburgh PA 15213

Thesis Committee
Steve Awodey, Co-Chair
Dana Scott, Co-Chair
Jeremy Avigad
Lawrence Moss, Indiana University

Submitted in partial fulfillment of the requirements for the degree of Doctor ofPhilosophy

Abstract
This thesis is intended to help develop the theory of coalgebras by, first, taking
classic theorems in the theory of universal algebras and dualizing them and, second,developing an internal logic for categories of coalgebras.
We begin with an introduction to the categorical approach to algebras and thedual notion of coalgebras. Following this, we discuss (co)algebras for a (co)monadand develop a theory of regular subcoalgebras which will be used in the internal
logic. We also prove that categories of coalgebras are complete, under reasonably
weak conditions, and simultaneously prove the well-known dual result for categoriesof algebras. We close the second chapter with a discussion of bisimulations in which
we introduce a weaker notion of bisimulation than is current in the literature, butwhich is well-behaved and reduces to the standard definition under the assumptionof choice.
The third chapter is a detailed look at three theorem’s of G. Birkhoff [Bir35,
Bir44], presenting categorical proofs of the theorems which generalize the classicalresults and which can be easily dualized to apply to categories of coalgebras. The
theorems of interest are the variety theorem, the equational completeness theorem andthe subdirect product representation theorem. The duals of each of these theorems
is discussed in detail, and the dual notion of “coequation” is introduced and several
examples given.
In the final chapter, we show that first order logic can be interpreted in categories
of coalgebras and introduce two modal operators to first order logic to allow reasoning
about “endomorphism-invariant” coequations and bisimulations internally. We also
develop a translation of terms and formulas into the internal language of the basecategory, which preserves and reflects truth. Lastly, we introduce a Kripke-Joyal stylesemantics for L(E ), as well as a pointwise semantics which reflects the intuition ofcoequation forcing at a point or subset of a coalgebra.

Acknowledgments
I have been fortunate to have two advisors on this dissertation. I first became interested in the subject thanks to Dana Scott, who helped guide the questions andsuggested the Birkhoff’s theorem research in particular. Steve Awodey taught me
everything I know about category theory, but I am grateful anyway. Both advisors
helped my writing immensely, in addition to guiding my research, and I am thankful
for their patience and wisdom.
When Dana first suggested I look into coalgebras, he pointed me to Vicious Circles, by Jon Barwise and Larry Moss. Since that book was the start of my study of
coalgebras, it seemed only fair that Larry Moss should have to read this dissertation.
He graciously agreed to be my outside reader. I am grateful for the advice he andJeremy Avigad gave as members of my committee.
My research has benefited through discussions and correspondence with many
people, including Peter Aczel, Jiřı́ Adámek, Andrej Bauer, Lars Birkedal, Steve
Brookes, Corina Cı̂rstea, Federico do Marchi, Neil Ghani, Jeremy Gibbons, Peter
Gumm, Bart Jacobs, Alexander Kurz, Bill Lawvere, John Reynolds, Tobias SchröderJames Worrell and Jaap van Oosten and others I’m sure to have missed here. I
also want to thank the organizers of the Coalgebraic Methods for Computer Science
workshop for providing a great opportunity to meet and discuss our research.
On a more personal note, I could not have completed this work without theextraordinary patience and generosity of my wife, Ling Cheung. In fact, I am therare husband who’s also grateful for the extended visits of his mother-in-law, Siu Kai
Lam. She helped out considerably when two graduate students were overwhelmedwith a newborn, Quincy Prescott Hughes. I also enjoyed the distractions from mywork, including Penguins hockey, regular fishing trips with Dirk Schlimm, exciting
demolition derbies at New Alexandria and captivating and suspenseful games of Peeka-boo with Quincy.

iii

Contents
Introduction
Chapter synopsis

1
4

Chapter 1. Algebras and coalgebras
1.1. Algebras and coalgebras for an endofunctor
1.2. Structural features of E Γ and EΓ
1.3. Subalgebras
1.4. Congruences
1.5. Initial algebras and final coalgebras

7
7
16
22
27
32

Chapter 2. Constructions arising from a (co)monad
2.1. (Co)monads and (co)algebras
2.2. Subcoalgebras
2.3. Subcoalgebras generated by a subobject
2.4. Limits in categories of coalgebras revisited
2.5. Bisimulations
2.6. Coinduction and bisimulations
2.7. n-simulations

47
47
61
73
77
89
105
109

Chapter 3. Birkhoff’s variety theorem
3.1. The classical theorem
3.2. A categorical approach
3.3. Categories of algebras
3.4. Uniformly Birkhoff categories
3.5. Deductive closure
3.6. The coalgebraic dual of Birkhoff’s variety theorem
3.7. Uniformly co-Birkhoff categories
3.8. Invariant coequations
3.9. Behavioral covarieties and monochromatic coequations

113
114
115
125
127
135
140
153
162
168

Chapter 4. The internal logic of E
4.1. Preliminary results
4.2. Transfer principles

175
175
186
v

vi

CONTENTS

4.3. A Kripke-Joyal style semantics
4.4. Pointwise forcing of coequations

198
200

Concluding remarks and further research

205

Appendix A. Preliminaries
A.1. Notation
A.2. Factorization systems
A.3. Predicates and Subobjects
A.4. Relations
A.5. Monads and comonads

209
209
209
212
214
216

Appendix. Bibliography

219

Appendix. Index

223

Introduction
The theory of universal algebras has been well-developed in the twentieth century. The theory has also proved especially fruitful, with early results (like Birkhoff’svariety theorem) providing a basis for model theory and other results providing an
abstract understanding of familiar principles of induction, recursion and freeness.
The theory of coalgebras is considerably younger and less well developed. Coalgebras
arise naturally, as Kripke models for modal logic, as automata and objects for object
oriented programming languages in computer science, etc. Hence, one would like a
unified theory of coalgebras to play a role analogous to that of the theory of algebras.
This goal is aided by the duality between algebras and coalgebras. Statements about
categories of algebras yield dual statements about categories of coalgebras. One canthen investigate whether there are reasonable assumptions about the categories of
coalgebras that yield the dual theorems.
Algebras, in their commonest form, can be understood as a set together with some
operations on the set. In other words, algebras are structures for a signature. The
term algebras are examples of free algebras, where freeness is easily expressed in termsof adjoint functors. Such free algebras (which are initial objects in a related categoryof algebras) come with the proof principle of induction, which can be understood interms of minimality. That is, the principle of induction is equivalent to the property
that an algebra has no non-trivial subalgebras. The property of definition by recursion
is exactly the property that an algebra is an initial object. Thus, these familiar topics
of universal algebra are well-suited for a categorical setting. We can use the toolsof category theory to investigate freeness, induction and recursion as special casesof adjointness, minimality and initiality, respectively. In particular, these algebraic
properties can be represented as standard categorical properties applied to categoriesof algebras (in which the structure of the category leads to the well-known algebraic
properties).
Coalgebras can also be regarded as a set together with certain operations on it,
but with a key difference. Where an algebra is intended to model combinatorial operations, a coalgebra models a set with various unary operations whose codomain is a(typically) more complex structure. These operations can be viewed as “destructors”
which take an element of the coalgebra to its constituent parts. Compare this view
1

2

INTRODUCTION

with the notion that an algebras operations give a means (not necessarily unique) of“constructing” an element out of a tuple.
Consider, for instance, a set S of A-labeled binary trees1 which is closed underthe “childOf” relation. That is, if x ∈ S, then both the left and right subtrees of x
(if they exist) are also in S. Then S has a natural coalgebraic structure consistingof three destructor functions. Given any x ∈ S, we may ask for the label of x. We
may also ask for the left child or right child of x, assuming that there is an “error
state” which can be returned if x has no such child . These three structure maps
define a signature Σ for a category of coalgebras in the same way that a set withsome combinatorial operations define a signature for a category of algebras (i.e., asimilarity type). Any set X, together with three operations,
a :X

/ A,

l :X

/ X + 1,

r :X

/ X + 1,is a Σ-coalgebra. Equivalently, any set X with a single map
ha, l, ri :X/ A × (X + 1) × (X + 1)

is a coalgebra of the same type as our set S of binary trees. Indeed, any such
structured set can be regarded as a set of trees itself.
We can use the theory of algebras in order to develop the theory of coalgebras.
The duality is apparent in the distinguished initial algebra/final coalgebra. The
initial algebra is the initial (i.e., “least”) fixed point of the associated functor, while
the final coalgebra is the final (i.e., “greatest”) fixed point. The initial algebra comesequipped with principles of recursion and induction, while the final coalgebra satisfies
the principles of corecursion and coinduction, that is, principles which are appropriate
to collections of non-well-founded structures. Intuitively, the elements of the initial
algebra are those which can be constructed from some set of basic elements in a finite
number of steps, while the elements of the final coalgebra are all of those structures of
the appropriate signature, including those for which no finite construction is apparent(think of the distinction between well-founded binary trees and non-well-foundedbinary trees). Of course, the extent to which this intuition is appropriate depends
on the functor (i.e., signature) at hand. But the point of this comparison remains:
To construct a theory of coalgebras, one may take the theory of algebras and dualize
the central theorems. One then interprets the result in order to make sense of it –the traditional statement of the principle of coinduction, for instance, does not makeapparent its duality with induction. Similarly, the description of a cofree coalgebra
1In this example, we do not require that a tree have both a left and a right child if it has any
children.

INTRODUCTION

3

bears little superficial analogy to the corresponding view that free algebras are term
algebras. Instead, some work was required to give a useful description of cofreeness,apart from the categorical task of “turning the arrows around”.
The categorical task can be non-trivial as well. Classical results in universal
algebra theory were proved in a fairly narrow (from a categorical perspective) setting.
In order to dualize these classical theorems, one must first translate the proof into
categorical terms, in order to see which properties of Set and polynomial functors
are relevant to the theorem. Then, one may dualize these properties – and hope thatthe result yields reasonable assumptions for the category of coalgebras! If not, thena bit more work may be required to ensure that the proof goes through.
This method has special difficulties when the algebraic proof intrinsically involves
elements of algebras. Unfortunately, the dual of “global elements” yields nothingworthwhile and one must find other means of proving the dual theorem. This problem can be seen in the proof of Birkhoff’s “co-subdirect product” theorem in Section 3.7.1. The proof of this theorem bears no real resemblance to the proof of its
algebraic counterparts. Furthermore, the statement of the theorem required assumptions beyond those in the original theorem. These differences reflect the difficulty of
dualizing a theorem whose proof involves reasoning about elements of algebras.
This thesis is largely an extended exercise in the program of dualizing algebraic
results in order to understand categories of coalgebras. The main result in thisdirection is the dual of Birkhoff’s variety theorem, which we treat in considerable
detail in Chapter 3. In addition, we consider his deductive completeness theorem anddualize this theorem, yielding a modal operator on categories of coalgebras which isthe dual of closing sets of equations under deductive consequence, and his subdirect
product theorem.
One may hope, as well, that as the theory of coalgebras matures, developmentsin the theory may lead to corresponding results for algebras. This thesis features twomodest steps in that direction. First, the modal operator for bisimulations dualizes
to a closure operator on relations over coproducts of algebras – but it’s unclear what
applications this closure might have. Second, in Section 3.9.3, we consider classes ofalgebras defined by equations with no variables (just constants) and show that theseare exactly the varieties closed under codomains of homomorphisms. This theorem
may be well-known (although a search turned up nothing), but illustrates the way inwhich a coalgebraic topic (covarieties closed under bisimulation) can, when dualized,
yield natural algebraic results.
Birkhoff’s variety and completeness theorems are fundamental to the theory ofalgebras, establishing equational reasoning as the “right” logic for algebras. Hence, it
is natural to suppose that “coequations” will play an important role in understanding
categories of coalgebras. The work in proving the “co-Birkhoff” theorems yields a

4

INTRODUCTION

definition of coequation which is easily understood: A coequation over C is a predicate
on the cofree coalgebra over C (where “cofreeness” now requires some explanation,of course!). Then, to the extent that coequations are central to reasoning about
coalgebras, one can infer that the “right” logic for coalgebras is a predicate (not“equational”) logic.
This inference helps motivate the final chapter, in which we develop a logic which
can be interpreted in categories of coalgebras (i.e., an “internal” logic). In addition
to the first order core of the logic, we introduce a modal operator arising from thedual of Birkhoff’s completeness theorem. Furthermore, we make use of a translationof statements in the logic of the category E of coalgebras to the base category E.
This translation allows “transition” rules which take as premises statements in L(E)and form conclusions in L(E ) (and vice versa). We also give a Kripke-Joyal stylesemantics which arises naturally from pointwise satisfaction of equations.
Throughout, we work to develop results which apply to as broad a setting as possible. While most research in categories of coalgebras take the base category Set as
the starting point (and perhaps even limit discussion to an inductively specified set
of functors), we work to develop results which apply to a wide number of categories
and functors. One topic in which the difference is most apparent is the notion ofbisimulation. Because we do not assume choice, the traditional notion of bisimulation is too restrictive – two elements which are behaviorally indistinguishable neednot be “bisimilar” under that definition. Consequently, we offer a new definition ofbisimulation in Section 2.5. We show that the new definition reduces to the traditional definition under the axiom of choice. Regardless of the axiom of choice, thenew definition is reasonably well-behaved (although without choice or preservationof pullbacks, it’s not clear the bisimulations compose), which cannot be said for theold definition.
In summary, then, this thesis has three primary goals. First, help develop a theoryof coalgebras by dualizing results in algebra theory and, when appropriate, dualizing
new coalgebraic results and interpret them as theorems about algebras. Second,develop an internal (modal) logic for categories of coalgebras in which coequations
play a central role and in which there is an interplay between derivations in thebase category and derivations in the category of coalgebras. Third, do the abovein as general a setting as practicable, modifying previous definitions, if necessary,
to be suitable for the general setting (always ensuring that they reduce to familiar
definitions in the familiar setting).
Chapter synopsis
Chapter 1: In this chapter, we introduce the categorical definitions of algebra
and coalgebra. We discuss some basic structural features of the category

CHAPTER SYNOPSIS

5of algebras, E Γ , and the category of coalgebras, EΓ . We spend some time
discussing subalgebras, congruences and exactness properties in E Γ as an
exercise in applying categorical reasoning to this generalization of universal
algebras. Finally, we discuss the initial algebra and final coalgebra. Eachof these come equipped with certain proof principles. The initial algebra
satisfies the proof principles of induction and definition by recursion, while
the final coalgebra satisfies the dual principles of coinduction and definition
by corecursion. We highlight the duality when presenting these principles.
Chapter 2: We discuss the relationship between algebras for a monad and freealgebras for an endofunctor and the dual result involving coalgebras for acomonad and cofree coalgebras. Following this, we introduce subcoalgebras
and discuss a left and a right adjoint to the subcoalgebraic forgetful functor.
We use the right adjoint to prove that, in the presence of cofree coalgebras,
the category EΓ is as complete as E. The presence of products in EΓ leads
to a discussion of relations over coalgebras. In Section 2.5, we introduce a
new definition of bisimulation – one which is appropriate to coalgebras in
categories without the axiom of choice. We close with a discussion of therelation between coinduction and bisimulations.
Chapter 3: In this section, we primarily discuss Birkhoff’s variety theorem[Bir35] and its dual. To begin, we discuss a generalization of equation
satisfaction that is more suitable for a categorical analysis – namely, orthogonality conditions. This leads to an abstract proof of Birkhoff’s theorem
which applies to a wide range of categories, and in particular applies to certain categories of algebras. This approach naturally dualizes to provide the“co-Birkhoff” theorem for covarieties of coalgebras. In addition, we consider
Birkhoff’s deductive completeness theorem, ibid, and show how its dual leads
to a natural modal operator on coalgebraic predicates. In addition, we discuss the dual of Birkhoff’s subdirect product theorem, extending the workin [GS98].
Chapter 4: We show that, given some reasonably weak assumptions on E andΓ, the category EΓ can interpret first order logic. We provide a translationfrom the internal language of EΓ to the internal language of E which preserves
entailment. This translation explicitly involves augmenting the language Ewith the modal operator  from Chapter 2. We close with a brief discussionof Kripke-Joyal semantics and pointwise semantics which are suggested fromthe coequation-as-predicate viewpoint.

CHAPTER 1

Algebras and coalgebras
In this chapter, we present some preliminary definitions and results for categoriesof algebras and coalgebras. We begin by developing the theories side by side, using
the natural dualities to derive results for coalgebras by dualizing results for algebras.
In Section 1.2, we discuss limits and colimits in categories E Γ and EΓ , focusing on
those (co-)limits which are created by the respective forgetful functor. We also discuss
factorizations in E Γ and EΓ which are inherited from the base category. In Section 1.3,
we discuss subalgebras, postponing the dual notion until Chapter 2. Similarly, in
Section 1.4, we present the standard (categorical) development of algebraic relations(i.e., pre-congruences), while postponing the introduction of coalgebraic relations
and bisimulations until the following chapter, when we have already constructed
products. We conclude with a discussion of initial algebras and final coalgebras
and the characteristic properties (induction/recursion and coinduction/corecursion,respectively).
1.1. Algebras and coalgebras for an endofunctor
We start with the definitions of Γ-algebras and Γ-coalgebras for endofunctor Γ.
Note that this is not the same definition as (co)algebras for a (co)monad, which we
discuss in Chapter 1.1. Essentially, a category of (co)algebras for an endofunctor isequivalent to a category of (co)algebras for a (co)monad just in case there are (co)free(co)algebras for each object in the base category.
1.1.1. Definitions. We briefly state the definitions of Γ-algebra, Γ algebrahomomorphism and E Γ and then dualize. The aim is that the reader, who is likely
familiar with universal algebras in some form, should find the definition of coalgebra
familiar and natural as the dual of an algebra. In Section 1.1.3, we will give someexamples of coalgebras to show that coalgebras arise naturally.
Definition 1.1.1. Let E be any category. Given an endofunctor Γ :E / E , a Γalgebra consists of a pair hA, αi, where A is an object of E and α :ΓA / A an arrowin E. We call A the carrier and α the structure map of the algebra
Given two Γ-algebras, hA, αi and hB, βi, a Γ-algebra homomorphism,/ hB, βi,

f :hA, αi
78

1. ALGEBRAS AND COALGEBRAS

is a map f :A

/ B in E such that the following diagram commutes.

ΓA

Γf

/ ΓB

α

β





A

f

/B

The Γ-algebras and their homomorphisms form a category, denoted E Γ .
The concept of Γ-coalgebras is formally dual to the definition of Γ-algebra above.
op
Specifically, the category EΓ of coalgebras arises formally as the category ((E op )Γ )op .
Of course, interest in coalgebras comes from the fact the these structure arise independently as well, from computer science semantics, Kripke frames and models, andother sources.
Definition 1.1.2. A Γ-coalgebra is a hA, αi, where α :A / ΓA. Again, A is thecarrier and α the structure map of the coalgebra. A Γ-coalgebra homomorphism isagain a commutative square:
ΓA
O

Γf

α

A

/ ΓB
O
β

f

/B

The Γ-coalgebras and their homomorphisms again form a category, denoted EΓ .
Note: We often refer to Γ-algebra homomorphisms as Γ-homomorphisms or justhomomorphisms. We do the same for coalgebra homomorphisms. The kind of homomorphism we mean should be clear from the context.
For each of these categories, there is an evident forgetful functor, U , taking a(co)algebra hA, αi to A. Properly, we should write
U Γ :E Γ/E ,UΓ :EΓ

/E ,to indicate that these are different functors, depending on whether we are interested
in algebras or coalgebras and also depending on the functor Γ. Of course, we will
avoid such complications and the meaning of U should be clear from context.
In Section 1.2, we will give some of the features of the categories E Γ and EΓ .
In particular, the forgetful functor creates limits (colimits, resp.) in categories ofalgebras (coalgebras, resp.). Before exploring these features, we give some examples
of categories of algebras and coalgebras.

1.1. ALGEBRAS AND COALGEBRAS FOR AN ENDOFUNCTOR

9Remark 1.1.3. The notation for a Γ-algebra is the same as that for a Γ-coalgebra.
Namely, each is a pair hA, αi, where
α :ΓA

/A

α :A

/ ΓA

in the algebraic case, andin the coalgebraic case. Most often, whether we mean hA, αi to be an algebra or a
coalgebra will be clear from context. However, we sometimes use this ambiguity ofnotation to our advantage. For example, in Section 1.3, we note that a subobject in
E Γ is a monic algebra homomorphismhB, βi // hA, αi .

Also, a subobject in EΓ is a monic coalgebra homomorphismhB, βi // hA, αi .

Since the notation for each is the same, we can draw the diagram just once and say
A subobject of a Γ-(co)algebra is a monic homomorphismhB, βi // hA, αi .

1.1.2. Some examples of algebras. In this section, we begin with some examples of algebras for various functors. We will, in each case, make clear what thehomomorphisms in E Γ are.
Example 1.1.4. Consider the functor Γ :Set

/ Set given by

ΓA = 1 + A × A.
An algebra for this functor consists of a set A together with a structure map
α :A × A + 1/ A.

Such a map α is equivalent to a pair of maps
·α :A × A
a :1

/ A, and/A

In other words, a Γ-algebra is a triple hA, ·α , ai, where ·α is a binary operation on A
and a is a distinguished element of A. This is also called a Σ-model or Σ-structure
for the signatureΣ = {·(2) , e(0) }.
See Example 1.1.5 for details.

10

1. ALGEBRAS AND COALGEBRASGiven another Γ-algebra, hB, ·β , bi, a Γ-homomorphism hA, ·α , ai
is a map f :A / B such that the following diagram commutes:/ hB, ·β , bi

f ×f +id1

A×A+1/ B×B+1h·β , bih·α , ai





A

f

/B

This entails thatf (s·α t) = f (s)·β f (t), andf (a) = b.
In other words, a homomorphism is a map that respects the binary operation andconstant. The next example generalizes this result to arbitrary universal algebras.
Example 1.1.5. Much of this dissertation is devoted to taking well-known resultsin universal algebra, translating them to a categorical setting and dualizing. Thisapproach relies on the fact that the categorical notion of algebra for an endofunctor
is a proper generalization of the notion of universal algebra. In particular, given
any signature Σ, there is a polynomial functor P such that the category Set isthe category of universal Σ-algebras. This result is well-known, but it is useful towork through the details here, in order to gain some familiarity with the categoricalnotions.
These definitions can be found in [MT92], [Grä68] and elsewhere.
A signature Σ is a set of function symbols together with associated (finite) arities.
We write f (n) to indicate that f is a function symbol of arity n. If the arity of afunction symbol c is 0, then we call c(0) a constant symbol.
A Σ-algebra is a pair(n)S = hS, {fS :S n

/ S |f (n) ∈ Σ}i,where S is a set (called the carrier of the algebra). Notice that the interpretation ofa constant symbol is an element of S.
Given two Σ algebras S and T , we say that a set function φ : S / T is a Σhomomorphism if, for every function symbol f (n) in Σ, and every s1 , . . . , sn ∈ S,
(n)

(n)

fT (φ(s1 ), . . . , φ(sn )) = φ(fS (s1 , . . . , sn )).
(0)

(0)

In particular, this means that for every constant symbol c(0) , φ(cS ) = cT .
Given a signature Σ, consider the polynomial functor P :Set / Set given by
a
PS =
S n.
f (n) ∈Σ

1.1. ALGEBRAS AND COALGEBRAS FOR AN ENDOFUNCTOR

11

Of course, if Σ is infinite, then this functor involves an infinite coproduct, so perhaps
the term “polynomial functor” is misleading here. It is easy to show that the categoryof Σ-algebras, Alg(Σ), is isomorphic to the category of P-algebras, Set . For eachΣ-algebra S and each f (n) ∈ Σ, we have the interpretation of f (n) in S,

(n)fS :S n/S .

Hence, there is a unique P-algebra structure map σ : PS
below commute.
`n/
S n J/
f (n) ∈Σ S

/Smaking the diagram

JJ
JJ
JJ
σ
JJ
(n)
JJ 
fS
J%

S

Conversely, any hS, σi in Set corresponds to a Σ-algebra with f
Sn /
/

`

f (n) ∈Σ S

α

n

(n)
given byS

/ S.

It’s easy to see that Σ-homomorphisms are P-homomorphisms, and vice-versa, sothat this correspondence is an isomorphism of categoriesAlg(Σ) ∼= Set .
Besides providing motivation for the approach of this dissertation, this example
should convince the reader that algebras for an endofunctor are familiar territory.
Sets and operations on sets are familiar enough, and these structures gave rise to thenotion of universal algebras. The categorical notion of algebras for an endofunctor issimply a generalization of universal algebras, as we’ve seen here.
Example 1.1.6. Let Z be a set and consider the Set functor
ΓA = Z × A + 1.
An algebra for this functor consists of a pair hA, αi where α : Z × A + 1
decompose α into two maps,∗α :Z × A()α :1/ A, and/ A.

A homomorphism from the Γ-algebra hA, αi to hB, βi is a set function
f :A

/B

such that, for all z ∈ Z and a ∈ A,
f (z ∗α a) = z ∗β f (a),f (()α ) = ()β .

/ A.

We

12

1. ALGEBRAS AND COALGEBRAS

We will see in Example 1.5.6 that the initial algebra for this functor is the collection of all finite streams over Z, which we denote Z <ω . We can see now that Z <ω isa Γ-algebra, with the structure map given by/ Z <ω , andpush :Z × Z <ω
/ Z <ω ,() :1

where push returns the result of pushing a new letter onto a stream and () returns
the empty stream. More specifically,(
if k = 0/ Z ) = λk . x
push(x, σ :nσ(k − 1) elseand () is the unique map 0/Z .

1.1.3. Some examples of coalgebras. The dual category of coalgebras foran endofunctor may seem less familiar. In this section, we will give a few common
examples of SetΓ for a variety of endofunctors on Set. In many these examples, thereader should notice that the structure map α :A / ΓA acts as a destructor. It takes
an element of the coalgebra and decomposes the element into its constituent parts.
This is a common feature of coalgebras and this point of view is dual to the point ofview that algebras are objects together with combinatory principles. However, theexamples of Kripke models (Example 1.1.10) and topological spaces (Example 1.1.12)
show that one can take talk of destructors too seriously.
Example 1.1.7. Consider the set functor
ΓA = Z × A
for a fixed set Z. A coalgebra for this functor consists of a set A and a structure map
α :A/ Z × A.

Equivalently, a coalgebra is given by a set A and two maps
hα :A

/ Z , and

tα :A

/ A.

Given any such coalgebra, each a ∈ A gives rise to an infinite stream over Z, namely
the streamhα (a), hα ◦ tα (a), hα ◦ t2α (a), . . .
So, for any Γ-coalgebra hA, αi, we can define a mapping ! from A to the collectionof streams over Z, Z ω , by defining!(a) = λn . hα ◦ tnα (a).

1.1. ALGEBRAS AND COALGEBRAS FOR AN ENDOFUNCTOR

13

It is worth noting, however, that this map is not necessarily one-to-one. Distinct
elements of A may give rise to the same stream. For instance, consider the coalgebrahA, αi whereA = {a, b, c}andα(a) = h17, ci,
α(b) = h17, ci,
α(c) = h17, ci.

Then, one can see from the above definition of !, that!(a) =!(b) =!(c).
Indeed, each of the elements of A maps to the constant 17 map.
We will see in Example 1.5.19 that the function ! is defined by corecursion on thecollection of streams Z ω .
A homomorphism between two Γ-coalgebras, hA, hhα , tα ii and hB, hhβ , tβ ii is a
map f :A / B satisfying
hα (a) = hβ (f (a)),
f (tα (a)) = tβ (f (a)).
The map ! is an example of such a homomorphism.
Example 1.1.8. Consider again the functor
ΓA = Z × A + 1
from Example 1.1.6. A coalgebra for this functor consists of a set A together with a
map
α :A

/ Z × A + 1.

So, each element a of such a coalgebra hA, αi either maps to ∗, the unique elementof 1, or to an ordered pair hz, a0 i, where z ∈ Z and a0 ∈ A. We can again interpretthe coalgebras as collections of streams over Z if we allow each stream to be finite or
infinite (above, we mapped coalgebras to collections of infinite streams). If α(a) = ∗,then we take a to represent the empty stream. Otherwise, α(a) = hz, a0 i for some z
and a0 . Let σ 0 be the stream represented by a0 . We say that a represents the streampush(z, a0 ), where push is the stream with head z and tail a0 . In this way, we define
a mapping! :A/ Z ≤ω

14

1. ALGEBRAS AND COALGEBRAS

satisfying!(a) =(()
if α(a) = ∗0
push(z, !(a )) else

This map is again defined corecursively and is described in detail in Example 1.5.21.
We mention it here to give the reader an intuition for the Γ-coalgebras. A Γ-coalgebra
is a collection of finite and infinite streams over Z.
A homomorphism between two Γ-coalgebras must satisfy the same equations as
in Example 1.1.7, if α(a) ∈ Z × A, and, if α(a) = ∗, then β(f (a)) = ∗.
Example 1.1.9. Let P be a polynomial functor on Set, which we’ll write asaP(A) =
Zi × A i .
i<ω

A P coalgebra consists of a set A, together with a structure map α :A / P(A). Givensuch a coalgebra hA, αi, for each a ∈ A, define br(a) to be the unique i such thatα(a) ∈ Zi × Ai .
We call the elements of πAi ◦ α(a) the children of a. We denote the jth child,πj ◦ πAi ◦ α(a),by childj (a). We call πZi ◦ α(a) the label of a, denoted label(a). In this way, we thinkof a Γ-coalgebra as a collection of labeled trees. Each element a ∈ A is the root ofa tree, where the immediate subtrees have the children of a as roots. The numberof children is given by br(a), and the set of valid labels of a is given by Zbr(a) . Take
this description of coalgebras as trees as purely motivational for now — there will be
more discussion on this in Example 1.5.22.
Examples 1.1.7 and 1.1.8 give a detailed account of two polynomial functors. In
the former example, each node of the “tree” is labeled with an element of Z and has
exactly one child. In the latter, each node has either 0 or 1 child. If it has 0 children,
it is unlabeled (or, if you prefer, labeled with ∗). If it has 1 child, it is labeled with
an element of Z, as before.
Example 1.1.10. Given a set of atomic propositions AtProp, we can define an
infinitary modal language L(AtProp) to be the least class containing AtProp andclosed under the rules• > ∈ L(AtProp).
• If φ ∈ L(AtProp), then so is ¬φ and ♦φ.
V• If S ⊂ L(AtProp), then S ∈ L(AtProp).

A Kripke model for the language L(AtProp) is given by a pair A = hA, αi, where
A is a set and/ P(A) × P(AtProp).
α :A

1.1. ALGEBRAS AND COALGEBRAS FOR AN ENDOFUNCTOR

15

The idea is that the first component of α(s) is the set of worlds accessible to s andthe second component is the set of atomic propositions that hold in s. Accordingly,
one defines a satisfaction relation |= by the following:• a |=• a |=• a |=• a |=• a |= >.

 φ for φ ∈ AtProp iff φ ∈ π ◦ α(a).
 ¬φ iff a 6|= φ.
 ♦φ
iff there is some b ∈ π ◦ α(a) such that b |= φ.
V
 S iff a |= φ for each φ ∈ S.
2

1

So, we see that Kripke models can be viewed as coalgebras for a particular functor ina straightforward manner, and that the resulting satisfaction relation comes directlyfrom the coalgebraic structure map.
This example is covered in detail in [BM96, Chapter 11]. In the case that
AtProp is empty, so the functor is just A 7→ P(A), the coalgebras are called Kripke
structures or Kripke frames. These are discussed in detail in [Jac00, Che80, HC68].

Example 1.1.11. Fix a set of “inputs”, I and let Γ :Set

/ Set be defined by

ΓS = (Pfin S)I ,where Pfin is the covariant finite powerset functor. A Γ-coalgebra hS, σi can be
regarded as a non-deterministic automaton over I, where the structure map gives
the transition function. Explicitly, for each state s ∈ S and each input i ∈ I, we
write
s

i

/ s0

just in case s0 ∈ σ(s)(i).
Example 1.1.12. We take this example from [Gum01b].
Let A be a set. A filter on PA is a collection U ⊆ PA if U is closed under finite
intersections and supersets. In other words, U is a filter on PA just in case
• If S, T ∈ U , then S ∩ T ∈ U , and• If S ∈ U and S ⊆ T , then T ∈ U .
We define a functor F :Set / Set taking each set A to the collection of filters on A.
If f :A / B is a map in Set, then for each S ∈ PA, F f (S) is the filter generated by
Pf (S). See [Gum01b] for details on the functor F .
Each topological space hA, OA i gives rise to an F -coalgebra, as follows. We define
the structure map α :A / F A on elements a ∈ A by
α(a) = {S ⊆ A | ∃U ∈ OA . a ∈ U ⊆ S}.

16

1. ALGEBRAS AND COALGEBRASIn other words, α(a) is the neighborhood filter 1 of a. It is easy to see that, if hA, αiand hB, βi are F -coalgebras arising from topological spaces hA, OA i and hB, OB i,
respectively, then a map f :A / B is a coalgebra homomorphism just in case f is an
open, continuous map. Thus, we have an inclusion
Topopen/ SetF ,where Topopen is the category of topological spaces and open, continuous maps.
Example 1.1.13. Consider the functor ΓA = Z × A on the category Top, where
Z is a fixed T1 space (so points are topologically distinguishable). A Γ-coalgebra
consists of a pair hA, αi where A is a topological space and α :A / ΓA is continuous.
We will consider some carrier spaces for Γ-coalgebras and describe the Γ-structure
map that can be imposed on the space.
Let I be the unit interval [0, 1]. Then a Γ-coalgebra with carrier I is just a pathin the space Z × I.
Let 2 denote the Sierpinski space and let σ : 2 / R × 2 be continuous. Let π1 ◦σ(0) = z0 and π2 ◦ σ(0) = z1 . For every open U containing z0 , π1−1 (U × 2) is open
and so z1 ∈ U . Hence, z0 = z1 . So, a Γ-coalgebra with carrier 2 is specified by anelement of Z and a map 2 / 2.
1.2. Structural features of E Γ and EΓ
The categories E Γ and EΓ inherit much of the structure from the underlying category E. In particular, E Γ has whatever limits E has, and EΓ has whatever colimits
E has. If the functor Γ preserves colimits, then these are available in E Γ , and thedual result holds for EΓ . All of this is well-known and can be found in, for instance,[Bor94, Volume 2, Chapter 4], where these results are presented for algebras for amonad. The same proofs imply the following results for algebras for an endofunctor2.
We present the main theorems here, without proof.
1.2.1. Creating (co)limits in categories of (co)algebras. The following definitions can be found in most standard category theory texts, including [Lan71].
Definition 1.2.1. Let G :C / C 0 be a functor. We say that G preserves D-limits
if, for every diagram J :D / C , whenever
τ :A

+3 J

is a limiting cone, thenGτ :GA+3 G ◦ J

1A neighborhood of a is any set S ⊆ A containing an open set which contains a.

We do notrequire that S itself is open.
2The key step is showing the existence of a structure map for the (co)limit. This step isessentially the same for both algebras for an endofunctor and algebras for a monad.

1.2. STRUCTURAL FEATURES OF E Γ AND EΓ

is a limiting cone for G ◦ J.
We say that G reflects D-limits if, for every J :D

17

/ C , whenever+3 G ◦ J

Gτ :GAis a limiting cone for G ◦ J, then
τ :A

+3 J

is a limiting cone for J.
Similarly, we define the statements G preserves/reflects D-colimits.
If a functor preserves/reflects all (co)limits (regardless of the diagram category),
we say the functor preserves/reflects (co)limits.
/ C 0 creates D-limits if, wheneverDefinition 1.2.2. We say that G :C

/C

J :D
and
τ 0 :A0+3 G ◦ J

is a limiting cone in C 0 , then there is a unique limiting cone
τ :A

+3 J

in C such that GA = A0 and Gτ = τ 0 .
Similarly, we define the statements G creates D-colimits and G creates (co)limits.
So, if a functor G : C / C 0 creates D-limits, then C has “as many” D-limits as C 0
does. It is easy to see that if G creates D-limits, then G reflects D-limits. Also,
if G creates D-limits and C 0 has all D-limits (is D-complete), then G also preserves
D-limits and C is D-complete.
Definition 1.2.3. Additionally, we say that G preserves regular epis if, wheneverp is a regular epi, then G(p) is a regular epi.
Similarly, we define G reflects regular epis.
More generally, we define G preserves/reflects maps of type Θ, where Θ is someclass of arrows (say, regular monos, isomorphisms, etc.)
It is worth noting that preservation of regular epis is weaker than preservation ofcoequalizers. If G preserves coequalizers, then any coequalizer diagram
f

B

//

g

A

q 

,2 Q

Gq 

,2 GQ .

is taken to a coequalizer diagram
Gf

GB

Gg

//

GA

18

1. ALGEBRAS AND COALGEBRASIf G preserves regular epis, however, we can only conclude that Gq is a coequalizer
for some pair of maps. We cannot conclude that Gq is the coequalizer of Gf and Gg.
/ E be given. The algebraic forgetful functor

Theorem 1.2.4. Let E and Γ :E

U :E Γ

/E

creates limits. Dually, the coalgebraic forgetful functor
/E

U :EΓ
creates colimits.

We interpret this theorem as saying that E Γ has whatever limits E has, and that,furthermore, these limits are computed in E. We apply this result in Section 1.5, forinstance, to conclude that the initial coalgebra (final algebra, resp.) are trivial if E
has an initial object (final object, resp.).
Example 1.2.5. Let E have all κ-indexed products and let {hAi , αi i}i∈κ be an
κ-indexed collection of Γ-algebras. Then the productYhAi , αi ii∈κis defined in E Γ and is given byhY

Ai , hαi ii∈κ i,

i∈κ

where

hαi ii∈κ :Γ

Qi∈κ Ai/is the unique map such that, for all i ∈ κ,

Qi∈κ Aiπi ◦ hαi ii∈κ = αi .
This is a generalization of the statement that products of universal algebras are
the products of the underlying sets, with operations determined pointwise.
Example 1.2.6. Dually, let E have all κ-indexed coproducts and let {hAi , αi i}i∈κ
be an κ-indexed family of Γ-coalgebras. We have a family of maps`
αi
/ ΓAi Γκi / ΓAii∈κ Ai ,inducing a structure map`i∈κ Ai/Γ`i∈κ Ai .

It is easy to confirm that this coalgebra is a coproduct in EΓ .

1.2. STRUCTURAL FEATURES OF E Γ AND EΓ

191.2.2. Colimits in E Γ , limits in EΓ . Again, this theorem can be found in[Bor94, Volume 2, Chapter 4], where the result is proved for categories of algebras
for a monad.
Theorem 1.2.7. Let D be a category and Γ : E / E . If Γ preserves D-colimits
then the forgetful functor U : E Γ / E creates such colimits. Similarly, the coalgebraic
forgetful functor U :EΓ / E creates any limits preserved by Γ.
So, for instance, if Γ preserves coequalizers, then E Γ has all coequalizers and these
are created by U . Unfortunately, the preservation of coequalizers seems a strong
condition. However, we will get considerable mileage out of a weaker condition:
preservation of regular epis.
In the coalgebraic setting, one often wants that the forgetful functor preserves
pullbacks along regular monos. Other authors have ensured that this condition holds
by assuming that Γ preserves weak pullbacks, We take the shorter path to the goal
and assume that Γ preserves the appropriate pullbacks, since other weak pullbacks do
not play a central role in this thesis. Applying Theorem 1.2.7, we have the following
useful corollary.
Corollary 1.2.8. If Γ preserves pullbacks along (regular) monos, then U creates
pullbacks along (regular) monos.
1.2.3. Factorizations of (co)algebras. In this section, we show how a categoryof (co)algebras can inherit a factorization system from its base category (see Appendix
for a brief discussion of factorization systems). Explicitly, if E has regular epi-mono
factorizations and kernel pairs and if Γ preserves regular epis, then the category ofalgebras E Γ also has regular epi-mono factorizations, created by U . Furthermore,
the forgetful functor preserves and reflects regular epis, monos and exact coequalizer
sequences. Since every functor Γ : Set / Set preserves regular epis, this implies inparticular that SetΓ has regular epi-mono factorizations.
Dually,we learn that if E has epi-regular mono factorizations and cokernel pairs,and Γ preserves regular monos, then EΓ has epi-regular mono factorizations, createdby U .
The following lemma and its dual are useful in verifying that certain maps in E
are homomorphisms.
Lemma 1.2.9. Suppose that p :hA, αi / hB, βi be a Γ-algebra homomorphism andlet f :B / C be given, where C = U hC, γi. Suppose further that Γp is epi. If f ◦ p isa homomorphism, then so is f .
In particular, if Γ preserves epis (takes regular epis to epis, resp.) and p is an epi(regular epi, resp.) in E, then f is a homomorphism whenever f ◦ p is.

20

1. ALGEBRAS AND COALGEBRASProof. Consider Figure 1. A simple diagram chase confirms thatγ ◦ Γf ◦ Γp = f ◦ β ◦ Γp.
Since Γp is an epi, f is a homomorphism.

ΓA

Γp


Γf

/ / ΓB

α

/ ΓC
γ

β



A





p

/B

f

/C

Figure 1. If f ◦ p is a homomorphism, then so is f .

Corollary 1.2.10. Let i :hB, βi / hC, γi be a coalgebra homomorphism, and let
f : A / B be a map in E, where A = U hA, αi. If Γi is monic and i ◦ f a coalgebra
homomorphism, then f is a coalgebra homomorphism.
In particular, if Γ preserves monos (takes regular monos to monos, resp.) and i
is mono (regular mono, resp.) in E, then f is a homomorphism whenever i ◦ f is.
Proof. By duality.



If Γ preserves epis, then U : E Γ / E reflects strong epis, as can easily be verified.
Lemma 1.2.11 gives the analogous claim for regular epis, which we will use to provethat E Γ has regular epi-mono factorizations given certain conditions on E and Γ (seeTheorem 1.2.13).
Throughout, we will prefer regular epi-mono factorization systems over strong
epi-mono factorization systems, but this is largely a matter of choice. As one can see
in explicitly in [Kur00, Kur99], the basic theorems go through just as easily withstrong epis in the place of regular epis. We stick with the regular epis because of theconnection between coequalizers and sets of equations in Chapter 3. For the sake ofduality, we also stress regular monos in the coalgebraic cases.
Lemma 1.2.11. Let E have kernel pairs and Γ : E
Then/E
U :E Γ

/E

take regular epis to epis.

reflects regular epis.
Proof. Let p : hA, αi
epi in E. Let/ hB, βi be a map in E Γ and suppose that p is a regularhK, κik1k2//hA, αi1.2. STRUCTURAL FEATURES OF E Γ AND EΓ

21

be the kernel pair of p and suppose f :hA, αi / hC, γi coequalizes the kernel pair (seeFigure 2). Since U preserves kernel pairs, p is the coequalizer of k1 and k2 in E. Hence,

Γp

ΓK

Γk1
Γk2

κ

//


/ ΓC

p



k1
k2

Γg

ΓA
α

K

7 7 ΓB//- 3: B



A

f

γ
g

 
/C

Figure 2. U reflects regular epis.
there is a unique map g :B

/ C in E such that g ◦ p = f . Apply Lemma 1.2.9.

The next theorem (about factorizations in E Γ ) proves especially useful, as we willsee. Thus, it is worthwhile to attach a name to the conditions that we assume on
E. That these conditions are part of the definition of regular category suggests thefollowing definition.
Definition 1.2.12. A category C is almost regular if C has kernel pairs andregular epi-mono factorizations (we don’t require that kernel pairs have coequalizers
or that regular epis are stable under pullbacks).
Dually, a category with cokernel pairs and epi-regular mono factorizations is almost co-regular.
Theorem 1.2.13. Let E have be almost regular and let Γ : E / E preserve regular epis. Then E Γ has regular epi-mono factorizations, preserved and reflected by
U :E Γ / E .
Proof. Let f :hA, αi / hB, βi and take the regular epi-mono factorization, f =i◦p, in E (as in Figure 3). Because Γp is regular and hence strong, there is a structure
map γ, as shown making both i and p homomorphisms. Since the forgetful functor
reflects regular epis and monos, we see that i ◦ p is a regular epi-mono factorizationin E Γ , obviously preserved by U .
Since regular epi-mono factorizations are unique up to isomorphism, this is sufficient to conclude that U preserves all regular epi-mono factorizations.

The following definition is found in [Bor94, Volume 2, Chapter 2], where exact
sequences in regular categories are described in detail.

22

1. ALGEBRAS AND COALGEBRAS

ΓA

Γp 

Γi

,2 ΓC

/ ΓB

γ

α



A

 ,2

p

β





C /

/B

i

Figure 3. Regular epi-mono factorization in E Γ .
Definition 1.2.14. A diagram of the form
K

e1
e2

//

A

q

/Q

is an exact sequence if q is the coequalizer of e1 and e2 , and e1 , e2 is the kernel pairof q.
We also call a diagram of the form
E

i

/A

c1
c2

//

D

an exact sequence if i is the equalizer of c1 and c2 and c1 , c2 the cokernel pair of i.
Corollary 1.2.15. Let E be almost regular and let Γ : E / E preserve regular
epis. Then U :E Γ / E preserves and reflects regular epis, monos and exact sequences.
Proof. By Theorem 1.2.13 and uniqueness of regular epi-mono factorizations,
U preserves regular epis and monos.
Because U preserves and reflects kernel pairs and regular epis, and regular epis
are coequalizers of their kernel pairs, U preserves and reflects exact sequences.

Remark 1.2.16. It is important to note that all of these theorems dualize forcategories of coalgebras in an obvious way. Explicitly, if E is almost co-regular andΓ preserves regular monos, then EΓ inherits epi-regular mono factorizations from E.
1.3. Subalgebras
We have a notion of subobject for any category: namely, a subobject of A is anequivalence class of monics with codomain A (see Appendix). This definition applies
to the categories E Γ and EΓ to yield:
A subobject of a Γ-(co)algebra hA, αi is an equivalence class ofmonic homomorphisms
hB, βi // hA, αi .

1.3. SUBALGEBRAS

23

In categories of algebras, we are most interested in those subobjects of hA, αi which
are preserved by U . These can be understood as subobjects of A which are closed
under the algebraic operations.
We postpone the discussion of subcoalgebras until Section 2.2. There, we take theposition that subcoalgebras are best understood as the dual of quotients of algebras.
Consequently, we are interested in regular subobjects of a coalgebra.
Definition 1.3.1. Let hA, αi be a Γ-algebra. A subalgebra of hA, αi is a subobject/ hA, αii :hB, βi /such that U i :B

/ A is a subobject of A (U i is a mono in E).

For each Γ-algebra, there are three related posets. First, there is the poset
SubE Γ (hA, αi). This consists of equivalence classes of monoshB, βi /i/ hA, αiin E Γ . We also have the poset SubE (A) of subobjects of the carrier of hA, αi. Lastly,
we have the poset SubAlg(hA, αi) of subalgebras of hA, αi. This poset has, as objects,
equivalence classes of monoshB, βi /i/ hA, αisuch that U i is mono in E. Evidently,
SubAlg(hA, αi) ⊆ SubE Γ (hA, αi).
In the categories in which we are most interested, this inclusion is an isomorphism.
Theorem 1.3.2. If E is almost regular and Γ preserves regular epis, then
SubAlg(hA, αi) ∼= SubE Γ (hA, αi).
Proof. If Γ preserves regular epis, then U preserves monos (Corollary 1.2.15).

We note that any Set functor Γ preserves regular epis and so
SubAlg(hA, αi) ∼= SubE Γ (hA, αi).
We turn our attention to the relationship between SubAlg(hA, αi) and SubE (A)(hereafter, denoted Sub(A)). In order to determine the structure of the category
SubAlg(hA, αi), we look at the structure of Sub(A). We will show that SubAlg(hA, αi)inherits much of the structure of Sub(A). In order to make this clear, we define afunctor/ Sub(A).
Uα :SubAlg(hA, αi)This functor takes a subalgebra hB, βi to its carrier B as a subobject of A.

24

1. ALGEBRAS AND COALGEBRAS

Remark 1.3.3. The functor Uα is a component of a natural transformation between contravariant functors
U :SubAlg+3 Sub,but we will not make use of this fact.
i

Theorem 1.3.4. The functor Uα is an injection. In particular, for any B / A =U hA, αi, there is at most one structure map β :ΓB / B making i a homomorphism.
Proof. Let hB, βi and hC, γi be subalgebras of hA, αi and suppose
Uα (hB, βi) = Uα (hC, γi).
Then B and C are equal as subobjects of A. Without loss of generality, assume B = C
and let the inclusion be given by i :B / A. By assumption, i is a homomorphism, soi ◦ β = α ◦ Γi = i ◦ γ,
so β = γ.

Theorem 1.3.5. Uα creates meets. Thus, if Sub(A) is a complete lattice, then sois the category SubAlg(hA, αi).
Proof. This follows from the fact that U :E Γ

/ E creates limits (Theorem 1.2.4).


1.3.1. Subalgebras generated by a subset. Let hA, αi be a Γ-algebra and P
a subobject of A (in E). In this section, we discuss the least subalgebra containing
P , which we denote hP iα or just hP i. As we will see, this subalgebra exists under
fairly weak assumptions. We give two constructions of hP i. The first construction(Theorem 1.3.6) requires that SubE (A) is a complete lattice. The second construction
requires that E is almost regular and Γ preserves regular epis. Further, we assume
that the algebraic forgetful functor U : E Γ / E is monadic (equivalently, U has a left
adjoint). See Section 2.1.2 for a discussion of the left adjoint of U .
We understand the functor h−iα in terms of adjointness. Specifically, if each
subobject P of A is contained in a least subalgebra hP iα of hA, αi, then we havean adjoint pair h−iα a Uα (dropping the subscript when convenient). We call thesubalgebra hP iα the subalgebra generated by P .
Theorem 1.3.6. Let hA, αi be a Γ-algebra and suppose that Sub(A) is a complete
lattice (say, if E is complete and well-powered). Then the functor
Uα :SubAlg(hA, αi)/ Sub(A)has a left adjointh−iα :Sub(A)/ SubAlg(hA, αi).

1.3. SUBALGEBRAS

25

Proof. We will explicitly construct h−i. Let i :P / / A be a subobject of A. We
take the intersection of all the subalgebras containing P ,^hP i =
hQ, ρi.
P ⊆Q

The following theorem is an alternate construction of hP i that applies in the
categories in which we are most interested. We also include it because the resulting
construction is very natural: hP i arises as the factorization of/ hA, αi,FP

where F a U . See Section 2.1 for a discussion of such adjoint functors.
Theorem 1.3.7. Suppose E is almost regular, Γ preserves regular epis and thatU has a left adjoint F (i.e., Γ is a varietor, in the sense of [AP01]. Let hA, αi be aΓ-algebra and P be a subobject of A. Then we have an adjoint pair
h−iα

.

⊥

Sub(A) m

SubAlg(hA, αi) .

UαProof. Let ε be the counit of the adjunction F a U . Let i : P / / A be theinclusion of P into A and take the regular epi-mono factorization j ◦ p of εα ◦ F i,
shown in Figure 4.

Fl

6 FQ

Fk


/ FA

FP


hQ, νi8p_hP i /

j

'

εα
k

 
/ hA, αiFigure 4. The construction of hP i as a regular epi-mono factorization.
We first show that P ≤ U hP i. It suffices to show that j ◦ p ◦ ηP = i (see Figure 5).
One calculatesj ◦ p ◦ η P = U εα ◦ U F i ◦ η P= U εα ◦ ηA ◦ i = i.

26

1. ALGEBRAS AND COALGEBRASThe inequality P ≤ U hP i is the unit of the adjunction, of course.
U; F P MM p
MMM
xx
x
!*
xx

ηP

P F#
FF
F
i F#

Uα hP iαA

xqqq
x qq jq

Figure 5. P is contained in U hP i.
Let k : hQ, νi / / hA, αi be a subalgebra of hA, αi and P ≤ Q (with inclusion l).
We wish to show that hP i ≤ hQ, νi. We havek ◦ εν ◦ F l = εα ◦ F k ◦ F l= εα ◦ F j = j ◦ p,
and so, since p is strong, we have the factorization desired.



As we will see, in the dual category EΓ , given a coalgebra hA, αi and a subobject
P ≤ A, the natural construction yields the greatest subcoalgebra contained in P . In
other words, we have a right adjoint to the analogous forgetful functor
Uα :SubCoalg(hA, αi)/ Sub(A).

We discuss this adjoint pair in Section 2.2.
The adjoint pair h−iα a Uα gives rise to a closure operator
Uα h−iα :Sub(A)/ Sub(A)on the subobjects of A. This operator takes a subobject P and closes it under theoperations (structure map) of the algebra. The unit of the monad is the inclusion
P ≤ Uα hP iα .
The multiplication is the identity
Uα hUα hP iα i α = Uα hP iα .
As Theorem 1.3.5 showed, if Sub(A) is complete, then so is SubAlg(hA, αi). General results in order theory tell one how to define joins on SubAlg(hA, αi), but it isworth stating the result explicitly: Given a collection{hBi , βi i}i∈Iof subalgebras of hA, αi, their join is given by__
hBi , βi i = h Bi iα .

1.4. CONGRUENCES

27

1.4. Congruences
We generalize the notions introduced above to binary relations here. It should
be clear that these notions generalize to n-ary relations, but we do not do so explicitly. Binary relations deserve special attention since they arise as the kernels ofhomomorphisms.
Recall that a relation on hA, αi and hB, βi is a triple hhR, ρi, r1 , r2 i wherer1 :hR, ρi/ hA, αi,r2 :hR, ρi/ hB, βi

are jointly monic (see the Appendix for a brief review of relations). This definition
works whether we are speaking of algebras or coalgebras, of course. Again, we will
want to pay particular attention to those relations of E Γ which are preserved by U .
We postpone the discussion of relations in EΓ until Section 2.5, where we introduce
bisimulations.
Definition 1.4.1. Let hA, αi and hB, βi be Γ-algebras. A relation
hhR, ρi, r1 , r2 i
on hA, αi and hB, βi is a pre-congruence if hR, r1 , r2 i is a relation on A and B.
Let PreCong(hA, αi, hB, βi) be the poset of pre-congruences on hA, αi and hB, βi.
We will often abbreviate this category as PreCong(α, β). Again, we relate this category to the related posets of relations, RelE Γ (α, β) and RelE (A, B).
We also often abbreviate the product of two (co)algebras,hA, αi × hB, βi,
as α × β.
Theorem 1.4.2. If E is almost regular, has binary products and Γ preserves
regular epis, then
PreCong(α, β) ∼= RelE Γ (α, β) = SubE (α × β).
Proof. A relation hR, ρi on hA, αi and hB, βi is a subalgebra of the algebrahA, αi × hB, βi. Because U preserves both products and monos, we see that R is a
subobject of A × B and hence a relation in E. Thus, R is a pre-congruence.
In Section 1.3, we defined a forgetful functor taking subalgebras of hA, αi to theircarrier as a subobject of A. We analogously define a forgetful functor hereUα,β :PreCong(α, β)/ Rel(A, B),

taking a pre-congruence hR, ρi to its carrier R as a relation on A and B.

28

1. ALGEBRAS AND COALGEBRASIn fact, Uα,β is justUα×β :SubAlg(α × β)

/ SubE (A × B).

Thus, from Theorems 1.3.4 and 1.3.5, we have the following corollaries.
Corollary 1.4.3. The functor Uα,β is an inclusion of PreCong E Γ (α, β) into
RelE (A, B). In other words, the structure map on an algebraic relation is unique.
Corollary 1.4.4. The functor Uα,β creates meets. Hence, if Rel(A, B) (that is,
Sub(A × B)) is complete, then so is PreCong(α, β) (= SubAlg(α × β)).
Remark 1.4.5. Again, we have a natural transformation (natural in both components) between the contravariant bifunctors
U :PreCong+3 Rel.

The functor
h−iα×β :Sub(A × B)

/ SubAlg(α × β),

if it exists, gives a construction of least pre-congruences. That is, given any relation
R on A and B (any subobject of A×B), hRiα×β is the least pre-congruence on hA, αiand hB, βi containing R (i.e., the least subalgebra of α × β containing R). When weview h−iα×β as a functor/ PreCong(α, β),Rel(A, B)

we will sometimes write h−iα,β . We drop the subscripts entirely if the meaning of
h−i is clear from context.
We are often interested in pre-congruences on an algebra hA, αi by itself — thatis, in the category PreCong(α, α). These pre-congruences can be viewed as sets ofequations (see Remark 1.4.7), which will play a central role in Chapter 3. The
following principle is useful for reasoning about hRiα,α .
Theorem 1.4.6. Let E be finitely complete, and Γ :E / E be given. Let hA, αi bea Γ-algebra and R a relation on A. Let f : hA, αi / hB, βi be a Γ-homomorphism.
Then the following diagram (in E) commutes
(1)

// A

R

f

/B

iff the diagram (in E Γ ) below commutes.
(2)

hRi

// hA, αif/ hB, βi

Proof. If (2) commutes, then the fact that R is contained in U hRi ensures that
(1) commutes.
Suppose, conversely, that (1) commutes and take the kernel pair hK, κi of f inΓ
E . Because the forgetful functor U :E Γ / E creates kernel pairs, K is the kernel pair1.4. CONGRUENCES

29

of f in E, so R is a subrelation of K. Since hRi is the least pre-congruence containing// hA, αi .
R, hRi is contained in hK, κi. Thus, f coequalizes hRiRemark 1.4.7. Let hA, αi and R be given as in the statement of Theorem 1.4.6.
We can view R as a set of equations on A — namely, R corresponds to the set of
equations{r1 (x) = r2 (x) | x ∈ R}.
We say that B satisfies the equations in R under the assignment f if f equalizes r1
and r2 . That is,
B, f |=A R
just in case the diagram
R

// A

f

/B

commutes.
In these terms, we can restate Theorem 1.4.6 as follows: For any homomorphism
f :hA, αi / hB, βi,
B, f |=A R iff hB, βi, f |=hA, αi hRi.
See Chapter 3 for a proper development of equations for categories E Γ .
1.4.1. Exact categories of algebras. Throughout this section, we assume that
E is finitely complete and has regular epi-mono factorizations, so that E is, in particular, “almost regular”. We also assume that Γ :E / E preserves regular epis, so thatE Γ inherits regular epi-mono factorization from E (Theorem 1.2.13).
A congruence is a pre-congruence which is an equivalence relation. Because precongruences are relations in two different categories (both E Γ and E), there is apparent
ambiguity in this definition. We will show that the ambiguity is illusory — a precongruence which is an equivalence relation in E is also an equivalence relation in E Γ ,and vice versa.
Because U :E Γ / E creates limits and regular epi-mono factorizations, one has thefollowing theorem.
Theorem 1.4.8. The forgetful functor Uα,β preserves the following structure of
PreCong(α, β).
(1) For any composable pre-congruences hR, ρi ∈ PreCong(α, β) and hS, σi ∈PreCong(β, γ),
Uα,γ (hS, σi ◦ hR, ρi) = S ◦ R.
(2) For any pre-congruence hR, ρi on hA, αi and hB, βi,
Uβ,α (hR, ρi0 ) = R0
(where R0 is the twist of relation R — see the Appendix).

30

1. ALGEBRAS AND COALGEBRAS(3) For any algebra hA, αi,Uα,α ∆hA, αi = ∆A
(where ∆A is equality on A — see the Appendix).
Proof. 2 and 3 are obvious. For the first, we use the fact that U creates pullbacks and finite regular epi-mono source factorizations. It creates the latter because
it creates regular epi-mono factorizations and products (and because E has finite
products).
Definition 1.4.9. A pre-congruence on hA, αi which is also an equivalence relation is a congruence.
The following corollary shows that it is enough for hR, ρi to be a pre-congruencesuch that R is an equivalence relation (in E).
Corollary 1.4.10. Let hA, αi be a Γ-algebra and let hR, ρi be a pre-congruence.
Then hR, ρi is a congruence iff R is an equivalence relation in E.
Proof. By Theorem 1.4.8 and the fact that Uα,α is full.



The remainder of the section is intended to give an example of reasoning about
algebras in a categorical setting. We present a generalization of a standard theorem inthe study of universal algebras. It states that one can take coequalizers of congruencesin E Γ (i.e., that E Γ is exact — see Definition A.4.4). We will prove that this theorem
holds in a variety of categories and for a variety of functors — namely, it holds in any
exact category if the endofunctor Γ preserves exact sequences. The standard theorem
about algebras over Set is an easy corollary.
Theorem 1.4.11. Let E be an exact category with binary products and Γ : E / E
preserve exact sequences (coequalizers of kernel pairs). The category E Γ is also exact.
Proof. Let p be a regular epi in E. Take the kernel pair of p,
•

// •

p 

,2 •.

Since Γ preserves exact sequences, we see that Γp is again a regular epi, so Γ preserves all regular epis. Hence, U preserves and reflects monos, regular epis and exact
sequences (Theorem 1.2.15 — note that any regular category has regular epi-mono
factorizations [Bor94, Proposition 2.2.1]).
Let// hA, αihR, ρibe an equivalence relation in E Γ . Since
PreCong(hA, αi) ∼= RelE Γ (hA, αi),1.4. CONGRUENCES

31hR, ρi is a congruence, and so R is an equivalence relation in E. Since E is exact and
R is an equivalence relation, R is the kernel pair of a regular epi q, as shown below.
// A

R

q

 ,2

Q

This diagram is an exact sequence (in an exact category, an equivalence relation isalways the kernel pair of its coequalizer), so its image under Γ is again an exact
sequence.
Hence, the top row of the diagram below is a coequalizer.
ΓR

// ΓA

ρ

α



R

//

Γq 

,2 ΓQ
ν



A

q

 ,2



Q

A simple diagram chase shows that there is a unique ν making the right hand squarecommute. Because U reflects regular epis, q is a regular epi in E Γ .
Theorem 1.4.12. Let E be a exact category with binary products and suppose E
satisfies the weak axiom of choice. The category E Γ is also exact.
Proof. It is easy to show that every exact sequence is an absolute coequalizer(see the proof of [Bor94, Volume 2, Theorem 4.3.5], for instance), and so is preservedby every functor.

1.4.2. Least congruence constructions. Given an algebra hA, αi and a relation R on A, one is often interested in the least congruence R containing R. Theseis the least relation on A such that the quotient A/R can be taken in E Γ . In thissection, we will show that, if E is exact with binary products and Γ preserves exact
sequences, then we can define a functor
Rel(A, A)/ Cong(α)(where Cong(α) is the category of congruences on hA, αi) taking a relation to its
least congruence. This material is included just to complete our development ofcongruences. It is a well-known result.
Theorem 1.4.13. Let E be exact, with binary products, and Γ preserve exact
sequences (and, hence, regular epis). Then the inclusion functor
Uα,α :Cong(α)
has a left adjoint.

/ Rel(A, A)

32

1. ALGEBRAS AND COALGEBRASProof. We know from Theorem 1.4.11 that E Γ is exact. We construct a functor
K :PreCong(α, α) / Cong(α), left adjoint to the evident inclusion functor. This construction works in any exact category, just by taking a relation to the kernel pair of
its coequalizer. Now, given a relation R on A and a congruence hS, σi on hA, αi, we
see that
R ≤ S ⇔ hRi ≤ hS, σi ⇔ KhRi ≤ hS, σi.
1.5. Initial algebras and final coalgebras
In categories of algebras and coalgebras, the presence of initial objects and terminal objects, respectively, plays an important role. Initial algebras satisfy the induction
proof principle and definition by recursion, while final coalgebras enjoy the analogous
principles of coinduction and definition by corecursion. In this section, we discussthese principles and the nature of initial algebras and final coalgebras as least andgreatest fixed points, respectively, for the endofunctor Γ.
Recall that in a category C, an initial object A is an object such that, for any/ Y . Dually, a final or terminal object Z
Y ∈ C, there is exactly one arrow A/ Z . Any two initial
has the property that each Y ∈ C has exactly one arrow Y(final) objects are clearly isomorphic. If C is a poset, then an initial object is just ⊥and a final object is just >.
For algebras, the initial algebra is an important object, coming equipped withcertain “proof principles”. However, the final algebra is typically dull. If E has a
final object, 1, then, for any functor Γ, there is a final Γ-algebra, namely h1, !1 i,/ 1 . This is a corollary to the fact that U creates
where !1 is the unique map Γ1limits (Theorem 1.2.4). For Set, for example, this means that the one point algebrais always the final algebra. Dually, if E has an initial object, 0, then h0, !0 i is theinitial coalgebra, where !0 : 0 / Γ0. In Set, then, the empty coalgebra is always theinitial coalgebra (whatever the endofunctor Γ :Set / Set).

1.5.1. Fixed points for a functor. Given a functor Γ :E / E , we can consider
the collection of fixed points of Γ, i.e., those C ∈ E such that ΓC ∼= C. Such
objects can be regarded as both Γ-algebras and Γ-coalgebras. Let Fix(Γ) be the fullsubcategory of E Γ consisting of those algebras for which the structure map is an
isomorphism. Equivalently, we could take the same full subcategory of EΓ , since Γ
algebra homomorphisms between fixed points are Γ coalgebra homomorphisms andvice-versa. Lambek’s lemma [Lam70] states, first, that the initial algebra (final
coalgebra), if it exists, is in Fix(Γ). It easily follows that the initial algebra is also

1.5. INITIAL ALGEBRAS AND FINAL COALGEBRAS

ΓA

Γ!

α

/ Γ2 A

Γα

/ ΓA
α

Γα



A



!

33

/ ΓA



α

/A

Figure 6. Initial algebras are fixed points.
initial in Fix(Γ), and the final coalgebra is final in Fix(Γ) (See Section 1.5.4 for a
discussion of the unique homomorphism between the two).
Lemma 1.5.1 (Lambek’s lemma). If hA, αi is an initial Γ-algebra, then α is an
isomorphism. Dually, the structure map of a final coalgebra is also an isomorphism.
Proof. Because hA, αi is initial, there is a unique homomorphism ! from hA, αito the algebra/ ΓAi.
hΓA, Γα :Γ2 A
In Figure 6, the bottom composite is the identity, by the uniqueness condition for
initiality. Because ! is a Γ-homomorphism, the left hand square commutes. Consequently,! ◦ α = Γα ◦ Γ! = idΓA .
This result brings out a central fact about initial algebras/final coalgebras —namely, they are the same thing as initial fixed points/final fixed points for an
endofunctor. In many cases (though, not all cases), they are in fact least fixed
points/greatest fixed points for the endofunctor in the usual sense. In this respect,
at least, initial algebras should seem familiar objects of study. Languages specified
by a syntax are given as a least fixed point for an endofunctor on Set, for instance.
In particular, the modal language L(AtProp) was described earlier as a least fixed
point. Hence, we may regard this and similar languages as initial algebras for suitablefunctors.
Lambek’s lemma also gives us a negative result regarding initial algebras and final
coalgebras. If a functor has no fixed points, then it has no initial algebra or final
coalgebra. Of course, the power set functor, P :Set / Set, has no fixed points (dueto Cantor’s theorem). Consequently, there is no initial algebra/final coalgebra forthis functor as a functor on Set.
However, there is a closely related functor for which the initial algebra and final
coalgebra both exist and are well known. Consider the category SET of all sets
and classes (without the axiom of foundation). We can extend the functor P to a

34

1. ALGEBRAS AND COALGEBRAS

functor (also denoted P) on this category taking each class to its class of subsets(note: subsets, not subclasses). See [BM96] for details on the extension of set-based
functors to the category SET. The initial algebra for this functor is the class WF
of well-founded sets, with identity as the structure map. The final coalgebra forthis functor is NWF, the category of sets with the anti-foundation axiom, again
with identity as the structure map. For additional reading on fixed points for P, see[BM96], [Acz88] and [Tur96].
For existence theorems for both initial algebras and final coalgebras, see [Bar92].
James Worrell extends this discussion in [Wor00].
1.5.2. Induction and recursion. See also [JR97] for a nice exposition of thismaterial.
The principle of definition by recursion is an explicit application of the property
of initiality. Given any Γ-algebra hB, βi, there is a unique homomorphism from theinitial Γ-algebra hI, ιi to hB, βi (just by definition of initiality). This categoricalproperty leads to familiar principles in application.
Example 1.5.2. For instance, consider the successor functor S :Set / Set taking
a set X to the set X + 1 (the disjoint union of X and {∗}). The initial algebra forthis functor is hN, [s, 0]i, wheres(n) = n + 1,0(∗) = 0.
Indeed, the initial algebra for S in any category with + is called the natural numbers
object (NNO).
To justify this terminology, consider the usual statement of definition by recursion
on N. Namely, given any set A together with an element a ∈ A and a map f :A / A,there is a unique map ! :N / A such that!(0) = a,!(n + 1) = f (!(n)).
(We’ll ignore the apparently stronger statement of definition by recursion with parameters for now.) But, specifying a and f is just the same as specifying a map[f, a] :A + 1/ A.

Also, the equations above exactly require the diagram below
N+1

!+id

/ A+1

[s,0]

[f,a]



N



!

/A

1.5. INITIAL ALGEBRAS AND FINAL COALGEBRAS

35

to commute, i.e., require that ! is an S-homomorphism.
Example 1.5.3. In Example 1.5.2, we showed that the statement that N is an
initial algebra for the successor functor is equivalent to the statement that for eacha ∈ A and f :A / A, there is a unique map ! :N / A such that!(0) = a,!(n + 1) = f (!(n)).
Of course, one usually wants to define more complicated functions recursively. In thisexample, we will show that the statement that N is an initial algebra for S allows therecursive definition of functions with parameters. Specifically, given two functions,g :A/ A, andh :A × A/A

we will show that there exists a unique f :N × A(3)/ A such thatf (0, a) = g(a),(4)

f (s(n), a) = h(f (n, a), a).

Initiality guarantees maps with domain N, so we will define a map fe: N / AA andshow that its transpose is the map f we desire. To define such a fe by recursion,
we must find a structure map α :AA + 1 / AA such that the unique homomorphism/ AA , guaranteed by initiality, is the fe we desire.
N
Let α be defined byα(∗) = g :A

/ A,

α(k) = λa . h(k(a), a)

for all k :A

/ A.

Then, by initiality, there is a unique fe such that
fe(0) = g,fe(n + 1) = λa . h(fe(n)(a), a).

Consequently, the transpose of fe satisfies (3) and (4).
In a similar manner, we can show that there is a unique f :N
f (0, a) = g(a),f (s(n), a) = h(f (n, a), n, a).

/ A such that36

1. ALGEBRAS AND COALGEBRASFor this, we must define a structure map α for (A × N)A so that the unique map fe
making the square below commute
N+1f +id1/ (A × N)A + 1
α

[s,0]





N

/ (A × N)Aαsatisfies the appropriate equations. This is left as an exercise for the reader.
Example 1.5.4. In the category Poset, the natural numbers object (initial algebra for S) is again the algebra hN, [s, 0]i. As a poset, we take the trivial ordering:x ≤ y iff x = y.
The natural numbers with the standard ordering (which we denote ω) is also
an initial algebra in Poset, but for a different functor. Consider the lifting functor−⊥ :Poset / Poset that takes a poset and adjoins a new bottom element. The initial
algebra for this functor is ω. The structure map/ωω⊥
takes ⊥ to 0 and takes each n ∈ ω to s(n).

Example 1.5.5. Example 1.5.2 shows that N is an initial algebra for the polynomial functor S. Here, we examine the general case.
Let P be a polynomial functor and define a signature Σ so that P is the polynomial
functor for Σ, i.e., so thataP(A) =An .
f (n) ∈Σ

Let L(Σ) be the collection of all Σ-terms. Explicitly, L(Σ) is the least set such thatthe following holds:• If f (n) ∈ Σ and τ1 , . . . , τn ∈ L(Σ), then f (n) (τ1 , . . . , τn ) ∈ L(Σ).

Of course, this entails in particular that any constants (that is, zero-ary function
symbols) of Σ are in L(Σ). One should also notice that, if Σ has no constants, thenL(Σ) is empty.
We impose an algebraic structure on L(Σ) in the obvious manner. For each(n)f ∈ Σ, we must define a map
L(Σ)n/ L(Σ) .

Let τ1 , . . . , τn be in L(Σ) and define the interpretation of f (n) to behτ1 , . . . , τn i 7→ f (τ1 , . . . , τn ).
It is routine to check that L(Σ) together with this structure map is an initial Palgebra.

1.5. INITIAL ALGEBRAS AND FINAL COALGEBRAS

37

There is another description of the initial P-algebra. Namely, we consider L(Σ)
as a family of finitely branching, Σ-labeled trees, subject to the condition:• If a node is labeled f (n) , then the node has exactly n children (consequently,
a node labeled with a constant c(0) is a leaf).
We have, then, that L(Σ) is the least collection of trees such that
• For each f (n) ∈ Σ and each τ1 , . . . , τn ∈ L(Σ), the tree with root labeled f (n)and with children τ1 , . . . , τn is in L(Σ).
Again, we stress that, in particular, for each constant c(0) in Σ, the tree consisting of
a node (with no children) labeled c(0) is in L(Σ).
Example 1.5.6. We show now that hZ <ω , [push, ()]i is an initial algebra for ΓA =Z ×A+1 (see Example 1.1.6). Let hA, h∗α , ()α ii be any Γ-algebra. Define a sequenceof maps !n :Z n / A as follows:!0 (()) = ()α ,!n+1 (push(z, σ)) = z∗α !(σ).
S
We take ! :Z <ω / A to be ωi=1 !n . It is easy to see that ! is a Γ-homomorphism andthat it is unique.
The principle of definition by Γ-recursion can thus be stated: For any set A,
element a ∈ A and map f :Z × A / A, there is a unique ! :Z ω / A such that!(()) = a,!(push(z, σ)) = f (z, !(σ)).
We also have a least fixed point definition of Z <ω , arising from the discussion ofSection 1.5.1. Namely, Z <ω is the least collection such that
• () ∈ Z <ω ;• If z ∈ Z and σ ∈ Z <ω , then push(z, σ) ∈ Z <ω .
This description of Z <ω agrees with the description of an initial algebra for a polynomial functor from Example 1.5.5 (allowing that the terms are interpreted as elementsof Z <ω ).
This concludes our discussion of recursion. We now turn to the related property
of induction.
The principle of induction allows one to conclude that a particular property P
holds of all of the elements of an initial algebra if P is closed under the operations of
the algebra. We will show in this section how the principle of induction is a minimality
condition which follows from initiality. We will include some explicit examples of how
the minimality condition leads to a familiar induction principle.

38

1. ALGEBRAS AND COALGEBRAS

Lemma 1.5.7. Let hI, ιi be an initial Γ-algebra. Then any map into hI, ιi is aregular epi.
Proof. Let f :hA, αi / hI, ιi be given and let ! :hI, ιi / hA, αi be the homomorphism guaranteed by initiality. Then, by the uniqueness part of initiality, f ◦! is theidentity, so f is a regular epi.

As one can see, Lemma 1.5.7 is not about initial algebras, per se, but rather istrue of any initial object in any category. The next theorem is an abstract statementof the principle of induction. Again, it is a corollary to a general statement about
initial objects.
Theorem 1.5.8. If hI, ιi is an initial Γ-algebra, then hI, ιi is minimal, i.e.,
SubE Γ (hI, ιi) = {hI, ιi}.
So, in particular, hI, ιi has no proper subalgebras (subobjects preserved by U ).
Proof. Let hP, ρi be a subobject of hI, ιi, with homomorphic inclusion
i :hP, ρi/ hI, ιi.

By Lemma 1.5.7, i is a regular epi and so is an isomorphism.

i

Let hA, αi be an algebra. We say that a subobject P / / A of A is closed under αif there is a structure map/Pρ :ΓPsuch thati :hP, ρi/ hA, αi

is a homomorphism. In other words, P is closed under α just in case
P = Uα hP iα(that is, P is closed under the closure operator Uα h−iα ). The property of minimality
ensures that any predicate closed under α exhausts the entire algebra. It is useful tosee a couple of explicit examples.
We also say that a subobject P closed under α is an inductive predicate.
Remark 1.5.9. The category of all subobjects of A closed under α is isomorphic
to SubAlg(hA, αi), so we aren’t really introducing a new concept here. Instead, we
introduce new language that allows one to see that the principle of induction for
initial algebras is the usual principle of induction for the familiar examples of initial
algebras. When discussing induction, it is conventional to speak of predicates which
are closed under certain operations, rather than to speak of subalgebras. We followthat convention, although there is no practical difference between the two.

1.5. INITIAL ALGEBRAS AND FINAL COALGEBRAS

39

Example 1.5.10. As discussed in previously, hN, [s, 0]i is an initial algebra forthe successor functor S. A subset P of N is closed under [s, 0] just in case there is a
ρ :P + 1 / P making the diagram below commute.
P +1

i+id1

/ N+1

ρ

[s,0]



P



/N

i

This means thati ◦ ρ(∗) = 0,i ◦ ρ(n) = s(n)for each n ∈ P .

In other words, P is a subalgebra of N just in case 0 ∈ P and whenever n ∈ P , alsos(n) ∈ P . From Theorem 1.5.8, we see that if P contains 0 and is closed under s,then P = N. So, Theorem 1.5.8 yields induction on the natural numbers in the usual
sense.
Example 1.5.11. Consider again the initial algebra L(Σ) for a fixed signature Σ(see Example 1.5.5). One can confirm that minimality on L(Σ) entails the following
proof principle: If, for each f (n) ∈ Σ∀τ1 , . . . , τn (Φ(τ1 ) ∧ . . . ∧ Φ(τn )) → Φ(f (τ1 , . . . , τn )),then Φ(τ ) for all τ ∈ Σ. Note that, as usual, if a predicate Φ is closed under function
application, then, in particular, Φ holds for every constant.
Call a tree well-founded if the relation “is a descendant of” is well-founded in theusual sense — that is, if there are no infinite paths in the tree. Then, one can show,
using the above principle of induction, that every element of L(Σ) (viewed as trees— see Example 1.5.5) is well-founded. We omit this proof, since it requires a more
explicit representation of trees than we give here.
Example 1.5.12. Let P ⊆ Z <ω . Then, P is inductive just in case() ∈ P,push(z, σ) ∈ P

if z ∈ Z and σ in P.

If P satisfies these conditions, then P = Z <ω .
Example 1.5.13. As mentioned previously, the class WF of well-founded setswith identity is an initial algebra for the functor P : SET / SET. It is useful tosee what the principal of induction yields for this algebra. A predicate on WF is a
subclass of WF. A predicate Φ is inductive iff whenever Φ(S) for all S ∈ T , then

40

1. ALGEBRAS AND COALGEBRAS

Φ(T ). Thus, induction says, for each predicate Φ,∀T (∀S ∈ T Φ(S) → Φ(T )) → ∀T Φ(T ),where the quantifiers here range over WF. Equivalently, we have, for each Φ,∃T Φ(T ) → ∃T (Φ(T ) ∧ ∀S ∈ T ¬Φ(S)).
In other words, the principle of induction on WF as an initial algebra is the usual
foundation axiom. Put another way, the foundation axiom is equivalent to the assumption that the class of all sets is an initial algebra for P (although here, we’ve
only shown one implication — see [Tur96] for the other).
It is worth mentioning that the property of minimality isn’t unique to initial
algebras. On the contrary, any algebra which is a quotient of the initial algebra isalso minimal, and so satisfies an inductive proof principle. Conceptually, if hA, αi
is a quotient of the initial algebra, then each element of A can be picked out by aterm (not necessarily uniquely). So, if the atomic elements (the interpretations ofconstants) satisfy a predicate and if the predicate is closed under term formation,then all of A satisfies the predicate.
Theorem 1.5.14. Let E be almost regular and Γ preserve regular epis and suppose that E Γ has an initial object hI, ιi. An algebra hA, αi is minimal iff the map! :hI, ιi / hA, αi is a regular epi.
Proof. Suppose hA, αi is minimal. Take the regular epi-mono factorization! = i ◦ p. Then i is an isomorphism and so ! is a regular epi.
On the other hand, suppose that
! :hI, ιi ,2hA, αiis a regular epi and
i :hP, ρi // hA, αi

is a mono. Then i◦!ρ =!α , so i is a regular epi and hence an isomorphism.

Corollary 1.5.15. Let E, Γ be as in Theorem 1.5.14. If hA, αi is minimal, thenα is a regular epi.
Proof. Since α ◦ Γ! =! ◦ ι and the right hand side is the composite of two regularepis (ι is an isomorphism), α is a regular epi.
Remark 1.5.16. The converse of Corollary 1.5.15 does not generally hold. Thatis, if α is a regular epi, then hA, αi need not be minimal. Let hF, φi be the final
Γ-coalgebra. Then hF, φ−1 i is a Γ-algebra in which the structure map is a regular epi.
Typically, however, hF, φ−1 i is not minimal. Indeed, it is common that the initial
algebra is a proper subalgebra of hF, φ−1 i.

1.5. INITIAL ALGEBRAS AND FINAL COALGEBRAS

41

1.5.3. Corecursion and coinduction. Dually, the unique homomorphism into
the final coalgebra is said to be defined by corecursion. Definition by corecursion
resembles a kind of “baseless recursion”. However, it is important to keep in mind
that corecursion gives a map into, not out of, the final coalgebra.
Example 1.5.17. In Example 1.5.2, we showed that N forms an initial algebra
for S. We can also describe the final coalgebra for the successor functor S. Take N
and adjoin a point ∞. Call this set N. Define a S-coalgebra structure p : N / N + 1
on N by∗ if x = 0p(x) = n if x = n + 1∞ if x = ∞.
The intuition here is that p is the predecessor function, taking ∞ to itself, n + 1 ton and 0 to the “error condition”, ∗.
If hA, αi is any S-coalgebra, then we define ! :A / N by(
µn . αn (a) = ∗ if this is defined!(a) =∞else
The proof that ! is a coalgebra homomorphism and that it is unique is left to thereader. It is worth noting that N is not the greatest fixed point for S (under inclusion).
Of course, S doesn’t have a greatest fixed point, since any infinite set is a fixed point.
Example 1.5.18. Just as ω is an initial algebra for the lifting functor−⊥ :Poset/ Poset,ω + 1 is the final coalgebra for ⊥. Similarly, the set N is the final coalgebra for S.
Example 1.5.19. In Example 1.1.7, we claimed that coalgebras for the functor
ΓA = Z × A could be regarded as collections of infinite streams over Z. Here, we will
make precise what we meant by that claim. We first take the collection of Z-streams,
Z ω , and impose a coalgebraic structure on it. Specifically, we consider the coalgebrahZ ω , hh, tii, whereh(σ :ω

/ Z ) = σ(0),t(σ :ω

/ Z ) = λn . σ(n + 1).

Let hA, hhα , tα ii be a Γ-coalgebra. We define a mapping,
! :A

/Zω ,

as in Example 1.1.7, by
a 7→ λn . hα ◦ tnα (a).

42

1. ALGEBRAS AND COALGEBRASThen one can easily confirm that ! is a homomorphism. Furthermore, any map
f :A / Z ω satisfying
hα (a) = h(f (a)),
f (tα (a)) = t(f (a)).
must agree with !.
The principle of definition by Γ-corecursion can be stated thus: Given any set A
and any pair of maps,

there is exactly one map ! :A

j :A

/Z ,

k :A

/ A,

/ Z ω such that, for all a ∈ A,

j(a) = h(!(a)),!(k(a)) = t(!(a)).

Remark 1.5.20. We have not discussed the initial algebra for A 7→ Z × A. Thereis good reason for this: it is trivial. That is, the initial algebra for this functor is justthe algebrah0, Z × 0  ,2  ,2 0 i.
Example 1.5.21. In Example 1.5.19, we made precise the claim that each coalgebra for A 7→ Z × A could be considered a collection of streams over Z, as mentioned
in Example 1.1.7. In this example, we will clarify the claim of Example 1.1.8, thatevery coalgebra for the functor ΓA = Z × A + 1 can be regarded as a collectionof (finite and infinite) streams over Z. In particular, we will impose a coalgebraic
structure on Z ≤ω and prove that the resulting coalgebra is final.
We define ζ :Z ≤ω / Z × Z ≤ω + 1 by(∗if σ ∈ Z 0 (i.e., σ = () :∅ / Z )ζ(σ) =
hσ(0), λn . σ(n + 1)i else
Notice that, if σ ∈ Z ω , then λn . σ(n + 1) ∈ Z ω , but if σ ∈ Z n+1 , then λn . σ(n + 1) ∈Z n . In other words, if σ ∈ Z ω , then the “tail” of σ is again in Z ω , while if σ ∈ Z n+1 ,then the tail of σ is in Z n .
Let hA, αi be any Γ-coalgebra. We define hα and tα as π1 ◦ α and π2 ◦ α, whenthese are defined. We define a map ! :A / Z ≤ω by(()
if α(a) = ∗!(a) =nλn . hα ◦ tα (a) else.

1.5. INITIAL ALGEBRAS AND FINAL COALGEBRAS

43

Notice that, in the second case, the resulting function may be defined only for certain
n. More precisely, !(a) may as a function whose domain is an initial segment of ω,i.e., an element of Z n for some n.
We omit the details of confirming that ! is a homomorphism and that it is unique.
Example 1.5.22. Let P be a polynomial functor,aP(A) =Zi A ii<ω

on the category Set. From Example 1.5.11, we saw that the initial algebra for P
can be viewed as a collection of well-founded labeled trees. The final coalgebra cansimilarly be viewed as the collection of all labeled trees (well-founded or not) withthe same branching behavior as the initial algebra. To make this description precise,
one needs a model of this collection of trees. While such a model can be described
as a collection of sets of finite sequences, representing paths through the tree, closed
under appropriate conditions, the details of such a description are more technicalthan illuminating and will be skipped here.
Alternatively, one could use Aczel’s non-well-founded set theory to describe thefinal coalgebra as the (necessarily unique) set T such that
T = P(T ),and use the identity as the structure map, an approach made popular by [BM96].
The dual of the principle of induction for initial algebras is that final coalgebras
are coalgebra!simple, i.e., that they have no proper quotients. This property is best
expressed as a property about the relations on final coalgebras.
Remark 1.5.23. In fact, final coalgebras satisfy a stronger condition. If hA, αi
is a final Γ homomorphism andp :hA, αi/ / hB, βi

is any (not necessarily regular) epi, then p is an isomorphism. We find that thecondition of simplicity suffices for most of our purposes, however, and use it instead.
Just as any quotient of a minimal algebra is again minimal, any subcoalgebraof a simple coalgebra is again simple. Furthermore, if there is a final Γ-coalgebra
hF, φi, then any simple coalgebra is a (regular) subobject of hF, φi, as the following
corollary shows. Hence, a coalgebra hA, αisatisfies the principle of coinduction iffhA, αiis simple iff hA, αiis an open object of EΓ , in the sense of [LM92, Chapter
IV.6].

44

1. ALGEBRAS AND COALGEBRASCorollary 1.5.24. Let E be almost co-regular factorizations and Γ preserve regular monos and let hF, φi be the final Γ-coalgebra. A coalgebra hA, αi is simple iff! :hA, αi / hF, φi is a regular mono.
Proof. This is the dual of Theorem 1.5.14.



Typically, we view coinduction as a proof principle that says, if two elements ofa simple coalgebra are related by a coalgebraic relation, then they are equal. This
next theorem is a step to that proof principle, which we return to in Section 2.6.
Theorem 1.5.25. Let E have all coequalizers. The following are equivalent:(1) hA, αi is simple.
(2) For any coalgebra hB, βi, there is at most one map
hB, βi/ hA, αi .

(3) (If E has kernel pairs of coequalizers and Γ preserves weak pullbacks) theequality relation ∆hA, αi is the largest relation on hA, αi, i.e., the maximal
element of RelEΓ (hA, αi, hA, αi).
Proof. We prove that (1) and (2) are equivalent and that they imply (3). Then,
we assume that Γ preserves weak pullbacks and prove that (3) implies (1).
(1) ⇒ (2): Let f, g : hB, βi / hA, αi be given and take the coequalizer of f
and g (since EΓ has all coequalizers). This coequalizer is again hA, αi, andso f = g.
(2) ⇒ (1): Letb1hB, βiq// hA, αi

b2

 ,2

hQ, νibe a coequalizer diagram. Then b1 = b2 , so hQ, νi ∼= hA, αi.
(2) ⇒ (3): Let hR, ρi be a relation on hA, αi, with projections r1 and r2 .
Then, r1 = r2 , and so we have the factorization shown below.
hR, ρir1 =r2

1

-

r1

id

''

r2

∆hA, αihA, αiwwid(3) ⇒ (1): Let q :hA, αi  2, hQ, νi be a regular epi, and take the kernel pair of
q in E,
K

k1
k2

// A

q

 ,2

Q.

Because Γ preserves weak pullbacks, there is a structure map for K,κ :K/ ΓK ,

1.5. INITIAL ALGEBRAS AND FINAL COALGEBRAS

45

making k1 and k2 homomorphisms. Because U reflects jointly monic families,hK, κi is a relation on hA, αi, with projections k1 and k2 . Since ∆hA, αi isthe largest relation, the following diagram commutes.
1hK, κik2

k1∆hA, αi

id

((

id

v

Av

Hence, k1 = k2 and so, since every coequalizer is the coequalizer of its kernel
pair, hQ, νi ∼= hA, αi.
Definition 1.5.26. We say that a coalgebra hA, αi satisfies the principle of coinduction if ∆hA, αi is the largest relation on hA, αi.
Corollary 1.5.27. Any simple coalgebra satisfies the principle of coinduction. If
E has kernel pairs of coequalizers and Γ preserves weak pullbacks, then any coalgebra
satisfying the principle of coinduction is simple.
We will return to the topic of coinduction in Section 2.6, where we will show how
it leads to a proof principle for simple coalgebras.
1.5.4. The comparison map. Let Γ :E / E be given and suppose that E Γ has
an initial object, hI, ιi, and EΓ a final object, hF, φi. From Lambek’s lemma, we knowthat the structure map ι is an isomorphism and the same holds for φ. Consequently,
we can view the initial algebra as a coalgebra, namely, the coalgebra hI, ι−1 i. By
finality, there is a unique map ! from hI, ι−1 i to hF, φi. That is, there is a unique
map ! in E such that the diagram below commutes.
(5)

Γ!

ΓIO

/ ΓF
O
φ

ι−1

I

/F

!

On the other hand, we can view the final coalgebra as an algebra, hF, φ−1 i. As
such, there is a unique homomorphism from the initial algebra hI, ιi to hF, φ−1 i. It
is easy to see that this is simply two descriptions of the same map. The map ! in (5)clearly makes the diagram (6), below, commute.
(6)

ΓI

Γ!

/ ΓF
φ−1

ι



I



!

/F

46

1. ALGEBRAS AND COALGEBRASIn fact, the map ! is just the unique map from the initial object to the final
object in the category Fix(Γ). The point is that this map is a homomorphism in both
relevant senses.
In the examples that we’ve seen thus far, this comparison map ! is precisely what
one expects: it is an inclusion of the initial algebra into the final coalgebra. For
instance, the initial algebra for the functor ΓA = Z × A + 1 for a fixed X is thecollection of finite streams over Z.
In [Bar93], Michael Barr shows that the initial algebra is often a dense subspace ofthe final coalgebra (under a natural topology), with the comparison map an inclusion.
In [Adá01], Jiřı́ Adámek extends these results.

CHAPTER 2

Constructions arising from a (co)monadIn this chapter, we focus on categories of (co)algebras which come with a left
(right, resp.) adjoint to the forgetful functor. These categories are equivalent to categories of (co)algebras for a (co)monad, a stricter notion that categories of (co)algebras
for an endofunctor. We begin the chapter with a review of (co)monads and their(co)algebras.
Following this, we introduce subcoalgebras. We view subcoalgebras as dual toquotients of algebras, and so take a subcoalgebra to be a regular subobject of thecoalgebra. Theorems about subcoalgebras, then, are dual to theorems about quotientsof algebras, or, equivalently when E is exact, theorems about congruences.
Given a Γ-coalgebra hA, αi, we introduce a modal operator  on Sub(A), taking
a subobject P ≤ A to the largest subcoalgebra hB, βi such that B ≤ P . We showthat  is an S4 modal operator. Furthermore, we discuss a left adjoint C taking P
to the least subcoalgebra containing P . This closure operator exists if Γ preserves
non-empty intersections.
We revisit the topic of limits in categories of coalgebras (and colimits in categoriesof algebras) and show that we may construct all limits (colimits, resp.) if the forgetful
functor is comonadic (monadic, resp.). However, these constructed limits are nottypically preserved by U .
We close the chapter by introducing the definition of bisimulations, which we taketo be the image of a coalgebraic relation. This definition differs from the familiar
definition in many texts, but we take our definition to be a reasonable expansion of
the term for settings in which the axiom of choice is unavailable. We show, in fact,that the definition offered here coincides with the more traditional definition, given
choice, and so feel that this generalization is suitable.
We discuss coinduction in terms of the introduced notion of bisimulation and also
briefly generalize to n-simulations, to facilitate the development of the internal logic
in Chapter 4.
2.1. (Co)monads and (co)algebras
A central notion in the study of universal algebras is the concept of a free algebra.
Such algebras can be viewed as term algebras over a set of variables. Hence, from free47

48

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

algebras, one comes to a notion of equation (a pair of elements of the free algebra)
and the definition of equation satisfaction. Categorically, such free algebras are easily
understood in terms of adjoint functors. In particular, as we will see in Section 2.1.2,
an algebra hA, αi is free over X if hA, αi ∼= F X, where F is the left adjoint to theforgetful functor.
Such adjoint functors give rise to monads in a natural way, which we discuss in
the Appendix. One may ask whether every monad comes from a pair of adjoint
functors. In fact, this is the case. Moreover, starting with a monad T , one canshow that there are (at least) two methods of constructing an adjoint pair of functorsthat give rise to T . One method, the Kleisli construction, will not concern us muchin what follows. Instead, we will focus on the Eilenberg-Moore construction. This
construction considers the category of algebras for a monad T and shows that thiscategory comes with a pair of adjoint functors F a U such that T = U F .
We begin by going into some detail on the definition of the category of algebras
for a monad and sketch the proof of the Eilenberg-Moore theorem. This naturally
leads into a discussion of (co)free (co)algebras in Section 2.1.2.
2.1.1. (Co)algebras for a (co)monad. In this section, we will define algebras
for a monad and state the Eilenberg-Moore theorem. This theorem says that every
monad arises as the monad for an adjunction. Moreover, every monad T = hT, η, µi
arises as the monad for an adjunction F a U where U is the forgetful functor for the
category of T-algebras. Here, however, we mean algebras for the monad T. This is
not the same as algebras for the endofunctor T — it is a narrower definition.
See Section A.5 for a brief review of monads.
In Section 2.1.2, we will discuss the situation in which the category of Γ algebras
for an endofunctor Γ is equivalent to a category of algebras for a monad.
Definition 2.1.1. Let T = hT, η, µi be a monad over E. A T-algebra is analgebra hA, αi for the endofunctor T such that the following diagrams commute.
T 2A

µA

/ TA
α

Tα





TA

α

/A

ηA

/ TA
BBBB
BBBB
BBBB α
B 

A BBB

A

We refer to the commutativity of these diagrams as the associativity and unit conditions for T-algebras. A T-homomorphism is just a T -homomorphism in the senseof homomorphisms between algebras for an endofunctor (Definition 1.1.1). That is,a T-homomorphism
f :hA, αi/ hB, βi2.1. (CO)MONADS AND (CO)ALGEBRAS

49/ B in E such that the diagram below commutes.

is a map f :A

Tf

TA

/ TB

α

β





A

f

/B



The T-algebras and their homomorphisms form a full subcategory of the C T , thecategory of algebras for the endofunctor T . We denote this category as C (note thedifferent font for the endofunctor T and the monad T = hT, η, µi).
Theorems 1.2.4, 1.2.7 and 1.2.13 hold in categories of coalgebras for a monadas well. That is, the forgetful functor creates limits, creates whatever colimits T
preserves and E inherits the regular epi-mono factorizations from an almost regular
E if T also preserves regular epis. The first two facts can be found in [Bor94, Volume
2]. That E has regular epi-mono factorizations is easily verified. In fact, E is closed
under quotients and subalgebras as a subcategory of E T — indeed, it is a variety ofE T (see Section 3.2.1).
Dually, we define a G-coalgebra for a comonad G. This definition is a straightforward exercise in turning the arrows around in Definition 2.1.1, but we include it
for reference.







Definition 2.1.2. Let G = hG, ε, δi be a comonad over E. A G-coalgebra is a
G-coalgebra hA, αi such that the following diagrams commute.
G2O A oδAGAOA Bo BB

α

Gα

GA o

α

A

εA

GA

O
BBBB
BBBB
BBBB αBA

A G-homomorphism is just a G-homomorphism between G-coalgebras. The categoryof G-coalgebras and their homomorphisms is denoted E . It is a full subcategory of
the category EG (indeed, a covariety).
The theorem below originally appeared in [EM65]. It can be found in any basic
category theory text, including [Bor94, Volume 2] and [BW85]. We take it fromthe latter.



Theorem 2.1.3 (Eilenberg-Moore theorem). Let T = hT, η, µi be a monad over
/ E be the evident forgetful functor. Then there is a functor F :E / E
E and let U :E
such that F a U and T is the monad associated with the adjunction F a U .
Proof. We define F :E

/E

 on objects C ∈ E by

F C = hT C, µC :T 2 C/ T C i.

50

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

One must check that F C is a T-algebra, i.e., that it satisfies the associativity andunit conditions for T-algebras. This follows just from the associativity and (one ofthe) unit conditions for the monad T itself.
Let C ∈ E and hA, αi ∈ E . One must show

Hom(E, C)A ∼= Hom(E , F C)hA, αi.
The isomorphism takes a map f :C

/ A toα ◦ T f :F C

/ hA, αi.

The inverse takes a homomorphism g :F C

/ hA, αi tog ◦ ηC :C/ A.

Clearly, we have that T = U F , as desired. One must check that the unit of the
adjunction F a U is η, the unit of T, and that the multiplication µ of T, is given by
U εF , where ε is the counit of the adjunction. This is easy.
It is worth noting that the counit of the adjunction arises naturally enough: If
hA, αi is a T-algebra, then εhA, αi = α.
So, given any monad T, we can “factor” T into an adjoint pair via the EilenbergMoore construction. This factorization is not unique, however. Indeed, every monadhas at least one other factorization: the factorization given by Kleisli in [Kle65].
However, the Eilenberg-Moore factorization is distinguished: It is final among all
such factorizations1. We state the theorem more precisely here, but it will not playa significant role in this thesis.
Theorem 2.1.4. Let T = hT, η, µi and
L

Dj

⊥

*

E

R

be given such that
• T =R◦L• The unit of the adjunction L a R is η, the unit of the monad.
• The multiplication of the monad, µ, is equal to RεL , where ε is the counit of
the adjunction R ◦ L.
1The Kleisli construction is initial among all such factorizations. See [Bor94, Volume 2] or[BW85].

Then, there is a unique J :D / E such that the following diagram commutes.
+ 
DfE
2.1. (CO)MONADS AND (CO)ALGEBRAS

51

J

R

F

U

L

'

E



F

The Eilenberg-Moore construction dualizes in a natural way. Given a comonadG = hG, ε, δi over E, the forgetful functor
U :E

/E

H :E

/E

has a right adjoint,,

such that the comonad G is induced by the adjunction U a H. The functor H takes
an object C ∈ E to the coalgebra hGC, δC i.
2.1.2. Free algebras. A basic notion in the theory of universal algebras is thatof the free algebra over a set of variables. Let Σ be a signature and X a set ofvariables. The free Σ-algebra over X, denoted F X, can be described informally as
the collection of all terms that can be constructed from the variables of X using thefunction symbols of Σ. This informal description can be stated more precisely interms of least fixed points, but we do not take these descriptions to be the definitionof a free algebra over X. Instead, the property of freeness is defined in terms ofhomomorphic extensions of maps.
Specifically, the property of freeness says: for every Σ-algebra hA, αi and every
assignment σ of the variables of X to the carrier A, there is a unique homomorphismσe :F X / hA, αi extending the assignment σ. An assignment of the variables of X to
A is just a map σ :X / A. Thus, the defining property of F X can be stated: there
is a map
/UF X
ηX :X
(called the insertion of generators) such that, for every
σ :X

/ A,

there is a unique/ hA, αiσe :F X

making the following diagram commutes:U; F X
xx
x
xx
σ
xx

xx
/A
X
ηX

σ

52

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

This condition should look familiar. If, for every X ∈ Set, there is a free algebra
over X, then the operator F taking each X to its free algebra extends to a functor
which is left adjoint to the forgetful functor U .
This allows us to state quite abstractly what it means for a Γ-algebra to be a freealgebra over some object X. Namely, hK, κi is free over X just in case there is aleft adjoint F :E / E Γ to the forgetful functor U and hK, κi ∼= F X. Notice that an
initial Γ-algebra is free over the initial object of E, if it exists.
The universal mapping property of the free algebra gives another description of
it. Let F X = hK, κi be the free Γ-algebra over X. We have a pair of maps, then,
ηX

X

κ

/K o

ΓK ,

and so we can consider the X + Γ-coalgebra, hK, [ηX , κ]i.
By the adjunction F a U , we have, for all Γ-algebras hA, αi and maps σ :X / A,there is a unique Γ-homomorphism σe such that σe ◦ηX = σ. Any such Γ-algebra hA, αiand assignment σ corresponds to an X + Γ-algebra, namely hA, [σ, α]i. Furthermore,by the conditions of the adjunction, the diagram below, commutes.

>KηX }}}
}
σ
}}
}}

/Ao
X

o

σ

κ

ΓK



Γσ



α

ΓA

But, this is exactly the condition needed to show that σ
e is an X + Γ-homomorphism,i.e., that the following diagram commutes.
X + ΓK[ηX ,κ]K

/

idX +ΓσσX + ΓA

[σ,α]



/A

Thus, we see that hK, κi satisfies the following condition: For every X + Γ-algebra/ hA, [σ, α]i . In
hA, [σ, α]i, there is a unique X + Γ-homomorphism hK, [ηX , κ]iother words, hK, [ηX , κ]i is the initial X + Γ-algebra.
This observation leads to an alternative definition of free algebra over X, one that
does not require that every object of E has a free algebra. Namely, we say that hK, κi
is a free Γ-algebra over X just in case there is a map f :X / K such that hK, [f, κ]iis an initial X + Γ algebra. We have, then, the following fact:
Theorem 2.1.5. Let E have binary coproducts, Γ :E / E be given and U :E Γ / E
be the forgetful functor. Then U has a left adjoint F iff, for each X ∈ E, the initial
X + Γ-algebra exists.
As an immediate corollary, we have

2.1. (CO)MONADS AND (CO)ALGEBRAS

53Corollary 2.1.6. Let Γ :E / E be given and let F :E / E Γ be the left adjoint to
the forgetful functor U : E Γ / E , with η the unit of the adjunction. Then, for every
X ∈ E,[ηX , κ] :X + ΓU F X
is an isomorphism, where κ :ΓU F X(so F X = hU F X, κi).

/UF X

/ U F X is the structure map of the algebra F X

Proof. Lambek’s lemma (Lemma 1.5.1).

Thus, the existence of a free functor F depends on whether an initial X +Γ-algebra
exists for every X ∈ E. So, one can use existence theorems for initial algebras toprove that U has a left adjoint. For instance, if Γ is co-continuous, then, for every
X, the functor X + Γ is also co-continuous and so has an initial algebra (from a wellknown fixed point theorem, generalized in [Bar92]). For the most part, we will not
be concerned here with the question of the existence of a functor F , any more than
we are concerned with the existence theorems for initial algebras and final coalgebras.
We can apply the results of Section 1.5.2 to free algebras. Since a free Γ-algebra
over X is an initial X + Γ-algebra, it comes with the proof principles common to all
initial algebras: induction and recursion. We have seen the principle of recursion. It
is the principle that, for every Γ-algebra hA, αi and every map σ : X / A, there isa unique homomorphism σ
e :F X / hA, αi extending σ. This gives a nice descriptionof ε, the counit of the adjunction F a U , namely, εhX, ξi is the extension of theassignment idX :X / X .
The principle of induction for free algebras should be familiar as well. This principle commonly occurs in proof theory, for instance — it is the principle of structural
induction for terms. After all, the term algebras for a language are just P-algebras
for some polynomial functor P. If P is a polynomial, then X + P is also a polynomial.
Thus, structural induction for terms over a set of variables is just a special case of
Example 1.5.11.
Induction for free algebras for other functors is similar. It states that, for each
property P , if P holds of the elements of X, and if P is preserved under “termformation” (whatever that means for the functor at hand), then P holds for all of
F X.
Example 2.1.7. Consider the Set-functor ΓA = Z × A + 1, from Example 1.1.6.
The forgetful functor U : SetΓ / Set has a left adjoint, F :Set / SetΓ . The functor F
takes a set X to the initial X + Z × − + 1 algebra. We can understand this object as
the initial algebra for a polynomial functor. Hence, we can think of it as a collectionof terms for a signature (Example 1.1.5). The signature includes a constant for each

54

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

x ∈ X and also a constant ∗ for the unique element of 1. Also, for each z ∈ Z, we
have a unary function symbol z (1) . Thus, the free Γ-algebras are easily understood.
But, this characterization isn’t very useful for the interpretation of SetΓ we’vechosen. We’ve said that the initial algebra for SetΓ is the collection of finite streams
over Z, denoted Z <ω . So, we would like to describe the free algebras in these terms
as well. Of course, the initial algebra itself is a free algebra — it is the free algebra
over the empty set, F 0. So, we also want our description of free algebras to coincidewith our description of the initial algebra.
Let X ∈ Set. We consider the elements of U F X as finite streams over Z again,
with one important difference. In the initial Γ-algebra, there is a single object that
represents an empty stream, which we denote (). In the Γ-algebra F X, there aremany “empty streams”. In addition to (), we have an empty stream for each x ∈ X.
Let
/UF X
[pushX , ()X ] :Z × U F X + 1
be the structure map for F X and η the unit of the adjunction F a U . The map[ηX , ()] :X + 1/UF X

picks out these empty streams, while the map pushX constructs a new stream froman element of Z together with an element of U F X.
More concretely, the free Γ-algebra over X is given by
U F X = (X + 1) × Z <ω .
The X + 1 component denotes the “type” of the end of the stream. The structure
map
/UF X
[pushX , ()X ] :Z × U F X + 1
is defined by()X = h∗, ()i,pushX (z, ha, σi) = ha, push(z, σ)i,where z ∈ Z, a ∈ X + 1 and σ ∈ Z <ω . The functions () and push here were definedfor the initial algebra
hZ <ω , [push, ()]iin Example 1.5.6.
2.1.3. Monadicity. We now return to the topic of algebras for a monad andshow how it relates to free algebras for an endofunctor: Specifically, if the forgetful
functor U :E Γ / E has a left adjoint F , then E Γ is isomorphic to E , where T is thetriple induced by the adjunction F a U . Moreover, the isomorphism commutes withthe respective forgetful functors. Thus, U is monadic in the sense below.

2.1. (CO)MONADS AND (CO)ALGEBRAS

55

Definition 2.1.8. Let G :C / D be given. We say that G is monadic if there isa monad T on D and an equivalence of categories J :C / D such that the following
diagram commutes.
J

,

C
G

&

D



U

w

D
The functor U , above, is the forgetful functor for the category of algebras for themonad T.
One can learn about monadic functors in the standard category theory texts. Thisdefinition and Theorem 2.1.10, below, come from [Bor94, Volume 2]. They can also
be found in [BW85]. Before stating Beck’s theorem, we must have a definition, also
from [Bor94, Volume 2].
Definition 2.1.9. A diagram of the form
f

A

t

a1
a2

g

44 B t4Qq

is a split coequalizer if the following hold:q ◦ a1 = q ◦ a 2
q ◦ g = idQ
a1 ◦ f = idB
a2 ◦ f = g ◦ q
It is easy to check that split coequalizers are indeed coequalizers and moreover
are absolute (preserved by every functor). Split coequalizers naturally arise in thecontext of algebras for an monad T = hT, η, µi since, for any T-coalgebra hA, αi, thediagram below is a split coequalizer.
T 2A

r

ηT A
µA
Tα

22 T A

r

ηA

3Q

α

It is this fact which is crucial in the characterization of monadic functors, first due
to J. M. Beck [Bec67].
Theorem 2.1.10 (Beck’s theorem). Let G : D
equivalent.
(1) G is monadic.
(2) (a) G has a left adjoint.
(b) G reflects isomorphisms.

/C

be given. The following are

56

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD(c) For any pair
f

A

g

// B

such that Gf and Gg have a split coequalizer in C, f and g have acoequalizer in D which is preserved by G.
/ E be given. The forgetful functor U : E Γ

Corollary 2.1.11. Let Γ : E
a left adjoint iff U is monadic.

/ E has

Proof. Let Γ be given. Because U is faithful, it reflects isomorphisms. If homomorphisms f, g :hA, αi / hB, βi have a split coequalizer in E, then Γ preserves the
split coequalizer (since it is an absolute coequalizer). Hence, U reflects and preserves
the split coequalizer. Thus, applying Theorem 2.1.10 completes the proof.

In [AP01], a functor Γ is called a varietor if the forgetful functor U : E Γ / E ismonadic.
We can strengthen the results of this corollary. First, we put the corollary inthe context of results from Section 2.1.2. Let Γ : E / E be given and suppose thatU : E Γ / E has a left adjoint F : E / E Γ . Let T = hT = U F, η, U εF i be the monad
induced by the adjunction F a U , and let
F

Ej



⊥
U



+

E





be the adjoint functors given in the Eilenberg-Moore theorem (Theorem 2.1.3). One
can show that there is an isomorphism (rather than a mere equivalence) E Γ ∼= Ethat commutes with the forgetful functors.
A nice presentation of this fact is given in Daniele Turi’s dissertation [Tur96].
The reader should look there for the details, but it is worth describing the action of
J and its inverse. We map a Γ-algebra,
hA, α :ΓA

/ Ai,

to the T-algebra
hA, U εα :T A

/ Ai.

On the other hand, suppose we start with a T-algebra,
hC, γ :T C

/ C i.

Recall that we have an isomorphism C + ΓT C  ,2  ,2 T C (Corollary 2.1.6). The left
component C / T C is the unit of the monad (and of the adjunction F a U ). Callthe right component θC . Then, we map hC, γi to the Γ-algebra with structure map
ΓCΓηC/ ΓT C θC / T C

γ/C

2.1. (CO)MONADS AND (CO)ALGEBRAS

57

We omit the proof that these operators extend to functors that are inverses of eachother.
This concludes our discussion of free algebras and the associated category ofalgebras for a monad. We have covered this well-traveled ground in order to consider
the dual case. In Section 2.1.4, we will put the algebraic theorems to work in orderto learn about cofree coalgebras.

2.1.4. Cofree coalgebras. An early discussion of cofree coalgebras occurs in[Rut96]. There, Rutten gives the now familiar discussion of cofreeness in terms ofcolorings. This interpretation of cofreeness arises naturally from dualizing the workin Section 2.1.2. We follow this approach.
Previously, we saw that a Γ-algebra hA, αi is free over X just in case there is amap ηX :X / A such that hA, [ηX , α]i is the initial X + Γ-algebra. We dualize thisobservation to define cofreeness.
Definition 2.1.12. Let Γ : E / E be given and let C be an object of E. A Γcoalgebra hA, αi is cofree over C just in case there is a map εC :A / C such that theC × Γ-coalgebra hA, hεC , αii is final (in the category EC×Γ ).
Let hA, αi be cofree over C and let hB, βi be a Γ-coalgebra. Then, for any
p : B / C , we have a C × Γ-coalgebra, namely, hB, hp, βii. Thus, there is a unique
map f :B / A such that the diagram below commutes.
AO
εC ~~~
f
~~
~~
Co
B
β

α

/ ΓA
O
Γf

p

/ ΓB.

We understood free algebras over X by considering X to be a set of variables.
The free algebra over X, then, was the collection of Γ-terms over a set of variables.
When considering cofree coalgebras over C, we imagine C to be a set of colors. We
interpret maps p : B / C as colorings of the elements of B by the colors C (i.e., asa C-coloring of B). To each element of B, the coloring p assigns a color from C.
The map εC is also a coloring: It colors the elements of the cofree coalgebra hA, αi.
Thus, we can state the principal of cofreeness as follows: hA, αi is cofree over C iff
there is a C-coloring εC of A such that, for every Γ-coalgebra hB, βi and C-coloring
p of B, there is a unique homomorphism f : hA, αi / hB, βi “consistent” with thecoloring p. By consistent, we simply mean that the following diagram commutes, sothat elements of B are mapped to elements of A of the same color (under p and εC ,

58

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

respectively).
A
~?
~
~
εC
~~

~~
/C
B
f

p

Example 2.1.13. Consider the Set-functor ΓA = Z × A from Example 1.1.7 and
let C be a set. Then, hA, αi is cofree over C just in case there is a coloring εC :A / C
such that hA, hεC , αii is the final C × Γ-coalgebra.
A C × Γ-coalgebra is just a coalgebra for the functor
A 7→ C × Z × A.
Thus, the final C × Γ-coalgebra is the collection of all streams over C × Z. Therefore,
the cofree coalgebra over C exists and is given by (C ×Z)ω , with the evident structure
map and coloring (counit).
Let E and Γ be given and suppose that, for every C ∈ E, there is a cofree coalgebra
over C. Then, there is a
/ EΓ

H :E

such that H is right adjoint to the forgetful functor U :EΓ / E . Namely, we take HC
to be the cofree Γ-coalgebra over C. Indeed, the principal of cofreeness leads directly
to the adjunction conditions: For every
p :U hB, βi/C ,pe:hB, βi/ HC

there exists a uniquesuch that the following diagram commutes.

 xxxUx; HC

Up

B

x
xx
xx
p

εC



/C

Notice that the C-coloring εC of the cofree coalgebra HC is the component at C of
the counit of the adjunction U a H. This is analogous to the result in Section 2.1.2that the insertion of variables arose from the unit of the adjunction F a U .
We can also dualize the monadicity results from Section 2.1.3. Accordingly, wedefine comonadic functor below and show that, if U :EΓ / E has a right adjoint, then
U is comonadic. We do this directly, without discussing the dual of Beck’s theorem,
since split equalizers do not play a significant role either in the literature or in theremainder of this thesis.

2.1. (CO)MONADS AND (CO)ALGEBRAS

59

Definition 2.1.14. Let K :C / D be given. We say that K is comonadic if there
is a comonad G on D and an equivalence of categories J : C / D such that thefollowing diagram commutes.
J

,

C
K

&

w

U

D



D
The functor U , above, is the forgetful functor for the category of coalgebras for thecomonad G.
Theorem 2.1.15. Let E and Γ be given such that the forgetful functor U :E Γ
has a right adjoint H :E / EΓ . Then U is comonadic.

/E

Proof. We simply sketch the proof here, since the dual construction was discussed in Section 2.1.3. The category EΓ is isomorphic to the category E of coalgebras
for the comonadG = hG = U H, ε, U ηH i
where ε and η are the counit and unit, respectively, of the adjoint U a H. The
isomorphism takes a Γ-coalgebra hA, αi to the G-coalgebra
hA, U ηα :A/ GAi.

The inverse takes a G-coalgebra hC, γi to the Γ-coalgebra
hC, γ ◦ ξC ◦ ΓεC i,where ξC :GC/ ΓGC arises from the isomorphism

GC  ,2hεC , ξC i ,2 C × GC.


In [AP01], a functor Γ is called a covarietor just in case the coalgebraic forgetful
functor U :EΓ / E is comonadic (equivalently, has a right adjoint).
This next theorem is dual to the well-known fact that, if Γ :Set / Set is a varietor,
then an algebra hA, αiis the quotient of F A.
Theorem 2.1.16. Let E be almost co-regular and let Γ preserve regular monos.
Suppose further that U :EΓ / E has a right adjoint H. Then, each Γ-coalgebra hA, αi
is a regular subcoalgebra of HA.
Proof. Let η and ε be the unit and counit, resp., of the adjunction U a H.
Then, it is a basic fact of adjunctions that εU ◦ U η = idE (see, for instance, [Bor94,
Chapter 4, Volume 2] or any other introduction of monads). Thus,
εA ◦ U ηhA, αi = idA

60

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

and so U ηhA, αi is a regular mono. Since U reflects regular monos (by the dual ofCorollary 1.2.15), we haveηhA, αi :hA, αi  ,2

/ HA.


Remark 2.1.17. The dual of this is worth mentioning: If E satisfies the conditionsof Corollary 1.2.15, and the algebraic forgetful functor U : E Γ / E is monadic, theneach algebra hA, αi is a quotient of the free algebra F A.
2.1.5. Covarietors and inheritance. In the remainder of this section, we
sketch an application of covarietors which has not, apparently, been explored in theliterature. As is well-known, categories of coalgebras over Set can be used to model
objects in an object oriented programming language (at least certain objects — weignore here constructors and other complications found in [PZ01]). Typically, thefunctors one uses for the categories of coalgebras are polynomial functors and hence
are covarietors.
For our purposes at present, a class specification consists of a list of methods(together with their signatures). For example, consider the specification below:
begin Counter
operations
inc :X / X
val :X / N
end Counter
This specification describes a class Counter with two methods, inc and val. It should
be clear that any (− × N)-coalgebra provides a set of such Counters, and so we callsuch coalgebras interpretations of the specification Counter. (We do not intend here
to give a rigorous presentation of coalgebraic semantics for class specification, butrather a reasonable sketch of this topic. See [RTJ01] for a development of this topic.)
Of course, most (− × N)-coalgebras do not behave like a proper counter — certainly,
we have not required that val(inc(x)) = val(x) + 1 here. The name Counter is meant
to be suggestive, but for the purposes of this example, a specification merely gives
the signatures of the methods, without any assertions about the behavior of thesemethods. See, however, Example 3.6.16 for a discussion of such assertions and theirrelation to coequations.
Often, given such a class specification, one extends the specification to a new class,which is augmented with additional methods. For instance, given the specificationof Counter above, we may wish to specify a counter which comes with a decrement
method (in addition to the increment and value methods of Counter). Thus, we may
wish to give a specification as shown below:

2.2. SUBCOALGEBRAS

61

begin DecCounter extends Counter
operations
dec :X / X + 1
end DecCounterWe could model DecCounter by (− × N × (− + 1))-coalgebras, and this is what
is typically done. However, there is a sense in which this interpretation neglects
the relation between DecCounter and Counter. Since DecCounter arises by adding
methods to Counter, it seems natural to consider interpretations of DecCounter tobe coalgebras over Set(−× ) , the category of interpretations of Counter. Thus, wewould like to find a functor







∆ :Set(−× )/ Set(−× )such that (Set(−× ) )∆ ≡ Set(−× ×(−+1)) .
One would be tempted to take ∆ to be the obvious functor, ∆X = X + 1, since
we are adding a method of type X / X + 1. However, this will not work, since we do
not expect the structure map dec to be a (− × N)-homomorphism. Instead, it suffices
to take ∆ to be the composite H ◦ (− + 1) ◦ U , as the following theorem shows.
Theorem 2.1.18. Let E be a category with binary products, Γ :E
etor and ∆ :E / E any endofunctor. Then
EΓ×∆ ∼= (EΓ )H∆U .
Proof. Let hA, α : A
Γ-algebra. Let/ (Γ × ∆)Ai be a Γ × ∆-coalgebra.

α0 :hA, π1 αi/ E be a covari-Then hA, π1 αi is a

/ H∆U hA, π1 αibe the adjoint transpose of π2 α :A / ∆A. Then hhA, π1 αi, α0 i is an H∆U -coalgebra(over EΓ ). It is easy to check that this construction is functorial and yields theisomorphism desired.

2.2. Subcoalgebras
In Sections 1.3 and 1.4, we introduces subalgebras and congruences. A subalgebraof hA, αi is a subobject of A which is closed under the structure map α. A precongruence on hA, αi and hB, βi is a relation on A and B which is similarly closed
under the operations of α and β. The attractiveness of these definitions come from theview that subobjects and relations on E are familiar concepts, so we focus attention
on subobjects and relations in E Γ which are also subobjects and relations in E (thatis, are mapped to subobjects and relations by the forgetful functors Uα and Uα,β ,
respectively).
Our definition of the corresponding notions, subcoalgebra and bisimulation, will
be similarly motivated. A subcoalgebra of hA, αi is a subobject of hA, αi which

62

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

is preserved by the forgetful functor. A bisimulation R on hA, αi and hB, βi is arelation on A and B — so, it is a relation in a familiar sense. However, the definition
is a bit more complicated than the definition of a pre-congruence. We will not requirethat
R = Uα×β (hS, σi)for some relation hS, σi on hA, αi and hB, βi. Instead, we require that R is theimage of some Uα×β (hS, σi). We discuss bisimulations in detail in Section 2.5.
For subcoalgebras, we have a separate motivation which determines our definition.
In categories of algebras, regular epis play a central role in the development of thetheory. Indeed, the correspondence between regular epis and congruences can beviewed as a key reason that congruences are an important concept for categories ofalgebras. As we will see in Chapter 3, when reasoning about congruences (in thiscase, deductively closed sets of equations), it is convenient to reason about their
quotients and translate the results into theorems about congruences. If congruencesplay a more central role in the theorems than quotients, it is because relations seema more familiar concept than their coequalizers.
If we take the straightforward approach and define a subcoalgebra as a subobject
in Sub(hA, αi) which is preserved by Uα , then we lose the structural advantage that
regular epis have in categories of algebras over epis in general. Just as regular epis 2
are central in E Γ , one expects that their dual, regular monos, will play a central rolein the dual category, EΓ . Thus, we offer the following definition.
Definition 2.2.1. Let hA, αi be a Γ-coalgebra. A subcoalgebra of hA, αi is a
Γ-coalgebra hB, βi together with a regular mono homomorphism
i :hB, βi  ,2

/ hA, αi.

The category of (equivalence classes of) subcoalgebras of hA, αi is denoted
SubCoalg(hA, αi).
Example 2.2.2. Let hA, OA i be a topological space and hA, αi the associatedF -coalgebra (see Example 1.1.12). Then hB, βi is a subcoalgebra of hA, αi iff B
is (isomorphic to) an open subset of hA, αi and β is the neighborhood filter on thesubspace hB, OB i.
Throughout this section, we assume that Γ preserves regular monos. Thus, if
hB, βi is a subcoalgebra of hA, αi, then B is a regular subobject of A, so subcoalgebras are regular subobjects in E. In a more general setting, we would make a
2In fact, it would be just as well to work with strong epis and monos, and alter the theorems
accordingly, but we would lose the connection between quotients and congruences in the algebraic
setting.

2.2. SUBCOALGEBRAS

63

distinction between the category of regular subobjects of hA, αi and their images
under Uα , corresponding to the definition of bisimulation in Section 2.5.
We also will assume that E is regularly well-powered throughout.
Remark 2.2.3. If E is a topos, then every mono is regular. So our definition of
subcoalgebra coincides with the usual definition of subcoalgebra: Namely, hB, βi isa subcoalgebra of hA, αi just in case there is a monic homomorphism/ hA, αi.

i :hB, βi /In other words, if E is a topos, then

SubCoalg(hA, αi) = Sub(hA, αi).
Let RegSub(A) be the poset of regular subobjects of A. We define a functor
Uα :SubCoalg(hA, αi)/ RegSub(A),taking a regular subcoalgebrahB, βi  ,2i

/ hA, αiB  ,2i/A

to the regular subobject(again, using the assumption that Γ preserves regular monos).
Theorem 2.2.4. The subcoalgebra forgetful functor Uα is full and injective on
objects. In other words, SubCoalg(hA, αi) is a full subcategory of RegSub(A).
Proof. Uα is full by Corollary 1.2.10 (a map into a mono is a homomorphism
when the composite is).
Let Uα (hB, βi) = Uα (hB, β 0 i) = B and let
i :B  ,2/A

be the regular mono homomorphic inclusion for B. Then, Γi is a regular mono (andhence a mono). Since
Γi ◦ β = α ◦ i = Γi ◦ β 0 ,β = β 0.



Theorem 2.2.5. Let E be cocomplete and almost co-regular and Γ preserve regularmonos. The functor Uα creates joins and commutes with ∃f .
Proof. The join of regular subcoalgebras hPi , ρi i of hA, αi is given as the epiregular mono factorization of the map`/ hA, αi.
i hPi , ρi i

64

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

Because coproducts are created by U and U preserves regular epi-mono factorizations,W
Uα preserves the join i Pi .
Let f :hA, αi / hB, βi and i :hP, ρi  ,2 / hA, αi be given. ThenUβ ∃f hP, ρi = Uβ Im(f ◦ i) = Im U (f ◦ i) = ∃U f Uα hP, ρi.

Theorem 2.2.6. If, in addition to the assumptions of Theorem 2.2.5, Γ preserves
pullbacks of regular monos, then Uα also creates finite meets. Furthermore, Uα commutes with pullback of subobjects, i.e., for every f :hA, αi / hB, βi,Uα ◦ f ∗ = (U f )∗ ◦ Uβ .
Proof. By Corollary 1.2.8, U creates pullbacks along regular monos.



2.2.1. About the functor [−]α . In universal algebras, one can construct a least
subcoalgebra containing a subset of the carrier of an algebra. This construction was
discussed in Theorem 1.3.6, where we showed that the functor
h−i α :Sub(A)/ SubAlg(hA, αi)was left adjoint to the forgetful functor
Uα :SubAlg(hA, αi)/ Sub(A).
The functor h−i was constructed under the assumption that Sub(A) had all meets.
Using the fact that the meet of subalgebras again yields a subalgebra, hP i is definedas the meet of all subalgebras containing P .
In this section, we will carry out the analogous construction for regular subcoalgebras. Here, we use the fact that the join of regular subcoalgebras is again a regular
subcoalgebra.
Theorem 2.2.7. Let E be cocomplete, regularly well-powered and have epi-regularmono factorizations and let Γ preserve regular monos. Then the forgetful functor
Uα :SubCoalg(hA, αi)/ RegSub(A)has a right adjoint,[−]α :RegSub(A)/ SubCoalg(hA, αi).

Proof. The proof is a straightforward construction following the proof of Theorem 1.3.6, but we include it nonetheless.
i
Let P  ,2 / RegSub(A) be given. Define [P ]α to be the join of the collection
P = {hB, βi  ,2

/ hA, αi | B ≤ P }.

2.2. SUBCOALGEBRAS

65

Proof.
∃f/

SubCoalg(hA, αi) o ⊥ SubCoalg(hB, βi)
R

Uα a



R

f∗

Uβ a

[−]α

∃U f

RegSub(A) n

⊥

.

[−]β



RegSub(B)Uf∗Figure 1. [−] commutes with pullback
Then, if hQ, νi is any regular subcoalgebra of hA, αi such that Q ≤ P , then hQ, νi ∈P and so hQ, νi ≤ [P ]α . On the other hand, if hQ, νi ≤ [P ]α , thenQ ≤ Uα [P ]α ≤ P.
For each of the three corollaries which follow, we work under the assumptions ofTheorem 2.2.7.
Corollary 2.2.8. For any homomorphism f :hA, αi/ hB, βi,[−]β ◦ U f ∗ = f ∗ ◦ [−]α .
In Figure 1, the left adjoints commute by Theorem 2.2.5, and so the right adjoints
commute as well.
In Theorem 1.4.6, we showed that a homomorphism equalizes a relation R justin case it equalizes the least pre-congruence [R] containing R. Our definition of
subcoalgebra is dual to quotient of an algebra (which is, under certain assumptions,equivalent to congruences). Thus, it is theorems about congruences which yieldtheorems about subcoalgebras, rather than theorems about subalgebras3.
Corollary 2.2.9. Let hA, αi be a Γ-coalgebra, with P a regular subobject of A.
Let hB, βi be a Γ-coalgebra and f : hB, βi / hA, αi a Γ-homomorphism. Then U ffactors through P iff f factors through [P ]α .
3Theorem 2.2.7 can be viewed as the dual of the theorem that we can construct least congruences
containing a relation. In this sense, it is the dual of a theorem about congruences, rather than atheorem about subalgebras. One simply looks at the corresponding theorem regarding quotients ofa congruence to see this.

66

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

Proof.
Im(U f ) = Uα Im(f ) ≤ P iff Im f ≤ [P ]α .
Corollary 2.2.10. Let hA, αi and hB, βi be given, with f : hA, αihomomorphism. Let hD, δi ≤ hA, αi and P ≤ B. Then

/ hB, βi a

∃U f D ≤ P iff ∃f hD, δi ≤ [P ]β .
Proof. Follows immediately from Corollary 2.2.9.

The next theorem gives some equivalent constructions of [P ]α . The requirementthat U be comonadic is only necessary for those constructions which explicitly use
the right adjoint H — namely, for (3) and (4).
Theorem 2.2.11. Let E be regularly well-powered, cocomplete and have pullbacks
and epi-regular mono factorizations. Let Γ be a covarietor that preserves regularmonos with U a H. Let
hB, βi  ,2b

/ hA, αiP  ,2i/A

andbe given. The following are equivalent.
(1) hB, βi ∼= [P ]α .
c1

 i,2 /// C

(2) Let P A be the equalizer of A
and let hA, αic2adjoint transposes of c1 and c2 , respectively. ThenhB, βi ,2 b / / / H C be thec1c2

 / HCc1/ hA, αic2

is an equalizer.
(3) There is a (necessarily regular mono) map k : hB, βi  ,2 / HP such that thefollowing diagram is a pullback, where η :1 +3 HU is the unit of the adjunction
U a H.
 ,2hB, βi

b

k

_ _

/ HP
_





Hi

hA, αi  ,2 ηα / HA

2.2. SUBCOALGEBRAS

hD, δi

67

f

%

ηβ

)

hB, βi  ,2 / HB  ,2 / HP
_

g

 '

_
" b



" 

 

hA, αi  ,2
c2

HbFF

/ HA

ηα

Hc2

c1

HC

  Hc1

HC

Figure 2. The construction of [P ] as a pullback along the unit.
(4) (If E has a regular subobject classifier Ω) Let ı be the classifying map for i,so the diagram below is a pullback.
!

 _

/1
_





P_ 
i

A

true

/Ω

i

Then, the diagram below is also a pullback,!

hB, βi

b

/ H1

_ _


hA, αi



Htrue



/ HΩ

ı

where eı is the adjoint transpose of ı.

Proof.
(1)⇒(2): Let g : hD, δiequalizes
hA, αi/ hA, αi be given, and suppose that g / /HC .

c1
c2

Then,
c1 ◦ g = εC ◦ ce1 ◦ g = εC ◦ ce2 ◦ g = c2 ◦ gand so g factors through P . Hence, g factors uniquely through [P ] (Corollary 2.2.9).
(2)⇒(3): Let hB, βi be the equalizer of ce1 and ce2 , as in (2). We claim thatthe top rectangle in the Figure 2 forms a pullback. Let hD, δi, f and g be
given so that Figure 2 commutes. Then, g equalizes ce1 and ce2 and so factors
uniquely through b, as shown. It is easy to show that the upper triangle also
commutes.

68

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD[P ]  ,2

η[P ]

m

/ HU [P ]m  H( H
HH
HH
HH
#
#
 ,2
/ HP
hB, βi
_
_ _

Hi

 

 

hA, αi  ,2 ηα / HA
Figure 3. The construction of [P ] as a pullback along Hi.
(3)⇒(1): In Figure 3, the right hand triangle commutes because U [P ] ≤ P .
The diagonal square commutes by naturality of the unit η. Hence, we havea unique map [P ]  ,2 / hB, βi, as shown, making the diagram commute. Thus,[P ] ≤ hB, βi.
On the other hand, let e
k :B / P be the adjoint transpose ofk :hB, βi/ HP .

BecauseHi ◦ H ek ◦ ηβ = Hi ◦ k= ηα ◦ b= Hb ◦ ηβ ,we see that ek ◦ i = b. In other words, B ≤ P . Hence, hB, βi ≤ [P ] and so∼hB, βi = [P ].
(3)⇔(4): The right adjoint H preserves pullbacks. Consequently, the left handsquare in Figure 4 is a pullback iff the whole rectangle is a pullback [Bor94,
Proposition 2.5.9, Volume 1].
!

hB, βi
b

_


 ,2

hA, αi  ,2

/ HP
_ _

H!

/) H1
_

Hı



Hi
ηα



Htrue



/ HA

/
4 HΩ

ı

Figure 4. [P ] as a pullback along Htrue.
2.2. SUBCOALGEBRAS

69

Remark 2.2.12. In the proof of (3)⇒(1), above, we assumed the existence of[P ]. This is not necessary. With a bit more work, one can loosen the assumptions ofTheorem 2.2.11 (removing the assumption of coproducts) and replace (1) in with
(1)0 [P ] exists and [P ] ∼= hB, βi.
Remark 2.2.13. In Theorem 2.2.11, the construction of [P ] found in (3) is essentially the same construction one finds on [BW85, p. 216].
2.2.2. The associated modal operator. Let E be regularly well-powered, cocomplete and almost co-regular and let Γ preserve regular monos and pullbacks along
regular monos. Let hA, αi be a Γ-coalgebra. The adjunction Uα a [−]α yields acomonad in the usual way. We will denote the functor part of this comonad,Uα [−]α :RegSub(A)/ RegSub(A),by α (sometimes dropping the subscript).
Remark 2.2.14. The associated monad/ SubCoalg(hA, αi)[−]α Uα :SubCoalg(hA, αi)yields the trivial closure operator
1 :SubCoalg(hA, αi)/ SubCoalg(hA, αi)on subcoalgebras.
Because α is a functor on a poset, it is monotone. The counit and comultiplication transformations yield, for every P ,α P ≤ P
α P ≤  α α P
Furthermore, because Uα preserves finite meets, so does α = Uα [−]α . Hence, wehave shown that  is an S4 modal necessity operator.
Definition 2.2.15. An operator  : P
operator if it satisfies the following:/P

on a Heyting algebra P is an S4(1)  is monotone (i.e., is an endofunctor);(2)  is deflationary (i.e.,  ≤ 1);(3)  is idempotent (i.e.,  = );(4) (A → B) ≤ A → B;(5) > ≤ >.
In other words, an S4 operator is just a left exact comonad on a Heyting algebra.
Theorem 2.2.16. α :RegSub(A)/ RegSub(A) is an S4 operator.

70

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

Proof. (4) follows from the fact that  preserves meets. The argument for (4)from this is standard, but we include it here.
By (1), we have((ϕ → ψ) ∧ ϕ) ` ψ,and, hence,(ϕ → ψ) ∧ ϕ ` ψ.
Therefore, (ϕ → ψ) ` ϕ → ψ.
The top element > of RegSub(A) is just A itself. Clearly, α A = A, and so (5)holds.

Theorem 2.2.17. Let f :hA, αi/ hB, βi be given. Thenα ◦ (U f )∗ = (U f )∗ ◦ β .
In other words,  is a natural transformation
 :RegSub(−) ◦ U+3 RegSub(−) ◦ U.

Proof. Both Uα and [−]α preserve pullbacks along regular monos. See Figure 5.
The front, right and rear faces are pullbacks and the bottom face commutes, so theleft face is also a pullback.
β P  ,2

dII
II
II
II
I

_

α f ∗ P  ,2
_





B eKK,2KK
KK
KK
U f KKK A 2,/ U HP_ eKKK
KK
KK
KKK/ U Hf ∗ P_/ U HB
fLLL
LLL
LLL
L 
/ U HA

Figure 5.  commutes with pullback.

Example 2.2.18. In Example 1.1.10 we discussed coalgebras for the set functor
Γ = P(AtProp) × P − .
Such coalgebras are Kripke models for the modal language L(AtProp). Given a
Γ-coalgebra hA, hα1 , α2 ii, we consider the elements of A to be worlds. The firstcomponent,/ P(AtProp),
α1 :A

2.2. SUBCOALGEBRAS

71

of the structure map picks out those atomic formulas which are true in a world, while
the second component,/ P(A),

α2 :A

gives the accessibility relation. A world b is accessible to a (written a → b) just incase b ∈ α2 (a).
Let φ ∈ L(AtProp) and A = hA, hα1 , α2 ii a Γ-coalgebra. Let Mod (φ) be thecollection{a ∈ A | a |= φ}.



We can characterize Mod (φ) by induction on the structure of φ as follows.

• Mod (>) = A.
• Mod (φ) = α1−1 (φ) if φ ∈ AtProp.
• Mod (¬φ) = A \ Mod (φ).
• Mod (♦φ) = {a ∈ A | α2 (a) ∩ Mod (φ) 6= ∅}.
V
T• Mod ( S) = φ∈S Mod (φ).



















Thus, for each φ ∈ L(AtProp), we have Mod (φ) ⊆ A. We calculate  Mod (φ),
the (carrier of the) largest subcoalgebra of Mod (φ). Note: this predicate over A
should not be confused with the proposition φ, where  is defined as ¬♦¬φ in
L(AtProp). As we will show, despite the syntactic similarity,









 Mod (φ) 6= Mod (φ),although the two are related.
Let →∗ be the reflexive and transitive closure of →. We extend the language
L(AtProp) by adding a new modal operator . We extend the semantics to include
this operator by adding the rule: • a |=
φ iff, for all b such that a →∗ b, b |= φ. In particular, a |=implies a |= φ.





 φ

The proposition φ represents the condition that, not only is φ necessary, but φ isnecessarily necessary and so on. Indeed, one can easily show^a |=φ iff a |=
i φ.

 



i<ω

If the accessibility relation for A is reflexive and transitive, thenφ.
We claim that

 





 

 Mod (φ) = Mod ( φ).

First, suppose a ∈ Mod ( φ) and a → b. Then, clearly, b |= 

α2 (a) ⊆ Mod ( φ).

 φ is equivalent to  φ as well, so

72

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD 

In other words, Mod ( φ) is (the carrier of) a subcoalgebra of hA, hα1 , α2 ii. So,
since
Mod ( φ) ⊆ Mod (φ),

 we have

 







Mod ( φ) ⊆  Mod (φ).

To prove equality, one must show that Modφ ( φ) is the greatest subcoalgebra ofhA, hα1 , α2 ii contained in Mod (φ).
Let hB, hβ1 , β2 ii be a subcoalgebra of hA, hα1 , α2 ii such that B ⊆ Mod (φ).
To complete the proof, it suffices to show that B ⊆ Mod ( φ). Let b ∈ B andsuppose that b →∗ c. Then c ∈ B ⊆ Mod (φ), so c |= φ. Hence, b |=φ and sob ∈ Mod ( φ), as desired.





 



 



 

Example 2.2.19. Let hA, OA i be a topological space and hA, αi the associatedF -coalgebra (see Examples 1.1.12 and 2.2.2). Then Uα [−]α is the interior operator.
That is, if S ⊆ A, then Uα [S]α is the largest open subset of S.
2.2.3. The structure of SubCoalg(hA, αi). In this section, we will show that,
if RegSub(A) is a complete Heyting algebra, then so is SubCoalg(hA, αi). This is anindication that subcoalgebras are the “right” objects to consider as unary predicatesin the category EΓ . We extend this result to bisimulations in Section 2.5.
Throughout this section, we assume that E is regularly well-powered, almost coregular and cocomplete and that Γ :E / E preserves regular monos. Thus, by Theorem 2.2.7, the subcoalgebra forgetful functor
Uα :SubCoalg(hA, αi)/ RegSub(A)has a right adjoint, [−]α . We further assume that Γ preserves pullbacks of regularmonos.
W
Definition 2.2.20. A complete Heyting algebra is a complete lattice hS, ∧, iwhich satisfies the infinitary distributive law__s∧ti = (s ∧ ti ).
i∈I

i∈I

Theorem 2.2.21. If RegSub(A) is a complete Heyting algebra, then so is thecategory SubCoalg(hA, αi).
Proof. The subcoalgebra forgetful functor Uα creates joins and finite meets, so
SubCoalg(hA, αi) inherits the infinitary distributive law from RegSub(A).
Definition 2.2.22. A Heyting algebra is a lattice with > and ⊥ such that ∧ hasa right adjoint →.

2.3. SUBCOALGEBRAS GENERATED BY A SUBOBJECT

73

Remark 2.2.23. Definition 2.2.20 is equivalent to the statement that S is a complete lattice which is a Heyting algebra.
Theorem 2.2.24. If RegSub(A) is a Heyting algebra, then so is SubCoalg(hA, αi).
Proof. We need to show that ∧ in SubCoalg(hA, αi) has a right adjoint. Let
hB, βi and hC, γi be subcoalgebras of hA, αi. We calculate
hB, βi ∧ hC, γi ≤ hD, δi iff B ∧ C ≤ D

since Uα creates meets,

iff B ≤ C → D

since − ∧ C a C → −,iff hB, βi ≤ [C → D]αsince Uα a [−]α .
Remark 2.2.25. Theorem 2.2.24 implies that the negation for SubCoalg(hA, αi)
is given as¬hB, βi = [¬B]α .
Example 2.2.26. The category SubCoalg(hA, αi) is not usually boolean, even if
RegSub(A) is boolean. Consider the functor ΓA = N × A and the coalgebra hA, αi
where A = {a, b} andα(a) = h17, bi,α(b) = h17, bi.
Let hB, βi be the subcoalgebra B = {b} and β(b) = α(b). Then¬hB, βi = [{a}]α = h0, !i,so hB, βi ∨ ¬hB, βi 6= hA, αi.
2.3. Subcoalgebras generated by a subobject
Let hA, αi be a Γ-algebra and P ⊆ A. If RegSub(A) is a complete lattice, then one
can construct hP i, the least subalgebra of hA, αi containing P (see Theorem 1.3.6).
This construction yields a left adjoint to the forgetful functor for subalgebras:h−i

Sub(A) m⊥.

SubAlg(hA, αi) .

UAs we’ve shown, the coalgebraic analogue for h−i is [−], a right adjoint to the subcoalgebra forgetful functor. Whereas, in categories of algebras, a closure operation
naturally arises (by closing a subobject under the algebraic operations), in categories
of coalgebras, an interior operation is the “natural” operation.
Nonetheless, for certain functors Γ :E / E , there is a left adjointh−iα :Sub(A)/ SubCoalg(hA, αi)

74

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

to the forgetful functor, taking a subobject to the least subcoalgebra containing it.
We describe the operation here.
The following theorem is almost an immediate corollary of Theorem 1.2.7 (U creates whatever limits Γ preserves). The weakening of the assumption that Γ preservesintersections to just Γ preserves non-empty intersections requires a bit of work toensure that it goes through, but as one can see, the work is really just the proof of
Theorem 1.2.7 again.
The use of non-empty intersections for categories of coalgebras first appears in
the work of Gumm and Schröder, as seen in [Gum01b].
Theorem 2.3.1. If Γ preserves regular monos non-empty κ-intersections, then
U :EΓ

/E

creates κ-intersections of regular subcoalgebras.
T

Proof. Let {hCi , γi i}i<κ be a family of regular subcoalgebras of hB, βi. If
Ci = 0, then clearly\
hCi , γi i = h0, !i.

Otherwise, let C be the intersection of the Ci ’s, with inclusions
ci :C // Ci .

Then, ΓC is the limit of the ΓCi ’s, with the Γci ’s forming a limiting cone. Since the
maps
/ ΓCi
γi ◦ ci :CCform a cone for C over the ΓCi ’s, there is a unique structure map γ / ΓC such thateach ci is a homomorphism.
It is routine to check that, for any regular subcoalgebra hA, αi of hB, βi containedin each of the hCi , γi i’s, the inclusion\
A≤
Ci
is a homomorphism. For this, we use the fact that Γ preserves regular monos.



Example 2.3.2. The filter functor F doesn’t preserve non-empty intersections.
Indeed, from Example 1.1.12, we learn that the category of topological spaces andopen, continuous maps is a subcategory of SetF . The open subsets of a space form
the subcoalgebras when we view the space as a filter coalgebra, but open sets are
typically not closed under intersection.
Theorem 2.3.3. Let E be almost co-regular, regularly well-powered and have coproducts and let Γ preserve regular monos. Let hA, αi ∈ EΓ . The following are
equivalent.

2.3. SUBCOALGEBRAS GENERATED BY A SUBOBJECT

75(1) Uα :SubCoalg(hA, αi) / RegSub(A) creates intersections.
(2) Uα has a left adjoint, h−iα .
(3) (Assuming E is well-pointed) For each global element a ∈ A, there is a least
subcoalgebra containing a (denoted haiα ).
Proof. We prove that (1) and (2) are equivalent. Clearly, ( 2) implies ( 3). We
complete the proof by assuming that E is well-pointed and show that ( 3) implies (2).
(1) ⇒( 2): Let P ≤ A and define hP iα to be the meet^hB, βiP ≤B(7)in SubCoalg(hA, αi). The proof that h−iα a Uα is essentially the same asthat in Theorem 1.3.6.
( 2)⇒(1): Let {hBi , βi i}i∈I ⊆ SubCoalg(hA, αi). We will show that^^
hBi , βi i = h Bi iα ,
i∈I

(8)

Uα h

^

i∈I

B i iα =

i∈I

Since

V

^

Bi .

i∈I

i∈I Bi ≤ Bi , we haveh^Bi iα ≤ hBi iα = hBi , βi i.

i∈INow, let hC, γi ≤ hBi , βi i for all i ∈ I. Then C ≤^hC, γi = hCiα ≤ h Bi iα ,V

i∈I Bi . Hence,i∈Iand so (7) holds.
For (8), we use the unit of the adjunction h−iα a Uα to conclude^^
B i ≤ U α h B i iα .
i∈I

i∈I

V

V
Since h i∈I Bi iα ≤ hBi , βi i for all i, we have Uα h i∈I Bi iα ≤ Bi for all i.
V
VHence, Uα h i∈I Bi iα ≤ i∈I Bi .
W
(3)⇒( 2): Let P ≤ A. We define hP iα = a∈P haiα (where each a is a global
element of P ). Because E is well-pointed,
_
_
_
P =
a≤
Uα haiα = Uα
haiα .
a∈P

a∈P

a∈P

Hence, if hP iα ≤ hC, γi, then P ≤ Uα hP iα ≤ C.

76

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

Let hC, γi ≤ hA, αi and P ≤ C. We must show that hP iα ≤ hC, γi. For
each global element a ∈ P , also a ∈ C. Thus, for each a, haiα ≤ hC, γi andW
so a∈P haiα ≤ hC, γi.


Theorem 2.3.4. Let h−iα a Uα . The composite
h−iα ◦ Uα
is the identity SubCoalg(hA, αi)/ SubCoalg(hA, αi).

Proof. By the adjunction h−iα a Uα , we have h−iα ◦ Uα ≤ 1. Also by the
adjunction, we haveUα ≤ Uα ◦ h−iα ◦ Uα
and Uα is full (Theorem 2.2.4).

On the other hand, U hi is a non-trivial closure operator, which we denote C,
taking a subobject A ≤ U hB, βi to its closure under the structure map β. We seethat we have another adjunction, Ca . This closure operator is also discussed in[Gum01b, Jac99].
Example 2.3.5. Let Γ :Set / Set be the functor A 7→ Z ×A (see Example 1.1.7).
Let hA, αi be a Γ-coalgebra and a ∈ A. Then it is easy to see that
Uα haiα = {tiα | i < ω}.
In other words, we close {a} under the tail operation, t.
More generally, if P is any polynomial functor,aP(A) =
Zi × A i ,i<ω

we can define haiα to be the collection of all b ∈ A such that there is a path from ato b via the structure map α. To make this precise, define a relation → on A by
b→c iff α(b) ∈ Zi × Ai and ∃j < i(πj ◦ α(b) = c).
Let →∗ be the reflexive and transitive closure of →. We claim that
Uα haiα = {b | a →∗ b}.
We show that haiα (by this definition) is a subcoalgebra of hA, αi. Let a →∗ bandα(b) = hz, hb1 , . . . , bi−1 ii.
Then a →∗ b for each bj (j < i), so hz, hb1 , . . . , bi−1 ii ∈ Γhaiα . In other words, haiα
is closed under the structure map α.
It is easy to check that haiα ≤ hC, γi iff a ∈ C for all hC, γi ≤ hA, αi.

2.4. LIMITS IN CATEGORIES OF COALGEBRAS REVISITED

77

Example 2.3.6. Let Γ = P(AtProp) × P− from Examples 1.1.10 and 2.2.18. In
Example 2.2.18, we defined →∗ as the transitive and reflexive closure of the accessibility relation, →. It is easy to see that, for any Γ-coalgebra A = hA, hi, α1 iα2 , U hai = {b | a →∗ b}.

This operation doesn’t yield a “natural” operation on Mod (φ) like  did. One
calculates







U hMod (φ)i = {b | ∃a . a |= φ and a →∗ b},which seems a less interesting collection — one which is not expressible in terms ofthe modal operations of the language L(AtProp).
One has the impression that h−iα is often definable as a closure of a relation →like those found in Examples 2.3.5 and 2.3.6. It is difficult to make this intuition
precise, since it involves defining an accessibility relation for a class of functors. In
Example 2.3.5, we use the inductive definition of polynomial functors for the definitionof →. We can extend this class to include functors which are built from P in addition
to constant and identity functors by + and ×, as in Example 2.3.6. It is unclear how
to do this for a class of functors generally4 — the inductive construction of the functor
seems to play a key role in the definition of →.

2.4. Limits in categories of coalgebras revisited
The presence of a right adjoint to the coalgebraic forgetful functor allows one toconstruct limits in the category of coalgebras, EΓ , given that the corresponding limits
exist in E. We present here essentially a generalization of the proof that SetΓ iscomplete if Γ is a covarietor, as found in [GS01].
While developing limits in categories of coalgebras, we also sketch the corresponding proofs that categories of algebras have colimits. However, we sometimes preferto strengthen the assumptions on the algebraic theorems, so that we may reason
about congruences (rather than a closure operator on quotients). This preference
comes from a desire to explicitly see how reasoning about E Γ comes directly fromproofs about universal algebras, and categories of universal algebras do satisfy thesestronger assumptions. In any case, we make clear that the theorem holds under the
weaker assumptions as well, and also present the basic concepts necessary to proveit there.
4For similar reasons, Bart Jacobs focuses on inductively specified classes of functors in [Jac99]
and elsewhere.

78

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

2.4.1. Equalizers in EΓ , coequalizers in E Γ . Equalizers of coalgebras was first
discussed in [Wor98], where Worrell proves that equalizers exist when one-generated
subcoalgebras exist and Γ is bounded (see Definition 3.7.20). The theorem below isa generalization of [GS01, Theorem 5.1], where it is proved for coalgebras over Set.
A general proof of the completeness of EΓ , given that E is complete and certain otherassumptions, can be found in [JPT+ 98] as well as [GS01].
Theorem 2.4.1. Let E be regularly well-powered, cocomplete, have equalizers andepi-regular mono factorizations and let Γ preserve regular monos. Then E Γ has all
equalizers.
Proof. Let
hA, αifg// hB, βi

be given and take the equalizer P  ,2 / A of U f and U g in E. Then, [P ]α is the equalizerof f and g in EΓ . Indeed, if h is a homomorphism that equalizes f and g, then U hfactors through P . From Corollary 2.2.9, we conclude that h factors through [P ]α .
Uniqueness easily follows.

Theorem 2.4.2. Let E be regularly co-well-powered, complete and have all coequalizers and regular epi-mono factorizations and let Γ preserve regular epis. Then,
E Γ has all coequalizers.
Proof. We sketch the proof. Let Quot(B) denote the category of quotients of
B, i.e., Quot(B) consists of equivalence classes of regular epis. Let Quot(hB, βi) be
the corresponding category of quotients in E Γ . Show that there is a functor/ Quot(hB, βi)Θ :Quot(B)left adjoint to the evident inclusion Quot(hB, βi)  ,2 / Quot(B). Specifically, given
B  ,2 Q be given. Define ΘQ to be the regular epi-mono factorization of the evident
map hB, βi / hQ0 , νi, where hQ0 , νi is the limit of{hB, βi

 ,2hP, ρi | P ∈ Quot(Q)}.

This is the formal dual of the construction of [−], of course.
// hB, βi , then ΘQ is theShow that, if Q is the coequalizer of U hA, αi//
coequalizer of hA, αihB, βi .
An equivalent proof in a more restrictive setting may seem more familiar. Suppose, in addition to our other assumptions, that E is exact and that Γ preserves exact
sequences. GivenhA, αifg// hB, βi ,2.4. LIMITS IN CATEGORIES OF COALGEBRAS REVISITED

79

take the kernel pair K of the coequalizer of f and g in E, and then take the least
congruence K containing K, according to Theorem 1.4.13. Since E Γ is also exact (byTheorem 1.4.11), we can take the coequalizer hQ, νi of K. It is little work to showthat hQ, νiis also the coequalizer of f and g.

2.4.2. Products in EΓ , coproducts in E Γ . We find Theorems 2.4.3 and 2.4.6
in [GS01], where they are proved for coalgebras over Set. We extend the theorems tocategories E which have a suitable structure inherited by EΓ , for appropriate functors
Γ.
Theorem 2.4.3. Let E be cocomplete, κ-complete, regularly well-powered and have
epi-regular mono factorizations and let Γ preserve regular monos. Let {hA i , αi i}i<κQbe Γ-coalgebras and assume that hAi , αi i exists. We’ll denote this product hD, δiwith projections/ hAi , αi i.
di :hD, δiLet{ci :hCi , γi i  ,2

/ hAi , αi i}i<κ

be a family of regular subcoalgebras of the hAi , αi i’s. Then the productexists in EΓ .

Q

hCi , γi i

Proof. Let P be the pullback (in E) shown below.
p2

P   ,2

/D

_

p1

Q



Ci  ,2

ci

Q
/

hdi i

Ai

We will show that [P ]δ , the largest regular subcoalgebra of hD, δi contained in P , isthe product of the hCi , γi i’s. We claim that the projections/ hCi , γi i

ri :[P ]are given by the composite[P ]  ,2

j

/P

p1

/

Q

Ci

πi

/ Ci ,

but we must first establish that this composite is a coalgebra homomorphism. For
this, we refer to Figure 6. We want to show that the front face of this diagram
commutes. We use the fact that Γci :ΓCi / ΓAi is a (regular) mono and show thatΓci ◦ Γ(πi ◦ p1 ◦ j ◦ ρ) = Γc1 ◦ γi ◦ πi ◦ p1 ◦ j,where ρ is the structure map for the coalgebra [P ]. The squares on each end andthe rectangle in back commute because the maps along the bottom (ci , p2 ◦ j and80

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

6 ΓD
lll||= Olllll |||
lll
|
l
l
l
9C |
, l2:
<|
/ ΓP
ΓU [P ]  ,2
O
6lll= Dlll |||
ll
lll |||
lll < |
9C |
,l
2: ll
 ,2
/P
U [P ]

/Γ

Q

Q

/

/Γ
9
tt
tt
t
t
4 5?tt

Q

Ai

Ci

/ ΓA
= O i
z
z
z
zz
8B z
:z

/ ΓCi
O

/
9
t
tt
t
tt
4 5?tt

Q

Ci

Ai

/ Ci

Figure 6. The projection ri :U [P ]

/ Ai
z=
z
zz
zz
z
: 8Bz

/ Ci is a Γ-homomorphism.

πi ◦ hdi i = di , respectively) are coalgebra homomorphisms. The right hand square on
the bottom face commutes by naturality, while the left hand square is a pullback.
To show that [P ] is a product, let hB, βi be a Γ-coalgebra and let a family ofhomomorphisms {fi : hB, βi / hCi , γi i}i<κ be given. Then, by the definition of P ,there is a unique map B / P so that the diagram below commutes.
B

U hci ◦fi i

!
hfi i

p2

P   ,2

p1

Q 

_

%/

Ci



 ,2

ci

By Corollary 2.2.9, we get a factorization of B
follows.

/

D

Q

hdi i

Ai

/ P through [P ]. Uniqueness easilyFor many functors of interest, the step of applying [−] to P is unnecessary. The
following theorem shows that, if Γ preserves non-empty intersections, then [P ] = P .
In particular, for finite products, if Γ preserves weak pullbacks, then the carrier forQ
the product hCi , γi i is just P .

Corollary 2.4.4. Let E, Γ, {hAi , αi i}, etc., be given as in the statement ofTheorem 2.4.3 and suppose, further, that Γ preserves pullbacks along regular monos2.4. LIMITS IN CATEGORIES OF COALGEBRAS REVISITED

P_  ,2_/P_ 2_

/C
_ 2




/D


/A

P1  ,2
_



81

2


/ A1

C1  ,2Figure 7. P is an intersection of the Pi ’s.
and non-empty κ-intersections. Then, the pullback
p2

P   ,2

/D

_

p1

Q

Ci



 ,2

/

ci

Q

hdi i

Ai

is invariant under [−] ([P ] = P ). In fact, there is a (necessarily unique) structuremapρ :Psuch thathP, ρi =/ ΓPY

hCi , γi i.

Proof. For each i, let Pi be the pullback shown below.
Pi   ,2

/D

 
,2



_

di

Ci

/ Ai

ci

Because Γ preserves pullbacks along regular monos, U creates such pullbacks. Hence,each Pi is invariant. One can show that P is the intersection of the Pi ’s (see Figure 7
for an illustration of the case κ = 2). Theorem 2.3.1 completes the proof.
The following theorem dualizes the result of Theorem 2.4.3.
Theorem 2.4.5. Let E be complete, κ-cocomplete, regularly co-well-powered andhave regular epi-mono factorizations and let Γ preserve regular epis. Let {hA i , αi i}i<κ`
be Γ-algebras and assume that hAi , αi i exists. Let{ hAi , αi i

 ,2hCi , γi i }i<κ

be a family of quotients of the hAi , αi i’s. Then the coproduct`hCi , γi i exists in EΓ .

82

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

Proof. The proof of the theorem as stated is just the dualization of Theorem 2.4.3, using the functor Θ defined in the proof that E Γ has coequalizers (Theorem 2.4.2). Instead of explicitly dualizing the theorem, we prefer to sketch the proof
using congruences in the case that E is exact and Γ preserves exact sequences, so thatE Γ is also exact (Theorem 1.4.11). We also restrict our interest to the case κ = 2,
just to simplify notation.
By assumption, we have a pair of regular epis
p :hA, αi

 ,2hC, γi,q :hB, βi ,2hD, δiand the coproduct hA, αi + hB, βi exists in E Γ . Let K be the kernel pair of p + q,
shown below.
K// A + B

p+q,2 C + D

We would like to take the smallest congruence containing K, but K is not necessarilya relation on U (hA, αi + hB, βi). So, we first take the coequalizer
U (hA, αi + hB, βi)

r

 ,2

R

of the diagram below.
K// A + B/ U (hA, αi + hB, βi)Then, we take the kernel pair of r,
L// U (hA, αi + hB, βi).

We claim that hC, γi + hD, δi is the coequalizer of the least congruence containing
L, but we omit the proof.

Theorem 2.4.6. Let E be cocomplete, κ-complete, regularly well-powered and have
epi-regular mono factorizations. Let Γ preserve regular monos. Suppose further that
U :EΓ / E has a right adjoint H (i.e., Γ is a covarietor). Then EΓ has κ-products.
Proof. Let H be the right adjoint to U and let {hAi , αi i}i<κ be a κ-family of
coalgebras. Then, from Corollary 2.1.16, each hAi , αi i is a regular subalgebra of the
HAi . Because H is a right adjoint, it preserves limits and soYY
H( Ai ) ∼HAi .
=Q
Hence, HAi exists in EΓ and we can apply Theorem 2.4.3.
Corollary 2.4.7. If E is cocomplete, κ-complete, regularly well-powered and has
epi-regular mono factorizations, Γ a covarietor that preserves regular monos, then E Γis κ-complete.

2.4. LIMITS IN CATEGORIES OF COALGEBRAS REVISITED

83

Theorem 2.4.6 shows that, given a right adjoint to the coalgebraic forgetful functor(and the conditions of Theorem 2.4.3), the category EΓ has products. The algebraic
analogue to Theorem 2.4.6 states that, if free algebras are available, then E Γ hascoproducts. This fact is well-known in the study of universal algebras. We state thetheorem in the same generality as Theorem 2.4.6.
Theorem 2.4.8. Let E be complete, κ-cocomplete, regularly co-well-powered andhave regular epi-mono factorizations and let Γ a varietor that preserves regular epis.
Then E Γ is κ-cocomplete.
Proof. Essentially the same as Theorem 2.4.6. We have coproducts of freealgebras, and each algebra is the quotient of a free algebra.

The next theorem shows some equivalent constructions of the product of coalgebras.
Theorem 2.4.9. Let E, Γ and H be given as in Theorem 2.4.6 and let{hAi , αi i}i<κ
be a κ-family of coalgebras. Then the following are equivalent.
Q(1) hB, βi ∼= hAi , αi i(2) hB, βi = [P ]

HAi , where P

is the pullback shown below.
Q p2 /U H( Ai )P  ,2

(9)

_

p1

Q

Ai  ,2hU Hπi i

Q 
/
U HAi

U η αiQ(3) hB, βi is the largest regular subcoalgebra of H Ai such that, for every i ∈ I,
Q ε Ai Q/ A i πi / A i
B  ,2 / U H Ai

is a Γ-homomorphism.
(4) hB, βi fits into a pullback as shown below.
Q ,2/hB, βiHAi__(5) hB, βi = [E]



Q 

HAi



/



ηHAi

Q



HU ηαi

HU HAi

HAi , where E is the equalizer of the diagram below.

U(

Q

HAi )

U ηαi ◦ε // Q U HA

hU Hπi i

Ai

i

Proof. We prove (1)⇔(2), (1)⇔(3), (2)⇔(4) and (2)⇔(5).

84

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD(1)⇔(2): This was proven in Theorem 2.4.6, as a corollary to Theorem 2.4.3.
Q(1)⇔(3): Let hB, βi be the product hAi , αi i, with projections bi . ThenU b i = ε A i ◦ U η αi ◦ U b i

Y= εAi ◦ U Hπi ◦ U
η αiYη αi ,= π i ◦ ε Ai ◦ U

so, since each ηαi is a regular mono, hB, βi is a regular subcoalgebra ofQ
H Ai , with the composite

B 2,

/ UH

Q

Ai

/

Q

Ai

/A

i

a homomorphism.
Q
Let j : hD, δi  ,2 / H Ai be given and assume that, for each i ∈ I, thecomposite πi ◦ ε Ai ◦ U j is a homomorphism. Then, because hB, βi is the
product of the hAi , αi i’s, there is a unique homomorphism/ hB, βik :hD, δisuch that, for each i,

U bi ◦ U k = π i ◦ ε

Ai ◦ U j.

Using the previous calculation, we seeY
πi ◦ ε A i ◦ Uη αi ◦ U k = π i ◦ εAi ◦ U j.

Q
Hence, ηαi ◦ k = j, and hD, δi ≤ hB, βi, as desired.
Q(2)⇔(4): Suppose that hB, βi = hAi , αi i. By the proof of Theorem 2.4.6,
we see that hB, βi = [P ] HAi , where P is the pullback shown in (9).
In Theorem 2.2.11, we showed that the left hand square in Figure 8 is apullback. Because the right hand square is just H applied to (9), it is also apullback and so the rectangle is a pullback.

 ,2hB, βi

b2

H

/H

Hp2



Q

Ai  η,2 H A/ HU H

Q

Hp1

/ HP
_ _

_ _

Q

Figure 8.

b1

i

Ai

Q
_



Ai

H

U η αi

Q 
/H
U HAi

HhU Hπi i

hAi , αi i as a composite of two pullbacks in EΓ .

2.4. LIMITS IN CATEGORIES OF COALGEBRAS REVISITED

Q

85

A simple calculation confirms that the composite along the bottom is
ηHAi .
HhU Hπi i ◦ ηH

Ai = hHU Hπi ◦ ηH



Ai i

= hηHAi ◦ Hπi i
YY=ηHAi ◦ Hhπi i =ηHAi .
Q
Q
Conversely, if hB, βi is the pullback of ηHAi along HU ηαi , then there
is a unique b1 making the diagram in Figure 8 commute. Since the rectangle
and the right hand square are pullbacks, so is the left hand square. Hence,Q
hB, βi = [P ] and thus hB, βi ∼= hAi , αi i.
Q(2)⇔(5): Let P be the pullback of hU Hπi i along U ηαi , and let E be theQequalizer of hU Hπi i and U ηαi ◦ ε Ai . To show that P ∼= E, it suffices toQshow that p1 equalizes hU Hπi i and U ηαi ◦ ε Ai (see Figure 9).



p1


P 2,

p2



ε



/ UH
o
oo
ooo
o
o
oo
ooo

Ai
ooo
o
o
ooo
U η αiooooow
Q # .4
Ai jp Figure 9.

Q





ε Ai

-Q

Q

Ai

hU Hπi iU HAi

hAi , αi i as an equalizer.

For this, we use the fact that, for every i ∈ I,Y
πi ◦ ε Ai = εAi ◦ U Hπi = πi ◦εAi ◦ hU Hπi i,Qand, hence, ε Ai = εAi ◦ hU Hπi i. Thus, we haveYYYU η αi ◦ ε A i ◦ p 1 =U η αi ◦εAi ◦ hU Hπi i ◦ p1
YYY=
U η αi ◦εAi ◦U η αi ◦ p 2
Y=U ηαi ◦ p2 = hU Hπi i ◦ p1 .









Example 2.4.10. We consider the functor
Pfin :Set/ Set

which takes a set A to the set of finite subsets of A. This functor preserves weak
pullbacks and hence it preserves regular monos. We will calculate the product of two

86

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

a

bO
cY





wO

xO

zY

yX

Figure 10. A graph representation of hA, αi and hX, χi.

simple Pfin -coalgebras. Although we do this in considerable detail here, in practice it
is often quite simple. In particular, if a functor preserves pullbacks, then the productis easily calculated. This extended example will show how one actually uses many of
the tools we’ve developed (embeddings into cofree coalgebras, the [−] operator, etc.)
to reason about coalgebras.
Recall that the product of coalgebras is constructed as a regular subcoalgebraof the product of the corresponding cofree coalgebras. Accordingly, in order to calculate this product, we first discuss the cofree Pfin -coalgebras. In order to ease thepresentation, we use non-well-founded set theory. In the terms of NWF, it is easy
to describe the cofree Pfin -coalgebra over A: It is the set U HA such thatU HA = A × Pfin (U HA).
The structure map for this coalgebra, as usual, is the identity function. In particular,
the final Pfin -coalgebra is the set of hereditarily finite (non-well-founded) sets.
We consider two uncomplicated coalgebras. Let A be the set {a, b, c and X the set{w, x, y, z}. We define the structure maps α :A / Pfin A and χ :X / Pfin X as follows:α(a) = ∅,χ(w) = ∅,α(b) = {b},χ(x) = {x},α(c) = {b, c},χ(y) = {x, y},χ(z) = {w, z}.

One calculates the units ηα :hA, αi/ HA and ηχ :hX, χi/ HX thus:ηα (a) = ha, ∅i,ηχ (w) = hw, ∅i,ηα (b) = hb, Sb i,ηχ (x) = hx, Sx i,

ηα (c) = hc, Sc i,ηχ (y) = hy, Sy i,ηχ (z) = hz, Sz i,2.4. LIMITS IN CATEGORIES OF COALGEBRAS REVISITED

87

where
Sb = {hb, Sb i},
Sc = {hc, Sc i, hb, Sb i},
Sx = {hx, Sx i},
Sy = {hx, Sx ihy, Sy i},
Sz = {hw, ∅i, hz, Sz i}.
The evident map
heA , eX i :U (HA × HX) ∼= U H(A × X)

/ U HA × U HX

is also easily described. The set U H(A × X) satisfies the equation
U H(A × X) = A × X × Pfin (U H(A × X)).
Let hs, t, Si ∈ A × X × Pfin (U H(A × X)). Then,heA , eX i(hs, t, Si) = hhs, SA i, ht, SX ii,
where SA is the image of S under eA and SX the image of S under eX . In otherwords,
SA = Pfin eA (S),SX = Pfin eX (S).
Recall the definition of the set P from the proof of Theorem 2.4.3. From thedefinition of P as a pullback, we see thatP = {hs, t, Si ∈ U H(A × X) | heA , eX i(hs, t, Si) ∈ Im(ηA × ηX )}.
Because A and X are such small sets, it is not difficult to calculate P directly.
Suppose, for some t ∈ X, S ⊆ U H(A × X), the triple ha, t, Si is in P . Then,eA (ha, t, Si) = ha, Pfin eA (S)i = ηα (a) = ha, ∅i,and so, S is empty. Since this entails that χ(t) = ∅, we conclude that t = w. Similarly,
the only triple of the form hs, w, Si is the triple ha, w, ∅i.
Suppose that hs, z, Si is in P for some s ∈ A and S ⊆ U H(A × X). Then, witha little work, one can show that ha, w, ∅i is in S. This entails that a ∈ α(s), yielding
a contradiction. Thus, there is no triple of the form hs, z, Si in P .
Let S ⊆ U H(A × X) be given. Then, hb, x, Si is in P iff
Pfin eA (S) = Sb = {hb, Sb i},
Pfin eX (S) = Sx = {hx, Sx i}.

88

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

These equations hold just in case S 6= ∅ and, for all hu, v, T i in S,eA (hu, v, T i) = hb, Sb i,eX (hu, v, T i) = hx, Sx i.
Thus, hb, x, Si ∈ P iff S 6= ∅ and, for all hu, v, T i ∈ S, u = b, t = x and hu, v, T i ∈P . We will use this fact to show that there is only one set S such that hb, x, Si ∈ P .
We do this by using the principle of coinduction for the cofree coalgebra5 H(A ×X). We will show that, if hb, x, Si and hb, x, S 0 i are in P , then there is a coalgebraic
relationhR, ρi ∈ RelEA×X×Pfin (H(A × X))
relating hb, x, Si and hb, x, S 0 i. Since H(A × X) is the final A × X × Pfin -coalgebra,
we may conclude hb, x, Si = hb, x, S 0 i (since equality is the largest relation on H(A×X)).
We discuss relations on coalgebras and the related notion of bisimulation in moredetail in Section 2.5. For now, it suffices to note that a relation R on U H(A×X) is thecarrier for a relation on H(A × X) (in EA×X×Pfin ) if, whenever hs, t, T i R hs0 , t0 , T 0 i,then
• s = s0 ,• t = t0 ,• for each u ∈ T , there is a u0 ∈ T 0 such that u R u0 and• for each u0 ∈ T 0 , there is a u ∈ T such that u R u0 .
Let R be the relation such that hs, t, T i R hs0 , t0 , T 0 i holds iff• s = s0 = b,
• t = t0 = x and• hb, x, T i and hb, x, T 0 i are in P .
Then, one may show that R is (the carrier of) a coalgebraic relation. Thus, there is
at most one set S such that hb, x, Si ∈ P .
Let Sb,x satisfy the equation
Sb,x = {hb, x, Sb,x i}.
A simple calculation verifies that hb, x, Sb,x i is in P .
A similar argument shows that hb, y, Si ∈ P iff S = Sb,y , whereSb,y = {hb, x, Sb,x i, hb, y, Sb,y i}.
Also, hc, x, Si ∈ P iff S = Sc,x , where
Sc,x = {hb, x, Sb,x i, hc, x, Sc,x i}.
5One could also use the principle of coinduction for N W F to show that, if hb, x, Si and hb, x, S 0 i
are in P , then S and S 0 are P-bisimilar. The relation one defines to show S ∼ S 0 is more complicated,
however.

2.5. BISIMULATIONS

89

Finally, we consider triples of the form hc, y, Si. Such triples are in P just in caseS satisfies the equations(10)

Pfin eA (S) = {hb, Sb i, hc, Sc i},(11)

Pfin eX (S) = {hx, Sx i, hy, Sy i}.

Consider the set
Sc,y = {hb, x, Sb,x i, hc, y, Sc,y i}.
Then one can show that Sc,y satisfies (10) and (11), so hc, y, Sc,y i is in P . However,the setV = {hc, x, Sc,x i, hb, y, Sb,y i}also satisfies (10) and (11). Indeed, there are many sets which satisfy these two
equations: Any set S such thatV ⊆ S ⊆ V ∪ Sc,y or Sc,y ⊆ S ⊆ V ∪ Sc,y .
satisfies (10) and (11), and one can show that these are the only sets which satisfy
these equations.
Thus, we have characterized the set
P = {hs, t, Si ∈ U H(A × B) | heA , eX i(hs, t, Si) ∈ Im(ηA × ηX )}.
Namely, P is the set{ha, w, ∅i, hb, x, Sb,x i, hb, y, Sb,y i, hc, x, Sc,x i}
joined with the set{hc, y, Si | V ⊆ S ⊆ V ∪ Sc,y or Sc,y ⊆ S ⊆ V ∪ Sc,y }.
By Corollary 2.4.4, the set P (with the projection π3 as a structure map) is the
product hA, αi × hX, χi. The projections are just the obvious projections:
πα (hs, t, Si) = s,πχ (hs, t, Si) = t.
2.5. Bisimulations
We now turn our attention to bisimulations — relations on coalgebras which insome sense respect the coalgebraic structure. We had postponed our discussion ofbisimulations until we had shown how one defines products of coalgebras. This allows a simple definition of regular relations in the category EΓ . We focus on regular
relations for the same reasons that we restricted our attention to regular subobjects
when defining subcoalgebras. Namely, since EΓ inherits epi-regular mono factorizations, under our usual assumptions on E and Γ, the regular relations come with aricher set of construction principles. These are the relations that are well-behaved,

90

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

both in E and in EΓ . A bisimulation will be a regular relation in E that is the imageof a regular relation in E .
Compared to the definition of bisimulation we find in other works on coalgebras,
the definition we adopt may seem a bit complicated. There are two reasons for theapparent complexity of our development. The first reason is that we stress the importance of regular relations and in the usual setting (coalgebras over Set), every relationis regular, thus removing the distinction. Secondly, in Set, one has the advantage ofthe axiom of choice. This simplifies the definition of bisimulation considerably (Theorem 2.5.8). So, one finds that, in the category Set, our definition coincides with thedefinition of bisimulation found in [JR97], [BM96], etc. The additional complexityof the definition of bisimulation found here seems a necessary effect of generalizing
the setting in which we are interested.
Because the theory of bisimulations has not been well developed outside of SetΓ ,we feel justified in offering an alternative definition for categories EΓ which reduces
to the familiar definition when E = Set. What one wants, however, is a compellingexample of a category of coalgebras for which the two definitions differ, and forwhich the definition offered here is demonstrably preferable. Unfortunately, becauseof the results in Section 2.5.2 (which show that, if G preserves regular relations, thenagain Definition 2.5.4 reduces to the definition of bisimulation found elsewhere), such
examples are difficult to come by. One would like to look at power object coalgebras
over a topos which does not satisfy choice and see how the class of bisimulations
discussed here differ from the class of coalgebraic relations preserved by U . This isan obvious area for future research.
Definition 2.5.1. Let C be a category with finite products. A relation R on A
and B is a regular relation if the inclusion
R //A × Bis a regular mono.
Remark 2.5.2. The notion of a regular relation doesn’t really require that C has
finite products. One could say that R is a regular relation on A and B just in case,for every C ∈ C, the map
Hom(A, C) × Hom(B, C)/ Hom(R, C)

is a regular epi. See the definition of regular epimorphic family in [BW85] for details.
We won’t require that kind of generality here.
Remark 2.5.3. In a category in which every mono is regular (say, a category
with a subobject classifier), every relation is regular.

2.5. BISIMULATIONS

91

Let E be almost co-regular and let Γ be a covarietor that preserves regular monos,
with H the right adjoint to U . Let hA, αi and hB, βi be Γ-coalgebras. Then there
are two evident categories of regular relations to consider. On the one hand, there
are the regular relations on A and B in E, that is,
RegSubE (A × B).
On the other, there are the regular relations on hA, αi and hB, βi in EΓ ,SubCoalg(hA, αi × hB, βi),
which we abbreviate as SubCoalg(α × β). We define a functor/ RegSub(A × B)

Uα,β :SubCoalg(α × β)

as follows: Given a regular relation hR, ρi over hA, αi and hB, βi, with projections
r1 , r2 , we factorhU πα , U πβ i ◦ U hr1 , r2 i(i.e., we factor hU r1 , U r2 i), as shown in Figure 11. In other words, Uα,β = ∃hU πα , U πβ i ◦Uα×β .
R_/ / Uα,β hR, ρi
_




/ A×B



U (α × β)hU πα , U πβ iFigure 11. The definition of Uα,β .
We define the category Bisim(α, β) of bisimulations over hA, αi and hB, βi tobe the image of Uα,β in the category of regular relations over A and B (that is,
RegSub(A × B)). Explicitly, Bisim(α, β) is the full subcategory of RegSub(A × B)
consisting of Uα,β hR, ρi for hR, ρi ∈ SubCoalg(α × β).

Uα,β

.

SubCoalg(α × β)

RegSub(A × B)
9**Bisim(α, β)4Figure 12. The definition of Bisim(α, β).

92

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

Definition 2.5.4. Let hA, αi and hB, βi be Γ-coalgebras. A regular relation R
on A and B is a bisimulation on hA, αi and hB, βi just in case there is a regular
relation hS, σi on hA, αi and hB, βi such that R is the image ofS  ,2/ U (α × β)

/A × B .

In other words, R is a bisimulation just in case R = ∃hU πα , U πβ i S for some relation
hS, σi on hA, αi and hB, βi.
This definition of bisimulation differs from the definition one finds in [JR97], etc.
Typically, one defines a bisimulation over hA, αi and hB, βi as a relation R on A
and B such that R can be augmented with a structure map making it a relation inEΓ . This simpler definition is well-suited for coalgebras over Set, but is not wellbehaved when the base category does not satisfy the axiom of choice. For instance,
the simpler definition does not, in general, define a class of relations closed underjoins. Definition 2.5.4 is a proper generalization of the definition of bisimulation in
ibid, since it reduces to the more familiar definition of bisimulation in the presenceof choice, as the following theorem shows (it also reduces to the simpler definition ifΓ preserves regular relations — see Corollary 2.5.27).
The next few theorems give standard examples of bisimulations, which can befound in most introductions to coalgebras. One important construction of bisimulations does not seem to hold in this setting generally, however. It is apparently not
the case that if R and S are composable bisimulations, then R ◦ S is a bisimulation.
From [JR97], we have a proof that R ◦ S is a bisimulation, given that E satisfies
the axiom of choice. In Section 4.2.6, we prove (using the internal logic of EΓ andE developed in Chapter 4) that R ◦ S is a bisimulation if Γ preserves regular relations. In both of the cases in which we have proofs that bisimulations compose, thebisimulations consist of those relations in E which can be augmented with structure
maps, making the projections homomorphisms. More general results would be nice,but the situation is unclear.
Theorem 2.5.5. For any coalgebra hA, αi, ∆A is a bisimulation.
Proof. Uα,α ∆α is the image ofhU π1 , U π2 i ◦ U hidα , idα i = hU idα , U idα i = hidA , idA i,
and so Uα,α ∆α = ∆A .
Theorem 2.5.6. Let f :hA, αi
of U f is a bisimulation.

/ hB, βi be a Γ-homomorphism. Then the graph

Proof. The graph of f in EΓ is the relation hhA, αi, idα , f i. Hence, Uα,β graph(f )is the image ofhU πα , U πβ i ◦ U hidα , f i = hidA , U f i.

2.5. BISIMULATIONSTherefore, Uα,β graph(f ) = graph(U f ).

93

The next theorem is well-known, first appearing in [Rut96]. Since our definitionof bisimulations include all those relations which are the carrier for some subcoalgebraof α × β, the result also holds in our setting. We include the proof nonetheless.
Theorem 2.5.7. If Γ preserves weak pullbacks, then for any pair of homomorphisms
f :hA, αi/ hB, βi,g :hC, γi/ hB, βi,

the pullback of f along g (properly, U f along U g) is a bisimulation.
Proof. Let E be the pullback of f along g, as shown in Figure 13. Since, byassumption, Γ preserves weak pullbacks, the top face is a weak pullback. Hence, there
is a structure map ε :E / ΓE making the two projections homomorphisms. Therefore,
the inclusion E  ,2 / A × C factors through U (α × β) / A × B and thus hE, εi is aregular relation in EΓ . It is easy to verify that Uα,β hE, εi = E.

ΓE
O E

EE
EE
EE
E"

ΓA
O

/C

E EE

EE
EE
EE
E"

/ ΓC
O EE
EE
EE
EE
"
/ ΓB
O

A

EE
EE
EE
EE
E"
/B

Figure 13. Pullbacks of homomorphisms are bisimulations.

Theorem 2.5.8. Let hA, αi and hB, βi be Γ-coalgebras and suppose that E satisfies the axiom of choice. Then a relation R on A and B is a bisimulation iff there
is a structure map
/ ΓR
ρ :R
such that the projections r1 and r2 are Γ-homomorphisms.
Proof. Clearly, if R has a structure map making r1 and r2 homomorphisms,
then R is a bisimulation.

94

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

Suppose that R is a bisimulation. Let hS, σi ∈ SubCoalg(α × β) such that R =Uα,β hS, σi, with p : S  ,2 R the (necessarily regular) epi part of the factorization, as
shown in Figure 14, and i the right inverse of p. Then it is easy to see that Γp ◦ σ ◦ isuffices as the desired structure map.

Γp

ΓS
O
σ

/ ΓR  ,2O

/ ΓA × ΓB
O
α×β

p

Si
i

 *& ,2
qx R

/ A×B

Figure 14. Definition of a structure map for a bisimulation, given choice.
2.5.1. The right adjoint to Uα,β . In Section 2.2.1, we saw that the subcoalgebra forgetful functor Uα has a right adjoint. We generalize that result to the functor
Uα,β here.
Remark 2.5.9. In what follows, we write α × β as an abbreviation for hA, αi ×hB, βi. This is not to be confused with the morphism
α × β :A × B/ ΓA × ΓB

in E.
Theorem 2.5.10. Uα,β has a right adjoint.
Proof. By definition,
Uα,β = ∃hU πα , U πβ i ◦ Uα×β .
Since Uα×β a [−]α×β and ∃hU πα , U πβ i a hU πα , U πβ i∗ (pullback along hU πα , U πβ i), thecomposite[−]α,β = [−]α×β ◦ hU πα , U πβ i∗
is a right adjoint to Uα,β .

Corollary 2.5.11. Uα,β preserves colimits.
Theorem 2.5.12. Given R ≤ A×B, A = U hA, αi, B = U hB, βi, the coalgebraic
relation [R]α,β is the pullback shown below, where the arrow on the bottom is theadjoint transpose of hU πα , U πβ i.
[R]α,β  ,2
g

f

_ _

/ HR
_





α × β  ,2Hhr1 , r2 i

/ H(A × B)

2.5. BISIMULATIONS

95[p∗ R]_ _/ Hp∗ R
_

/ HR
_






/ H(A × B)

α × β ηα×β / HU (α × β)

Hp

Figure 15. Alternate definition of [−]α,βProof. Let p = hU π1 , U π2 i :U (α × β) / A × B . By Theorem 2.2.11 ( 3), [p∗ R]
is the pullback on the left hand square of Figure 15. The right hand square is also apullback, since H preserves pullbacks. Hence, the composite is a pullback.
The adjoint functors Uα,β and [−]α,β give rise to a monad on RegSub(A × B) anda comonad on SubCoalg(α × β), that is, an interior operator α,β = Uα,β [−]α,β and aclosure operator α,β = [−]α,β Uα,β . In the case of subcoalgebras, the comonad [−]α Uαis just the identity on SubCoalg(hA, αi), but for relations, this is not generally thecase, as the following example shows. Instead, the closure of a coalgebraic relationhR, ρi on hA, αi and hB, βi is the largest relation hS, σi such thatUα,β hR, ρi = Uα,β hS, σi.
We return to a discussion of α,β in Section 2.5.2.
Example 2.5.13. Consider again the Pfin -coalgebras hA, αi and hX, χi from Example 2.4.10. Recall that A is the set {a, b, c} and X the set {w, x, y, z}. The
structure maps α :A / Pfin A and χ :X / Pfin X are given by:
α(a) = ∅,χ(w) = ∅,α(b) = {b},χ(x) = {x},α(c) = {b, c},χ(y) = {x, y},χ(z) = {w, z}.

We calculated their product as the set{ha, w, ∅i, hb, x, Sb,x i, hb, y, Sb,y i, hc, x, Sc,x i}
joined with the set{hc, y, Si | V ⊆ S ⊆ V ∪ Sc,y or Sc,y ⊆ S ⊆ V ∪ Sc,y },96

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

where
Sb,x = {hb, x, Sb,x i},
Sb,y = {hb, x, Sb,x i, hb, y, Sb,y i},
Sc,x = {hb, x, Sb,x i, hc, x, Sc,x i},
Sc,y = {hb, x, Sb,x i, hc, y, Sc,y i},
V = {hc, x, Sc,x i, hb, y, Sb,y i}.
We consider a relation hR, ρi on hA, αi and hX, χi whereR = {ha, w, ∅i, hb, x, Sb,x i, hb, y, Sb,y i, hc, x, Sc,x i, hc, y, Sc,y i}.
The structure map ρ on R is the projection π3 .
One sees that Uα,χ R is the relation {ha, wi, hb, xi, hb, yi, hc, xi, hc, yi}. In otherwords, Uα,χ R is the largest bisimulation on hA, αi and hX, χi. Consequently,α,χ hR, ρi = α × χ

hR, ρi.

The following observation is a standard fact about Galois correspondences.
Theorem 2.5.14. The following posets are isomorphic:Fix(α,β ) ∼= Fix(

∼α,β ) = Bisim(α, β),(where Fix is the poset of fixed points of the operator).
Let f : hA, αi / hB, βi be given. We saw, in Corollary 2.2.9 that U f factors
through a subobject P of B just in case f factors through [P ]. We prove an analogous
result here for pairs of homomorphisms into α × β. First, we prove a lemma.
Lemma 2.5.15. Let
f :hC, γi/ hA, αi,g :hC, γi/ hB, βibe Γ-homomorphisms. Then
Uα,β Imhf, gi = ImhU f, U gi.
Proof. We use the facts thathU f, U gi = hU πα , U πβ i ◦ U hf, gi,
U Imhf, gi = Im U hf, gi.
The commutative diagram in Figure 16 completes the proof.

2.5. BISIMULATIONS• HH / / U Imhf, gi

97/ / Uα,β Imhf, gi
_

HH
_
HH
HH
H
U hf, gi HH$U (α × β)hU πα , U πβ i


/ A×B

Figure 16. Uα,β commutes with Im.
Theorem 2.5.16. Let
f :hC, γi/ hA, αi,g :hC, γi/ hB, βibe Γ-homomorphisms and R a relation on A and B. Then hf, gi factors through[R]α,β just in case hU f, U gi factors through R.
Proof.
Imhf, gi ≤ [R]α,β iff Uα,β Imhf, gi ≤ R iff ImhU f, U gi ≤ R.
Corollary 2.5.17. Let the left hand square of Figure 17 be a pullback. Then theright hand square is also a pullback.
•

•

h


k

"
/B

P 

_

h

"

k

[P ]α,β'/ hB, βi

 



g

 

A



f

/C

g

hA, αif/ hC, γi

Figure 17. [P ] is a pullback.
Proof. Let h and k be homomorphisms making the right hand square commute.
Then the left hand square, which is just the image of the right hand square underU , also commutes, and so there is a unique factorization of hh, ki through P . Apply
Theorem 2.5.16 to conclude that hh, ki factors through [P ].

Remark 2.5.18. Example 2.5.13 also shows that the functor Uα,β is not generally
full. In this example, Uα,β (α × β) ≤ Uα,β hR, ρi, but α × β 6≤ hR, ρi. This is adifference between the subcoalgebra functor Uα and the bisimulation functor Uα,β .

98

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

The functor [−]α,β is a natural transformation between contravariant bifunctors.
In order to make that precise, we define the functors RegRel(hA, αi, hB, βi) (abbreviated RegRel(α, β)) and RegRel(A, B) as bifunctors. Their definition is clear fromthe preceding discussion. Namely,
RegRel(α, β) = SubCoalg(α × β) and
RegRel(A, B) = RegSub(A × B).
Thus, the effect of RegRelEΓ , say, on a pair of maps
f :hA, αi/ hC, γig :hB, βi/ hD, δi

is a functor
RegRel(f, g) :RegRel(γ, δ)/ RegRel(α, β).

Namely, it takes a relation hR, ρi on hC, γi and hD, δi to the pullback shown below.
(f × g)∗ hR,
ρi/ hR, ρi
_




/γ×δ

_ _

α×β

f ×g

Theorem 2.5.19. [−] :RegRelE ◦U × U
of maps, f and g, as above,+3 RegRelEΓ

is natural. I.e., for every pair[−] ◦ (U f × U g)∗ = (f × g)∗ ◦ [−].
Proof. Let f :hA, αi / hC, γi and g :hB, βi / hD, δi be given. Let R be a regular relation over C and D and S = (U f × U g)∗ R. We will show that [S]α,β =(f, g)∗ [R]γ,δ .
[S]α,β
_

HH
HH
HH
HH
H#

[R]γ,δ_/ HA × HB
OOOOOα × βI

II

f ×gI

/ HS
_ OOOO
OOO
OOO
OOO
O'
/ HR
_

II
$

HU f ×HU
OO g



γ×δ

ηγ ×ηδ

Figure 18. [−] is natural.

OOO'/ HC × HD2.5. BISIMULATIONS

99

In Figure 18, the front and rear faces are pullbacks by Theorem 2.5.12. The righthand face is also a pullback, since H preserves pullbacks. The bottom commutes bynaturality. The arrow/ [R]γ,δ
[S]α,βis the unique map making the top and left hand squares commute (due to the pullbackin front).
Because the composite of the left and front faces is a pullback, and so is the front
face itself, we see that the left face is a pullback.
For each pair of maps,
f :hA, αi/ hC, γig :hB, βi/ hD, δithe functor (f × g)∗ (i.e., RegRel(f, g)) has a left adjoint∃f,g :RegRel(α, β)/ RegRel(γ, δ).

Namely, given a regular relation hR, ρi on hA, αi and hB, βi, we take the epi-regularmono factorization shown below.
hR, ρi/ / ∃f,g hR, ρi
_




/γ×δ

_

α×β

f ×g

The same fact holds in E as well. That is, for any pair of maps h and k, the pullback
functor (h × k)∗ has a left adjoint, ∃h,k .
∃f,g

RegRel(α, β) nRUα,β a.

⊥

RegRel(γ, δ)R(f ×g)∗[−]α,βUγ,δ a∃U f,U g

RegRel(A, B) n⊥.

[−]γ,δ



RegRel(C, D)(U f ×U g)∗

Figure 19. Uα,β commutes with ∃The following corollary is found in [JR97, Lemma 5.3], where it is proved forcoalgebras over Set. Of course, the proof offered here differs inasmuch as it uses ourdefinition of bisimulation, but the basic approach is the same.

100

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

Name
Subalgebra
Pre-congruence

Category Description
SubAlgA subobject of hA, αi preserved by U .
PreCong A relation on hA, αi and hB, βi preservedby U
CongruenceCong
A pre-congruence equivalence relation
Subcoalgebra
SubCoalg A regular subobject of hA, αi (necessarily
preserved by U ).
Bisimulation
Bisim
The image of a regular relation overhA, αi and hB, βi
Bisimulation equivalence BisimEq A bisimulation which is an equivalence
relation
Table 1. A summary of predicates and relations.
Corollary 2.5.20. Uα,β commutes with ∃. In other words, for any pair of homomorphisms f :hC, γi / hA, αi, g :hC, γi / hB, βi, the image of hf, gi is a bisimulation over hA, αi and hB, βi.
Proof. The right adjoints in Figure 19 commute by Theorem 2.5.19, and so theleft adjoints also commute. Thus,∃U f,U g ◦ Uα,β = Uγ,δ ◦ ∃f,g .

2.5.2. α,β and relation-preserving functors. In Section 2.2.2, we saw thatthe operator α = Uα ◦[−]α is an S4 modal operator. The situation for the analogous
bisimulation operator is more difficult. The operatorα,β :RegRel(A, B)/ RegRel(A, B)

defined by α,β = Uα,β [−]α,β easily satisfies certain of the properties of S4 operators,
namely•  is monotone;•  is deflationary;•  is idempotent.
These properties are satisfied by any comonad on a poset. Nonetheless, it is not clearthat  is a normal modal operator, that is, that(12)

α,β R ∧ α,β S ≤ α,β (R ∧ S).

Indeed, even over Set, bisimulations need not be closed under finite meets, and so need not be normal. Worse, even if  does preserve binary meets, it does not
generally preserve >, so  simply won’t be S4 typically.

2.5. BISIMULATIONS

101

In this section, we give sufficient conditions that  preserves binary meets, namelythat the endofunctor Γ preserve regular relations. This is a fairly strong condition
and is not met by some functors of interest. In the following example, we will showthat the  operator for Pfin -coalgebras is not normal.
Example 2.5.21. Consider the finite powerset functor and the coalgebra hA, αi
represented by the graph in Figure 20. Let
R = {ha, ai, hb, bi, hc, ci},
S = {ha, ai, hb, ci, hc, bi}.
Then R = R, S = S and (R ∧ S) = {ha, ai} = ∅. (Thanks to Tobias Schröderfor this example.)
a>
b

>>
>>
>>
>

c

Figure 20. Pfin -bisimulations are not closed under ∧.
As we will see, if Γ preserves regular relations, then the category of bisimulations Bisim(α, β) inherits much of its structure from the category RegSub(A × B)of relations in E. In fact, in this case, the category Bisim(α, β) is isomorphic to
SubCoalg(α × β) and is a full subcategory of RegSub(A × B), with the inclusion acomplete Heyting algebra homomorphism. Such a close connection between thesethree categories requires a correspondingly strong assumption on Γ.
From [GS01], we learn that a functor Γ preserves pullbacks iff Γ preserves weak
pullbacks and mono 2-sources (i.e., binary relations). Indeed, the same claim holds
if we replace mono 2-sources with regular mono 2-sources (regular relations). We
include this and other proofs from ibid here, replacing mono 2-sources with regular
relations.
Definition 2.5.22. A functor Γ preserves regular relations if, for every regular
relation hR, r1 , r2 i on X and Y , the triple hΓR, Γr1 , Γr2 i is a regular relation on
ΓX, ΓY , i.e., hΓr1 , Γr2 i is a regular mono.
As Gumm and Schröder showed, it is sufficient that Γ take binary products to (inour setting, regular) relations.
Lemma 2.5.23. Γ preserves regular relations iff, for every X, Y ,hΓ(X × Y ), ΓπX , ΓπY i
is a regular relation.

102

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

Proof. Clearly if Γ preserves regular relations, then it preserves the regular relation X × Y . Suppose, conversely, that for every X, Y , Γ(X × Y ) is a regular relation,i.e., hΓπX , ΓπY i is a regular mono. Then, for any regular relation R  ,2 / X × Y , thecomposite
ΓR  ,2/ Γ(X × Y )  ,2

/ ΓX × ΓY

is a regular relation.



Theorem 2.5.24. Γ preserves pullbacks iff Γ preserves weak pullbacks and regular
relations.
Proof. If Γ preserves pullbacks, then Γ takes the pullback square
X × Y

/Y




/1

_

X

to a pullback, so hΓπ1 , Γπ2 i is a regular mono. Apply Theorem 2.5.23 to conclude
that Γ preserves regular relations.
For the converse, notice that pullbacks are both regular relations and weak pullbacks, and that a weak pullback which is a regular relation is also a pullback.
On the one hand, as the following theorems show, preservation of regular relations
is the “right” condition to ensure well-behaved bisimulations. On the other hand,preservation of regular relations is an unfortunately strong condition, not satisfied bymany functors of interest (such as Pfin ). Nonetheless, there seems to be no reasonable
middle ground. If one wants  to be well-behaved as a modal operator (although,even here, we will typically not preserve the final subobject), then one must restrict
interest to pullback-preserving functors (or some similarly suitable domain).
Theorem 2.5.25. If Γ preserves regular relations, then U preserves regular relations. In other words, for any relation hhR, ρi, r1 , r2 i on hA, αi, hB, βi,
Uα,β hhR, ρi, r1 , r2 i = hR, r1 , r2 i.
Proof. It suffices to show that, for every pair of coalgebras hA, αi and hB, βi,
U (α × β) / A × B is a regular mono. We sketch how to do that here, leaving details
to the reader.
First, one shows that U creates epi-regular mono 2-source factorizations. That is,for each pair of homomorphisms,
f :hC, γi/ hA, αi,g :hC, γi/ hB, βi,2.5. BISIMULATIONS

103

there is a unique epi p :hC, γi / / hD, δi and pairh :hD, δi/ hA, αi,k :hD, δi/ hB, βi,

such that h ◦ p = f and k ◦ p = g and hU h, U ki is regular mono in E.
Say that a regular relation hS, s1 , s2 i on A and B is α, β-invariant if there is a
structure map σ : S / ΓS such that s1 and s2 are homomorphisms. Let R be thejoin of all α, β-invariant relations S. Using the fact about epi-regular mono 2-source
factorizations above, one can show that R is itself α, β-invariant, with unique structure map ρ : R / ΓR . Moreover, one can show that the coalgebra hR, ρi is, in fact,
the product of hA, αi and hB, βi. Hence, U (α × β) is a regular relation over A andB.

The categories RegRel(α, β) and RegRel(A, B) are both complete Heyting algebras,
since they are simply categories of subobjects of α × β and A × B, respectively. The
forgetful functor Uα,β is not, however, a Heyting algebra homomorphism in general,since it does not preserves meets (Example 2.5.21). By Theorem 2.2.6, we know thatUα×β preserves meets, but the functor∃hU π1 , U π2 i :RegSub(U (α × β))/ RegSub(A × B)

generally does not preserve meets. Assuming that Γ preserves regular relations,however, ∃hU π1 , U π2 i does preserve meets, and hence we have the following corollary.
Corollary 2.5.26. If Γ preserves regular relations, then  distributes over ∧.
In other words, if Γ preserves regular relations, the meet (in E) of two bisimulations
is again a bisimulation.
Proof. Let hA, αi and hB, βi be given, R and S be relations over A and B, andsuppose Γ preserves regular relations. Then, by Theorem 2.5.25, U also preserves
regular relations and, hence,p = hU π1 , U π2 i :U (α × β)  ,2

/A × Bis a regular mono. Thus, ∃p distributes over ∧ and soα,β (R ∧ S) = ∃p α×β p∗= ∃p α×β (p∗ R ∧ p∗ S)= ∃p (α×β p∗ R ∧ α×β p∗ S)(by Theorem 2.2.16)= ∃p α×β p∗ R ∧ ∃p α×β p∗ S = α,β R ∧ α,β S.
104

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

As we saw in Theorem 2.5.8, assuming the axiom of choice, bisimulations are
relations which can be augmented with structure maps, making them relations in EΓ .
The following corollary shows that, assuming Γ preserves pullbacks, the same result
holds. Thus, under this (reasonably strong) assumption, the definition of bisimulation
found in [JR97], etc., again coincides with our definition of bisimulation.
Corollary 2.5.27. If U preserves regular relations, a relation R on A and B
is a bisimulation iff there is a (necessarily unique) structure map ρ :R / ΓR makinghR, ρi a relation on hA, αi and hB, βi.
Proof. Let p = hU π1 , U π2 i and let R be a bisimulation, R = ∃p ◦ Uα×β hT, τ ifor some hT, τ i ∈ RegRel(α, β). Since p is a regular mono, ∃p T = T and so the result
follows.

2.5.3. The algebraic dual of bisimulations. A bisimulation is a relation between the carriers of two coalgebras which, loosely speaking, respects the structuremaps of the coalgebras. In this way, a bisimulation is analogous to a pre-congruence.
There is another structure on algebras which is related to the notion of a bisimulation— namely, the dual structure. For this, we explicitly dualize Definition 2.5.1 (regular
relation).
Definition 2.5.28. Let A, B be objects in a category C with finite coproducts.
A regular epi
 ,2C
p :A + B
is called a regular co-relation on A and B.
Remark 2.5.29. A more general definition of regular co-relation can be found in[BW85], where one does not assume the category C has finite coproducts. See also
Remark 2.5.2. We will not use this approach, but instead assume conditions sufficient
to ensure that our category of algebras has coproducts.
Throughout the remainder, we assume that E is complete, exact, regularly cowell-powered and finitely cocomplete, that Γ preserves exact sequences and that thealgebraic forgetful functor U is monadic. By Theorem 2.4.8, then, E Γ has coproducts
and by Theorem 1.4.11, E Γ is exact. While we do not require exactness to dualize
the preceding development of bisimulations, it does allow the dual theorems to bestated in familiar terms (i.e., in terms of equivalence relations instead of regularco-relations).
Let hA, αi and hB, βi be Γ-coalgebras. Let RegCoRel(A, B) be the category of
regular corelations over A and B (in E), and RegCoRel(α, β) the category of regularcorelations over hA, αi and hB, βi. Then, there is a forgetful functor
Uα,β :RegCoRel(α, β)/ RegCoRel(A, B)

2.6. COINDUCTION AND BISIMULATIONS

105

which takes a regular co-relation
p :α + β ,2hC, γito the regular epi-mono factorization of U p ◦ [U κα , U κβ ] (where κα and κβ are theco-projections of the coproduct). See Figure 21.

A+B[U κα ,U κβ ]_Uα,β hC, γi // U (α + β)
Up

_

/C

Figure 21. The definition of Uα,β :RegCoRel(α, β)/ RegCoRel(A, B).

Because both E and E Γ are exact, we have isomorphisms
RegCoRel(A, B) ∼= EqRel(A + B),
RegCoRel(α, β) ∼= Cong(α + β).
We state the effect of Uα,β in terms of congruences on α + β and equivalence relations
on A + B. Let hR, ρi be a congruence on α + β. Then Uα,β hR, ρi is given by the
pullback of R along [U κα , U κβ ]. In other words, elements x and y of A+B are related
by Uα,β hR, ρi if and only iff x and y are related by R as elements of α + β.
2.6. Coinduction and bisimulations
The principle of coinduction from Section 1.5.3 is often expressed in terms ofbisimulations. We follow that tradition in this section by restating the results ofTheorem 1.5.25 in terms of bisimulations. To begin, we define what it means forelements of two coalgebras to be bisimilar. Then, we prove the usual statement ofcoinduction, namely, any two bisimilar elements of the final coalgebra are equal. The
material found here differs from the standard presentation (say, in [JR97]) inasmuch
as the definition of bisimulation (and, hence, bisimilar) differ from the standard
definitions. As before, if E satisfies the axiom of choice, the definitions agree.
Definition 2.6.1. Let hA, αi and hB, βi be Γ-coalgebras and let ha, bi ∈ A × B.
We say that a and b are bisimilar, denoted a ∼α,β b or just a ∼ b, if
ha, bi ∈ α,β (A × B).
(Note that α,β (A × B) is just Uα,β (α × β).)Two elements are bisimilar just in case there is a bisimulation relating them, as
the following theorem shows.

106

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

Theorem 2.6.2. a ∼ b iff there is a bisimulation R such that ha, bi ∈ R. I.e.,a ∼ b iff there is a coalgebraic relation hR, ρi on hA, αi and hB, βi such that ha, bi ∈Uα,β hR, ρi.
Proof. If a ∼ b then ha, bi is an element of the bisimulation α,β (A × B). On
the other hand, if ha, bi ∈ R, where R is a bisimulation, thenha, bi ∈ R = α,β R ≤ α,β A × B.
Recall from Section 1.5.3 that a coalgebra is simple if it has no proper quotients.
Theorem 2.6.3. If hA, αi is simple, then α,α (A × A) = ∆A .
Proof. By Theorem 1.5.25, if hA, αi is simple, then ∆α is the largest relation
on hA, αi. Hence, [(]α,α A × A) = ∆α and so (by Theorem 2.5.5)
α,α (A × A) = Uα,α ∆α = ∆A
Corollary 2.6.4. If hA, αi is simple then, for every element ha, a0 i of A × A,a ∼ a0 iff a = a0 .
Theorem 2.6.2 and Corollary 2.6.4 provide the proof principle of coinduction: To
prove two elements of a simple coalgebra are equal, it suffices to show that there is abisimulation relating them.
The notion of bisimilarity is intended to capture the informal notion of observational indistinguishability (see [JR97] for another presentation of this viewpoint).
A bisimulation is a relation that is preserved by applications of the structure maps.
Think of the structure map for a coalgebra as a number of destructor operations thatallow one to take a data structure apart and look at the substructures. For instance,
the structure map for an A 7→ Z × A coalgebra consists of two destructor functions:a head function, hα , that gives the head of a stream, and a tail function, tα , which
returns the rest of the stream. We treat the elements of A as the internal state of thecoalgebra, and so view them as unobservable, while the elements of Z are viewed as
observable output. Hence, these destructors give a means of observing the behaviorof the coalgebra A, by applying tα some number of times, followed by hα . This intuition regarding observable behavior can be made explicit for polynomial functors andsimilar inductively given classes of functors, but we do not do so here. See [Jac99]
for an idea of how this is done, and see [Cı̂r00] for a more formal (and sophisticated)notion of a coalgebra observer.
With this informal notion of observations of a coalgebra, two elements of a coalgebra are bisimilar just in case they “look the same.” The principle of coinduction,

2.6. COINDUCTION AND BISIMULATIONS

107

in this perspective, says that two elements of a simple coalgebra that look the same
are the same. In order to justify this informal interpretation of coinduction, we will
look at a few examples.
Remark 2.6.5. The examples below involve coalgebras over Set. Consequently,
we make use of the fact that, thanks to the axiom of choice, a relation R on A and B
is a bisimulation iff there is a structure map ρ :R / ΓR such that hR, ρi is a relation
on hA, αi and hB, βi. See Theorem 2.5.8.
Example 2.6.6. Consider the functor ΓA = Z ×A above (see also Example 1.1.7).
Let hA, αi and hB, βi be Γ-coalgebras, and a ∈ A and b ∈ B. Then a is bisimilar tob just in case(13)

hα (a) = hβ (b),(14)

tα (a) ∼ tβ (b).

Indeed, to prove that a and b satisfying (13) and (14) are bisimilar, we define a
relation R on A and B bycRd ↔ ∃n . tnα (a) = c ∧ tnβ (b) = d.
Then, it is easy to confirm that R is a bisimulation.
Bisimilarity for the functor ΓA = Z × A + 1 is very similar. Let hA, αi andhB, βi be Γ-coalgebras (see Example 1.1.8). We can show that a ∼ b iff α(a) = ∗and β(b) = ∗ or if α(a) 6= ∗, β(b) 6= ∗ and a, b satisfy (13) and (14).
Example 2.6.7. Let P be a polynomial functor, and hA, αi and hB, βi be two
P-coalgebras (see Example 1.1.9). Then an element a ∈ A is bisimilar to an elementb ∈ B just in case(15)

label(a) = label(b),(16)br(a) = br(b),(17)

childj (a) ∼ childj (b) for all j < br(a).

Example 2.6.8. Let AtProp be a collection of atomic propositions and consider
the functor
ΓA = P(AtProp) × P(A).
A Γ-coalgebra is a Kripke model for the language L(AtProp) (see Example 1.1.10).
Let A = hA, αi and B = hB, βi be two such coalgebras, and a ∈ A, b ∈ B. We have108

2. CONSTRUCTIONS ARISING FROM A (CO)MONADa ∼ b iff∀a0 ∈ π2 ◦ α(a) ∃b0 ∈ π2 ◦ β(b) . a0 ∼ b0 ,∀b0 ∈ π2 ◦ β(b) ∃a0 ∈ π2 ◦ α(a) . a0 ∼ b0 ,π2 ◦ α(a) = π2 ◦ β(b).
One can confirm, using these conditions, a ∼ b iff, for all φ ∈ L(AtProp),

a |= φ iff b |= φ.
See [BM96, Theorem 11.7] for the proof of this.
Example 2.6.9. Recall from Example 1.1.11 that coalgebras for the functor
ΓS = (Pfin S)I
can be viewed as automata taking input from I. These are rather basic automata
here, simply moving from one state to another, without giving any “output”, andso the notion of bisimilarity is trivial. Namely, given any two coalgebras hA, αiandhB, βiand any a ∈ A, b ∈ B, we have a ∼ b.
To dress these automata up a bit, we will add a set of outputs, O, and add a map
taking each state to its output. In other words, we wish to consider coalgebras forthe functor∆S = O × (Pfin S)I .
One can show that, given a ∈ U hA, hαo , αs ii and b ∈ U hB, hβo , βs ii that a ∼ b justin case• αo (a) = βo (b);• for all i in I and all a0 such that a

i / 0

i / 0

• for all i in I and all b0 such that b

i / 0

i /

a , there is a b0 such that b

b , there is an a0 such that a

b;
a 0.

We will discuss the relationship between bisimulations and maps into the final
coalgebra in more detail in Section 3.9. For now, we state a simple fact: bisimilarelements are mapped to the same element of the final coalgebra.
Theorem 2.6.10. Let hA, αi and hB, βi be Γ coalgebras, and a ∈ A, b ∈ B be
global points. Let!α :hA, αi/ H1,!β :hB, βi/ H1

be the coalgebra homomorphisms into the final coalgebra. If the terminal object 1 in
E is projective with respect to epis, thena ∼ b implies !α (a) =!β (b).
If Γ preserves weak pullbacks, then the converse also holds.

2.7. n-SIMULATIONS

109

Proof. Let a ∼ b. Then ha, bi ∈ Uα,β (α × β), shown below.
ha, bi/ Uα,β (α × β)n7 7 _
p nnnn

n
c
nn
n
n


/A × BU (α × β)1

Because 1 is projective with respect to epis, there is an element c ∈ U (α × β) suchthat p(c) = ha, bi. Now,!α (a) =!α ◦ πA (ha, bi)=!α ◦ πα (c)=!β ◦ πβ (c) =!β (b).
Under the assumption that Γ preserves weak pullbacks, then so does U [JPT+ 98,
Lemma 2.8]. Thus, the diagram below is a weak pullback.
U (α × β)

/A





!α

B

!β

/ U H1Hence, if !α ◦ πA (ha, bi) =!β ◦ πB (ha, bi), then ha, bi factors through U (α × β) and soa ∼ b.

2.7. n-simulations
One can generalize bisimulations to include n-simulations. This allows a more
uniform treatment of these distinguished relations in an internal logic in Section 4.1.2.
We briefly present the definitions and main theorems here.
A regular nary relation@regular n-ary relation over A1 , . . . , An is a regular subQ
object of Ai .
For each finite family hA1 , α1 i, . . . , hAn , αn i of coalgebras, we define a map
Q
Q/ RegSub( Ai ),Uα1 ,... ,αn :SubCoalg( αi )

by Uα1 ,... ,αn = ∃hU π1 ,... ,U πn i ◦ U αi . We define the category n-sim(α1 , . . . , αn ) to be
the image of this functor.
The functor Uα1 ,... ,αn has a right adjoint, [−]α1 ,... ,αn , defined by[−]α1 ,... ,αn = [−]∗
αi ◦ hU π1 , . . . , U πn i .

QThis gives rise to a comonad α1 ,... ,αn on RegSub( Ai ), and a monad α1 ,... ,αn on
Q
SubCoalg( αi ), that is, an interior operator and a closure operator, respectively.
The  operator takes a relation to the largest n-simulation contained in it, while the110

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD



operator takes a coalgebraic relation to the largest relation with the same image(under Uα1 ,... ,αn ).
In Section 2.5.2, we showed that the bisimulation modal operator is normal if
the endofunctor Γ preserves regular relations. The following theorems shows thatthe same assumption suffices to conclude that the n-simulation modal operate is also
normal (for any n).
Theorem 2.7.1. If Γ preserves regular binary relations and regular monos, thenΓ preserves regular n-ary relations.
Proof. By induction on n. The case for n = 1, 2 is by assumption. Suppose thatΓ preserves regular n-ary relations. It suffices to show that, given a family {Ai }i<n+1 ,Q
QQΓ Ai is a regular subobject of
ΓAi . By inductive hypothesis, Γ i<n Ai is aQregular subobject of i<n ΓAi . Hence, we haveQQQ
Γ( i<n Ai × An )  ,2 / Γ i<n Ai × ΓAn  ,2 / i<n ΓAi × ΓAn ,completing the proof.



Theorem 2.7.2. If Γ :E / E preserves regular relations and pullbacks along regular monos, then, for any finite family
hA1 , α1 i, . . . , hAn , αn i,
α1 ,... ,αn is a normal necessity operator (although it need not preserve > and so istypically not S4).
Proof. As before, it suffices to show that  distributes over ∧. One uses thefact that U preserves regular n-ary relations and thus hU π1 , . . . , U πn i is a regularmono. Hence, ∃hU π1 ,... ,U πn i distributes over ∧. By assumption, U preserves pullbacks
along regular monos, and hence, intersections, and so, sinceα1 ,... ,αn = ∃hU π1 ,... ,U πn i Uαi [−]

∗
αi hU π1 , . . . , U πn i ,the result follows.



The following theorem and corollary are obvious generalizations of Theorem 2.5.19
and Corollary 2.5.20. We omit the proof of these theorems, and prove a related
theorem and corollary hereafter (Theorem 2.7.5 and its corollary).
Theorem 2.7.3. Let {fi :hAi , αi i / hBi , βi i}1≤i≤n be homomorphisms. ThenYY ∗∗[−]α1 ,... ,αn ◦ ( U fi ) = ( fi ) [−]β1 ,... ,βn .
Corollary 2.7.4. Under the same conditions as Theorem 2.7.3,
Uβ1 ,... ,βn ◦ ∃fi = ∃



U fi ◦ Uα1 ,... ,αn .

2.7. n-SIMULATIONS

111

The same facts hold when we replace the products of maps in Theorem 2.7.3 andCorollary 2.7.4 with projections.
Theorem 2.7.5. Let hA1 , α1 i, . . . , hAn , αn i be given. Then[−]α1 ,... ,αn ◦ πi ∗ = πi ∗ ◦ [−]αi(where πi on the left hand side is the projection in E, while on the right hand side, itis the projection in EΓ .
Proof. In Figure 22, the left hand face is a pullback by (the generalization of)Theorem 2.5.12, and the rear face is a pullback because H preserves pullbacks. The
right hand face is a pullback by Theorem 2.2.11. To confirm that the front face
is a pullback, and hence [πi∗ R] = πi∗ [R], it suffices to show that the bottom facecommutes.
Hπi∗ R

dJJ
JJ
JJ
JJ
J

[πi∗ R]
_

H

Q


/ HA

Ai

dJJ
JJ
JJ
JJ
J

/ HR
_ dIII
II
II
II
I
/ [R]
_

Q

αi

dHH
HH
HH
HH
HH

/ hAi , αi i

Figure 22. [−] commutes with pullback along a projection.
The map hA, αi / HA is the adjoint transpose of the identity, i.e., ηα , and the
Q
Q
Q
Q
Q
map
αi / H Ai is (up to the isomorphism H Ai ∼HAi ) the unit
η αi .
=
Thus, we see that the bottom face commutes by naturality.

Corollary 2.7.6. Uα1 ,... ,αn commutes with ∃πi .
Remark 2.7.7. Theorem 2.7.5 and its corollary also apply when we replace πiwith a tuple of projectionsQQ/
α ij .
hπi1 , . . . , πin i : αi

Since, in this case, the [−] operator for the image is the n-simulation operator (andnot merely the subcoalgebra operator), this is a non-trivial observation.

112

2. CONSTRUCTIONS ARISING FROM A (CO)MONAD

This last theorem will be useful in Chapter 4, where we introduce an internal version of the  operators from this chapter. The theorem will be used in Theorem 4.2.3
to yield an axiom for  in the internal logic.
Q
Q
Theorem 2.7.8. Let hAi , αi i, hB, βi be given, and πB :B × Ai / Ai be theevident projection (here, we’ve subscripted the projection with the object that we’re
projecting out). Then πB ∗ ≤ πB ∗ .
Q
Q
Proof. Let πβ :β × αi / αi be the corresponding projection in EΓ , and let
QQ/B ×
p :U (β × αi )
Ai ,
Q
Q
/
q :U αiAi
be the evident maps, so that πB ◦ p = q ◦ U πβ . We omit the subscripts for , U and[−] in the following calculation, but these should be clear from context.
∃π B ◦  ◦ π B ∗ = ∃ π B ◦ ∃ p ◦  ◦ p ∗ ◦ π B ∗= ∃q ◦ ∃U πβ ◦  ◦ (U πβ )∗ ◦ q ∗= ∃q ◦ ∃U πβ ◦ U ◦ πβ ∗ ◦ [−] ◦ q ∗∗= ∃q ◦ U ◦ ∃πβ ◦ πβ ◦ [−] ◦ q∗(by Corollary 2.2.8)(by Theorem 2.2.5)≤ ∃q ◦ U ◦ [−] ◦ q ∗ = .
Hence, by the adjunction ∃πB a πB ∗ , the result follows.

CHAPTER 3

Birkhoff ’s variety theorem
In this chapter, we give an extended example of the categorical approach to classical theorems in universal algebra. The Birkhoff variety theorem [Bir35] relates
closure conditions on classes of universal algebras (for a fixed signature) to defining
equations for the class. We begin by stating the classical theorem. Following this,we translate the relevant ideas to the categorical setting that has been developed in
the preceding chapters.
We give two versions of the variety theorem: In the first, we ignore the features ofcategories of algebras and prove an abstract theorem that applies to many categories.
This abstract theorem doesn’t discuss equational definability explicitly, since a category requires a certain amount of structure before the notion of equations makes
sense. Instead, we state the abstract version of the variety theorem strictly in termsof orthogonality conditions.
We can then apply the abstract theorem to categories of algebras, where we dohave a suitable notion of equation (assuming that the algebraic forgetful functor ismonadic). This allows us to recover the classical theorem, assuming the traditionalsetting. We conclude our discussion of equations in categories of algebras with a presentation of Birkhoff’s deductive completeness theorem in terms of closure operatorson equations over X.
Following this, we dualize the previous work to prove, first, an abstract covariety
theorem, and then a covariety theorem for categories of coalgebras. Because thevariety theorem was proved for categories of algebras over an abstract category, thereal work for the covariety theorem has already been done — although one must still
confirm that the dual setting (a co-Birkhoff category) is a reasonable setting. One
still must interpret the terms of the dualized theorem, which yields definitions ofcoequations and covariety. The strengthening of the variety theorem to the classicalresult (where each variety is equationally definable over a single set of variables — see
Section 3.4 on “uniformly Birkhoff categories”) does not directly dualize, however.
Some work is required to capture the similar result for categories of coalgebras.
Following our presentation of the covariety theorems, we present the dual of thedeductive completeness theorem, which states that a coequation ϕ is the minimal

113

114

3. BIRKHOFF’S VARIETY THEOREM

coequation satisfied by some class of coalgebras just in case ϕ is an endomorphisminvariant subcoalgebra. We conclude the chapter with a discussion of a distinguishedclass of covarieties, the behavioral covarieties. These covarieties were first studied in[GS98], where they were called “complete covarieties”. We present a similar account,
while relating Gumm and Schröder’s work to Grigore Roşu in [Roş01], where thesame class of covarieties are called “sinks”.
3.1. The classical theorem
We fix a signature Σ and consider classes of Σ-algebras. Birkhoff’s variety theorem says that a class V of Σ-algebras is closed under products, subalgebras andhomomorphic quotients just in case it is equationally definable. In this section, we
define these terms and state the theorem.
In order to present the theorem in its historical form, we will use the language ofuniversal algebras (algebras for a signature of function symbols). In Section 3.2, wewill restate the definitions in the terms of Γ-algebras and explore the role of equations
in greater detail. Accordingly, in this section, we state the definitions and theorems
in the notation of Example 1.1.5 (Σ-algebras). Thus, recall that a Σ-algebra is a pair,(n)/ S |f (n) ∈ Σ}i,

S = hS, {fS :S nconsisting of a set S together with interpretations for the function symbols of Σ. A
subalgebra of S is a Σ-algebra,(n)/ T |f (n) ∈ Σ}i,

T = hT, {fT :T n(n)such that T ⊆ S and each fT(n)is the restriction of fS(n)

to T . If/ Si |f (n) ∈ Σ}i

Si = hSi , {fSi :SinQ
Q
is a family of Σ-algebras, then the product Si exists and has as carrier Si . The
Q
interpretation of f n on Si is given by
Y (n) QQ/
fSi :( Si )nSi
Q n∼Q(via the isomorphism ( Si ) = (Si )n ). In other words, the interpretation is given
component-wise.
Definition 3.1.1. Let V be a class of Σ-algebras. We say that V is closed undersubalgebras if, whenever S is in V and T is a subalgebra of S, then T is in V. If,
Qwhenever each Si is in V, then Si is in V, we say that V is closed under products.
We say that V is closed under quotients if, whenever a homomorphismp :S
is a regular epi and S ∈ V, then T ∈ V.

 ,2

T

3.2. A CATEGORICAL APPROACH

115

Definition 3.1.2. Let V be a class of Σ-algebras. If V is closed under subalgebras, products and homomorphic quotients, then V is called a Birkhoff variety.
We now turn to equational definability. We use the fact that Σ-algebras havefree algebras in order to define an equation. Given a set (of variables) X, the freealgebra over X (denoted F X with carrier U F X) is the collection of Σ-terms over thevariables in X (Section 2.1.2). Thus, we can view an equation τ1 = τ2 over X as apair of elements of U F X.
Let(n)/ Si |f (n) ∈ Σ}i
S = hS, {fSi :Sinbe a Σ-algebra. The property of freeness states that, for every assignment σ of thevariables of X to S (i.e., for every Set map σ :X / S ), there is a unique homomorphic
extension/S .
σe :F XAn algebra S satisfies the equation τ1 = τ2 (denoted S |= τ1 = τ2 ) just in case, under
every such assignment σ, we haveσe ◦ τ1 = σe ◦ τ2 .

Given a set E of equations over X, we write

S |= E

just in case S |= τ1 = τ2 for every equation τ1 = τ2 in E. We define
Mod(E) = {S | S |= E}.
The set notation in this definition should not be taken literally. In general, Mod(E)is a proper class.
Definition 3.1.3. Let V be a class of Σ-algebras. We say that V is an equationalvariety just in case there is a set of variables X and a set E of equations over X suchthat
V = Mod(E).
Theorem (Birkhoff’s variety theorem). Let V be a class of Σ-algebras. Then V
is a Birkhoff variety iff V is an equational variety.
3.2. A categorical approachWe now translate Birkhoff’s variety theorem to categorical terms. As we’ve seen,
the category of algebras for a signature, Alg(Σ) is isomorphic to the category Set fora related polynomial functor P (see Example 1.1.5). In this section, we translate theremaining terms of Section 3.1 into categorical terms and prove an abstract version

116

3. BIRKHOFF’S VARIETY THEOREM

of the variety theorem, which holds in a wide variety of categories (and not justcategories of algebras).
3.2.1. Birkhoff categories. We begin by describing some of the properties ofAlg(Σ) that are relevant to Birkhoff’s theorem. In particular, we want to pay close
attention to those properties that lead to natural definitions of Birkhoff variety andequational variety in abstract categories. We will call any category which has therequisite structure a Birkhoff category. We can then prove an abstract version of
the variety theorem. It is just a little work to show that, for a wide variety of basecategories and a wide variety of functors, the category E Γ is a Birkhoff category. In
particular, we will show that, for polynomials P, the category Set (and hence Alg(Σ))
is a Birkhoff category, and so the abstract Birkhoff theorem applies. This does not
immediately lead to the classical theorem, however. Rather, the direct consequenceof the abstract variety for categories of algebras is that every variety is defined by aclass (not a set) of equations. In order to show that a set of equations suffices, weneed to show that Set is uniformly Birkhoff (see Section 3.4).
Recall that a category is regularly co-well-powered just in case each object has only
set-many quotients (Definition A.3.1). We say that an object A is regular projective
if it is projective with respect to regular epis, so that, for every regular epi B  ,2 C
and map A / C , there is a (not necessarily unique) map A / B making the diagram
below commute.





/B
@@
@@
@@ _
 

A@

C

A category has enough regular projectives just in case every object is a quotient ofsome regular projective.
Definition 3.2.1. A quasi-Birkhoff category is a category that is regularly cowell-powered, complete and has regular epi-mono factorizations. A Birkhoff category
is a quasi-Birkhoff category with enough regular projectives.
The Birkhoff categories have the structure necessary for a notion of Birkhoff variety. We postpone the generalization of equational variety until we examine equational
definability in E Γ in more detail.
Definition 3.2.2. Let C be a quasi-Birkhoff category and V a full subcategoryof C. Then V is a quasi-Birkhoff variety (or just quasi-variety)iff V is closed under
products and subobjects. V is a Birkhoff variety if C is a Birkhoff category and V isa quasi-Birkhoff variety closed under quotients (codomains of regular epis).

3.2. A CATEGORICAL APPROACH

117

Remark 3.2.3. Any quasi-variety is closed under isomorphisms, since it is closed
under subobjects.
One may define these closure conditions in terms of fixed points for operators on
subcategories of C. One defines the operator H : Sub(C) / Sub(C) to take a class Vto
HV = V ∪ {C ∈ C | ∃K ∈ V∃q :K

 ,2

C}

(abusing set notation here). Similarly, one defines operators S and P taking V tothe classes
SV = V ∪ {C ∈ C | ∃K ∈ V∃q :K /Y
P V = { Ci | Ci ∈ C, I ∈ Set}.

/ C },

i∈I

Then V is a quasi-Birkhoff variety iff V = SP V and a variety just in case V =HSP V. We don’t make use of these operators hereafter, but see [GS98] for apresentation along these lines.
3.2.2. Equations in E Γ . In Section 3.1, we discussed equations for universal
algebras. We now use that work to give an account of equations for Γ-algebras
generally. Our goal is to find a categorical property that generalizes the notion ofequational definability to a wider class of categories — including categories which
are not monadic over some base category. As we will see in Section 3.2.5, equational
definability is generalized by orthogonality to a regular epi with regular projective
domain.
In order to interpret equations over X in E Γ , we require that Γ is a varietor (i.e.,
the algebraic forgetful functor
U :E Γ

/E

is monadic). Also, for this section, we assume that E is a Birkhoff category thathas all coequalizers. Thus, by Theorem 2.4.2, E Γ has all coequalizers. This assumption isn’t necessary for the final proof of Birkhoff’s variety theorem, but is useful inunderstanding the role of equations in E Γ .
Let X be a set of variables. Then an equation over X is a pair of elements of
U F X, written τ1 = τ2 . Equivalently, an equation is a pair of maps
1

τ1
τ2

// U F X .

Similarly, a set of equations E is given by a pair of jointly monic maps
E

e1
e2

// U F X .

118

3. BIRKHOFF’S VARIETY THEOREM

Recall the definition of satisfaction from Section 3.1. A P-algebra hA, αi satisfies the equations in E just in case, for all σ : X / A, the extension σe : F X / hA, αiequalizes e1 and e2 . That is,/ A, U σe ◦ e1 = U σe ◦ e2 .

hA, αi |= E iff for all σ :X

Let ee1 and ee2 be the adjoint transposes of e1 and e2 , respectively. Let
 ,2

qE :F XhQE , νE i

be the coequalizer of ee1 and ee2 , shown below1.

 / /F X

e1

FE

qE 

e2

,2 hQE , νE i

We note that σe equalizes ee1 and ee2 just in case U σ
e equalizes e1 and e2 . Thus,hA, αi |= E just in case, for every homomorphism/ hA, αi,σe :F X

there is a unique homomorphism

σ :hQE , νE isuch that the diagram below commutes.
FX
qE

_

/ hA, αi /UσhA, αi

s9
sss
s
s
s
sss σ

hQE , νE i

We take this property as central to a generalization of equation satisfaction. We recall
the definition of orthogonality, which can be found in [Bor94] and other introductory
texts.
Definition 3.2.4. A map f :A / B is called orthogonal to an object X (writtenf ⊥ X) if, for every map a :A / X , there is a unique map b :B / X such that a = b◦f .
Thus, hA, αi |= E iff qE ⊥ hA, αi.
This leads to the following definition of equational variety:
Definition 3.2.5. Let E Γ be a quasi-Birkhoff category and let V be a full subcategory of E Γ . We say that V is an equational variety if
V = {hA, αi | q ⊥ hA, αi}for some regular epi q with domain F X (for some X ∈ E).
1We could instead consider the coequalizer of hEi, the pre-congruence containing E (see Section 1.4.2) The coequalizer of hEi is isomorphic to the coequalizer of ee1 and ee2 , though we omit theproof.

3.2. A CATEGORICAL APPROACH

119

Equivalently, following the presentations of [AN81a, BH76, AR94], etc., one
could say that an equational variety is just the injectivity class of some quotient
F X  ,2 Q. The author discovered these alternative approaches after developing thetheory in terms of orthogonality, and we present that development here.
3.2.3. Orthogonality. Definition 3.2.5 indicates the basic approach that wetake: orthogonality is a generalization of satisfaction of a set of equations. In thissection, we introduce some notation for discussing orthogonality and state some basic
results.
If S is a collection of arrows of C, we write S ⊥ C if f ⊥ C for all f ∈ S. Similarly,
if V is a collection of objects (equivalently, a full subcategory) of C, we write f ⊥ V
if f ⊥ C for each C ∈ V. We define the notation S ⊥ V in the obvious way.
Given a category C and a collection of maps S in C, S ⊥ is the collection of all
objects C of C such that S ⊥ C. Similarly, given a collection of objects V of C, V ⊥is the collection of all arrows f in C such that f ⊥ V.
In these terms, V is an equational variety just in case V = {q : F X  ,2 •}⊥ forsome regular epi q.
The class of all collections of maps of C forms a poset, Sub(C1 ), taking inclusion as
the ordering. Similarly, the class of all full subcategories of C forms a poset, Sub(C0 ).
Thus, the ⊥ operators are maps between posets. Since S ⊆ T implies S ⊥ ⊇ T ⊥ ,and likewise for the ⊥ operator with domain Sub(C0 ), we can view these operators asfunctors/(Sub(C0 ))op
Sub(C1 ) o
It is easy to see that, given a collection of maps S and a full subcategory V, S ⊥ ⊆ V
iff S ⊇ V⊥ . Thus, the two ⊥ functors form a Galois correspondence (see [Bor94,
Volume 1, Example 3.1.6.m]) and so ⊥⊥ is a closure operation.
Given a collection of arrows, S, we say that S spans the collection of arrows S ⊥⊥ .
In particular, if S ⊥ = V, then S spans V⊥ . Because the ⊥ functors form a Galois
correspondence, S ⊥ = S ⊥⊥⊥ . Thus, if S ⊥ = V, we have V = V⊥⊥ . In this case, we
say that V is closed.
Remark 3.2.6. The subcategory S ⊥ is denoted Inj(S) by some authors, to denotethe collection of objects which are injective with respect to S.
3.2.4. An abstract version of Birkhoff ’s theorem. In this section, we provea quasi-variety theorem for abstract categories. This theorem is essentially found in[BH76] and is generalized in various articles by Andreéka and Németi, but was
independently proven by the author before being referred to these articles2.
2Thanks to Jiřı́ Adámek and an anonymous reviewer for [Hug01] for these references.

120

3. BIRKHOFF’S VARIETY THEOREM

Theorem 3.2.7. Let C be a quasi-Birkhoff category and V a full subcategory of
C. The following are equivalent.
(1) V is closed under products and subobjects (i.e., V is a quasi-variety).
(2) V is a regular epi-reflective subcategory of C. That is, a subcategory whose
inclusion U V :V / C has a left adjoint F V such that each component of theunit η V :U V F V / 1C is a regular epi.
(3) V is closed. I.e., V = S ⊥ for some collection S of regular epis.
Proof. We prove each implication in turn.
(1)⇒(2): We first show that the inclusion U V has a left adjoint. Since V
is closed under limits, it suffices, by the adjoint functor theorem ([Bor94,
Volume 1,Theorem 3.3.3]), to show that for each C ∈ C, there is a set ofobjects ΘC ⊆ V such that for each K ∈ V and each f : C / K in C, ffactors through some K 0 ∈ ΘC .
Take ΘC to be the collection of quotients of C in V. This is a set, since
C is regularly co-well-powered. Given any f : C / K with K ∈ V, we takethe regular epi factorization of f , shown below.
f

/K
|>
|
|
||
_ |
>|

C

K0

Then K 0 is in V, since V is closed under subobjects. Thus, we may take K 0
to be an object of ΘC .
Because V is closed under subobjects, the reflection is a regular epireflection ([Bor94, Volume 1, Proposition 3.6.4]).
(2)⇒(3): We will show that (η V )⊥ = V. That V ⊆ (η V )⊥ is obvious from thecharacteristic property of η V :1 +3 U V F V . We will show the other inclusion.
Accordingly, suppose that η V ⊥ C. Then ηCV ⊥ C in particular and thus,
there is a map id :U V F C C / C such that the diagram below commutes:
C
V
ηC

:C
uu
uu
u
u
_ uuuu id

U VF VC

Since ηCV is thus both regular epi and mono, it is an isomorphism. Since V
is closed under isomorphisms (Remark 3.2.3), C ∈ V.
(3)⇒(1): Let S be a collection of regular epis and V = S ⊥ . It is easy to seethat V is closed under products. Suppose that K 0 ∈ V and i : K / / K 0 . Let
f :A  ,2 B ∈ S ⊥ and g :A / K be given, as in Figure 1. Then, since f ⊥ K 0 ,there is a unique map ı ◦ g : B / K 0 such that ı ◦ g ◦ f = i ◦ g. Since f is

3.2. A CATEGORICAL APPROACH

121

regular and hence strong, there is a unique map g, as shown, making thediagram commute.
g

A
f

g

_

B

/K
>


i



i◦g

/ K0

Figure 1. S ⊥ is closed under subobjects.
Corollary 3.2.8. Let C be a quasi-Birkhoff category and V a quasi-variety of
C. Then(1) V = (η V )⊥ .
(2) For each C ∈ C, C ∈ V iff ηCV ⊥ C, where η V is the unit of the adjunction
F V a U V.
(3) The counit εV :F V U V / 1V is an isomorphism.
(4) The corresponding monad, T V = U V F V , is idempotent.
(5) The monad T V preserves regular epis.
Proof. We sketch each item in turn.
(1) See the proof of (2)⇒(3) in Theorem 3.2.7.
(2) If C ∈ V, then C ⊥ ηCV by (1). On the other hand, if C ⊥ ηCV , thenC∼
= T V C by the proof of (2)⇒(3) in Theorem 3.2.7.
(3) The functor U V is full and faithful, so [Bor94, Proposition 3.4.1, Volume 1]
applies.
(4) This follows from [Bor94, Volume 2, Theorem 4.2.4], and can also be seen
directly in the proof of (2)⇒(3).
V◦ q and the right hand(5) Let q :A / Q be a regular epi. Since T V q ◦ ηAV = ηQ
Vside is a regular epi, so is T q (see Figure 2).
/ T VQ_LR

T VLR A
V
ηA

_

A

V
ηQ

q

 ,2

Q

Figure 2. T V preserves regular epis.

122

3. BIRKHOFF’S VARIETY THEOREMExample 3.2.9. Set is quasi-Birkhoff. However, the only quasi-varieties of Set
are trivial. Let V be a quasi-variety. If 2 ∈ V, then 2α is in Set for every ordinal α.
Since V is closed under subobjects, we have that V = Set. If 2 6∈ V, then V must
consist of just 0 and 1.
Example 3.2.10. The category of monoids, Mon, is complete, regular and wellpowered. Hence, Mon is a quasi-Birkhoff category. Let V be the subcategory of
Mon consisting of all those monoids satisfying∀x ∈ M (x2 = e → x = e).
Then V is clearly closed under subalgebras and limits. Thus, by Theorem 3.2.7, V
is a regular epi-reflective subcategory of Mon.

3.2.5. The generalized Birkhoff variety theorem. The following may beseen as a generalization of Birkhoff’s variety theorem. Recall from Section 3.2.2 thata class V of Γ-algebras satisfies a set E of equations over a set X of variables justin case V is orthogonal to a certain regular epi with domain F X. In the following
theorem, we show that V is a Birkhoff variety iff V is orthogonal to a collection ofregular epis with regular projective domains. The regular projective objects play therole of F X (which is regular projective if X is regular projective) in this theorem.
Once we have proven this theorem and shown that it applies to categories ofalgebras E Γ (for appropriate base E and functor Γ), we have still not quite recovered
the classical theorem. In particular, we will have shown, essentially, that any varietyof algebras V is definable by a class of equations (i.e., V = S ⊥ for a class of arrows S),
rather than by a set of equations. This property is the distinction between Birkhoff
categories and uniformly Birkhoff categories, which we discuss in Section 3.4.
Theorem 3.2.11. If C is a Birkhoff category, then a full subcategory V is a variety
iff V⊥ is spanned by a collection of regular epis with regular projective domains.
Proof. Suppose that V is a variety. Then V is a regular epi-reflective subcategory of C. Let F V a U V with unit η V , as in Theorem 3.2.7. For each C ∈ C, pick a
regular epi pC :AC / C , with AC regular projective, and let S be the collection of all
ηAVC :AC

 ,2

U V F V AC .

Then S ⊆ (η V ) and so S ⊥ ⊇ (η V )⊥ = V. To see that V = S ⊥ , suppose thatS ⊥ C and we will show that C ∈ V. Since S ⊥ C, there is a map pC such that

3.2. A CATEGORICAL APPROACH

123

pC ◦ ηAVC = pC .
AC
V
ηA

C

V

_

pC

 ,2
5 6? C
u
u
uu
uu
u
uu pC

U F V AC

Since pC is a regular epi, so is pC . Thus, C is a quotient of U V F V AC and hence is in
V.
Suppose conversely that V⊥ is spanned by a collection S of regular epis withregular projective domains. Then V is closed under subobjects and limits (Theorem 3.2.7), so it suffices to show that V is closed under quotients. Let K ∈ V andp :K  ,2 K 0 be given. We wish to show that S ⊥ K 0 . Let f :A  ,2 B ∈ S and g :A / K 0
be given.
g0

/K
AA
AA
p
f
A
_ g AA _
/ K0
B

AA

p◦g

Since A is regular projective, there is a g 0 :A / K such that p ◦ g 0 = g. Since f ⊥ K,
there is a unique g :B / K such that g ◦ f = g 0 . Thus,p ◦ g ◦ f = p ◦ g 0 = g.
Because f is epi, p ◦ g is the unique map with this property.



Example 3.2.12. Consider the full subcategory Ab of Mon consisting of abelianmonoids. That is, a monoid M is in Ab just in case for every m, n in M ,m · n = n · m.
This subcategory is a variety of Mon. It is easy to see that, if M is abelian and N
is the homomorphic quotient of M , then N is abelian.
Ab⊥ is spanned by a single regular epimorphism with regular projective domain.
Let F 2 be the free monoid generated by two elements, a and b. Let ab, ba :1 / U F 2
be the obvious constant maps. These correspond under adjoint transposition to maps
F1

ab
ba

// F 2.

Take the coequalizer q : F 2  ,2 Q of these homomorphisms. Then a monoid M isevidently in Ab iff q ⊥ M .
Example 3.2.13. Consider again the full subcategory V of Mon consisting of
monoids where no non-unit element is its own inverse (from Example 3.2.10). This

124

3. BIRKHOFF’S VARIETY THEOREMpg

T VLR K
V
ηK

_

K

T Vk

1

T V k2 ,2// T V A
_LR

T Vq

V
ηQ

V
ηA

k1
k2

//

T VLR Q

A

q

 ,2

& /6 T V /f
7 7A QDLg_

Q

Figure 3. T V preserves coequalizers.
subcategory is not closed under quotients. For instance, the map
 ,2

p :N

2

taking even numbers to 0 and odd numbers to 1 is a regular epi in Mon, but 2 6∈ V.
In Corollary 3.2.8, we saw that, if V is a quasi-variety, then T V preserves regular
epis. We can strengthen that result if V is a variety.
Corollary 3.2.14. If V is a variety, then the monad T V : C
equalizers.

/ C preserves co-

Proof. Let
K

k1
k2

// A

q 

,2 Q

be a coequalizer. Suppose that f : T V A / B coequalizes T V k1 and T V k2 . Take theregular epi-mono factorization of f , f = i ◦ p (see Figure 3). ThenVp ◦ ηAV ◦ k1 = p ◦ T V k1 ◦ ηKV
= p ◦ T V k2 ◦ η K= p ◦ ηAV ◦ k2 ,so there is a unique map g :Q / B such that p ◦ ηAV = g ◦ q. Since T V A/f ∈ V, theV= g. This factorization gives themap g factors uniquely through T V Q, say g ◦ ηQ
desired map
T VQ

g 

,2 T V /f i// B.

Since g◦T V q = p and p is a regular epi, so is g. By the uniqueness of regular epi-monofactorizations, i ◦ g is the unique map such that i ◦ g ◦ T V q = f .

3.3. CATEGORIES OF ALGEBRAS

125

3.3. Categories of algebras
In this section, we will show that Theorem 3.2.11 (the abstract variety theorem)
is a generalization of the classical variety theorem. To this end, we must first showthat categories of algebras E Γ are Birkhoff categories, for suitable base categories E
and endofunctors Γ. It will follow, then, that any Birkhoff variety V of E Γ satisfies
V = S ⊥ for some collection S of regular epis with regular projective domains.
The classical theorem says that any variety is an equational variety for some set
E of equations. If we apply Theorem 3.2.11 to categories E Γ , we learn only that eachvariety is definable by some class of equations. To recover the classical theorem, somemore work is needed. In Section 3.4.1, we will discuss further conditions on E and Γthat allow one to conclude that any Birkhoff variety is an equational variety.
The work in this section is similar to work found in [BH76] and extended byAndréyka and Németi. A similar approach is also found in [AR94].
3.3.1. Categories of algebras are Birkhoff categories. We will first lookat some conditions that are sufficient to ensure that a category of algebras is a
Birkhoff category, in the sense of Definition 3.2.1. Throughout this section, let E
be an arbitrary category and let Γ be an endofunctor on E. As we will see, it issufficient that E is quasi-Birkhoff and Γ preserves regular epis to conclude that E Γ isquasi-Birkhoff.



Theorem 3.3.1. If E is quasi-Birkhoff and Γ preserves regular epis, then E Γ isquasi-Birkhoff. The same claim holds for categories E of algebras over a monad Tthat preserves regular epis.
Proof. We need to show that E Γ is regularly co-well-powered, complete and has
regular epi-mono factorizations.
• E Γ is complete by Theorem 1.2.4 (U creates limits).
• E Γ has regular epi-mono factorizations by Theorem 1.2.13.
• E Γ is regularly co-well-powered since E is regularly co-well-powered and U
preserves regular epis (Corollary 1.2.15).
Since each of the above facts also holds for categories of algebras over a monad, so
does this theorem.
The additional requirement that ensures that E Γ has enough regular projectives(so that E Γ is a Birkhoff category) is natural enough. Given that E Γ is quasi-Birkhoff,
we need only the additional assumption that Γ is a varietor (that is, that U ismonadic). This assumption is useful for our interpretation of equations and so isreasonable in this setting. However, recent work in [AP01] shows how to define
equational varieties for categories of algebras without free algebras.

126

3. BIRKHOFF’S VARIETY THEOREM

Corollary 3.3.2. If E is Birkhoff, Γ preserves regular epis and U has a left
adjoint, F , then E Γ is Birkhoff. The same claim holds for categories E of algebras
for a regular-epi-preserving monad T .
Proof. Given hC, γi in E Γ , let p : A  ,2 C be a regular projective covering of
C. We will first show that F A is regular projective. Let f : F A / hD, δi andq : hB, βi  ,2 hD, δi be given (see Figure 4). Because A is regular projective, there

U FO A
ηA

Uf
Uf#

/D
_LR

Uq

"

A

f

/B

Figure 4. The free algebra over a regular projective object is regular projective.
is a map f making the square commute. This ensures the existence of f # making
both triangles commute. Hence, F A is regular projective.
All that remains is to show that F A covers hC, γi. By the adjunction F a U ,there is a unique map p# :F A / hC, γi such that the diagram below commutes.
U FO AFFF U p#
FF
FF
F
 '
,2

ηA

A

p

C

Because U reflects regular epis, p# is a regular epi.
Since only the characteristic property of freeness was used in the above reasoning,and categories of algebras over a monad always have free algebras, the claim holds
for E as well. (Alternatively, prove the claim for categories E and use the fact
that, given the hypotheses, U is monadic, i.e., E Γ ≡ E for the monad T induced by
F a U .)








Thus, if E is Birkhoff, Γ preserves regular epis and is a varietor, then Theorem 3.2.11 applies. Hence, a full subcategory V of E Γ is a Birkhoff variety iff V
is closed, and V⊥ is spanned by a collection of regular epis with regular projective
domains. This is not quite sufficient to imply the classical variety theorem, however.
For that, we need to show that there is a projective X such that
V is a Birkhoff variety iff V = {q :F X  ,2 hQ, νi}⊥ for some regular epi q.
In other words, we need to show that V is “definable” by a single regular epi q withregular projective domain, not a collection of such arrows. For this, we introduce thenotion of “uniformly Birkhoff categories” in the next section.


We close this section with a proof that, if V is a variety over E , then V is alsomonadic over E. Together with Corollary 3.2.14 (T preserves coequalizers), we seethat V ≡ E for a regular-epi-preserving monad T and so is again a Birkhoff cate3.4. UNIFORMLY BIRKHOFF CATEGORIES

127

V

0

0

gory. Hence, the variety theorem again applies, and subvarieties of V are equationallydefinable (by, perhaps, a proper class of equations).



Theorem 3.3.3. Let V be a variety of E . Then V is monadic over E, via theevident forgetful functor.
Proof. We apply the special adjoint functor theorem (see [Bor94, Theorem
4.4.4,Volume 2]). Of course, U ◦ U V has a left adjoint and reflects isomorphisms sinceboth U and U V do. The functor U creates split coequalizers (since it is monadic) andU V creates all coequalizers (an easy consequence of Corollary 3.2.14), the composite
creates split coequalizers.

3.4. Uniformly Birkhoff categories
We have shown that, if E is Birkhoff, Γ preserves regular epis and is a varietor,
then E Γ is Birkhoff. Thus, any variety V is defined by a collection of regular epis withregular projective domains. In terms of equations, this means that any variety V isdefined by a class of equations over a class of variables. Birkhoff’s variety theorem[Bir35] says something stronger. Namely, that any variety V is defined by a set of
equations over a countable set of variables.
Categorically, then, we must show that there is a regular projective X ∈ E suchthat, for any variety V, there is a regular epi p with domain X such that V = {p}⊥ .
We state this condition in general terms in the following definition.
Definition 3.4.1. A Birkhoff category C is uniformly Birkhoff if there is a regularprojective object X ∈ C such that for any variety V, V = {p}⊥ for some regular epi
p with domain X. The object X is called the equational domain for C.
From Theorem 3.2.7, we know that any variety V satisfies
V = (η V )⊥ .
In a uniformly Birkhoff category, any variety satisfies a stronger condition: namely,thatV/ T V X }⊥ ,V = {ηX:X
where X is the equational domain for C.
Theorem 3.4.2. Let C be uniformly Birkhoff and let X be the equational domain
for C. Let V be a variety of C, with η V the unit of the evident adjunction F V a U V .
V ⊥} .
Then V = {ηX128

3. BIRKHOFF’S VARIETY THEOREM

Proof. Let V be a variety of C and let p :X  ,2 Y be given such that V = {p}⊥ .
VV
It suffices to show that, for all A ∈ C, if ηX⊥ A, then p ⊥ A. This is clear, since ηX
factors through p.
The remainder of this section will be devoted to a discussion of conditions that
ensure a category of algebras is uniformly Birkhoff. These conditions will be suggestedby the original proof of the variety theorem. The conditions are also influenced by
the work of [AR94], in which the theory of locally finitely presentable categories
is developed. It appears, however, that a locally finitely presentable category isn’t
sufficient for this goal. In one sense, we need a stronger condition: that regularprojective objects are colimits of finitely presentable retracts. On the other hand, we
don’t require that every object has a presentation. Instead, it suffices that certain
regular projective objects have a retractable presentation in order to show that thecategory is uniformly Birkhoff.
We recall the following definitions from ibid.
Definition 3.4.3. An object K in C is finitely presentable if the functor
Hom(K, −) :C/ Set

preserves filtered colimits.
Definition 3.4.4. A category C is locally finitely presentable if it is cocomplete
and there is a set A of finitely presentable objects of C such that every object is afiltered colimit of objects of A.
The remaining work is technical and abstruse. This section is self-contained —there are no later results in this thesis that require the definitions and theorems that
follow. The casual reader may wish to skim what remains here.
Remark 3.4.5. Throughout this section, we use finitely presentable objects andprove facts about filtered colimits in C. This work can be generalized, so that the objects of interest are κ-presentable and the colimits are colimits of κ-filtered diagrams.
We avoid the more general statements and proofs in order to present this work in a
simpler form.
As we will see, a key step in showing that a category C is uniformly Birkhoff isshowing that every variety of C is closed under filtered colimits. We first consider theV ⊥case in which V = {ηX} where X is finitely presentable. In the classical setting,this corresponds to a variety of algebras which are defined by a set of equations overa finite set of variables. Such varieties are easily shown to be closed under filteredcolimits. This fact will be used in Theorem 3.4.9, in which we prove that every variety(in a suitable category) is closed under filtered colimits.

3.4. UNIFORMLY BIRKHOFF CATEGORIES

129

Lemma 3.4.6. Let f :X / / Q be given with X finitely presentable. Then {f }⊥ isclosed under filtered colimits.
Proof. Let A ∈ C and K : E
with colimiting cocone/ C be a filtered diagram such that A = colim K

k :K

+3 A.

Assume, further, that for each E ∈ E, f ⊥ KE. We will show that f ⊥ A, so thatA ∈ {f }⊥ .
Let g :X / A be given. Since X is finitely presentable, there is an E ∈ E and a
map
/ KE
g :X
such that g = kE ◦ g. Hence, there is a unique
ge :Q

/ KE

such that g = ge ◦ f and so g = kE ◦ ge ◦ f (see Figure 5). Uniqueness follows from the
X
f



Q

g

g

/A
O

kE

 / KE!

g

Figure 5. {f }⊥ is closed under filtered colimits.
fact that f is epi.



We now turn our attention to a special case of a presentation by finitely presentable objects. In this case, we assume that an object is the filtered colimit offinitely presentable retracts, and so this is a stronger condition than that requiredby a locally presentable category. However, we will not require that every object hassuch a presentation (see Definition 3.4.8).
The notion of “retractably presentable regular projective” and Theorem 3.4.9 are
due to Steve Awodey.
Definition 3.4.7. Let X ∈ C. We call a filtered diagram J :D
presentation of C if J satisfies the following:/ C a retractable• colim J = X with cocone j :J +3 X ;• Each JD is finitely presentable;• Each JD is a retract of X (i.e., for each jD , there is a pD :X  ,2 JD such thatpD ◦ jD = idJD ).

130

3. BIRKHOFF’S VARIETY THEOREM

If there is a retractable presentation of X, then we say that X is retractably presentable.
Definition 3.4.8. A category C has enough retractably presentable regular projectives if each object of C is a quotient of a retractably presentable regular projective
object.
It is easy to check that, in a Birkhoff category C with enough retractably presentable regular projectives, any variety is determined by regular epis with retractablypresentable regular projective domains. In fact, if B is any class of regular projectives
such that each object of C is covered by an object in B, then any variety is definedby regular epis with domains in B. Moreover, to confirm that an object A is in aVvariety V, it suffices to check that ηX⊥ A for some X ∈ B covering A.
In a category with enough retractably presentable regular projectives, every variety V is closed under filtered colimits. This implies that the monad T V preserves
filtered colimits.
Theorem 3.4.9. Let C have enough retractably presentable regular projectives.
Let V be a variety of C. Then V is closed under filtered colimits.
/ C be a filtered diagram such that A = colim K

Proof. Let A ∈ C and K : E
with colimiting cocone

k :K

+3 A.

Assume, furthermore, that each KE ∈ V. We will show that A ∈ V.
Let X be a retractably presentable regular projective which covers A and let
X = colim J with cocone j and retractions p, as in Definition 3.4.7. It suffices (byV⊥ A to prove A ∈ V. Let ΘX be thethe proof of Theorem 3.2.11) to show that ηX
V
kernel pair of ηX — so ΘX is the “set” of equations satisfied by T V X.
For each D ∈ D, take the pullback ΘD as shown below.
ΘD  ,2
 _

/ ΘX







JD × JDj ,2×j / X × X
DD

Because D is filtered, ΘX is the colimit of the ΘD’s. Define a functor Q : D / C bytaking QD to be the coequalizer of ΘD, as shown in Figure 6. Because colimits
commute with coequalizers, T V X is the colimit of Q.
We next show thatV ⊥{ηX
} ⊆ {qD | D ∈ D}⊥ .

3.4. UNIFORMLY BIRKHOFF CATEGORIES

//

ΘX
O
ϑD

_LR

pD

//

ΘD

V
ηX


XU
k SEL,2 T V X
O
νD

jD

JD

131

qD

 ,2

QD

Figure 6. T V X is the colimit of Q.
VLet ηX⊥ B and let f :JD(ΘD, resp.). Then,/ B . Let x1 , x2 (d1 , d2 , resp.) be the projections of ΘXf ◦ d 1 = f ◦ p D ◦ x1 ◦ ϑD
V(since ηX⊥ B)= f ◦ p D ◦ x2 ◦ ϑD
= f ◦ d2and so qD ⊥ B.
V
Thus, since each ηX⊥ KE by hypothesis, for each D ∈ D, we also have qD ⊥ KE.
Now, by definition, each JD is finitely presentable. Thus, by Lemma 3.4.6, A is
orthogonal to each qD . It is routine to check that, since colim Q = T V X and eachVqD ⊥ A, then also ηX⊥ A.
Theorem 3.4.10. Let C be a quasi-Birkhoff category and let V be a quasi-varietyof C closed under filtered colimits (i.e., the inclusion V / C creates such colimits).
Then the monad/C
T V :C
preserves filtered colimits.
Proof. Let E be filtered and let A be the colimit of K : E / C , with colimiting
cocone k : K +3 A. Let j : T V K +3 B be a colimiting cocone. We wish to show thatB∼
= T V A.
AO

V
ηA


,2 T V A
O \
m

kE

KE

n

 ,2

V
ηKE

T V KE

jE

)/ 

B

Because B ∈ V, ηAV ⊥ B. Hence there is an m : T V A / B such that j = m ◦ T V k.
Because j is colimiting, there is an n :B / T V A such that n ◦ j = T V k. It is routine
to check that m and n are inverses.

Let A = colim J :D / C , where D is a filtered category and let V be a variety closed
under filtered colimits. Then, in order to check whether an object C is orthogonal to132

3. BIRKHOFF’S VARIETY THEOREMVηAV , it suffices to check that it is orthogonal to each ηJD. In the traditional setting,where C is a category of algebras and A = F X and each JE = F Y for some finite
Y , this means the following: an algebra hC, γi satisfies each of the equations (forV) over X just in case it satisfies each of the equations (for V) over a finite set ofvariables. We prove this claim in a general setting presently.

Corollary 3.4.11. Let C be quasi-Birkhoff and D be filtered. Let J : D / C be
given and X = colim J with colimiting cocone j :J +3 X . Suppose, further, that V isclosed under filtered colimits. Then
V
V ⊥
{ηJD
| D ∈ D}⊥ ⊆ {ηX} .

Proof. Let {ηJV } ⊥ A and f : X / A be given. Then, for each D ∈ D, thereV
is a map fD : T V D / A such that fD ◦ ηJD= f ◦ jD . The fD ’s form a cocone overV
V
V
V
T J. Since the colimit of T J is T X, we have the factorization of f through ηX,
as desired.

Thus far, we have discussed a condition that ensures that every Birkhoff variety isclosed under filtered colimits. While this is a step towards proving that a category is
uniformly Birkhoff, there is still some work to be done. Specifically, given a Birkhoff
category C with enough retractably presentable regular projectives, we must pick out
a particular object X that will serve as an equational domain. The theorem below
shows sufficient conditions for X to be an equational domain. These conditions are
attained in Set, for instance, with X = N.
The following lemma is the dual of Lemma 3.7.21. We prove it in Section 3.7.2.
Lemma 3.4.12. Let V be a variety in the Birkhoff category C and let A be aquotient of B. Then{ηBV }⊥ ⊆ {ηAV }⊥ .
Theorem 3.4.13. Let C be Birkhoff and have enough retractably presentable regular projectives and let X satisfy the following:• X is regular projective;• The set of non-empty, finitely presentable objects is a retractable presentation
for X.
Then C is uniformly Birkhoff and X is the equational domain for C.
Proof. Let B be the set of non-empty, finitely presentable objects, so that B isa retractable presentation of X.
V
Let V be a variety of C. Let A ∈ C and ηX⊥ A. We will show that A ∈ V.
V
It suffices to show that ηY ⊥ A for a retractably presentable regular projective
Y covering A. Let J : D / C be a retractable presentation for Y . Then, for each3.4. UNIFORMLY BIRKHOFF CATEGORIES133

VD ∈ D, JD is a quotient of X and so ηJD⊥ A (Lemma 3.4.12). Thus, ηYV ⊥ A(Corollary 3.4.11).


3.4.1. Uniformly Birkhoff categories of algebras. The preceding section
demonstrated sufficient conditions for an abstract category to be uniformly Birkhoff.
In this section, we show that, if E satisfies these conditions and Γ preserves regular epis and filtered colimits (more generally, κ-filtered colimits), then E Γ is also
uniformly Birkhoff. This will conclude the reconstruction of the classical Birkhoff
variety theorem in a categorical setting.
In particular, the category Set satisfies the conditions of Theorem 3.4.13 (so Set
is uniformly Birkhoff). Thus, if Γ :Set / Set preserves filtered colimits, then SetΓ isuniformly Birkhoff. Moreover, the free algebra over a countable set is an equational
domain for SetΓ . In other words, if Γ preserves filtered colimits, then any variety ofSetΓ is definable by a set of equations over a countable set of variables (which is, ofcourse, just the classical Birkhoff theorem as found in [Bir35]).
We begin by showing that if X is finitely presentable and Γ preserves filtered colimits, then the free algebra F X is finitely presentable. Hence, applying Lemma 3.4.6,
we see that any V defined by a set of equations E over finitely presentable X is closed
under filtered colimits.
Lemma 3.4.14. Let Γ :E / E preserve filtered colimits and be a varietor with F left
adjoint to U :E Γ / E . If X ∈ E is finitely presentable then F X is finitely presentable.
Proof. Let hA, αi = colim K :E

/ E Γ , E filtered, and f :F X

/ hA, αi. ThenU A = colim U K
and so the adjoint transpose fe: X
factors through KE.

/ A of f factors through some U KE.

Thus, f

Lemma 3.4.14 ensures that E Γ inherits the relevant structure (for Theorem 3.4.13)
from E. In particular, one shows that if X is a retractably presentable regular projective, then so is F X (under the assumptions of Lemma 3.4.14). From this, it follows
that E Γ has enough retractably presentable regular projectives whenever E does. We
show this in Theorem 3.4.15, which directly implies Birkhoff’s variety theorem foruniversal algebras. This completes the categorical approach to the 1935 theorem.
Theorem 3.4.15. Let E, X satisfy the conditions of Theorem 3.4.13. Let Γ bepreserve regular epis and filtered colimits. Then E Γ is uniformly Birkhoff and F X isan equational domain for E Γ .
Proof. Let B be the category of non-empty, finitely presentable objects of E, so
X = colim B. Then F X is the colimit of F B (left adjoints preserve limits), and for134

3. BIRKHOFF’S VARIETY THEOREM

each B ∈ B, F B is finitely presentable. Furthermore, each F B is a quotient of F X,
since F preserves coequalizers.
For each hA, αi ∈ E Γ , there is a retractably presentable regular projective YA suchthat F YA covers hA, αi. Furthermore, each F YA has a retractable presentation using
the objects of F B. Now, F B is not the collection of all finitely presentable algebras.
Nonetheless, a simple alteration of the proof of Theorem 3.4.13 using the above facts
shows that F X is an equational domain (for our purposes, F B is a sufficient collectionof finitely presentable algebras).

Example 3.4.16. If Γ :Set / Set preserves filtered colimits (for instance, if Γ isa polynomial), then F N is a presentational domain for SetΓ . Consequently, F N is
an equational domain for SetΓ . In other words, every variety in SetΓ is defined by aset of equations over a countable set of variables.
We finish this section by showing that Theorem 3.4.17 does indeed yield the
traditional statement of Birkhoff’s theorem. To do this, we first recall the definitions
from Section 3.2.2
An equation over X is a pair of global elements// U F X

1of U F X and that a set of equations over X is given by a pair of maps
E

e1
e2

// U F X .

An algebra hA, αi satisfies E just in case, for every homomorphismσe :F X/ hA, αi,Uσe coequalizes e1 and e2 . Equivalently, hA, αi |= E just in case q ⊥ hA, αi, where q
is the coequalizer of// F X .
FE
With these definitions in mind, it is easy to see that Birkhoff’s variety theorem isa corollary to Theorem 3.4.15.
Theorem 3.4.17. Let E be a Birkhoff category and Γ preserve regular epis and is avarietor. Suppose, further, that the category E Γ is uniformly Birkhoff, with equational
domain F X. A full subcategory V of E Γ is a variety iff there is a set E of equations
over X such thathA, αi ∈ V iff hA, αi |= E.
Proof. Let V be a variety and η V the unit of the adjunction F V a U V . LetΘX be the kernel pair of η V . ThenhA, αi ∈ V iff hA, αi |= U ΘX.

3.5. DEDUCTIVE CLOSURE

135
3.5. Deductive closure
We continue developing the results of Section 3.4.1. Consequently, throughout weassume that E is a Birkhoff category, Γ preserves regular epis and is a varietor. Also,
we fix a regular projective X ∈ E. For another presentation of this material and thematerial of Section 3.8, see [Hug01].
Birkhoff’s variety theorem may be viewed as showing an equivalence between
equational definability on the one hand and closure under the operators H, S and P
from Section 3.2.1 on the other. When we say that a class V is equationally definable(over the fixed set X of “variables”), we mean that there is a set E of equations overX such that V consists of just those algebras which satisfy E. This suggests anoperator
SatX :Rel(U F X, U F X)

/ Sub(E Γ ),taking a set E of equations to the variety
SatX (E) = {hA, αi ∈ E Γ | hA, αi |= E}(hereafter, we omit the subscript). In other words, if q is the coequalizer of the
diagramFE// F X,

then Sat(E) = {q}⊥ . In these terms, Theorem 3.4.17 says that, for any class V ofalgebras,
V = HSP V
just in case there is some E ≤ U F X × U F X such that
V = Sat(E).
One may ask whether there is an analogous result for sets of equations. That is, given
a set E of equations, when does E consist of exactly those equations which hold insome variety V?
More precisely, we define an operator
IdX :Sub(E Γ )/ Rel(U F X, U F X)

(hereafter, omitting the subscript) taking a class of algebras V to the set of equations{e1 = e2 | V |= e1 = e2 }.
In terms of the ⊥ operators from Section 3.2.3,[/ •) | f ∈ V⊥ }.
Id V = {ker(f :F X

136

3. BIRKHOFF’S VARIETY THEOREM

Notice that the operators Id and Sat form a Galois correspondence. That is, for allclasses of algebras V and sets of equations E, we have
V ≤ Sat(E) iff Id(V ) ≥ E.
Remark 3.5.1. The operators Sat and Id could be defined for any algebra hA, αi,of course, and not just the free algebras F X. We focus on the free algebras here for
their importance in the completeness and variety theorems.
We would like to find conditions on E that ensure E = Id(V) for some class Vof algebras. Birkhoff’s completeness theorem [Bir35] provides that condition.
Classically, given a signature Σ, a set E of equations over X is deductively
closed closed!deductively – if it satisfies the following:(i) For each x ∈ X, x = x ∈ E;(ii) If τ1 = τ2 ∈ E, then τ2 = τ1 ∈ E;(iii) If τ1 = τ2 ∈ E and τ2 = τ3 ∈ E, then τ1 = τ3 ∈ E;(iv) If f (n) ∈ Σ and τ1 = υ1 , τ2 = υ2 , . . . , τn = υn are in E, then f (n) (τ1 , τ2 , . . . , τn ) =f (n) (υ1 , υ2 , . . . , υn ) ∈ E.
e(τ1 ) =(v) For any assignment of variables σ : X / U F X , if τ1 = τ2 ∈ E, then σσe(τ2 ) ∈ E.

Theorem (Birkhoff’s completeness theorem). Let E be a set of equations. Then
E = Id(V) for some class of algebras V iff E is deductively closed.
We can restate the definition of deductive closure in categorical terms (and, inparticular, eliminate the reference to function symbols in (iv)). For this, we requirea definition.

// U F X be a set of equations over X. We say that
Definition 3.5.2. Let E
E is endomorphism-stable (or just stable) if, for every homomorphism

σ :F X
there is a (necessarily unique) map ψ :E

/F X ,/ E such that the diagram below commutes.
ψ

E


UF X

Uσ

/E

/ UF X

More generally, if
E

e1
e2

//

A

is a relation over the carrier of a algebra hA, αi, we say that E is stable if, for every
Γ-endomorphism φ :hA, αi / hA, αi, there is a map ψ :E / E such that φ◦e1 = e1 ◦ψand φ ◦ e2 = e2 ◦ ψ.

3.5. DEDUCTIVE CLOSURE

137

Let E be a relation over U F X. Then E is closed!deductively –deductively closed
just in case the following hold.
(i0 ) hηX , ηX i factors through E;(ii0 ) E is symmetric;(iii0 ) E is transitive;(iv0 ) E is (the carrier of) a pre-congruence;(v0 ) E is stable.
We first show a couple of easy theorems about the relationship between deductive
completeness and stable congruences. The first theorem relates orthogonality tostability, and so ties up some of the previous work with this section. The theorem
thereafter shows that stable congruences over F X just are the sets of deductively
closed equations — an easy consequence. Following this, we show that, given an
equationally defined variety V, the set of equations Id(V) is exactly the kernel ofηFVX .
Theorem 3.5.3. Let
E

e1
e2

//

UF X

be a set of equations over regular projective X, and q :F X

/ hQ, νi the coequalizer of// F X.

FE

If E is stable then q ⊥ hQ, νi. Conversely, if E is the kernel pair of q and q ⊥ hQ, νi,then E is stable.
Proof. Suppose that E is stable and let f :F X / hQ, νi be given. Because F X
is regular projective, there is a map σ :F X / F X such that f = q◦σ. Let φ :E / E be
given as in Definition 3.5.2. Then, a simple diagram chase through Figure 7 confirmsthat q ◦ σ coequalizes ee1 and ee2 , yielding the desired map ψ, as shown.
FE / / F X GGGG  ,2 hQ, νi
e1

q

e2

 / 
σ

Fφ



FE

 / FX

f GG

e1
e2

q

ψ
GG
# 
 ,2
hQ, νiFigure 7. E is stable iff q ⊥ hQ, νi.
Conversely, suppose that E is the kernel pair of q and q ⊥ hQ, νi. Let
σ :F X/F X

138

3. BIRKHOFF’S VARIETY THEOREM

be given. Since q ⊥ hQ, νi, there is a uniqueψ :hQ, νi/ hQ, νisuch that q ◦ σ = ψ ◦ q. Hence, q coequalizes σ ◦ e1 and σ ◦ e2 and so, there is a unique
map
/E
φ :E
as desired.



Theorem 3.5.4. A set of equations E is deductively closed iff E is a stable congruence.
Proof. E is a stable congruence if and only if, in addition to Conditions (ii’)- (v’), E is reflexive (i.e., the diagonal arrow ∆U F X : U F X / U F X × U F X factors
through E / / U F X × U F X . If E is reflexive, then clearly hηX , ηX i factors throughE and so Condition (i’) is satisfied.

U FO XδU F X/ UF X × UF X
O

ηX

X

'/

O

E

Figure 8. If E is deductively closed, then it is a stable congruence.
On the other hand, suppose that E is deductively closed. By (i’), hηX , ηX i factors through E, as shown in Figure 8. By (iv’), there is a structure map ε :E / ΓE
such that hE, εi is a relation over F X in E Γ . Consequently, there is a unique homomorphism F X / hE, εi making the lower triangle commute, as shown. It is easy toconfirm that the upper triangle also commutes and thus that E is reflexive..

As one would expect, if V is defined by a set of equations over X, then ηFVX is justthe coequalizer of Id(V). This shows the connection between the work in previous
sections and the current approach in terms of deductive completeness.
Lemma 3.5.5. For any variety V of the form V = Sat(E) for some set of equations E over X, Id(V) = ker ηFVX .
SProof. Since ηFVX ∈ V⊥ and Id V = {ker(f : F X / •) | f ∈ V⊥ }, we see
ker ηFVX ≤ Id(V). Conversely, since T V F X ∈ V, it is orthogonal to each f ∈ V ⊥ .
Consequently, each ker f factors through ker ηFVX and, hence, so does Id(V).
Theorem 3.5.6 is the categorical version of Birkhoff’s deductive completeness theorem.

3.5. DEDUCTIVE CLOSURE

139

Theorem 3.5.6. Let Γ preserve exact sequences, so E Γ is exact. Let
E

e1
e2

//

UF X

be a set of equations over X. Then E = Id(V) for some class V of algebras iff E isa stable congruence.
Proof. Let E = Id(V) for some class V of algebras. By the Galois correspondence Id a Sat, we know that E ≤ Id Sat(E). Since V ≤ Sat(E), we also have
Id Sat(E) ≤ Id(V) = E. Thus, E = Id Sat(E). Since Sat(E) is a variety, we canmake use of the work of the preceding sections. Let TE : E Γ / E be the associatedmonad, with unit η E .
By Lemma 3.5.5, E = ker ηFEX . Hence, in particular, E is a congruence. Lete ◦ e1
σ :X / U F X be given. Since TE F X ∈ Sat(E), ηFEX coequalizes the composite σEand σe ◦ e2 . Because E is the kernel pair of ηF X , we have the factorization E / E , asdesired. Hence, E is stable.
Let E be a stable congruence and let q :F X / hQ, νi be the coequalizer ofFE// F X .

Let V = q ⊥ (i.e., V = Sat(E)). Because E is stable, q ⊥ hQ, νi, so hQ, νi ∈V. Hence, hQ, νi ∼= T V F X. Since E is a congruence, it is the kernel pair of its
coequalizer. Thus, by Lemma 3.5.5, Id(V) = E.
Remark 3.5.7. Theorem 3.5.6 applies more generally than stated. If E is arelation over A = U hA, αi (not necessarily free), then E = Id(V) for some class
V of algebras iff E is a stable congruence. In this more general case, Sat(E) is, ofcourse, a quasi-variety rather than a variety.
Corollary 3.5.8. For any set E of equations over regular projective X,
Id(Sat(E)) = ker ηFEX ,where η E is defined as in the proof of Theorem 3.5.6.
Theorem 3.5.9. Assume that E Γ is uniformly Birkhoff, with F X an equational
domain. Let Var be the collection of varieties of E Γ , ordered by reverse inclusion
and let Ded be the collection of stable congruences over F X (an equational domain),ordered by inclusion. Then Ded ∼= Var.
Proof. Var is the collection of fixed points of Sat ◦ Id, while Ded is the collectionof fixed points of Id ◦ Sat. The functors Id and Sat are isomorphisms when restricted
to Fix(Sat ◦ Id) and Fix(Id ◦ Sat), respectively.
140

3. BIRKHOFF’S VARIETY THEOREM

The isomorphism between varieties and stable congruences is a result of the isomorphism between congruences and coequalizers in E Γ . We stated Theorem 3.5.9
in terms of stable congruences (i.e., deductively closed sets of equations) in keepingwith the historical motivation and with the traditional notion of “equationally defined class”. However, one has the same result, more or less, in an abstract uniformly
Birkhoff category. We sketch the theorem here.
Let C be a uniformly Birkhoff category with equational domain X (i.e., for any
variety V, V = {η V }⊥ ). Call a quotient q : X  ,2 Q stable if q ⊥ Q. In other words,
q is stable just in case Q ∈ {q}⊥ . If V = {q}⊥ , then, q :X / Q is stable just in caseV
Q∼).
= TV X (and q ∼= ηXThe quotients of X may be partially ordered by Q ≤ Q0 if there is a (necessarily
regular epi) Q  ,2 Q0 in X/C. The resulting order StQ of stable quotients of X isisomorphic to the collection Var of varieties in C, ordered by reverse inclusion. The
isomorphism takes a stable q to {q}⊥ , while the inverse takes a variety V to the unitVηX.
.
3.6. The coalgebraic dual of Birkhoff ’s variety theorem
We now consider the dual of Birkhoff’s theorem in categories of coalgebras. To
begin, we dualize the definitions of Birkhoff, variety, etc., to prove the dual of Theorem 3.2.11. Following this, we show how this theorem applies to categories of coalgebras.
The co-Birkhoff theorem has been a hot topic lately, beginning with Jan Rutten’s
co-Birkhoff theorem for Set ([Rut96]). Peter Gumm and Tobias Schröder continued developing the co-Birkhoff theorem over Set in [GS98]. The following material
essentially dualizes the work done in the previous sections, so coequation satisfaction is again an orthogonality condition (formally dual to equation satisfaction). It
can be seen as an extension of the work in [BH76], further developed in the papersof Andréyka and Németi [AN83, Ném82, AN81a, AN81b, AN79a, AN79b,
AN78], discovered by the author after this work was completed independently. The
same approach was taken by Alexander Kurz in his dissertation [Kur00], again independently of the author.
3.6.1. The dual definitions. Here, we give the dual of the relevant definitionsin Section 3.2.1. This is straightforward, but we will explicitly state the definitions
here.
An arbitrary category is a quasi-co-Birkhoff category if it is regularly well-powered,cocomplete and has epi-regular mono factorizations. Recall that a category has3.6. THE COALGEBRAIC DUAL OF BIRKHOFF’S VARIETY THEOREM

141

enough regular injectives if every object is a regular subobject of an regular injective object. If, in addition, the category has enough regular injectives, then it is a
category!co-Birkhoff .
Example 3.6.1. Any co-complete topos E is co-Birkhoff. That it is regularly wellpowered and has epi-regular mono factorizations is clear. Because each object C ∈ E
has a mono C / PC and PC is regular injective, E has enough regular injectives[LM92, Corollary IV.10.3].
Example 3.6.2. Top is a co-Birkhoff category. It is obvious that Top is regularly
well-powered, since monos in Top are regular injective functions. Also, every spacehX, Oi is a regular subobject of an regular injective space. Namely, we can takethe space X and adjoin a single point whose singleton is open. This new space isregular injective. That Top is cocomplete and has epi-regular mono factorizations iswell-known (a regular mono in Top is an embedding).
In Theorem 3.6.7, we will show that, given the category E is co-Birkhoff and thatΓ preserves regular monos, then the category EΓ is also co-Birkhoff.
The dual of Birkhoff’s (quasi-)variety theorem will state an equivalence between
subcategories satisfying certain closure conditions and class of objects that are orthogonal to some collection of arrows. The closure conditions are easily found: they
are the dual of the defining properties of (quasi-)varieties. Consequently, we say thata full subcategory is a quasi-covariety if it is closed under codomains of epimorphisms
and coproducts and it is a covariety if it is also closed under regular subobjects.
An object X is orthogonal to a map f : A / B (written X ⊥ f — sometimes
this condition is stated as, f is co-orthogonal to X) if, for each b : X / B , b factors
through f . In particular, if f is an equalizer for e1 , e2 :B / C , then X ⊥ f iff every
map X / B equalizes e1 and e2 . If S is a class of arrows and V is a full subcategory,
we define the notations X ⊥ S, V ⊥ f and V ⊥ S, as before. The class of arrowsV⊥ consists of all maps f such that V ⊥ f and the full subcategory S⊥ consists ofall those objects X such that X ⊥ S. These operators form a Galois correspondence.

3.6.2. The abstract dual to Birkhoff ’s theorem. We can now dualize thetheorems of Section 3.2.5, providing quasi-covariety and covariety theorems for abstract co-Birkhoff categories. These theorems will then be interpreted in categories
of coalgebras EΓ for co—Birkhoff E and covarietor Γ that preserves regular monos,
leading to a definition of coequation for such categories.

142

3. BIRKHOFF’S VARIETY THEOREM

Recall that G = hG, ε, δi is a comonad just in case G is an endofunctor and ε(the counit) and δ (the comultiplication) are natural transformations
ε :G/ 1C ,

δ :G

/ GG,

respectively, satisfying εG ◦ δ = idG = Gε ◦ ε and δG ◦ δ = Gδ ◦ δ.
The following theorem is the dual of Theorem 3.2.7.
Theorem 3.6.3. Let C be a quasi-co-Birkhoff category and V a full subcategoryof C. The following are equivalent.
(1) V is a quasi-covariety.
(2) The inclusion U V :V / C has a right adjoint H V such that each componentof the counit εV :1C / U V H V is a regular mono.
(3) V = S⊥ for some collection S of regular monos.
Example 3.6.4. Top has no interesting quasi-covarieties. Let V be a quasicovariety of topological spaces and suppose that there is a non-empty space A in V.
Then, since the space 1 is the codomain of an epi out of A, 1 ∈ V. Hence, so is every
discrete space (as a coproduct of 1) and hence every topological space (since injects
into the discrete space with the same underlying set).
Unfortunately, we don’t have any good examples of covarieties or quasi-covarieties
outside of categories of coalgebras yet.
Corollary 3.6.5. Let C be a quasi-co-Birkhoff category and V a quasi-covarietyof C. Then
(1) The inclusion U V :V / C has a right adjoint H V .
(2) The unit η V :1V / H V U V is an isomorphism.
V
is the counit of the(3) For each C ∈ C, we have C ∈ V iff C ⊥ εV
C , where εVVadjunction U a H .
(4) The corresponding comonad, GV = hU V H V , εV , δ V i, is idempotent.
(5) The comonad GV preserves regular monos.
Thus, if V is a quasi-variety of C, we have an adjunction,
UV

Vj

*

⊥

C,

HV

where U V is full and faithful and every component of the counit
εV :U V H V/1is a regular mono, while every component of the unit
η V :1/ H VU V3.6. THE COALGEBRAIC DUAL OF BIRKHOFF’S VARIETY THEOREM

143

is an isomorphism ([Bor94, Proposition 3.4.1, Volume 1]). Also, we have that any
Vobject C ∈ C is in V iff C ⊥ εV
C , in which case εC is an isomorphism. From this, itfollows that the comonad GV is idempotent. In addition, the comonad GV preserves
regular monos, by the dual of Corollary 3.2.8, Item (5).
Theorem 3.6.3 provides a quasi-variety theorem which we will interpret in termsof conditional coequations in Section 3.6.4. The following theorem is the formal
dual of the abstract Birkhoff theorem, Theorem 3.2.11. This is the theorem which,when interpreted in categories EΓ , yields the co-Birkhoff theorem for categories of
coalgebras.
Theorem 3.6.6. If C is a co-Birkhoff category, then V is a covariety iff V = S ⊥for some collection S of regular monos with regular injective codomains.
3.6.3. Covarieties of coalgebras. The formal dualities of Sections 3.6.1 and3.6.2 provide the basic background for the co-Birkhoff theorem, but our work is notcomplete. In this section, we will show that categories of coalgebras over co-Birkhoff
categories are again co-Birkhoff, and also provide a definition of coequation andcoequation satisfaction to provide an interpretation of the co-Birkhoff theorem in E Γ .
That categories EΓ are co-Birkhoff follows, as before, by duality (of Theorem 3.3.1).
Theorem 3.6.7. Let E be co-Birkhoff and Γ :E / E be a covarietor (so that U has
a right adjoint H) that preserves regular monos. Then EΓ is co-Birkhoff.
It is worth noting that, if E and Γ satisfy the conditions of Theorem 3.6.7, theneach coalgebra hA, αi is a regular sub-coalgebra of HA, which is injective if A is. We
will use this fact in interpreting the covariety theorem.
In what follows, we assume that E is co-Birkhoff and Γ preserves regular monos.
Under these assumptions, we notice that U preserves and reflects epis, regular monosand colimits (by the dual to Corollary 1.2.15), so that U preserves structure relevant
to covarieties.
The regular subcoalgebras of HC play a role in the co-Birkhoff theorem thatis analogous to the quotients of F X in Birkhoff’s variety theorem. This analogy
suggests the following definition.
Definition 3.6.8. A coequation over C is a regular subobject of U HC. That is,a coequation K is a(n equivalence class of) regular monosK  ,2/ U HC .

We take a coequation here to be a regular subobject. This is not the literal dualof sets of equations in E Γ . There, the set of equations E is taken as a binary relation
on U F X. So, to dualize a set of equations, one would consider corelations on U HC.
Since these are less familiar objects, we prefer to consider the regular subcoalgebras

144

3. BIRKHOFF’S VARIETY THEOREM

themselves, which are dual to the quotients of F X by the pre-congruence generatedby E. For a discussion of corelations over coalgebras, see [Kur00].
There is also a sense in which the variety theorem is “really” about quotientsand orthogonality classes (rather than relations), and this motivates our definitionof coequations. Sets of equations arise in the classical setting, but as we saw in
Section 3.2.4, the variety theorem can be proved in terms of quotients in a wide varietyof categories in which one may not have a natural notion of “equational satisfaction”(apart from orthogonality to a regular epi with regular projective domain, of course).
Some authors (notably, Peter Gumm in [Gum01a]) distinguish between single
coequations and sets of coequations, a distinction which we do not introduce. In orderfor this distinction to arise, one states coequation satisfaction in terms of avoidance of
certain behaviors. We prefer the more straightforward definition given below (whichis equivalent for categories of coalgebras over Set), partly because it stresses thecoequation-as-predicate view which we exploit later.
Each coequation K  ,2 / U HC gives rise to a canonical subcoalgebra, of course, via
the [−]HC operator of Section 2.2.2. By Corollary 2.2.9, we know that any homomorphism f :hA, αi / HC factors through [K]HC just in case U f factors through K.
This fact, together with our work on equation satisfaction previously, suggests thefollowing definition.
Definition 3.6.9. Let K  ,2 / HC be a coequation over C and i : [K]  ,2 / HC theevident inclusion. We say that a coalgebra hA, αi forces K (written hA, αi C K,
with the subscript sometimes omitted) just in case hA, αi ⊥ i.
In other words, hA, αi C K just in case, for every map p : A / C , the adjoint
transpose of p factors through K. Intuitively, this means that, no matter how one“colors” the elements of A (with colors chosen from C), each element of A is behaviorally indistinguishable (in the sense of Γ-coalgebras) from an element of K of thesame color.
Remark 3.6.10. In some ways, the forcing terminology here does not fit wellwith the definition, since coequation forcing is really derived from the usual notionof predicate satisfaction (not forcing). Nonetheless, we use the forcing terminology
in order to keep the distinction between equation satisfaction (orthogonality to aquotient) and coequation satisfaction (co-orthogonality to a subobject) clear.
Example 3.6.11. Again, let ΓA = X × A and suppose x ∈ X. Let C = 2, so
HC is (2 × X)ω . Letσ, τ :ω

/2 × X

3.6. THE COALGEBRAIC DUAL OF BIRKHOFF’S VARIETY THEOREM

145

be defined by
σ(n) = h0, xi
τ (n) = h1, xi
for all n ∈ ω, and let K = {σ, τ }, so K is a coequation over C.
Consider the coalgebras hA, αi and hB, βi, where A = {a} and α(a) = hx, ai andB = {b, c} andβ(b) = hx, ci
β(c) = hx, bi
Then it is easy to see that hA, αi K, while hB, βi 6 K. Moreover, one can showthat hC, γi K just in case, for each c ∈ C, γ(c) = hx, ci.
This example should support the view that coequational satisfaction says something about the internal structure of the coalgebra. Bisimilarity tells one about the
behavior of a coalgebra — what sorts of output the structure maps can generate.
In Section 3.9, we will see that coequation satisfaction is a finer way to distinguishbetween coalgebras than bisimilarity classes. Example 3.6.11 suggests that coequation satisfaction gives some ability to distinguish the internal composition of distinct
coalgebras.
We now have a natural definition for coequational variety. A coequational variety
is the class of all coalgebras which satisfy some collection of coequations. That is,
V is a coequational covariety iff there is a collection S of regular monics with cofree
codomains such that V = S⊥ . With the new terminology, the following theorem isan easy consequence of Theorem 3.6.7.
Theorem 3.6.12. Let E be co-Birkhoff and Γ :E / E preserve regular monos. Suppose also that U : EΓ / E is comonadic (i.e., Γ is a covarietor) and let V be a fullsubcategory of EΓ . Then V is a Birkhoff covariety iff V is a coequational covariety.
In Theorem 3.6.7, we showed that any covariety is the co-perp of some collectionof regular monos with regular injective codomains. Here, we simply note that eachobject is a regular subobject of HC for some regular injective C. The dual of thiswas shown in the proof of Corollary 3.3.2.
Example 3.6.13. In [GS98], it is shown that the category Topopen of topologicalspaces and open maps is a covariety of SetF (where F is the filter functor).
Example 3.6.14. Fix a set Z and let Γ :Set
ΓA = Z × A,

/ Set be the functor

146

3. BIRKHOFF’S VARIETY THEOREM

so that any Γ-coalgebra hA, αi can be viewed as a collection of streams over Z (seeExample 1.1.7).
The cofree coalgebra HN is the final N × Z × − coalgebra — i.e., HN = (N × Z)ω .
Given an element σ ∈ HN, we can defineCol(σ) = {π1 ◦ σ(i) | i < ω}(equivalently, Col(σ) = {ε ◦ ti (σ) | i < ω}, where t is the tail destructor). In otherwords, Col(σ) is the set of all colors that occur in the stream σ. Define a coequation
ϕ over N by
ϕ = {σ | card(Col(σ)) < ℵ0 },(where card(X) is the cardinality of X) so σ ∈ ϕ just in case only finitely manycolors occur in σ.
One can check that, for any Γ-coalgebra hA, αi, we have hA, αi ϕ just in case,for all a ∈ A, there is n ≥ 0, m > 0 such thattn (a) = tn+m (a),(where α = hh, ti). In other words, hA, αinumber of “states”.

ϕ iff each stream in A has only a finite

Example 3.6.15. Fix a set I and let Γ :Set

/ Set be the functor

ΓS = (Pfin S)I .
In Example 1.1.11, we learned that Γ-coalgebras hS, σimay be regarded as nondeterministic automata, where the elements of S are the states of the automata. Weisay that, on input i ∈ I, there is a transition s / s0 just in case s0 ∈ σ(s)(i).
The deterministic automata are those automata hS, σi such that, for each s ∈ S
iand each i ∈ I, there is at most one s0 such that s / s0 . Let Det denote the class ofdeterministic automata, so Det ⊆ SetΓ . Then it is easy to see that Det is a covariety
in SetΓ .
In fact, one can show that there is a coequation K over 2 colors that defines Det.
Namely, define K ⊆ U H2 by
K = {x ∈ U H2 | ∀i ∈ I ∀y, z ∈ δ(x)(i) . ε2 (y) = ε2 (z)},where δ :U H2  ,2  ,2 ΓU H2 is the structure map for H2. Then, it is easy to show thathA, αiK iff hA, αi ∈ Det .

Example 3.6.16. In this example, we will use an coalgebraic specification syntax
for object oriented programming languages adopted from Bart Jacobs (see [Jac99,
RTJ01], for instance). In Section 2.1.5, we discussed a simple specification in which
we gave the signature of certain methods, thus determining a category SetΓ of modelsof the class. In this specification, we extend the previous example to include such

3.6. THE COALGEBRAIC DUAL OF BIRKHOFF’S VARIETY THEOREM

147

assertions, thus restricting the coalgebras in which we are interested to a subclass ofSetΓ . In fact, these assertions determine a covariety of SetΓ (and so, in fact, themodels form a category of coalgebras for a comonad).
Typically, in coalgebraic specifications, one allows assertions about the “observable” behavior of methods, so that the class of coalgebras which serve as models
for the specifications is closed under bisimulations. We extend the usual class ofassertions to allow for equations between states of the coalgebras, in order to fully
utilize the expressive power of coequations, ignoring the usual conceptual reason for
restricting attention to observable behavior.
We consider the class DecCounter introduced in Section 2.1.5, although we view
it as a basic class (rather than a class which inherits from Counter). We add to theprevious specification two assertions, as shown here.
begin DecCounter
operations
inc :X / X
val :X / N
dec :X / X + 1
assertions∀x. val(inc(x)) = val(x) + 1∀x. dec(inc(x)) ∼ x∀x. dec(x) = ∗ iff val(x) = 0
end DecCounter
Here, ∼ indicates the bisimilarity relation. Thus, the class of models of DecCounteris intended to be the class of − × N × (− + 1)-coalgebras hA, αisuch that, for everya ∈ A,vα ◦ iα (a) = vα (a) + 1,
dα ◦ iα (a) ∼ a,dα (a) = ∗ iff vα (a) = 0
where α = hiα , vα , dα i. Note that dα ◦ iα (a) ∼ a just in case ! ◦ dα ◦ iα (a) =!(a), where! is the unique homomorphism from hA, αi to the final − × N × (− + 1)-coalgebra.
It is easy to see that the class of models of DecCounter is a variety for a coequation K over 1 color (i.e., a subset of the final coalgebra, H1). In fact, this is acorollary to the discussion of behavioral covarieties in Section 3.9, but we explicitly
give the coequation here. Indeed, let hiσ , vσ , dσ i :U H1  ,2  ,2 U H1 × N × (U H1 + 1) be
the structure map for the final coalgebra and define sets
K1 = {x ∈ U H1 | vσ ◦ iσ (x) = vσ (x) + 1}
K2 = {x ∈ U H1 | dσ ◦ iσ (x) = x}
K3 = {x ∈ U H1 | dσ (x) = ∗ iff vσ (x) = 0}

148

3. BIRKHOFF’S VARIETY THEOREM

Let K = K1 ∩ K2 ∩ K3 . Let hA, αi be given, α = hiα , vα , dα i. Then, for any a ∈ A,vα ◦ iα (a) == vσ ◦ iσ ◦!(a) andvα = vσ ◦!(a) + 1,
so hA, αi K1 just in case hA, αi satisfies the first assertion. Similarly, one checks
that hA, αi forces K2 , K3 resp., just in case hA, αi satisfies the second, third resp.,
assertion.
If, on the other hand, we want the result of applying dec ◦ inc to return an object
to the same state, rather than to a “merely” indistinguishable state3, then we may
replace the second assertion with the related assertion∀x. dec(inc(x)) = x.
In this case, a coequation over one color does not suffice, again for reasons that we
present in Section 3.9. However, there is a related coequation over two colors thatdefines the class of models for this specification. Namely, we define again three sets
as follows:
K10 = {x ∈ U H2 | vσ ◦ iσ (x) = vσ (x) + 1}
K20 = {x ∈ U H2 | ε2 ◦ dσ ◦ iσ (x) = ε2 ◦ x}
K30 = {x ∈ U H2 | dσ (x) = ∗ iff vσ (x) = 0}
(We implicitly require that the equation in the definition of set K20 is well-typed, sothat dσ ◦ iσ (x) ∈ U H2.) We define K 0 ⊆ U H2 to be the intersection of K10 , K20 andK30 . We assert that hA, αi K 0 just in case K 0 satisfies the requisite assertions. In
particular, hA, αi K20 just in case, for every a ∈ A,(18)

dα ◦ iα (a) = a.

Indeed, suppose that, for every a, Equation (18) holds, and let p :hA, αigiven. Then, for every a ∈ A,

/ H2 beε2 ◦ dσ ◦ iσ ◦ p(a) = ε2 ◦ p ◦ dα ◦ iα (a) = ε2 ◦ p(a),and so p(a) ∈ K20 .
On the other hand, suppose that there is an a ∈ A such that Equation (18) does
not hold. If dα ◦ iα (a) = ∗, then it is easy to show that (for any p :hA, αi / H2),p(a) 6∈ K20 ,and so hA, αi 6 K 0 . Suppose, then, that dα ◦ iα (a) ∈ A. We may define a coloring
pe:A / 2 such thatpe(dα ◦ iα (a)) 6= pe(a).
3Again, we do not justify this desire here, although one has the idea that the strengthened
assertion regarding equality of states is related to assertions describing final methods.

3.6. THE COALGEBRAIC DUAL OF BIRKHOFF’S VARIETY THEOREM

Let p :hA, αi

149/ H2 be the adjoint transpose of pe. Thenε2 ◦ dσ ◦ iσ ◦ p(a) = pe(dα ◦ iα (a)) 6= pe(a) = ε2 (a),and so again hA, αi 6Equation (18).

K 0 . Consequently, if hA, αi

K 0 , then every a ∈ A satisfies

3.6.4. Quasi-covarieties of coalgebras. We interpreted the covariety theorem
in categories of coalgebras by introducing a notion of coequations. In this section,
we revisit the quasi-covariety theorem (Theorem 3.6.3) and interpret it in terms ofconditional coequations. Conditional coequations arise as an obvious generalizationof coequations, by relaxing the condition that the codomain of the regular mono iscofree. We hope to motivate the use of the term “conditional” by showing that thenatural forcing definition for these regular subobjects is equivalent to a conditional
forcing of a “proper” coequation.
A similar presentation of conditional coequations (in terms of modal rules) can
be found in [Kur00, Kur99]). The material of this section covers much of thesame ground as Andréyka and Németi covered for the dual (algebraic) theorems in[Ném82, AN81a, AN81b, AN79b]. This material was developed independently
prior to the author’s discovery of the related research.
A coequation over C is just a regular subobject of the cofree coalgebra U HC.
More generally, we could consider regular subobjects of the carriers of arbitrary coalgebras. This suggests the following definition, although we postpone justifying theuse of the term “conditional”.
Definition 3.6.17. A coequation!conditional – (over hA, αi) is just a regularsubobjectK  ,2/Aof A = U hA, αi. We sometimes subscript a conditional coequation by α to indicate
its codomain.
Recall that [K] is the largest subcoalgebra of hA, αi whose carrier is contained in
K. We say that hB, βi α K just in case hB, βi ⊥ i, wherei :[K]  ,2

/ hA, αiis the inclusion.
Hence, a coequation K over C is just the same as a conditional coequation overHC, and so the conditions hB, βi C K and hB, βi HC K are really just the samestatement. Nonetheless, we hope no confusion arises from the notational differences
between coequations and conditional coequations.
In terms of conditional coequations, Theorem 3.6.3 yields the following theorem.

150

3. BIRKHOFF’S VARIETY THEOREM

Theorem 3.6.18. Let E be quasi-co-Birkhoff and Γ preserve regular monos. Then,for any class V of Γ-coalgebras, V is a quasi-covariety iff there is a collection S ofconditional coequations such thathB, βi ∈ V iff ∀Kα ∈ S . hB, βi

α K

Example 3.6.19. Let G = hG, ε, δi be a comonad over E, and assume that G
preserves regular monos. Then, the category E of coalgebras for the comonad is avariety in the category EG of coalgebras for the endofunctor. Indeed, it is easy tocheck that E is closed under epis, regular subcoalgebras and coproducts.
If G is not a covarietor4, then Theorem 3.6.12 does not apply — so, we cannot
guarantee a collection of coequations defining E . However, we may apply Theorem 3.6.18 in this case, to conclude that there is a collection S of conditional coequations defining the covariety E .
Indeed, it is not hard to explicitly give a collection S which suffices. For eachhA, αi ∈ EG , let Φα be the equalizer shown below.
Φα  ,2

/A

εA ◦α

//

idA

A

That is, Φα is just the equalizer of the counit diagram from Definition 2.1.2. Similarly,
let Ψα be the equalizer of the co-distributivity diagram, shown below.
Ψα  ,2

/A

δA ◦α
Gα◦α

// G 2 A

Let S be the collection (abusing set notation){Φα ∧ Ψα | hA, αi ∈ EG }.
Then it is easy to show that, for any hB, βi ∈ EG ,hB, βi ∈ E iff hB, βi

S.

In the remainder of this section, we will focus on a special class of quasi-covarieties:
those that are defined by a single conditional coequation. Our purpose is to showthat the so-called conditional coequations really do reflect a notion of conditional
forcing. Namely, given a conditional coequation i :K  ,2 / U hA, αi, we may view A as acoequation as well — namely a coequation over the object A of colors (or, if A is notprojective, then a coequation over some projective of which A is a regular subobject).
4Note: The fact that G is the functor part of a comonad does not seem sufficient to infer thatU : EG/E

has a right adjoint — although the related forgetful functor/E
U :EG
certainly does have a right adjoint.

3.6. THE COALGEBRAIC DUAL OF BIRKHOFF’S VARIETY THEOREM

151

We will show that a coalgebra hB, βiforces K just in case hB, βi A ⇒ K (although
we still owe a definition of this latter condition).
Given a pair of coequations K, L over a common object of colors, C, we call
K ⇒ L an ⇒-coequation. We say that a coalgebra hA, αi forces K ⇒ L (written
hA, αi C K ⇒ L) just in case, for every homomorphism p : hA, αi / HC , if U p
factors through K, then U p factors through L. In other words, hA, αi C K ⇒ L if,
whenever p :hA, αi / HC and Im p ≤ [K], then Im p ≤ [L].
Remark 3.6.20. The condition thathA, αiK⇒LhA, αiK→L

is not the same as, where K → L is defined in terms of the Heyting algebra structure of RegSub(U HC).
In fact, one can show that, for any K, L, hA, αi, if hA, αi K → L, then hA, αi
K ⇒ L, but the converse does not hold.
For example, let ΓX = X × X. Let
hε2 , l, ri :U H2  ,2 ,22 × U H2 × U H2

be the structure map for H2. Define coequations K, L over 2 by
K = {σ ∈ U H2 | σ = l(σ)}
L = {σ ∈ U H2 | σ = r(σ)}
Let A = {a, b} and α = hlα , rα i :A

/ A × A be defined by

α(a) = hb, bi,α(b) = hb, ai.
We will first show that hA, αi

K ⇒ L. Let
p :A

/2

be given such that Im pe ≤ K, where pe is the adjoint transpose of p. Then, sincepe(a) ∈ K, it follows that pe(a) = pe(b). Hence, Im pe ≤ L.
However, it is not the case that hA, αi K → L. Let p(a) = 0 and p(b) = 1.
Then, p(b) ∈ K but p(b) 6∈ L. Hence,and so Im pe 6≤ K → L.

Im pe ∧ K 6≤ L

We wish to show that conditional coequations (in the sense of Definition 3.6.17)
coincide with ⇒-coequations. More precisely, given any conditional coequation M

152

3. BIRKHOFF’S VARIETY THEOREM

over hA, αi, there is an ⇒-coequation K → L over C, for an appropriate projective
object C, such thathB, βi α M iff hB, βi C K ⇒ L.
Also, given any ⇒-coequation K ⇒ L, there is an hA, αi and M ≤ A such that thesame equivalence holds. This fact motivates the terminology “conditional coequation”, since each conditional coequation can be expressed as a coequation of the form
K ⇒ L.
Theorem 3.6.21. Let E be a Birkhoff category, Γ a varietor the preserves regularmonos. Let hA, αi ∈ EΓ and C an injective object such that A ≤ C. Then, for any
conditional coequation M over hA, αi, there is an ⇒-coequation K ⇒ L over C such
that
(19)

hB, βiα M iff hB, βi

C K ⇒ L.

Conversely, if E has binary intersections, for any ⇒-coequation K ⇒ L over C, there
is a hA, αi, with A ≤ C and a conditional coequation M over hA, αi such that (19)holds.
Proof. Let m : M  ,2 / A, where A = U hA, αi and C injective with i : A  ,2 / C . We
claim that hB, βi α M just in case hB, βi C A ⇒ M .
Indeed, suppose that hB, βi M , so that every homomorphism hB, βi / hA, αi
factors through M . Let f :hB, βi / HC be given and suppose that f factors throughA (as in Figure 9), f = i ◦ g for some g :B / A. Then, by Corollary 1.2.10, g is alsoa homomorphism and so g factors through m. Hence, hB, βi A ⇒ M .
U; HC
O
xx
x
x
x
i
xx
_LR
xx
B FF g / AO
FF
FF
m
F
k FF# _LRf

M

Figure 9. hB, βi

α M iff hB, βi

C A ⇒ M

Conversely, suppose that hB, βi A ⇒ M and let g :hB, βi / hA, αi be given.
Then i ◦ g factors through A and hence factors through M , i ◦ g = i ◦ m ◦ k. Since i
is monic, we see that g factors through M .
On the other hand, let K, L ≤ U HC. Let [K]HC = hA, αi (so hA, αi is thelargest subcoalgebra of HC contained in K). We claim that hB, βi α L ∩ A just incase hB, βi C K ⇒ L.

3.7. UNIFORMLY CO-BIRKHOFF CATEGORIES

153

Suppose that hB, βi α L ∩ A. Let f :hB, βi / HC be given and suppose that
Im U f ≤ K. Then, by Corollary 2.2.9, Im f ≤ [K] = hA, αi and so Im U f ≤ L ∩ A ≤L. Hence, hB, βi C K ⇒ L.
Suppose now that hB, βi C K ⇒ L, and let g :hB, βi / hA, αi be given. Since
A ≤ K, the map g factors through L and hence through A ∩ L. Thus,
hB, βiα A ∩ L.



3.7. Uniformly co-Birkhoff categories
In Section 3.4, we considered those categories in which every variety V is of theform V = {p : A  ,2 •}⊥ for some regular epi p, regular projective A. In the case of
categories of algebras, we could take A to be free over some projective object X“of variables”. Thus, if E Γ is uniformly Birkhoff, then there is some X such thatevery variety is definable by a set of equations over X. In the classical setting of
Set , where P is a polynomial functor, we could take X to be any infinite set, in
accordance with the 1935 Birkhoff variety theorem.
We wish to consider the analogous conditions for categories of coalgebras andtheir covarieties. Namely, what conditions suffice to conclude that there is an regular
injective C such that every covariety V of EΓ is definable by a coequation over C? In
more detail, we want conditions that ensure that, for every V, there is a K  ,2 / U HC
such that

V = {hA, αi ∈ EΓ | hA, αi

C K}.

As we shall see in Section 3.8, K can always be taken to be the carrier of a subcoalgebra. Thus, the question is when V = {i : •  ,2 / HC }⊥ for some regular mono
Γ-homomorphism i.
Definition 3.7.1. A co-Birkhoff category C is uniformly co-Birkhoff just in casethere is an regular injective C ∈ C such that, for every variety V, there is a regularmono i :K  ,2 / C such that V = {i}⊥ . In this case, we call C a coequational codomain.
3.7.1. Conjunctly irreducible coalgebras and conjunct sums. Here, we
prove an analogue to Birkhoff’s subdirect representation theorem ([Bir44]). The socalled conjunct representation theorem was first proved by Gumm and Schröder for
categories of coalgebras over Set (see [Gum01b, Gum98, Gum99]). We generalize
their work here. We begin by stating the relevant definitions for the classical theorem
as well as the theorem itself, which we take from [Grä68]. For the classical theorem,
we work in Set for a polynomial functor P.



154

3. BIRKHOFF’S VARIETY THEOREM

Call an algebra hA, αisubdirectly irreducible just in case, whenever {Θ i }i∈I is aVfamily of congruences on hA, αiwith Θi = ∆α , the diagonal on hA, αi, then one ofthe Θi equals ∆α .

Theorem 3.7.2 (Subdirect representation). For any hA, αi in Set , there is afamily {hAi , αi i}i∈I such that each hAi , αi i is a quotient of hA, αi andYhA, αi ≤hAi , αi i.
The material that follows is a good example of the limitations of formal dualities.
The proof of the conjunct representability theorem given here does not follow froma simple dualization of the proof of the subdirect representability theorem. The
classical theorem relies on finding, for each a 6= b in an algebra hA, αi, a congruence
Ra,b such that ¬Ra,b (a, b) and taking the product of the A/Ra,b for pairs of distinct
a, b. This approach does not easily dualize to yield the coalgebraic theorem, andso a different approach is used. Nonetheless, an analogous result is obtained — theconclusion of the theorem is dual to the subdirect representation theorem, but theassumptions required and the methods used are not dual.
Throughout this section, we assume that E has epi-regular mono factorizations,finite limits and all coproducts and that Γ preserves regular monos.
The following definition is dual to subdirect products in the classical theorem.
Definition 3.7.3. Let A ∈ C. A conjunct covering of A is a collection of regularmonos{ Ci  ,2ci

/ A | i ∈ I}

such that the map

is a regular epi.

`i∈I Ci[ci ]i∈I/A`
The requirement thatCi / A is a regular epi, instead of just epi, is necessary
only so that conjunct covers are stable under pullbacks. In what follows, we may
replace regular epis with epis if we also require that all epis are stable under pullback,rather than just requiring that C is a regular category.
Next, we dualize the notions of subdirect irreducibility and representability.
Definition 3.7.4. We say that an object A ∈ C is conjunctly irreducible iff,whenever we have a non-empty conjunct covering of A,`i∈I Ci[ci ]i∈I

,2 A ,

then one of the ci ’s is an epi (and hence an isomorphism).

3.7. UNIFORMLY CO-BIRKHOFF CATEGORIES

155

Definition 3.7.5. We say that a conjunct covering{ci :Ci  ,2

/ A}i∈Iof A is a conjunct representation of A if each Ci is conjunctly irreducible. We saythat C is conjunctly presentable if each object A ∈ C has a conjunct representation.
An object A is, by definition, conjunctly irreducible just in case, for every family`{Ci }i∈I of regular subobjects of A, if
Ci covers A, then one of the Ci covers A.
The following theorem shows that whenever A is conjunctly irreducible, then, for any
family {Ci }i∈I which covers A, one of the Ci / A is epi.
Theorem 3.7.6. Let C be a category with epi-regular mono factorizations. An
object A ∈ C is conjunctly irreducible iff for every collection of maps (not necessarily
monic){ Ci

ci/ A | i ∈ I}

such that the induced map`i∈I Ci[ci ]i∈I/A

is a regular epi, there is some i ∈ I such that ci is epi.
Proof. Suppose that A is conjunctly irreducible. For each i, take the epi-regularmono factorization, as shown below.
ci

+

Ci
pi

&&

Di

1 4=

A
F

di

Then, it is easy to see that the di ’s form a regular cover of A, and so there is some isuch that di is an epi. Hence, ci is also an epi.

For the remainder of this section, we will be interested in categories in which
coproducts commute with pullback, a generalization of distributive categories. Such
categories are called extensive. We present the definition here and state without
proof a theorem (found as Theorem 5.5.8 in [Tay99]) giving an equivalent definitionof extensive. See also [Coc93] for a discussion of extensive categories, a subject wereturn to in Section 4.1, where we show that EΓ is extensive, given that E is extensiveand Γ preserves regular monos and pullbacks along regular monos.
Definition 3.7.7. A category with finite coproducts is extensive if, in the diagram in Figure 10, the squares are pullbacks just in case the top row is a coproductdiagram.
Any extensive category with finite limits is distributive.

156

3. BIRKHOFF’S VARIETY THEOREM

X

/Z o




/ A+B o

A

κA

Y


κB

B

Figure 10. In an extensive category, the squares are pullbacks iff
Z = X +Y.
Theorem 3.7.8. Let C have all pullbacks. C is extensive just in case
• C has a strict initial object, i.e., any map • / 0 is an isomorphism;• coproducts are disjoint, i.e., the diagram below is always a pullback;
0 

/A




/ A+B

_

B

• coproducts are stable under pullback, i.e., if the squares in Figure 10 are
pullbacks, then Z ∼= X +Y.
In particular, then, every topos is extensive.
We use the property that coproducts commute with pullbacks to ensure that the
pullback of a conjunct covering is again a conjunct covering. This, in turn, will ensurethat a coalgebra is conjunctly irreducible just in case it is generated by a conjunctly
irreducible subobject.
Theorem 3.7.9. Assume C is a regular, extensive category. Let f :Aand let{ Ci  ,2ci

/ B be given/ B | i ∈ I}

be a conjunct covering of B. Then pulling each Ci back along f yields a conjunctcovering of A. In other words, pullbacks preserve conjunct coverings.
Proof. For each i, take the pullback(20)

Di   ,2
_

di

/A
f





Ci  ,2 ci / B
Pullbacks preserve regular monos, so all that remains is to show that the map fromthe coproduct of the Di ’s is also a regular epi. But, since pullbacks commute with

3.7. UNIFORMLY CO-BIRKHOFF CATEGORIES

157

coproducts, the following square is a pullback.
`

i
iD
_

[di ] 

,2 A
f

`

i Ci

[ci ]

 ,2



B

By regularity, the top arrow is a regular epi.



Theorem 3.7.10. Let C be regular and extensive. Let A be conjunctly irreducible
and suppose f :A / / B is an epi. Then B is conjunctly irreducible.
Proof. Let{ Ci  ,2ci

/ B | i ∈ I}

be a regular covering of B and take the pullbacks as in the proof of Theorem 3.7.9.
Since A is conjunctly irreducible, there is an i such that Di ∼= A. Because of thecommutativity of the pullback square (20), ci is an epi and hence is an isomorphism.
Definition 3.7.11. Let hA, αi be a Γ-coalgebra and S a regular subobject of A.
We say that S generates hA, αi if no proper regular subcoalgebra of hA, αi contains
S.
Recall that in Section 2.3, we showed that whenever Γ preserves non-empty intersections, the subcoalgebra forgetful functor Uα : SubCoalg hA, αi / RegSub A hasa left adjoint, hiα : RegSub(A) / SubCoalg hA, αi. In this case, it is easy to see that
S generates hA, αi just in case hSiα = hA, αi.
Theorem 3.7.12. Let E be a regular, extensive category. Suppose further that
E is conjunctly presentable. Let hA, αi be a Γ-coalgebra. Then hA, αi is conjunctly
irreducible (in EΓ ) iff there is some regular subobject S of A such that S is conjunctly
irreducible (in E) and S generates hA, αi.
Proof. Suppose that there is some conjunctly irreducible S which generates
hA, αi and letci{ hCi , γi i  ,2

/ hA, αi | i ∈ I}

be a conjunct covering of hA, αi. Then
{ Ci  ,2ci

/ A | i ∈ I}

is a conjunct covering of A in E (since U preserves regular monos and regular epis).
Consequently, when we pull it back to S, as shown below, we have a conjunct covering

158

3. BIRKHOFF’S VARIETY THEOREM

of S.

`

 ,2

0

i_C
_i

S_




`

 ,2

i Ci



A

Hence, for some i, Ci0 is isomorphic to S, and so we have S ≤ Ci and so, since S
generates hA, αi, hA, αi ∼= hCi , γi i.
For the converse, assume that, for every conjunctly irreducible C in A, there is aproper regular subcoalgebra hD, δi containing C. Pick a conjunct representation ofA,{ Ci  ,2ci

/ A | i ∈ I}.

For each Ci , pick a proper regular subcoalgebra hDi , δi i of hA, αi that contains Ci .
Then the hDi , δi i’s form a conjunct cover of hA, αi and none of the hDi , δi i’s are
isomorphic to hA, αi. Consequently, hA, αi is not conjunctly irreducible.
Hence, if Γ preserves non-empty intersections, so that we have hi a U, the categoryEΓ is conjunctly presentable if E is. This is because every coalgebra hA, αican be
conjunctly covered by hCi i, where {Ci }i∈I is a conjunct representation of A.
Theorem 3.7.13. Let E be regular, extensive and conjunctly presentable and let
Γ preserve non-empty intersections. Then EΓ is conjunctly presentable.
Proof. Let hA, αi be a Γ-coalgebra and let{ci :Ci  ,2/ A}be a conjunct representation of A (in E). Then, by Theorem 3.7.12, each hCi iα is
conjunctly irreducible. Because the diagram below commutes (in E), and because U
creates colimits, the hCi i’s form a conjunct representation of hA, αi.
`
U hCi i  ,2 7 /7A A
O
`

Ci

ww
ww
w
ww
ww



In the remainder of this section, we give sufficient conditions to ensure that thebase category E is conjunctly presentable. As a corollary to this, Set is a conjunctly
presentable, but that fact is easy enough that one would prove it directly. We offer
this discussion to indicate that other categories are also presentable — although theassumption we use (that E is well-pointed) is a strong assumption. In a sense, weshow here that sufficiently “Set-like” categories are conjunctly presentable.

3.7. UNIFORMLY CO-BIRKHOFF CATEGORIES

159

Definition 3.7.14. Let C be a cocomplete category. A set {Ui }i∈I of objects of
C is a (regular, resp.) generating family if, for every C ∈ C, there is a J ⊂ I suchthat there is (regular, resp.) epi`/ /C .
i∈J Ui
It is immediate that, if E has a regular generating family of conjunctly irreducible
objects, then E is conjunctly presentable. It is almost as obvious that, if E has aregular generating family in which each object is conjunctly presentable, then E isconjunctly presentable, as the following theorem shows.
Theorem 3.7.15. Let E have a set {Ui }i∈I of regular generators and assume thateach Ui has a conjunct representation. Then E is conjunctly presentable.
Proof. Let Si be the set of conjunctly irreducible objects in the conjunct repreSsentation of Ui . Then i∈I Si is a regular generating family of conjunctly irreducible
objects.

The following definition is stated in terms of toposes with all colimits just forconsistency with the definition of generating families above. Both definitions are
more general than we have stated here, but we are at present interested only ingenerating families in cocomplete categories, as it is in these categories that theconcept is closely related to conjunct coverings.
Definition 3.7.16. A topos E with all colimits (equivalently, limits) is wellpointed if 0 6= 1 and 1 is a (regular) generator for E (i.e., {1} is a generating family).
See any good topos theory book for a discussion of well-pointed toposes, including[LM92, BW85] or [Bor94, Volume III]. In what follows, we use the fact that, in a
topos, every epi is regular.
Claim 3.7.17. In a well-pointed topos, any A 6= 0 has a global point.
Proof. If A 6= 0, then the classifying maps for 0 ≤ A and A ≤ A are distinct.
Hence, there must be a map 1 / A which distinguishes them.
Theorem 3.7.18. Let E be a well-pointed topos with all colimits and suppose that
E is regular. Then E is conjunctly presentable.
Proof. We first show that 1 is conjunctly irreducible. Let{ci :Ci  ,2

/ 1}

`be a conjunct covering. Then Ci 6= 0 and so, for some i, Ci 6= 0. Hence, Ci has a
global point x. Since the composite
1x/ C  ,2ci / 1

160

3. BIRKHOFF’S VARIETY THEOREM

is the identity, ci is an isomorphism.
Since every object is covered by a coproduct of 1’s, the result follows.



As a final aside, we point out that in a well-pointed topos with all colimits, theonly conjunctly irreducible objects are 0 and 1.
Corollary 3.7.19. An object C in a well-pointed topos with all colimits is conjunctly irreducible iff C ∼= 1 or C ∼= 0.
Proof. Clearly, 0 and 1 are irreducible. Let C be given, and suppose C isconjunctly irreducible. Suppose also that C is not initial. Then C can be written
as a non-empty coproduct of 1’s. Hence, since C is assumed irreducible, C must be
isomorphic to 1.

3.7.2. Bounded functors. Throughout this section, we assume that E is coBirkhoff and that Γ is a covarietor that preserves regular monos. We use some of theterminology of the preceding section in order to define the relevant terms here — inparticular, in order to define bounded functor. It should be noted that Jiri Adámek
recently showed that bounded Set functors are just the accessible functors ([AP01]),
although we do not exploit this discovery in what follows.
Definition 3.7.20. Let E be conjunctly presentable and let Γ : E / E . We saythat Γ is a bounded by C ∈ E just in case for each Γ-coalgebra hA, αi, there is aconjunct representation/ A}i∈I{ci :Ci  ,2of A such that, for each i, there is a regular subcoalgebra
hDi , δi i ≤ hA, αisuch that Ci ≤ Di ≤ C.
The lemma below is the dual of Lemma 3.4.12.
Lemma 3.7.21. Let V be a covariety in the co-Birkhoff category C and let A be a
regular subobject of B. ThenV{εV
B }⊥ ⊆ {εA }⊥ .
Proof. Let C ⊥ εV
B and let f :CA  ,2/ A be given. Let
/B

// E

be an equalizer diagram. Because GV preserves equalizer diagrams (the dual ofCorollary 3.2.14), the bottom row in Figure 11 is an equalizer. The vertical arrows are/ GV B ,counits for the comonad hGV , εV , δ V i. Because C ⊥ εV
B , we have a map C

3.7. UNIFORMLY CO-BIRKHOFF CATEGORIESC

f/ A  ,2
O
" _LR

GV A

//

/B
O
 ,2

LR
) _
/ GV B
//

161

EO
_LR

GV E

V
Figure 11. If A ≤ B then {εVB }⊥ ⊆ {εA }⊥ .

as shown. By naturality, the diagramC  ,2/ GV B//GV E

commutes, yielding the factorization of f through GV A, as shown.

The next theorem is another example of a “dual” theorem which is not proved“by duality”. The algebraic analogue to Theorem 3.7.22 is Theorem 3.4.15, in which
we showed that, if E is Birkhoff with enough retractably presentable regular projectives and a regular projective X satisfying certain properties and Γ preserves filteredcolimits and regular epis, then E Γ is uniformly Birkhoff. These assumptions do not
dualize in a reasonable way (since the dual of the conditions on X, say, involves dualizing finitely presentable objects, and the result of that is unfamiliar and apparently
uncommon). Hence, we offer a separate proof of the uniformly co-Birkhoff theorem
here, one which is apparently simpler than the algebraic version, but again does notdualize in an obvious way.
The reader should note that in the following theorem, we do not suppose that E is
uniformly co-Birkhoff. Again, this is a different approach to reach a result analogous
to that of Theorem 3.4.15.
Theorem 3.7.22. Let E be conjunctly presentable. If Γ : E
then EΓ is uniformly co-Birkhoff.

/ E is bounded by C,

Proof. Let D be a regular injective object of E such that C ≤ D (E has enoughregular injectives). Clearly Γ is bounded by D. We already know V ⊆ {εVHD }⊥ .
We will prove the other inclusion, in order to conclude that HD is a coequational
codomain.
Let hA, αi ⊥ εV
HD and let{ci :Ci  ,2/ A}be a conjunct representation of A. For each i, choose a regular subcoalgebra hDi , δi i
of A such that Ci ≤ Di ≤ D. Because {εVHD }⊥ is closed under regular subobjects, weV
see that hDi , δi i ⊥ εHD for each hDi , δi i.

162

3. BIRKHOFF’S VARIETY THEOREM

Each U ηδi is a regular mono (since εU ◦ U η = 1), and U reflects regular monos.
Hence, since U and H also preserve regular monos, we see that
hDi , δi i ≤ HDi ≤ HD.
We apply Lemma 3.7.21 to conclude that each hDi , δi i ⊥ εV
δi . Hence, each hDi , δi i ∈`V (Corollary 3.6.5), and so
hDi , δi i ∈ V. Because U creates coproducts andreflects epis,`/ / hA, αi
hDi , δi i

is an epi, and so hA, αi ∈ V.



3.8. Invariant coequations
In Section 3.5, we presented Birkhoff’s deductive completeness theorem in termsof closure operators on sets of equations, that is, subsets of U F X × U F X. In thissection, we present the dual theorem, which we call the invariance theorem. As we willsee, the dual of deductive closure leads to two S4 necessity operators for coequations.
The first operator is just the subcoalgebra operator  from Section 2.2.2. The second
operator, , was first introduced in [Hug01], in which this material is also covered.
It takes a coequation to the largest endomorphism-invariant sub-coequation.
Throughout this section, we assume that E is a co-Birkhoff category and Γ is aregular-mono-preserving covarietor, so that the coalgebraic covariety theorem applies.
The deductive completeness theorem says that a set E of equations is the equational theory for some class V of algebras just in case E is deductively closed. Previously, we introduced a closure operator
IdX :Sub(E Γ )/ Rel(U F X, U F X),

taking a class V to the largest set of equations over X which V satisfies. This
operator forms a Galois correspondence with the operator
SatX :Rel(U F X, U F X)

/ Sub(E Γ ),taking a set of equations to the variety it defines. Dually, we may define operators,
for each injective C,
CoIdC :Sub(EΓ )/ RegSub(U HC),F rcC :RegSub(U HC)/ Sub(EΓ ),in the obvious way. Namely, if V is a class of coalgebras, and K ≤ U HC, then(abusing set notation in the second definition)^
CoId(V) = {L ≤ U HC | V L},
F rc(K) = {hA, αi | hA, αiK}.

3.8. INVARIANT COEQUATIONS

163

Again, of course, we have a pair of adjoint functors, CoId a F rc. Note, however,that both of these functors are covariant. That is,
CoId(V) ≤ K iff V ≤ F rc(K).
In ibid, the coequation CoId(V) is called a generating coequation , since it givesa measure of the “coequational commitment” of the class V. In particular, wheneverV K, then CoId(V) ≤ K.
Our goal, then, is to find conditions on K ≤ U HC such that K = CoId(V) forsome class V of coalgebras. As before, the conditions should be “syntactic” terms,
without reference to the coalgebras which force K. We begin by introducing thenotion of endomorphism-invariance.
The notion of an endomorphism-invariant coequation arises as the dual to a stable
set of equations, that is, a set of equations closed under substitutions of terms forvariables. More accurately, endomorphism-invariant coequations are dual to stable
quotients, and the invariance operator plays the role of closure under substitution.
Definition 3.8.1. A coequation K over C is endomorphism-invariant just incase, for every homomorphism
p :HC/ HC ,

the image of K under p is contained in K, i.e.,∃p K ≤ K.
Sometimes, we write endo-invariant, or possibly just invariant, for endomorphisminvariant. However, the reader should be aware that other authors say that a subobject K of U hA, αi is invariant (or “α-invariant”) just in case K is the carrier of a
subcoalgebra of hA, αi. Indeed, we use a similar terminology (“α, β-invariant”) in the
proof of Theorem 2.5.25. This is a different concept than endomorphism-invariant.
An endomorphism HC / HC is equivalent to a “re-painting” of the elements of
U HC, again drawing colors from C. A coequation K is endo-invariant if, under every
such re-painting, the elements of K are behaviorally (including color) indistinguishable from elements that were already in K before the re-painting.
Remark 3.8.2. The definitions of endomorphism-invariant, CoId and F rc could
be stated for arbitrary coalgebras, rather than just cofree coalgebras. We ignore thegenerality here in favor of focusing on the problem at hand, but see [Hug01].
Remark 3.8.3. Coequations over 1 are always endomorphism invariant, and so1 is just the identity.

164

3. BIRKHOFF’S VARIETY THEOREM

Let Inv(C) denote the full subcategory of RegSub(U HC) consisting of the invariant
coequations over C and let
IC :Inv(C)/ RegSub(U HC)

be the inclusion functor.
Theorem 3.8.4. IC has a right adjoint.
Proof. Let K ≤ U HC and define/ HC (∃p L ≤ K)}.

PK = {L ≤ U HC | ∀p :HC
We define a functor JC :RegSub(U HC)/ RegSub(U HC) by

JC (K) =

_

L∈



L,

K

omitting the subscripts on I and J when convenient.
We first show that JK is invariant. Let
r :HC

/ HC

be given. In order to show that ∃r JK ≤ JK, it suffices to show that ∃r JK ∈ PK , i.e.,
for every homomorphism p :HC / HC , we have ∃p (∃r JK) ≤ K. A quick calculation
shows
_
_
∃p ∃r JK = ∃p◦r
L=
∃p◦r L ≤ K.
L∈



K

L∈



K

Next, we show that I a J. Let L be invariant. If L ≤ K, then, for every
endomorphism p,∃p L ≤ L ≤ K,

so L ∈ PK and hence L ≤ JK. On the other hand, if L ≤ JK, then
L ≤ JK ≤ K.
The adjoint pair IC a JC yields a comonad C = IC JC . We will prove that C
is an S4 necessity operator, just as we showed in Theorem 2.2.16 that  is an S4
operator. First, some examples calculating K for a coequation K.
Example 3.8.5. Let ΓS = (Pfin S)I , as in Example 3.6.15. Recall that the class ofdeterministic automata Det forms a covariety of SetΓ , where the defining coequation
K over 2 is given by
K = {x ∈ U H2 | ∀i ∈ I ∀y, z ∈ σ(x)(i) . ε2 (y) = ε2 (z)}.
It is easy to show thatK = {x ∈ U H2 | ∀i ∈ I ∀y, z ∈ σ(x)(i) . y = z},3.8. INVARIANT COEQUATIONS

165

or, more simply,
K = {x ∈ U H2 | ∀i ∈ I . card(σ(x)(i)) < 2}.
Example 3.8.6. Recall the functor ΓA = Z × A and the coequation ϕ over N
defined by
ϕ = {σ | card(Col(σ)) < ℵ0 },from Example 3.6.14. For each σ ∈ U HN, let
St(σ) = {tn (σ) | n ∈ ω},where hε , h, ti :U HN  ,2  ,2 N × Z × U HN is the structure map for HN. Thenϕ = {σ | card(St(σ)) < ℵ0 }.
In other words, σ ∈ ϕ just in case the coalgebra [σ] ≤ HN generated by σ, as in
Section 2.3, forces ϕ.
Theorem 3.8.7.  is an S4 necessity operator.
Proof. Again, since  is a comonad, it suffices to show that  preserves finite
limits. It is obvious that > is invariant (so > ≤ >). We now show that
K ∧ L ≤ (K ∧ L).
Let p :HC

/ HC be given (where K, L are coequations over C). Then∃p (K ∧ L) ≤ ∃p  K ≤ K
and, similarly, ∃p (K ∧ L) ≤ L. Hence, ∃p (K ∧ L) ≤ K ∧ L. Since p was anarbitrary endomorphism, K ∧ L ≤ (K ∧ L).

Remark 3.8.8. Unlike , the operator  does not commute with pullbacks alonghomomorphisms. Let Γ : Set / Set be the identity functor. We will consider a coequation K over 2 colors, that is, a subset of U H2 = 2ω , the set of streams over 2.
Specifically, let
K = {0, 1},
where 0 and 1 are the constant streams. Note that K is invariant.
Let p :H3 / H2 be the homomorphism induced by the coloring p :3
p(0) = 0,p(1) = 0,p(2) = 1(i.e., p = H(p)). Then p∗ K is the set{σ ∈ 3ω | ∀n σ(n) < 2} ∪ {2}.
It is easy to check that
p∗ K = {0, 1, 2} 6= p∗ (K) = p∗ K.

/ 2, where166

3. BIRKHOFF’S VARIETY THEOREM

In terms of substitutions, then, it is not the case that, for every homomorphism
f :hB, βi/ hA, αi,(K)[f (y)/x] = (K[f (y)/x]).
Next, we show that, for any coequation K over C, K and K define the same
covarieties as K. Dually, then, we are proving that, given a set of equations E, thevarieties defined by taking the least congruence containing E and by closing E undersubstitutions are the same as the variety that E defines.
Theorem 3.8.9. Let C be given, K a coequation over C.
CoId(K) = CoId(K).
Proof. Since K ≤ K, clearly CoId(K) ≤ CoId(K). For the other inclusion,
suppose that hB, βi K. Let
p :hB, βi/ HC

be given. To show that Im(p) ≤ K, we will show that, for every endomorphismr :HC/ HC ,∃r Im(p) ≤ K. But, ∃r Im(p) = Im(r ◦ p) ≤ K, since hB, βiK.



Theorem 3.8.10. Let C be given and K a coequation over C.
CoId(K) = CoId(K).
Proof. Again, trivially, CoId(K) ≤ CoId(K). Let hB, βip :hB, βiK and let/ HC

be given. Then U Im(p) = Im(U p) ≤ K and so, by the adjunction U a [−], Im(p) ≤[K]. Thus,
Im(U p) = U Im(p) ≤ U[K] = K.

Recall the [−] functor from Section 2.2.1, which takes a regular subobject of
A = U hA, αi to the largest subcoalgebra contained in A. Hence, if K is a coequation
over C, then [K]HC is a subcoalgebra of HC. Since it is a coalgebra, in particular,
one may ask whether the coalgebra [K] forces the coequation K. In general, thisis not the case. However, if K is invariant, then [K]K, as the following lemmashows.
Lemma 3.8.11. Let K be a coequation over injective C. Then [K]K.

3.8. INVARIANT COEQUATIONS

167

Proof. Let p :[K] / HC be given. Because HC is regular injective, p extends
to a homomorphism HC / HC , as shown in Figure 12. Hence, because  K < Kand K is invariant, there is a unique map   Kthus the lower triangle commute, as desired.

/  K making the square and/ U HC
s9 O
s
ss
p
s
_LR sss
_LR
/
K
K

U HC
O

Figure 12. [K]K.

The final lemma shows the relationship between  and . One has the idea that
 and  “ought” to commute, but at this point we have not found a general proofof that claim. See, however, Theorem 3.8.14 for a proof that  commutes with 
when Γ preserves non-empty intersections.
Lemma 3.8.12. For any injective C, ≤ .
Proof. By definition of , it suffices to show that, for every endomorphism
p :HC / HC , ∃p   K ≤ K. We know that, for every p, ∃p   K ≤ ∃p  K ≤ K.
Thus, since U commutes with ∃p ,U∃p [K]HC = ∃p U[K]HC ≤ K,
and so ∃p [K]HC ≤ [K]HC . Thus,∃p   K = U∃p [K]HC ≤ U[K]HC = K.
These lemmas allow a simple proof of the invariance theorem.
Theorem 3.8.13 (Invariance theorem). Let C be injective, K ≤ U HC. Then
K = CoId(V) for some class V of coalgebras just in case K =   K.
Proof. Let K =   K and define
V = {hB, βi | hB, βi

K}.

168

3. BIRKHOFF’S VARIETY THEOREM

Then, clearly, V
K. We will show that, if V
Lemma 3.8.12, we see thatL, then K ≤ L.

From

K =   K =   K ≤   K = K
so K = K. From Lemma 3.8.11, we know that [K] = [K] is in V. Consequently,[K] L and hence
K = ∃id   K ≤ L.

As we said previously, one suspects that  ought to commute with . Instead, we
have shown (by Lemma 3.8.12) the weaker claim that  ≤ . We have neither
a proof that, in general,  =  nor a counterexample. However, the following
theorem gives some progress to the goal. It shows that, if the forgetful functor
UHC :SubCoalg HC/ RegSub(U HC)

has a left adjoint, as discussed in Section 2.3.
Theorem 3.8.14. If UHC has a left adjoint, hiHC , then  = .
Proof. To show that  ≤ , it is sufficient (by the adjunction U hi a ) toshow that U hi   ≤ .
Let K ≤ U HC. We will show that, for every homomorphism p : HC / HC ,∃p U hi  K ≤ K and conclude (by definition of ) that U hi  K ≤ K. By
Theorem 2.2.17 ( commutes with pullback along homomorphisms), it suffices toshow thatK ≤ p∗ K = p∗ K,or, equivalently, ∃p  K ≤ K. This is immediate from the definition of .



3.9. Behavioral covarieties and monochromatic coequations
In typical applications of coalgebras in computer science, one is concerned withbehavior “up to bisimulation”. That is, if two coalgebras behave the same (according
to bisimulation equivalence), then we do not distinguish the two, regardless of differences in “internal structure”. Thus, one is often concerned with covarieties which areclosed under total bisimulations. In this section, we discuss such covarieties, whichwere first studied in [GS98]. For another description of the same class of covarieties,
see [Roş01]. The material covered here is also found in [AH00].
Definition 3.9.1. A total relation is a relation for which each projection is epi.
Definition 3.9.2. A behavioral covariety is a covariety which is closed under
total bisimulations. That is, a covariety V such that, whenever hA, αi ∈ V andthere is a total bisimulation relating hA, αi to hB, βi, then hB, βi is also in V.

3.9. BEHAVIORAL COVARIETIES AND MONOCHROMATIC COEQUATIONS

169

We differ from Gumm on terminology here, as he refers to covarieties closed under
total bisimulations as complete covarieties.
The following theorem ensures that total bisimulations are the images of total
relations in EΓ .
Theorem 3.9.3. If hS, σi is a relation on hA, αi and hB, βi. Then Uα,β hS, σi
is a total bisimulation iff hS, σi is a total relation.
Proof. Let R = Uα,β hS, σi, with epi projections r1 and r2 and let p : S / / R be
the epi part of the epi-regular mono factorization, hU s1 , U s2 i = hr1 , r2 i ◦ p. Then
U s1 = r1 ◦ p and U s2 = r2 ◦ p, so U s1 , U s2 are epis iff r1 , r2 are epis, respectively.
By Theorem 1.2.13, U preserves and reflects epis.
Gumm shows that behavioral covarieties over Set are definable as coequations
over 1. We generalize that result to this setting and show some further equivalences.
In particular, the following theorem shows that the behavioral covarieties are exactly
the covarieties which are sinks, in the terminology of [Roş01].
Theorem 3.9.4. Let V be a covariety of EΓ . The following are equivalent.
(1) V is closed under total bisimulations.
(2) V is closed under domains of epis.
(3) V is closed under domains of arbitrary homomorphisms.
(4) V is definable by a coequation over one color (i.e.,V = {i :•  ,2

/ H1}⊥

for some regular mono i).
Proof. We prove 1⇒2 ⇒3 ⇒1 and 3 ⇔4.
1 ⇒ 2: The graph of epis are total bisimulations.
2 ⇒ 3: Let f :hA, αi / hB, βi be given, hB, βi ∈ V, and take the epi-regularmono factorization, f = i ◦ p. The domain of i is in V as a regular subcoalgebra of hB, βi. Hence hA, αi ∈ V.
3 ⇒ 1: Let hA, αi and hB, βi be given and let hR, ρi be a total bisimulation on
hA, αi and hB, βi. Suppose, further, that hA, αi ∈ V. Then, hR, ρi ∈ V,
since it is the domain of the projectionhR, ρi/ hA, αi.

Since V is closed under codomains of epi homomorphisms, hB, βi ∈ V.
3 ⇒ 4: Since V ⊆ {εVH1 }⊥ , it suffices to show the other inclusion. Let hA, αi be/ H1 factors throughgiven and suppose that hA, αi ⊥ εV
H1 . Then ! :hA, αiV
V V
εH1 , and so hA, αi is the domain of an arrow into U H H1, which is in V.

170

3. BIRKHOFF’S VARIETY THEOREM

4 ⇒ 3: Let V = {i}⊥ , where i is a regular mono into H1. Let
p :hA, αi/ hB, βi

be given and suppose hB, βi ∈ V. Then !β :hB, βi / H1 factors through i,say, !β = i ◦ f . Consequently, !α = i ◦ f ◦ p. Since !α is the only map fromhA, αi to H1, it follows that hA, αi ⊥ i.

Remark 3.9.5. In the proof of 3 ⇒ 1, we see that if hA, αi in V and hR, ρi is abisimulation on hA, αi and hB, βi such thathR, ρi/ hB, βi

is epi, then hB, βi ∈ V. We do not require that both projections are epis.
Example 3.9.6. Very often, the initial Γ-algebra can be realized as a regular
subcoalgebra of the final Γ-coalgebra, via the comparison map of Section 1.5.4 (see[Adá01, Bar93] for development of this topic). In these cases, the initial algebra
can also be viewed as a coequation ϕ over 1 color.
This provides a useful coequation in the standard examples, allowing one to distinguish between coalgebras consisting of well-founded trees, say, and those which
also contain non-well-founded trees.
It is instructive to compare Theorem 3.9.4 to its dual, which says that a varietyof algebras is closed under codomains of monos iff it is definable by a set of equations
with no variables. See Section 3.9.3 for details.
3.9.1. A covariety closure operation. We can also consider a covariety closure operation, taking a covariety to the least behavioral covariety containing it.
Specifically, we define an operator
CoVar(E )/ CoVar(E )taking a covariety V to the collection V, where hA, αi ∈ V iff there is some map
f : hA, αi / hB, βi with hB, βi ∈ V, thus closing V under domains of arbitrary
homomorphisms.
It is easy to show that this closure produces another covariety. Hence,
Theorem 3.9.7. If V is a covariety, then V is a behavioral covariety.
The next theorem states in coequational terms how to obtain V. We know that
V is defined by a collection of coequations, in the sense that V is exactly the classof coalgebras co-orthogonal to a collection of regular monos with cofree codomains.
In fact, we can say more about the collection of regular monos — namely, thatthe regular monos are the components of the counit of a regular mono co-reflection

3.9. BEHAVIORAL COVARIETIES AND MONOCHROMATIC COEQUATIONS

171(Corollary 3.2.8). We show that this counit also gives a defining coequation for V. Of
course, since V is a behavioral covariety, the only component one needs to consider
is that of the final coalgebra.
Theorem 3.9.8. Let V be a variety and εV : U V H V
associated adjunction/ 1E

 be the counit of the

UV

⊥

Vk

+

E

HV

Then V = {εVH1 }⊥ .
Proof. Let hA, αi ∈ V. Then there is an f :hA, αi / hB, βi such that hB, βi ∈V
V. Since hB, βi ∈ V, clearly hB, βi ⊥ εV
H1 . Consequently, hA, αi ⊥ εH1 .
/ H1 throughOn the other hand, if hA, αi ⊥ εV
H1 , then the factorization of hA, αiεV
H1 is a homomorphism into a coalgebra in V. Hence hA, αi ∈ V.
Note that behavioral covarieties are defined by a single coequation, regardless ofany boundedness conditions on Γ.
3.9.2. An example of a non-behavioral covariety. We have given a couple ofexamples of non-behavioral covarieties previously, including Examples 3.6.11, 3.6.14,
3.6.15 and 3.6.16. We provide an example here that arises from a comparison of
categories of streams.
Consider the functors N × − and 1 + N × − on the category Set. As usual, we
think of coalgebras for these functors as collections of streams over N (see [JR97],
for instance). In particular, a coalgebra for N × − can be thought of as a collectionof infinite streams, closed under the tail destructor. A coalgebra for 1 + N × − canbe understood as a collection of finite or infinite streams over N, again closed under
the tail destructor (when defined).
It is clear that the category Set ×− is a full subcategory of Set1+ ×− . What isless obvious is that one can regard Set1+ ×− as a full subcategory of Set ×− , and itis this perspective on which we will focus. Define a functor Set1+ ×− / Set ×− asfollows. If hA, αi is a 1 + N × − coalgebra, then I(hA, αi) = hA, αi0 will be a N × −coalgebra. Specifically, let α0 be defined by(h0, aiif α(a) = ∗α0 (a) =hhα (a) + 1, tα (a)i else













(where hα (a) = π1 ◦ α(a) and tα = π2 ◦ α(a) when α(a) ∈ N × A). Intuitively, I takes
infinite lists to the list one gets by applying successor in each position. For finite lists,
I again applies successor in each position and then tacks on 0’s at the end. However,the 0’s are tacked on in a particular manner — once we hit 0 in the list, the “state”
never changes. We stay at the same element of A and continue outputting 0’s. This

172

3. BIRKHOFF’S VARIETY THEOREM

description should lend plausibility to the claim that V is not behavioral, which wewill later prove. The property that a coalgebra stabilizes at a particular state is not
a property closed under total bisimulation.
It is routine to check that this defines a functor and, furthermore, that it is full,
faithful and regular injective on objects. Let V be the image of Set1+ ×− . One
could check directly that V is a covariety, but we prefer to explicitly give a defining
coequation (over 2 colors) instead. In keeping with the coloring metaphor, we denotethe elements of 2 by red and blue.
Let hh, ti be the structure map on H2 and define ϕ ≤ U H2 by

ϕ = {σ ∈ U H2 | h(σ) = 0 → ε2 (σ) = ε2 ◦ t(σ)}.
We will show that V = F rc(ϕ).
Suppose that a ∈ A and hα (a) = 0, but tα (a) 6= a (i.e., assume hA, αi 6∈ V).
Then, we define a coloring p on A by(
red if a = b
p(b) =
blue else
Then, let pe be the adjoint transpose of p. We see thath(ep(a)) = hα (a) = 0,but ε2 (ep(a)) = red andε(t(ep(a))) = ε(ep(t(a))) = p(t(a)) = blue .
Hence, pe(a) 6∈ ϕ, and so hA, αi 6 ϕ.
On the other hand, suppose that hA, αi ∈ V and let p : A / 2 be given. Leta ∈ A and we will show that pe(a) ∈ ϕ. Accordingly, assume that h(ep(a)) = 0. Then,hα (a) = 0 and so tα (a) = a. Consequently, ε2 (ep(a)) = ε2 (tep(a)) and so pe(a) ∈ ϕ.
Since this holds for any a ∈ A, we see that pe factors through ϕ and so hA, αi ϕ.

Remark 3.9.9. While this coequation defines the covariety V, it is worth notingthat ϕ is not itself an element of the covariety. Instead, there is a proper regular
subcoalgebra of ϕ which is in the covariety and which also defines V, namely U  [ϕ],where  is the modal operator from Section 3.8 which takes a coequation to its
largest invariant subcoalgebra. This coequation is given by
U  [ϕ] = {σ ∈ U H2 | ∀nhtn (σ) = 0 → tn+1 (σ) = tn (σ)}.

3.9.3. The dual to behavioral covarieties. In this section, we relate thediscussion of behavioral covarieties to categories of algebras. Throughout this section,
we assume that E is a Birkhoff category and Γ preserves regular epis and is a varietor,
so that U :E Γ / E is monadic.

3.9. BEHAVIORAL COVARIETIES AND MONOCHROMATIC COEQUATIONS

173

Definition 3.9.10. Let V be a full subcategory of E Γ . We say that V is anelementary variety if V = {p}⊥ for some regular epi p :F 0  ,2 •.
Clearly, if V is an elementary variety, then it is a variety.
In the traditional setting, then, a variety is elementary just in case it is definable
by a set of variable-free equations. Of course, if the signature has no constants, thenthis means that the only elementary variety is trivial.
Definition 3.9.11. We say that two Γ-algebras hA, αi and hB, βi are constructibly equivalent just in case h0iα ∼= h0iβ (i.e., just in case the least subalgebra ofhA, αi is isomorphic to the least subalgebra of hB, βi).
We call this constructible equivalence because it requires that the “constructible”
parts of hA, αi and hB, βi are isomorphic. That is, it requires that those elementsof hA, αi and hB, βi which can be specified by a variable-free term (i.e., by terms
in F 0) satisfy the same equations. This description hints at the relation between
constructible equations and elementary varieties. We make the relation explicit in
the following theorem.
Theorem 3.9.12. Let V be a variety of E Γ . The following are equivalent.
(1) V is closed under constructible equivalences.
(2) V is closed under codomains of monos.
(3) V is closed under codomains of arbitrary homomorphisms.
(4) V is elementary.
Proof. This theorem is the dual of Theorem 3.9.4. However, we have not dualized closure under total bisimulations directly, since corelations are not familiar
objects of study. Instead, we’ve replaced that condition with the closure under constructible equivalence. We provide the relevant steps.
1 ⇒ 2: Let hA, αi / / hB, βi be given. Then, by Theorem 1.3.7, h0i α is given
as the factorization of !α , as shown below.
F 0C

CC
CC
CC
 &

!α

/ hA, αi /
w;
w
ww
w
w
;ww

/ hB, βih0i αBy the uniqueness of regular epi-mono factorizations, h0iα ∼= h0iβ , so hA, αiand hB, βi are constructibly equivalent.
4 ⇒ 1: Let
V = {p :F 0

 ,2hQ, νi}⊥

174

3. BIRKHOFF’S VARIETY THEOREM

and let hA, αi and hB, βi be constructibly equivalent, with hA, αi ∈ V.
Then, !α factors through p, as shown in the diagram below.
 ,2

F0
p

;

h0iα //
5 hA, αi_hQ, νi
Because p is regular (and hence, strong), we have the factorization ofhQ, νi/ hA, αithrough h0iα ∼= h0iβ , as shown. This gives a factorization of !β through ηFV0 ,as desired.
CHAPTER 4

The internal logic of EG
It is well-known that, if E is a topos and a comonad G : E / E is left exact, thecategory of coalgebras E is also a topos [BW85, Theorem 6.4.1]. Furthermore,
Johnstone, et al, strengthened this result in [JPT+ 98] by showing that, if G preserves
pullbacks (but not necessarily all finite limits), then E is again a topos. One corollary
to these theorems is that there is a natural logic for at least certain categories of
coalgebras, the “internal logic” associated with a topos.
In this chapter, we weaken the conditions on E and G, so that E is not necessarily
a topos, while retaining sufficient structure so that we can define an internal logic
for E . In particular, in this section, we show that if E is a locally complete logos,
with regular epi-regular mono factorizations and coproducts, and G nearly preserves
pullbacks, then E is a locally complete logos. Consequently, we can define a logic
L(E ) which can be interpreted in E . We discuss the internal logic of a an arbitrary
locally complete logos in Section 4.1.2.
Since, by assumption, the base category E is also a locally complete logos, there isan internal logic, L(E), for it as well. We introduce types for the carriers of coalgebras
and a modal operator for the largest subcoalgebra construction in Section 4.2. We
also introduce a translation of formulas from L(E ) to L(E) which preserves andreflects valid sequents.
We conclude the chapter by relating the Kripke-Joyal semantics for L(E) to thedefinition of coequation forcing given in Chapter 3, and offering a definition of pointwise forcing of coequations which we relate to the comonad associated with a coequation.
Throughout this chapter, we develop the theory for categories of coalgebras for acomonad, rather than coalgebras for an endofunctor. We do this so that the internal
logic we develop can be applied to the covarieties from Chapter 3. In fact, thepresence of a right adjoint to the forgetful functor plays little role otherwise.
4.1. Preliminary results
We begin with a result found in [GHS01]. One could develop the internal logic of
E without requiring that the category is extensive, although this would preclude ourdefinitions for coproduct types. We want to exploit coproducts in E by introducing
175

176

4. THE INTERNAL LOGIC OF Ethe appropriate types and terms in L(E ), and so we begin with a proof that, if
G preserves pullbacks along regular monos, E inherits extensiveness from the basecategory E. A similar result can be found in [JPT+ 98, Lemma 3.8].
Theorem 4.1.1. If E is extensive, with epi-regular mono factorizations, and G
preserves regular monos and non-empty pullbacks along regular monos, then E isextensive.
Proof. Let the commutative diagram in Figure 1 be given. Since co-projections
hX, χi/ hZ, ζi ohY, υihA, αi  ,2 κα / hA, αi + hB, βi o κβ lr  hB, βi
Figure 1. E is extensive.
in extensive categories are regular monos [Tay99, Lemma 5.5.7] and U reflects regularmonos, the co-projections κα and κβ are also regular monos.
Hence, U creates pullbacks along co-projections. Since U also creates coproducts,
the result follows.

Until now, we have been satisfied with epi-regular mono factorizations without
assuming that these factorizations are stable under pullback. To develop a reasonableinternal logic, one wants this stability condition. Without stable factorizations, wewould lose basic structural features in the language, including that existentials andjoins commute with substitutions.
One way to ensure stable factorizations is to ensure that our epi-regular mono
factorizations involve epis which are stable under pullbacks. This is the approach wetake here, exploiting results from [JPT+ 98], in which they show that, if G nearlypreserves pullbacks, then E inherits regularity from E.
Definition 4.1.2. A functor F : C / D nearly preserves pullbacks if, for eachpullback A ×C B, F (A ×C B) covers F A ×F C F B, i.e., the canonical isomorphism
F (A ×C B)/ F A ×F C F B

is a regular epi.
In ibid, they show that, if F nearly preserves pullbacks, then it preserves pullbacks along monos and hence it preserves monos. Using this, they prove that, if thecomonad G nearly preserves pullbacks and E is regular, then E is regular ([JPT+ 98,

4.1. PRELIMINARY RESULTS

177

Lemma 3.9]). We adapt that result to our setting, in which regular monos are of special interest. Hence, we will assume that the category E has regular epi-regular mono
factorizations. First, we note that this implies that every mono is regular (and every
epi is regular, too). While this seems a somewhat strong restriction, it is true in any
topos.
Lemma 4.1.3. In a category E with regular epi-regular mono factorizations, every
mono (epi,resp.) is regular.
Proof. Let i : A / / B be given and take the regular epi-regular mono factorizations i = j ◦ p. Since p is both regular epi and mono, it is an isomorphism. Dualize
to conclude that every epi is regular, too.

Theorem 4.1.4. If E is regular, with regular epi-regular mono factorizations(equivalently, E regular and every mono regular) and G nearly preserves pullbacks,then E is regular, with regular epi-regular mono factorizations created by U .
Proof. Essentially that from [JPT+ 98]. There, they assume that U preservesmonos. Here, we use the fact that G preserves monos and every mono is regular toconclude that G preserves regular monos. Thus, we may apply Corollary 1.2.15 toconclude that U preserves regular monos. The rest of the proof goes as in ibid. 
Corollary 4.1.5. Under the assumptions of Theorem 4.1.4, every mono in E
is regular and hence U preserves and reflects monos.
We adopt the material that follows from [Tay99]. See also [FS90].
A logos is a category in which one may interpret first order logic. We sketch how
this is done in Section 4.1.2. In the remainder of this section, we show that if E
is a “locally complete” logos (a logos with arbitrary, stable unions), and G nearlypreserves pullbacks, then E is also a locally complete logos.
Definition 4.1.6. A regular category in which finite unions of subobjects exist
and are stable under pullbacks and each subobject pullback functorf ∗ :Sub(B)/ Sub(A)has a right adjoint is called a logos.
Definition 4.1.7. A regular category in which arbitrary unions of subobjects
exist and are stable under pullbacks is called a locally complete logos.
From [Tay99, Definition 5.8.1] and [Tay99, Theorem 3.6.9]:
Theorem 4.1.8. In a locally complete logos, for each f : A
pullback functor/ Sub(A)f ∗ :Sub(B)/ B , the subobject

178

4. THE INTERNAL LOGIC OF E

has a right adjoint (i.e., a locally complete logos is, in particular, a logos).
The following theorem is the main theorem justifying the rest of the chapter. We
show that E is a locally complete logos, assuming that E is (together with someother assumptions). This allows the definition of a first-order internal logic for E .
Since, by assumption, E is also a locally complete logos, it, too, has a natural internal
logic. We exploit these two logics in Section 4.2.
Theorem 4.1.9. Let E be regular, with regular epi-regular mono factorizationsand G nearly preserve pullbacks (and, hence, G preserves monos), and suppose further
that E is a locally complete logos with all coproducts. Then E is also a locally complete
logos.
Proof. The forgetful functor creates unions and pullbacks along monos. Thus,
if {hAi , αi i}i∈I is a family of subcoalgebras of hB, βi and f : hC, γi / hB, βi is a
G-homomorphism, then[[[[U f ∗ hAi , αi i = f ∗ Ai =f ∗ Ai = U
f ∗ hAi , αi i,SSand so f ∗ hAi , αi i = f ∗ hAi , αi i.
We can give an explicit definition of the functor ∀f in terms of [−], U and thefunctor ∀U f in E. Since we need this characterization in Theorem 4.2.5, we include
it here.
Theorem 4.1.10. For any homomorphism f :hA, αi/ hB, βi,∀f = [−]β ◦ ∀U f ◦ Uα .
Proof. Because f ∗ ∀f ≤ 1 and [−] commutes with pullbacks of homomorphisms(Corollary 2.2.8), we have, for every hC, γi ≤ hA, αi,f ∗ [∀f C]β = [f ∗ ∀f C]α ≤ [C]α = hC, γi.
Hence, [∀f C]β ≤ ∀f hC, γi.
Conversely,f ∗ Uβ ∀f hC, γi = Uα f ∗ ∀f hC, γi ≤ Uα hC, γi = C,
and so ∀f hC, γi ≤ [∀f C]β .



We summarize the results of Theorems 2.2.5, 2.2.5 and 2.2.6 in the following
corollary.
Corollary 4.1.11. The forgetful functor Uα :RegSub(hA, αi) / RegSub(A) preserves ∧, ∨, ∃, ⊥ and > (but not ∀, → or ¬). That is, for any subcoalgebrashP, ρi, hQ, νi ≤ hA, αi, we have(1) Uα (hP, ρi ∧ hQ, νi) = P ∧ Q

4.1. PRELIMINARY RESULTS(2) Uα (hP, ρi ∨ hQ, νi) = P ∨ Q(3) For every homomorphism f :hA, αi(4) Uα hA, αi = A and Uα h0, !i = 0.

179

/ hB, βi, ∃f hP, ρi = ∃U f P .

In other words, Uα “almost” preserves geometric logic (see [LM92, ChapterX]). The situation is complicated by the fact that Uα does not, in general, preserve finite limits. Thus, it doesn’t preserve the interpretation of contexts Γ =x1 : T1 , . . . , xn : Tn , which complicates the translation of formulas in the internal logicof E into formulas in the internal logic of E. Also, it doesn’t preserve equalizers, so
equations in E are not translated to equations in E. We will see how to avoid these
difficulties in Section 4.2, where we define a translation of formulas from L(E ) torelated formulas in L(E).
4.1.1. A weak regular subobject classifier. In this section, we show that
if E has a weak regular subobject classifier, then so does E . This section is selfcontained, in the sense that we do not exploit the weak regular subobject classifier
when we develop the internal logic. Throughout, we assume that E is almost coregular and G preserves regular monos.
Definition 4.1.12. Let Ω ∈ E and true : 1 / Ω be given. We say that Ω (or thepair hΩ, truei) is a weak regular subobject classifier if, for every regular mono P  ,2 / A,there is a (not necessarily unique) A / Ω such that the diagram below is a pullback.
P_ 

/1





 _

A

true

/Ω

Theorem 4.1.13. Let Ω in E be a weak regular subobject classifier. Then HΩ isa weak regular subobject classifier in E .
Proof. Let hP, ρi ≤ hA, αi. We will show that there is a homomorphism
hA, αi / HΩ such that the front face of Figure 2 is a pullback.
Let r :A / Ω be a classifying map for p in E and let re:hA, αi / HΩ be the adjoint
transpose of r, as in Figure 2. A quick diagram chase confirms that the front face ofthe prism commutes.
Suppose that g :hB, βi / hA, αi satisfies re ◦ g = Htrue◦!. Thenr ◦ U g = εΩ ◦ U (er ◦ g) = εΩ ◦ U Htrue ◦ U ! = true◦!,and so Im(g) ≤ P . Corollary 1.2.10 ensures that the factorization of g through P isa homomorphism.
Corollary 4.1.14. Suppose E is regular and every mono of E is regular. Further
suppose that G nearly preserves pullbacks. Then E has a weak subobject classifier.

180

4. THE INTERNAL LOGIC OF E

? 1 bFFF
~~
FF ε1
~
FF
~~
~
FF
~~
/ U H1
P_



~

r ~~

~~
 ~~

A

? Ω bFFUr

U Htrue

FF εΩ
FF
FF
F 
/ U HΩ

Figure 2. HΩ is a weak regular subobject classifier
Proof. Apply Corollary 4.1.5.

The presence of a regular subobject classifier (not weak) in E is not sufficient toensure that E has a regular subobject classifier in general. To see this, consider ahomomorphism re:hA, αi / HΩ, and let r :A / Ω with P the subobject of A characterized by r, as in Figure 2. Then P is the pullback of U Htrue along U re. It is easy
to check that α P is the pullback of Htrue along re. Thus, for any homomorphisms
p :hA, αi/ HΩ,q :hA, αi/ HΩ,we see that p and q classify the same subcoalgebra just in case P = Q, whereεΩ ◦ p classifies P and εΩ ◦ q classifies Q.
This observation does give a canonical choice for a characteristic map for a subcoalgebra. Given hP, ρi ≤ hA, αi, as in Theorem 4.1.13, let re be the transpose ofthe (unique) characteristic map of P in E. Then, re is minimal in the sense that, if s
is any other characteristic map for hP, ρi, then (the object classified by) εΩ ◦ U re issmaller than (the object classified by) εΩ ◦ U s.
4.1.2. The internal logic of a logos. Given a locally complete logos C, one
can define a first order language L(C) which can be interpreted in C. The first order
intuitionistic logic is sound under this interpretation. Applying this result to thecurrent setting, this leads to two first order languages. On the one hand, the basecategory E is, by assumption, a locally complete logos and thus we may define alanguage L(E) and an interpretation of the language in the category E. On the other
hand, E is also a locally complete logos and so we may define a language L(E ) overE . In Section 4.2, we will translate formulas in the language L(E ) to formulas inL(E)4.1. PRELIMINARY RESULTS

181

In this section, we will show how one defines a first order language L(C) for
any distributive, locally complete logos C with coproducts (for the coproduct types
below). This construction applies to the categories E and E , yielding the languages
L(E) and L(E ).
See any of [But98, Bor94, LM92, Tay99, LS86] for presentations of the internal logic of a category.
The language L(C) is a typed first order language. We write x : T to indicate thatx is a variable of type T (we assume a countable set of variables). A context Γ is a
finite list of such declarations. We write Γ, x : T to indicate the context Γ with a new
declaration for x. Whenever we write this, we assume that x does not already occurin Γ. We write Γ | t : T to indicate that, in context Γ, the term t is of type T . This
notation presumes that the free variables of t appear in Γ. We write Γ | ϕ to indicatethat ϕ is a well-formed formula in context Γ.
For each object C ∈ C, we define a type C in L(C). For each pair of types S and
T , we define types S × T and S + T . The types are interpreted as objects in C in theobvious way. I.e., C = C, S × T = S × T , etc. The type formation rules andinterpretation of types are summarized in Table 1.

     

Type formation rule Interpretation
C
C
S×T
S × T
S+T
S + T
1
1
Table 1. The inductive definition of types.

      A context inherits its interpretation from the terms, so that

 x : T ,x : T ,... ,x : T  =  T  ×  T  × ...×  T  .
1

1

2

2

n

n

1

2

n

The empty context is, of course, interpreted as 1, the final object of C. We want totreat the contexts as unordered, so that we don’t differentiate between the contexts
Γ = x : S, y : T and ∆ = y : T, x : S.
We may do this by assuming an ordering on the types, so that there is a canonicalrepresentative for each equivalence class of contexts (and so that a context is interpreted as its representative is). None of this is crucial in what follows, but it simplifies
the presentation.
A term t : T in context Γ is interpreted as a function Γ | t : T  =  t :  Γ

 

/ T .

182

4. THE INTERNAL LOGIC OF E

 





We omit the types and write Γ | t , or just t , when convenient. For each type T ,and each variable x, we have the term formation ruleΓ, x : T | x : T .
We interpret variables as the projection Γ ×  T 

πT

 .

/ T

  /  T  , we have also a term formation rule

For each arrow f : S

Γ, x : S | f x : T ,and an interpretation Γ, x | f x = f ◦  Γ, x | x :  Γ ×  S 

 .

/ T

In addition to variables and terms for each function symbol, we include the following
term formation rules in Table 2. In what follows, we let t[s/x] denote the result of
substituting the term s for the variable x in term t, where this operation is definedinductively as usual. Similarly, ϕ[s/x] denotes the substitution of s for x in theformula ϕ, where this is defined as usual.
Term formation ruleInterpretation/ TΓ, x : T | x : T
πT : Γ × T
Γ, x : S | f x : Tf◦ xΓ | ∗: 1!Γ : Γ / 1
Γ, x : S, y : T | (x, y) : S × T
h x , y i
Γ, x : S × T | π1 x : S
π1 ◦ xΓ, x : S × T | π2 x : T
π2 ◦ xΓ, x : S | inl x : S + T
κ1 ◦ xΓ, y : T | inr y : S + T
κ1 ◦ xΓ, x : S | s : U
Γ, y : T | t : U[ s , t ]Γ, z : S + T | case z of x ⇒ s, y ⇒ t : U
Γ, x : S | t : T
Γ | s: St ◦ hid Γ , s i
Γ | t[s/x] : T
Table 2. Term formation rules for L(C).

             
 
 
 
 
 
  Remark 4.1.15. In the interpretation of the case statement in Table 2, we implicitly use the isomorphism Γ ×  S + T  ∼= (  Γ ×  S  ) + (  Γ ×  T  ).

Remark 4.1.16. It is easy to verify that, if Γ | t : T , then Γ, ∆ | t : T . Furthermore, Γ, ∆ | t =  Γ | t ◦ π   .
Γ

4.1. PRELIMINARY RESULTS

 

183

A formula ϕ in context Γ is interpreted as a subobject of Γ . We give theinductive definition of the class of formulas of L(C) together with their interpretationsin Table 3.
Formula formation rule Interpretationx : T | ϕP (x)P  ,2 / T
x : T, y : T | x = y
∆T

 
Γ|>
 T ,2  / /  T Γ|⊥
0  T
Γ|ϕΓ|ψ ϕ ∧  ψ 
Γ|ϕ∧ ψ
Γ|ϕΓ|ψ ϕ →  ψ 
Γ|ϕ → ψΓ, x : T | ϕ∃    ϕΓ|∃ ϕ
Γ, x : T | ϕ∀    ϕΓ|∀ ϕ
Γ, x : T | ϕ
Γ | t: Thid   ,  t i  ϕ
Γ | ϕ[t/x]Γ|ϕ(π   )  ϕΓ, ∆ | ϕ
id

πΓ

x: T

πΓ

x: T

∗

Γ

Γ

∗

Table 3. Formula formation and interpretation
The following theorem is standard. We omit the proof.
Theorem 4.1.17. For any x : S | t : T and any formula x : S | ϕ,

 y : T | ∃ (t(x) = y ∧ ϕ(x)) = ∃    ϕ ,
 y : T | ∀ (t(x) = y → ϕ(x)) = ∀    ϕ .
x: S

t

x: S

t

We use a Gentzen-style proof system, although we allow only a single formula as
the antecedent of the sequent. A sequent comes in context, where the context applies
to both the antecedent and consequent. Thus, a sequentΓ|ϕ ` ψis understood as the assertion that Γ | ϕ entails Γ | ψ.
Accordingly, a sequent Γ | ϕ ` ψ is valid (written |= Γ | ϕ ` ψ) just in caseΓ | ϕ ≤ Γ | ψ (as subobjects of Γ ).
The following are sound rules of inference for L(E). We just write the sequent foraxioms, and we write
Γ|ϕ ` ψ∆|ϑ ` χ



 



 

184

4. THE INTERNAL LOGIC OF E



to indicate a rule that, from ϕ ` ψ, one can infer ϑ ` χ. We denote equivalenceswith a double underline, so thatΓ|ϕ ` ψ∆|ϑ ` χmeans that from ϕ ` ψ, one can infer ϑ ` χ and also from ϑ ` χ, one can infer ϕ ` ψ.
Structural rules:(Str1) Γ | ϕ ` ϕ
Γ|ϕ ` ψΓ|ψ ` ϑ(Str2)
Γ|ϕ ` ϑΓ, x : T | ϕ ` ψ
Γ | t: T(Str3)
Γ | ϕ[t/x] ` ψ[t/x]Logical rules:(Log1) Γ | ϕ ` >Γ|ϕ ` ψΓ|ϕ ` ϑ(Log2)
Γ|ϕ ` ψ ∧ ϑ
Γ|ϕ ` ψΓ|ϑ ` ψ(Log3)
Γ|ϕ∨ ϑ ` ψ
Γ|ϕ ` ψ → ϑ(Log4)
Γ|ϕ∧ψ ` ϑ
Γ | ϕ ` ∀x : T ψ(Log5)
Γ, x : T | ϕ ` ψ
Γ | ∃x : T ϕ ` ψ(Log6)
Γ, x : T | ϕ ` ψEquality:(Eq1) Γ | > ` x = x(Eq2) Γ | x1 = x2 ` x2 = x1
(Eq3) Γ | x1 = x2 ∧ x2 = x3 ` x1 = x3
(Eq4) Γ | x1 = x2 ` t(x1 ) = t(x2 )(Eq5) For each atomic formula ϕP , Γ | x1 = x2 ∧ ϕP (x1 ) ` ϕP (x2 )Pairing:(Pr1) Γ, x : 1 | > ` x = ∗(Pr2) Γ | x1 = y1 ∧ x2 = y2 ` (x1 , x2 ) = (y1 , y2 )(Pr3) Γ, z : S × T | > ` z = (π1 z, π2 z)(Pr4) Γ, x : Sy : T | > ` π1 (x, y) = x ∧ π2 (x, y) = y

4.1. PRELIMINARY RESULTS

185

As usual, one introduces tupling and projections πin for arbitrary finite products
and shows that rules (Pr3) and (Pr4) generalize to theorems
Γ, z : T1 × . . . × Tn | > ` z = hπ1n z, . . . , πnn zi
Γ, x1 : T1 , . . . , xn : Tn | > ` πin hx1 , . . . , xn i = xi
Co-pairing:(CoPr1) Γ, z : S | > ` (case inl z of x ⇒ s, y ⇒ t) = s[z/x](CoPr2) Γ, z : T | > ` (case inr z of x ⇒ s, y ⇒ t) = t[z/y](CoPr3) Γ, z : S + T | > ` (case z of x ⇒ inl x, y ⇒ inr y) = z
4.1.3. An example using the internal logic. In this section, we use theinternal logic to offer an alternate approach to some of the results in Section 3.9.
In Theorem 3.9.4, we showed that, hA, αi and hB, βi are related by a coalgebraic
relation hR, ρi such that the projection rα :hR, ρi / hA, αi is epi just in case hA, αi
forces any coequations over 1 that hB, βi forces. Now, there is a relation hR, ρiwhose projection to hA, αi is epi if and only if the projection
π1 :hA, αi × hB, βi/ hA, αi

is epi. Also,{ϕ ≤ H1 | hB, βiϕ} ⊆ {ϕ ≤ H1 | hA, αiϕ}just in case Im(!α ) ≤ Im(!β ). Thus, we could restate this part of Theorem 3.9.4 asfollows.
Theorem 4.1.18. The projection π1 :hA, αi × hB, βi
Im(!α ) ≤ Im(!β ).

/ hA, αi is epi just in case

It is easy to show (see [LS86]) that, in any locally complete logos, a map f :A
is epi just in case|= y : B | > ` ∃x : A f x = y.

/B

Similarly, it is immediate from the definition of the semantics that Im(!A ) ≤ Im(!B )just in case|= ∃x : A > ` ∃y : B >.
So, we can regard this fact more generally as a fact about locally complete logoses 1(rather than a fact about categories of coalgebras). Stated in the internal logic,
Theorem 4.1.18 can be expressed as follows.
Theorem 4.1.19. x : S | > ` ∃z : S×T (π1 z = x) just in case ∃x : S > ` ∃y : T >.
1We can actually weaken the requirements on the category, since the proofs don’t involve universal quantification. A prelogos (see [Tay99]) should suffice.

186

4. THE INTERNAL LOGIC OF E



Proof. From x : S, z : S × T | ∃y : T > ` ∃y : T >, we infer
x : S, y : T, z : S × T | > ` ∃y : T >.
Since any formula proves >, by the cut rule (i.e., (Str2)) we havex : S, y : T, z : S × T | (π1 z = x) ` ∃y : T >.
Substituting π2 z for y (which does not appear free in the sequent), we infer
x : S, z : S × T | (π1 z = x) ` ∃y : T >,and hence x : S | ∃z : S×T (π1 z = x) ` ∃y : T >. Now, assumingx : S | > ` ∃z : S×T (π1 z = x),
we see x : S | > ` ∃y : T > and hence ∃x : S > ` ∃y : T >.
For the other direction, we use the axiom
x : S, y : T, z : S × T | z = hx, yi ∧ π1 hx, yi = x ` (π1 z = x)

(Eq5)

and the theorem x : S, y : T, z : S × T | (π1 z = x) ` ∃z : S×T (π1 z = x) to infer
x : S, y : T, z : S × T | z = hx, yi ∧ π1 hx, yi = x ` ∃z : S×T (π1 z = x)
and thusx : S, y : T | hx, yi = hx, yi ∧ π1 hx, yi = x ` ∃z : S×T (π1 z = x).
Since > proves the antecedent, an application of cut yields
x : S, y : T | > ` ∃z : S×T (π1 z = x)
and hence x : S | ∃y : T > ` ∃z : S×T (π1 z = x). Under the assumption that ∃x : S > `∃y : T >, we see that x : S | > ` ∃y : T > and so another application of cut completes theproof.

4.2. Transfer principles
Throughout this section, we assume that E is an extensive, well-powered, locallycomplete logos with regular epi-regular mono factorizations and all coproducts. We
also assume that G nearly preserves pullbacks, so that the category E is also an
extensive, locally complete logos with all coproducts.
Given a locally complete logos E, Section 4.1.2 constructs a first order logic thatcan be naturally interpreted in E. More generally, given a first order language L, aninterpretation of L in a locally complete logos E consists of an assignment − which

 

 

• assigns to each type T an object T of E;• assigns to each term Γ | t : T an arrow t : Γ / T ;• assigns to each formula Γ | ϕ a regular subobject ϕ of Γ (= T1 × . . . ×
Tn ).

 

        

4.2. TRANSFER PRINCIPLES

187

4.2.1. Translation of types. We augment the language L(E) by adding types
pT q for each type T in L(E ). The interpretation of pT q is given by pT q = U  T  .

Thus, we have the following interpretations. Notice that by introducing new types forTranslation type Interpretation
pα :A / GAq
A
pS × T q
U( S × T )pS + T q
U S +U T
p1q
U H1
Table 4. The interpretation of translated types.

      each type T in L(E ), we can distinguish between coalgebras with the same carrier.
That is, if
α :A

/ GA,

α0 :A

/ GA

are distinct structure maps for A, then we have two types pαq and pα 0 q in L(E),both of which are interpreted as A.
The translation of a context Γ = x1 : T1 , . . . , xn : Tn is given bypΓq = z : pT1 × . . . × Tn q.
We add the variable z of type pT1 × . . . × Tn q because the forgetful functor U does
not, in general, preserve products. This translation is motivated by the observation
that, given x1 : T1 , . . . , xn : Tn | t : T , then we havez : T1 × . . . × Tn | t[π1 z/x1 ] . . . [πn z/xn ] : T ,and that this term is provably equivalent to the original t (in the sense that, if wesubstitute hx1 , . . . , xn i for z, then the result is equal to the original term t).
For readability, we abuse notation and denote the translated productpT1 × . . . × Tn q ( = U (pT1 q × . . . × pTn q))
by pΓq, where the meaning of pΓq should be clear from context. Thus, we writepΓq = z : pΓq,
where the translation on the left is the translation of the context and the translationon the right is the translation of the associated product.

188

4. THE INTERNAL LOGIC OF E

4.2.2. Translation of terms. For each homomorphism f in E , we define pf q =U f . We refer to Table 5 for the translation of terms. We write ptq for the translationof a term t. So, for instance,pΓ, x : T | f xq = z : pΓ, T q | pf ◦ πS qz,
where the p−q on the right hand side refers to the function symbol for U (f ◦ πi ) in
L(E). For each term-in-context Γ | t : T of L(E ), there is a corresponding translationpΓq | ptq : pT q.
Term formation rule
Translation
Γ, x : T | x : T
z : pΓ, T q | pπT qz : pT q
Γ, x : S | f x : T
z : pΓ, Sq | pf ◦ πS qz : pT q
Γ | ∗: 1z : pΓq | p!q : p1q
Γ | s: S
Γ | t: Tz : pΓq | p hs, ti qz : pS × T q
Γ | hs, ti : S × T
Γ, x : S × T | π2 x : T
z : pΓ, S, T q | pπ2 ◦ πS×T qz : pT q
Γ, x : S | inl x : S + T
z : pΓ, Sq | inlpπS qz : pSq + pT q
Γ, y : T | inr y : S + T
z : pΓ, T q | inrpπT qz : pSq + pT q
Γ, x : S | s : U
Γ, y : T | t : U
See below
Γ, z : S + T | case z of x ⇒ s, y ⇒ t : U
Γ, x : S | t : T
Γ | s: S
See below
Γ | t[s/x] : T
Table 5. Term translations rules for L(E ).













Notice that for pairing, we use the function symbol p hs, ti q (that is, U hs, ti in
L(E)). Since hs, ti is a homomorphism in E , U hs, ti is an arrow in E. Hence, it
makes sense to translate the term hs, ti this way, because every arrow in E corresponds
to a function symbol in L(E). Unfortunately, this translation hides the relevant
features of the term hs, ti — namely, that it is a term built by pairing. Also, it is the
only translation rule which relies on the semantics of our logic to translate a term ofL(E ). Nonetheless, this translation or something like it is necessary, to ensure that
arbitrary terms of L(E) cannot be substituted for x (say) in phx, yiq.
In the translation of the case statement, we use the fact that E is distributive.
Thus,









T1 × . . . × Tn × (S + T ) = (T1 × . . . × Tn × S) + (T1 × . . . × Tn × T ).
Since U preserves coproducts, we may take pΓ, S + T q = pΓ, Sq + pΓ, T q. Consequently, we translate a case statement constructed thusΓ, x : S | s : U
Γ, y : T | t : U
Γ, z : S + T | case z of x ⇒ s, y ⇒ t : U

4.2. TRANSFER PRINCIPLES

189

to a construction
x : pΓ, Sq | psq : pU q
y : pΓ, T q | ptq : pU q
z : pΓ, Sq + pΓ, T q | case z of x ⇒ psq, y ⇒ ptq : pU q
We next discuss the translation of a term constructed by substitution. Supposethat Γ, x : S | t : T and Γ | s : S. The translation of the former is a termz : pΓ, Sq | ptq : pT q.
We will construct a term that allows a substitution for z. Let   

f = hid Γ , s i : Γ  ×  S .

/ ΓThen the translation of f (in the context Γ) is given byy : pΓq | pf qy : pΓ, Sq.
Thus, we can now use the substitution constructor in L(E) to constructz : pΓ, Sq, y : pΓq | ptq : pT q
y : pΓq | pf qy : pΓ, Sq
y : pΓq | ptq[pf qy/z] : pT q

(21)

(note the use of weakening in the term ptq). We take this term to be pt[s/x]q.
By the definition of the translation of terms, it is easy to confirm the following.
Theorem 4.2.1. For any term Γ | t : T , pΓ | tq = U  Γ | t .

Proof. By induction on the construction of the term. For variables,pΓ, x : T | x : T q = z : pΓ × T q | pπS qz : pT q,
and so pΓ, x | xq = U π ◦  z  = U π = U  Γ, x | x .
S

S

Other cases are proved similarly, while pairing is trivial. We include the proof forcase and substitution.
Given a case term,
Γ, z : S + T | case z of x ⇒ s, y ⇒ t : U ,its translation isz : pΓ, Sq + pΓ, T q | case z of x ⇒ psq, y ⇒ ptq : pU q.

   

 

 

This term in L(E) is interpreted as [ psq , ptq ] = [U s , U t ] = U [ s , t ].
As in (21), a substitution Γ | t[s/x] : T is translated to the termy : pΓq | ptq[pf qy/z] : pT q,  ptq ◦ π   ◦ hid   ,  pf qy i = U  t ◦ U  f  ◦  y  = U (  t ◦ hid   ,  s i).

where f = hid Γ , s i. Thus, one calculates the interpretation of pt[s/x]q as
Γ,S

Γ

Γ

190

4. THE INTERNAL LOGIC OF E



4.2.3. The internal  operator in L(E). Before defining the translation of
formulas in L(E ) to L(E), we must introduce an internal  operator. This operator
takes formulas ϕ over one variable z of type pΓq to the largest subcoalgebra of ϕ .
Given this operator for unary predicates over coalgebra types, we can then definethe  operator for bisimulations and n-simulations generally, by using the work ofSections 2.5 and 2.7, although these extended operators are not S4. We will show
that, if G preserves regular relations, the n-ary  operator is “almost” S4 — thatis, it will preserve binary meets, but still one does not expect  to preserve >. In
Section 4.2.6, we will show that if the bisimulation  operator preserves binary meets,then bisimulations compose, using the internal logic.
In order to give this translation, we must first augment the language L(E) with amodal operator  representing the “greatest subcoalgebra” construction. Thus, we
add the formula formation rulez : pΓq | ϕ(22)
z : pΓq | ϕ

 

Notice that this modal operator is only defined for formulas over one variable of typepΓq for some context Γ in L(E ). The interpretation of  is defined by z : pΓq | ϕ =     ϕ .
Γ

 

 

In other words ϕ is the carrier of the largest subcoalgebra of Γ contained inϕ .
Theorem 2.2.16 stated that  is an S4 modal operator. Consequently, we add
the standard S4 axioms, together with an axiom for substitution of homomorphic
terms (justified by Theorem 2.2.17).
z : pΓq | ϕ ` ψ(1)z : pΓq | ϕ ` ψ(2) z : pΓq | ϕ ` ϕ(3) z : pΓq | ϕ ` ϕ(4) z : pΓq | ϕ ∧ ψ ` (ϕ ∧ ψ)(5) For any term Γ | t : T in L(E ) and formula z : pT q | ϕ, 

w : pΓq | (ϕ(z))[ptq/z] a` (ϕ(z)[ptq/z])(6) z : pΓq | > ` >
Because  does not commute with arbitrary substitutions, in general, (ϕ[t/x]) 6= (ϕ)[t/x].



In fact, the formula on the left is defined only if the domain of t is the carrier ofa coalgebra, while the right hand formula requires that the codomain of t is the4.2. TRANSFER PRINCIPLES

191

carrier of a coalgebra. Hereafter, we will write ϕ[t/x], or just ϕ(t), to denote
(ϕ[t/x]) . Similarly, when we write

x : pΓq, ∆ | ϕ(x),we mean the formula obtained by weakening the context of x : pΓq | ϕ. Notice that,in general,(ϕ(x))[t/x] 6= ϕ(t).
In Section 2.7, we saw that there is a modal operator  taking n-ary relations R
on U hA1 , α1 i, . . . , U hAn , αn i to the largest n-simulation contained in R, which is“almost” S4 (in particular, it is normal, but  does not typically preserve >) if G
preserves regular relations. This modal operator is defined in terms of ∃, U and thesubcoalgebra operator . Thus, we can explicitly define the n-simulation  operator
in our internal logic. To simplify notation, let Γ be the context x1 : T1 , . . . , xn : Tn in
L(E ) and

p = hU π1 , . . . , U πn i : pT1 q × . . . × pTn q / pΓq .

More precisely, we want the interpretation of x1 : pT1 q, . . . , xn : pTn q | ψ to be ψ  = ∃   pT1  p  ψ  .

×...× Tn∗

Accordingly, we define ψ to denote the formula^(23)
x1 : pT1 q, . . . , xn : pTn q | ∃z : Γ ( pπi qz = wi ∧ ψ(pπ1 qz, . . . , pπn qz))iHere, the formula ψ(pπ1 qz, . . . , pπn qz) stands for the formula constructed by applying  to ψ(pπ1 qz, . . . , pπn qz), that is, it denotesz : pΓq | (ψ[pπ1 qz/x1 ] . . . [pπn qz/xn ]).
Since the  operator for variables z : pΓq was previously defined, this formula iswell-defined. Next, we show that this definition does what it is supposed to.
Theorem 4.2.2. For any formula x1 : pT1 q, . . . , xn : pTn q | ϕ, ϕ =       ϕT1 ,... , Tn

Proof. One uses the fact that^z : Γ , x1 : T1 , . . . , xn : Tn | pπi qz = xi a` hpπi qz, . . . , pπn qzi = hx1 , . . . , xn i.

 

 

 

i

192

4. THE INTERNAL LOGIC OF E

By definition of ϕ in (23), we have^
ϕ = ∃z : Γ ( pπi qz = xi ∧ ϕ(pπ1 qz, . . . , pπn qz))   =  ∃   (hpπ qz, . . . , pπ qzi = hx , . . . , x i ∧ ϕ(pπ qz, . . . , pπ qz))
= ∃      ϕ(pπ qz, . . . , pπ qz)= ∃   ϕ(pπ qz, . . . , pπ qz)= ∃ p  ϕ =   ϕ .
i

z: Γ

1

n

1

h π1 z,... , πn zi
1

p
p

1

n

1

n

n

n

∗


The axioms (1) - ( 5) generalize to axioms of the analogous formulas for then-simulation  operator — assuming that the comonad G preserves regular relations
for the normality axiom. Some of these axioms are easily provable in the internal logic(for instance, the deflationary axiom ϕ ` ϕ), and perhaps all of them are provablewith sufficient work (although it appears the normality axiom would require somesemantic argument to use the assumption that G preserves pullbacks). Nonetheless,
we rely on the work of Sections 2.5 and 2.7 to justify each of the following, which wetake to be axioms.
Notably, axiom (6) does not typically hold for the n-ary  operator. Instead,
> is properly contained in > — that is, the largest bisimulation of hA, αi andhB, βi is typically a proper subobject of A × B.
Let Γ = y1 : T1 , . . . , yn : Tn (in L(E )) and ∆ = x1 : pT1 q, . . . , xn : pTn q (in L(E)).
∆|ϕ ` ψ∆ | ϕ ` ψ(20 ) ∆ | ϕ ` ϕ(30 ) ∆ | ϕ ` ϕ(40 ) (If G preserves regular relations) ∆ | ϕ ∧ ψ ` (ϕ ∧ ψ)
(50 ) For any term y : S | t : T in L(E ) and formula ∆, x : pT q | ϕ,(10 )∆, y : pSq | (ϕ)[ptq/x] a` (ϕ[ptq/x])
That the axioms (1) - (3) are sound follows from the fact that (the interpretationof)  is a comonad, the soundness of (4) was proved in Corollary 2.5.26, andof (5) follows from Theorem 2.5.19, in which we proved that  commutes withpullback along products of homomorphisms.
The next theorem is provably equivalent to Theorem 2.7.8, in which we showedthat π ∗ ≤ π ∗ . The following theorem can be understood as stating that, if R isan n-simulation, then ∃π R is also an m-simulation (where π is a projection — andfor suitable m). The statement of the theorem is an internal version of this claim.

4.2. TRANSFER PRINCIPLES

193

Theorem 4.2.3. If G preserves regular relations, then for any formula ϕ overcontext x : pSq, y1 : pT1 q, . . . , yn : pTn q,|= ∃x : S ϕ ` ∃x : S ϕ.
Q
Proof. Let π denote the projection pSq ×
pTi q
Theorem 2.7.8,
 ϕ ≤ π ∗ ∃π ϕ ≤ π ∗ ∃π ϕ

 
 

 

 





 

/

Q

 pT q . Then, byiand so ∃π  ϕ ≤ ∃π ϕ. Thus, ∃x : S ϕ ` ∃x : S ϕ.



Thus, in case G preserves regular relations, then we may add another  axiom:(60 ) |= ∃x : S ϕ ` ∃x : S ϕ.
4.2.4. Translation of formulas. We next give a translation of formulas in
L(E ) to formulas in L(E). The inductive definition of the translation is given in
Table 6.
Formula formation rule Translationx : T | ϕP (x)x : pT q | ϕP (x)x : T, y : T | x = yz : pT × T q | (pπ1 qz = pπ2 qz)
Γ|>z : pΓq | >Γ|⊥z : pΓq | ⊥Γ|ϕ∧ ψ
z : pΓq | pϕq ∧ pψq
Γ|ϕ → ψz : pΓq | (pϕq → pψq)
Γ | ∃x : T ϕz : pΓq | ∃x : Γ,T (pπΓ q(x) = z ∧ pϕq(x))Γ | ∀x : T ϕz : pΓq | ∀x : Γ,T (pπΓ qx = z → pϕq(x))Γ | ϕ[t/x]z : pΓq | pϕq[phx1 , . . . , xn , tiq/w]
Γ, ∆ | ϕz : pΓ, ∆q | pϕq[pπΓ qz/z]
Table 6. Formula formation and interpretation

 
 



to the language of E as
Remark 4.2.4. One could add a closure operator
well, where the interpretation comes from the closure operator in Section 2.7. The
standard axioms for closure operators would apply, as well as the following axiom(taking its premise from L(E), its conclusion is in L(E )):x : pT1 q × . . . × pTn q | ∃z : Γ (pz = x ∧ pψq(z)) ` ∃z : Γ (pz = x ∧ pϕq(z))Γ|ψ ` ϕ

 ϕ into L(E) as^z : pΓq | (∃   ( pπ qy = pπ qz ∧ pϕq(y))).

We translate the formula Γ |

y: Γ

i

i

i

194

4. THE INTERNAL LOGIC OF E

One can show (as an extension of the following theorem) that

 p ϕq = U   ϕ ,but we omit the details.
Theorem 4.2.5. For every formula Γ | ϕ of L(E ), pΓ | ϕq = U  Γ | ϕ .

Proof. As in the proof of Theorem 4.2.1, we prove the result by induction, but
present only a few of the cases here.
For formulas of the form Γ | ϕ → ψ, we see that ϕ → ψ  =  ϕ →  ψ = [U  ϕ → U  ψ  ]= [  pϕq →  pψq ](by Theorem 2.2.24)(by inductive hypothesis)

On the other hand, pϕ → ψq =  (pϕq → pψq)
=   (pϕq → pψq)
= (  pϕq →  pψq ) = U[  pϕq →  pψq ].

We next consider formulas of the form Γ | ∀x : T ϕ. We use the fact that, in any
logos, for any f ,∀x : T (f (x) = y → ϕ(x, y)) = ∀f ϕ(x, y) ,









and also that, for any homomorphism f , ∀f = [−] ◦ ∀U f ◦ U (Theorem 4.1.10).
Consequently,





 

  

 



U ∀x : T ϕ = U (∀πΓ ϕ ) = ∀U πΓ pϕq = ∀x : Γ,T (pπΓ qx = z → pϕq) .
We translate substitutions
Γ, x : T | ϕ
Γ | t: TΓ | ϕ[t/x]to substitutions
w : pΓ, T q | pϕq
z : pΓq | ptq : pT q
w : pΓ, T q, z : pΓq | pϕq
z : pΓq | phx1 , . . . , xn , tiq : pΓ, T q
z : pΓq | ϕ[phx1 , . . . , xn , tiq/w]
The interpretation of pϕ[t/x]q, then, is calculated as pϕ[t/x]q =  pϕq[phx , . . . , x , tiq/w]
=  phx , . . . , x , tiq  pϕq= (U  hx , . . . , x , ti ) (U  ϕ )= U (h1,  t i  ϕ ) = U  ϕ[t/x]  .
1

n

1

∗

n

1

n

∗

∗

4.2. TRANSFER PRINCIPLES

195


Thus, we have constructed a translation from the language L(E ) to the language
L(E) which takes a formula Γ | ϕ to a formula of L(E) which is interpreted as thecarrier of ϕ . This translation is “truth-preserving” in the sense that ϕ ` ψ is validin E just in case pϕq ` pψq is valid in E.

 

Theorem 4.2.6. For every sequent Γ | ϕ ` ψ in L(E ), |= pΓq | pϕq ` pψq iff|= Γ | ϕ ` ψ.
Proof. Suppose |= Γ | ϕ ` ψ. Then pΓq | pϕq = U  Γ | ϕ ≤ U  ( Γ | ψ) =  pΓq | pψq .

Conversely, suppose |= pΓq | pϕq ` pψq. Then



 

 







U Γ | ϕ = pΓq | pϕq ≤ pΓq | pψq = U Γ | ψ .
Corollary 1.2.10 completes the proof.

Hence, we may add a rule of inferenceΓ|ϕ ` ψ(Tr1)
pΓq | pϕq ` pψq
4.2.5. Coinduction. We will use the internal logic to prove a formula intended
to represent the principle of coinduction. The principle of coinduction for the final
coalgebra H1 states that the largest coalgebraic relation on H1 is equality, i.e.,∆H1 = H1.
Equivalently, coinduction says that the largest bisimulation H1,H1 > is just ∆U H1(see Theorem 2.6.3). In what follows, recall that the type 1 in L(E ) is interpreted as
H1, the final coalgebra, so that p1q is interpreted as U H1. Thus, we wish to prove
the formulax : p1q, y : p1q | >(x, y) ` x = y.
By definition of  (in the formula (23)), this is the formula
(24)

 

x : p1q, y : p1q | ∃z : 1×1 (pπ1 qz = x ∧ pπ2 qz = y ∧ >) ` x = y.

Since > ` >, it is sufficient to prove the simpler formula
(25)

 

x : p1q, y : p1q | ∃z : 1×1 (pπ1 qz = x ∧ pπ2 qz = y) ` x = y.

Indeed, since > ` > (for the unary  which appears here), (24) and (25) areequivalent.
In L(E ), the formulax : 1, y : 1 | > ` x = y

196

4. THE INTERNAL LOGIC OF E

is provable, using (Pr1) and the equality axioms. Hence, by Theorem 4.2.6, its
translationz : p1 × 1q | > ` (pπ1 qz = pπ2 qz)
holds in L(E). Again, we apply the deflationary axiom (2) to concludez : p1 × 1q | > ` pπ1 qz = pπ2 qz.
From this, it is a simple exercise to prove (25).
We may prove a stronger claim regarding coinduction. From Theorem 1.5.25, weknow that, if G preserves weak pullbacks, then a coalgebra hA, αisatisfies coinduction
iff hA, αiis simple. From (the dual of) Theorem 1.5.14, we know that, if G preserves
weak pullbacks, then hA, αiis simple iff ! : hA, αi / H1 is a regular mono. We will
now present this connection in the internal logic.
By assumption, E has regular epi-regular mono factorizations, so every mono isa regular mono. Thus, we can represent the claim that ! is a regular mono by thefamiliar sequent(26)

x : pT q, y : pT q | p!qx = p!qy ` x = y.

Here, we use the fact that U preserves regular monos, and so ! is a regular mono in
E iff ! is a mono in E. Hence, the theorem we wish to prove is that (26) is equivalentto (25) (replacing 1 with T in the latter). We do this by proving the antecedents areequivalent. This has the advantage that it makes clear that two elements are mapped
via ! to the same element of U H1 just in case the elements are bisimilar.
First, we must see how to represent the assumption that G preserves weak pullbacks. We use it in the proof by applying Theorem 2.5.7, to conclude that the
pullback of two G-homomorphisms is a bisimulation. This fact suggests the followinginternal formula for each term s, t in L(E )(27)x : pSq, y : pT q | psqx = ptqy ` (psqx = ptqy).

We treat this formula as an axiom in the following proof.
Theorem 4.2.7. Suppose that G preserves weak pullbacks. For any type T in
L(E ), 

x : pT q, y : pT q | p!qx = p!qy a` ∃z : T ×T (pπ1 qz = x ∧ pπ2 qz = y).
Proof. By (27), we havex : pT q, y : pT q | p!qx = p!qy ` (p!qx = p!qy).
By definition of , the consequent is the formula
(28)

 

x : pT q, y : pT q | ∃z : T ×T (pπ1 qz = x ∧ pπ2 qz = y ∧ (p!π1 qz = p!π2 qz))

4.2. TRANSFER PRINCIPLES

197

In the language of E , one can prove thatz : T × T | > ` ∗(π1 z) = ∗(π2 z),(29)

and (p!π1 qz = p!π2 qz) is the translation of that consequent. Hence, (28) is provably
equivalent to 

x : pT q, y : pT q | ∃z : T ×T (pπ1 qz = x ∧ pπ2 qz = y).

(30)

Hence, we have shown 

x : pT q, y : pT q | p!qx = p!qy ` ∃z : T ×T (pπ1 qz = x ∧ pπ2 q = y).
For the other direction, we again translate (29) and apply (2) ( is deflationary)to yield the sequentz : pT × T q | p!π1 qz = p!π2 qz ` .
Using the axioms for equality, we getz : pT × T q, x : pT q, y : pT q | pπ1 qz = x ∧ pπ2 qz = y ` p!qx = p!qy.
An application of existential introduction (i.e., (Str6)) completes the proof.

Corollary 4.2.8. Let G preserve weak pullbacks. Then, for any type T ,|= x : pT q, y : pT q | p!qx = p!qy ` x = yjust in case |= x : pT q, y : pT q | ∃z : T ×T (pπ1 qz = x ∧ pπ2 qz = y) ` x = y.
In other words, the internal principle of coinduction is valid just in case p!q is monic.
4.2.6. Composition of bisimulations. We offer an example of the internal
logic at work in the following theorem, in which we prove that, if G preserves regular
relations, then the composition of two bisimulations is again a bisimulation. From
[JR97], one finds the well-known theorem that, if E satisfies the axiom of choice,then bisimulations compose. These two theorems suffice to prove that bisimulations
compose in a variety of familiar settings, but in both theorems, the category ofbisimulations consists of relations which come with a structure map (as opposed tobisimulations in the sense of Definition 2.5.4, which is more general). We know of noresults for categories in which bisimulations are not “merely” relations which comewith a structure map.
Theorem 4.2.9. If G preserves regular relations, then bisimulations compose.
That is, for any x : pRq, y : pSq | ϕ and y : pSq, z : pT q | ψ such thatx : pRq, y : pSq | ϕ ` ϕ and y : pSq, z : pT q | ψ ` ψ,
we have x : pRq, z : pRq | ψ ◦ ϕ ` (ψ ◦ ϕ).

198

4. THE INTERNAL LOGIC OF E



Proof. By the assumption, one infers that ψ ∧ ϕ ` ψ ∧ ϕ. Hence, ψ ∧ ϕ `(ψ ∧ ϕ). Applying the cut rule to this sequent and to the sequent(ψ ∧ ϕ) ` ∃y : S (ψ ∧ ϕ)yields ψ ∧ ϕ ` ∃y : S (ψ ∧ ϕ) and thus ∃y : S (ψ ∧ ϕ) ` ∃y : S (ψ ∧ ϕ). By Theorem 4.2.3, ∃y : S (ψ ∧ ϕ) ` ∃y : S (ψ ∧ ϕ), and so ∃y : S (ψ ∧ ϕ) ` ∃y : S (ψ ∧ ϕ), as
desired.

Remark 4.2.10. This proof really doesn’t require all of the assumptions on E
that we’ve made in this chapter. Rather, it holds whenever E has epi-regular mono
factorizations, is cocomplete and finitely complete and G preserves regular relations.
In fact, G may be an endofunctor, rather than a comonad. Thus, it holds under
the same assumptions that applied in Section 2.5.2, where we discussed relationpreserving functors.
4.3. A Kripke-Joyal style semantics
Throughout this section, we continue with the assumptions from Section 4.2.
That is, we assume that E is an extensive, well-powered, locally complete logos withall coproducts and regular epi-regular mono factorizations. We also assume that G
nearly preserves pullbacks.
One of the motivations for considering the internal logics L(E ) and L(E) is that,given an injective object C, a coequation over C is just a regular subobject of U HC,/ E . In other words, a coequation over C is thewhere H is right adjoint to U : E
interpretation of some formula x : pHCq | ϕ.
A coalgebra hA, αi forces the coequation ϕ just in case, for every p :hA, αi / HC ,the image of p (more precisely, U p) is contained in the interpretation of ϕ. Thus,hA, αiϕ just in case, for every element p of HC centered at hA, αi, we haveIm(p) ≤ ϕ . This suggests that the standard Kripke-Joyal semantics can be used toexpress coequation satisfaction in a simple, familiar way.
In this section, we first introduce Kripke-Joyal semantics for a locally complete
logos and state (without proof) the Kripke-Joyal semantics theorem. We adopt thissemantics for the category L(E), in which certain formulas represent coequations.
Namely, those formulas pΓq | ϕ are interpreted as subobjects of pΓq = U Γ , andhence as conditional coequations over Γ . We complete this section by proving
a couple of theorems about coequation forcing in terms of the internal logic, first
introducing an internal version of the S4 modal operator  from Section 3.8.
Let Γ be a context in L(E) and ϕ a formula in context Γ. Let A be given and aan element of Γ , centered at A, i.e.,

 

 

 

 

a :A

 

/ Γ .

 

4.3. A KRIPKE-JOYAL STYLE SEMANTICS

 

199

 

Then we say that A ϕ(a) just in case Im(a) ≤ ϕ , i.e., pa ∈A ϕ .
The following theorem (which can be found, essentially, in [LS86, Bor94], etc.)
can be proved in any locally complete logos. As it is a well-known theorem (theKripke-Joyal theorem — sometimes called Beth-Kripke-Joyal), we omit the proof
but include the statement for completeness.

 

Theorem 4.3.1. Let Γ | ϕ be given and p ∈A Γ . In each of the clauses below,
the context of the formula is Γ, unless stated otherwise.
(1) A >(p) always.
(2) A ⊥(p) iff A = 0.
(3) A (ϕ ∧ ψ)(p) iff A ϕ(p) and A ψ(p).
(4) A(ϕ → ψ)(p) iff, for every b ∈B A such that B
ϕ(pb), then alsoB ψ(pb).
(5) A ∃x : T ϕ(x, p) iff there is a regular epi b :B / A and a c ∈B T such thatB ϕ(c, pb).
(6) A ∀x : T ϕ(x, p) iff, for all b ∈B A and c ∈B T , B ϕ(c, pb).
(7) A ϕ[t/x](a) iff A ϕ( t a).
(8) (Weakening) A ∆, Γ | ϕ(a) iff A Γ | ϕ(π Γ a).

 

 





 

 
 

Let pΓq | ϕ be given. The ϕ is a conditional coequation over pΓq . A coalgebra hA, αiforces ϕ just in case, for every homomorphism p :hA, αi / Γ , we haveIm(U p) ≤ ϕ , equivalently, Im(p) ≤ ϕ .

 

 

 

  

Theorem 4.3.2. Let pΓq | ϕ and hA, αi be given. Then hA, αi Γ ϕ (overΓ ) just in case, for every element p ∈hA, αi Γ , that is, every homomorphism
p :hA, αi / Γ ,A ϕ(U p).

 

 

 

We next show that a coalgebra forces ϕ at U p just in case it forces ϕ at U p. Thisis an easy corollary to Corollary 2.2.9. It also implies that the quasi-covariety definedby ϕ is the same as that defined by ϕ, i.e., Theorem 3.8.10. In Theorem 4.3.4, we
present a similar theorem for the  operator.
Theorem 4.3.3. Let pΓq | ϕ and hA, αi be given, and p : hA, αimorphism. Then A ϕ(U p) iff A ϕ(U p).

   a homo-/ Γ

Proof. Corollary 2.2.9 states that U p factors through ϕ just in case p factors
through [ ϕ ] (the largest subcoalgebra of ϕ ). Hence, U p factors through ϕ iff it
factors through  ϕ = ϕ (see Corollary 1.2.10).
      For the next theorems, we augment the language L(E) with another S4 modal
operator, . The interpretation of ϕ is  ϕ , that is, the largest invariant subcoalgebra of ϕ (see Section 3.8).

 

 

200

4. THE INTERNAL LOGIC OF E 

Theorem 4.3.4. hA, αi ϕ(p), for every p ∈hA, αi Γ , just in case we also havehA, αi ϕ(p) for every p ∈hA, αi Γ .

 

Proof. This is just a restatement of Theorem 3.8.9 in terms of the Kripke-Joyal
semantics.
 

Theorem 4.3.5. Let pΓq | ϕ be given. If Γ is injective (say, Γ = x : HC), andp ∈hA, αi Γ , thenA ϕ(p)   /  Γ , A ϕ(gp).

iff, for every homomorphism g : Γ  /  Γ be given.

Proof. Let A ϕ(p), where p is a homomorphism, and g : ΓThen, by definition of , ∃g ϕ ≤ ϕ and thus,    

Im(gp) = ∃g Im p ≤ ϕ .
Conversely, suppose that for every such g, A ϕ(gp). Then, for every homomorphism g : Γ / Γ , we have ∃g Im(p) ≤ ϕ . But  ϕ was defined to be the join of/ Γ , weall those subobjects K of U Γ such that, for every homomorphism g : Γhave ∃g K ≤ ϕ (see Section 3.8). Hence, the result follows.

   
 

 

 

 

   4.4. Pointwise forcing of coequations
Again, throughout this section, E is an extensive, well-powered, locally complete logos with all coproducts and regular epi-regular mono factorizations and that
G :E / E is a comonad that nearly preserves pullbacks.
Let Γ be a context in L(E ), and ϕ a formula over pΓq, so that ϕ is a conditional coequation over Γ . As we saw in the previous section, a coalgebra hA, αi
forces ϕ just in case, for every element p of Γ centered at hA, αi, A ϕ(U p). In
other words, the Kripke-Joyal semantics give a means of stating that hA, αi forces acoequation under a particular coloring, where hA, αi forces the coequation (with noqualifications) if it forces it under every coloring.
Alternatively, we could consider the elements of A and ask which elements satisfy
ϕ. That is, which elements are mapped into ϕ under every mapping p :hA, αi / Γ ?
Clearly, hA, αi iff for all p : hA, αi / Γ and all a ∈ A, pa ∈ ϕ . In Section 4.3,
we stripped away the quantifier ranging over colorings and defined “hA, αi forces ϕunder p.” In this section, we strip away the quantifier ranging over elements of A
and define “hA, αi forces ϕ at a,” where a is an element of A (i.e., a ∈B A for someB ∈ E).

 

 

 

 

 

 

Definition 4.4.1. Let pΓq | ϕ and hA, αi be given, with a ∈ A (i.e., a :•E). Then we sayhA, αi ϕ[a] 

/ A in4.4. POINTWISE FORCING OF COEQUATIONS

iff, for every homomorphism p :hA, αi / Γ , we have Im(pa) ≤201

 ϕ .

We use the square brackets for pointwise forcing to distinguish the notation fromA ϕ(p), where p ∈hA, αi Γ . Clearly, hA, αi ϕ[a] iff, for every p ∈hA, αi Γ ,

 

 

B

ϕ(pa)

(where B is the domain of a, i.e., a ∈B A).
Theorem 4.4.2. Let pΓq | ϕ be given. If C is a generating set for E, thenhA, αijust in case hA, αi   ϕΓ

ϕ[a] for each a ∈C A, C ∈ C.

 

 

ϕ , so for every p : hA, αi / Γ , we have hA, αi ϕ(p).
Proof. Let hA, αi
Clearly, for every a ∈C A, C ∈ C, then, C ϕ(pa), so hA, αi ϕ[a].
On the other hand, suppose that hA, αi
ϕ[a] for all a ∈C A, C ∈ C. Let/Γ be given. Then, for each a ∈C A, C ∈ C, we have C
ϕ(pa).
p : hA, αi ,2 //
Hence, p ◦ a equalizes Coker( ϕpΓq ) for each a : C A, C ∈ C and thus (bythe assumption that C is a generating set for E), p equalizes Coker( ϕ  ,2 / pΓq ),too. Hence p factors through ϕ . Since p was an arbitrary homomorphism, we see
hA, αi Γ ϕ .
         It is natural to ask whether this semantics comes with a Kripke-Joyal style theorem, similar to Theorem 4.3.1. Unfortunately, we do not have any such theorem
relating the condition that hA, αi ϕ[a] and the structure of ϕ.
The motivation for this section is the intuition that, in order to show that a
coalgebra hA, αi forces a coequation ϕ , one checks that, for each element of a ∈ A
and homomorphism p :hA, αi / Γ , p(a) ∈ ϕ . In other words, in practice, one may
verify that hA, αi forces ϕ at each a ∈ A.
Supposing that, in fact, hA, αi does not force ϕ , one may still be interested inthose elements a ∈ A that do force ϕ. In what remains, we will define an functor Jϕtaking coalgebras hA, αi to the subobject B ≤ A consisting of all those elements of A
which pointwise force ϕ. We conclude by showing that if ϕ is a coequation over an
injective Γ (i.e., a proper coequation, rather than a conditional coequation), thenwe can define the comonad Gϕ in terms of Jϕ and [−].
Given pΓq | ϕ and hA, αi ∈ E , we define_/ Γ . ∃p S ≤ ϕ }.
Jϕ hA, αi = {S ≤ A | ∀p :hA, αi

 

 

 

 

 

 

 

It is easy to check that for all p :hA, αi

 

/ Γ ,

 

 

∃p Jϕ hA, αi ≤ ϕ .
In other words, ∃p Jϕ hA, αi ≤ Jϕ hA, αi.

 

202

4. THE INTERNAL LOGIC OF E



Theorem 4.4.3. Jϕ hA, αi is invariant, in the sense of Section 3.8. That is, forevery homomorphism p :hA, αi / hA, αi,∃p Jϕ hA, αi ≤ Jϕ hA, αi.
Proof. Let p : hA, αir :hA, αi / Γ ,/ hA, αi 

be given.

It suffices to show that, for every ∃r ∃p Jϕ hA, αi ≤ ϕ , i.e., ∃r◦p Jϕ hA, αi ≤ ϕ . This follows, since Jϕ hA, αi is a join of subobjects S suchthat ∃r◦p S ≤ ϕ and joins commute with ∃.
 

We still must show that Jϕ defines a functor. Let f : hB, βi / hA, αi be given.
We will show that ∃f Jϕ hB, βi ≤ Jϕ hA, αi. This allows one to define Jϕ f to be thecomposite along the top row of Figure 3.
Jϕ hB, βi_ ,2∃f Jϕ hB, βi  ,2hB, βif/ Jϕ hA, αi_ "*NNN
NNN
NNN
N'

/ hA, αiFigure 3. Definition of Jϕ on arrows.
To show that ∃f Jϕ hB, βi ≤ Jϕ hA, αi, it suffices to show that, for every homomorphism p :hA, αi / Γ ,

 

 

∃p ∃f Jϕ hB, βi = ∃p◦f Jϕ hB, βi ≤ ϕ .
But this is clear, since p ◦ f is a homomorphism.
Theorem 4.4.4. Let a ∈B A. Then a ∈ Jϕ hA, αi just in case hA, αi

ϕ[a].

Proof. Clearly, if hA, αi ϕ[a], then a ∈ Jϕ A.
On the other hand, suppose that a ∈ Jϕ A and let r :hA, αi / Γ be given. Then_
/ pΓq . ∃p S ≤ ϕ } ≤ ϕ .
∃r Jϕ A = {∃r S ≤ A | ∀p :hA, αi

 

 

 

Hence, ra ∈ ϕ .

 From Chapter 3, we know that there is a comonad
Gϕ :E

 

/E

,

Gϕ = hGϕ , εϕ , δ ϕ i, such that hA, αi
ϕ just in case hA, αi ⊥ εϕα . In fact, Gϕ hA, αi
is the greatest subcoalgebra hB, βi of hA, αi such that hB, βi
ϕ . Hence, there
is some similarity between Gϕ hA, αi and our definition of Jϕ hA, αi. The following
theorem makes the relationship between the two clearer.

 

4.4. POINTWISE FORCING OF COEQUATIONS

 

203

 

Theorem 4.4.5. If Γ is injective (so that ϕ defines a covariety, rather thana quasi-covariety), thenGh A, αi = [Jϕ hA, αi]α .
In other words, Gϕ hA, αi is the largest subcoalgebra of Jϕ hA, αi.

 

 

ϕ , it follows that for every p : hA, αi / Γ , we have
Proof. Since Gh A, αi∃p U Gϕ hA, αi ≤ ϕ . Hence, by definition of Jϕ , U Gϕ hA, αi ≤ Jϕ hA, αi and so
Gϕ hA, αi ≤ [Jϕ hA, αi].
On the other hand, to prove the reverse inclusion, it suffices to show that thecoalgebra [Jϕ hA, αi] forces the coequation ϕ . That is, for every homomorphism

 

 

 

 

 

p :[Jϕ hA, αi]/ Γ ,Im p ≤ ϕ . Since Γ is injective, p extends to a homomorphism 

pe:hA, αi

 

/ Γ .

Since ∃p Jϕ hA, αi ≤ ϕ , the conclusion follows.

Concluding remarks and further research
In this thesis, we had three main goals in mind. First, we wanted to develop thetheory of coalgebras alongside the theory of algebras in a general setting. Second,
we wanted to apply the principle of duality to some well-known and fundamental
theorems of universal algebra to learn their implications in the theory of coalgebras.
Lastly we wanted to provide an internal logic for categories of coalgebras which isappropriate for representing relevant constructions and for expressing the relation
between E and E via certain transfer principles.
The first task yielded sufficient conditions for a category of coalgebras to be wellenough behaved for the development of basic results like the co-Birkhoff theorem.
Among other results, we found that a category E of coalgebras for a comonad G
inherits much of the relevant structure from E presuming E has epi-regular mono
factorizations and cokernel pairs and G preserves regular monos. If we further assume
that E has enough injectives, then so does E , and these injectives provide a naturalinterpretation of coequations. We also showed that E is “as complete” as E is,although the limits in E are not created by the forgetful functor. Supposing that E
is a locally complete logos with regular epi-regular mono factorizations, and G nearlypreserves pullbacks, then E is also a locally complete logos and thus interprets firstorder logic.
We further contributed to the theory of coalgebras by offering a new definitionof bisimulation which is, we hope, more natural in settings in which choice is notavailable. This definition preserves the intuition behind bisimulation — two elements
are bisimilar just in case there’s a coalgebraic relation hR, ρi such that they are
related by the image of R. Furthermore, while it allows for greater structure than
the traditional definition in categories without choice, it also reduces to that definition
if choice is available (or if G preserves pullbacks).
The second task is closely related to the first. In order to dualize familiar theorems
from universal algebra, one must first state and prove these theorems in categoricalterms. In this stage, one sees what is really relevant, categorically speaking, for atheorem like, say, the variety theorem and this in turn helps guide the developmentof the theory of coalgebras. To the extent that we are interested in the duals of suchfundamental algebraic theorems, we are committed in assuming the dual conditions
205

206

CONCLUDING REMARKS AND FURTHER RESEARCH(with certain exceptions – the proof of the subdirect product theorem is an example
of a proof which is not easily dualized. Our approach, following [GS98], involved
finding an alternate proof.).
Once a classic theorem has been stated and proved in terms which are easily
dualized, the dual theorem must still be interpreted. For the variety theorem, thismeant understanding coequations as predicates over the carrier of a cofree coalgebra,
and coequation forcing as an assertion about the images of a coalgebra under thevarious colorings. This in turn led to an understanding of the invariance theorem.
Namely, it allowed a definition of a modal operator which takes a coequation to thelargest subobject which is invariant under all colorings. Without interpretations suchas these, the result of dualizing a theorem is largely formal — we receive a provablestatement but are at a certain loss for what it means.
The final task, too, relied on the first task for establishing the inheritance in
E of the relevant structure in E. This established that an internal logic for E
could include full first-order logic. The work on bisimulations suggested a closure
operator for the language L(E ), in which the closed propositions correspond to nsimulations. The work on the invariance theorem suggested an interior operator as
well, taking each proposition (i.e., conditional coequation) to its largest invariant
subcoalgebra. For each of these operators, however, there were important properties
which are semantically verifiable but not expressible in the internal logic – unless E
has exponentials.
The relation between E and E suggested the addition of certain transfer rules
which allow one to make inferences in L(E ) based on derivations in L(E) and viceversa. These transfer rules allowed the characteristic property of cofree coalgebras tobe expressed in a natural way in the join of the logics involved.
The work presented here can be extended in several ways. First, one may beinterested in base categories with less structure than we’ve assumed. For instance,
if one considers coalgebras over various categories of posets, then the assumption of“enough injectives” is unreasonable. Hence, it would be worthwhile to investigate
what structural properties may be lost in such settings and to try to understandwhat the appropriate notion of a coequation is in these settings.
Related to this concern is a question that has, unfortunately, largely remainedunanswered in this thesis. Namely, what applications are there for coalgebras over
categories other than Set and related categories? There is a notable lack of examples
of such coalgebras – although, one should stress that the broad approach developed
here does not depend on mathematical applications for its justification. Rather, it
is motivated by a desire to make clear which theorems of universal algebra can be
dualized in a straightforward way. Since we are not interested in coalgebras over
Setop , this means that we must make clear what properties of Set are relevant inCONCLUDING REMARKS AND FURTHER RESEARCH

207

the classical theorem, so that we can see whether these properties are reasonable forcategories of coalgebras as well. Nonetheless, compelling examples of coalgebras overother categories would be most helpful in understanding the basic theory.
The project of dualizing theorems in universal algebra is still in its infancy.
One can go through any standard text in universal algebra and find candidates
for dualization. One needs, however, to develop a few methods for dualizing certain common assertions in algebra. A survey of the work of Andréka and Németi[AN83, Ném82, AN81a, AN81b, AN79b, AN79a, AN78] shows great promisein this direction. In the early 1980’s, they extended the work of Herrlich and Banaschewski [BH76] to give an analysis of “cone-injectivity” and classes of algebras
defined by an extension of equational logic. This work was unknown to the author
until an anonymous reviewer for CMCS 2001 brought it to his attention. A reviewof these earlier results, with an eye towards applications of their coalgebraic dual,
seems most promising.
The development of the internal logic in Chapter 4 should lead to clean proofsof certain claims about coalgebras. One would certainly like more examples of suchproofs. To begin, it is reasonable to take well-known properties of (certain) coalgebras
and prove them in the internal logic, as we did with the property of coinduction for
the final coalgebra and also the proof that bisimulations compose (given that G
preserves regular relations). However, time did not permit as broad a developmentof these proofs in the internal logic as one would like, and in particular, we did not
attempt to represent the property of corecursion and prove that it holds in the final
coalgebra. The aim of using the internal logic to re-prove well-known results is twofold: First, it gives a measure of the practical strength of the logic and shows how thetransfer principles can be used, and second, it allows one to develop skills of reasoning
internally, much simplifying (and formalizing) proofs, and this skill can be appliedfor “real” advances to the theory as well.

APPENDIX A

Preliminaries
A.1. Notation
We adopt the following notation conventions for morphisms in a category.
Morphism
Arrow
Monos
i :A / / B
Episp :A / / B
Regular monosi :A  ,2 / B
Regular epis
p :A  ,2 B
Isomorphisms
i :A  ,2  ,2 B
Natural transformations τ :F +3 G
Cones
τ :A +3 G
Table 1. Notation conventions

A.2. Factorization systems
This section gives a brief review of factorization systems with a special emphasison the factorization systems of special interest here: regular epi-mono factorizations(for categories of algebras) and epi-regular mono factorizations (for categories of
coalgebras). For a more thorough treatment of factorization systems, see [Bor94,
Volume I] or [AHS90]. First, we review the definition of regular epi/regular mono.
Definition A.2.1. We say that a map p :A  2, B is a regular epi if there is a pairof maps e1 and e2 such that
•

e1
e2

//

A

p 

,2 B

is a coequalizer diagram. Dually, a regular mono is a map that is an equalizer ofsome pair of arrows.
Throughout, we will often use the fact that regular epis are strong, so we include
a definition and proof of this connection.
Definition A.2.2. An epi e is strong just in case, whenever the square below
commutes, with m mono, then there is a (necessarily unique) map d making each
209

210

A. PRELIMINARIES

triangle commute.
e

•

//•

d

 



• /m /•
A strong mono is a mono m as in the diagram above such that, whenever the squarecommutes and e epi, then again there is a unique d making the triangles commute.
Theorem A.2.3. Every regular epi is strong (and, dually, every regular mono isstrong).
Proof.
•

k1
k2

// •

e  ,2

f

d

•
g



 

• /m /•
Figure 1. Every regular epi is strong.
Let e be the coequalizer of k1 , k2 as shown in Figure 1 and let m be a monomaking the diagram commute. Then it is easy to see that (because m is monic),f also coequalizes k1 and k2 and so there is a unique d making the upper triangle
commute. The lower triangle also commutes, since e is epi.
Definition A.2.4. A factorization system for a category C consists of a pairhE, Mi where E and M are class of morphisms of C satisfying the following:(1) Every isomorphism is in E and M;(2) E and M are closed under composition;(3) Whenever e ∈ E and m ∈ M such that the square below commutes, there isa unique d as shown, making each triangle commute.
e

•

/•

d

 

•

m


/•

(4) For each f :A / B in C, there is an e :A
that f = m ◦ e (as shown below).
f

*

A
e

(

C

6

B
G
m

/ C in E and a m :C

/ B in M such

A.2. FACTORIZATION SYSTEMS

211

Note that our definition of factorization system does not require that E be a
subclass of the epis of C or that M be a subclass of the monos. Nonetheless, thecommon examples of factorization systems do have this property, and certainly thefactorization systems in which we are interested are no exception.
Theorem A.2.5. Let hE, Mi be a factorization system for C. Factorizations
f = m ◦ e, where e ∈ E and m ∈ M, are unique up to isomorphism.
Proof. If m ◦ e = m0 ◦ e0 , where e, e0 ∈ E and m, m0 ∈ M, then there are uniqued, d0 , as shown in Figure 2, making the triangles commute. The uniqueness part ofCondition 3 from Definition A.2.4 implies that the composites d ◦ d0 and d0 ◦ d are
the identity.

e

A

/7 C

d0

e0

D

m

d

 w

m0



/C

Figure 2. hE, Mi-factorizations are essentially unique.
For the remainder of this section, let Ee denote the epis of C and Mm the monos.
Also, let Ere denote the regular epis and Mrm the regular monos. We complete
our review of factorization systems by introducing the notion of regular epi-mono
factorizations and its dual, epi-regular mono factorizations. We show that, if every
map factors by a regular epi followed by a mono, then hEre , Mm i is a factorization
system (and the dual result as well).
Definition A.2.6. Let E be a category. We say that E has regular epi-mono
factorizations if every arrow f :A / B can be factored into a regular epi followed bya mono.
f

+

A
!*

A/f

B
F

8

The codomain of the regular epi is denoted A/f , as shown above.
Dually, we say that E has epi-regular mono factorizations if every arrow f :A
can be factored into a epi followed by a regular mono.
f

+

A
%%

Im(f )

2 5=

B
D

/B

212

A. PRELIMINARIESThe domain of the regular mono is denoted Im(f ), as shown above.
Theorem A.2.7. If E has regular epi-mono factorizations (epi-regular mono factorizations, resp.), then hEre , Mm i (hEe , Mrm i, resp.) form a factorization system.
Proof. Conditions (1) and (2) are obvious, and (4) is by hypothesis. The diagonal condition (by (3)) is just the fact that regular epis (monos, resp.) are strong. As we can see in the proof of Theorem A.2.7, the strong epis provide most of
the properties we require. Indeed, throughout this thesis, the assumption of regular
epi-mono factorizations in E Γ could be largely replaced by strong epi-mono factorizations, weakening some assumptions while strengthening others in the process. We
nonetheless prefer to stick with the regular epis, since in the algebraic setting, theycorrespond to deductively closed sets of equations. We also use epi-regular mono
factorizations in EΓ in keeping with the duality.
We close this section with a categorical definition of the axiom of choice.
Definition A.2.8. We say that an epi p (a mono i, resp.) splits if there is a map
f such that p ◦ f = id (f ◦ i = id, resp.) Such epis (monos, resp.) are necessarily
regular.
Definition A.2.9. Let E be given. We say that E satisfies the axiom of choice ifevery epi splits. That is, if for every epi p, there is a (necessarily monic) i such thatp ◦ i = id.
We say that E satisfies the weak axiom of choice if every regular epi splits.
Theorem A.2.10. If E satisfies the weak axiom of choice, then every endofunctor
Γ :E / E preserves regular epis.
Proof. Let p be a regular epi in E. Then p splits, and hence Γp splits.



A.3. Predicates and Subobjects
We very briefly present the basic construction of the category Sub(A) and show
how to define ∧ and ∨ in Sub(A). This material is not intended to be complete. In
particular, we simply show the constructions here without bothering to verify that ourconstruction of ∧ (say) really does define a meet operation. For a proper introduction
in lattice theory, see [DP90], and for a discussion of the Heyting algebra Sub(A) in
a topos E, see [LM92].
Let C be a category and A ∈ C. We form the category, SubC (A) or just Sub(A), as
follows: Take the full subcategory of the slice category C/A consisting of the monos
P /

/A .

A.3. PREDICATES AND SUBOBJECTS

213

Then, take the quotient of that subcategory by the relation ∼= that holds if two objects
are isomorphic. In other words, we consider the skeleton of the category of monos
into A. We call the elements of Sub(A) the subobjects of A. It is easy to see that
Sub(A) is a poset.
We define the intersection of two subobjects P and Q as the pullback,P ∧ Q /

/P





/A

 _

Q /

V
if it exists. More generally, the intersection Pi of a collection of subobjects Pi of A
is the generalized pullback of the Pi ’s.
In a category with + and a factorization system hE, Mi, E a subclass of theepis and M a subclass of the monos, the join (or union) of two subobjects as the/A :factorization of the induced map P + Q
 ,2

P +Q

P ∨Q /)/A.

More generally, in a category with arbitrary coproducts, one can define an infiniteWjoin, i Pi of subobjects Pi .

Definition A.3.1. A category C is well-powered if each object has set-many
subobjects. C is regularly well-powered if each object has set-many regular subobjects.
Dually, C is (regularly, resp.) co-well-powered if, for each object C, there are
set-many (regular, resp.) epis out of C, up to isomorphism.
In a well-powered category C with pullbacks, we have a contravariant functor
Sub :C op/ Poset.

We must describe the action of Sub on arrows f :A
f ∗ :Sub(B)Take a subobject P //B/ B , which we write as/ Sub(A).

to the object making this square a pullback:f ∗ (P )



A

/P


/B

214

A. PRELIMINARIES

If C has regular epi-mono factorizations, then f ∗ has a left adjoint, denoted ∃fand defined by taking the factorization shown below.
P ,2 ∃ P






/B

A

f

See Section 4.1 for a discussion of a right adjoint to f ∗ .
We complete our brief review of subobjects by showing that a regularly wellpowered category is also regularly co-well-powered, given kernel pairs.
Claim A.3.2. If C has kernel pairs and is regularly well-powered, then C is regularly co-well-powered. Dually, a regularly co-well-powered category with cokernel pairs
is regularly well-powered.
Proof. Assume C is finitely complete and regularly well-powered and C ∈ C.
Then, we map quotients of C to regular subobjects of C × C by taking a regularepimorphism q to its kernel pair. This mapping is injective.

A.3.1. Regular subobjects. The categories of coalgebras in which we are interested do not, in general, have regular epi-mono factorizations. Rather, they have
epi-regular mono factorizations. Consequently, the corresponding category of subobjects is not well-behaved: we cannot define the join of arbitrary subcoalgebras.
If C is a category with epi-regular mono factorizations, it is natural to consider
the regular subobjects of A as predicates over A. In the category RegSub C (A) of
regular subobjects, one can define meet, join, etc., as before and view the collectionof regular subobjects as the predicates over A.
A.4. Relations
We briefly introduce the basic definitions for relations on a category. Since weare concerned with categories with finite products, for the most part, we simplify
this material by assuming finite products exist whenever convenient. See [Bor94,
Volume 2, Chapter 2] for a more complete discussion of this topic.
Definition A.4.1. A collection of maps {fi : A
whenever g, h :C / A satisfy, for all i ∈ I,
fi ◦ g = f i ◦ hthen g = h.
If I = 1, then jointly monic is just monic.

/ Bi }i ∈ I are jointly monic if,

A.4. RELATIONS

215

Definition A.4.2. Let C be a category, A and B objects of C. A (binary) relation
on A and B is a triple hR, r1 , r2 i such that
r1 :R

/ A,

r2 :R

/B

and r1 and r2 are jointly monic. This definition generalizes in the obvious way ton-ary (or I-ary) relations. A unary relation is a subobject.
If A = B, we say that hR, r1 , r2 i is a relation on A. Also, we often refer to a
relation hR, r1 , r2 i by just its carrier R, if no confusion will result.
If C has finite products, then a relation hR, r1 , r2 i on A and B is just a subobject
hR, hr1 , r2 ii of A × B. Also, any pullback (and so, any kernel pair) is a relation.
In particular, ∆A = hA, idA , idA i is a relation on A (sometimes called the equality
relation or the diagonal ) and, more generally, given a map f :A / B , then hA, idA , f i
is a relation on A and B, called the graph of f (denoted graph(f )).
The category of relations on A and B forms a partial order, where hR, r1 , r2 i ≤hS, s1 , s2 i just in case there is an arrow f :R / S such that
r1 = s1 ◦ f, r2= s2 ◦ f.

Given finite products, this ordering is just the same as the ordering on Sub(A × B),of course.
In a category C with finite products and epi-regular mono factorizations, we candefine the composition of two relations easily. Namely, let hR, r1 , r2 i be a relation on
A and B and hS, s1 , s2 i a relation on B and C. Take the pullback shown in Figure 3.
In general, this will not be a relation, so take the regular epi-mono factorization of
P /A × C .
•} AA}} ? AAAt2
}
AA
}}
A
~}}
t1

r1 ~~~

A

~~
~
~

R@

@@ r
@@ 2
@@







s1

B

S?

?? s
?? 2
??


C

Figure 3. Composition of relations
If R is any relation on A, we say that R is reflexive if ∆ ≤ R.
Given any relation hR, r1 , r2 i, the triple hR, r2 , r1 i is also a relation, called the
opposite relation of R and denoted R0 . We say that R is symmetric if R0 ≤ R.

216

A. PRELIMINARIES

Because −0 is monotone and (R0 )0 = R, we have that a relation R is symmetric iff
R0 = R.
A relation R on A is said to be transitive if R ◦ R ≤ R. If R is reflexive, thenR ≤ R ◦ R. Thus, if R is reflexive, then R is transitive iff R ◦ R = R.
Definition A.4.3. A relation R on A is an equivalence relation if it is reflexive,
symmetric and transitive.
Notice that a kernel pair of an arrow is always an equivalence relation. We saythat an equivalence relation is effective if it is the kernel pair of its coequalizer.

∆A

3
id

id

*
r2

))Avv

R

R0

r1

r2

3
*
r1

r2

((

A v

v

R

R◦R

r1

r1 ◦t12+

r2 ◦t2 r2**Av vR
r1

Figure 4. The defining conditions for equivalence relations.
The equality relation ∆ is an effective equivalence relation, and is obviously theleast equivalence relation. Also, in Set, for instance, every equivalence relation iseffective.
Definition A.4.4. A category C is regular if it satisfies the following:• Every arrow has a kernel pair.
• Every kernel pair has a coequalizer.
• The pullback of a regular epi is a regular epi (regular epis are stable underpullbacks.
A regular category in which all equivalence relations are effective is called exact.
A.5. Monads and comonads
This section is a brief reminder of the basic definition of monad and how a pairof adjoint functors give rise to a monad. See any basic text on category theory formore details. We take this material largely from [BW85, Bor94].
Definition A.5.1. A monad (also called a triple) is an ordered triple T =hT, η, µi where/C
T :C
is an endofunctor,
η :1C+3 T andµ :T 2+3 T

A.5. MONADS AND COMONADS

217

are natural transformations such that the following diagrams commute.
T3

µT

ηT

+3 T 2

T @@@



T2



+3 T

µ

Tη

~
~~~~
µ ~~~~~~~
 ~~~~

@@@@
@@@@
@@@@
@

µ

Tµ

+3 T 2 ks

T

T

The first diagram is called the associativity condition and the second the unit condition.
Rather than give explicit examples of monads, let us show how any adjoint pairgives rise to a monad. In Section 2.1, we state the Eilenberg-Moore theorem showingthat every monad arises from an adjoint pair. In fact, it arises from (at least) two
different pairs of adjoints, but we will not discuss the Kleisli construction. See anyof [Bor94, Lan71, BW85] for a more thorough development of this topic.
Let L :C / D and R :D / C be given, with L a R. Let η :idC +3 RL and ε :LR +3 idD
be the unit and counit of the adjunction, respectively. It is easy to show that
hRL, η, RεL i
is a monad on C. The associativity conditionRεLRL

RLRLRL+3 RLRL

RLRεL

RεL





RLRL

+3 RL

RεL

holds just by the naturality of ε. The unit condition
RL III

ηRL

RLη

+3 RLRL ks

IIII
IIII
IIII
III

uuu
uuuu
RεLuuuuuu
 uuuuu

RL

RL

holds just because of the identitiesηR ◦ Rε = idC andLη ◦ εL = idD .
A comonad in C is a monad in C op . We state the definition explicitly, nonetheless,since comonads play such an important role for categories of coalgebras.
Definition A.5.2. A comonad (also called a cotriple) is a triple G = hG, ε, δiwhere G :C / C is a functor and
ε :G+3 idC and

δ :G

+3 G2

218

A. PRELIMINARIES

are natural transformations such that the following diagrams commute.
GKS 3 ks

δG

Gδ

G2 ks

εG

GKS 2

G Aks AA

AAAA
AAAA
AAAA
A

δ

G

δ

Gε

+3 G2
|
|
||||
δ |||||
|
|
|||

GKS 2
G

One sees, by duality, that an adjoint pair also gives rise to a comonad. Explicitly,
let L a R, with unit η and counit ε. Then one easily shows that
hLR, ε, LηRi
is a comonad.
Example A.5.3. Consider the adjoint pair
U :Grp/ Set andF :Set/ Grp,

where U takes a group to its underlying set and F takes a set to the free group onthat set. We have that F a U . This yields a familiar monad on Set, hU F, η, µi. The
unit of the monad,+3 U F ,η :idSet
is the insertion of generators X
formation/ U F X . The multiplication is a natural trans-µ :U F U F+3 U F .

It can be described componentwise as follows: Given a set X, U F X is the set of group
terms over X, which we can regard as finite strings over X. The set U F U F X, then,is the collection of group terms taking elements of U F X as variables. Thus, U F U F X
is the collection of finite strings over the “alphabet” U F X. The multiplication µX
takes such a string and concatenates its elements, yielding a string over X.
The comonad hF U, ε, δi over Grp can be easily described too, although it may
seem less familiar. The functor part of the comonad takes a group G to the freegroup over U G. The counit/GεG :F U G
takes a term over G and multiplies it using the multiplication of G. The comultiplication/F UF UGδG :F U G
is given by F ηU G , where η is the insertion of generators described above. Thus, it is
the group homomorphism extending this insertion to all of F U G.

Bibliography[Acz88][Adá01]

P. Aczel, Non-well-founded sets, CSLI Lecture Notes, vol. 14, Stanford University, 1988.
Jiřı́ Adámek, Final coalgebras are ideal completions of initial algebras, Journal of Logic
and Computation (2001), To appear.
[AGM92] S. Abramsky, Dov M. Gabbay, and T. S. E Maibaum (eds.), Handbook of logic in computer science, vol. 1, Oxford Science Publications, 1992.
[AH00]
Steve Awodey and Jesse Hughes, The coalgebraic dual of Birkhoff ’s variety theorem,
Tech. Report CMU-PHIL-109, Carnegie Mellon University, Pittsburgh, PA, 15213, November 2000.
[AHS90] J. Adámek, H. Herrlich, and G. E. Strecker, Abstract and concrete categories, Wiley
Interscience, 1990.
[AM89]
Peter Aczel and Nax Mendler, A final coalgebra theorem, Category Theory and Computer
Science, Lecture Notes in Computer Science, Vol. 389 (D. H. Pitt, D. E. Rydeheard,
P. Dybjer, A. M. Pitts, and A. Poigne, eds.), Lecture Notes in Computer Science, vol.
389, Springer-Verlag, 1989.
[AN78]
H. Andréka and I. Németi, Loś lemma holds in every category, Studia Sci. Math. Hungar.
13 (1978), 361–376.
[AN79a] H. Andréka and I. Németi, Formulas and ultraproducts in categories, Beitrage zur Algebra und Geometrie 8 (1979), 133–151.
[AN79b] H. Andréka and I. Németi, Injectivity in categories to represent all first order formulas,
Demonstratio Mathematica 12 (1979), 717–732.
[AN81a] H. Andréka and I. Németi, Cone-implicational subcategories and some birkhoff-type theorems, Universal Algebra (Proc. Coll. Esztergom 1977), Colloq. Math. Soc. J. Bolyai,
vol. 29, 1981, pp. 535–578.
[AN81b] H. Andréka and I. Németi, A general axiomatizability theorem formulated in terms ofcone-injective subcategories, Universal Algebra (Proc. Coll. Esztergom 1977), Colloq.
Math. Soc. J. Bolyai, vol. 29, North–Holland, Amsterdam, 1981, pp. 13–35.
[AN83]
H. Andréka and I. Németi, Generalization of variety and quasivariety concept to partial
algebras through category theory, Dissertationes Mathematicae (Rozprawy Math.) (1983).
[AP01]
Jiřı́ Adámek and Hans-E. Porst, From varieties of algebras to covarieties of coalgebras,
In Corradini et al. [CLM01].
[AR94]
Jiřı́ Adámek and Jiřı́ Rosický, Locally presentable and accessible categories, London
Mathematical Society Lecture Note Series, vol. 189, Cambridge University Press, 1994.
[Bar92]
Michael Barr, Algebraically compact functors, Journal for Pure and Applied Algebra 82(1992), 211–231.
[Bar93]
M. Barr, Terminal coalgebras in well-founded set theory, Theoretical Comp. Sci. 114(1993), 299–315.
[Bec67]
J.M. Beck, Triples, algebras, and cohomology, Ph.D. thesis, Columbia University, 1967.
[BH76]
B. Banaschewski and H. Herrlich, Subcategories defined by implications, Houston Journalof Mathematics 2 (1976), no. 2.
[Bir35]
G. Birkhoff, On the structure of abstract algebras, Proceedings of the Cambridge Philosophical Society 31 (1935), 433–454.

219

220

[Bir44]

BIBLIOGRAPHY

G. Birkhoff, Subdirect unions in universal algebra, Bulletin of the American Mathematical Society 50 (1944), 764 – 768.
[BM96]Jon Barwise and Lawrence Moss, Vicious circles, CSLI Lecture Notes, vol. 60, Stanford
University, 1996.
[Bor94]
F. Borceux, Handbook of categorical algebra I-III, Cambridge University Press, 1994.
[But98]
Carsten Butz, Regular categories and regular logic, BRICS LS-98-2, October 1998, Course
notes, 35 pp.
[BW82]
Stephen Bloom and Jesse B. Wright, Finitary quasi-varieties, Journal of Pure and Applied Algebra 25 (1982), 121–154.
[BW85]
Michael Barr and Charles Wells, Toposes, triples and theories, Grundlehren der maathematischen Wisenschaften, vol. 278, Springer-Verlag New York, 1985.
[Che80]Brian F. Chellas, Modal logic: An introduction, Cambridge University Press, 1980.
[Cı̂r00]
Corina Cı̂rstea, An algebra-coalgebra framework for system specification, In Reichel[Rei00], pp. 81–112.
[CLM01] A. Corradini, M. Lenisa, and U. Montanari (eds.), Electronic notes in theoretical computer science, vol. 44, Coalgebraic Methods in Computer Science (CMCS’2001), 2001.
[Coc93]J. R. B. Cockett, Introduction to distributive categories, Mathematical Structures in
Computer Science 3 (1993), no. 3, 277–307.
[Cro93]
Roy L. Crole, Categories for types, Cambridge University Press, 1993.
[DP90]B. A. Davey and Hilary Priestley, Introduction to lattices and order, Cambridge University Press, Cambridge, 1990.
[EM65]
S. Eilenberg and J. C. Moore, Adjoint functors and triples, Illinois Journal of Mathematics 9 (1965), 381–398.
[FS79]
M. P. Fourman and D. S. Scott, Sheaves and logic, Applications of Sheaf Theory to
Algebra, Analysis, and Topology (M. P. Fourman, C. J. Mulvey, and D. S. Scott, eds.),
Lecture Notes in Mathematics, Springer-Verlag, 1979.
[FS90]
P. Freyd and A. Scedrov, Categories, allegories, North-Holland, Amsterdam, 1990.
[GHS01] H. Peter Gumm, Jesse Hughes, and Tobias Schröder, Distributivity of categories of coalgebras, FG Informatik 25, Philipps-Universität Marburg, 2001.
[Gol99]Robert Goldblatt, What is the coalgebraic analogue of Birkhoff ’s Variety Theorem?,
Available at http://www.mcs.vuw.ac.nz/~rob/, December 1999.
[Grä68]
George Grätzer, Universal algebra, D. Van Nostrand Company, Inc., 1968.
[GS98]
H. Peter Gumm and Tobias Schröder, Covarieties and complete covarieties, In Jacobs
et al. [JMRR98], pp. 43–56.
[GS01]
H. Peter Gumm and Tobias Schröder, Products of coalgebras, Algebra Universalis (2001),
To appear.
[Gum98] H. Peter Gumm, Equational and implicational classes of coalgebras, 1998, Extended
Abstract submitted for RelMiCS’4.
[Gum99] H. Peter Gumm, Elements of the general theory of coalgebras, LUATCS’99, Rand
Africaans University, Johannesburg, South Africa. Available at http://proof.mth.uct.
ac.za/~pjipsen/luatcs99/, 1999.
[Gum01a] H. Peter Gumm, Birkhoff ’s variety theorem for coalgebras, Contributions to General
Algebra 2000 (2001), To appear.
[Gum01b] H. Peter Gumm, Functors for coalgebras, Algebra Universalis (2001), To appear.
[HC68]
G. Hughes and M. Cresswell, An introduction to modal logic, Methuen, London, 1968.
[HJ99]
Ulrich Hensel and Bart Jacobs, Coalgebraic theories of sequences in PVS, Journal of
Logic and Computation 9 (1999), no. 4, 463–500.
[Hug00]Jesse Hughes, The coalgebraic analogue of Birkhoff ’s variety theorem (abstract), Bulletinof Symbolic Logic, June 2000, Abstract for talk delivered at 1999–2000 Winter Meetingof the ASL, Washington, DC.
[Hug01]Jesse Hughes, Modal operators for coequations, In Corradini et al. [CLM01].

BIBLIOGRAPHY[Jac95]221

B. Jacobs, Mongruences and cofree coalgebras, Lecture Notes in Computer Science 936(1995).
[Jac99]B.P.F. Jacobs, The temporal logic of coalgebras via Galois algebras, Tech. Report CSIR9906, Computing Science Institute, April 1999.
[Jac00]Bart Jacobs, Towards a duality result in the modal logic of coalgebras, In Reichel [Rei00],
pp. 163–198.
[JMRR98] Bart Jacobs, Larry Moss, Horst Reichel, and Jan Rutten (eds.), Electronic notesin theoretical computer science, vol. 11, Coalgebraic Methods in Computer Science(CMCS’1998), 1998.
[JPT+ 98] Peter Johnstone, John Power, Toru Tsujishita, Hiroshi Watanabe, and James Worrell,
The structure of categories of coalgebras, August 1998.
[JR97]
Bart Jacobs and Jan Rutten, A tutorial on (co)algebras and (co)induction, Bulletin of
the European Association for Theoretical Computer Science 62 (1997).
[JR99]
Bart Jacobs and Jan Rutten (eds.), Electronic notes in theoretical computer science,
vol. 19, Coalgebraic Methods in Computer Science (CMCS’1999), 1999.
[Kle65]
H. Kleisli, Every standard construction is induced by a pair of adjoint functors, Proceedings of the American Mathematical Society 16 (1965), 544–546.
[Kur99]Alexander Kurz, Modal rules are co-implications, Draft. Available at http://helios.
pst.informatik.uni-muenchen.de/~kurz, February 1999.
[Kur00]Alexander Kurz, Logics for coalgebras and applications for computer science, Ph.D. thesis, Ludwig-Maximilians-Universität München, 2000.
[Lam70] Joachim Lambek, Sub equalizers, Canadian Mathematical Bulletin 13 (1970).
[Lan71]
S. Mac Lane, Categories for the working mathematician, Graduate Texts in Mathematics,
Springer-Verlag, 1971.
[Law63]
Bill Lawvere, Functorial semantics of algebraic theories, Proceedings of the National
Academy of Sciences of the United States of America 50 (1963).
[LM92]
Saunders Mac Lane and Ieke Moerdijk, Sheaves in geometry and logic: a first introduction
to topos theory, Universitext, Springer-Verlag, 1992.
[LS86]
J. Lambek and P. J. Scott, Introduction to higher order categorical logic, Cambridge
University Press, 1986.
[Man76] Ernie Manes, Algebraic theories, Graduate Texts in Mathematics, no. 26, SpringerVerlag, 1976.
[Maš01]
Dragan Mašulović, Invariants of monadic coalgebras, In Corradini et al. [CLM01].
[Mos99]Lawrence S. Moss, Coalgebraic logic, Annals of Pure and Applied Logic 96 (1999), 277–
317.
[MT92]
K. Meinke and J. V. Tucker, Universal algebra, In Abramsky et al. [AGM92], pp. 189–
412.
[Ném82] I. Németi, On notions of factorizations systems and their applications to cone-injective
subcategories, Periodica Mathematica Hungarica 13 (1982), no. 3, 229–235.
[PZ01]
Erik Poll and Jan Zwanenburg, From algebras and coalgebras to dialgebras, In Corradini
et al. [CLM01].
[Rei00]
H. Reichel (ed.), Electronic notes in theoretical computer science, vol. 33, Coalgebraic
Methods in Computer Science (CMCS’2000), 2000.
[Rob94]
Edmund Robinson, Variations on algebra: Monadicity and generalisations of equational
theories, 1994.
[Roş01]
Grigore Roşu, Equational axiomatizability for coalgebra, Theoretical Computer Science
260 (2001), Scheduled to appear.
[RTJ01] J. Rothe, H. Tews, and B. Jacobs, The coalgebraic class specification language ccsl,
Journal of Universal Computer Science (JUCS) 7 (2001), no. 2, 175–193.
[Rut96]
J.J.M.M. Rutten, Universal coalgebra: a theory of systems, Tech. Report CS-R9652,
Centrum voor Wiskunde en Informatica, 1996.

222[Tay99][Tur96][vK01][Wor98][Wor00]BIBLIOGRAPHYPaul Taylor, Practical foundations of mathematics, Cambridge University Press, 1999.
Daniele Turi, Functorial operational semantics and its denotational dual, Ph.D. thesis,
Free University, Amsterdam, June 1996.
Burghard von Karger, Temporal algebra, Mathematical Structures in Computer Science(2001), To appear.
James Worrell, Toposes of coalgebras and hidden algebras, In Jacobs et al. [JMRR98].
James Worrell, Terminal sequences for accessible endofunctors, A chapter of Worrell’s
dissertation, 2000.

Indexabsolute coequalizer, 55
accessibility relation, 71
algebra– for a monad, 48–51– for an endofunctor, 7coequalizers of –, 78
colimits of –, 19–22, 77–89
coproducts of –, 89final, 32
free, 47, 51–53, 115, 133
homomorphism, 7
initial, 32–40, 45–46
limits of –, 16–18
minimal, 40
universal, 10–11, 36–37, 39
almost co-regular, 21
almost regular, 21
associativity condition, 217
automata, 108, 146, 164

choiceaxiom of –, 90, 92, 93, 105, 197, 212
weak axiom of –, 31, 212
closed– under codomains of epis, 141– under coproducts, 141– under products, 114– under quotients, 114– under regular subobjects, 141– under subobjects, 114
deductively –, 136, 137
co-well-powered, 213
coalgebra– for a comonad, 48–51, 150– for an endofunctor, 8
cofree, 57, 58
colimits of –, 16–18
equalizers of –, 78
final, 32–34, 41–43, 45–46
homomorphism, 8
initial, 32
limits of –, 19–22, 77–89
products of –, 79–89
simple, 43–45, 106, 196
coequalizer
absolute, 55
split, 55
coequation, 140, 143–145, 149, 162, 166, 171,
198, 200, 201, 203conditional, 149–153
conditional –, 149, 150, 152, 199, 200, 206
endo-invariant, 162–168
generating –, 163
cofree, 57
cofree coalgebra, 57, 58
coinduction, 43–45, 105–107, 195–197
coloring, 57
comonad, 217
comonadic, 59
complete Heyting algebra, 72

Beck’s theorem, 55
behavioral covariety, 168–172
Birkhoff variety, 115, 116
Birkhoff variety theorem, 122
Bisim, 91
bisimilar, 105–108, 196
bisimulation, 92, 197
total, 168–170
bounded functor, 160
carrier, 7, 8
category
almost co-regular, 21
almost regular, 21
co-Birkhoff, 141
exact, 216
extensive, 175–176
quasi-co-Birkhoff, 140, 141
regular, 216
child, 14
223

224

congruence, 29–32
conjunct covering, 154
conjunct representation, 155
conjunctly irreducible, 154
conjunctly presentable, 155constructibly equivalent, 173
context, 181
corecursion, 41–43
cotriple, 217
covarietor, 59
covariety, 141
behavioral, 168–172
deductively closed, 136, 137
diagonal, 215
distributive, 155
E Γ, 8colimits in –, 19–22, 77–89
coproducts in –, 89
limits in –, 16–18
EΓ , 8colimits in –, 16–18
equalizers in –, 78
limits in –, 19–22, 77–89
products in –, 79–89
Eilenberg-Moore theorem, 49
elementary variety, 173
endomorphism-invariant, 162–168
endomorphism-stable, 136epi– splits, 212
regular, 209
epi-regular mono factorizations, 211
εV , 121
equality, 215
equation, 115, 117–119, 134
equational domain, 127
equational variety, 115, 118
equivalence relation, 216
effective –, 216
η V , 119exact
category, 216
sequence, 22
extensive, 155
F V , 119
factorization system, 209–212
epi-regular mono, 211
regular epi-mono, 211
regular epi-regular mono, 177

INDEX

strong epi-mono, 212
filter, 15
final, 32
finitely presentable, 128
fixed points, 32–34, 117, 139
forgetful functor, 8foundation
axiom of, 40
free algebra, 47, 51, 52, 115, 133
functor– creates colimits, 17– creates limits, 17– nearly preserves pullbacks, 176– preserves colimits, 17– preserves intersections, 74, 167– preserves limits, 16– preserves regular relations, 101– reflects colimits, 17– reflects limits, 17bounded, 160
comonadic, 59
monadic, 55
G-coalgebra, 49
Galois correspondence, 119
Γ-algebra, 7
Γ-coalgebra, 8graph, 92, 169, 215
Heyting algebra, 69, 72, 73, 101, 103, 151, 212
complete, 72
homomorphism, 7, 8
Hughes, Quincy, iii
induction, 37–40, 53
inductive predicate, 38
initial, 32
intersection
preservation of –, 74
invariant coequation, 162–168
join, 213
jointly monic, 214
Kripke frames, 15
Kripke models, 14–15, 70–72, 77
Kripke structures, 15
Kripke-Joyal semantics, 198–200
Lambek’s lemma, 32, 33, 45
lifting functor, 36, 41
locally finitely presentable, 128
logos, 175, 177, 178

INDEX

locally complete, 175, 177, 178, 180–185,
198
minimal, 38
ModA (φ), 71
monad, 216–217
monadic, 55
mono– splits, 212
regular, 209
Mon, 122
N, 34–36, 39
N, 41
natural numbers object, 34
nearly preserves pullbacks, 176
neighborhood, 16neighborhood filter, 16
NNO, 34
notation conventions, 209
NWF, 34
object oriented languages, 60, 146
ω, 36
ω, 41
opposite relation, 215
orthogonality, 118–119
P, 33⊥ (perp), 118–119, 141
pointwise semantics, 200–203
polynomial functor, 43
coalgebras for -, 76
power set functor, 33
pre-congruence, 27–29
predicates, 212–214
pullbacksnearly preserves –, 175–177, 186
weak –, 44, 45, 93, 102, 108, 196
quasi-Birkhoff variety, 116
quasi-co-Birkhoff category, 140
quasi-covariety, 141
quasi-variety, 116, 119–122
quasi-variety theorem, 119
recursion, 34–37, 53
reflexive, 215
RegSub, 63
RegSub, 214
regularcategory, 216
epi, 209

225

mono, 209
regular co-relation, 104
regular epi-mono factorizations, 211
regular epi-reflective, 119regular n-ary relation, 109
regular relation, 90, 92, 99, 101–103
regularly co-well-powered, 213
regularly well-powered, 213
relation, 214–216
preserves regular -, 101
regular –, 90, 92, 99, 101–103
retractable presentation, 129
retractably presentable, 130
Sat, 135
SET, 33
non-well-founded, 34
well-founded, 34, 39–40
Set
quasi-varieties in, 122
S4, 69, 100
S4, 47, 69, 110, 164, 165, 190, 199
Σ-algebra, 10
signature, 10
specification
coalgebraic, 60
coalgebraic, 146, 148split coequalizer, 55
stable, 136, 140– under pullbacks, 216
streams, 13–14, 42–43, 107
finite, 11–12, 37, 39
infinite, 12–13, 41–42, 76
strong epi, 209
strong mono, 210
structure map, 7, 8
Sub, 212
SubAlg, 23–26
subalgebra, 23
generated by P , 24
subcoalgebra, 62
cogenerated by P , 64, 69
generated by P , 73, 77
subdirectly irreducible, 154
subobject classifier, 179–180
subobjects, 212–214
closed under α, 38
successor functor, 34, 41
symmetric, 215
T-algebra, 48
T V , 121

226

terminal, 32
Top, 15–16
total bisimulation, 168–170
total relation, 168
transitive, 216
trees, 14, 36–37, 39, 43, 107
well-founded, 39
triple, 216
U , 8, 18
creates (co)limits, 18
U V , 119
uniformly Birkhoff, 127
uniformly co-Birkhoff, 153
union, 213
unit condition, 217
valid, 183varietor, 56
variety, 115, 116
Birkhoff, 116
Birkhoff –, 115
elementary –, 173
equational –, 115
quasi-Birkhoff –, 116
weak pullbacks, 44, 45, 93, 102, 108, 196
well-founded, 39–40
well-pointed, 159
well-powered, 213
WF, 34

INDEX