BRICS
Basic Research in Computer Science
Profunctors, Open Maps and Bisimulation
Gian Luca Cattani
Glynn Winskel
BRICS Report Series RS-04-22
ISSN 0909-0878 October 2004
BRICS RS-04-22 Cattani & Winskel: Profunctors, Open Maps and Bisimulation
Copyright
c
2004, Gian Luca Cattani & Glynn Winskel.
BRICS, Department of Computer Science
University of Aarhus. All rights reserved.
Reproduction of all or part of this work
is permitted for educational or research use
on condition that this copyright notice is
included in any copy.
See back inner page for a list of recent BRICS Report Series publications.
Copies may be obtained by contacting:
BRICS
Department of Computer Science
University of Aarhus
Ny Munkegade, building 540
DK–8000 Aarhus C
Denmark
Telephone:+45 8942 3360
Telefax: +45 8942 3255
Internet: BRICS@brics.dk
BRICS publications are in general accessible through the World Wide
Web and anonymous FTP through these URLs:
http://www.brics.dk
ftp://ftp.brics.dk
This document in subdirectory RS/04/22/
Profunctors, Open Maps and Bisimulation
∗
Gian Luca Cattani
DS Data Systems S.p.A.,
Via Ugozzolo 121/A,
I-43100 Parma, Italy.
Email: cattanil@dsdata.it.
Glynn Winskel
University of Cambridge Computer Laboratory,
Cambridge CB3 0FD, England.
Email: gw104@cl.cam.ac.uk.
October 2004
Abstract
This paper studies fundamental connections between profunctors (i.e., dis-
tributors, or bimodules), open maps and bisimulation. In particular, it proves
that a colimit preserving functor between presheaf categories (corresponding to
a profunctor) preserves open maps and open map bisimulation. Consequently,
the composition of profunctors preserves open maps as 2-cells. A guiding idea
is the view that profunctors, and colimit preserving functors, are linear maps in
a model of classical linear logic. But profunctors, and colimit preserving func-
tors, as linear maps, are too restrictive for many applications. This leads to a
study of a range of pseudo-comonads and how non-linear maps in their co-Kleisli
bicategories preserve open maps and bisimulation. The pseudo-comonads con-
sidered are based on finite colimit completion, “lifting”, and indexed families.
The paper includes an appendix summarising the key results on coends, left
Kan extensions and the preservation of colimits. One motivation for this work
is that it provides a mathematical framework for extending domain theory and
denotational semantics of programming languages to the more intricate models,
languages and equivalences found in concurrent computation. But the results
are likely to have more general applicability because of the ubiquitous nature of
profunctors.
Contents
1 Introduction 3
2 Presheaves, open maps and bisimulation 6
∗
To appear in Mathematical Structures in Computer Science
1
3 A result on open map preservation 9
4 The bicategory Prof and the 2-category Cocont 14
5 The structure of Prof 17
5.1 Pseudo-productsand-coproducts..................... 17
5.2 Tensor.................................... 18
5.3 Dualiser ................................... 19
5.4 Functionspace ............................... 19
5.5 Linearlogic ................................. 20
6 Open map bisimulation in Prof 21
7Profandω-accessible categories 24
7.1 ω-Accessible categories . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.2 Finite colimit completion . . . . . . . . . . . . . . . . . . . . . . . . . 26
7.2.1 Domaintheoreticanalogies .................... 31
7.3 A failure of open map preservation . . . . . . . . . . . . . . . . . . . . 31
8 Lifting and connected colimits 32
8.1 Lifting.................................... 33
8.2 Connectedcolimitpreservingfunctors .................. 34
8.2.1 Rootedcolimits........................... 37
8.3 Bisimulation................................. 38
9 Pseudo comonads via families 40
9.1 Motivation ................................. 40
9.2 Indexed families . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
9.3 Pseudo-comonads on Prof ........................ 42
9.4 Onpreservationofbisimulation...................... 43
10 Conclusions 48
A A primer on coends and left Kan extensions 50
A.1 Representations, universality and parametricity . . . . . . . . . . . . . 50
A.2 (Co)Endsandtheirproperties....................... 51
A.2.1 Dinaturaltransformations..................... 51
A.2.2 Coends ............................... 51
A.2.3 Parametricity for coends . . . . . . . . . . . . . . . . . . . . . . 53
A.2.4 The Fubini theorem for coends . . . . . . . . . . . . . . . . . . 54
A.2.5 Ends................................. 55
A.2.6 Endandcoendformulae...................... 55
A.3 Preservationofcolimits .......................... 55
A.4 Kanextensionsandtheirproperties ................... 56
A.4.1 LeftKanextensions ........................ 56
A.4.2 PointwiseleftKanextensions................... 57
A.4.3 LeftKanextensionsalongYoneda ................ 58
A.4.4 Thedensityformulae........................ 59
A.4.5 Afactorisationlemma ....................... 59
2
A.4.6 Extensionsoffunctors ....................... 60
1 Introduction
At first sight, it is perhaps surprising that profunctors,
1
a categorical generalisation
of relations [5, 31], and bisimulation [37, 42], a central equivalence in the study of
processes are intimately related. Briefly, the chain of connections runs:
- Nondeterministic processes can be represented as presheaves. A presheaf over a
category P can be thought of as a form of transition system whose computation
paths have shapes objects in P; the objects of P are paths and the arrows of P
express how one computation path can extend to another. A presheaf category
b
P =[P
op
, Set] is the free colimit completion of P, so its objects, presheaves, as
colimits, are collections of paths identified along subpaths. Familiar models of
processes such as known categories of synchronisation trees and event structures,
and many others, can be realised as presheaf categories P for some suitable choice
of category P [28].
- Bisimulation between processes is caught via spans of open maps.Anopenmap
between presheaves is a generalisation of a functional bismulation between tran-
sition systems (i.e., a bisimulation whose underlying relation on states happens
to be a function). In many, though not all, cases the bisimulation obtained
coincides with familiar definitions [28].
- Profunctors correspond to colimit preserving functors between presheaf cate-
gories, which somewhat remarkably preserve open maps and so bisimulation
(see Theorem 3.3).
The concept of a bisimulation was invented by Milner and Park as a relation
between the states of labelled transition systems to express when two states have
essentially the same communication capabilities [37, 42]. Showing processes bisimilar
(an equivalence given as a maximum fixed point) amounts to exhibiting a bisimulation
(a postfixed point) relating them. This coinductive method comes from a direct
reading of Tarski’s fixed point theorem [50].
Subsequently the idea of bisimulation has been extended and generalised to a
range of languages and models, most often based on a transition system obtained
from an operational semantics. Though a pattern has emerged, bisimulation is most
oftendefinedinanad hoc manner for the language at hand, and sometimes can be a
matter of great subtlety [36].
Broadly speaking, there are two lines of development in making the definition of
bisimulation more systematic; so that the variety of bisimulation is determined by
the denotational semantics given to a language. One approach is that based on the
recognition that bisimulation arises from final coalgebras. This line is very fruitful
in a range of categories of process models and domain theories, and often furnishes
useful proof principles of coinduction, echoing the technique promoted by Milner and
Park [25]. The other approach is based on open maps.
Open maps have a prehistory in pure mathematics [27], but first appeared in
computer science in [28]. Their initial role was in giving a unified approach to a
1
Also called distributors and bimodules.
3