Université Savoie Mont BlancTHÈSE
Pour obtenir le grade de

DOCTEUR DE L’UNIVERSITÉ DE GRENOBLE
Spécialité : Mathématiques-InformatiqueArrêté ministériel : 25 mai 2016

Présentée par

Clovis Eberhart
Thèse dirigée par Tom Hirschowitz

préparée au sein du Laboratoire de mathématiques
et de l’Ecole Doctorale de Mathématiques, Sciences et Technologies
de l’Information, Informatique

Catégories et diagrammes decordes pour les jeux concurrents
Categories and String Diagrams forConcurrent Game Semantics
Thèse soutenue publiquement le 22 juin 2018,
devant le jury composé de :Mr. Martin Hyland
Professor, Department of Pure Mathematics and Mathematical Statistics, University of Cambridge, Président

M. Samuel MimramMaître de conférences, LIX, École polytechnique, Rapporteur

M. Pierre-Louis Curien
Directeur de recherche CNRS, IRIF, Université Paris Diderot, Examinateur

M. Vincent Danos
Directeur de recherche CNRS, Département d’informatique, ENS, Examinateur

M. Paul-André Melliès
Chargé de recherche CNRS, IRIF, Université Paris Diderot, Examinateur

M. Tom Hirschowitz
Chargé de recherche CNRS, LAMA, Université Savoie Mont Blanc, Directeur de
thèse

2

Thanks
I would like to extend my thanks to all the people I have shared these few
years with. To Tom Hirschowitz, my PhD supervisor, whose vast knowledge ofcategory theory and abstract way of thinking never ceased to amaze me, andwho has been more of a colleague with whom I had a fruitful collaboration
than someone who simply supervised my work. To Krzysztof Worytkiewicz,
who was my official supervisor for the first two years of my PhD, even though
we worked on different topics. To the members of the LIMD team, past or
present, especially those with whom I have interacted the most : Pierre for all
the fascinating math problems and anecdotes about computer science, Jaco forhis spirit, humour, and common sense, Christophe for his enthusiasm and ability
to always randomly generate conversation topics, and Xavier for his common
interests in food and a certain Québecois humourist. To the PhD students at
LAMA, either past or present : Rodolphe, Pierre, Florian, Lars, Marion, Boulos,
Lama, Rémy, Charlotte, Suelen, and all those I have forgotten to mention. Moregenerally, I would like to thank the whole LAMA laboratory for the wonderful
years I have spent there. I would like to (unironically) thank the administration
at MSTII (and more generally any person who had to deal with me from an
administrative point of view) for their patience. Finally, I would like to thank thereporters – Marin Hyland and Samuel Mimram – and examiners – Pierre-Louis
Curien, Vincent Danos, and Paul-André Melliès – for reading this manuscript,
making enlightening comments about it, and giving me some pointers for future
research directions.

3

Contents
1 Introduction
1.1 Semantics of Programming Languages . . . . . . . . . . . . . . . .
1.1.1 An (Outdated) Map of Semantics . . . . . . . . . . . . . .
1.1.2 Semantics Today . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Game Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.1 The Birth of Game Semantics . . . . . . . . . . . . . . . . .
1.2.2 The Rich World of Game Models . . . . . . . . . . . . . . .
1.3 Motivation and Contributions . . . . . . . . . . . . . . . . . . . . .
1.3.1 Fibred Models . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3.2 A Bridge Between Models . . . . . . . . . . . . . . . . . . .
1.3.3 A Core of Game Models . . . . . . . . . . . . . . . . . . . .

7
7
8
10
10
11
12
14
16
18
21

2 Preliminaries
2.1 Game Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.1 Hyland-Ong/Nickau Games . . . . . . . . . . . . . . . . . .
2.1.2 Variations on HON Games . . . . . . . . . . . . . . . . . . .
2.1.3 Tsukada and Ong’s Model . . . . . . . . . . . . . . . . . . .
2.1.4 Abramsky-Jagadeesan-Malacaria Games . . . . . . . . . .
2.1.5 Blass Games . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Categorical Preliminaries . . . . . . . . . . . . . . . . . . . . . . . .
2.2.1 Comma and Cocomma Categories . . . . . . . . . . . . . .
2.2.2 Fibrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.3 Ends and Coends . . . . . . . . . . . . . . . . . . . . . . . .
2.2.4 Kan Extensions . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.5 Presheaf Categories . . . . . . . . . . . . . . . . . . . . . . .
2.2.6 Exact Squares . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.7 Sheaves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.8 Factorisation Systems . . . . . . . . . . . . . . . . . . . . . .
2.2.9 Pseudo Double Categories . . . . . . . . . . . . . . . . . . .

24
24
25
36
42
44
46
52
52
54
56
59
63
79
83
87
90

3 Presheaves and Concurrent Traces
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 From Signatures to Pseudo Double Categories . . . . . . . . . . .
3.2.1 Signatures and Positions . . . . . . . . . . . . . . . . . . . .
3.2.2 Execution Steps and Traces . . . . . . . . . . . . . . . . . .

92
92
93
93
97

4

3.3
3.4

3.2.3 Organising Traces into a Pseudo Double Category . . . .
3.2.4 The Category of Execution Traces . . . . . . . . . . . . . .
Unfolding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

100
104
105
105

4 Pseudo Double Categories and Concurrent Game Models
108
4.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
4.2 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
4.3 Signatures for Pseudo Double Categories . . . . . . . . . . . . . . 112
4.3.1 A Signature for the π-Calculus . . . . . . . . . . . . . . . . 113
4.3.2 Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
4.3.3 From Signatures to Pseudo Double Categories . . . . . . . 124
4.3.4 Fibredness and Categories of Plays . . . . . . . . . . . . . . 125
4.4 Fibredness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
4.4.1 Fibredness through Factorisation Systems . . . . . . . . . 127
4.4.2 A Little Theory of 1D-Pullbacks and 1D-Injectivity . . . . 128
4.4.3 A Necessary and Sufficient Fibredness Criterion . . . . . . 131
4.4.4 Cartesian Lifting of Seeds . . . . . . . . . . . . . . . . . . . 142
4.5 Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
5 Justified Sequences in String Diagrams
153
5.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
5.2 HON Games as String Diagrams . . . . . . . . . . . . . . . . . . . 157
5.2.1 Building the Pseudo Double Category . . . . . . . . . . . . 157
5.2.2 Categories of Views and Plays . . . . . . . . . . . . . . . . 163
5.2.3 Characterisations of Views and Plays . . . . . . . . . . . . 167
5.3 The Level of Plays: Intuition . . . . . . . . . . . . . . . . . . . . . . 173
5.3.1 Illustration on an Example . . . . . . . . . . . . . . . . . . 173
5.3.2 From String Diagrams to Proof Trees . . . . . . . . . . . . 177
5.3.3 From Proof Trees to Justified Sequences . . . . . . . . . . 182
5.4 The Level of Plays: Formal Proof . . . . . . . . . . . . . . . . . . . 185
5.4.1 Constructing the Functor . . . . . . . . . . . . . . . . . . . 186
5.4.2 Full Faithfulness . . . . . . . . . . . . . . . . . . . . . . . . . 194
5.4.3 Restriction to Views . . . . . . . . . . . . . . . . . . . . . . 196
5.5 The Level of Strategies . . . . . . . . . . . . . . . . . . . . . . . . . 199
5.6 Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
6 Composing Non-Deterministic Strategies
203
6.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
6.1.1 The Main Ideas . . . . . . . . . . . . . . . . . . . . . . . . . 204
6.1.2 A Technical Point . . . . . . . . . . . . . . . . . . . . . . . . 205
6.2 Polynomial Functors for Abstract Game Semantics . . . . . . . . 208
6.2.1 Plays as a Category-Valued Presheaf . . . . . . . . . . . . . 209
6.2.2 Copycats and Composition as Polynomial Functors . . . . 211
6.2.3 Game Settings, Associativity and Unitality . . . . . . . . . 213
6.2.4 The Boolean Case . . . . . . . . . . . . . . . . . . . . . . . . 219

5

6.3

6.4

6.5

Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.3.1 Hyland-Ong/Nickau Games . . . . . . . . . . . . . . . . . .
6.3.2 Constraining Strategies . . . . . . . . . . . . . . . . . . . . .
6.3.3 AJM Games: a Partial Answer . . . . . . . . . . . . . . . .
6.3.4 A Non-Example: Blass Games . . . . . . . . . . . . . . . .
Innocence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4.1 Concurrent Innocence . . . . . . . . . . . . . . . . . . . . . .
6.4.2 Prefix-Based Innocence . . . . . . . . . . . . . . . . . . . . .
6.4.3 Boolean Innocence . . . . . . . . . . . . . . . . . . . . . . .
Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A A Proof of View-Analyticity in Tsukada and Ong’s Model

6

222
222
225
229
231
232
232
240
242
244
254

Chapter 1

Introduction
In recent years, there has been increasingly more focus on concurrent programming, following the increase in the average number of cores in a processor andthe rise of distributed computing. However, many programs are still unable touse several cores simultaneously, as concurrent computing is much less intuitive than classical computing. One way to make concurrent computing simpler
could be to design languages specifically for concurrency, which requires understanding the basic notions behind it. For example, an appealing aspect of functional languages (admittedly not to the average programmer) such as OCaml or
Haskell is that they are built on well-understood theories, and these languages
can thus be used to test the effectiveness of functional programming techniqueson real problems, rather than academical ones. Once these techniques have
proved useful, functional programming paradigms can then be added to “mainstream” programming languages such as Python or C++, where they can beused to solve some problems more easily. This work is a contribution to concurrent game semantics, a research area that uses game semantics to understandconcurrency better.

1.1

Semantics of Programming Languages

Semantics of programming languages (or simply semantics for short) is a fieldof computer science whose goal is to assign mathematical meaning to programs.
Indeed, a term of a language is just a sequence of symbols, which in itself carries
no meaning, and whose meaning is only understood in the context of a particular language. The idea is thus to build mathematical models of programming
languages to prove properties of programs.
There are several reasons why one would want to give a mathematical meaning to programs: to prove that programs written in a particular language have acertain property, to prove that a particular program has the intended behaviour,
to prove that it terminates within a reasonable amount of time, to prove thattwo programs have the same behaviour... It is also interesting to study programming languages in light of their link to logics, given by the Curry-Howard
isomorphism [95]. In its most basic form, it states that types A of a programming language can be seen as propositions JAK of a logic and vice versa. But theinteresting part is: programs of type A in the language correspond to proofs of7

JAK in the logic. The correspondence is even finer than this, stating that composition of programs correspond to cuts in the logic (a cut is a step in a proof
that does not prove anything new, for example, introducing a lemma). Finally,it states a dynamic correspondence between proofs and programs, in the sensethat normalisation (execution) of a program corresponds to cut-elimination in
the proof (a process that turns a proof into a proof of the same proposition,
but without cuts, and which basically corresponds to inlining all the lemmas
introduced in the proof). Semantics is thus a way to understand logic better,and vice versa.

1.1.1

An (Outdated) Map of Semantics

Let us give a slightly outdated view of semantics (we will then see that thelandscape of semantics is more complex today).
Semantics comes in several different flavours, usually depending on the kindof property that one wishes to prove. It has two main branches: operationalsemantics, which describes programs as some kind of machine, and denotationalsemantics, which describes programs as well-known mathematical structures.
Operational Semantics
Operational semantics is probably the representation of programming languages
that is closest to the intuitions programmers have about them. It describes
programs as sequences of instructions to be executed by a kind of machine.
This is indeed very close to what happens inside a computer, though the set of
instructions used in operational semantics is meant to abstract away some of
the complexity.
There are different forms of operational semantics, but they all reflect theidea described above. Maybe the most widespread one relies on labelled transition systems (or LTSs), which are basically graphs whose vertices are the set of
all possible program states and whose edges correspond to execution steps of aprogram that starts in a certain state and ends in another one. Giving reduction
rules for formal languages (such as the λ-calculus [11] or the π-calculus [85])is exactly defining an LTS whose vertices are the terms of the language andedges are possible reductions. For example, here is a very simple LTS for the
λ-calculus:M’(λx.M )N → M [N /x]

M → M′
M N → M ′N

N → N′.
MN → MN′

Some LTSs are based on abstract machines [63]. As the name indicates, they
are in some sense even closer to the idea of a machine executing a sequence of
instructions, usually executing a program or term within a context called a stack,and both the term and the stack may be modified by the various instructions
the machine executes. For example, the machine may stack the arguments of an
application and then unstack them when they are used, which is exactly what
this machine for the λ-calculus does:
M N ⋆ π → M ⋆ N ∶∶ π

(λx.M ) ⋆ N ∶∶ π → M [N /x] ⋆ π.

Here, π is the stack (a sequence of λ-terms), the first rule says that the machine
stacks the argument when it encounters an application, and the second rule8

says that the machine pops an argument and performs the substitution when it
encounters an abstraction.
Denotational Semantics
While the interpretation of a program is typically close to its syntax in operational semantics, denotational semantics represents programs as well-known
mathematical structures. The idea is to interpret a type A as a space JAK ofsome kind (for example, topological spaces) and functions of type A → B asmorphisms from JAK to JBK (in the case of topological spaces, morphisms would
be continuous functions).
One such semantics is given by Scott domains [93]. Basically, a Scott domain
is an ordered set that represents “information” about objects of a certain type:x < y means that y holds more information about what it is describing than x.
For example, the Scott domain for integers has a bottom element (no information
about the integer is known) and an element for each integer (greater than thebottom element, but incomparable to one another) that represents the fact that
we know the value of the integer:
0

1

2

3

...

.
A morphism between two Scott domains is basically a monotone function. In
terms of programs, this means that, the more information a program has about
its input, the more information it may produce about its output. For example,
the denotation (interpretation) of a program that computes the predecessor but
does not terminate on 0 would be the function that maps  and 0 to , andn > 0 to n − 1.
A dentoational semantics should respect several properties in order to beconsidered “good”. Let us assume that we are given a relation on terms that expresses whether two terms have the same behaviour (for example, whether they
return the same result given the same arguments). The first and most obvious
property that a dentoational semantics should verify is soundness, i.e., that two
programs that have different behaviours must have different denotations. Thereis not much that can be said about a semantics that does not even verify thisproperty. The second one is completeness, i.e., that two programs that have thesame behaviour must have equal denotations. When both properties above hold,we say that the model is fully abstract. This is an interesting property because
studying equality in the model is enough to deduce behavioural equivalence ofterms. Another important property is whether the (compact) definability result
holds in the model, which means that each (compact) element of the modelis the interpretation of a term (we also say that the model is denotationallycomplete).
Finally, a crucial property of denotational semantics is compositionality, i.e.,that the denotation of a program can be deduced from those of its sub-programs.
For example, for the λ-calculus, we would want to be able to compute JM N K
from JM K and JN K. If we see M as a function of type A → B whose argument
is an N of type A, we want to define JM N K = JM K (JN K), which is indeed
9compositional. (The actual definition is slightly more involved because we want
to interpret typing derivations rather than terms.)

1.1.2

Semantics Today

Today, there is a whole array of models of programming languages, and someof them may be seen both as denotational and operational. A prime example
is game semantics: it may be seen as a denotational semantics because it interprets programs as strategies on a general notion of game, but strategies actually
encode the interaction between the program and its environment, making themodel very dynamic, and in many cases (finite) strategies are in bijection withnormal forms, making the model very close to syntax, which are some reasons
why it is also close to operational semantics.
Nowadays, the meanings of denotational and operational semantics haveshifted from their original definitions to take a broader sense. For example,
some people do not consider models to be denotational unless they are fully
abstract (more precisely, unless they are complete, because models that are noteven sound can hardly be called models), but most people consider them to be
denotational to some degree. Some models are definitely considered denotational(such as Scott domains) and others definitely not (such as LTSs). Between these
two extremes, there is a continuum of models that may be considered more orless denotational, based mainly on two criteria. The first criterion is “howmathematical” the structures used to interpret types and programs are: morecommon ones (say, topological spaces or vector spaces) will give models thatare considered more denotational than models based on less common structures,
and ad hoc structures (such as LTSs or categories derived from the language’s
syntax) are not denotational at all. The second criterion is whether the model
enjoys “good” features (such as full abstraction) or not: those that do tend to beconsidered more denotational than those that do not. In both respects, gamesemantics lies at an intermediate point: strategies are not as common as vector
spaces or topological spaces, but they are not ad hoc structures either, and while
the model is not fully abstract, it is compositional and syntax-independent, andan extensional quotient gives a fully-abstract model.
Similarly, the notion of operational model has also evolved over time. A
model used to be considered operational when it was derived from the syntax
of a language, such as LTSs. Today, there is another dimension to operationalmodels: a model is considered operational if it is dynamic, i.e., the execution of
the program can be recovered from its interpretation.
Maybe the distinction between operational and denotational models has become too coarse nowadays, and should be refined into different axes on which
each model may be placed: models based on mathematical structures (topological spaces) versus syntactic models (LTSs), static models (functions) versus
dynamic models (strategies), or intensional models (equality is based on reduction) versus extensional models (equality is based on observation), etc.

1.2Game Semantics

We have discussed both operational and denotational semantics (while trying
to stay at a rather informal level) and have claimed that game semantics may
10

be seen as both. We here discuss game semantics, which will be at the heart ofthis work, in a bit more detail.

1.2.1

The Birth of Game Semantics

Game semantics was first born in the realm of logic, in the form of dialogicallogic [75]. Dialogical logic expresses proofs of a formula as two entities debating
whether a formula is true or not: Proponent, who tries to prove that the formula
is true, and Opponent, who tries to prove that it is false. This formal game is thedescription of a dialogue between two (rational) individuals would have whendebating whether a mathematical proposition holds or not: they both defend
their case until one of them is convinced they were wrong. A formula is true
when Proponent has a winning strategy in a certain game played on the formula,which amounts to always managing to convince Opponent that the formula istrue, no matter the objections that are raised.
It was then introduced into the world of programming languages under thename game semantics by a long series of authors, notably Berry and Curien [13](under the name of sequential algorithms), who were the first to use the ideaof interaction in semantics and gave a sequential, denotational semantics of ahigher-order language, Blass [14, 15], who exhibited links between game semantics and linear logic [41], Joyal [58], who was the first to build a category ofgames and strategies, Coquand [23]; who linked game semantics to the dynamics
of cut elimination (and thus to evaluation of programs), Abramsky, Jagadeesan,and Malacaria [6], and Hyland and Ong [56] and Nickau [87], who built the mostwell-known frameworks for game semantics today: AJM and HON games.
The most basic idea comes straight from dialogical logic: types are interpreted as formal games (formulas) and programs as the interactions they may
have with the environment (proofs of the formulas). In slightly more detail,types are interpreted as games (sometimes called arenas) on which notions ofplays are built. Plays represent all the possible interactions an element of agiven type may have with its environment. Programs of a certain type are theninterpreted as strategies in that game, i.e., sets of plays satisfying some constraints. These plays are the interactions the programs may actually have withthe environment: if σ is the interpretation of a program P , then a play p belongs
to σ if and only if P may interact with its environment according to p. Here,however, strategies are only used to compute values, and there are no “winning”
strategies.
For example, the plays for natural numbers could be sequences of the form(q N)∗ , where q is a move in the game representing the environment asking (qstands for “question”) for the value of the number, and N is any natural number,which represents the program answering the value of the number. The strategy
corresponding to a counter that increases by 1 each time it is called would consistof all plays of the form q 1 q 2 . . . q n. For functions of type int → int, the set ofplays could be of the form (qr (ql Nl )∗ Nr )∗ , where qr is a move that represents
the environment asking the function for the result (r stands for “right”, as in theright-hand side of int → int) of its computation, Nr represents the function
returning the value of its result to the environment, ql represents the function
asking for the value of its argument (l stands for “left”), and Nl represents theenvironment giving the function the value of its argument. Such a sequence11

corresponds to the environment asking the function for the value of its result
a certain number of times, and each time the function asks for the value of its
argument a certain number of times before returning its result. For example,
the strategy associated to the successor function would be the set of plays ofthe form qr ql n1l (n1 + 1)r . . . qr ql nkl (nk + 1)r . The exact structure of plays
depends on the type of game semantics that we are considering, but this gives
a good idea of what plays and strategies look like.
Two other ideas are also present in most game models today. The first one
is innocence, which is that pure programs (those programs that only use purely
functional features) are interpreted as innocent strategies. The behaviour ofthese strategies is based on limited information about what has happened in theplay until now. This information basically encodes the part of the interaction
between the program and its environment that has led to the current situation.
In particular, a function may only rely on the current function call. For example,
the strategy for the counter program above is not innocent because it needs toknow what it answered last time, and that the only part an innocent strategy
would be allowed to rely on is qr (and the counter is indeed impure). On theother hand, the strategy associated to the successor function is innocent because
its answer (nk + 1)r only depends on nkl , and nothing else.
Finally, an important aspect of game semantics is how strategies are composed. Indeed, game models are compositional, and there is in particular a notion of composition of strategies that corresponds to composition of programs.
It is defined in two steps called parallel composition and hiding. Parallel composition lets both strategies interact. To define it, we need to define a notionof “plays” on three games: assume that σ is a strategy on the games A and B
and τ a strategy on the games B and C, then we want the parallel compositeσ∥τ to be a strategy on the games A, B, and C. The parallel composite thenaccepts a play on (A, B, C) if and only if its projection to (A, B) is acceptedby σ and its projection to (B, C) is accepted by τ . The idea is that σ and τ
communicate on the B game. The second step, hiding, consists in erasing the
B game to make the composite a strategy only on the games A and C.
As we have already mentioned, game models may be considered denotational
because they interpret programs as strategies, which are subsets of general structures. On the other hand, they are operational because strategies are often in
bijection with normal forms, and the interpretation of a program is exactly theinteractions it may have with the environment, which makes these models close
to the dynamics execution.

1.2.2

The Rich World of Game Models

Today, there are many game semantical models based on various ideas thatmake the game semantical landscape very diverse. What is probably considered
the first game semantical model was built by Blass [14, 15]. In this setting, agame is described as the tree of its positions, and plays are branches of thattree. In the case of functions of type A → B, plays may be seen as a branch in
A and a branch in B. A strategy is basically a choice of move to play at eachnode. Composition of strategies is defined by playing on three trees at the sametime (then hiding what happens on the middle tree). However, composition is
not associative (because of a technical problem with polarity of moves).

12

The first game semantical models that have become popular and whose variants are still used today are AJM games [6] and HON games [56], which wereboth invented in the 1990s. AJM games define games as sets of moves together
with a condition that tells when a sequence of moves is a valid play. HON games
define games as a structured set of moves and plays as structured sequences (theexact structure is beyond the point here). Both models then define strategies asprefix-closed sets of plays and composition of strategies as parallel composition
plus hiding, where both operations are defined in similar ways in both models.
Today, there are many variants of HON and AJM games, invented for different purposes. First of all, a number of variations on these games (that impose
further conditions on sequences to be valid plays) are described in Harmer’s
PhD thesis [46]. Some variations are not covered by the reference above, forexample [52], in which polarity is reversed. Other variations enrich games withmore structure, such as “copycat links” [70], group actions [79, 7, 86], or “coherence” [68]. There are also other models based on the same ideas, but where
games can be plugged into other games, such as polymorphic games [53], variable games [4], open games [22], or context games [71]. There are other variants
that are neither really HON nor AJM, but use the very same ideas, such as thesequoidal category built in [66]. Some models define games as trees (somewhat
like Blass games) and strategies as morphisms of games [54, 47].
Furthermore, there are many concurrent game models. This is not surprisingin the sense that a fundamental point of concurrency is the interaction between
agents, and interaction is precisely at the heart of game semantics. These models
may be based on HON games [67, 69, 40, 97] or more exotic structures. One such
structure is event structures [88], which are more focused on conflict between
events than the game models above (thus possibly more suited for concurrency)
and which have given many successful game models [92, 20, 21]. Basically, theydescribe positions as sets of compatible events, moves as adding an event to a
position, and strategies as morphisms of games. Melliès has done significant
work to give efficient proofs in particular game models with his asynchronousgames [80, 82, 81, 84], which are also based on event structures.
Another exotic structure is playgrounds [50, 29, 30], which spawned theapproach used in this thesis. To simplify, they are double categories (basically categories with horizontal and vertical morphisms, and composition is only
defined on both classes of morphisms) whose objects are positions of a game,horizontal morphisms are inclusions of positions, and vertical morphisms areplays. They must satisfy a number of properties for this to make sense as agame. From a playground, there is an abstract definition of a category E(X)of plays starting from the position X. Strategies are then defined as presheaves
over E(X), the idea being that this definition is a generalisation of the traditional notion of prefix-closed sets of plays. The problem is that, to this day, it
is still unknown how to compose strategies as parallel composition plus hiding.
All known examples of playgrounds are part of a more general framework whereplays are defined as string diagrams (which are basically formalisations of intuitive drawings used in game semantics). In this framework, moves are defined
as basic string diagrams, and plays are defined as pastings of moves. Most of
the work described in this thesis is done in this string diagrammatic framework.
There have been very few attempts to understand the world of game models
globally. There are however a few notable exceptions. In [18], Bowler defines13

a general construction of game models and composition of strategies. However,
he seems to be more interested in mathematical games than the ones that arise
as models of programming languages. In particular, the examples he treats
are those of simple games and Conway games, and he does not consider the
problem of defining innocent strategies. Finally, in [48], the authors define ageneral framework of game models in a very close spirit to Chapter 6 of thisthesis and composition of strategies abstractly, but the frameworks differs withours on a number of fundamental points: first, the notion of morphism used
there can only model prefix ordering, and second, they do not treat the case of
innocent strategies.

1.3

Motivation and Contributions

The main motivation for this work was to understand the landscape of gamemodels better. More precisely, there are many game models, some of themare very similar while others are based on completely different ideas, but there
is very little literature that provides insight about the links between all thesedifferent games. Our goal was to provide insight about game models, mainly
through abstraction: we have tried to find properties that are verified in different
game models and abstract them away to create classes of models that verify theseproperties, and to prove properties for all models of that class. A characteristicfeature of our approach, other than abstraction, is our extensive use of advanced
categorical tools, which makes constructions and proofs more streamlined andefficient. In this matter, we have benefited from previous work in the same
spirit, namely the recent recasting of strategies as presheaves, and of innocence
as a sheaf condition, enabled by Melliès’s notion of morphisms between plays.
A key tool that we introduce for the first time in game semantics is the theoryof exact squares [45], which proves very efficient in Chapters 5 and 6.
Main Contributions
We here give the main results of each of the contributions that will be discussed
in this thesis. Each contribution is given a longer section dedicated to detailingits results and the methods developed to prove them just below.
Fibred Models Our first contribution follows the pattern of abstraction explained above and is discussed in Chapter 4. All known instances of string
diagrammatic models (one for CCS [50], one for the π-calculus [29], one for
HON games, which we study in Chapter 5, and an unpublished one for the joincalculus [36]) follow the same construction: they first define positions as somekind of graphs, then moves as higher-dimensional arrows, and finally plays ascomposites of moves. We call such positions and plays string diagrams, because
they formalise the drawings physicists call so. A crucial property to be able
to define a category of plays starting from a fixed position is fibredness, whichbasically states that plays can be canonically restricted to sub-positions. We
first give an abstract way to build string diagrammatic models from an operational description of a language that generalises previous constructions. We
then give a necessary and sufficient criterion for the fibredness property to hold,14

and another sufficient criterion that is easier to prove. This contribution is basedon [25].
A Bridge Between Models Our second main contribution is a connection
between two variations on HON games, as discussed in Chapter 5. The first
one [97] is based on the standard notion of justified sequence, while the second
one follows the string diagrammatic approach developed in our previous contribution. There is an obvious, yet informal link between both models in the sensethat they both define innocent strategies as sheaves for a Grothendieck topology induced by embedding views into plays. We show that this relationshipcan actually be tightened: they are equivalent in the sense that they yield equivalent categories of innocent strategies. We first try to give a slightly informal
argument, based on derivation trees in an ad hoc sequent calculus describing
HON games, and then give a direct, formal proof, without using derivation
trees. This contribution is based on [26] (which explains the argument using
derivation trees) and its extended version [25] (which gives the direct proof).
A Core of Game Models Our last main contribution, which we discuss in
Chapter 6, is the development of a general framework to study game models.
The idea is to try to boil down game models to a few basic properties about
their plays, and to derive the main constructions of game models from thesebasic properties. Starting from a structure that represents plays, we show how
to define a notion of concurrent strategy and how to compose them by parallel
composition plus hiding. We show that, under some mild conditions, composition of strategies is associative and unital. Under further assumptions, we show
how to define a category of innocent concurrent strategies. We also show that
this framework encompasses many existing game models. This contribution isbased on [28].
Contributions Not Discussed in This Thesis
Let us finally mention a few contributions that will either not be detailed in thisthesis or only used as examples.
String Diagrams for Concurrent Traces and Unfolding The first suchcontribution is Chapter 3, which is based on [24], and which we use as an
introduction to string diagrams, which are extensively used in Chapters 4 and 5.
We show how they can be used to model concurrent traces in a simple way, givea few examples this construction applies to, and illustrate it on the example ofPetri nets.
A Game Model of the π-calculus In [29] and its extended version [30], webuild a model for the π-calculus that is intensionally fully abstract for fair testing equivalence (intensional full abstraction is simply denotational completeness,with the idea that an extensional collapse of the model gives a fully-abstract
model, which is necessary in some cases as some abstract models have no recursively enumerable presentation [74]). We first define a notion of play basedon string diagrams for the π-calculus (this is actually the example we use in
Chapter 4) and show how to interpret terms as strategies. To show that this15

interpretation is intensionally fully abstract, we appeal to the theory of playgrounds, from which we abstractly derive an LTS for our notion of strategy andrelate it to that of the π-calculus. Many ideas present in Chapter 4 come fromthis paper, in particular the use of factorisation systems to prove fibredness.
Interpreting Terms as Strategies Abstractly In [27], we study the interpretation of terms into strategies in game models from an abstract pointof view. The idea is to define a broad notion of paraterm into which views,
plays, and terms can all be embedded. We can then abstractly define the interpretation of terms as innocent strategies as a singular functor, which abstracts
some previous interpretations. We then recover a fundamental result of gamesemantics, known as definability (which states that all finite innocent strategies
are isomorphic to the image of a value), under the form of geometric realisation.

1.3.1

Fibred Models

In Chapter 4, we show how to create string diagrammatic models and showthat they are fibred under some conditions. We start from a base category C
describing the operational semantics of a language. This base category comeswith a notion of dimension. Objects of lower dimensions are called players
and channels and describe positions of the game, which are basically graphsof players and channels. Players are the agents of the game and channels are
the means by which they can communicate. For example, in the π-calculus, aposition simply represents the topology of communication between agents, as
in:
c
x

y,

a

which represents a position with two players x and y who can communicate
through the channel a, and x knows a private channel c. Objects of higher
dimension describe the dynamics of the game. For example, in the π-calculus,
a synchronisation where x sends c on a and y receives it is drawn as on the left
below.
c
x′

y′

a

c
x′

x

a

y′

x′

y

x

c

a

y′

y
c

x

16

a

y

Here, the initial position of the synchronisation is drawn at the bottom, the final
position at the top, and we can see that, in the final position, the avatar y ′ of yknows the channel c that x has sent them. For the π-calculus, synchronisation
corresponds to an object of higher dimension in the category C. Each object ofhigher dimension of C is assigned such a drawing, which we call a move. We
further call the assignment of all these moves a signature. A play is a composite(pasting) of such moves. Formally, positions are presheaves over the first two
dimensions of C (this is formal because the drawings represent the categories of
elements of the objects of C). Moves are cospans Y → M ← X of presheaves
over C, where X is the initial position, Y is the final position, and M represents
the move. For example, the cospan corresponding to the synchronisation in the
π-calculus is drawn next to it, with X at the bottom, Y at the top, M in the
middle, and the morphisms are inclusions.
From any signature S, we build a pseudo double category DS , which, tosimplify, is a gadget that has a set of objects (here, positions), and for all
objects X and Y , a set of horizontal morphisms X → Y (here, inclusions of X
X (here, plays starting from X
into Y ) and a set of vertical morphisms Y
and ending in Y ). It also has, for all perimeters as below, a set of cells α (which
here represents the fact that u embeds into u′ in a certain sense).
Y
u●

X

k
α

h

Y′
●u′

X′

We then want to define a category E(X) of plays over a fixed position X whosemorphisms u → u′ would represent the fact that u′ is an extension of u (E(X)
depends on the signature S, but we leave the dependence implicit for readability). The natural definition of morphism from u∶ Y
X to u′ ∶ Y ′X is thus
a tuple of a vertical morphism w∶ Z → Y , a horizontal morphism h∶ Z → Y ′ , anda cell α as in:
Z

h

Y′

w●

Y

α

●u′

u●

X

X.

To be able to define a category, we need to be able to compose such morphisms,
i.e., to canonically find a dashed part to the solid part of:
Z ′′

Z′
β

●

Z

h

Y′
α′

α

Y ′′

●w′

w●

Y

h′

●u′′

●u′

u●

X

X
17

X,

so we need to be able to canonically restrict a play w′ to a smaller position Z.
X and morphisms
This is the property we call fibredness: for all plays u∶ Y
X ′ → X, there must exist a play u′ ∶ Y ′X ′ and a cell α as below such that,for all diagrams as the solid part of
Y ′′
k′
u′′ ●

k

′′

α′′

X ′′

Y′
α′

Y

k

●u

α

u′ ●
h′′

h′

X′

X,

h

there is a dashed arrow and corresponding cell (this basically means that u′ isreally a restriction of u along h and is necessary for composition in E(X) to bewell defined).
To prove it, we appeal to factorisation systems [17]. This algebraic tool
allows to factor all morphisms of a category as r ○ l, where l and r belong to
fixed classes L and R that are orthogonal, which means that they have a certain
lifting property. We build a factorisation system whose class L is generated
by the legs X → M for all cospans Y → M ← X in the signature (i.e., for all
X is a cospan of presheaves Y → U ← X,
moves). Remember that a play u∶ Y
so we are actually faced with a situation like the solid part of the left-handside diagram below, which we complete by factoring l ○ h as h′ ○ l′ (using thefactorisation system) and then taking the pullback of f and h′ .
Y ′′

q ′′
′′

Y′

h′′

f′

f ′′

Y
f

s

Y′

U ′′
s′

U′

h′

l′

X′

U
l

h

l′′

f′

Y
f

q′

U′

h′

U

l′

X ′′

l

q
s

X

h′′

X′

h

X

We then get the desired universal property by building s′ and s′′ in the righthand side diagram: the former comes from the lifting property of our factorisation system and the latter follows by universal property of pullback.
It then remains to show that Y ′ → U ′ ← X ′ is a play, which we prove by
induction, under the hypothesis that it is the case for moves. We then give a
sufficient criterion on C for the restriction to be a play.

1.3.2

A Bridge Between Models

In Chapter 5, we start by building a string diagrammatic approach to HON
games as explained in 1.3.1 and then exhibit links between this model and another one (based on the standard notion of justified sequence) both at the level18

of plays and at the level of strategies. We start from a sequent calculus that describes arena games, strongly reminiscent of a focalised calculus for intuitionistic
logic. From this sequent calculus, we derive a signature SHON that describes
HON games. Here, channels are games on which two players play. We draw
channels as edges and players as nodes, and the positions typically look like
A

x

y

B

,

C

where, in this particular position, x plays as Proponent on B and Opponent on
A, and y as Proponent on C and Opponent on B. The dangling arrows representinteraction with the environment. This could typically model the compositionof a function of type A → B, modelled by x, and one of type B → C, modelled
by y. Players that have only incoming edges are morally the program fragmentsthat are currently computing something, while the ones with an outgoing edge
are waiting for another program fragment to call them (on that outgoing edge).
The dynamics of this game is derived from cut elimination in our sequentcalculus, and drawn as:
Γ1

∆1

x′

A⋅m

y′

⋰

⋱
@

Λ

⋰

β

x

y

A

Γn

⋱

∆m .

Maybe the simplest way to understand this interaction is from a computational
point of view. In the initial position (at the bottom of the drawing), x is afunction Γ1 → . . . → Γn → A that produces results of type A with access toresources of type Γ1 , . . . , Γn , while y is a program fragment that is currently
computing and has access to resources of type ∆1 , . . . , ∆m , and A producedby x. The interaction represents y asking x for its return value. In the final
position (at the top of the drawing), the polarities of both players have changed,
since x′ (the avatar of x after they are called) is now computing and y ′ is waiting
for x′ to call it back with its return value (which is why x′ has “access” to y ′ :this is just a continuation). Notice that y ′ still has access to x, in cases it needs
to ask it to compute another value later during its execution.
We then derive a pseudo double category DHON whose objects are positions,horizontal morphisms are inclusions of positions, vertical morphisms are plays,etc, as in 1.3.1. We then show that our signature SHON verifies the conditions
for DHON to be fibred, from which we derive a category of plays E(X) above
any position X. In particular, we get categories E(A ⊢ B) above all positionsof the form
A

x

B

.

We also derive subcategories EV (A ⊢ B) that consist only of views, which areparticular plays, defined in a slightly ad hoc way. Strategies are then standardly
defined as presheaves over E(A ⊢ B), and innocent strategies as those presheaves⋀⋀

that are in the image of ∏i ∶ EV (A ⊢ B) → E(A ⊢ B), where i is the embedding19

⋀of EV (A ⊢ B) into E(A ⊢ B), C denotes the category of presheaves over C, and∏ denotes right Kan extension.
There are standard categories corresponding to these in the variant of HON
games based on justified sequences: the category PA,B of plays on the pair ofarenas (A, B), and the category VA,B of views. Similarly, strategies are definedas presheaves over PA,B , and innocent strategies as the presheaves in the imageof ∏iHON (where iHON is the embedding of VA,B into PA,B ).
Most of the chapter is spent on building a commuting square as below left,
where F is a full embedding and F V is an equivalence of categories.
VA,B

iTO

⋀

∆F V

F

FV
V

E (A ⊢ B)

i

∏iTO

VA,B

PA,B
E(A ⊢ B)

PA,B
∆F

⋀

⋀

EV (A ⊢ B)

⋀

⋀

∏i

E(A ⊢ B)⋀In particular, we have that EV (A ⊢ B) and VA,B are equivalent through therestriction functor ∆F V . But there is more: the fact that F V is an equivalenceand F is fully faithful implies that the square is exact [45], which means that thesquare above right commutes up to isomorphism. This means that the categories
of innocent strategies are equivalent in both variants of the model, and that
this equivalence is compatible with the saturation functors ∏i and ∏iHON . The
differences between both variants is thus mostly a matter of presentation.
The hard part of the chapter is to define the functors F and F V above. The
latter is simply defined by restriction of the former to views, so the most difficult
part is to define F . We do this in two ways: we first give a slightly informal
argument, and then give a formal proof.
The first way uses derivation trees in an ad hoc sequent calculus. We definea category T(A ⊢ B) whose objects are trees of conclusion (A ⊢ B) and whosemorphisms are inclusions of such trees, and a subcategory B(A ⊢ B) of branchesof conclusion (A ⊢ B). We decompose the desired square into
VA,B

B(A ⊢ B)EV (A ⊢ B)

T(A ⊢ B)E(A ⊢ B)

iTO

PA,B

i

by first showing that T(A ⊢ B) is equivalent to E(A ⊢ B), that this equivalence
restricts to an equivalence between B(A ⊢ B) and EV (A ⊢ B), and then bybuilding a full embedding from PA,B to T(A ⊢ B) and showing that it restricts
to an equivalence between VA,B and B(A ⊢ B). This is however not entirely
satisfactory in the sense that trees are not handled very formally, and a formal
definition of T(A ⊢ B) would make the problem as difficult to solve as without
using T(A ⊢ B).
We thus then give a formal construction of F and F V without using T(A ⊢B). The proofs are much more ad hoc than in the rest of this thesis, which is
not very surprising in the sense that we are trying to link models that are built
using very different methods.

20

1.3.3

A Core of Game Models

In Chapter 6, we want to build different categories of strategies from a basic
description of a game model. We start from some data P that describes a gamemodel. For all games A, P gives a category PA of plays on the game A. It also
gives, for all games A and B, a category PA,B of plays on the pair (A, B), andsimilarly for triples and quadruples of games. It also gives insertion functors,
for example ι0 ∶ PA,B → PA,A,B that typically duplicates what happens on theleft-hand side game, and deletion functors, for example δ1 ∶ PA,B,C → PA,C thattypically erases what happens on the middle game.
We abstractly derive a notion of strategy from P: a strategy on the pairof games (A, B) is a presheaf over PA,B (we only study strategies on a pair ofgames because we want to show that they form a category, but we could definestrategies on a single game similarly). The idea is that a strategy σ accepts aplay p if σ(p) ≠ ∅ (more precisely, σ(p) is the set of states the strategy can bein after playing p). To show that games and strategies form a category, we thendefine a composition as parallel composition plus hiding and identities for thiscomposition, known as copycat strategies.
The parallel composition σ∥τ of two strategies σ on (A, B) and τ on (B, C)
accepts to play an interaction sequence (a play on three games) u if and only
if σ accepts to play the projection δ2 (u) of u to (A, B) and τ accepts to playits projection δ0 (u) to (B, C). The hiding of a strategy σ on PA,B,C accepts toplay p if and only if there is an interaction sequence u that projects to p that σ
accepts to play, i.e., it accept the same plays as σ, except we hide what happens
on B. Finally, the copycat strategy on the game A is a strategy on PA,A that“copies” all the moves Opponent plays.
In our framework, both composition and copycats are defined as polynomial
functors. Given a functor F ∶ C → D, the restriction functor ∆F ∶ D → C is given
by pre-composition by F op . It admits left and right adjoints ∑F ∶ C → D and∏F ∶ C → D, called left and right Kan extension, respectively. The intuition
behind ∑F is that the presheaf ∑F (X) is non-empty over an element d if there
exists an antecedent c of d such that X is non-empty over c. For ∏F , theintuition is that X must be non-empty over all antecedents of d. These functors
can thus be seen as ∃ and ∀ functors. A functor from C to D is polynomial if it
is a composite of any number of restrictions and left and right Kan extensions.
Composition must be a functor from PA,B × PB,C to PA,C . This is the samething as a functor from PA,B + PB,C to PA,C . We define it as the composite
⋀

⋀

⋀

⋀

⋀

⋀

⋀

⋀

⋀

∆δ2 +δ0

⋀

⋀

⋀

⋀

⋀

⋀

∏∇

⋀

∑δ1

⋀

PA,B + PB,C ÐÐÐÐ→ PA,B,C + PA,B,C ÐÐ→ PA,B,C ÐÐ→ PA,C ,where ∇ is the codiagonal functor. This is indeed a polynomial definition, andthe idea behind it is exactly that of parallel composition plus hiding, which
we can see by computing this functor, using the description of Kan extensions
given above. The composite of the first two functors is parallel composition: if
it maps the copairing [σ, τ ] to θ, then computation shows that θ accepts to playthe interaction sequence u if and only if, for all antecedents u′ of u (that is inl u
and inr u), [σ, τ ] accepts to play (δ2 + δ0 )(u′ ), i.e., σ accepts to play δ2 (u) andτ accepts to play δ0 (u). The last functor ∑δ1 is hiding: if it maps σ to τ , thenτ accepts to play p if and only if there exists an interaction sequence u thatprojects to p and is accepted by σ.
21

Copycat strategies are also defined as polynomial functors. The copycat
strategy on A may be defined as a functor from 1 to PA,A . Since 1 ≅ ∅, we candefine it as:
⋀

⋀

∑ι0

⋀

⋀

∅ Ð→ PA ÐÐ→ PA,A .

⋀∏!

The idea is that ∏! is the terminal presheaf on PA , so it accepts all plays in PA ,and ∑ι0 (σ) accepts a play p if and only if p is of the form ι0 (p′ ) and σ accepts
p′ . Since ι0 typically corresponds to copying what happens on A to the othercopy of A, the whole composite indeed corresponds to the copycat strategy on
A: it accepts to play p if and only if Proponent copies everything Opponent
does.
We then set out to show that games and strategies form a category whose
composition and identities we have just defined. This means that composition
must be associative and that the copycat strategies should be its units. We provethat, under some conditions, composition is associative and copycat strategies
are units. The main condition is inspired by the method that is usually used ingame models to show that composition of strategies is associative: the zipping
lemma, which states that, in some cases, given two interaction sequences thatproject to the same play, there is a unique way to build a generalised interaction sequence (a play on four games) that projects to the original interaction
sequences.
All this work is done using our notion of concurrent strategy, and we wantto get the same results for “traditional” strategies, which we see as functors
Pop
A,B → 2, where 2 is the ordinal 0 → 1 seen as a category. We derive fromthe fact that games and concurrent strategies form a category that games andtraditional strategies also do. We also investigate a number of game models andshow that they fit in this framework, and that composition of strategies in thesegame models corresponds to composition of strategies as defined abstractly in
our framework.
Finally, we tackle the question of innocence. We assume that we are given aiA,Bfull subcategory VA,B ÐÐ→ PA,B of views to each category PA,B . We then define
⋀

∏iA,B

innocent strategies as those presheaves that are in the image of VA,B ÐÐÐ→PA,B . The idea of this definition is that a presheaf ∏iA,B (σ) accepts to play p if
and only if, for all morphisms v → p from a view v to p, σ accepts to play v. For
this definition to be the right one, PA,B should contains enough morphisms (inthe case of HON games, the notion of morphism is that given by Melliès [80],reused by Levy [73] and Tsukada and Ong [96]). Such a presheaf thus accepts
to play p if and only if it accepts to play all its views, which is the idea of
innocence. We then set out to show that games and innocent strategies form asubcategory of games and strategies. By adding some properties on the model,
we show that this indeed holds.
It may be interesting to see how we prove this kind of results. For example,
let us take preservation of innocence, which states that the composite of two
innocent strategies is again innocent. We prove this by studying the diagram
below. (The reader does not need to understand this diagram.)⋀

22

VA,B + VB,C∏

VA,B + VB,C

PA,B + PB,C

V(A,B),(B,C)

∆

∏
∏

∏

VA,B,C∑∏

P(A,B),(B,C)

∆

VA,C
∏

PA,B,C∑

PA,C

Notice that it does not make sense to ask whether this diagram commutes, since
there is no starting or ending point in it. However, when it is lifted to categories
of presheaves (where the ∆, ∑, and ∏ labels show how to lift functors), all ∆arrows are reversed, and the diagram turns into a diagram for which it makes
sense to ask whether it commutes or not. When we lift this diagram to presheaf
categories, the bottom row corresponds to taking two innocent strategies andcomposing them, so if the diagram (lifted to presheaf categories) commutes, thenthe composite of any strategies is in the image of ∏iA,C , and is thus innocent.
In the lifted diagram, the left-hand square commutes because the underlying
one does, and the middle square commutes because the underlying one is exact.
We thus only have to check that the right-hand one commutes, which is moredifficult. Basically all the proofs in this chapter follow a common pattern. We
study the underlying diagram and• for all squares that are made exclusively of ∆ (resp. ∏, resp. ∑), we showthat the square commutes,• for all squares that are of the form
A

∏

∆

B

A

∆

C

∑

∆

D

∆

C

∏

B
D

∑

we show that the square is exact, which entails that the lifted squarecommutes up to isomorphism,• for squares of the form
∑

A
∏

B
∏

C

D
∑

we have to rely on more complex proofs.

23

Chapter 2

Preliminaries
In this chapter, we give a list of results from the state of the art that will be
used in this dissertation. In this thesis, each section will be prefaced by a listof the preliminary sections that the reader should have read to understand thecurrent section.

2.1

Game Semantics

We will be mostly interested in a particular version of game semantics, called
arena games. The idea, in all these models, is to interpret types as arenas andprograms as strategies on arenas of the right type. The definitions of thesegame models mostly follow the same pattern: they first define their notion ofarena, which usually describe all the possible ways a program of a given typemay perform a single reduction step, then plays, which describe a particularinteraction between a program and an environment, and finally strategies, whichusually consist of a set of accepted plays.
Being able to compose strategies is an important part of game semantics,
since this is why game semantical models are compositional: the strategy associated to the composite of two functions is the composite of the strategies
associated to those functions. To define composition of strategies, all thesemodels define interaction sequences, which basically represent the interaction of
two plays. Finally, to show that composition of strategies is associative, they
define generalised interaction sequences, which represent the interaction of threeplays.
In Section 2.1.1, we study a game model called HON games. We then study
a few possible variations of HON games, which are obtained by slightly changing
the notion of play, in Section 2.1.2. Finally, we study Tsukada and Ong’s games,
which are another variation of HON games, in which the notion of morphism
is different, in Section 2.1.3. In Section 2.1.4, we study AJM games, which areanother game model. Finally, we study Blass games in Section 2.1.5, which aregames that are well-known for their non-associative composition.
In Chapter 5, we will be interested in Tsukada and Ong’s games, and theirlinks to string diagrammatic models. In Chapter 6, we will be interested in all
the game models we describe in this section.

24

2.1.1Hyland-Ong/Nickau Games
Required: ∅.
Recommended: ∅.

For this model and a few others, the presentation we adopt is inspired by
Harmer’s PhD thesis [46], because it unifies and simplifies many different frameworks.
Definition 2.1.1. An arena is a triple (A, λ, ⊢) where A is a set, λ∶ A →{P, O} × {!, ?} is a function, and ⊢ ⊆ A × A is a relation that verifies:• for all m in A, if there is no n such that n ⊢ m, then λ(m) = (O, ?),• for all n and m in A such that m ⊢ n, λOP (m) ≠ λOP (n), where λOP isdefined as π1 λ,• for all n and m in A such that m ⊢ n, if λ?! (n) = !, then λ?! (m) = ?, whereλ?! is defined as π2 λ.
Terminology 2.1.2. In an arena (A, λ, ⊢), the elements of A are called moves,
λ is called the labelling function, and ⊢ is called the enabling relation. A movem is said to enable a move m′ if m ⊢ m′ . The set of all moves of A will bedenoted by MA , or sometimes simply A.
A move is initial (and is called a√root of A) if there is no move that enables
it. The set of roots of A is denoted A.
A move m is an Opponent move when λOP (m) = O, and a Proponent
move otherwise. A move m is a question when λ?! (m) = ?, and an answer
otherwise. In these terms, the constraints verified by λ state that all roots of A
are Opponent questions, that the enabling relation alternates between Opponent
and Proponent, and that answers are always enabled by questions.
Remark. Most of the settings we will study use exactly the same notion ofarena, and only differ from HON game semantics because they impose different
constraints on plays. AJM games and Blass games use different notions ofarenas. There is also one model based on HON games that uses a different
notion of arena: Tsukada and Ong’s games, in which the enabling relation forms
a forest.
Example 2.1.3. The boolean arena B comprises three moves: q, which is an
Opponent question, and t and f, which are Proponent answers. It may be drawn
as a graph:qtf,where the arrow denotes the enabling relation. This representation may be augmented with annotations for questions and answers to fully represent B, butsince we will not need to be very formal about arenas, except in the case of Tsukada and Ong, who do not use questions and answers, we decide not to write
them for conciseness.
25

To model the interaction between a program fragment and its environment,
game semantics uses sequences of moves in an arena. For example, the following
sequence is an interaction between a program fragment computing a boolean,
and its environment:q t q f.
The first move corresponds to the environment asking for the value of theboolean. The second one corresponds to the program fragment answering thatquestion by telling the environment that the boolean is true. The third andfourth moves play the same roles as the two previous moves, except that the
program fragment answers that the boolean is false. This program fragment
could, for example, be incrementing a reference each time it is called upon andanswer true or false depending on the parity of that reference.
Obviously, some sequences of moves do not make sense. For instance, answering the value of a boolean before the environment even asked for that value
makes little sense. Interactions are therefore represented by justified sequences,which prohibit such patterns by requesting that all moves be “justified” by someprevious move.
Definition 2.1.4. A justified sequence on an arena (A, λ, ⊢) is a triple (n, f, ϕ)
where n is a natural number, f is a map from n to A and ϕ is a map from n to{0} ⊎ n, such that, for all i ∈ n,
• ϕ(i) < i,
• if ϕ(i) = 0, then f (i) ∈√A, and• if ϕ(i) ≠ 0, then f (ϕ(i)) ⊢ f (i).
Justified sequences equipped with prefix ordering form a category PA .
Remark. The notation PA for justified sequences on A is non-standard. Usually, plays on an arena A are defined like what we call plays on a pair of arenas
in this dissertation (see below). We however prefer this definition because:• it allows us to consider projections PA,B → PA and PA,B → PB , which is
impossible with the traditional notion of play on A,• but it does not influence our study of strategies, since we only consider
strategies built on PA,B ’s (see below) and not PA ’s.
Terminology 2.1.5. In a justified sequence (n, f, ϕ), if ϕ(i) = j, we say thatj justifies i, or that j is the justifier of i. The arrow that points from i to j iscalled a justification pointer.
Justified sequences will be drawn as sequences of moves, to be read from left
to right, with arrows pointing from each move to its justifier, as is classic ingame semantics.
Our example above can thus be redrawn with justification pointers as:
q

t

q

f.

Game semantical frameworks then go on to define what a play is. A play
represents a particular type of interaction between a function and an environment. In order to define them, we first need to define arenas for function types,
which we do now.
26

To represent the interaction of a function of type A → B and its environment,
we build an arrow arena A ⊸ B from the arenas A and B.
Definition 2.1.6. The arena A ⊸ B is defined by• MA⊸B = MA + MB ,• λA⊸B = [λA , λB ], where λ is (s × {?, !})λ, where s is the swap function on{O, P },
• and, for all m and m′ in MA⊸B , m ⊢A⊸B m′ if and only if any of thefollowing holds:– m ⊢A m′ or m ⊢B m′ , or√√
– m is in B and m′ is in A.
If we draw arenas as trees, then we may draw A ⊸ B as:
BA
In other words, A ⊸ B comprises the moves from A and those from B, withexactly the same structure, except that initial moves in A are enabled by initial
moves in B and that polarity is reversed in A. An interaction in such an arenais thought of as a player who may play on two games: as Proponent in B andas Opponent in A (this is rendered explicit by the fact that polarity is reversedin A). To easily tell in which part of A ⊸ B a move is played, we draw suchinteractions as a sequence of moves to be read from top to bottom, with the
moves of A played on the left and those of B played on the right, as in:
B

B
qr

ql
tl
fr .
In this interaction, a player plays on two boolean games, one on the left andone on the right. They play as Proponent on the right-hand side game and as
Opponent on the left-hand side one. For simplicity let us call this player M(for “middle”). There are two other players L and R who play Proponent on theleft-hand game and Opponent on the right-hand game, respectively (they may
also be thought of as a single player that represents the whole environment).
The drawing above represents a possible interaction of the not function onbooleans with an environment.
• The first move of the interaction (qr ), which is played by the environment(represented by the player R on the right), corresponds to asking thefunction to compute its result.
27

• In order to compute that result, the function must know the value of its
argument. It thus asks the value of that argument to its environment,
and more precisely to another program fragment that is represented by
the player L on the left, by playing ql .
• After computing the value of that boolean, L answers the value of theboolean: the boolean is true, which is encoded in the fact that L plays tl .
• Since M now knows the value of its argument, it can finally answer what
its result is by playing fr .
This example illustrates why there should be a change of polarity in A: when thefunction asks for the value of its argument, it plays the role of the environment
to the program fragment that computes this argument, thus it should be playing
as Opponent on A.
We may also sometimes write plays on arenas A ⊸ B like other plays, inwhich case we will write ml or mA if the move m is played in the left-hand side
arena and mr or mB if it is played in the right-hand side one.
Now that we have defined arenas for functional types, we may come backto the definition of plays. The exact notion of play differs between frameworks,
but they all amount to imposing constraints on justified sequences. We will use
the following notion of play in this manuscript, as well as numerous variations
on it, which we will describe later.
Definition 2.1.7. A play on the pair of arenas (A, B) is a justified sequence(n, f, ϕ) on A ⊸ B that is:• alternating: for all i < n, λOP (f (i)) ≠ λOP (f (i + 1)),• of even length: n is even.
Prefix ordering between plays is defined in the obvious way: (n, f, ϕ) is a prefixof (m, g, ψ) if and only if n ≤ m and, for all i ≤ n, f (i) = g(i) and ϕ(i) = ψ(i).
Plays on the arena pair (A, B) equipped with prefix ordering form a category
PA,B .
In the other variants of game semantics discussed below, the notion of play
is modified by adding further constraints on them. In the case of Tsukada
and Ong’s model, however, there is a more fundamental difference between the
categories of plays: their categories of plays have more morphisms than those
simply given by prefix ordering.
A program fragment is then interpreted as a set of plays. The intuition isthat a program fragment is interpreted as the set of interactions it can actually
have with an environment. Such a set of plays is called a strategy.
Definition 2.1.8. A strategy on the arena pair (A, B) is a prefix-closed set ofplays on (A, B).
Sometimes, strategies are also asked to be non-empty (i.e., to contain atleast the empty play). A strategy σ is said to accept the play s if s ∈ σ and toreject it otherwise.
Prefix-closedness comes from the fact that, if a program and its environment
may interact, then they can have exactly the same interaction, but cut at somepoint, so if a strategy accepts a play, it should also accept all its prefixes.
28

Example 2.1.9. Let us consider the not function on booleans. It may be interpreted as a strategy on the arena B ⊸ B that accepts all plays s = (2n, f, ϕ)such that, for all i in n:• if f (2i − 1) = qB , then {f (2i) = qA,
ϕ(2i) = 2i − 1• if f (2i − 1) = tA , then {f (2i) = fB
, and similarly if f (2i − 1) =ϕ(2i) = ϕ(2i − 1) − 1

fA .

This illustrates the behaviour of the not function:• whenever the environment asks for the value of not on a boolean (whenthere is a qB move), the strategy asks for its argument (by playing qA ) andremembers which question it is trying to answer, which is represented by
the justification pointer pointing to a qB ,• whenever it receives a value for its argument (either tA or fA ), it answers
the environment’s corresponding qB question with the right value (either
fB or tB ); to know which qB question it should answer, the strategy looks
at which of its qA question was answered (by looking at the justification
pointer of the tA or fA move) and answers the corresponding qB question,
which necessarily comes just before the qA question.
A nice feature of game semantics is that it may interpret different classes offunctions depending on the restraints imposed on strategies. For example, thestrategy in the example above is very constrained, in the sense that Proponent
may not do much: the move it plays only depends on the previous move and its
justification pointer. In other words, its reaction only depends on the current“call to the function”. Technically, this strategy is innocent (this term will bedefined later). Such strategies may only interpret purely functional programs.
Here is an example of strategy that is not innocent:
Example 2.1.10. Let us consider a boolean function that keeps a reference toan integer, increments it each time it is called, and returns either its argument
if the reference is even, or its negation if the reference is odd. This function
is not purely functional, since it modifies the value of a reference. The strategy
associated to such a function could, for example, be the strategy σ that accepts
all plays s = (n, f, ϕ) such that, for all i ∈ n:
• if f (2i − 1) = qB , then {f (2i) = qA,
ϕ(2i) = 2i − 1• if f (2i − 1) = bA and the number of qB moves in s∣2i−1 is odd, thenf (2i) = not bB{, and similarly when the number of qB moves is
ϕ(2i) = ϕ(2i − 1) − 1
even, with f (2i) = bB .
This strategy indeed has the expected behaviour, since it answers either as the
not function or as the identity, depending on how many times it has been called(given by the number of qB moves). Notice how this strategy no longer depends
only on the current call to the function, but also on how many times the function
has been called in total (this means that the strategy is not innocent).
29

We want game semantics to be compositional, i.e., the strategy associatedto the composite of two programs should be the composite of the strategies
associated to those programs. In order for this to be the case, we should give adefinition of how to compose strategies.
To compose two strategies A → B and B → C, the idea is to let them interact
on B and then to hide that interaction, leaving only the parts on A and C.
But we first need to define the projection of a justified sequence s on thearena (. . . (A1 ⊸ A2 ) ⊸ . . .) ⊸ An to the arena (. . . (((. . . (A1 ⊸ A2 ) . . .) ⊸Ai−1 ) ⊸ Ai+1 ) . . .) ⊸ An . It is defined as the justified sequence with the samemoves as s, except for the moves in Ai , and justification pointers inherited fromthose of s: the only case where this does not make sense is when an initial movemi−1 in Ai−1 points to an initial move mi in Ai , but then mi points to an initial
move mi+1 in Ai+1 , so we define mi−1 to point to mi+1 in the projection.
To define such an interaction, we need to study “justified sequences on three
arenas”.
Definition 2.1.11. An interaction sequence on the arena triple (A, B, C) isa justified sequence on (A ⊸ B) ⊸ C such that its projections to A ⊸ B andB ⊸ C are plays and whose last move is either in A or C.
Interaction sequences on the arena triple (A, B, C) equipped with prefix ordering form a category PA,B,C .
Example 2.1.12. Here is an example of an interaction sequence on (B, B, B),
to be read from top to bottom:
B

B

B
qr

qm
ql
tl
fm
tr .
This could for example represent a call to the function not ○ not on the argumentt:• qr corresponds to the function being called,• then qm to the function calling its argument, i.e., calling the not function
once again,• then the second call to not calls its argument by playing ql ,• the value of the argument is t, which is computed directly and sent back tothe second call to not by the move tl ,• now that it knows the value of its argument, the second call to not canreturn the answer f by playing fm ,• finally, the first call to not can now answer by playing tr .
30

It is an interaction sequence because its projections are plays and its last moveis in the right-hand side arena.
We now have all the tools necessary to define composition of strategies:
Definition 2.1.13. The composite σ; τ of two strategies σ on A ⊸ B and τ on
B ⊸ C accepts a play s if and only if there is an interaction sequence u:• whose projection to A ⊸ C is s,• and such that its projection to A ⊸ B is accepted by σ and its projection
to B ⊸ C is accepted by τ .
Let us see how the composite σ; τ may be seen as σ and τ interacting on
B, then hiding what happens on B from the result of that interaction. The
traditional way to define composition is in two steps, as described above. The
first step, in which the two strategies interact, is called parallel composition,and the second one, in which we hide what happens on B, is called hiding. The
parallel composition σ∥τ of σ and τ is a “strategy” on PA,B,C , i.e., a prefix-closed
set of interaction sequences, that accepts an interaction sequence u if and only ifthere are plays s and t accepted by σ and τ respectively and that can “interact”
on B to combine into u. Hiding then just literally hides what happens on B,
slightly reorganising the justification pointers from A to B to make them point
to C (note that this is very simple, since pointers from moves in A to moves
in B necessarily point to initial moves in B, which themselves point to initial
moves in C).
Example 2.1.14. For example, if we call σ the strategy associated to the notfunction, the composite of σ with itself accepts
B

B
qr

ql
tl
tr
because the interaction sequence in Example 2.1.12 is equal to this play when
projected to A ⊸ C (we use A, B, and C here to distinguish between the three
B arenas), and its projections to A ⊸ B and B ⊸ C are accepted by σ. Noticealso how this indeed corresponds to how the composite of the not function withitself may behave: indeed, this composite is simply the identity function, which
does return t when its argument is t.
Now that we know how to compose strategies, the next step is to organise
them into a category. We thus see strategies on A ⊸ B as maps from A to B.
For arenas and strategies to form a category, composition of strategies needs tobe associative and unital.
The classical way to prove that composition of strategies is associative is todefine generalised interaction sequences, which are justified sequences on fourarenas.
31

Definition 2.1.15. A generalised interaction sequence on the tuple (A, B, C, D)
of arenas is a justified sequence on ((A ⊸ B) ⊸ C) ⊸ D whose projections to
A ⊸ B, B ⊸ C, and C ⊸ D are plays, and whose last move is either in A or
D.
Generalised interaction sequences on the tuple of arenas (A, B, C, D) forma category PA,B,C,D when equipped with prefix ordering.
The crucial lemma [9] to prove that composition of strategies is associativeis the following:
Lemma 2.1.16 (Zipping Lemma). The two squares
PA,B,C,D

PA,C,D

PA,B,C,D

PA,B,D

PA,B,C

PA,C

PB,C,DPB,D

are pullbacks on objects.
Once we know that composition of strategies is associative, we also want toknow that it is unital. The units are the copycat strategies, which accept only
copycat plays.
Definition 2.1.17. A play s = (2n, f, ϕ) on (A, A) is copycat if, for all i in n,
f (2i) = f (2i − 1) and ϕ(2i) = ϕ(2i − 1) − 1, where mr = ml and ml = mr .
Copycat plays simply copy whatever the environment does on one copy of
A to the other one.
Example 2.1.18. The play illustrated in Example 2.1.14 is a copycat play.
Definition 2.1.19. The copycat strategy on (A, A) is the strategy that exactly
accepts copycat plays.
We may now form a category of arenas and strategies with:• arenas as objects,• strategies on (A, B) as morphisms from A to B,• composition of strategies as composition,• copycat strategies as identities.
One can then show that this category is symmetric monoidal closed, impose
some more conditions on plays (as we see in the next section) to make it cartesianclosed and interpret λ-calculus into it, but we will not give any details, as thiswill not be relevant to us.
However, the following point will be very relevant to us. A class of strategies
that we will be particularly interested in is the class of innocent strategies. They
are important because they correspond to functional programs that do not use
references (stateless programs).
Basically, a strategy is innocent if it decides to accept plays based not on
the whole history of the interaction it has had with the environment, but only
on restricted parts of it. The intuition is that the parts of the play the strategy
may depend on are the parts which “led” to the current move. Such a part iscalled a view.
32

Definition 2.1.20. For all plays s = (n, f, ϕ), and i in n, the Proponent view(also simply view) of s at index i, denoted by ⌈s⌉i is the sequence defined inductively by:• ⌈s⌉i = f (i) if ϕ(i) = 0,
• ⌈s⌉i = ⌈s⌉ϕ(i) ⋅f (i) if f (i) is an Opponent move (i.e., i is odd) and ϕ(i) ≠ 0,
• ⌈s⌉i = ⌈s⌉i−1 ⋅ f (i) if f (i) is a Proponent move (i.e., i is even).
First of all, if we want to be exact, ⌈s⌉i is not a sequence of moves, but a subsequence of indices of s, equipped with f inherited from s. Furthermore, notethat ⌈s⌉i is not an ordinal, but is included in ω, so it is canonically isomorphic toa single ordinal (which is the definition of view, if we want to be more formal).
Note that, in general, ⌈s⌉i is a mere sequence, and not a justified sequence.
For this sequence to be a justified sequence, the following condition must be
satisfied by the play:
Definition 2.1.21. A play s = (n, f, ϕ) is P -visible if each Proponent move isjustified by a move in its view. In other words, for all even i in n, ϕ(i) ∈ ⌈s⌉i .
Example 2.1.22. Let us consider the play s on the left and t on the right below.
B

B

B

qr

B
qr

ql

ql

tl

tl
fr

fr

qr

qr

ql

ql

fl

fl
tr

tr

Its view ⌈s⌉8 = ⌈s⌉7 ⋅ tr = ⌈s⌉6 ⋅ fl tr = ⌈s⌉5 ⋅ ql fl tr = qr ql fl tr . So tr is justified by qr ,which is in its view. If we repeat this process for all Proponent moves, we getthat s is P -visible. On the other hand, t is not P -visible, because ⌈s⌉8 does notcontain the first occurrence of qr , which is the justifier of tr .
The moves an innocent strategy σ may play after a play s depend only on
the view ⌈s⌉n . Since what an innocent strategy may do only depends on views,
whether it accepts a play or not only depends on its views. We thus want todefine innocent strategies as strategies that accept or reject views rather thanplays.
Definition 2.1.23. A view on the pair of arenas (A, B) is a non-empty plays = (n, f, ϕ) such that ⌈s⌉n = s.
Views equipped with prefix ordering form a category VA,B .
Views are exactly the plays that arise as ⌈s⌉i for some P -visible play s =(n, f, ϕ) and i in n. The following characterisation of views is also sometimes
useful:33

Lemma 2.1.24. A play s = (n, f, ϕ) is a view if and only if n ≠ 0 and all
Opponent moves are justified by their predecessors, or in other words, for all
odd i in n, ϕ(i) = i − 1.
We now define innocent strategies as a set of accepted views. Except that
we do not call these innocent strategies, but behaviours, as we reserve the term
strategy for sets of accepted plays.
Definition 2.1.25. A behaviour on the pair of arenas (A, B) is a prefix-closed
set of views on (A, B).
Just like for plays, we say that a behaviour σ accepts a view v when v ∈ σand that it rejects it otherwise.
We may now define innocent strategies:
Definition 2.1.26. A strategy σ on (A, B) is innocent if it only accepts P visible plays and, for all plays s, σ accepts s if and only if it accepts all its views⌈s⌉i .
There is an isomorphism between behaviours and innocent strategies:• to each behaviour σ, we may associate the strategy that accepts all plays
whose views are accepted by σ,• to each strategy σ, we may associate the behaviour that accepts all views
accepted by σ,because an innocent strategy accepts a play if and only if it accepts all its views,
the mappings above are indeed isomorphisms.
Example 2.1.27. The strategy of Example 2.1.9 is innocent. Indeed, the behaviour associated to that strategy is the behaviour that accepts all views of the
form
B

B

B

qr

B
qr

and

ql

ql

tl

fl
tr ,

fr

and their (non-empty) prefixes of even length. The innocent strategy associatedto that behaviour is exactly the strategy of Example 2.1.9, which is therefore
innocent.
However, the strategy of Example 2.1.10 is not innocent. Indeed, the behaviour associated it accepts the view
B

B
qr

ql
tl
tr
34

among others, because the strategy accepts it. But then, the strategy associatedto that behaviour must accept
B

B
qr

ql
tl
tr
qr
ql
tl
tr ,
which the original strategy does not accept, so the original strategy is not innocent.
The reader may note that the strategy obtained in the second part of Example 2.1.27 is non-deterministic. Indeed, the original strategy accepts the play
B

B
qr

ql
tl
tr
qr
ql
tl
fr ,
so the behaviour associated to it should accept
B

B
qr

ql
tl
fr ,
which is one of its views. But then, the behaviour accepts both
B

B

B

qr
and

ql

B
qr

tl

ql
tl
fr ,

tr
35

so it is clearly non-deterministic. A typical constraint that can be imposed on
strategies is determinism:
Definition 2.1.28. A strategy σ is deterministic if, for all plays s, if sab andsab′ are accepted, then b = b′ .
More precisely, not only should b be equal to b′ in the definition above, butthey should also point to the same move. Deterministic strategies can obviously
only interpret deterministic programs.
A crucial result of game semantics is that deterministic innocent strategies
compose. More precisely:
Lemma 2.1.29 (Preservation of innocence). If σ∶ A → B and τ ∶ B → C are twodeterministic innocent strategies, then the composite σ; τ as defined in Definition 2.1.13, is again deterministic and innocent.
Moreover, copycat strategies are easily shown to be innocent and deterministic. We thus get:Lemma 2.1.30. Deterministic, innocent strategies form a subcategory of thecategory of arenas and strategies.

2.1.2

Variations on HON Games
Required: 2.1.1.
Recommended: ∅.

As we alluded to before, a nice point of HON-style game semantics is that
there are many variations on it, and that these slight variations give models ofdifferent features of programming languages. Since the goal of Chapter 6 is todefine a general framework to study game semantics, we should show that allthese different variations can be accounted for. We thus define a list of different
HON-style game settings, most of them done again in the style of Harmer’s PhD
thesis [46] and the last one based on McCusker’s PhD thesis [78].
Constraints on Plays
Except for innocence and determinism, which we have already defined, all thesevariations are defined similarly: we first restrict the notion of play by askingthat they verify additional constraints, then define strategies as prefix-closed
sets of plays (for the new notion of play), and finally verify that this new notionof strategy forms a subcategory of the initial notion of strategy.
There are four main constraints that may be imposed on plays: P -visibility(which we have already discussed), O-visibility (which is the counterpart toP -visibility for Opponent), well-bracketing, and well-threadedness. Each set of
constraints taken among those gives a new notion of strategy. Let us thus
describe the different constraints we have not described yet.
Let us start with O-visibility. Just like P -visibility, we first need to define
a notion of view, but this time for Opponent, rather than Proponent, which isexactly dual to the definition of Proponent views, though it must be expressedslightly differently because of the only dissymmetry between Opponent andProponent: initial moves are always played by Opponent.
36

Definition 2.1.31. For all plays s = (n, f, ϕ), and i in n, the Opponent view(or O-view) of s at index i, denoted ⌊s⌋i is the sequence defined inductively by:• ⌊ε⌋i = ε,• ⌊s⌋i = ⌊s⌋ϕ(i) ⋅ f (i) if f (i) is a Proponent move (i.e., i is even),• ⌊s⌋i = ⌊s⌋i−1 ⋅ f (i) if f (i) is an Opponent move (i.e., i is odd).
Like in the case of P -visibility, the O-view is not necessarily a justified sequence, but it is when the play verifies a condition dual to P -visibility:
Definition 2.1.32. A play s = (n, f, ϕ) is O-visible if each Opponent move isjustified by a move in its O-view. In other words, for all odd i in n, ϕ(i) ∈ ⌊s⌋i .
Let us now describe well-bracketing. Well-bracketed strategies can exactlyinterpret programs that do not contain control operators (such as call/cc). Thisis done by forcing such strategies to always answer the last pending question
asked by the environment. To define this, we first need to define pending questions:Definition 2.1.33. A question i is the pending question in s = (n, f, ϕ) if it is
the last Opponent question in s that justifies no answer, or in other words:• λ(f (i)) = (O, ?),• for all j in n, if ϕ(j) = i, then λ?! (f (j)) = ?,• for all j > i in n, if λ(f (j)) = (O, ?), then there is a k in n such thatϕ(k) = j and λ(f (j)) = (P, !).
Definition 2.1.34. A play s = (n, f, ϕ) is well-bracketed if all Proponent answers answer the last pending Opponent question in their view, or in otherwords, for all even i in n, if f (i) is a Proponent answer, then ϕ(i) is thepending question of ⌈s⌉i .
Let us finally describe well-threadedness. This constraint is more generalthan P -visibility, as Proponent moves are not required to point into their views,
but only into their threads:
Definition 2.1.35. A move i in s = (n, f, ϕ) is hereditarily justified by j if
i = j or ϕ(i) is hereditarily justified by j.
If s = (n, f, ϕ) is a justified sequence, the thread of the ith move, denoted[s]i , is the sequence of all indices j that are justified by the initial move that isa hereditary justifier of i. This notion can be generalised: if I is a set of indicesin n, then [s]I is the union of all sub-sequences [s]i , for i in I.
A play s = (n, f, ϕ) is well-threaded when all Proponent moves point insidetheir predecessors’ threads, or in other words, for all even i in n, ϕ(i) ∈ [s]i−1 .
With all these different constraints, we can define new notions of plays:
Definition 2.1.36. Let C = {P -vis, w-b, w-t} be the set of constraints defined
above (except for O-visibility). For any subset c of C, the category PcA,B ofc-plays (or simply plays when c is clear from context) on (A, B) is the fullsubcategory of PA,B spanning plays that verify all constraints in c.
37

Example 2.1.37. If we take c = ∅, then we get the previous notion of play.
If we take c = {P -vis}, then we get the set of P -visible plays. This is thenotion of plays used by Tsukada and Ong, but they are equipped with a different
notion of morphism, so we will treat them separately later.
If we take c = C, then we get the notion of P -visible, well-bracketed plays(because P -visibility implies well-threadedness).
For all these different notions of plays, we can define notions of strategies:
Definition 2.1.38. For any subset c of C, a c-strategy is a prefix-closed set ofc-plays.
Of course, we can then define innocent and deterministic strategies just likein the standard case:Definition 2.1.39. A c-strategy is innocent when it only accepts P -visible cplays and accepts a c-play s if and only if it accepts all the views of s.
A c-strategy is deterministic if, when it accepts c-plays sab and sab′ , thenb = b′ .
To define composition of strategies, we must then define interaction sequences:
Definition 2.1.40. Let c be a subset of C. The category PcA,B,C of c-interaction
sequences is the subcategory of PA,B,C spanning interaction sequences whose
projections to PA,B and PB,C actually fall into PcA,B and PcB,C respectively.
For any set of constraints c, we get that the projection from PcA,B,C to PA,C
actually falls into PcA,C .
The definition of composition then just mimics that explained in the previous
section:Definition 2.1.41. If σ is a strategy on (A, B) and τ a strategy on (B, C),
then the composite strategy σ; τ is the strategy on (A, C) that accepts a play s
if and only if there is an interaction sequence u in PcA,B,C :• whose projection to PcA,C is s,• and such that its projection to PcA,B is accepted by σ and its projection to
PcB,C is accepted by τ .
Finally, to study associativity of composition for such strategies, we must
define generalised interaction sequences:
Definition 2.1.42. Let c be a subset of C. The category PcA,B,C,D of cgeneralised interaction sequences is the subcategory of PA,B,C,D spanning generalised interaction sequences whose projections to PA,B , PB,C , and PC,D actually
fall into PcA,B , PcB,C , and PcC,D respectively.
The crucial lemma to prove associativity of strategies is once again the zipping lemma, whose proof is obvious, since the zipping lemma is true for the basic
notion of play, and being a c-interaction sequence or c-generalised interaction
sequence is simply about projections being in Pc ’s, the constrained versions ofP’s.
We should finally define identities for these new notions of composition:
38

Definition 2.1.43. A c-strategy on (A, B) is copycat if it accepts exactly
copycat c-plays on (A, B).
We do not prove here that arenas and c-strategies form a subcategory ofthat of arenas and strategies because this point will be treated more elegantly
in Chapter 6.
Let us mention the case of O-visibility. It is also well-known that P -visible,
O-visible strategies (defined just like other c-strategies) form a category. However, strategies that are only O-visible do not form a category, which is why wetreat O-visible strategies separately. Indeed, if O-visible strategies are to forma category, the identities must be the copycat strategies. The problem is that
not all copycat plays are O-visible, which leads to “forgetting” some plays when
composing with a copycat strategy. More precisely, let us consider an O-visible
strategy σ on (A, A) that accepts the play p on the left below (notice that p isindeed O-visible).
A

A

A

mr

A
mr

ml

ml
mr

mr

ml

ml
mr

mr

ml

ml

m′l

m′l
m′r

m′r

m′l

m′l
m′r

m′r

If we want p to be accepted by σ; id A , then the copycat play on the right above
should be accepted by id A . But that play is not O-visible (the second m′l move
does not point into its O-view), so it cannot be accepted by id A , which meansthat p cannot be accepted by σ; id A , and id A is thus not an identity.
One could also study other restrictions on plays, such as well-openedness:
Definition 2.1.44. A play is well-opened if there is at most one initial movein it.
There is however a problem with this constraint, because composition cannot
be defined as easily as in the cases studied above:
Example 2.1.45. Let us consider a program of type B → B that calls its argument twice and answers t if the value of that argument is the same in each call,and f if the values are different. In the context of well-opened strategies, thisprogram would be interpreted as the strategy σ that accepts all plays of the form

39

B

B

B

B
qr

qr
ql

ql
and

al

al

ql

ql

al

āl
tr

tr

for all booleans a, and all their prefixes. Let us also consider the identity function
on booleans, which is interpreted as the strategy id that accepts all plays of the
form
B

B
qr

ql
al
ar
for all booleans a, and their prefixes. Intuitively, when we compose both strategies
id ; σ, we should obtain σ again. However, if we take an interaction sequencethat should intuitively correspond to the interaction of these two programs, we
obtain the interaction sequence on the left below, which, when projected to theleft-hand side arenas, gives the justified sequence on the right below.
B

B

B

B

B

qr
qm

qr

ql

ql

al

al
am

ar

qm

qr

ql

ql

āl

āl
ām

ār
fr

But this play is not accepted by σ, since it is not even well-opened. This example
shows that composition of well-opened plays is somewhat more involved than in
the cases that we have treated, as we need to define a ! (bang) modality that
corresponds to repeating.
Further Constraints on Plays
Another possible variation on HON games is described in McCusker’s PhD
thesis [78]. The idea is that we impose a further constraint on the set of plays.
40

The terminology for plays is slightly different from that of the previous sections because there are now two notions of plays: the first one (legal plays) isconstrained only by conditions we have already mentioned, and the other one(simply plays) is constrained by a further predicate.
Definition 2.1.46. A legal play (which McCusker calls legal positions) on thearena A is an alternating, P -visible, O-visible, well-bracketed justified sequenceof even length on A. The set of legal plays on A is LA .
In terms of vocabulary from the previous section, a legal play is basically a
C-play.
We then choose a predicate that will tell which legal plays are actual plays.
Definition 2.1.47. An arena with predicate is a pair (A, PA ) of an arena A
and a predicate PA on LA such that:• PA is non-empty (there is s in LA such that PA (s) is true),• PA is prefix-closed (if PA (sab) is true, then so is PA (s)),• PA is stable under “generalised threads” (if PA (s) is true and I is a set ofindices in s, then PA ([s]I ) is also true).
A play (which McCusker calls a valid position) on (A, PA ) is a legal play s on
A such that PA (s) is true.
We will sometimes denote the arena with predicate (A, PA ) simply by A,
leaving the context to disambiguate.
Finally, a play on a pair of arenas is defined as a legal play whose projections
respect the constraints imposed by the predicates:
Definition 2.1.48. For all arenas with predicates (A, PA ) and (B, PB ) thearrow arena with predicate is defined as (A ⊸ B, PA⊸B ), where PA⊸B (s) holds
if and only if PA holds on the projection of s to A and PB holds on its projection
to B. A play on the pair of arenas with predicates ((A, PA ), (B, PB )) is a playon (A ⊸ B, PA⊸B ).
For all such pairs of arenas with predicates ((A, PA ), (B, PB )), plays on thepair of arenas (A, B) equipped with prefix ordering form a category PP
A,B .
Interaction sequences and generalised interaction sequences are then defined
as before:
Definition 2.1.49. An interaction sequence on the tuple of arenas (A, B, C)
is a legal play of (A ⊸ B) ⊸ C whose left and right projections are in PP
A,Band PP
B,C respectively and whose last move is either in A or C. Interaction
sequences on (A, B, C) equipped with prefix ordering form a category PP
A,B,C .
A generalised interaction sequence on the tuple of arenas (A, B, C, D) is aPlegal play of ((A ⊸ B) ⊸ C) ⊸ D whose projections are in PP
A,B , PB,C , andPP
C,D respectively and whose last move is either in A or D. Generalised interaction sequences on (A, B, C, D) equipped with prefix ordering form a category
PP
A,B,C,D .

41

Since the definition of strategy and composition of strategies are exactly thesame as above, we spare the reader from having to read them yet another time.
Copycat plays are simply plays (i.e., legal plays on which P holds) that are also
copycat, and strategies are copycat if and only if they accept all copycat plays,
so we omit their formal definitions. Once again, associativity of compositionof strategies relies on a zipping lemma, which obviously holds because being aplay or an interaction sequences is only about projections being legal. One cantherefore prove that, in this setting, arenas and strategies form a category withcopycat plays as identities and composition of strategies as composition.

2.1.3

Tsukada and Ong’s Model
Required: 2.1.1.
Recommended: ∅.

Here is a brief recapitulation on Tsukada and Ong’s categories of views andplays, as well as their notion of strategy. We will not use a specific vocabularywhen talking about their notions of arenas, plays, etc, so there could be a slightambiguity with the previous game models. However, the only part in which
we will talk about the other settings is Chapter 6, and more precisely when wetreat concrete examples, in which case the notions of arenas, plays, etc, will beclear from context.
As in the other game semantical settings, games are based on arenas. Here,however, arenas are forests (moves have at most one justifier).
Notation 2.1.50. If A is an arena and m is a move in A, then A/m is the√forest strictly below m, and A ⋅ m denotes A/m when m ∈ A. If A is an arena,
we denote by m.A the tree t whose root is m and such that t ⋅ m = A. Note thatany arena is a coproduct of trees, so it can be written A = ∑m∈√A m.(A ⋅ m).
Remark. This graph-based notion of arena, already used, e.g., by Harmer,
Hyland, and Melliès [47], slightly differs from Tsukada and Ong’s relation-based
notion. For instance, their notion comprises non-empty arenas without initial
moves, e.g., the integers with justification given by predecessor and ownershipgiven by parity. But in fact, any relation-based arena A is isomorphic (in the
category of arenas and innocent strategies) to the simple forest FA given by thepart of A which is reachable from its roots. Furthermore, FA and A yield theexact same categories of views and plays. So we deliberately restrict attention
to graph-based arenas.
Let us fix arenas A and B. Let A ⊸ B denote the simple graph defined as√√• A + B, with an edge b → a for all b ∈ B and a ∈ A if B is non-empty,• the empty graph otherwise.
Even though A ⊸ B is not necessarily an arena, the notion of ownership straightforwardly extends to A ⊸ B, since all paths from any root to some vertex v havethe same length. Concretely, ownership is left unchanged in B but reversed inA. (This is the exact same construction as in HON games, and it is an arena inthat setting.)
42

We denote by ∣s∣ the length n of the sequence s = (n, f, ϕ).
We will use the notion of preplay, which slightly generalises that of play.
This is also where the real difference between HON games and Tsukada andOng’s games appear: the notion of morphism is different.
Definition 2.1.51. A TO-preplay on the pair of arenas (A, B) is a P -visible,
alternating, justified sequence on (A, B).
A morphism of TO-preplays g from a TO-preplay (n, f, ϕ) on (A, B) to
another TO-preplay (n′ , f ′ , ϕ′ ) on (A, B) is an injective map g∶ n → n′ suchthat:
• f ′ (g(i)) = f (i) for all i ∈ n,
• ϕ′ (g(i)) = g(ϕ(i)) for all i ∈ n (with the convention that g(0) = 0),• g(2i) = g(2i − 1) + 1 for all i ∈ n/2.
The last condition states that g should preserve blocks of an Opponent move andthe next Proponent move (so-called OP -blocks).
TO-preplays on (A, B) and morphisms of such form a category PPA,B withthe obvious identities and composition.
Definition 2.1.52. A TO-play on the pair of arenas (A, B) is a TO-preplayon (A, B) of even length.
We denote by PA,B the category of TO-plays on (A, B), which is the fullsubcategory of PPA,B spanning TO-plays.
Definition 2.1.53. If s = (n, f, ϕ) is a justified sequence, i and j are in n, andϕ(j) = 0, we say that i is hereditarily justified by j if i = j or ϕ(i) is hereditarily
justified by j.
A thread of s is a maximal sub-sequence of s in which all moves have thesame hereditary justifier. If s is a play, then all threads of s are justified sequences in which the pointers are inherited from s.
Definition 2.1.54. A TO-preview on (A, B) is a TO-preplay s = (n, f, ϕ) suchthat ⌈s⌉n = s.
Let PVA,B be the full subcategory of PPA,B spanning previews.
Definition 2.1.55. A TO-view on (A, B) is a non-empty TO-preview of evenlength. Let VA,B denote the full subcategory of PVA,B spanning TO-views.
Remark. VA,B is also a full subcategory of PA,B .
Note that the notions of views and plays are exactly the same as in HON
games, but that the notions of morphisms are different.
The embedding iTO ∶ VA,B ↪ PA,B induces an adjunction
∆iTO
⋀

PA,B



⋀

VA,B ,∏iTO

where ∆F denotes restriction along F op and ∏F denotes right Kan extension
along F op (see Section 2.2.4).
43

⋀

⋀

Definition 2.1.56. We call VA,B the category of TO-behaviours and PA,B
that of TO-strategies. We denote by Sh(PA,B ) the category of innocent TOstrategies on (A, B), which is the essential image of ∏iTO .
By Theorem 2.2.84, full faithfulness of iTO entails that ∏iTO restricts to an
equivalence Sh(PA,B ) ≃ VA,B .
⋀Remark. As the notation Sh(–) suggests, this is also a category of sheaves
for the Grothendieck topology induced by the embedding VA,B into PA,B (seeSection 2.2.7).

2.1.4

Abramsky-Jagadeesan-Malacaria Games
Required: ∅.
Recommended: 2.1.1.

AJM games are another approach to game semantics, and we once again
follow Harmer [46] to define them. These games are slightly different from
HON games in the sense that they are not based on arenas, but on even simpler
data: moves inside an “arena” are not even ordered, and there are no justification
pointers. Because of this, we need a predicate to tell which sequences are valid
and which are not.
Definition 2.1.57. A game is a triple G = (P, O, ≈), where:• P and O are disjoint sets of moves, with P called the Proponent moves(or simply P -moves) and O the Opponent moves (or simply O-moves).
We denote by M the set of all moves P + O. A legal play is an alternating
sequence of moves starting with an O-move. Formally, a legal play s is apair (n, f ) of a natural number n and a function f ∶ n → M such that, for
all i in n, f (i) is in O if and only if i is odd. Legal plays equipped withprefix ordering form a category LG .
• And where ≈ is a partial equivalence relation, i.e., a symmetric, transitive(but not necessarily reflexive) relation verifying:– ≈ is length- and prefix-preserving, i.e., if s ≈ t, then ∣s∣ = ∣t∣, and if
sa ≈ tb, then s ≈ t,
– ≈ is extensible, i.e., if s ≈ t and sa ≈ sa, then there exists b such thatsa ≈ tb.
A play is a legal play s such that s ≈ s. Plays on G equipped with prefix
ordering form a category PG .
Not only does ≈ define the set of plays, but it also serves another purpose: itcan be thought of as a way to equate plays that are basically the same. There
are thus two possible choices to define strategies: as a set of plays, or as a setof equivalence classes for ≈.
To define plays on pairs of games, we first define arrow games.
Definition 2.1.58. If G and H are games, then G ⊸ H is the game given by:• PG⊸H = OG + PH ,44• OG⊸H = PG + OH ,• and if s = (n, f ) and t = (m, g), s ≈G⊸H t if and only if:– for all i in n, f (i) ∈ PG⊸H exactly when g(i) ∈ PG⊸H
– and sG ≈G tG and sH ≈H tH , where sG is the projection of s onto G,
and similarly for sG , tH , and tH .
We can now define plays on a pair of games (G, H):
Definition 2.1.59. A play on the pair of games (G, H) is a play of even length
on the game G ⊸ H. Plays on (G, H) equipped with prefix ordering form acategory PG,H .
Once the notion of play is defined, strategies are defined just like in the caseof HON games:
Definition 2.1.60. A strategy on (G, H) is a prefix-closed set of plays on(G, H).
Like in HON games and their variations, composition of strategies is basedon the notion of interaction sequence, which is defined similarly.
Definition 2.1.61. An interaction sequence on the tuple of games (G, H, I) isa sequence of elements of MG +MH +MI whose projections to (G, H) and (H, I)
are plays. Interaction sequences on (G, H, I) equipped with prefix ordering forma category PG,H,I .
Note that there is a slight difference between this definition and the definitions of interaction sequences in the other cases because we do not require thatthe last move belong either to G or I.
Composition of strategies is unsurprisingly defined as:
Definition 2.1.62. If σ and τ are strategies on (G, H) and (H, I) respectively,
then the composite σ; τ of σ and τ is the strategy on (G, I) that accepts a plays if and only if there is an interaction sequence u on (G, H, I) such that:• the projection of u to (G, I) is s,• and the projections of u to (G, H) and (H, I) are accepted by σ and τ
respectively.
The proof of associativity of composition of strategies once again relies on azipping lemma, which is expressed just like 2.1.16, where generalised interaction
sequences are defined as:
Definition 2.1.63. A generalised interaction sequence on the tuple of games(G, H, I, J) is a sequence of elements in MG + MH + MI + MJ whose projections
to (G, H), (H, I), and (I, J) are plays.
As we said before, since s ≈ t means that s and t are essentially the sameplay, there is another notion of strategy, which is given by equating all playsthat belong to the same equivalence class of ≈.

45

Definition 2.1.64. A saturated strategy on the pair of games (G, H) is aprefix-closed set of equivalence classes of ≈G⊸H . Saturated strategies equippedwith prefix ordering form a category PsG,H .
For this definition to make sense, we should verify that the prefix relation
on plays extends to a poset on equivalence classes of ≈, which is easily seen to
be true.
Saturated strategies accept plays only based on the equivalence class they
belong to. They can be thought of as strategies that only look at plays fromafar to choose whether to accept them or not, and two plays that are essentiallythe same must either both be accepted or both rejected.
There is an obvious bijection between saturated strategies and strategies σsuch that, if σ accepts s, then it also accepts all s′ ≈ s. Let us call such strategies
replete. In this light, composition of saturated strategies amounts to showingthat the composite σ; τ of two replete strategies σ and τ is again replete, whichis easy to check.

2.1.5

Blass Games
Required: ∅.
Recommended: ∅.

Blass games [14, 15] are the last games that we will study in this dissertation.
They are well-known for the fact that composition of strategies is not associative,
and we will use them to test the limits of our framework for game semantics in
Chapter 6.
Blass games are different from arena games on several aspects:• contrary to arena games, where the graph structure describes the possible
moves that can occur in a play, the structure of Blass games describes
the set of all positions in the game, which is a convention used in manymodels that do not have justification pointers [3, 55, 47],
• they come equipped with a notion of winning position, so they are closer
to game theory,• plays do not necessarily start by an Opponent move.
Since we will not be interested in winning strategies, but only in how to compose strategies, we will skip the description of winning positions for a simpler
presentation.
Definition 2.1.65. A game G is a pair (P, s) where P is a simple tree, i.e.,a directed, simple graph in which each vertex is uniquely reachable from a fixed
vertex without parent, called the root; and s ∈ {P, O}.
Terminology 2.1.66. In a game G, P is called the set of positions and s iscalled the starting player. Each position in the game G is given a polarity thatis either P or O, depending on its depth in P : if the position is a root, then its
polarity is s, otherwise it is the opposite of its parent’s polarity. A position isan O-position if its polarity is O, and a P -position otherwise.

46

We think of O-positions as positions where it is O’s turn to play, and P positions as those where it is P ’s turn to play.
Example 2.1.67. The game tree for the boolean game is the pair (B, O), where
B is the tree
⋅
⋅
⋅

⋅.

In the initial position, the program and the environment have not interacted yet;in the second one, the environment has asked the program for its return value;
and in the bottom positions, the program has answered a value, either true or
false, depending on the position.
We now want to build arrow games to define strategies on a pair of games,
which are our candidate morphisms of a category of Blass games and strategies.
To make this definition more tractable, we adopt notations inspired from Abramsky [2].
Definition 2.1.68. Games are defined coinductively by the grammar:
G ∶∶= ∐ G ∣ ∏ G.
i∈I

i∈I

This definition is equivalent to the previous one, in which we drop the constraint that both players should alternate. These games are basically what Blasscalls relaxed games, except that they do not verify the constraint that a player
should only play finitely many times in a row (but Blass writes that this constraint exists only for technical reasons). The translation from the “grammaticalform” to the “tree form” goes as follows:• if Gi translates to a game (Ti , si ), then ∐i∈I Gi translates to the game
(T, P ), where T is the tree with I edges from its root, whose ith sub-tree
is Ti , and in which, after P plays i, it is si ’s turn to play,• similarly for ∏i∈I Gi , except the initial player in the translation is O.
Games of the form ∐i∈I Gi are thus “positive” games in which P plays first, andgames of the form ∏i∈I Gi are negative ones, in which O plays first.
Example 2.1.69. The empty product ∏i∈0 Gi is the game (⋅, O), i.e., the game
whose only position is an O-position. Similarly, the empty coproduct ∐i∈0 Gi is
the game (⋅, P ), i.e., the game whose only position is a P -position. Since thesegames do not depend on the Gi ’s used to define them, we will write them ∏0and ∐0 for the sake of brevity.
Based on this notation, all finite games can be written as a product ∏n Gn
or a coproduct ∐n Gn , where Gn are finite games. For example, the boolean
game defined in Example 2.1.67 can be written as ∏1 ∐2 ∏0 . Indeed, the top
position is an O-position, so it is a product, and it has one child, so it is of the47form ∏1 G. Similarly, G’s top position is a P -position, so it is a coproduct, andit has two children, so it is of the form H1 + H2 . Finally, H1 and H2 are both
∏0 , whence the final expression.
We may now define arrow games:
Definition 2.1.70. If G and H are games, then the arrow game G ⊸ H isdefined coinductively as:• ∐i∈I (Gi ⊸ (∐j∈J Hj ))+∐j∈J ((∏i∈I Gi ) ⊸ Hj ) if G is of the form ∏i∈I Gi
and H of the form ∐j∈J Hj , where + is a binary ∐ (and the whole expression should be understood as a ∐i∈I+J of games, rather than a ∐i∈2 ofcoproducts of games),• ∏i∈I (Gi ⊸ H) if G is of the form ∐i∈I Gi and H of the form ∐j∈J Hj ,• ∏j∈J (G ⊸ Hj ) if G is of the form ∏i∈I Gi and H of the form ∏j∈J Hj ,• ∏(i,j)∈I×J (Gi ⊸ Hj ) otherwise.
The intuition behind this definition is that it defines an interleaving of all
moves of G and H, but imposing the condition that Opponent should playwhenever they can. For example, if G and H are both coproducts, then they
are both positive games in which P plays first, but since polarity is reversedin the left-hand game (like in arena games), O may play in that game, so theyshould, hence the form of the result: it is a product because Opponent plays
first, and after they have played, the play may continue in either the right-handgame or one of the sub-games of the left-hand one. The idea is similar when
G and H are both products: O may play in the right-hand game, so they do.
When G is a product and H is a coproduct, O cannot play in any of the twogames, so P chooses one of them to play in and a move in it. Following thislogic, when G is a coproduct and H a product, O should pick one of the twogames to play in and a move in it, and we should get a similar expression for
G ⊸ H. However, this would break alternation, by allowing O to play twice ina row, even if G and H alternate. To solve this problem, we let O play in both
G and H in a single move, whence the expression of G ⊸ H.
This may also be defined by seeing G ⊸ H as the forest consisting of G and
H’s game trees. The rule to decide which player’s turn it is to play in G ⊸ H
is that Opponent always plays first. To make a move in G ⊸ H:
• if it is Proponent’s turn to play, it means that it is their turn to play bothin G and H, so they can choose in which game to play and make a move
there,• if it is Opponent’s turn to play in G or H (but not both), then they playin that game,• otherwise, for the same reason as above, Opponent plays in both G and
H at the same time.

48

Example 2.1.71. The game B ⊸ B can be computed as:
B ⊸ B = (∏1 ∐2 ∏0 ) ⊸ (∏1 ∐2 ∏0 )= ∏1 ((∏1 ∐2 ∏0 ) ⊸ (∐2 ∏0 ))= ∏1 ((∐1 ((∐2 ∏0 ) ⊸ (∐2 ∏0 ))) + (∐2 ((∏1 ∐2 ∏0 ) ⊸ ∏0 )))= ∏1 ((∐1 (∏2 (∏0 ⊸ (∐2 ∏0 )))) + (∐2 ∏0 ))= ∏1 ((∐1 (∏2 (∐0 + ∐2 (∏0 ⊸ ∏0 )))) + (∐2 ∏0 ))= ∏1 ((∐1 ∏2 ∐2 ∏0 ) + (∐2 ∏0 )),which, when drawn as a tree whose nodes are labelled O or P based on theirpolarities (this is necessary since G and H may not be alternating, though they
are in this case), gives
O
P
O

O

P
O

O

O

P
O

O

O.

The first move in Bl ⊸ Br (where, once again, subscripts only serve to distinguish between the two copies of B) corresponds to O playing its initial move in
Br . Its two right-hand-side children correspond to P answering directly in B,
thus ending the game: it is O’s turn to play in Br , and therefore also in Bl ⊸ Br ,but there are no moves to play. Its left-hand child, however, corresponds to P
playing the initial move in Bl , which is possible because polarities are reversed.
Its two children correspond to the two possible moves O can answer in Bl , andthe subsequent children to the different choices P can make in Br .
Notice how this is actually just describing the different interleavings of movesof Bl and Br under the constraint that Opponent always plays first. We canthus also represent it as the product of Bl and Br , remembering that polarity is
actually reversed in Bl , and the fact that Opponent plays as soon as possible:

O

O

O

P

P
O

O

O.

We may now define strategies on a game. There is no formal definition ofstrategies on Blass games, so their definition is open to interpretation. The
following definition is our own interpretation of strategies on Blass games, and49

we do not claim that they are the same strategies as the ones Blass had in mind.
In particular, our definition definitely clashes with the one given by Abramsky,
who only considers total strategies. Nevertheless, we believe that the reason why
strategies fail to compose in Blass games is left unchanged with our definitionof strategy.
Definition 2.1.72. The set S(G) of strategies on the game G is defined coinductively as:• S(∐i∈∅ Gi ) = {⋆},• S(∐i∈I Gi ) = ∑i∈I S(Gi ) + {⋆} otherwise,• S(∏i∈I Gi ) = ∏i∈I S(Gi ).
In other words, a strategy σ on G is a downwards-closed set of positions ofG (or upwards-closed, if we imagine the tree’s root is at the top) such that:• for all P -positions p in σ, σ contains at most one of p’s children,• for all O-positions p in σ, σ contains all of p’s children.
This indeed corresponds with the intuition of a strategy (or at least of a deterministic strategy): Proponent chooses which move to make for each positionin which they have a choice to make. It may also be viewed as a partial function
from P -positions of G to their children (that is however slightly wrong because
two functions that differ only on a part of G that can never be reached by thatstrategy should be considered equal).
A strategy on a pair of games (G, H) is a strategy on the game G ⊸ H.
By the description of G ⊸ H given above, a strategy on G ⊸ H is basically afunction from pairs (p, q) of an O-position p of G and a P -position q of H to
the union of p and q’s children.
Example 2.1.73. Let us describe the strategy associated to the not function
on booleans. It must be the sub-tree of the tree drawn in Example 2.1.71 that
corresponds to the function asking for its argument and then answering thenegation of that argument. It may be drawn as
O
P
O

O

P
O

O

O

P
O

O

O,

where the dashed arrows are the part of the tree that have been cut off.
If we call ε, q, t, and f the positions of B, we can also see this strategy on
the pair (Bl , Br ) as the function: (εl , qr ) ↦ ql , (tl , qr ) ↦ fr , (fl , qr ) ↦ tr .
50

We will not define composition of strategies formally, but only give an ideaof how it works. To the best of our knowledge, the formal description of composition of strategies in Blass games is not written anywhere (at least notin [14, 15, 2]). Composition of strategies is explained as follows in [14].
Given a strategy σ on (G, H) and a strategy τ on (H, I), the composite σ; τon (G, I) plays as if, along with G and I’s game trees, H’s game tree were alsopresent. Since σ is basically a rule that explains how P should play in B and O
in A, and τ how P should play in C and O in B, it is not very surprising that
this data can be used to create a rule for P to play in C and O in A. It plays
according to either σ or τ , depending on the polarities of the positions it hasreached in A, C, and the fictitious copy of B. All the possible cases are in thetable below.
G
O
O
O
O
P
P
P
P

H
O
O
P
P
O
O
P
P

I
O
P
O
P
O
P
O
P

σ
H
H
G∣H
G∣H
G&H
G&H
G
G

τ
I
H ∣I
H &I
H
I
H ∣I
H &I
H

σ; τ
I
G∣I
I
G∣I
G&I
G
G&I
G

what to doIτσ ↭ (H, I)στ ↝σ(G, H) ↭ τσ↝τGThe table is a rule to know what move to play depending on the polarities of thecurrent positions in G, H, and I, and is meant to be read as follows: the first
three columns enumerate all the possible combinations of polarities in G, H,
and I; the next two columns show where σ and τ will play their next moves; thenext column shows where σ; τ should make its next move; and the final column
gives a “formula” to compute that move:• if the formula is a game, then we are in an O position in which Opponent
must play exactly in that game, so we wait for them to do so,• if the formula is a strategy, then we are in a P position, and we playaccording to the strategy, leaving the other games untouched, which may
change the “internal state” of the strategy (the position on H),• if the formula is σ ↭ (H, I) (or the symmetric one for τ ), then we are in
an O position in which Opponent must play in exactly one of the external
games, so we wait for Opponent to make their move (mH , mI ) on H ⊸ I,
and then check that σ indeed accepts to play mH : if σ does not accept
to play mH , there is some sort of conflict between the environment andthe strategy, and the composite strategy stops playing as soon as it is
Proponent’s turn to play,• if the formula is τ ↝ σ (or the symmetric one), then we are in an O position
where Opponent must play in both games, so we first let Opponent playmI on I: if the final position of mI is an O position, there is a conflict
and the strategy stops playing as soon as it is Proponent’s turn, otherwise
we then play like in σ ↭ (H, I) (this whole process should be atomic, inthe sense that Opponent will actually play (mG , mI ) in the game, rather
than mI followed by mG ).
51

Example 2.1.74. Let us show how to compose the strategy associated to the
not function with itself. Let us call ε, q, t, and f the four positions of B and σ
the strategy for not.
At the very beginning, the position is (ε, ε, ε), which has polarity (O, O, O),so we simply wait for Opponent to move in the right-hand copy of B.
Since the only move they can make is q, we are then in (ε, ε, q), which haspolarity (O, O, P ), so we play according to σ on the right-hand copies of B,
which are in position (ε, q), so we should play q in the middle copy of B.
Describing the whole strategy would take some time, but the result is exactly
as expected: it maps (εl , qr ) to ql (with internal state qm ), (tl , qr ) to tr (withinternal state fm ), and (fl , qr ) to fr (with internal state tm ).
We are now ready to exhibit an example where composition of strategies is
not associative.
Example 2.1.75. Take four games G = ∏1 ∐0 , H = J = ∐0 , and I = ∏0 . In
terms of trees, G has only one branch of length 1, while all the other games are
trivial. Both G and I have polarity O, while H and J have polarity P . If wecall ⋆ the non-initial position of G, we define σ on G ⊸ H as the strategy thatmaps (εG , εH ) to ⋆. Since H ⊸ I is trivial, there is only one strategy τ on it,
and similarly, since I ⊸ J is trivial, there is only one strategy υ on it.
The composite σ; τ starts on (εG , εH , εI ), which has polarity (O, P, O), thestrategy thus waits for Opponent input on I, but it never gets any because thisgame is trivial, so the strategy does not do anything (note that G ⊸ I is trivial,
so the strategy could not have played anything anyway). The composite (σ; τ ); υ
starts on (εG , εI , εJ ), which has polarity (O, O, P ), so the strategy plays according to υ, which does nothing.
On the other hand, τ ; υ starts on (εH , εI , εJ ), which has polarity (P, O, P ),so the strategy waits for Opponent input on I, which never comes, so nothing
happens. But then, σ; (τ ; υ) starts on (εG , εH , εJ ), which has polarity (O, P, P ),so it plays according to σ, which plays ⋆ on A.
We thus have that σ; (τ ; υ) ≠ (σ; τ ); υ, so composition of strategies is not
associative.

2.2

Categorical Preliminaries

We assume basic knowledge of category theory, such as the notions of categories,functors, natural transformations, limits and colimits, and adjunctions. We refer
the reader to the classical reference [76] for definitions of these notions.
We write composition of maps in the same order as composition of functions,fg

as is usual in category theory, so g ○ f is the composite A Ð→BÐ→ C. We will
also often write gf instead of g ○ f .
Given a category C and objects c and c′ of C, we will usually denote by[c, c′ ] the homset C(c, c′ ) and let the context disambiguate.

2.2.1

Comma and Cocomma Categories
Required: ∅.
Recommended: ∅.
52

Comma [76] and cocomma categories [89] will be useful throughout thisdissertation, mainly for their combinatorial flavour, which will prove useful tobuild categories.
F

G

Definition 2.2.1 (Comma Category). Let A Ð→C←Ð B be a cospan of categories, the comma category F ↓ G is the universal cone equipped with a naturaltransformation λ as below left. In other words, it is the pair of a cone and a natural transformation λ such that, for all other cones and natural transformations
α, there is a unique mediating arrow ⟨U, V ⟩ as below right such that ∂⟨U, V ⟩ = U ,∂ ⟨U, V ⟩ = V , and λ ⋅ ⟨U, V ⟩ = α.
V

X
F ↓G

[U,V ]

∂

B

λ

∂

F ↓G

G
U

A

C

F

∂

B

λ

∂

A

G

C

F

If we unfold the definitions, we get:• the objects of F ↓ G are triples (a, b, f ) of two objects a of A, b of B, anda morphism f ∶ F a → Gb,• the morphisms from (a, b, f ) to (a′ , b′ , f ′ ) are pairs of morphisms (ϕ, ψ)such that
Fϕ

Fa

F a′
g

f

Gb

Gb′

Gψ

commutes and the identities and composition are defined in the obviousway,• ∂∶ F ↓ G → A maps (a, b, f ) to a and (ϕ, ψ) to ϕ,• ∂ ∶ F ↓ G → B maps (a, b, f ) to b and (ϕ, ψ) to ψ.
Dually, there is a notion of cocomma category:F

G

Definition 2.2.2 (Cocomma Category). Let A ←ÐCÐ→ B be a span of categories, the cocomma category F ↑ G is the universal cocone equipped with a naturaltransformation λ as below left. In other words, it is the pair of a cocone anda natural transformation λ such that, for all other cocones and natural transformations α, there is a unique mediating arrow [U, V ] as below right such that
[U, V ]l = U , [U, V ]r = V , and [U, V ] ⋅ λ = α.
G

C
G

C

λ

F

A

l

B
r

F

A

F ↑G

B

λ

l

r

F ↑G

V

⟨U,V ⟩U

53

X

The explicit description is slightly more complex than that of comma squares:• objects of F ↑ G are the disjoint union of those of A and B,• for morphisms:– (F ↑ G)(a, a′ ) = A(a, a′ ),– (F ↑ G)(b, b′ ) = B(b, b′ ),– (F ↑ G)(a, b) = ∑c∈C A(a, F c) × B(Gc, b), where such triples are quotiented by the following equivalence relation: two triples (c, f, g)
f0

f1

and (c′ , f ′ , g ′ ) are equivalent when there exists a zigzag c Ð→←Ð
fn−1

fn

. . . ÐÐ→←Ð c′ and “lanterns”, i.e., commuting diagrams of the form
a

Gc
f

f

F c Ff ⋅ Ff . . .Ff
0

1

n−1

Gf0

′

⋅

Gf1

...

g

⋅ F f F c′

b,

n

Gfn−1

⋅

Gfn

Gc′

g′

– (F ↑ G)(b, a) = ∅,and the identities and composition are defined in the obvious way,
• l∶ A → F ↑ G maps A to its copy in F ↑ G,
• r∶ B → F ↑ G maps B to its copy in F ↑ G.

2.2.2

Fibrations
Required: ∅.
Recommended: ∅.

In this dissertation, we will use two notions of fibrations: one that is simply
called fibration and the other that is called discrete fibration. Basically, a functorp∶ E → B is a fibration when there is a canonical way to find antecedents ofmorphisms b → p(e).
Definition 2.2.3. For any functor p∶ E → B, a morphism r∶ e′ → e in E iscartesian when, as below, for all t∶ e′′ → e and k∶ p(e′′ ) → p(e′ ) such that p(r)○k =p(t), there exists a unique s∶ e′′ → e′ such that p(s) = k and r ○ s = t:
e′′

t
s

e′

r

p(e′′ )ep(t)kp(e′ )

p(r)

p(e).

Definition 2.2.4 (Fibration). A functor p∶ E → B is a fibration if and only if
for all e in E, any h∶ b′ → p(e) has a cartesian lifting, i.e., a cartesian antecedentby p with codomain e.
54Let us now describe discrete fibrations:Definition 2.2.5 (Discrete Fibration). A functor p∶ E → B is a discrete fibration
when, for all e in E and morphisms f ∶ b → p(e), there exists a unique morphismg∶ e′ → e such that p(g) = f . Such a g is called a cartesian lifting of e along f .
A morphism of discrete fibrations p∶ E → B and q∶ E′ → B is a functor r∶ E →E′ such that qr = p.
Discrete fibrations over B and morphisms of such form a category DFibB .
Note that a discrete fibration is basically a fibration whose fibres are discrete, in the sense that there is a unique morphism above an f ∶ b → p(e) whose
codomain is e.
Notation 2.2.6. Since the cartesian lifting of e along f is unique, we may
denote it by e ↑ f , and we denote the domain of this map by e ⋅ f .
It may be useful to draw a picture here. The property of discrete fibration
states that, if p is a discrete fibration, then for any solid part of the drawing
below, there is a unique dashed part that completes the drawing.
x′

u

x

p

p

p

a

′
f

a

Notice that, by uniqueness, it suffices to find a u as above to prove that x ↑ f = u.
Remark. Since we will sometimes mix cartesian liftings of different discrete
fibrations and actions of morphisms in different presheaves in the proofs, we
decide to write the action of morphisms in a presheaf X as x ⋅X f and thecartesian lifting of e along f for the discrete fibration p as e ↑p f , and e ⋅p f forits domain when there may be an ambiguity.
Note that this clash of notations happens for a good reason (if there is sucha thing as a good reason for a clash of notations): we will show in Section 2.2.5that action of morphisms in presheaves correspond in some sense to cartesian
lifting in discrete fibrations.
Proposition 2.2.7 (“Functoriality” of cartesian lifting). For all discrete fibrations p∶ X → A, cartesian lifting is “functorial”, in the sense that, for all object
x of X:• for all f ∶ a → p(x) and g∶ a′ → a, (x ↑p f ) ○ ((x ⋅p f ) ↑p g) = x ↑p (f g),• x ↑p id p(x) = id x .
Proof. Both proofs are by uniqueness of cartesian lifting.
• For composition, we have:(x ⋅p f ) ⋅p g(x⋅p f )↑p g

x ⋅p f

x↑p f

p

p

p

p

a

a

′
g

55

f

x
p

p(x),

so the morphism satisfies the property of x ↑p (f g), and so they are equal.
• For the identity, we have:
x

id x

x

p

p

p

p(x)

id p(x)p(x),so the morphism satisfies the property of x ↑p id p(x) , and so they are
equal.
Unsurprisingly, cartesian lifting is compatible with morphisms of discrete
fibrations:
Proposition 2.2.8. If p∶ X → A and q∶ Y → A are discrete fibrations and f ∶ p → q
is a morphism of discrete fibrations, then for all objects x of X and morphismsg∶ a → p(x), f (x ↑p g) = f (x) ↑q g.
Proof. Because qf = p, we have:x ⋅p g

x↑p g

f

f

f

f (x ⋅p g)

f (x↑p g)

f (x)

q

q

q

a

g

x

p(x),

so by looking only at the bottom square, we see that f (x ↑p g) has the propertyof x ↑q g, so they are equal.
Finally, let us mention that there is a dual notion to that of discrete fibration,
which we will also use at some point:
Definition 2.2.9 (Discrete opfibration). A functor p∶ E → B is a discrete opfibration when, for all e in E and morphisms f ∶ p(e) → b, there exists a uniquemorphism g∶ e → e′ such that p(g) = f . This g is called the cartesian opliftingof e along f and is denoted by f ↑ e, and its codomain is denoted by f ⋅ e.
Discrete opfibrations enjoy the same kind of properties as discrete fibrations,
including all the properties dual to the ones listed above: a simple proof of allthese facts is that p is a discrete opfibration if and only if pop is a discrete
fibration.

2.2.3

Ends and Coends
Required: ∅.
Recommended: beginning of 2.2.5.

Note that, in this section and the next one, some fundamental examples will
use presheaves, so it may be wise to first read the beginning of Section 2.2.5 (upto Definition 2.2.38) to at least know what presheaves are.
Ends and coends are a kind of universal construction, much akin to limits
and colimits. They are defined in pretty much the same way:56

• limits are terminal objects in the category of cones, and ends are terminal
objects in the category of wedges,• dually, colimits are initial objects in the category of cocones, and coends
are initial objects in the category of cowedges.
We thus need to first define wedges:
Definition 2.2.10. Let C and D be categories, and F ∶ Cop × C → D be a functor(we also say that F is a bifunctor from C to D). A wedge to F is a pair (w, (ec ))of an object w of D and, for each object c of C, of a map ec ∶ w → F (c, c) suchthat, for all f ∶ c → c′ ,
ec

w
e c′

F (c, c)F (c,f )F (c , c )′′F (f,c)F (c, c′ )commutes.
A wedge (w, e) to F will be denoted e∶ w → F .
To tell which wedges are terminal, we need to define a notion of morphism
between wedges:
Definition 2.2.11. A morphism between two wedges e∶ w → F and e′ ∶ w′ → F
is a morphism f ∶ w → w′ in D such that, for all c in C, ec = e′c f .
Wedges to F and morphisms of such form a category. We may thus state
the definition of end:
Definition 2.2.12. An end of F is a terminal object in the category of wedges
to F .
Because terminal objects are unique up to isomorphism, we will sometimes
say the end of F , instead of an end of F . We will also sometimes call w the endof F , when the actual end is the pair (w, e). Of course, categories of wedges
need not have terminal objects, so F may not have an end.
Notation 2.2.13. Let F be a bifunctor from C to D. If F has an end (w, e),then we write ∫c∈C F (c, c) or ∫c F (c, c) for w, and πc or pc for ec .
Example 2.2.14. If F is a bifunctor from C to Set, then ∫c F (c, c) is a subset ofthe product of all F (c, c)’s. More precisely, it is the subset of the tuples (xc )c∈C
such that, for all f ∶ c → c′ , F (c, f )(xc ) = F (f, c′ )(xc′ ). In other words, it is thebiggest subset X of ∏c∈C F (c, c) such that
πc

X
π c′

F (c, c)F (c,f )F (c , c )′′F (f,c′ )F (c, c′ )commutes for all f ∶ c → c′ in C.
Let F, G∶ C → D be functors between small categories and [d, d′ ] the homset
between two objects d and d′ of D. If we define H∶ Cop × C → Set by H(c, c′ ) =57

[F (c), G(c′ )], then ∫c H(c, c) is the set of natural transformations from F to G.
Indeed, ∏c∈C H(c, c) is the set of all transformations (natural or not) between F
and G, and the diagram below left commutes when applied to the transformation(λc ) exactly when the one below right does for f , which is exactly the naturality
condition.
∏c H(c, c)

πc

F (c)

H(c, c)π c′H(c,f )H(c , c )′′H(c, c )G(c)F (c′ )
λ c′

λc

′

H(f,c)F (f )G(f )G(c′ )

If P is a preorder viewed as a category and F is a bifunctor from C to P,
then F ’s end can be computed as a meet. Indeed, F ’s end is an object ∫c F (c, c)of P equipped with maps to all F (c, c)’s, so it is a lower bound of the set of all
F (c, c)’s. Furthermore, suppose that X is also a lower bound of the set of all
F (c, c)’s, then it comes equipped with morphisms fc ∶ X → F (c, c) for all objects
c of C. But thenfcX

F (c, c)fc′

F (c,f )F (c , c )′′F (f,c′ )F (c, c′ )necessarily commutes for all f ∶ c → c′ , since there is at most one morphism fromX to F (c, c′ ). Therefore, by universal property of ∫c F (c, c), there is a morphism
X → ∫c F (c, c), and thus ∫c F (c, c) = ⋀c∈C F (c, c).
Just like colimits are the dual to limits, ends also have a dual notion, whichis (unsurprisingly) called coends.
Definition 2.2.15. If F ∶ Cop × C → D is a functor, a cowedge from F is apair (w, (ec )) of an object w of D and, for all objects c of C, a morphismec ∶ F (c, c) → w in D such that, for all f ∶ c → c′ ,F (c′ , c)

F (f,c)F (c, c)ec

F (c′ ,f )F (c , c )
′

′

e c′

w

commutes.
A cowedge (w, e) will be denoted by e∶ F → w. A morphism from a cowedge(w, e) to (w′ , e′ ) is a morphism f ∶ w → w′ such that, for all objects c of C,
e′c = f ec . Cowedges from F and morphisms of such form a category.
A coend of F is an initial object in the category of cowedges from F .
Notation 2.2.16. Let F ∶ Cop × C → D be a functor. If F has a coend (w, e),c∈Ccthen we write ∫F (c, c) or ∫ F (c, c) for wc , and ic for ec .
cExample 2.2.17. If F is a bifunctor from C to Set, its coend ∫ F (c, c) is
a quotient of the coproduct ∑c∈C F (c, c). More precisely, it is the coproduct∑c∈C F (c, c) quotiented by the equivalence relation generated by equating an element x in F (c, c) and an element x′ in F (c′ , c′ ) if there is a morphism f ∶ c → c′and an element x′′ in F (c′ , c) such that F (f, c)(x′′ ) = x and F (c′ , f )(x′′ ) = x′ .
58

If P is a preorder viewed as a category and F is a bifunctor from C to P,cthen the coend of F is computed as a join. We get the formula ∫ F (c, c) =⋁c∈C F (c, c).
There are a few formulas to compute ends and coends, which are sometimes
called “end and coend calculus”. Here are two such formulas:
Proposition 2.2.18. If F is a bifunctor from C to D, then the following holds:• ∫c [d, F (c, c)] ≅ [d, ∫c F (c, c)],c

• ∫c [F (c, c), d] ≅ [∫ F (c, c), d].
There is also a formula to make ends commute:
Proposition 2.2.19 (Fubini theorem). If F ∶ Cop × Dop × C × D → E is a functor, then if either side of ∫c ∫d F (c, d, c, d) = ∫d ∫c F (c, d, c, d) exists, the equality
holds.
There are other interesting formulas, but we leave them for the next section,
since they will appear more naturally in the framework of Kan extensions.

2.2.4

Kan Extensions
Required: 2.2.3.
Recommended: ∅.

The Kan extension of a functor F ∶ C → D along K∶ C → C′ can be thoughtof as a canonical way of extending F to a functor from C′ to D.
Definition 2.2.20. Let C, C′ and D be categories, and F ∶ C → D and K∶ C → C′
be functors. The left (resp. right) Kan extension of F along K, denoted by
LanK (F ) (resp. RanK (F )), is a functor from C′ to D equipped with a naturaltransformation η∶ F → LanK (F )K (resp. ε∶ RanK (F )K → F ) that is universal
in the sense that, for all functors G∶ C′ → D and natural transformations λ∶ F →GK (resp. λ∶ GK → F ), λ factors uniquely as λ = (µ⋅K)○η (resp. λ = ε○(µ⋅K)).
Under some hypotheses on D which we now describe, Kan extensions can be
expressed in terms of ends and coends, so we can compute concrete values ofKan extensions.
Definition 2.2.21. A category C is powered [60] (or cotensored) if, for all
objects c of C and sets X, there is an object cX of C equipped with a natural
isomorphism C(−, cX ) ≅ Set(X, C(−, c)).
Dually, a category C is copowered if, for all objects c of C and set X,
there is an object X ⋅ c of C equipped with a natural isomorphism C(X ⋅ c, −) ≅Set(X, C(c, −)).
These definitions actually make sense in the broader sense of enriched category theory, but we only state them in the case of category theory, since wewill only need the results in this case.

59

Example 2.2.22. The category Set is powered and copowered. The power object
Y X is the set of functions from X to Y . The copower object X ⋅Y is the cartesian
product X × Y .
The category 2, which is defined as the ordinal 0 → 1 seen as a category, isalso powered and copowered. The power objects are defined as:{0∅ = 1
0X = 0

1X = 1.

otherwise

The copower objects are defined as:
X ⋅0=0{∅⋅1=0
X ⋅1=1otherwise.

The following property can be found, for example, in [76].
Property 2.2.23. If D is powered, the right Kan extension of F along K is′′given by the formula RanK (F )(c′ ) = ∫c∈C F (c)C (c ,Kc) .
Similarly, if D is copowered, the left Kan extension of F along K is givenc∈C ′by the formula LanK (F )(c′ ) = ∫C (Kc, c′ ) ⋅ F (c).
Notation 2.2.24. When F ∶ C → D is a functor and X is a presheaf over C,
we denote by ∑F (X) the left Kan extension of X along F op and by ∏F (X) its
right Kan extension along F op .
Using the descriptions of ends and coends in Set, we may give explicit descriptions of ∑F (X) and ∏F (X).
Proposition 2.2.25. The left Kan extension ∑F (X) is given at d by the coendc∑F (X)(d) ≅ ∫ X(c)×[d, F c], which is the coproduct ∑c X(c)×[d, F c] quotiented by the equivalence relation generated by equating (x ⋅ f, g) (with x in X(c)and g∶ d → F c) and (x, (F f )g) for all f ∶ c → c′ .
We may recast this description in a more graphical way by depicting elementsof ∑F (X)(d) as pairs of arrows 1 → X(c) and F c ← d, and the equivalence
relation on elements is generated by “commuting diagrams” of the form:
1⌜x⌝⌜x⋅f ⌝
X(f )

X(c)
F (c)

F (f )g

X(c′ )
F (c′ )F (f )gd.
Proposition 2.2.26. The expression of the right Kan extension ∏F (X) at d
is ∏F (X)(d) ≅ ∫c [[F c, d], X(c)], which we recognise to be the set of naturaltransformations from the presheaf [F −, d] to X.
Lemma 2.2.27. For any discrete fibration p∶ E → B, presheaf X over E, andobject b in B, we have ∑p (X)(b) ≅ ∑p(e)=b X(e), where ∑ means left Kan extension on the left and disjoint union on the right.
60

e

Proof. We know that ∑p (X) is given at b by ∑p (X)(b) ≅ ∫ X(e) × [b, p(e)].
But p is a discrete fibration, so all morphisms g∶ b → p(e) have a cartesian liftinge ↑ g∶ (e ⋅ g) → e, so each pair of an element of X(e) and morphism g∶ b → p(e) is
equated in ∑p (X)(b) with a pair whose second member is an identity by:
1⌜x⋅X (e↑g)⌝⌜x⌝
X(e↑g)X(e)p(e)

X(e ⋅p g)p(e ⋅p g)

p(e↑g)
g

b.
f1

x1

f2

x2

Now, let us consider (1 Ð→ X(e1 ), p(e1 ) ←Ð b) and (1 Ð→ X(e2 ), p(e2 ) ←Ð b)that are identified in a single step in ∑p (X)(b), i.e., there is a “commuting
diagram” of the form:
1
⌜x1 ⌝

1
⌜x2 ⌝

X(g)

X(e1 )p(e1 )

X(e2 )p(e2 )

p(g)
f1

⌜x1 ⌝

or

f2

⌜x2 ⌝
X(g)

X(e1 )p(e1 )p(e2 )p(g)f1bX(e2 )

f2b.

We want to show that (x2 , f2 ) is equated with (x1 ⋅X (e1 ↑ f 1), id b ) in a single
step. Because (x1 , f1 ) is identified in a single step with (x1 ⋅X (e1 ↑ f1 ), id b )through the diagram shown above, we get the desired result in the right-handcase by simply composing g and e1 ↑ f1 . In the left-hand case, since (x2 , f2 )is equated with (x2 ⋅X (e2 ↑ f2 ), id b ) in one step, we simply need to show thatx2 ⋅X (e2 ↑ f2 ) = x1 ⋅X (e1 ↑ f1 ), which comes from the facts that e1 ↑ f1 = g(e2 ↑f2 ) (by uniqueness of cartesian lifting) and that x1 ⋅ g = x2 (by commutation of
the diagram above).
Therefore, if two elements are equated, by induction on the length of the
zigzag that equate them, they are both identified with the same pair (1 →x
X(e), p(e) = b) in a single step. We thus have that two pairs (1 Ð
→ X(e), p(e) =x′b) and (1 Ð→ X(e′ ), p(e′ ) = b) can only be identified if e = e′ and x = x′ . We
thus have that ∑p (X)(b) is isomorphic to the coproduct ∑p(e)=b X(e).
We also have the dual property:
Lemma 2.2.28. For any discrete opfibration p∶ E → B, presheaf X over E, andobject b in B, we have ∏p (X)(b) ≅ ∏p(e)=b X(e), where ∏ means right Kan
extension on the left and product on the right.
Proof. We have that ∏p (X)(b) is isomorphic to the set of natural transformations [[p−, b], X], so we want to show that this set is isomorphic to ∏p(e)=b X(e).
First, we send any natural transformation α∶ [p−, b] → X to the product(αe (id b ))p(e)=b . To show that this mapping is injective, we show that α is61determined by the product. To prove this, let us take f ∶ p(e) → b and show thatαe (f ) must necessarily be a value that only depends on the product. Because
p is a discrete opfibration, f has a cartesian lifting f ↑ e∶ e → (f ⋅p e). Therefore,by naturality of α, we have that αe (f ) = αf ⋅p e (id b ) ⋅X (f ↑ e).
Conversely, let us take a product (xe )p(e)=b and define α to be the transformation given by αe mapping f ∶ p(e) → b to xf ⋅p e ⋅X (f ↑ e). This mapping isnecessarily injective, because αe (id b ) = xe for all antecedents e of b. It thus only
remains to show that α is natural, i.e., that for all f ∶ p(e′ ) → b and g∶ e → e′ ,xf ⋅p e′ ⋅X ((f ↑ e′ )g) = x(f p(g))⋅p e ⋅X (f p(g) ↑ e), which follows from uniqueness ofcartesian lifting.
Let us also give two simple examples of left and right Kan extensions related
to game semantics to give some intuition about them. The basic idea is thatleft Kan extension is a sort of existential quantifier, while right Kan extension
is a sort of universal one.
Example 2.2.29. Let σ be a behaviour on (A, B), i.e., a prefix-closed set ofviews (we leave the exact setting we are working with ambiguous, but the reader
may think of classical HON games if they want a precise setting). We denote by
VA,B the poset of views on the pair of arenas (A, B) and by iA,B the embeddingof VA,B into PA,B . With these notations behaviours can also be seen as functors
from VA,B to 2 (the ordinal 0 → 1 seen as a category). Indeed, if a view v is
accepted by σ, then we map it to 1, and to 0 otherwise, and functoriality ensures
prefix-closedness.
We can take the right Kan extension of σ along iop
A,B , which we denote by
P
(i
v,p)
(σ),
and
it
is
given
at
p
by
. Since∏iA,B (σ) = Raniop∫v∈VA,B σ(v) A,B A,B
A,B

2 is an order, the formula reduces to ∏iA,B (σ)(p) = ⋀v∈VA,B σ(v)PA,B (iA,B v,p) .
Since 0∅ = 1X = 1 (for any set X) and 0X = 0 (for any non-empty X), theformula above reduces to ∏iA,B (σ)(p) = ⋀iA,B v→p σ(v). In other words, ∏iA,B (σ)
accepts to play p if and only if σ accepts to play all views v of p. This is theinnocence condition (defined in Section 2.1.1) imposed on innocent strategies.
∏iA,B thus turns a behaviour into the corresponding innocent strategy.
Let σ be a “strategy” on PA,B,C , i.e., a functor Pop
A,B,C → 2 (typically theparallel composition of a strategy on (A, B) and a strategy on (B, C)). We canopoptake the left Kan extension of σ along πA,C
∶ Pop
A,B,C → PA,C , and it is given by
u∈P

A,B,C
PA,C (p, πA,C u) ⋅ σ(u). Again, since 2 is an order, this
∑πA,C (σ)(p) = ∫reduces to ∑πA,C (σ)(p) = ⋁u∈PA,B,C PA,C (p, πA,C (u))⋅σ(u). Since ∅⋅1 = X ⋅0 = 0(for any set X) and X ⋅ 1 = 1 (for any non-empty X), the formula above reducesto ∑πA,C (σ)(p) = ⋁πA,C u=p σ(u), assuming that all morphisms p → πA,C u canπA,C fbe factored as p = πA,C u0 ÐÐÐ→ πA,C u. In other words, ∑πA,C (σ) accepts toplay p if and only if σ accepts to play at least one interaction sequence u whose
projection on (A, C) is p. This is typically the hiding operation, which hides
what happens on the middle arena when two strategies are composed (as definedin again Section 2.1.1).
In the cases we are interested in, namely presheaves, if F ∶ C → D, then∑F ∶ C → D, ∏F ∶ C → D, and ∆F ∶ D → C.
Since we will be especially interested in presheaves, the following lemmas will
be of some importance to us. The following lemma is named after the classical
⋀

⋀

⋀

⋀

⋀

⋀

62

Yoneda lemma (Property 2.2.37).
Lemma 2.2.30 (Yoneda lemma). Let C be a category and X a presheaf on C
(i.e., a functor X∶ Cop → Set), then X(c) ≅ ∫c′ [[c′ , c], X(c′ )].
Lemma 2.2.31 (co-Yoneda lemma). Let C be a category and X a presheaf onc′C, then X(c) ≅ ∫ X(c′ ) × [c, c′ ].
Proof. The first lemma may be seen directly, because [c′ , c] = yc (c′ ), so theformula reduces to ∫c′ [yc (c′ ), X(c′ )], which is isomorphic to the set of natural transformations from yc to X by Example 2.2.14, and thus to X(c) by
the classical Yoneda lemma. However, it may be interesting to remark that′′∫c′ [[c , c], X(c )] is also the expression of right Kan extension of X along theopidentity of C . But right Kan extension of a functor along the identity is always
isomorphic to the given functor, whence the result.
This also helps us understand why the second formula is called the co-Yoneda
lemma. Indeed, the formula simply exhibits X as the left Kan extension of itself
along the identity, which is dual to what happens in the Yoneda lemma.

2.2.5

Presheaf Categories
Required: ∅.
Recommended: ∅.

Presheaves are so important in this dissertation that they definitely deserve their own section. We will use them extensively to model both plays
and strategies. The intuition is that we want plays to be some kind of higherdimensional graphs and strategies to be some kind of trees, and both graphs
and trees are straightforward examples of presheaf categories.
Definition and Basic Properties
Definition 2.2.32 (Presheaf). A set-valued 1 presheaf over the category C isa functor from Cop to Set, the category of sets and functions.
Presheaves over C and natural transformations form a category [Cop , Set]
that we denote by C.
⋀⋀

Notation 2.2.33. For any presheaf X in C, x ∈ X(c) and f ∶ c′ → c, we denoteby x⋅f the action of X(f ) on x, i.e., x⋅f = X(f )(x). Note that, by functoriality,
we have that (x ⋅ f ) ⋅ g = x ⋅ (f g).
A very important property of the category of presheaves is the following:⋀

Property 2.2.34. If C is small, then C is complete and cocomplete, and limits
and colimits are computed pointwise.
⋀

In other terms, to compute the (co)limit of a functor F ∶ J → C, we think of
it as a functor J × Cop → Set and compute the (co)limit for c fixed in C, andthis assignment uniquely extends to a presheaf that is the desired (co)limit. Or,
1 We will always assume that presheaves are set-valued in the following, except when explicitly stated otherwise, so we call set-valued presheaves simply presheaves.

63

more concisely, (lim F )(c) ≅ lim(F c). (This comes from the more general fact
that, if D has (co)limits of a certain shape J, then so does [C, D], and these(co)limits are computed pointwise, as explained in [76].)
This property is very important for us because it allows us to combine theobjects we model as presheaves using limits and colimits. For example, inthe case of plays, we can use constructions that “glue” further plays together
to create different plays, and this is done using colimits (especially pushouts).
Composition of plays is, in particular, defined using pushouts.
Definition 2.2.35 (Yoneda embedding). Let A be a category. We define theYoneda embedding of A into A as the functor y whose value on a is ya = [–, a],and which acts on morphisms by pre-composition.
⋀

Note that the Yoneda embedding is indeed an embedding.
Property 2.2.36. The Yoneda embedding y is full.
Property 2.2.37 (Yoneda lemma). For all objects a of A and presheaf X overA, there is an isomorphism [ya , X] ≅ X(a) natural in a.
A nice, visual way of representing presheaves is through their categories of
elements.
Definition 2.2.38 (Category of Elements). For any presheaf X on A, we define
X’s category of elements as the comma category
!

el(X)
πX

λ

1
⌜X⌝
⋀

A

y

A

together with its projection πX ∶ el(X) → A.
Recall from the definition of comma categories (Section 2.2.1) that an objectof el(X) is a pair (a, x) of an object a of A and an element x ∈ X(a), and thatmorphisms from (a, x) to (a′ , x′ ) are exactly morphisms f ∶ a → a′ such thatx′ ⋅ f = x. The projection πX projects an element (a, x) onto its first component
a. Even though it may be a bit mysterious why categories of elements are visual
way of representing presheaves for now, the examples below should convince thereader that it is indeed the case.
Examples: Graphs and Trees
We now want to show how this notion adequately models the classical notionsof graphs and trees.
Modelling graphs will give us the intuition of how to model plays in ourgames, since they are some sort of higher-dimensional graphs.
Example 2.2.39 (Graph: Running Example). Let us be more precise about
what we mean by “graph”, since there are many different notions of graphs.
What we call graph is what may more accurately be called directed multi-graph,i.e., edges have a direction, and there may be more than one edge between two
vertices. Let us take the graph below as our running example.
64

y

b
γ

β

α

δ
x

ε

a

c

Formally, a graph is a set of vertices, a set of edges, and two maps from theset of edges to the set of vertices that map each edge to its source and target
respectively. For example, the drawing above is a representation of a graphwith five vertices V = {x, y, a, b, c}, five edges E = {α, β, γ, δ, ε}, and two mapss, t∶ E → V that map each edge to their source and target respectively, as on thedrawing (for example, s(α) = x and t(α) = y).
The formal representation of graphs is very easily cast as a presheaf category:
Example 2.2.40 (Graphs). Let G be the category freely generated by the graphs⋀[0] ⇉ [1]. The category of graphs is G.
t

Indeed, a presheaf G over G is a functor Gop → Set, i.e., two sets V = G([0])
and E = G([1]) together with two functions G(s), G(t)∶ V → E. That is, apresheaf G is simply a set of vertices V and a set of edges E together with twomaps that give, for each edge e in E, its source G(s)(e) and target G(t)(e).
Moreover, a morphism of presheaves α from G to H is a natural transformation from G to H, i.e., a pair of functions α0 ∶ G([0]) → H([0]) andα1 ∶ G([1]) → H([1]) such that both diagrams below commute.
G([1])α1

G(s)G([0])

H([1])

G([1])

H(s)
α0

α1

G(t)

H([0])

G([0])

H([1])
H(t)α0

H([0])

In other words, such a natural transformation is a map of the vertices of G to
those of H and a map to the edges of G to those of H that respect sources andtargets. This is exactly the definition of a morphism of graphs.
Once we have modelled graphs as presheaves, we can instantiate the general
theory of presheaves to graphs, for example the Yoneda lemma:
Example 2.2.41 (Graphs and the Yoneda Lemma). In the case of graphs, theYoneda lemma simply states that the number of nodes in a graph G is equal
to the number of morphisms from the graph y[0] to G, and similarly for edges:
the number of edges in G is equal to the number of morphisms from the graphy[1] to G. The question is: What are y[0] and y[1] ? The former is the presheafG(–, [0]), i.e., y[0] ([0]) = G([0], [0]) = {id [0] } and y[0] ([1]) = G([1], [0]) = ∅,so it is the graph with one node and no edge. The second one is G(–, [1]), i.e.,y[1] ([0]) = G([0], [1]) = {s, t} and y[1] ([1]) = G([1], [1]) = {id [1] }, so it is agraph with two nodes and one edge, and the action of morphisms show which
nodes are the source and target of the edge: y[1] (s)(id [1] ) = id [1] ○ s = s andy[1] (t)(id [1] ) = id [1] ○ t = t. We thus have that y[0] is the graph and y[1] is thegraph. In other words, the Yoneda lemma simply states that there are
as many nodes in a graph G as there are morphisms from the “one-node graph”
to G and as many edges in G as there are morphisms from the “one-edge graph”
to G.
65

Finally, the example of graphs is enlightening as to why the category ofelements is a nice representation of a presheaf:
Example 2.2.42 (Graphs and Categories of Elements). Let G be a presheaf
over G. Its category of elements el(G) has as objects ([0], x) for all x in G([0])
and ([1], y) for all y in G([1]). Since, in the category of elements, morphisms(a, x) → (a′ , x′ ) are simply the morphisms f ∶ a → a′ such that x′ ⋅ f = x andthe base category G only has two non-trivial morphisms, we have that, except
for identities, the morphisms in el(G) are exactly of two possible forms: eitherst([0], e ⋅ s) Ð→ ([1], e) or ([0], e ⋅ t) Ð→ ([1], e) for any edge e.
For example, the category of elements of the graph y[1] is([0], s)s([1], id [1] )([0], t)t(where we omit the identities for readability). If we decide to draw elements ofthe form ([1], –) and the corresponding pair of arrows (s, t) as an arrow pointing
towards the source of t, we recover the graphic representation of the graph westarted from:([0], s)([0], t),which is indeed the graph with only one arrow.
Similarly, the category of elements of our running example is([0], y)([0], b)tt([1], α)s([0], x)([1], β)s([0], a)tss([1], γ)([1], δ)([1], ε)tts([0], c),from which we readily recover the description of the graph, using the same notation as above.
We may elaborate a bit further on this example by tweaking the base category. We can for example add an arrow r∶ [1] → [0] to G and equations rt = id [0]and rs = id [0] to obtain the category of (directed multi) reflexive graphs. The
following extension is of particular interest to us because it is a way to define
higher-dimensional graphs (even though our notion of higher-dimensional graphwill be based on a slightly different approach):
Example 2.2.43 (Globular Sets). Let G∞ be the category freely generated by
the graph with a vertex [n] for each natural number n ∈ N, and edges sn , tn ∶ [n] →[n + 1], quotiented by the equations
sn+1 sn = tn+1 sn

andsn+1 tn = tn+1 tn .

We call G∞ the globe category. A globular set is a presheaf on G∞ . In simpler
terms, a globular set G is a set of vertices G([0]) (which we call 0-cells), a
set of edges G([1]) (which we call 1-cells), a set G([2]) of 2-cells, etc, and for66each (n + 1)-cell a source n-cell and a target n-cell, with the condition that thesource and target n-cells agree on their own sources and targets. 2-cells canthus be thought of as “edges between parallel edges”, 3-cells as “edges between
parallel 2-cells”, and so on, which is for example the type of n-morphisms insome approaches to higher category theory or the type of path homotopies.
A second example of what may naturally be modelled by presheaves is thatof trees, which will also be useful to model plays, since our plays are also trees
in some sense. (We will always assume that trees are rooted, i.e., that they havea distinguished root.)
We show two possibilities to represent trees as presheaves. The first one isslightly more natural, but not so relevant to us, since this is not how we will
represent our plays:
Example 2.2.44 (Trees, first presentation). Let ω be the countable ordinal
category. A forest (of rooted trees) is a presheaf over ω. Indeed, such a presheaf
F has for each n ∈ N a set F (n) of nodes at depth n with, for each such nodex ∈ F (n + 1), a parent node x ⋅ sn (where sn is the only morphism from n ton+1), which is indeed a forest. A tree is a presheaf T over ω such that T (0) is asingleton set. The category ω is sometimes known as the topos of trees, which issomewhat fitting, since all presheaf categories are toposes (though a more fitting
name would probably be the topos of forests).
A natural transformation α∶ T → T ′ is a family of maps αn T (n) → T ′ (n) for
all i ∈ N such that, for all n ∈ N,⋀

T (n + 1)

αn+1

T ′ (n + 1)

T (sn )T (n)T (sn+1 )

T (n)
′

αn

commutes. In other words, it is a mapping of the nodes of T to those of T ′that respects depth (T (n) is mapped to T ′ (n)) and the parent relation, which
is a possible, natural definition of morphism of forests. Similarly, a naturaltransformation between trees is a possible, natural definition of morphism oftrees.
Here again, once we have defined trees (or forests) as presheaves on a particular category ω, the whole presheaf-theoretic lemmas give us some properties:
Example 2.2.45 (Trees and the Yoneda lemma). Here, the presheaf yn is given{m ≤ n} if m ≤ n
by yn (m) = {where m ≤ n is the unique morphism from∅otherwise,
m to n, when m is smaller than or equal to n, so yn (m) is either a singleton
or empty. Since each yn (m) is either empty or a singleton set, there is only
one possible action for morphisms. The presheaf yn is thus a tree (since it hasa single root yn (0) = {0 ≤ n}) with a single node at depth m for all m less thanor equal to n, and is empty below depth n. It is thus a branch of length n. The
Yoneda lemma now states that there are as many morphisms of trees from thebranch of length n into a forest F as there are nodes at depth n in F .
Finally, this presentation of trees also allows us to show once more why
categories of elements are nice visual representations of presheaves:67

Example 2.2.46 (Trees and Categories of Elements). Let us compute a few
categories of elements. For example, let us take yn . As we have seen above,yn (m) is a singleton set {m ≤ n} if m is smaller than or equal to n and empty
otherwise, with the only possible action for morphisms. Its category of elements
thus has as elements all the pairs (m, m ≤ n) for m smaller than or equal to n
and is as pictured below:(0, 0 ≤ n)

0≤1

(1, 1 ≤ n)

1≤2

...

n−1≤n

(n, n ≤ n)(where we only show the m ≤ m + 1 maps, and the other maps are obtained bycomposition). We recover the graphical representation of a branch.
Let us now take the full infinite binary tree T . This tree can straightforwardly
be encoded as a presheaf over ω by taking T (n) = {l, r}n and where the actionof a morphism m ≤ n is given by prefix: T (m ≤ n)(w) = w∣m . Therefore, in the
category of elements, there will be a morphism (m, w) → (n, w′ ) exactly when w
is a prefix of w′ . If we draw this category of elements, we obtain:

1≤2

2≤3

...

2≤3

...

2≤3

...

2≤3

...

2≤3

...

2≤3

...

2≤3

...

2≤3

...

(2, rr)(1, r)
1≤2

0≤1(2, rl)(0, ε)
0≤1

1≤2(2, lr)(1, l)
1≤2(2, ll)(where, once again, we only picture the m ≤ m + 1 morphisms). Here again, we
recover the graphic representation of the object through its category of elements.
The second possibility is the one that will be more relevant to us. It consists
in inductively building trees as particular graphs:
Example 2.2.47 (Trees, second presentation). Trees are particular pointed presheaves over G (elements of the coslice category y[0] /G), i.e., particular morphisms y[0] → T in G. In this description, T represents the “unrooted” tree structure and the morphism itself points to the root (remember that, from the Yoneda
lemma, a morphism y[0] → T is the same as an element of T ([0])). They are(isomorphic to any presheaf ) defined inductively by:⋀⋀• a single node id y[0] ∶ y[0] → y[0] is a tree,• if r∶ y[0] → T is a tree and n∶ y[0] → T is a node of T , then f r∶ y[0] → T ′ isa tree, where T ′ and f are obtained by pushout as below.
68

s

y[0]

y[1]

n

y[0]

T

r

T′

f

The inductive case in the definition above simply states:• that if T is a tree, by picking a node n of T (represented by the morphismn∶ y[0] → T ) and adding an edge to T whose source is n, the resulting graphis still a tree;• and that all trees can be built in this way (so the category we are building
is actually that of finite trees).
⋀

A morphism of trees is a morphism in y[0] /G, i.e., a morphism from r∶ y[0] → T
to r′ ∶ y[0] → T ′ is a morphism f ∶ T → T ′ such that
y[0]
r′

r

T

T′

f

commutes. In other words, it a morphism of graphs that preserves the root,
which is exactly a morphism of trees.
This example can also be tinkered with by adding different kinds of nodes
and edges, which is something we do when we model our plays.
Remark. Since plays are finite objects (they are basically execution traces), thefiniteness of the objects we build is actually a feature, rather than a limitation.
Had we wanted to model all trees (and not only finite ones) using the second
method, we could have relied on transfinite composition by adding the following
rule:⋀• for all limit ordinals β and cocontinuous functors F ∶ β → y[0] /G such thatrαF (α) = y[0] Ð→ Tα is a tree for all α, the morphism r∶ y[0] → T obtained
as part of the cocone associated to the colimit below is also a tree:
y[0]
r0

rα
r1

T0

T1

...

Tα

...

r

T.
A final example that should give all the necessary intuition to understandthe representation of plays as string diagrams is that of binary trees. Indeed,
until now, the categories of trees contain trees with arbitrary branching: a node
can have a set of children. We want to build a category of binary trees, i.e., eachnode has either zero or two children. We will proceed in a way that is similar
to the second presentation of trees that we have given above.
69

Since our inductive rule adds one edge to a tree, we first need to change it
so that it adds two edges from the same node. We define the basic binary tree
B as the coproduct:2⋅t2 ⋅ y[0]2 ⋅ y[1]
(2.1)
∇
lB
y[0]

B.

rB

It consists of a root (pointed by rB ) with two children that are leaves. We can
now change the rule to:• if r∶ y[0] → T is a binary tree and n∶ y[0] → T is a node of T , then f r∶ y[0] →T ′ is a binary tree, where T ′ and f are obtained by pushout as below.
y[0]

rB

B

n

y[0]

T

r

f

T′

However, this cannot work, since we can apply the inductive rule to a node
twice, so the trees built this way are not binary at all (this construction simply
constrains all nodes in a tree to have an even number of children). To make sure
we do not use the inductive rule on the same node twice, we must keep track ofwhich nodes are leaves and which nodes already have children.
A simple idea to do this is to put two different types of nodes in the basecategory G: one for leaves and one for nodes. However, this is a bad idea for
two reasons.
• First, we would need to duplicate the type of edges: there must be a typeof edges that point to a node and a type of edges that point to a leaf. Thebase category G would then look like
eN
t

s

eL
t

N

s

L,

where N stands for “node” and L for “leaf”. Therefore, the creation oftrees becomes more involved: once we have found a leaf in the tree, wemust change its type to that of a node, change the type of the arrow thatpoints to that leaf to the type of an arrow that points to a node, andfinally, we can take the pushout along yN → B (where B is the obvious
counterpart of the B defined above in this setting). This construction is
not nice in the sense that it cannot be computed using limits and colimits.
• But the really problematic point is that the change made in the basecategory has an impact on the notion of morphism: nodes can only bemapped to nodes, and leaves only to leaves. This is obviously not thenotion of morphism we are interested in, so this construction is not what
we should do.

70

The idea of pointed presheaves y[0] → T is that the morphism distinguishes
the root of T from the other nodes. We are going to do something similar herelby giving another morphism Y Ð→ T from the set X of leaves of T to T .
2⋅s

Example 2.2.48 (Binary trees). Let l∶ 2 ⋅ y[0] → B be the composite 2 ⋅ y[0] Ð→lB

2 ⋅ y[1] Ð→ B, where B and lB are defined in (2.1). A move is any cospan
l

r

Y Ð
→U ←
Ð X that is isomorphic to that obtained as a pushout
2 ⋅ y[0]

Y
l

lB

B
∅

U
Z

rB

r

y[0]

X,

where Z is a coproduct n ⋅ y[0] , and l and r are obtained by universal property of
pushout. We define the composition of two cospans Y → U ← X and Z → V ← Y
as the cospan Z → U ● V ← X defined as
Z

X

Y

V

U

U ●V.

A forest of binary trees is a cospan of presheaves Y → F ← X that is isomorphic
to a finite composite of moves. A binary tree is a forest of binary trees of theform Y → F ← y[0] .
We now have at least two natural notions of morphism of forests.
• If Y → F ← X and Y ′ → F ′ ← X ′ are two forests, then a morphismof forests is a natural transformation F → F ′ . This yields the notion ofmorphism of (unrooted) forest, i.e., of morphisms that do not necessarily
preserve the roots of forests.
• If Y → F ← X and Y ′ → F ′ ← X ′ are two forests, then a morphism offorests is a triple of natural transformations X → X ′ , F → F ′ , and Y → Y ′such that
Y

Y′

F

F′

X

X′

commutes. This yields a slightly strange notion of morphism of forests.
Such a morphism preserves not only the roots of forests, but also theirleaves.
71

However, the usual notion of morphism of rooted forests is given by a pair ofmorphisms F → F ′ and X → X ′ such that
Y

Y′

F

F′

X

X′

commutes.
Equivalence to Discrete Fibrations
Required: 2.2.2, beginning of 2.2.5.
Recommended: ∅.
The adjoint equivalence between the category of presheaves over A and thatof discrete fibrations into A is well known. However, we have found no clear
and complete account of this fact, especially one that exhibits the equivalence,so we decided to write it here in case it would be of general interest.
We start by recalling a similar, simpler result:
Proposition 2.2.49. For any set I, let FamI be the category of families ofsets indexed by I, whose objects are families {Xi }i∈I and whose morphisms from{Xi }i∈I to {Xi′ }i∈I are families of functions {fi ∶ Xi → Xi′ }i∈I . FamI is equivalent
to [–, I].
Example 2.2.50 (Hogwarts School of Witchcraft and Wizardry 2 3 ). Hogwarts School of Witchcraft and Wizardry is divided into four houses: Gryffindor,
Hufflepuff, Ravenclaw, and Slytherin. Each student at Hogwarts belongs to exactly one of these four schools. This may be represented in two equivalent ways:• by giving a family of sets of students, indexed by houses:
XGryffindor = {Harry Potter, Ronald Weasley, Hermione Granger, . . .},XHufflepuff = {Cedric Diggory, Ernie Macmillan, Hannah Abbot, . . .},XRavenclaw = {Luna Lovegood, Cho Chang, Padma Patil, . . .},XSlytherin = {Draco Malfoy, Vincent Crabbe, Gregory Goyle, . . .},• by giving a map from the set of students to that of houses:
Harry Potter ↦ Gryffindor,
Ronald Weasley ↦ Gryffindor,
Cedric Diggory ↦ Hufflepuff,...
This can be represented by the drawing below, where the set of students isrepresented at the top and that of houses at the bottom.
2 Thanks to Ed Morehouse, who gave this ludic example during OPLSS 2015.
3 All Harry Potter© characters, names, and places belong to J. K. Rowling and are used
under fair copyright law.

72

AbbotDiggory

Potter...

Gryffindor

Macmillan
...

Patil
Chang
Lovegood...

Malfoy...

Hufflepuff

Ravenclaw

Slytherin

The map that assigns each student to their house is the “vertical projection”
map, while the indexed family associates to each house the set “above” it.
In the general case, the equivalence works as follows:• to turn f ∶ X → I into an indexed family, we organise X into the fibres off (formally, f is mapped to the indexed family {f −1 (i)}i∈I ),• to turn {Xi }i∈I into a map, we amalgamate all the different Xi ’s into one(formally, this family is mapped to the function from ∑i∈I Xi to I thatmaps (i, x) to i).
It is then simple to show that this forms an equivalence.
We now set out to prove the equivalence between the category of presheaves
over A and that of discrete fibrations into A. The intuition is the same asabove, except that there are now morphisms involved: presheaves correspondto families indexed by I (a presheaf X maps each a in A to a set X(a)), while
discrete fibrations into A correspond to maps into I.
A presheaf X associates to each a in A a set X(a), and to each morphismf ∶ a → a′ a function – ⋅ f ∶ X(a′ ) → X(a). This can be pictured as follows:

X(a)
⋅
⋅

A

⋅

a

–⋅f

f

X(b)

X(c)

⋅
⋅
⋅
⋅

⋅
⋅
⋅
⋅

–⋅g

⋅

g

b

⋅

c

X(d)
–⋅h

⋅
⋅

h

d

⋅

For p∶ E → A to be a discrete fibration means that for each f ∶ a → a′ , we candefine a map from the fibre p−1 (a′ ) to p−1 (a) that maps x to x ⋅p f , the domainof the lifting of x along f . If we want to represent this fact in a picture similar
to the previous ones, it looks like the picture below. What should be noticed on
this picture is that, for a given x in the fibre of p over, say, c, there is exactly
one morphism over g whose codomain is x.

73

E

B

⋅
⋅
⋅
⋅

⋅
⋅

⋅

a

f

⋅
⋅
⋅
⋅

⋅

g

b

⋅

c

⋅
⋅

h

⋅

d

The idea is then simply to organise E into the fibres of p to recover a presheaf
over A, and conversely to turn a presheaf into a discrete fibration by amalgamating all the X(a)’s and the functions between them into a category: its categoryof elements.
Proposition 2.2.51. For any presheaf X over A, the projection πX ∶ el(X) → A
is a discrete fibration.
Proof. Take an object (a, x) of A and a morphism f ∶ a′ → πX ((a, x)) = a. First,
πX (f ∶ (a′ , x ⋅X f ) → (a, x)) = f ∶ a′ → a, so f has an antecedent through πX .
Furthermore, if πX (g∶ (a′′ , x′′ ) → (a, x)) = f ∶ a′ → a, then g = f by definition ofπX , so πX is indeed a discrete fibration.
Conversely, to organise a discrete fibration p into its fibres, we use the following functor:
Definition 2.2.52. Let ∂∶ A → DFibA be the functor that maps a to the domainfunctor ∂a ∶ A/a → A and f ∶ a → a′ to f ○ –∶ A/a → A/a′ .
Proposition 2.2.53. ∂ is well-defined.
Proof. We simply need to show that ∂a is a discrete fibration, as the facts that∂f is a morphism of discrete fibrations and that ∂ is functorial are obvious. We
take an object f ∶ a′ → a of A/a, and a morphism g∶ a′′ → a′ of A. We want
to show that there is a unique morphism to f in A/a that is mapped to g by
∂a . Since g∶ f g → f is such a morphism, existence ensues. Moreover, the only
morphism that is mapped to g is g itself, which proves uniqueness.
Definition 2.2.54 (Nerve Functor). For any functor F ∶ A → B, we define thenerve functor F ⋆ ∶ B → A as:⋀

F ⋆ (b)(a) = [F a, b]
F ⋆ (b)(f ∶ a → a′ ) = {[F a′ , b] → [F a, b]u↦ u(F f )(F ⋆ (u∶ b → b′ ))a = {[F a, b] →v↦

[F a, b′ ]uv.

We think of ∂ as organising X into the fibres of p∶ X → A because:
Proposition 2.2.55. For all discrete fibrations p∶ X → A and objects a of A,
p−1 (a) ≅ ∂ ⋆ (p)(a), naturally in p and a.
74

Proof. For all objects a of A, ∂ ⋆ (p)(a) is the set of morphisms f ∶ A/a → X such
that
f

A/a

X
p

∂a

A
commutes, and p−1 (a) = {x ∣ p(x) = a}.
Let us first show that every f in ∂ ⋆ (p)(a) is determined by its image on id a .
Let us define x = f (id a ). We know by commutation of the triangle above that,for all g∶ a′ → a, p(f (g)) = ∂a (g) = a′ , and if we see g as a morphism g∶ g → id ain A/a, we have that p(f (g)) = ∂a (g) = g. We therefore have that f (g) is a
cartesian lifting of x along g, hence, by uniqueness of the cartesian lifting, f isdetermined by f (id a ).
Moreover, for any x such that p(x) = a, the mapping described above isfunctorial and makes the triangle commute, and therefore yields an f . Commutation of the triangle is obvious by definition. Furthermore, functoriality isgiven by “functoriality” of cartesian lifting (Proposition 2.2.7).
Both sets are thus isomorphic. Naturality in a and p is direct.
We prefer using ∂ ⋆ because it makes diagrammatic reasoning easier.
We finally have:π⋀

Lemma 2.2.56. The pair of functors



A

∂

joint equivalence.

DFibA

is an ad-⋆

Proof. We need to define η∶ Id → ∂ ⋆ π and ε∶ π∂ ⋆ → IdDFibA and show that theyA
are isomorphisms and satisfy the triangle identities.
By Lemma 2.2.55, morphisms of discrete fibrations from ∂a to some p are in
one-to-one correspondence with antecedents of a through p. Let us call x themorphism of discrete fibrations that corresponds to x through this isomorphism.
Remember from the proof that x(id a ) = x.
We define η by defining all its components ηX , which are again naturaltransformations, whose components are ηX,a ∶ X(a) → [∂a , πX ], ηX,a (x) = (a, x).
To prove naturality of ηX , we need to show that, for all f ∶ a′ → a,
⋀

ηX,a

Xa

[∂a , πX ][∂f ,πX ]–⋅f

Xa[∂a′ , πX ]

′
ηX,a′

commutes, which, because morphisms ∂a′ → πX are determined by their image
on id a′ , amounts to showing that (a, x) ⋅πX f = (a′ , x ⋅X f ). Butf(a′ , x ⋅X f )
πX

πX

a

′
f

75

(a, x)πXaexhibits (a′ , x ⋅X f ) as having the property of (a, x) ⋅πX f , so they are equal.
Finally, to prove naturality of η, we need to show that for any α∶ X → Y ,X

ηX[∂, πX ]α[∂,πα ]Y[∂, πY ]ηYcommutes, which amounts to showing that
X(a)

ηX,a

[∂a , πX ]αa[∂a ,πα ]

Y (a)

ηY,a

[∂a , πY ]commutes for all a. It suffices to show that, for all x in X(a), the functors we
obtain are equal when applied to id a , which is the case, since they both map itto (a, αa (x)).
We now define ε by defining its components εp as the functors:π∂ ⋆ (p)(a, g∶ ∂a → p)(f ∶ (a′ , g(A/f )) → (a, g))

→
↦
↦

p
g(id a )g(id a ) ↑p f .

Functoriality of εp is given by Proposition 2.2.7 (functoriality of cartesian lifting). Naturality of ε is given by compatibility of cartesian lifting with morphismsof discrete fibrations (Proposition 2.2.8).
−1
We now show that η and ε are isomorphisms. We define ηX,a
∶ [∂a , πX ] →X(a) as the function that maps f ∶ ∂a → πX to f (id a ) and show that it is an−1−1
inverse to ηX,a . In one direction, (ηX,a○ ηX,a )(x) = ηX,a((a, x)) = (a, x)(id a ) =x. In the other, by recalling that two morphisms of discrete fibrations from−1
∂a are equal if they agree on id a , (ηX,a ○ ηX,a)(f )(id a ) = ηX,a (f (id a ))(id a ) =−1(a, f (id a ))(id a ) = f (id a ). For ε, we define εp as the functor:x(f ∶ x → y)↦↦(p(x), x)(p(f )∶ (p(x), x) → (p(y), y).

It is not difficult to show that ε−1
p is well-defined, i.e., that p(f ) indeed has thedesired domain and codomain. Now, we need to show that ε−1
p is the inverse of
εp . We first show it on objects. In one direction, by noticing that all objects
in el(∂ ⋆ (p)) are of the form (p(x), x) for some object x in X, we get (ε−1p ○−1εp )((p(x), x)) = ε−1
p (x(id p(x) )) = εp (x) = (p(x), x). In the other direction,(εp ○ ε−1p )(x) = εp ((p(x), x)) = x(id p(x) ) = x. We then show it on morphisms. In
one direction, if f is a morphism from (p(x), x) to (p(y), y), then (ε−1p ○εp )(f ) =−1−1
εp (y(id p(y) ) ↑p f ) = εp (y ↑p f ) = p(y ↑p f ) = f because the projection of acartesian lifting along f is necessarily f by definition. In the other direction, if
f is a morphism from x to y, then (εp ○ ε−1
p )(f ) = εp (p(f )) = y(id p(y) ) ↑p p(f ) =y ↑p p(f ) = f by uniqueness of cartesian lifting.
Finally, we show that η and ε satisfy the triangle identities. For the firstequality, we must show (∂ ⋆ ⋅ ε)(η ⋅ ∂ ⋆ ) = Id∂ ⋆ , for which it suffices to showthat both transformations are equal on all components p, for which it again
76

suffices to show that they are equal on all components p, a. We have ((∂ ⋆ ⋅ε)(η ⋅ ∂ ⋆ ))p,a = (∂ ⋆ (εp ))a η∂ ⋆ (p),a , and when applied to f ∶ ∂a → p, ((∂ ⋆ ⋅ ε)(η ⋅∂ ⋆ ))p,a (f ) = (∂ ⋆ (εp ))a (η∂ ⋆ (p),a (f )) = (∂ ⋆ (εp ))a ((a, f )) = εp ○ (a, f ). Sincemorphisms of discrete fibrations from ∂a are determined by their values on id a ,to show that this is equal to f , we just show that they are equal when applied
to id a . ((∂ ⋆ ⋅ ε)(η ⋅ ∂ ⋆ ))p,a (f )(id a ) = εp ((a, f )(id a )) = εp ((a, f )) = f (id a ). For
the second identity, we must show that (ε ⋅ π)(π ⋅ η) = Idπ , which is equivalent toshowing that they are equal on all components. We have that ((ε ⋅ π)(π ⋅ η))X =επX πηX . To show that both transformations are equal on objects, we apply
them to an object (a, x) and get ((ε ⋅ π)(π ⋅ η))X ((a, x)) = επX (πηX ((a, x))) =επX ((a, (a, x))) = (a, x)(id a ) = (a, x). On morphisms, if f ∶ (a′ , x′ ) → (a, x),then ((ε ⋅ π)(π ⋅ η))X (f ) = επX (πηX (f )) = επX (f ∶ (a′ , (a′ , x′ )) → (a, (a, x))) =(a, x)(id a ) ↑πX f = (a, x) ↑πX f = f .
Restriction and Extensions
Required: 2.2.4, beginning of 2.2.5.
Recommended: ∅.
Remember that, if F is a functor from C to D, then it induces three functors
between C and D. The first one is restriction along F op , denoted by ∆F .
When C and D are small, this restriction functor admits left and right adjoints,
respectively given by left and right Kan extension along F op :⋀⋀Lemma 2.2.57. The following adjunctions hold
∑F
⋀

C


∆F


⋀

D.

∏F

Proof. For the top adjunction, it suffices to show that, for all presheaves X over
C and Y over D, [∑F (X), Y ] ≅ [X, ∆F (Y )] naturally, which is given by thefollowing computation:[∑F (X), Y ] ≅ ∫ [∑F (X)(d), Y (d)]d≅ ∫ [∫
dcby Example 2.2.14

X(c) × [d, F c], Y (d)]≅ ∫ ∫ [X(c) × [d, F c], Y (d)]dc≅ ∫ ∫ [X(c), [[d, F c], Y (d)]]cdby Fubini and copower≅ ∫ [X(c), ∫ [[d, F c], Y (d)]]cd≅ ∫ [X(c), Y (F (c))]

by the Yoneda lemmac≅ ∫ [X(c), ∆F (Y )(c)]c≅ [X, ∆F (Y )].
77

Since each step arises as a natural transformations, the whole computation is
also natural.
The idea is the same for the bottom adjunction. Here is the computation:[Y, ∏F (X)] ≅ ∫ [Y (d), ∏F (X)(d)]d≅ ∫ [Y (d), ∫ [[F c, d], X(c)]]cd≅ ∫ ∫ [Y (d), [[F c, d], X(c)]]dc≅ ∫ ∫ [Y (d) × [F c, d], X(c)]cd≅ ∫ [∫cd

Y (d) × [F c, d], X(c)]≅ ∫ [Y (F c), X(c)]by the co-Yoneda lemmac≅ ∫ [∆F (Y )(c), X(c)]c≅ [∆F (Y ), X].

Finally, it will be useful at some point to know what ∆F and ∑F amountto when presheaves are translated to discrete fibrations (at least in some cases),
which is what we explain next.
Lemma 2.2.58. If F ∶ C → D is a functor and Y is a presheaf over D, then thefunctor F̃ ∶ el(∆F (Y )) → el(Y ) that maps (c, x) to (F c, x) and f ∶ (c, x) → (c′ , x′ )to F f ∶ (F c, x) → (F c′ , x′ ) makes
el(∆F (Y ))F̃π∆F (Y )Cel(Y )πYFD

a pullback.
Proof. The proof is direct:• for objects, it suffices to show that an object c of C and an element (F c, x)of el(Y ) have a unique common antecedent in el(∆F (Y )), which is necessarily (c, x),• for arrows, it suffices to show that a morphism f ∶ c → c′ of C and amorphism F (f )∶ (F c, x) → (F c′ , x′ ) of el(Y ) have a unique antecedentin el(∆F (Y )), which is necessarily f ∶ (c, x) → (c′ , x′ ).
Lemma 2.2.59. If F ∶ C → D is a discrete fibration and X is a presheaf over C,
then π∑F (X) ∶ el(∑F (X)) → D is isomorphic to F πX .
Proof. We want to show that there is an isomorphism i∶ el(X) → el(∑F (X))
such that78

el(∑F (X))

i

el(X)

π∑F (X)

πX

C

D

F

commutes. We know that elements of ∑F (X) are pairs of an object d of D anda pair (1 → X(c), F (c) ← d) quotiented by the usual triangle equation. We
can thus define i as the functor that maps (c, x) to (F c, (⌜x⌝ , id F c )) (and maps
f to “pre-composition” by F f ). This functor is not invertible in the generalcase, but because F is a discrete fibration, by Lemma 2.2.27, we have that
∑F (X)(d) ≅ ∑F c=d X(c), so it is indeed invertible.
These results may be rephrased in the following terms: if we denote by∆F ∶ DFibD → DFibC the functor that pulls back along F and by ∑F ∶ DFibC →DFibD the functor that post-composes with F , then
⋀

C

∆F

π

⋀

⋀

D

C

and

π

DFibC

∆F

∑F

π

DFibD

DFibC

⋀

D
π

∑F

DFibD

commute up to isomorphism (the second one only on the condition that F be adiscrete fibration).

2.2.6

Exact Squares
Required: 2.2.4,2.2.5.
Recommended: 2.2.1.

We will use Guitart’s theory of exact squares [45] several times in this dissertation, so we explain it now.
Definition 2.2.60. A square is a natural transformation
T

A
S

C

B

ϕ

V

(2.2)

D.

U

where A, B, C and D are small categories and S, T , U , and V are functors.
Any square yields by restriction a square
⋀

A
∆S

∆T
∆ϕ

⋀

C

⋀

B
∆V
⋀

∆U

D.

Indeed, take a presheaf X over D, ∆ϕ is the natural transformation from XV T
X(ϕa )

to XU S given at a by (∆ϕ )a ∶ X(V (T (a))) ÐÐÐÐ→ X(U (S(a))). This new79

square gives by adjunction (the so-called mate calculus) two further squares ason the left and right:
⋀

A

∆T
∑ϕ

∑S
⋀

C

∆U

⋀

⋀

B

A
⋀

D

C

B

∏ϕ

∆S

∑V
⋀

⋀

∏T

∆V
⋀

D.

∏U

For example, the left-hand one is defined as
∆T

⋀

A

∆ϕ

∑S
εS

∆S

⋀

⋀

C

C

⋀

⋀

B

B
ηV

∆V
⋀

∑V

D,

∆U

where η S and εV come from the adjunctions ∑S ⊣ ∆S and ∑V ⊣ ∆V respectively, and the right-hand square is defined similarly using the adjunctions∆T ⊣ ∏T and ∆U ⊣ ∏U .
Definition 2.2.61. A square ϕ is exact if and only if ∑ϕ is an isomorphism.
The following is well-known:
Property 2.2.62. A square ϕ is exact if and only if ∏ϕ is an isomorphism.
The notion of exactness thus corresponds to commutation up to isomorphismof the two diagrams above.
Remark. Our experience with exact squares suggests that it may be difficult toremember the directions of ∑’s, ∆’s and ∏’s, as well as of the induced naturaltransformations. In an attempt to try and spare the reader a few headaches, ourmnemonic is that the original transformation ϕ points to the ∑’ed functor if weare to reason about ∑ϕ , and from the ∏’ed functor if we are to reason about∏ϕ . Furthermore, induced natural transformations flow along left adjoints andagainst right adjoints (hence along ∑’s for ∑ϕ , and against ∏’s for ∏ϕ ).
Notation 2.2.63. In the following, we will manipulate diagrams of restrictionand extension functors as above. In order to reduce some notational clutter,hats will be omitted and arrows will point in the direction of underlying functors.
This means that ∆ arrows will point in the “wrong” direction, in the sense that if
∆F

⋀

∆F

⋀

F ∶ X → Y , we will write Y ←ÐÐ X for Y ÐÐ→ X . We find that this notation also
spares us the mental overhead of wondering about the direction of underlying
functors and matching over ∏, ∑ and ∆. The price to pay is that when we draw
commuting diagrams, sources and sinks are sometimes less easy to spot. We try
and tame this difficulty by writing our diagrams from left to right (and from top
to bottom for vertical arrows) when possible.
Lemma 2.2.64 (Guitart [45, Theorem 1.2] (zigzag criterion)). A square asin (2.2) is exact if and only if, for all objects c of C, b of B, and morphismsf ∶ U c → V b:
Ug

ϕa

Vh

• there is an object a of A such that f factors as U c Ð→ U Sa Ð→ V T a ÐÐ→
V b,
80

Ug

ϕa

Vh

• and for all two such factorisations U c Ð→ U Sa Ð→ V T a ÐÐ→ V b and
Ug

′

′ ϕa′

′

Vh

U c ÐÐ→ U Sa ÐÐ→ V T a′ ÐÐ→ V b, there exists a commuting diagram (which
Guitart calls a lantern)cg′g

Sa St ⋅ St . . . St
0

Ta

1

⋅

T t0

T t1

n−1

...

T tn−1

⋅ St

Sa′

⋅

T a′

n

h

T tn

h′

b.

Here is a list of useful examples of exact squares:
Lemma 2.2.65 (Guitart [45, Examples 1.14.2 and 1.14.3]). Any comma (resp.
cocomma) square is exact.
Lemma 2.2.66 (Guitart [45, Examples 1.14.1 and 1.14.4]). For any functorf ∶ A → B, the square below left is exact; furthermore, the square below right isexact if and only if f is fully faithful:
A

f

A

B

A
id f

id f

A

A

B

f

f

f

B

Lemma 2.2.67 (Guitart [45, Theorem 1.8]). Exact squares are stable underhorizontal composition.
Lemma 2.2.68. Any square (2.2) in which ϕ and S are identities and V isfully faithful is exact.
Proof. We obtain the given square as the horizontal composite
T

A

T

B

B
V

A

T

B

V

C.

U

The big square is exact by Lemma 2.2.67 because it is the horizontal composite
of two squares that are exact by Lemma 2.2.66.
A slightly more general version of this result is:
Lemma 2.2.69. Any square as in (2.2) in which ϕ is an identity, S is anequivalence, and V is fully faithful is exact.
81

Proof. By the zigzag criterion. Consider a morphism f ∶ U c → V b. Since S isan equivalence, there exists a functor S ′ ∶ C → A and a natural isomorphismf ○(U ηc−1 )U ηcη∶ IdC → SS ′ . We can thus factor f as U c ÐÐ→ U SS ′ c = V T S ′ c ÐÐÐÐÐ→ V b.
Since V is full, f ○ (U ηc−1 ) is the image of some h through V , which gives us thefirst point of the criterion.
U g′

V h′

Now, assume a decomposition of f as U c ÐÐ→ U Sa = V T a ÐÐ→ V b. Because
S is an equivalence, it is in particular full, so g ′ ηc−1 is the image of some kthrough S. Our candidate lantern is then:cηcSS ′ c

g′

Sa

Sk
Tk

T S′c
h

b.

Ta
h′

The top part commutes because Sk = g ′ ηc−1 by definition of k, and the bottom
part commute because it does when V is applied to it, and V is faithful.
Here are two lemmas showing that pullbacks of (op)fibrations are exact
squares (though not in the same direction!):Lemma 2.2.70. Any pullback square (2.2) with V a fibration is exact.
Proof. We proceed by the zigzag criterion. Consider any f ∶ U c → V b. Let us
first establish existence of the desired factorisation, by considering any cartesian
lifting l∶ b0 → b of b along f . We obtain U c = V b0 , hence by universal propertyof pullback a unique a such that c = Sa and b0 = T a. The original f thus factors
as
U (id)idVl
U c ÐÐÐ→ U Sa Ð→ V T a Ð→ V b.
We now need to show that any factorisation is connected to this one by somelantern. So consider any factorisation of f as
Ug

id

Vh

U c Ð→ U Sa′ Ð→ V T a′ ÐÐ→ V b.
Because fibrations are stable under pullback, S is a fibration, so we may pick a
cartesian lifting, say k∶ a′′ → a′ , of a′ along g, so that in particular Sa′′ = c and
Sk = g. Now, we have V T a′′ = U Sa′′ = U c = U Sa = V T a, hence a commuting
square as the bottom part of

82

Tk

T a′′

T a′
h

u

Ta
V Tk

V T a′′bl

V T a′
Vh

V Ta

Vb

Vb

(because V T k = U Sk = U g so V h ○ V T k = f = V l). So by cartesianness of l, we
obtain a dashed u making the top square above commute. But since V u = id ,we have that U (id ) = V u so by universal property of pullback again there exists
a unique w∶ a′′ → a such that Sw = id and T w = u. We thus obtain the following
lantern:
c
g

Sa′
T a′

Sk
Tk

Sa′′
T a′′

Sw
Tw

Sa
Ta

l

h

b,
as desired.
Lemma 2.2.71. Any pullback square (2.2) with U an opfibration is exact.
Proof. By [45, Theorem 1.9], ϕ is exact if and only if ϕop is exact. So, if ϕ isa pullback and U is an opfibration, then ϕop is also a pullback, and its “righthand” morphism is U op , which is a fibration, so ϕop is exact by Lemma 2.2.70,
and thus so is ϕ.

2.2.7

SheavesRequired: 2.2.5.
Recommended: 2.2.1,2.2.4.

While not used as extensively as presheaves, and hidden much deeper inthe details, sheaves are also an essential structure that appears throughout ourwork. They are at the heart of the recasting of innocence in game semantics byHirschowitz [50], later reused by Tsukada and Ong [97].
A presheaf X on C is a sheaf when it has unique amalgamations, whichbasically means that, if we know the value of X on sufficiently many subobjects
fi of c, then we can uniquely recover the value of X at c (we say that the fi ’s
cover c). The intuition comes from topological spaces: if we take C to be thecategory of open sets of some topological space (with inclusions as morphisms),
then we can uniquely recover the value of a function f on an open set U if we are
given its restrictions to open sets Vi that cover U . Our presentation is largely
based on Mac Lane and Moerdijk [77] and Johnstone [57].
83Our running example will be that of the category of open sets of a topologicalspace X:
Example 2.2.72. If X is a topological space, we may define C as the category
whose objects are open sets of X and whose morphisms are inclusions thereof.
We can then define the set of functions from X to R as a presheaf P on C whose
sets P (U ) are RU , the sets of all functions from U to R, and whose action
on morphisms is restriction. We can similarly define the set of continuous orbounded functions from X to R.
Let us take an open set U of X and a family of open sets Vi such thatthe union ⋃i Vi = U , and assume we are given functions fi for all Vi that arecompatible in the sense that fi∣Vi ∩Vj = fj∣Vi ∩Vj . Then, there is a single way todefine a function f on U whose restriction to each Vi is fi . Moreover, if all fi ’s
are continuous, then so is f . What this means is that we can amalgamate thefi ’s into a single f , and we say that the presheaf of functions (or continuousfunctions) is a sheaf. However, even if all fi ’s are bounded, f may not be (takeU = R, Vi = (−i, i), and fi = id Vi ), so the presheaf of bounded functions is not asheaf: we cannot amalgamate the fi ’s into an f .
Definition 2.2.73. Let C be a small category and c an object of C. A sieve S
on c is a family of morphisms {fi ∶ ci → c} that is closed under pre-composition,i.e., if f ∶ c′ → c is in S and g∶ c′′ → c′ is a morphism, then f g is also in S.
Note that a sieve S on c is actually a subpresheaf of yc defined on c′ by theset of all f ∶ c′ → c in S and whose action on morphisms is pre-composition.
Example 2.2.74. If C is the category of open sets of a topological space X
ordered by inclusion, then a sieve on U is a downwards-closed family of open
sets Vi ⊆ U .
Given a sieve S on c and a morphism f ∶ c′ → c, one may define the pullbackf (S) of S along f as the family of morphisms g such that f g is in S.
∗

Property 2.2.75. For all objects c, sieves S on c and morphisms f ∶ c′ → c,f ∗ (S) is a sieve.
Example 2.2.76. In the case of open sets of a topological space, if S = {Vi } isa sieve on U and V is included in U , then the construction above gives {Vi ∩V }.
Definition 2.2.77. A Grothendieck topology (or simply a topology) J on acategory C is a functor that assigns to each object c of C a collection of sieves
J(c) which are called J-covering (or simply covering), and acts on morphisms
by pullback. Covering sieves must enjoy the following properties:• the maximal sieve of all maps to c must be in J(c),• if S is in J(c) and f ∶ c′ → c, then f ∗ (S) is in J(c′ ),• if S is in J(c) and R is a sieve on c such that, for all f ∶ c′ → c in S, f ∗ (R)is in J(c′ ), then R is in J(c).
These conditions are actually very natural. If we think of f ∶ c′ → c as “picking” a piece of c (which is exactly what happens with topological spaces), thenthe conditions above can be rephrased in words as:84

• taking all pieces of c must cover c,• if some pieces of c cover c, then restricting these pieces to c′ must coverc′ ,• if some pieces ci cover c and we consider some other pieces c′j , then the
only way for c′j not to cover c is for them not to cover one of the ci ’s.
Example 2.2.78. Some simple examples of topologies are:• the trivial topology, where the only sieve that covers c is the sieve {f ∶ c′ →c} of all morphisms to c,• the coarsest topology, where any sieve S on c covers it,• given a topological space X and C defined as the category of open sets of
X, a sieve {Vi } covers U if ⋃i Vi = U .
An example of crucial importance in this dissertation is that of topology
induced by a functor, which can mean two different things. The first one is,given a category D equipped with a topology J, a way to transfer the topology
on J to a subcategory of D. The other one, which we are interested in here, is,given a functor F ∶ C → D, a way to equip D with a topology basically sayingthat an object d is covered by the collection of objects from c that map into d.
Example 2.2.79. If F ∶ C → D is a functor, then a sieve S is covering for the
topology J induced by F if it contains all morphisms of the form F c → d. This
is indeed a topology because:• the sieve of all morphisms to d indeed contains all morphisms F c → d,
• if S contains all morphisms F c → d and f ∶ d′ → d is a morphism, then for
all g∶ F c → d′ , f g is a map from F c to d, so it is in S, and therefore g isin f ∗ (S), which is thus a covering sieve,• if S and R verify the hypotheses of the third item in the definition above,
then, in particular, for all f ∶ F c → d, f ∗ (R) contains all morphisms F c′ →F c, so in particular it contains F (id c ) = id F c , so f = f id F c is in R, andso R indeed covers c.
Definition 2.2.80. Let C be a small category equipped with a topology J, andS be a covering sieve on c. If X is a presheaf over C, an S-matching familyof elements of X assigns to each element f ∶ c′ → c of S an element xf of X(c′ )such that xf ⋅ g = xf g for all f ∶ c′ → c in S and g∶ c′′ → c′ .
An amalgamation of such a matching family is an element x in X(c) suchthat x ⋅ f = xf for all f in S.
Note that an S-matching family is equivalently a natural transformationfrom S (seen as a subpresheaf of yc ) to X. An amalgamation is thus a morphism
yc → X such that
S

yc

X
85

commutes.
Example 2.2.81. If S is the maximal sieve of all morphisms to c, an Smatching family of elements of X is a family xf indexed by all morphismsf ∶ c′ → c of elements of X(c′ ), such that xf ⋅ g = xf g . An amalgamation ofsuch a family is an element x of X(c) such that x ⋅ f = xf for all f . But
then, necessarily x = x ⋅ id c = xid c , and such a choice indeed works, because
x ⋅ f = xid c ⋅ f = xf .
If the empty sieve covers c, a matching family of elements of X for it is anempty family. An amalgamation of such a family is any element in X(c).
Let C be the category of open sets of a topological space X equipped with the
topology generated by these open sets and P is a presheaf over C. Given an open
set U , a sieve S = {Vi } that covers U , and an element x in P (Vi ) we denoteby x∣Vj the “restriction” of x to Vj , defined as x ⋅ f , where f is the inclusion of
Vj into Vi . An S-matching family of elements of P for {Vi } is then a family of
elements xi of P (Vi ) such that xi∣Vi ∩Vj = xj∣Vi ∩Vj for all Vi and Vj . Indeed, if
Vk = Vi ∩ Vj , we have that xi∣Vi ∩Vj = xk = xj∣Vi ∩Vj . An amalgamation of such afamily is an x in P (U ) such that x∣Vi = xi for all Vi .
In particular, if P is the presheaf of functions to R, matching families andamalgamations are exactly what is discussed in Example 2.2.72.
Definition 2.2.82. If C is a small category and P is a presheaf on C, P isa sheaf for the topology J if, for all objects c and sieves S covering c, there
is a unique amalgamation to each S-matching family. We denote by Sh(D, J)
the full subcategory of D spanning sheaves for J (or Sh(D) if J is clear fromcontext).
⋀

If we see sieves as subpresheaves of some yc , P is a sheaf when, for all
objects c and sieves S covering c, the restriction map Y (c) ≅ [yc , Y ] → [S, Y ] isa bijection.
Example 2.2.83. We have already seen that, in the case of the trivial topology,
no matter the presheaf, there is always a unique amalgamation to any matchingfamily, so all presheaves are sheaves.
In the case of the coarsest topology, there must be a unique amalgamation
for any matching family of any covering sieve, in particular the empty sieve, so
X(c) must be a singleton, and sheaves are exactly terminal presheaves.
In the case of topological spaces, the presheaves of functions and that ofcontinuous functions are sheaves, but that of bounded functions is not.
Finally, in the case of the topology induced by a functor, which is the case
we are interested in, we have the following characterisation:
Lemma 2.2.84. If F ∶ C → D is fully faithful and Y is a presheaf over D, thenY is a sheaf if and only if it is in the essential image of ∏F .
⋀Proof. Let JF denote the topology induced by F . Further let i∶ Sh(D, JF ) ↪ D
denote the embedding of sheaves into presheaves.
F is cover-reflecting (if we consider the trivial topology on C), which meansthat covering sieves in D of objects in C can be transported back to covering
sieves in C. Formally, a functor F is cover-reflecting if, for all objects c of C86and sieve R covering F c, there is a sieve S covering c such that F (f ) is in R for
all morphisms f in S. In our case, this is obvious because a sieve R covers F c
if and only if it contains F /F c, so we may take S to be the full covering sieve.
By [57, Proposition C 2.3.18], ∏F thus factors through i, say as R, because
all presheaves over C are sheaves. Therefore, the adjunction ∆F ⊣ ∏F restricts
to an adjunction (∆F ○ i) ⊣ R because i is fully faithful. This is an adjoint
equivalence by the comparison lemma [57, Lemma C 2.2.3]. So C and Sh(D, JF )are equivalent through ∏F , hence the result.
⋀

2.2.8

Factorisation Systems
Required: ∅.
Recommended: ∅.

Factorisation systems are a tool we will use extensively throughout this dissertation. The property that gives factorisation systems their name is thatthey can factor any arrow of a given category as a composite of arrows of two
given classes L and R. Another property of factorisation systems is that L and
R are orthogonal, which ensures the existence of diagonal fillers for particularcommuting squares.
In any category C, we say that l∶ A → C is left orthogonal to r∶ B → D, orequivalently that r is right orthogonal to l, if and only if for all commuting
squares as the solid part of
A
l

C

u
d
v

B
r

D,

there exists a unique d as shown making both triangles commute.
Notation 2.2.85. We denote by l  r the existence of a unique such d for all u
and v, and extend the notation to sets of arrows by writing L  R when l  r for
all l ∈ L and r ∈ R. Similarly, L denotes the class of all arrows that are rightorthogonal to all arrows of L, and symmetrically for  R.
Definition 2.2.86. A factorisation system [17] on a category C consists of twoclasses of maps L and R such that L =  R, L = R, and any morphism f ∶ C → D
lfrf

factors as C Ð→ Af Ð→ D with lf ∈ L and rf ∈ R.
Example 2.2.87. The first example of a factorisation system is given by theclasses Epi and Mono, respectively of surjections and injections, in Set. Indeed,
it is well-known that all functions factor through their images as a surjection
followed by an injection. Perhaps less well-known is that Epi and Mono are
orthogonal. Indeed, take a commuting square
X

u

r

l

Y

X′

v

87

Y′

with l ∈ Epi and r ∈ Mono. Then the definition d(l(x)) = u(x) indeed defines
a function: any y in Y has an image through d because l is surjective, andthe definition does not depend on the chosen x because, if l(x1 ) = l(x2 ), thenr(d(l(x1 ))) = r(u(x1 )) = v(l(x1 )) = v(l(x2 )) = r(u(x2 )) = r(d(l(x2 ))), and r
is injective. This is the only choice of function from Y to X ′ that makes both
triangles commute because r is mono.
This extends to presheaf categories: for any small category C, epi and monic
natural transformations form a factorisation system on C, which we also denoteby (Epi, Mono). The factorisation of arrows is the same as in the previous case,the only difference is that we need to show that the definition of the image isa presheaf, and that the transformations going to and coming from the image
are natural, which is easy. For orthogonality, if we are in the same case as
above, but where objects of the diagram are presheaves and arrows are naturaltransformations, then the definition dc (lc (x)) = uc (x) is the only choice of function that makes both triangles commute, by the same arguments as above, andbecause a natural transformation is epi (or mono) exactly when all its components are. It then remains to show that this mapping is natural, i.e. that, forall f ∶ c → c′ , dc (y ⋅ f ) = dc′ (y) ⋅ f , but that is easy because if y = lc′ (x), thendc′ (y) ⋅ f = dc′ (lc′ (x)) ⋅ f = uc′ (x) ⋅ f = uc (x ⋅ f ) = dc (lc (x ⋅ f )) = dc (lc (x) ⋅ f ) =dc (y ⋅ f ).
Another example, in Cat this time, is (Bo, FF), where Bo is the class offunctors that are bijective on objects and FF is the class of fully faithful functors.
All functors F ∶ C → D factor through E, which has the same objects as C, andwhose homsets are defined by E(c, c′ ) = D(F c, F c′ ). The functor C → E is theidentity on objects but sends f to F f and the functor E → D is the identity on
morphisms but maps c to F c. When faced with a commuting square
⋀

C

U

L

D

C′
R

V

D′ ,

where L is bijective on objects and R is fully faithful, the diagonal filler ∆∶ D →C ′ may be defined as:• ∆(d) = U (c), where c is the only object of C such that L(c) = d and• ∆(f ∶ d1 → d2 ) = g, where g is defined as follows: if we call ci the only
object of C such that L(ci ) = di , then R(U (ci )) = V (L(ci )) = V di , so by
full faithfulness of R, V f has a unique antecedent g∶ c1 → c2 .
It is then easy to show that this choice of ∆ is the only one that makes both
triangles commute.
The following characterisation of factorisation systems sometimes gives abetter intuition:
Property 2.2.88. A pair (L, R) of classes of maps of C form a factorisation
system exactly when:lf

rf• all arrows f ∶ C → D may be factored as C Ð→ Af Ð→ D, with lf ∈ L andrf ∈ R and that factorisation is unique up to a unique isomorphism and88• L and R contain the isomorphisms and are closed under composition.
Using this property, we can easily give a non-example:
Example 2.2.89. The classes (Mono, Epi) do not form a factorisation system
on Set. Indeed, all arrows factor as an injection followed by a surjection, butthat factorisation may not be unique. Consider any function f ∶ X → Y , then flr

may be factored through its graph as X Ð→X ×Y Ð→ Y , with
l∶ ∣

X
x

→
↦

X ×Y
(x, f (x))

and r∶ ∣X ×Y(x, y)→↦

Yy,but it may also be factored through its (generally not isomorphic) cograph aslrXÐ→X +Y Ð→ Y , with
X
l∶ ∣
x
l∶ ∣

→
↦

X +Y
inl x

X
x

→
↦

RRR X + YR
and r∶ RRRRR inl x
RRR inr y
R

X +Y
inr f (x)→Y
↦ f (x)↦yor

and the same r.

In terms of orthogonality, the classes Mono and Epi are weakly orthogonal, inthe sense that for all commuting squares
A

u

B
r

l

C

v

D

with l an injection and r a surjection, there exists a diagonal filler, but it is notnecessarily unique. For example,
0

2

1

1

possesses two distinct diagonal fillers.
The factorisation systems that we will be interested in will be cofibrantly
generated. Cofibrant generation refers to the fact that L and R are defined fromsome generating set J, merely by the lifting property: R = J  and L =  R. The
point here is that J is a set, rather than a class. In fact, in many useful cases,
it is even a rather small set. In our case, it will be bounded by the cardinalityof C. Though it is not trivial – this uses the famous “small object” argument,
we have:
Theorem 2.2.90 (Bousfield [17]). For any set J of maps in any locally presentable category C, ( (J  ), J  ) forms a factorisation system. We say this factorisation system is cofibrantly generated by J.

89

Example 2.2.91. The (Epi, Mono) factorisation system on Set is cofibrantly
generated by the singleton {2 → 1}. For any C, the (Epi, Mono) factorisation
system on C is cofibrantly generated by the set of all maps ∇yc ∶ yc + yc → yc , forc ∈ ob(C).
⋀A crucial property of factorisation systems is the following:
Lemma 2.2.92. For any factorisation system (L, R), L contains all isomorphisms and is stable under right cancellation, composition and pushout.
Stability under right cancellation means that if some composite g ○ h is in L
for h ∈ L, then so is g.
Stability under pushout means that given any pushout square
A

f

B
l′

l

C

g

D,

if l ∈ L, then also l′ ∈ L.
Dually, R contains all isomorphisms and is stable under left cancellation,
composition and pullback (in the obvious dual sense to stability under right cancellation and pushout).
C.

So in particular both classes determine identity-on-objects subcategories of

2.2.9

Pseudo Double Categories
Required: ∅.
Recommended: ∅.

A pseudo double category [31, 32, 42, 43, 72, 37] D consists of a set ob(D)of objects, shared by a “horizontal” category Dh and a “vertical” bicategory Dv .
Following Paré [90], Dh , merely being a category, has standard notation (normal
arrows, ○ for composition, id for identities), while the bicategory Dv earns fancier
notation (for arrows, ● for composition, id ● for identities). Moreover, foreach “square” as on the left below, D comes equipped with a set of cells α, whichhave vertical, resp. horizontal, domains and codomains, denoted by domv (α),
codv (α), domh (α), and codh (α). We picture this as on the right below.
X′

h

Y′

u

X

X′
u

u′
h′

Y

X

h

Y′

α
h′

u′

Y

where u = domh (α), u′ = codh (α), h = domv (α), and h′ = codv (α). D isfurthermore equipped with operations for composing cells: ○ composes themalong a common vertical morphism, ● composes along horizontal morphisms.
Both vertical compositions (of morphisms and cells) may only be associative up
to coherent isomorphism. The full axiomatisation is given by Garner [37], andwe here only mention the interchange law, which says that both ways of parsing
the following diagram coincide:
90

X
u

Y
v

Z

l

l′

X′

α
k

Y

β

Z

h

X ′′

α′

u′
′

k′

Y

β′

v′
′

u′′
′′
v ′′
′′

Z ,

h′

i.e., (β ′ ○ β) ● (α′ ○ α) = (β ′ ● α′ ) ○ (β ● α).
For any pseudo double category D, we denote by DH the category withvertical morphisms as objects and cells as morphisms, and by DV the bicategory
with horizontal morphisms as objects and cells as morphisms. Domain andcodomain maps extend to functors domv , codv ∶ DH → Dh and domh , codh ∶ DV →Dv . We will refer to domv and codv simply as dom and cod, reserving subscripts
for domh and codh .
Some of our constructions will be based on this example:
Example 2.2.93. Starting from any category C with pushouts, consider thepseudo double category Cospan(C) with
• C itself as horizontal category, i.e., Cospan(C)h = C,
• as vertical morphisms X

Y all cospans X → U ← Y , and• as cells all commuting diagrams
X

k

X′

U

l

U′

Y

h

(2.3)

Y ′,

with dom(k, l, h) = k, domh (k, l, h) = (X → U ← Y ), etc.
Composition in Cospan(C)v is defined by (some global choice of ) pushout andcomposition in Cospan(C)V follows by universal property of pushout.

91Chapter 3

Presheaves and Concurrent
Traces3.1

Introduction

In this chapter, we give concrete examples of how to represent concurrent tracesof executions as presheaves. We give three different applications: Petri nets,
graph rewriting, and interaction nets [65]. We do not consider the results discussed in this chapter to be very important, as it is mostly meant to be an
introduction to the use we will make of presheaves in Chapters 4 and 5 tomodel concurrent execution traces. However, we do have a nice result about
how to represent the unfolding of a system, which is significantly simpler thanprevious presentations.
This work is inspired by work by Baldan et al. [10], who give a general framework for rewriting systems based on adhesive categories. They give a definitionof process in their setting, which is a sequence of rewriting steps considered up to
permutation of independent steps, and they show how to build the unfolding of
any object. Here, we propose a different approach to model rewriting, processes,
and unfoldings, which is based on string diagrams. The main contribution of ourwork is a direct, combinatorial description of processes and unfoldings in terms
of presheaves. Just like in Baldan et al.’s work, the unfolding of an object hasa universal property (slightly different from theirs, though very close in spirit).
This framework can adequately model executions of Petri nets or interaction
nets [65], as well as processes in simple concurrent languages such as CCS [50],the π-calculus [29], or the join-calculus [36]. It can also model some form ofgraph rewriting, which has yet to be compared to existing frameworks, such as
DPO [33] and SPO [34]. Finally, the same techniques can model interaction in
HON game semantics [25] (which is described in Chapter 5).
The main difficulty in Baldan et al.’s work is that a process is more than thesequence of its successive states (or positions): it also records all the different
occurrences of the rules that were applied. In our framework, this is dealt withby describing the whole process as a single presheaf that describes a combinatorial object of higher dimension. Given a signature Σ that describes a setof objects (which are the presheaves over a category C) and rewriting rules on92

these objects (given as a set R of spans of such objects), we build a pseudo
double category D that models rewriting on this set of objects according to thegiven rewriting rules. This pseudo double category will have as objects the setof objects described by Σ, and as vertical morphisms from an object Y to an
object X all the execution traces (also called rewriting traces) that correspondto rewriting X into Y according to the rules given by Σ. Processes are definedas particular cospans in C[R] (the category of presheaves over some category
C[R] constructed from C and R). Such a cospan Y → U ← X describes an
execution trace whose starting position is X and whose final position is Y . We
build C[R] from C by adding an object r for each rewriting rule in R and somemeaningful morphisms from objects of C to r. We then define seeds, which are
the local shape of a rewriting step, by equipping each representable presheaf yr
with its initial and final positions X and Y (as given by the rewriting rule), thus
forming a cospan Y → yr ← X. Rewriting steps are then defined by embedding
seeds into larger positions (thus allowing rewriting steps to occur in context).
This whole process is reminiscent of Example 2.2.48. Finally, rewriting traces
are defined to be compositions of rewriting steps in the bicategory of cospans
in C[R]. We then derive the unfolding UX of any object X as the colimit of all
the rewriting traces whose starting position is X.
Under some assumptions on the category C, the presheaves over C[R] enjoy
a graphical notation that is both close in spirit to string diagrams, and also
inspired by that of graphs (but with higher-dimensional edges and multiple typesof edges). For this reason, we usually call them higher-dimensional graphs or
string diagrams (though none of these terms are actually very accurate).
In Section 3.2, we show how to derive a pseudo double category from asignature. We start by describing how we describe states (or positions) in Section 3.2.1, then the dynamics of the execution in Section 3.2.2, how to organise
this into a pseudo double category D in Section 3.2.3, and how to derive a category of execution traces from D in Section 3.2.4. Finally, we show to describe
the unfolding of an object in Section 3.3.
⋀

⋀

3.2

From Signatures to Pseudo Double Categories

This whole section is devoted to explaining the construction in detail. We also
give applications and illustrate the construction on a running example.

3.2.1

Signatures and Positions
Required: 2.2.5.
Recommended: ∅.

We start from basic data, which we call signatures and set out to create
pseudo double categories of concurrent traces from them. We give three examples our techniques apply to, as well as a concrete running example on aparticular Petri net.
Let us first give notations for our examples.

93

Notation 3.2.1. A Petri net is a tuple (P, T, δ, M ), where P is a set of places,
T is a set of transitions, δ∶ T → NP × NP is the transition function, and M ∶ P →N is the initial marking. Very briefly, for any marking M ∶ P → N, M (p) is thenumber of tokens in the place p, and for any transition t, δ(t) ∈ NP × NP canbe written as δ(t) = (δcons (t), δcrea (t)), where the first component associates toeach place p the number of tokens of p consumed by firing the transition t andthe second component associates to each place p the number of tokens created byfiring t.
A graph rewriting system S is a set of spans r = Lr ← Ir → Rr of graphs
describing the possibility to rewrite Lr into Rr (how this behaves on larger graphsthat contain a copy of Lr depends on the exact formalism used).
Finally, our third example is that of interaction systems [65], which are akinto graph rewriting for interaction nets. Informally, an interaction net is somekind of circuit containing “gates” called cells whose types are given by symbols.
Each symbol has an arity that determines the number of incoming ports for cellsof this type. Cells always have a unique outgoing port. An interaction net is acircuit given by a number of cells and free ports, where ports are connected bywires, which are connected to exactly two or zero ports. For example, here is adrawing of an interaction net with symbols α, β, and γ, with arities 2, 1, and 0
respectively:

α

α

β

β

γ

β

α

It has seven cells, eleven wires (among which one is connected to no port anddrawn as a loop) and four free ports. Formally, given a pair (A, a) of a set
A of symbols and an arity function a∶ A → N, an interaction net is a tuple(C, l, W0 , W2 , F, p) where C is the set of cells, l∶ C → A is the labelling of cells,
W0 is the set of wires connected to 0 ports, W2 is the set of wires connected
to 2 ports, F is the set of free ports, and p∶ W2 → P2 (F + ∑c∈C a(l(c)) + 1) is
the function that maps each wire to the ports it is connected to (this function
must verify that all ports have a unique wire that is connected to it). Now, aninteraction system I is a set of rules of the form (x, y, σ), where x and y aresymbols and σ is a partition of a(x) + a(y) into pairs. Such a rule should beunderstood as: if the outgoing ports of two cells labelled x and y are linked bya wire, then the two cells may “disappear” together with the wire between theiroutgoing ports, and their incoming ports are linked according to σ. The mostwell-known rule of this form comes from interaction nets in linear logic, where` and ⊗ cells reduce as below when faced with each other.

94

↝

⊗

⊗

`

`

Our construction starts from the basic notion of signature:
Definition 3.2.2 (Signature). A signature Σ is given by:• a base category C that describes positions (more precisely, positions arepresheaves over C),wu⋀• a finite set R of spans Y ←ÐIÐ
→ X in the category C of presheaves overC, called rules, which describe the possibility to rewrite X into Y ,⋀• and a starting position S in C.
Example 3.2.3. We here show how the three motivating examples can be described in our framework.
• In the case of Petri nets, the Petri net (P, T, δ, M ) is modelled by:– the base category C = P , where P is viewed as the discrete category
with ∣P ∣ elements and only identity morphisms (note that presheaves
on C indeed model markings of the Petri net),– if δ = ⟨δcons , δcrea ⟩, R contains a rule Yt ← ∅ → Xt for each transitiont ∈ T , where Yt and Xt are resp. the multisets δcrea (t) and δcons (t),seen as presheaves,– the starting position is S = M , seen as a presheaf.
• In the case of graph rewriting, rewriting a graph G according to a given
set of rewriting rules S given as spans r = Lr ← Ir → Rr is modelled by:– the base category is the category with two objects e, v and two nontrivial arrows s, t∶ v → e (again, note that presheaves over C are indeed
graphs),– R contains a rule Rr ← Ir → Lr for each r ∈ S, where Ir , Lr , and Rr
are seen as presheaves over C,– the starting position is S = G, where G is seen as a presheaf over C.
• Given a set A of symbols and an arity function a, rewriting an interaction
net (C, l, W0 , W2 , F, p) according to an interaction system I given as a setof rules (x, y, σ) is modelled by:– a base category C that consists of one object ∗ for wires and an object x for each symbol x in A, as well as a morphism t∶ ∗ → x andmorphisms si ∶ ∗ → x for each i ∈ a(x),wrur– R contains a rule Yr ←Ð Ir Ð→ Xr for each rule r = (x, y, σ) in I,
where∗ Ir is coproduct (a(x) + a(y)) ⋅ ∗,1
1 Here, ∗ is actually y , the representable presheaf on ∗. We will often implicitly identify∗
an object of a category and its representable presheaf and let the context disambiguate.

95

Figure 3.1: Our running example.
∗ Xr is the pushout
2⋅∗

t+t

x+y

∇

∗

Xr

∗ Yr is the coproduct ((a(x) + a(y))/2) ⋅ ∗,[si ]i∈a(x) +[si ]i∈a(y)∗ ur ∶ Ir ÐÐÐÐÐÐÐÐÐÐÐ→ x + y → Xr ,∗ wr ∶ Ir → Yr is the quotient by σ (for all pairs (i, j) in σ, i and jhave the same image),– the starting position is the codomain of the coequaliser ofW0 ⋅ ∗ + ∑c∈C c + F ⋅ ∗W0 ⋅ ∗ + W2 ⋅ ∗Remark. The description of interaction systems as presheaves looks excruciatingly painful, but it is actually more due to the initial description of interaction
nets (as tuples) than to the translation itself. Indeed, interaction nets are basically graphs, which are very easy to describe as presheaves, and the rules are
similarly simple to describe.
We could easily add some more features to these examples without increasing
the complexity of the representation. For example, in the case of Petri nets, we
could model “read arcs” by changing the middle component of the span (andtherefore Yt and Xt as well) to include the place the transition reads from. In
the case of interaction systems, we could allow cells with several outgoing wiresby changing the morphism t to n morphisms t1 , . . . , tn , or allow more complex
shapes for the interaction rules.
Example 3.2.4. We further specialise the example of Petri nets to the particular Petri net and marking shown in Figure 3.1. In our setting, this is modelledby:• the set {a, b} as its base category, where a represents the top-left place andb the bottom-left one,• rules a ← ∅ → a and b ← ∅ → a + b, which represent the top-right andbottom-right transitions respectively,• the starting position is a + b.
We will also use a more graphical notation for positions, i.e., presheaves overthe set {a, b}. We could of course, as is usually done for Petri nets, represent a96

position X by drawing a circle for each place and drawing as many bullets inside
the circle that corresponds to a place p as there are elements in X(p). However,this will prove quite impractical in our case, so we use a different representation.
We will represent tokens in the place a by bullets and tokens in the place b byrepresents a marking with two tokens in a andcircles. For example,
one token in b.

3.2.2

Execution Steps and Traces
Required: 3.2.1.
Recommended: 2.2.1,2.2.4.

Our base category C is only used to model positions. To represent dynamics
in the same category, we augment C with objects that represent this dynamics.
For each rule r ∈ R, we define a new category Cr that has the same objects as
C, plus an additional object r and morphisms from some objects of C to thatnew object.
Definition 3.2.5. For any presheaf U , C[U ] is the following cocomma category:el(U )
πU

C

!

1

λ

⌜u⌝

iU

C[U ].

In more simple terms, C[U ] has the same objects as C, plus an additional
object, say u. Between two objects of C, C[U ] has the same morphisms as C,
and the only morphism from u to itself is the identity morphism. For c an objectof C, there is a morphism f¯∶ c → u for each morphism f ∶ c → U (here again, we
identify c and yc ), and there are no morphisms from u to c. Composition isdefined in the obvious way.
The categories C[U ] will describe some form of dynamics over positions in C.
We now want to describe presheaves over C[U ] and their links with presheaves
over C. This will help us understand how to use them to describe dynamics.
For each presheaf X over C, there is a presheaf X = ∑iU (X) = Laniop(X)Uover C[U ]. In simple terms, for each object c of C, X(c) is isomorphic to X(c),and X(u) is empty. Therefore, we will often denote X instead of X when it isobvious that the presheaf is over C[U ].
⋀

⋀

πX

iU

y

Proposition 3.2.6. Each presheaf X is the colimit of el(X) ÐÐ→ C Ð→ C[U ] Ð→
C[U ].

⋀

Proof. We first show that ∑iU (yc ) ≅ yiU (c) :∑iU (yc )(d) ≅ ∫c′yc (c′ ) × [d, iU (c′ )] ≅ ∫c′[c′ , c] × yiU (c′ ) (d) ≅ yiU (c) (d)by the coend formula for left Kan extension and the co-Yoneda lemma. Now wehave:∑iU (X) ≅ ∑iU (∫
≅∫

c

c

X(c) × yc ) ≅ ∫c

X(c) × ∑iU (yc )X(c) × yiU (c) ≅ Lany (yiU )(X)97

by cocontinuity of left Kan extensions and the formula above.
Now, since
!

el(X)

1

πX

⌜X⌝
⋀

C

C

y

is a comma square and Kan extensions are pointwise in Cat, the composition of
any left Kan extension Lany F ∶ C → C′ with ⌜X⌝ is again a left Kan extension.
In particular, since Laniop(–) is isomorphic to Lany (yiU ), which is a left Kan
Uextension, it is also a left Kan extension, and therefore, so is Laniop(–) ○ ⌜X⌝ =U⋀⌜Laniop(X)⌝ = ⌜X⌝, so X is indeed the desired colimit.
U
y

iU

πU

⋀

→ C[U ]. Moreover,In particular, U is the colimit of el(U ) Ð→ C Ð→ C[U ] Ð
we have the following natural transformation:el(U )
πU

C

!

1
⌜u⌝

λ

⌜u⌝

iU

C[U ]

⋀

y

C[U ],

so, by universal property of the colimit, there is a unique morphism from U tou such thatel(U )!

1

iU π U

C[U ]

y

1

⌜U ⌝

⌜u⌝

⋀

⋀

C[U ]

C[U ]

gives back the natural transformation above.
Definition 3.2.7. We call ∂u∶ U → u be the morphism constructed above.
In intuitive terms, U may be seen as a “hollow” version of u (or maybe
conversely, u may be seen as a “full” version of U ). They agree on every object
in C, but U is empty over the new object u, while u is a singleton over it. We
may think of u as “giving a name” to the shape U by turning U into a single
entity: the representable presheaf over u. ∂u is then just the morphism that
adds the “filling” to U .
Definition 3.2.8. For any rule r ∈ R, let Cr be C[Mr ], where Mr is defined as
the following pushout:
Ir

wr

Yr

ur

Mr .

Xr

Cr is defined as any C[U ], and, if we call r its new object, then the morphisms
from c to r are as defined below:98⋀• for each f ∶ yc → Xr in C, add a morphism tf ∶ c → r in Cr ,⋀• for each f ∶ yc → Yr in C, add a morphism sf ∶ c → r in Cr ,⋀• for each f ∶ yc → Ir in C, add a morphism f˜∶ c → r in Cr ,• quotient these morphisms by f˜ = tur f , f˜ = swr f , tf g = tf g, and sf g = sf g.
Remark. In fact, we have only added morphisms tf and sf , since each morphism f˜ will be identified with tur f and swr f .
Building on the discussion above about “giving a name” and “filling” presheaves, if we see Mr as some sort of interaction or dynamics, then Cr is a
category that can describe positions (because it contains C), but can also speak
about the dynamics described by Mr , because it contains a new object designed
to fit this very purpose.
sr

⋀

tr

Definition 3.2.9. In Cr , we call Yr Ð→ r ←Ð Xr the cospan obtained by composing each leg of Yr → Mr ← Xr with ∂r.
srtr

Proposition 3.2.10. Yr Ð→ r ←Ð Xr is such that
Ir

wr

Yr

ur

sr

Xr

tr

(3.1)

r

commutes.
Proof. It is the composition of a commutative square with ∂r.
We finally define C[R], the base category our pseudo double category will
be built on.
Definition 3.2.11. For a signature Σ = (C, R, S), we define the base categoryi Mr

C[R] as the wide pushout of C ÐÐ→ Cr for all rules r in R.
In more simple terms, this is the category C with all the objects r in R andcorresponding morphisms.
Example 3.2.12. In our running example, if we call the first rule u and thesecond one v, we have that C[u, v], the base category of the corresponding pseudo
double category will have:• as objects: the set {a, b, u, v},• as non-trivial morphisms: tid a ∶ a → u, sid a ∶ a → u, til ∶ a → v, tir ∶ b → v,
sid b ∶ b → v,
or, up to renaming, and in more graphical terms:
u
u
tu
a sa

v
tv
a

a

u
tv
b sb

b.
99

3.2.3

Organising Traces into a Pseudo Double Category
Required: 3.2.2, 2.2.9.
Recommended: ∅.

We now build a pseudo double category that describes rewriting on the signature. More precisely, the objects of this pseudo double category will be positions, horizontal morphisms describe “spatial inclusion”, i.e., how positions may
be included in larger positions, and vertical morphisms are “rewriting traces”,
i.e., how a position can reach another position after a finite number of execution
steps.
First of all, we need to define how we model an execution step.
In order to do this, we first define seeds, which are the basic shapes ofexecution steps.
wr

urDefinition 3.2.13. The seed that corresponds to the rule r = Yr ←Ð Ir Ð→ Xr
is the commuting square (3.1).
Definition 3.2.14. An execution step, or rewriting step, is any cospan Y →M ← X obtained by taking a pushout of a seed along some monomorphism
Ir → Z (where Z is necessarily of the form Z ′ if we want X and Y to bepositions):
Yr

Y
r

M

Ir

Z
Xr

X,

where X → M and Y → M are obtained by universal property of pushout. We
say that this rewriting step rewrites X into Y .
Example 3.2.15. In our running example, there are two seeds, which correspond respectively to u and v. They are the squares
∅

a
su
a

a

tu
a

and

∅

sv
b

a+b

u

b

v
[tv
a ,tb ]v.

We can represent them in a more graphical way. Recall the graphical notation
for positions from Example 3.2.4. We can draw the seeds that correspond to u
and v as below.

The initial position of each seed is drawn at the bottom, and its final positionis drawn at the top, with another element in the middle that corresponds to theaction of moving from the initial position to the final one itself.
100

Remark. These drawings actually correspond to drawing the category of elements of the seeds that correspond to u and v, just like drawing a graph corresponds to drawing the category of elements of its corresponding presheaf. Here,
we have drawn the categories of elements of the presheaves u and v, with theconvention that Xu = a and Xv = a + b are drawn at the bottom, while Yu = a
and Yv = b are drawn at the top. Therefore, in all our drawings, “time flows
upwards”.
Example 3.2.16. Remember that our starting marking is a + b, so there are
two possible rewriting steps on this marking, depicted below.
a+b

a

u+b

u
∅

b

a

v
∅

b
a+b

b
v
∅

a+b

a+b

The first one corresponds to firing u on the marking a + b, which indeed gives
back the marking a + b, while the second one corresponds to firing v on the same
marking, which indeed gives the marking b.
We can draw these rewriting steps in a graphical way, very much like we didfor seeds (and again, this corresponds to drawing the category of elements of theobject we represent). Since the move that corresponds to v doesn’t differ fromthe seed, it is represented exactly as in the example above, while the move that
corresponds to u is drawn as below.

The top and bottom positions indeed correspond to the initial and final positionsof the rewriting step, and the equal sign between the two tokens in b express
that they are actually the same token, but that this token is present both in theinitial and final positions (in the category of elements, there is of course only
one object corresponding to the token in b, but we draw it twice with an equal
sign between them for increased readability).
Definition 3.2.17. An execution trace (or rewriting trace) is any cospan thatis isomorphic to a finite composition of rewriting steps in the category of cospans
on C[R].
⋀

Example 3.2.18. For example, in our running example, the different rewriting
traces are (isomorphic to) either:• Un for some n in N, where Un is the n-fold composition of the movethat corresponds to u on the initial marking (note that they can indeed becomposed because the final position is the same as the initial one),• or Vn for some n in N, where Vn is the composition of Un with the movethat corresponds to v.
101

Figure 3.2: A less sequential Petri net.
They can be described in graphical terms, for example, the graphical descriptionsof U2 and V2 are on the left and right below, respectively.

Example 3.2.19. To see how the definition of execution trace is not sequential,
but retains only the minimal causality information between rewriting steps, wehave to introduce another Petri net, because the one from our running example
is entirely sequential.
Let us take as example the Petri net in Figure 3.2, which is much moreparallel: indeed, the two transitions do not interact anymore. In this Petri net,
the v transition (if we keep the same name as for the previous Petri net) is nota + b ← ∅ → b anymore, but b ← ∅ → b. If we still call a, b, u, and v the different
places and transitions, we have that the possible moves from the initial marking
are isomorphic to one of the following two moves:
a+b

a

u+b

u
∅
a

a+v

v
∅

b

a+b

b

a+b

a
b

a + b.

A possible execution in the Petri net consists in first firing u, then firing v. It isthe composition of the two cospans a + b → u + b ← a + b and a + b → a + v ← a + b,
which gives a+b → u+v ← a+b, which is the same as the rewriting trace obtainedby first firing v, and then firing u, which corresponds to the fact that there is nocausality relation between firing u and firing v.
This can also be seen in graphical terms: if the seeds are drawn as

102

and
,
then the moves on the initial marking can be drawn as
and.
Therefore, the execution that fires u then v and the one that fires v then u canbe drawn as on the left and right respectively, which can also be drawn as in the
middle (these drawings are again the graphical representation of the categories
of elements associated to the different presheaves):==.

We can now define the pseudo double category D that will describe processes:• its objects are the positions, i.e., the presheaves over C (more precisely,
they are the presheaves over C[R] that are isomorphic to X for somepresheaf X over C),• its horizontal morphisms are monomorphisms of positions,• its vertical morphisms are rewriting traces,• its double cells are monomorphisms of traces, i.e., commuting diagrams of
the form
Y

l

Y′

U

k

U′

X

h

X ′,

where h, k, and l are mono.
Remark. We can draw a parallel between rewriting and games (and indeed, theideas used here to model rewriting stem from playgrounds, which are at the baseof the work described in this dissertation):• the objects our rewriting system works on (in the case of Petri nets, markings) are akin to positions,• rewriting steps (in the case of Petri nets, the firing of a transition) tomoves,• and rewriting traces (in the case of Petri nets, executions) to plays.
1033.2.4The Category of Execution Traces
Required: 3.2.3,
Recommended: ∅.

In this section, we derive a category E(X) of execution traces that startfrom a given position X from our pseudo double category D.
Definition 3.2.20. The category E(X) is the category of rewriting traces overX:• its objects are the lower legs of rewriting traces: for each rewriting trace
s
t
t
Y Ð
→U ←
Ð X, X Ð→ U is an object of E(X),
t′

t

f

• the morphisms from X Ð→ U to X Ð→ U ′ are monomorphisms U Ð→ U ′ such′that f t = t .
The morphisms in E(X) correspond to “prefix” inclusion of rewriting traces,
i.e., there is a morphism U → U ′ in E(X) if the rewriting trace U can be followedby another rewriting trace such that the whole rewriting trace is isomorphic
to U ′ .
Remark. We can make the statement above much more obvious by defining
E(X) in terms of the pseudo double category D we just built above. The construction is as follows:• the objects of E(X) are plays Y → U ← X,
• a morphism from Y → U ← X to Y ′ → U ′ ← X is a pair of a morphism
Z → V ← Y and a double cell
Z

Y′

V
α

Y

U′

U

X

X,

where such morphisms are quotiented by the equivalence relation generatedby (V, α) ∼ (V ′ , α′ ) when there is a morphism Z → Z ′ and a double cell
Z

Z′
γ

V

Y

V′

Y

such that α = α′ ○ (U ● γ).
With this definition of E(X), it is much more obvious that morphisms of E(X)correspond to “prefix” (or “temporal”) inclusions. However, we should now showthat morphisms compose and that both definitions coincide. We do exactly thisin Section 5.2.3, albeit on a different base category, but the techniques we use
there also work in the case of Petri nets and our other examples.
104Example 3.2.21. In our running example, E(X) is composed of all the plays
isomorphic to either Un or Vn (as defined in Example 3.2.18), plus the morphisms that correspond to prefix inclusion, which are generated by:• for each n, the only morphism Un → Un+1 that fixes X,• for each n, the only morphism Un → Vn that fixes X.

3.3

Unfolding
Required: 3.2.4,
Recommended: ∅.

Even though we will not use this kind of technique in the rest of this dissertation, it may be interesting to know that building the unfolding of an object
using our techniques is extremely simple.
Definition 3.3.1. The unfolding UX of X is the colimit of the functor E(X) ↪
⋀∂⋀X/C[R] Ð→ C[R].
id X

Remark. Since X ÐÐ→ X is an object of E(X), the unfolding UX of X comeswith a map X → UX obtained by universal property of UX .
Example 3.3.2. In our running example, if we draw the unfolding UX of X,
we obtain:⋮⋮,
and the morphism X → UX maps X to the bottom of this drawing, which isexactly what the unfolding of our Petri net is supposed to look like.

3.4

Perspectives

The purpose of this chapter was to introduce the reader to the use of presheaves
as combinatorial objects to represent execution traces in a concurrent way. We
have shown through a running example that using this technique gives a faithfulrepresentation of executions in Petri nets. We have also shown that this representation is indeed concurrent, in the sense that, if two independent moves areplayed in a row, then the interpretation does not depend on whether the firstone is played first or second.
The example of Petri nets is only used to give some intuition about the tools
we use, and not meant to be an interesting example. Indeed, we have promised
105

Figure 3.3: An unsafe Petri net.
that our representation of execution traces faithfully represents executions inPetri nets, and it is indeed the case in the examples we have given, but notin general. It actually only works for safe Petri nets (i.e., those Petri nets
such that there is never more than one token in a given place). As a counterexample, consider the Petri net in Figure 3.3. Since there is a single transition,
there is at most a single execution trace of any given length on this Petri net.
Now, let us consider our representation of execution traces for this Petri net.
The base category C has two objects: one object a that represents the placeand one object u that represents the transition; and two non-trivial morphisms:stt, s∶ a → u. The cospan that represents the transition is a Ð→u←Ð a, and theinitial position of the Petri net is 2 ⋅ a. There is only one possible move on thes+at+a
initial position (up to isomorphism): 2 ⋅ a ÐÐ→ u + a ←ÐÐ 2 ⋅ a. We may represent
this transition graphically as:.
So far, so good.
A first problem becomes apparent when we look at plays of length greaterthan 1. Indeed, in such a play, each move can be played either on the left token
or on the right token. A good thing is that this does not lead to an exponential⌉ plays of length n > 0 (again, up
blow-up, but to a linear one: there are ⌈ n+1
2
to isomorphism). For example, let us enumerate all the plays of length 2 up
to isomorphism. There are four ways to compose this transition with itself, as
depicted below.

But the two ways to compose drawn in the middle are isomorphic, as well as thetwo on the sides, which gives two non-isomorphic plays. In general, composing
this transition n times with itself corresponds to choosing how many times thetransition is applied to the left token, and how many times it is applied to the⌉ plays up to isomorphism.
right one, so there are ⌈ n+1
2
Another problem arises when we look at E(2 ⋅ a). There, there are even two
non-isomorphic plays of length 1: the plays u + a and a + u are not isomorphic in
E(2 ⋅ a)! Indeed, remember that a morphism between these two plays in E(2 ⋅ a)
is a pair (U, α) such that
106

2⋅a

X
U

2⋅a

α

u+a

a+u

2⋅a

2⋅a

commutes. By unrolling the definitions, such a morphism is the pair of a cospantUsU
X Ð→ U ←Ð 2⋅a and a pair of monomorphisms l∶ X → 2⋅a and k∶ (u+a)●U → a+usuch that
2⋅a

l

X
sU
tU

U

2⋅a

a+s

(u + a) ● U
s+a
t+a

u+a

k

a+u
a+t

2⋅a

2⋅a

commutes, which is impossible: if we start from the bottom-left 2 ⋅ a, throughthe top-left path, the “left-hand” a is sent to u, which must be sent to u (itcannot be sent to a because there are no morphisms u → a in C), but throughthe bottom-right path, it is sent again to the “left-hand” a through the identity,
and then to a, so this square cannot commute.
Both problems come from the fact that tokens are “named” in our presheaves:
if X is a presheaf, then X(a) is a set, and we can distinguish between theelements of this set. Firing a transition that consumes a token x is thus different
from firing one that consumes another token x′ . This means that there may be
several representations of the firing of the same transition on the same marking
in a Petri net. We know one possible way to solve this problem, but the answer
is not elegant, and the construction of the base category becomes much more
involved and less intuitive, so we only wrote the simple construction here, while
perfectly aware of its limitations.
Notice however that this naming problem is limited to Petri nets, and it is
not a problem at all in our other examples: in graph rewriting, the names are
given to vertices and edges, and in interaction systems, the names are given
to wires and cells, and, in both cases, it is important to distinguish between
different objects of these classes, while no distinctions should be made between
different tokens in the same place in a Petri net.

107

Chapter 4

Pseudo Double Categories
and Concurrent Game Models
4.1

Motivation

In this chapter, we build an abstract framework to create sheaf models of programming languages based on string diagrams. The goal of this construction isto unify the previous constructions of game semantical sheaf models for CCS [50]and the π-calculus [29] and make the method used there general enough to create a variant of HON games (which is slightly harder than for CCS and the
π-calculus for technical reasons), which we do in Chapter 5. Another hope isthat this construction is general enough to encompass a large class of languages,
thus facilitating the creation of new sheaf models.
This framework takes as input a signature describing the operational semantics of a language and outputs a fibred pseudo double category (i.e., a pseudo
double category that possesses an additional property we call fibredness) that describes the language in terms of games based on string diagrams. These pseudo
double categories are candidate models of the programming language we startfrom. The models built from these pseudo double categories may be seen as
game semantical models because terms are interpreted as innocent strategies insome kind of game, or sheaf models because innocent strategies are sheaves for
a Grothendieck topology induced by embedding views into plays.
The fibred pseudo double categories that are built this way enjoy a numberof fundamental properties that make them a good framework to build gamesemantical models. They are a simplification of the notion of playground (butthey do not enjoy all the good properties of playgrounds), which was introduced
by Hirschowitz [50, 29] as a framework to study game semantics for concurrent
languages. In particular, the property of fibredness is crucial to define composition in the category E(X) of plays whose starting position is X, which isnecessary to define strategies.
Let us be a bit more precise. In our approach, the pseudo double category
D we build from a signature represents the game as a whole. Its objects model
positions in the game. For each pair (X, Y ) of positions, its set of verticalmorphisms Dv (Y, X) models all plays with initial position X and final position108

Y . For all pairs of positions (X, X ′ ), its set of horizontal morphisms Dh (X ′ , X)
roughly models all ways of embedding the position X ′ into X. Finally, given
plays and morphisms as in
Y′

h

u

X

Y
v

′
k

X,

the set of cells D(h, u, k, v) models embeddings from u into v that preserve boththe initial and final positions. E.g., u could describe the part of the play v which
concerns players in X ′ . We can build the categories E(X) from D in a uniform
way, no matter the shape of X.
Beyond providing a uniform construction for the categories E(X), this rich
structure yields links between them, which greatly facilitate the development.
Indeed, all plays u∶ Y
X induce a functor u∗ ∶ Sh(E(X)) → Sh(E(Y )) between
the corresponding categories of sheaves (which represent innocent strategies).
Similarly, each horizontal morphism h∶ X ′ → X induces a restriction functorh∗ ∶ Sh(E(X)) → Sh(E(X ′ )). These functors are semantically relevant: for any
innocent strategy S ∈ Sh(E(X)), u∗ (S) denotes the “residual” of S after u, i.e.,a description of how the players of X would behave according to S after playing
u. A meaningful transition system on innocent strategies is then (roughly)Mgiven by triples S Ð→ M ∗ (S), for any move M in the game. The obtainedtransition system is shown in both of our previous models to be closely related
to the operational semantics of the considered calculus. On the other hand,h∗ (S) denotes a restriction of S to X ′ , i.e., a description of S for players in the
subposition X ′ of X. This is useful for composing strategies: if a given position
X is divided into two subpositions X ′ and X ′′ , thought of as two teams, acomposite (in a sense analogous to parallel composition in game semantics) ofS ′ ∈ Sh(E(X ′ )) and S ′′ ∈ Sh(E(X ′′ )) is any S ∈ Sh(E(X)) whose respective
restrictions to X ′ and X ′′ give S ′ and S ′′ .
Our first main contribution is a way to produce such fibred pseudo double
categories automatically from more basic data. The kind of basic data we willuse is the notion of signature defined in Section 4.3. From any signature S,
we construct a pseudo double category D(S). Up to the verification of a few
additional conditions on D(S), new sheaf models may thus be produced directlyfrom nice signatures S.
As mentioned above, one crucial such condition, on which the very construction of our categories E(X) is based, is fibredness. Our second main contribution
is then in Section 4.4 to prove that, under suitable hypotheses, D(S) satisfies
this property. More precisely, we provide two results:• Under a necessary and sufficient, but hard-to-verify condition essentiallysaying that fibredness is satisfied for all “generators” (called seeds) in S,
we prove that D(S) is fibred (Theorem 4.4.30).
• We then exhibit sufficient, easier-to-verify conditions for the hard-to-verify
condition above to hold (Theorem 4.4.39).
By plugging both results together, we obtain (Corollary 4.4.40) that any S
satisfying the given sufficient conditions yields a fibred D(S).
109

4.2

Preliminaries
Required: 2.2.5.
Recommended: ∅.

In this preliminary section, we collect a few basic results about pushouts,
pullbacks and monos in presheaf categories, which we will consider to be second
nature in the sequel. The well-known pullback and pushout lemmas are notrecalled, though widely used throughout. Similarly, let us merely recall that
epis are stable under pullback, and that monos are stable under pushout inpresheaf categories.
Let us start with an easy result about pullbacks along monos:
Lemma 4.2.1. Any commuting square as below with j iso and m monic is apullback:
A

B

j

m

C

D.

Proof. A simple diagram chase.
Our second result is specific to sets:
Lemma 4.2.2. Any commuting square of the form below left is a pullback if
each rectangle as below right is:∑i∈I Ai[fi ]i∈I

A∑i∈I ki∑i∈I Bi

Ai

fi

ki

k

B

k

Bi

[gi ]i∈I

A

gi

B.

Proof. Straightforward.
Our third result is an instance of the other pullback lemma [91].
Lemma 4.2.3 (Another pullback lemma). In any presheaf category, for any
commuting diagram as below with e epi, if the outer rectangle and the left-handsquare are pullbacks, then so is the right-hand square:
A
X

e

B

C

Y

Z.

Proof. An immediate consequence of [91, Theorem 1], given that, in any presheaf category, epimorphisms are stable under pullbacks and (Epi, Mono) is afactorisation system, so all epimorphisms are strong.
Let us continue by recalling the adhesivity properties of presheaf categories [64].

110Lemma 4.2.4. In any presheaf category, any pushout along a mono is also apullback. Explicitly, any pushout square
A

m

B

C

D

with m mono is also a pullback.
Lemma 4.2.5 (Adhesivity). In any presheaf category, for any commuting cube
I

B
A

C

I′

B′
C ′,

A′

with the marked pullbacks, mono and pushout, all vertical faces are pullbacks if
and only if the top face is a pushout.
Proof. By [64, Example 6 and Proposition 8 (iii)].
Let us finish with a similar-looking statement, which has in fact more to dowith extensivity [19] of Set than with adhesivity.
Lemma 4.2.6. In Set, for any commuting cube
I

B
A

C

I′

B′

f

C ′,

A′
with the marked pushouts and pullback,• if I ′ → B ′ is injective then the front square is a pullback, and• if all arrows except perhaps f are injective, then f also is.
Proof. The following proof is due to Paweł Sobociński (private communication).
In Set, the map m∶ I ′ → B ′ , being injective, may be written as a coproductinjection m∶ I ′ → I ′ + X ′ . But, injective maps being stable under pullback andcoproduct injections being stable under pushout, the whole cube may be written
as

111

I +X

I
A

g

g+k

h

I′

A+X

I′ + X′f

A′ + X ′A′with f = h + k. This in particular shows that injectivity of h and k entails
injectivity of f . Let us now show that the front face is a pullback. Indeed, it is
the pasting of both left-hand squares below:
A
A

A+X

X

A+k

k

A+X

h

A

′

X′

′

h+X ′
′

A +X
′

X ′.

All rows being coproduct injections, by extensivity all squares are pullbacks,
hence so is the face of interest by the pullback lemma.
Corollary 4.2.7. For any commuting cube as in Lemma 4.2.6 in any presheaf
category with the marked pushouts and pullback,• if I ′ → B ′ is monic then the front square is a pullback, and• if all arrows except perhaps f are monic, then f also is.
Proof. Monos and pullbacks are pointwise in presheaf categories.

4.3

Signatures for Pseudo Double Categories

In this section, we define the notion of signature and illustrate it with theexample of the π-calculus. We start by generalising the method used in theprevious sheaf models to define the notion of signature. We then abstractly givethe construction of the pseudo double category D(S) associated to any signature
S. Finally, we motivate fibredness by showing how it occurs in the definition of
relevant categories of plays.
Any signature S will comprise a base category C, and D(S) will be a subpseudo double category of Cospan(C) (as defined in Example 2.2.93). Veryroughly, C will be equipped with a notion of dimension, and S will consist of a
selection of cospans
s
t
Y Ð
→M ←
ÐX
(4.1)
⋀

⋀

⋀

in C viewed as morphisms Y
X in Cospan(C)v , where X and Y have dimension at most 1 and M may have arbitrary dimension. We will call these cospansseeds. The intuition is that presheaves of dimension ≤ 1 model positions in agame (they are essentially graphs), while higher-dimensional presheaves modelthe dynamics of the game. Thus each cospan (4.1) models a play, starting in
position X and ending in position Y , and M models how the play evolves from112

X to Y . Up to some technicalities, D(S) is the smallest sub-pseudo double category of Cospan(C) whose objects are positions and whose vertical morphisms
contain seeds.
⋀

A Signature for the π-Calculus

4.3.1

Required: 2.2.5.
Recommended: 3.2.2.
In this section, we define a signature for the π-calculus to explain and motivate the abstract notion of signature we will use in the rest of the chapter.
MethodThe method used in previous work to design games proceeds in four stages:(i) Design a base category C1 over which finitely presentable presheaves willmodel positions in the game.
(ii) Select a collection of spans of monomorphisms modelling “typical” moveswuin the game. In each selected span Y ←ÐZÐ→ X,• X denotes the initial position of the move,• Y denotes the final position of the move,• Z denotes the part of the position which remains unchanged during
the move.
This is in line with the double pushout approach to graph rewriting [33].
(iii) The next step is characteristic of our approach, and allows us to give a
causal representation of plays not as spans but rather as cospans (on aricher base category). The obtained representation is significantly simpler
than analogous, span-based representations of rewrite sequences [10], anda simple example is treated in detail in Chapter 3. It proceeds by augmenting C1 to a category C over which finitely presentable presheaves will
also model plays. This goes by adding one new object µS for each selectedwuspan S = (Y ←ÐZÐ→ X), in a way that
w

Z
u

Y
s

X

t

µS
s

t

is a pullback (with the marked monos). The resulting cospans Y Ð→ µS ←
ÐX are called seeds of the game. In fact, this description of seeds is slightly
naive, as it implies that any two seeds are independent from each other, a
simplification that we cannot afford if we aim at fibredness. So we should
also describe morphisms between the new objects, and select our spansin a compatible way, which essentially means that they should induce afunctor S∶ C∣≥2 → Cospan(C)H , where C∣≥2 is the full subcategory of C
spanning the new objects.
⋀

113

(iv) In the last stage, roughly (see Section 4.3.3 for details), we construct thesmallest sub-pseudo double category of Cospan(C)⋀• whose objects are positions,• whose vertical morphisms include all identities and seeds, and• which contains all pushouts of the form
id ●Z

id ●h

id ●Z ′S(µS )

M

for all selected spans S = (Y ← Z → X) and morphisms h∶ Z → Z ′with Z ′ a position.
The last point intuitively says that moves (modelled by seeds) may occur
in context.
We will handle the first three stages here to produce our example signature
Sπ . The signature we get is exactly the one we used for our previous model ofthe π-calculus [29]. By applying the last step to Sπ , we get exactly the pseudo
double category that our model of the π-calculus is built on. Another example
is given in Section 5.2, where we define a signature for HON games.
Operational description of the language and informal description of
the game
We start by giving an operational description of the π-calculus that will guideus through steps (i)–(iii).
The π-calculus we study is slightly unusual in the sense that:• its terms are possibly infinite, which spares us the need to define constructors for replication or to put recursion in our language,• the reduction of terms is done in terms of a chemical abstract machine, inthe style of Berry and Boudol [12].
Definition 4.3.1. Processes of the π-calculus are terms coinductively generated
by the grammarγ ⊢g P1...

γ ⊢g Pnγ⊢Pγ⊢Qγ ⊢P ∣Qγ ⊢ ∑ Pii∈nγ, a ⊢ Pγ⊢Pγ ⊢g νa.P

γ ⊢g τ.Pa∈γγ, b ⊢ Pγ ⊢g a(b).P

a, b ∈ γγ⊢Pγ ⊢g ā⟨b⟩.P

,

where
• we have two judgements, ⊢ for processes and ⊢g for guarded processes;• γ ranges over finite sets of natural numbers, and114

• γ, a is defined if and only if a ∉ γ and then denotes γ ⊎ {a}.
We denote by Pi γ the set of all processes of the form γ ⊢ P .
To define the reduction of our π-calculus, we first need to define the configurations of the chemical abstract machine:
Definition 4.3.2. A configuration is a pair of a finite set of natural numbers
γ and a finite multiset of processes γ ⊢ Pi . We write such a configuration⟨γ∥P1 , . . . , Pn ⟩.
The notation below is a formal definition to make sense of the intuitive
notation P + Q when P is a guarded process and Q is a sum, and which does
exactly what one would expect:
Notation 4.3.3. For any γ ⊢g P , γ ⊢ Q of the form ∑i∈n Qi , and injectionh∶ n ↪ n + 1, we denote by P +h Q the sum ∑j∈n+1 Pj , where Ph(i) = Qi for alli ∈ n and Pk = P , for k the unique element of (n + 1) ∖ Im(h).
We finally define the reduction of configurations:⟨γ∥a(b).P +h R, ā⟨c⟩.Q +h′ R′ ⟩ → ⟨γ∥P [b ↦ c], Q⟩⟨γ∥τ.P +h R⟩ → ⟨γ∥P ⟩⟨γ∥P ∣ Q⟩ → ⟨γ∥P, Q⟩⟨γ∥νa.P +h R⟩ → ⟨γ, a∥P ⟩⟨γ1 ∥S1 ⟩ → ⟨γ2 ∥S2 ⟩⟨γ1 ∥S ∪ S1 ⟩ → ⟨γ2 ∥S ∪ S2 ⟩Let us now informally describe the game based on this operational description of our π-calculus. A position will be a finite hypergraph (i.e., a graph inwhich edges do not link two vertices but an arbitrary number of them). In a
position, we call nodes players and edges channels. A player who is linked to nchannels is a placeholder for a process γ ⊢ P with n free communication channels, i.e., where ∣γ∣ = n. A channel that is linked to n players is thought of as acommunication channel that is shared by n processes. Our game is intrinsicallymulti-party in the sense that there are several players in a play.
Example 4.3.4. The position below is a position with three players x, y1 , andy2 , and two channels c1 and c2 . The first channel c1 is shared between all threeplayers, while the second channel c2 is private to x.
y1
c1

x

c2

y2

Let us now describe moves in the game. They are typically given by theoperational description of the language, which, in the case of the π-calculus, arethe rules given above. Each rule in our calculus will correspond to a move in
our game.
115

The move for parallel composition goes as follows: a player x may fork toturn into two new players who know the same channels as x. Graphically, if
the player who plays the move is binary (i.e., they know two channels), this is
pictured as:
y2

y1
π

x

,

where the starting position is pictured at the bottom (it has one player x who
knows two channels), the final position (with two players y1 and y2 who know
exactly the same channels as x). There is also something in the middle denotedby π that represents the action of forking itself, but we do not delve into details
here, as we only give an informal presentation. This move is in accordance with
the intuition that it should model the operational description of the rule forparallel composition: according to this rule, a process γ ⊢ P ∣ Q turns into a pairof processes γ ⊢ P and γ ⊢ Q that know exactly the same channels (i.e., among
the channels in γ).
Following the same intuition, we easily define moves for the silent τ action
and channel creation. In the first case, a process γ ⊢ τ.P +h R turns into a
process γ ⊢ P , i.e., a process that knows exactly the same channels. In thesecond case, a process γ ⊢ νa.P +h R turns into a process γ, a ⊢ P , i.e., a processthat knows exactly the same channels, plus a new, fresh channel a. They are
depicted as below left and below right respectively, again in the case where theinitial player is binary.
y

y

τ

ν

x

x

Finally, the synchronisation rule is slightly more complex, and the movereflects the intuition of message passing: when two processes γ ⊢ a(b).P + R andγ ⊢ ā⟨c⟩.Q + R′ synchronise and turn into γ ⊢ P [b ↦ c] and γ ⊢ Q, Q sends its
channel c on a and P receives it and treats it as a fresh channel. Therefore, ifa(b).P knows n channels among the channels of γ, P [b ↦ c] knows n + 1 of thesechannels (there may be repetitions, e.g., if a(b).P already knows c, then P [b ↦ c]knows c “twice”). Moreover, note that, for both processes to communicate, theyneed to share a common channel a. If we represent this move graphically, for aplayer x who knows two channels a and c and who sends c on a, and a player y
who knows only one channel a, we obtain:

116

c
x′

y′

a

y,

x

where the initial position is indeed again at the bottom, and in the final position,
the two players have turned into x′ and y ′ , and y ′ knows c. Just like in theother moves, there is something in the middle that represents the action ofsynchronising itself: the arrow that goes from c in the bottom position to c in
the top position. Again, we do not dwell on details here, but intuitively, thisarrow represents the path c’s name follows during the synchronisation: x first
fetches c’s name, then sends it on a, the message is received by y, who thus
gains the knowledge of a new channel.
The congruence rule is not turned into a move in our game, as it is typicallygiven by the fact that moves only have a local effect (i.e., when a player moves,
the rest of the position is left untouched).
Stage (i): positions
Let us now formalise this. All involved data will be represented as presheaves
on a certain base category, say C. Let us start with C1 , the part of C which
only concerns positions:Definition 4.3.5. Let C1 have
• an object ∗,• an object [n] for each n in N,• morphisms s1 , . . . , sn ∶ ∗ → [n] for each n in N.
The ∗ object represents channels, while [n] objects represent n-ary players.
Example 4.3.6. The (informal) position of Example 4.3.4 is modelled as thepresheaf X with• X(∗) = {c1 , c2 },• X([1]) = {y1 , y2 },• X([2]) = {x},• X([n]) = ∅ otherwise,
and whose action on non-trivial morphisms is:• y1 ⋅ s1 = c1 ,• y2 ⋅ s1 = c1 ,• x ⋅ s1 = c1 , and x ⋅ s2 = c2 .
The graphical representation we have given in Example 4.3.4 is a representationof the category of elements of X (the only information lost with that representation is the order of channels, i.e., whether x ⋅ s1 is c1 or c2 ).
117

Stage (ii): selecting spans
Let us now select the spans that will model moves. We will select a span foreach move described above, i.e., forking π, silent action τ , channel creation ν,and synchronisation σ.
However, in order for our pseudo double category to be fibred, we need
to be able to talk about plays on sub-positions. In other words, when moves
involve more than one player, there should be moves that correspond to whata single player sees of the play. In our case, this means that σ, which concerns
two players, should be “split” into two moves, each move corresponding to theaction of a single player. It is thus split into ι, which represents receiving a
name, and o, which represents sending a name.
Moreover, we ultimately want players to be able to change their behaviours
according only to what they have seen of the play. We thus need to be able
to define views, which are what a single player sees of a play. In our case, thismeans that π should also be split into two moves, the left forking move π l andthe right forking move π r that correspond only to what a single avatar of theforking move sees when a player forks.
Finally, there should actually be an n-ary version of each move, since players
do not have a constant arity, which means that there should be a τn move foreach n in N, etc. Similarly, since channels are ordered, a player receiving on
their first channel is not doing the same thing as one who receives on theirsecond one. This means that there should be an ιn,i move that represents ann-ary player receiving on their ith channel for all n in N and i in n. Similarly,
there should be an om,j,k move that represents an m-ary player sending their
kth channel on their jth one for all m in N and j, k in m. Naturally, this should
be reflected in σ: there is a σn,i,m,j,k move for all n, m in N, i in n, and j, k inm.
w
Let us now choose spans for all these moves. Remember that a span Y ←ÐuIÐ→ X should represent a move whose starting position is X, whose final position is Y , and where I is the part of the position that is left untouched by themove. Following this intuition, we define the spans for all moves:[si ]i∈n[si ]i∈n• for τn : [n] ←ÐÐÐ n ⋅ ∗ ÐÐÐ→ [n],[si ]i∈n[si ]i∈n• for νn : [n + 1] ←ÐÐÐ n ⋅ ∗ ÐÐÐ→ [n],[si ]i∈n[si ]i∈n[si ]i∈n[si ]i∈nw[si ]i∈n• for πnl : [n] ←ÐÐÐ n ⋅ ∗ ÐÐÐ→ [n],• for πnr : [n] ←ÐÐÐ n ⋅ ∗ ÐÐÐ→ [n],• for πn : [n] ∣ [n] ←Ð n ⋅ ∗ ÐÐÐ→ [n], where [n] ∣ [n] is the position definedas the pushoutn⋅∗[si ]i∈ninl[si ]i∈n

[n]

[n]

inr

(4.2)

[n] ∣ [n],and we denote by w∶ n ⋅ ∗ → [n] ∣ [n] the diagonal morphism in the pushout
above,
118

[si ]i∈n[si ]i∈n• for ιn,i : [n + 1] ←ÐÐÐ n ⋅ ∗ ÐÐÐ→ [n] (notice that the player in the final
position knows one more channel than the one in the initial position),[si ]i∈n[si ]i∈n• for on,j,k : [n] ←ÐÐÐ n ⋅ ∗ ÐÐÐ→ [n],wu

• for σn,i,m,j,k : [n + 1] i,n+1 ∣ j,k [m] ←Ð (n + m − 1) ⋅ ∗ Ð→ [n] i ∣ j [m], where[n] i ∣ j [m] is defined as the pushout below and u by universal property of
pushout:
inj j

∗

m⋅∗
[si ]i∈m
sj

∗

inj i

si

n⋅∗

[m]

(n + m − 1) ⋅ ∗

(4.3)

inr

u
[si ]i∈n[n][n] i ∣ j [m],inl

and similarly for [n] i,n+1 ∣ j,k [m] and w:
inj j

∗

m⋅∗

inl

[si ]i∈m

2⋅∗

inj i

n⋅∗

[si ,sn+1 ][sj ,sk ][m](n + m − 1) ⋅ ∗

(4.4)

inr
w

[si ]i∈n[n + 1]inl[n + 1] i,n+1 ∣ j,k [m].

The reader may check that, if we draw the category of elements of the different
presheaves defined above, we do get back the initial and final positions of the
moves we informally defined before, as well as the part of those moves that iscommon to both positions.
Stage (iii): augmenting the base category
At last, we augment our base category C1 with new objects and morphismsthat model moves. We could here appeal to cocomma categories, as sketched in
Chapter 3, which would lead to the definition below, except it would lack themorphisms πnl , πnr → πn and ιn,i , om,j,k → σn,i,m,j,k . In order to get them back,
we would need to build C in three stages, which would make the constructionslightly more complex, so we do not describe the process here, and simply givethe result.
Definition 4.3.7. Let C consist of C1 , plus, for all n, m in N, a, b in n, andc, d in m:• objects πnl , πnr , πn , νn , τn , ιn,a , on,a,b , and σn,a,m,c,d ,119• for all v in {πnl , πnr , τn , on,a,b }, morphisms s, t ∶ [n] → v,
s

t

s

t

• morphisms [n + 1] Ð
→ νn ←
Ð [n] and [n + 1] Ð→ ιn,a ←Ð [n],lρr

ε→ πn ←
Ð πnr and ιn,a Ð→ σn,a,m,c,d ←Ð om,c,d ,• morphisms πnl Ðmodulo the equations:• s ○ si = t ○ si in C(∗, v), for all n in N, i in n, a, b in n, and v in
{πnl , πnr , τn , ιn,a , on,a,b , νn },• l ○ t = r ○ t in C([n], πn ), for all n in N,• ρ ○ t ○ sa = ε ○ t ○ sb and ρ ○ s ○ sn+1 = ε ○ s ○ sc , in C(∗, σn,a,m,b,c ), for alln, m in N, a in n, and b, c in m.
The pseudo double category describing the π-calculus will be a sub-pseudo
double category of Cospan(C), entirely determined by the choice of a functorfrom C∣≥2 to Cospan(C)H , where C∣≥2 denotes the full subcategory of C spanning
the objects not in C1 . Intuitively, this functor chooses for all new objects µ of
C a cospan which will be thought of as the basic play consisting of just µ. This
choice of cospan should of course be compatible with the choice of spans madeabove, as mentioned in the informal description of the process in Section 4.3.1.
In fact, for each tuple (n, m, a, c, d), C∣≥2 locally looks like the poset
⋀

⋀

πn

σn,a,m,c,d

l

νn

τn

ρ

r

πnl

πnr

ε

ιn,a

om,c,dviewed as a category (where we have omitted τm , πm , etc for readability). We
define our functor C∣≥2 → Cospan(C)H to map this to
⋀

Yνn

Yτn

Yπnl inl Yπn inr Yπnr

νn

τn

πnl

Xνn

Xτn

Xπnl

l

πn
Xπn

r

Yιn,a inl Yσn,a,m,c,d inr Yom,c,d
ρ

ε

πnr

ιn,a

Xπnr

Xιn,a inl Xσn,a,m,c,d inr Xom,c,d ,

σn,a,m,c,dom,c,d(4.5)

where Xm and Ym are the positions defined in Stage (ii), and the different
horizontal morphisms are all defined in (4.2), (4.3), and (4.4). It is then routine
to verify that the obtained assignment is a functor.
⋀

Definition 4.3.8. Let Sπ ∶ C∣≥2 → Cospan(C)H denote the obtained functor. We
call seeds cospans in the image of this functor.
We now need to construct our pseudo double category based on this. Before
proceeding, as we intend to provide a generic construction, we reflect a bit on
the properties of our functor Sπ , which leads us to the notion of signature.

120

4.3.2Signatures
Required: 4.2, 4.3.1.
Recommended: ∅.

We now introduce an abstract notion of signature that generalises the functor
C → Cospan(C) obtained above. The Steps (i)-(iii) above are just meant to be
an illustration to support our definition of signature.
We begin by a few observations on the obtained functor. Our first observation is that the category C enjoys a natural notion of dimension: ∗ has dimension
0, each [n] has dimension 1, all τn , νn , πnl , πnr , ιn,a , and om,c,d have dimension
2, and all πn and σn,a,m,c,d have dimension 3. In particular, C forms a direct category in the sense of Garner [38], i.e., it comes equipped with a functor
to the ordinal ω viewed as a category, which reflects identities. Presheaves X
themselves inherit a (possibly infinite) dimension: the least n such that X isempty above dimension n. The dimension of any representable is thus that of
the underlying object.
Second, let us make a few additional observations on our functor Sπ ∶ C∣≥2 →Cospan(C)H :⋀⋀(a) the middle object of each Sπ (µ) is yµ ;(b) both legs of all selected cospans are monic;(c) all morphisms between those cospans have monic components;(d) for all such morphisms, top squares are pullbacks;(e) finally, all initial positions X are tight, in the sense that all channels c ∈X(∗) are in the image of some X(si ).
So a first, naive notion of signature could consist of a direct category C,
equipped with a functor from C∣≥2 to Cospan(C)H satisfying (a)–(e). However,some of the examples we have in mind require a bit more generality, so in ourabstract definition we relax things a bit. We also need to restrict it a little bit
for the proof of fibredness to hold. Let us briefly explain why we need to relax
the definition.
Even though, in many examples, morphisms between seeds have bottom
squares that are pullback, we can see that the π-calculus does not. Indeed,
consider the morphism ρ∶ ιn,a → σn,a,m,c,d , the channel that is sent in σn,a,m,c,d
is present both in ιn,a and the initial position of σn,a,m,c,d , but not in the initial
position of ιn,a . However, we want to have a property close to that bottom
square being a pullback for the proof of fibredness to hold. There are also
relevant, though unpublished examples of base categories in which the top squareof a morphism between seeds is not necessarily a pullback. Furthermore, we need
the generated pseudo double category to accommodate morphisms of cospans
whose components are non-injective. Let us thus change our tentative definition
just enough to accomodate these needs. In short, we pass from injective maps
to maps which are injective except perhaps on objects of dimension 0, andfind an analogous generalisation for bottom squares being pullbacks. We also
completely drop the requirement on top squares, as it proves useless in thedefinition.
⋀

121

Let us fix any small, direct category C for the rest of this section. By analogy
with the base category for π, we think of objects of dimension 1 as players ina game, which may communicate with each other through objects of dimension
0. Objects of dimensions > 1 are thought of as moves in the game. Accordingly,
we use the following terminology:
Terminology 4.3.9. The dimension of any object of C is its image in ω. A
channel is an object of dimension 0, a player is an object of dimension 1, anda move is an object of dimension > 1.
Definition 4.3.10. Let a natural transformation of presheaves over C be 1Dinjective when all its components of dimensions > 0 are injective.
A square in C is a 1D-pullback when it is a pullback in all dimensions > 0.
⋀

Notation 4.3.11. We mark 1D-pullbacks with a dotted little square, as below
A

B

C

D

Definition 4.3.12. Let D0 (C) denote the sub-pseudo double category of thepseudo double category Cospan(C)⋀⋀• whose horizontal category D0 (C)h is the subcategory of C consisting of
positions, i.e., finitely presentable presheaves of dimension ≤ 1, and 1Dinjective morphisms between them,• whose vertical morphisms are cospans with monic legs, and⋀• whose cells are those of Cospan(C) with 1D-injective components and 1Dpullback bottom squares.
Terminology 4.3.13. For any vertical u∶ Y
X in D0 (C)v , X and Y are
respectively called the initial and final positions of u.
Definition 4.3.12 only makes sense because:⋀

Proposition 4.3.14. D0 (C) forms a sub-pseudo double category of Cospan(C).
This relies on the following direct corollary of Lemma 4.2.6:⋀

Corollary 4.3.15. In C, for any commuting cube
I

B
A

C

I′

B′

f

C ′,

A′
with the marked pushouts and 1D-pullback,122• if I ′ → B ′ is 1D-injective then the front square is a 1D-pullback, and• if all arrows except perhaps f are 1D-injective, then f also is.
Proof. By pointwise application of Lemma 4.2.6.
Proof of Proposition 4.3.14. The only non-trivial bit lies in showing that a vertical composite of componentwise 1D-injective cells with 1D-pullback bottom
squares again has 1D-injective components and 1D-pullback bottom square.
This is a simple consequence of Corollary 4.3.15 and the pullback lemma.
Let us finally give a definition of tightness which generalises the one givenin (e) for π – though the presentation differs.
⋀

Definition 4.3.16. For all presheaves U in C, let us denote by pl(U ) the setof players of U , i.e., pairs (d, x) for all morphisms x∶ d → U , where d is any
representable of dimension 1. Let Pl(U ) denote the corresponding coproduct∑(d,x)∈pl(U ) d of representables.
A position X is tight if and only if the canonical morphism Pl(X) → X is
epi.
Definition 4.3.17. A signature consists of a small, direct category C, together
with a functor S∶ C∣≥2 → D0 (C)H making the following square commuteC∣≥2

D0 (C)H

S

m

(4.6)

⋀

C

y

C,

where m denotes the middle projection functor. We further require that for allµ ∈ C∣≥2 , the initial position of S(µ) be tight.
Definition 4.3.18. Cospans in the image of S are called the seeds of S.
Letting X, Y, Z, . . . range over positions, we get that any signature S maps
any move M to some cospan Y → M ← X which determines its initial and final
positions.
Example 4.3.19. The functor Sπ of Definition 4.3.8 is a signature. Indeed,
all morphisms are evidently monic and all bottom squares are 1D-pullbacks (theonly one that is not a pullback is the one that corresponds to ρ∶ ιn,a → σn,a,m,c,d ,and it is straightforwardly shown to be a 1D-pullback). Furthermore, all initial
positions are clearly tight.
Here is an immediate, useful consequence of the definition:
Lemma 4.3.20. The functor S underlying any signature is fully faithful.
Proof. Faithfulness holds by Yoneda and fullness follows from monicity of thelegs of the involved cospans.

1234.3.3

From Signatures to Pseudo Double Categories
Required: 4.3.2, 2.2.9.
Recommended: 3.2.3.

We now define and give an explicit description of the pseudo double category
D(S) associated to any signature S.
Let us start with the following observation:
Proposition 4.3.21. For any pushout square of the form
id ●Z0

id ●h

id ●Z

(4.7)

k

S(µ)

P

⋀

in Cospan(C)H , if h ∈ D0 (C)h (Z0 , Z) and k ∈ D0 (C)H (id ●Z0 , S(µ)), i.e., h is
1D-injective and k has 1D-injective components and 1D-pullback bottom square,then the whole square in fact lies in D0 (C).
Proof. Indeed, given h and id ●Z0 → S(µ) as above, the pushout P = (Y → M ←X) always exists in Cospan(C)H . It is computed by taking pushouts levelwise,
as in
Y0
Y
⋀

µ

M

Z0

(4.8)

Z
X0

X,

where S(µ) = (Y0 → µ ← X0 ) and the dashed arrows are obtained by universal
property of pushout. Now, monos are stable under pushouts in Set and colimits
are pointwise in presheaf categories, so 1D-injectivity of all components follows
from 1D-injectivity of all involved morphisms. Finally, both bottom squares
are pullbacks, hence 1D-pullbacks as desired, either by Lemma 4.2.1 or by the
pushout lemma and Lemma 4.2.4.
Remark. In the proposition above, k necessarily has 1D-pullback bottom square.
Indeed, both its top and bottom squares are pullback by Lemma 4.2.1.
Definition 4.3.22. A move is any cospan M isomorphic to one obtained as apushout of the form (4.7).
Definition 4.3.23. The pseudo double category D(S) associated to any signature S is the smallest sub-pseudo double category of D0 (C) such that
• D(S)h is D0 (C)h ;• D(S)H is replete and contains all moves;• D(S) is locally full, i.e., if a cell of D0 (C) has its perimeter in D(S), thenit is in D(S).
124

Remark. By Proposition 4.3.21, saying that D(S) contains all moves entails
that all pushout squares defining moves lie inside D(S).
That D(S) is well-defined is easy: it is the intersection of all sub-pseudo
double categories of D0 (C) that verify all three points above, and D0 (C) is
obviously one such pseudo double category, so we are taking the intersection ofa non-empty family.
It is still useful to give a concrete description of D(S). First, its horizontal
category is just D0 (C)h . Regarding vertical morphisms, D(S) must contain all
moves, and since it is stable under vertical composition, it must also containall finite composites of moves. By repleteness, it should also contain all verticalmorphisms isomorphic to such vertical composites. We thus define:
Definition 4.3.24. A play is any vertical morphism isomorphic to some verticalcomposite of moves.
Proposition 4.3.25. D(S) is precisely the locally full sub-pseudo double category of D0 (C) obtained by restricting vertical morphisms to plays.
Proof. By construction, it is enough to show that the given data forms a subpseudo double category of Cospan(C), which is easy.
⋀

4.3.4

Fibredness and Categories of Plays
Required: 4.3.3.
Recommended: 3.2.4.

For a given pseudo double category D, the categories of plays studied inprevious work [50, 29] come in several flavours. A first variant is based on thefollowing category:Definition 4.3.26. Let E denote the category• whose objects are vertical morphisms of D,• and whose morphisms u → u′ are pairs (w, α) as below left, considered
equivalent up to the equivalence relation generated by equating (w, α) with(w′ , α ○ (u ● γ)), for all cells γ as below right:
T

s

Z′

T′

w

Z

α

w′
u′

u

Y

T
γ

s

Z′

w

Z

α

u′

(4.9)

u
r

Y′

Y

r

Y ′.

Notation 4.3.27. We denote the involved equivalence relation by ∼. Furthermore, in principle, E depends on D, which should appear in the notation. For
readability, we will rely on context to disambiguate.
In order to define composition in this category, one needs to consider all
diagrams of shape the solid part of
125

Z ′′
w′′

Z

s′

Z′
γ
s

w′

Y′
β

w

Y

α

Y ′′

u

u′′

′

u

X

r

X′

r′

X ′′ .

Fibredness then comes in by requiring the existence of a cell γ as shown, whichis canonical in a certain sense. This allows us to define the composite of (w, α)and (w′ , β) as the equivalence class of (w ● w′′ , β ○ (α ● γ)).
Here is the long-awaited fibredness property, which uses the notion of fibration (see Section 2.2.2):
Definition 4.3.28. A pseudo double category D is fibred if and only if thefunctor cod∶ DH → Dh is a fibration.
Fibredness is related to Grandis and Paré’s double categorical Kan extensions [44] and to Shulman’s framed bicategories [94].
Proposition 4.3.29. If D is fibred, then E is indeed a category.
The category of plays EX over any position X used in [50, 29] is then obtained as the comma category of E over the functor ⌜X⌝ ∶ 1 → Dh picking X. In
Chapter 5, to study views and plays in HON games, we will use another variant:
Definition 4.3.30. Let E(X) denote the fibre of E over X.
Explicitly, objects of E(X) are plays u∶ Y
X, and morphisms are those ofE, as on the left in (4.9), which have id X as their lower border.
Our next goal is to give an abstract framework to show that, given somesignature S, D(S) is fibred. We want this framework to be abstract to be able
to use it on the existing examples of CCS and the π-calculus, but also on asignature for HON games in order to relate the categories E(X) for HON games
to the categories of views and plays given by Tsukada and Ong [97].

4.4

Fibredness

In this section, we study the fibredness property abstractly. In order to do that,
we first define a candidate cartesian lifting of any morphism in D(S)h using
factorisation systems and show that it has all the good properties of cartesian
liftings, except that it is unclear whether it lies inside D(S)H , which is provedin the rest of the section. We then recast the definitions of 1D-injectivity and
1D-pullbacks in terms closer to the defining properties of injective maps andpullbacks. We then give a necessary and sufficient condition for our candidate
lifting to lie in D(S)H , hence for D(S) to be fibred. However, this condition is
not very useful in practice, so, in the last part, we give a sufficient condition for
D(S) to be fibred that is easier to verify.

126

4.4.1Fibredness through Factorisation Systems
Required: 4.3.4, 2.2.8.
Recommended: ∅.

Our main tool to prove that the pseudo double category D(S) generated
by a signature S is fibred will be cofibrantly generated factorisation systems(see Section 2.2.8). Let us explain the core idea of the proof. In the setting of
Example 2.2.93, any factorisation system (L, R) on C yields a fibred sub-pseudo
double category of Cospan(C).
We are going to refine the pseudo double category Cospan(C) into a fibred
pseudo double category. Let us consider CospanL,R (C), the locally full subpseudo double category of Cospan(C)• whose horizontal category is C,sl

X are cospans Y Ð→U ←Ð X with l ∈ L.

• and whose vertical morphisms Y

Proposition 4.4.1. The pseudo double category CospanL,R (C) forms a subpseudo double category of Cospan(C) that is fibred if C has pullbacks.
Proof. That CospanL,R (C) forms a pseudo double category is a simple consequence of Lemma 2.2.92. To see that it is fibred, consider any vertical morphf

l

h

→ U ←
Ð X and horizontal morphism X ′ Ð→ X. In order to construct
ism Y Ðhla cartesian lifting of (f, l) along h, we factor the composite X ′ Ð→X Ð→ U asl′′h→ U ′ Ð→ U , with l′ ∈ L and h′ ∈ R, and then take the pullback of f and h′ ,X′ Ðas in the front face below:
Y ′′

q ′′
′′

f ′′

s

Y′

U ′′
s′
l′′

′

Y
f

q′

f′

U

h′′

′

h

(4.10)

U

l′

X ′′

l

q
s

X′

h

X.

The obtained morphism (h, h′ , h′′ ) is generally not cartesian in Cospan(C)H ,but let us show that it is in CospanL,R (C). For this, consider any morphism(q, q ′ , q ′′ ) to U such that q = hs as above; then since l′′ ∈ L (by hypothesis) andh′ ∈ R (by construction), we obtain by the lifting property a unique s′ making
everything in sight commute. But then the universal property of pullback gives
the desired s′′ .
For any signature S over some base category C, we will try to apply thisconstruction to the pseudo double category of plays D(S) over S, with the factorisation system cofibrantly generated (remember Theorem 2.2.90) by the set
127

t

s

t

JS of all “t-legs”, i.e., the set of morphisms X Ð→ M for Y Ð→M ←Ð X spanningseeds. A map is then in JS when no new move is added “forwards”, i.e., following
the direction of time. Indeed, recalling that each M occurring in a seed should
be representable, giving a square
X

f

U
r

t

M

V

µ

amounts by Yoneda to picking a move µ in V , whose initial position X is alreadyavailable in U . The map r is then in R when all such moves are also already inU.
Our goal now reduces to showing that D(S) is fibred as a sub-pseudo double
category of Cospan (J  ),J  (C) – which we henceforth abbreviate to CospanJS (C).
SS
The difficulty is that, in a situation like (4.10), the factorisation system yields
a cartesian lifting (h, h′ , h′′ ) in CospanJS (C), of which we will further need toprove that (1) it lies in D(S)H , and (2) it is also cartesian there. Point (2)reduces to proving that if (q, q ′ , q ′′ ) is in D(S)H then so is (s, s′ , s′′ ).
In fact, assuming that the candidate lifting is in D(S), its cartesianness
follows from the fact that all mediating arrows, computed as in (4.10), are alsoin D(S). Indeed, we have:⋀⋀⋀

Lemma 4.4.2. D(S)H has the left cancellation property: for all β and α in
Cospan(C) such that β ○ α and β are in D(S)H , then also α is in D(S)H .
⋀Proof. By 1D-analogues of the pullback lemma and left cancellation for monomorphisms.
It thus remains to prove that the candidate lifting is a play, and that themorphism (h, h′ , h′′ ) lies in D(S)H . Let us record this as:
Lemma 4.4.3. Assume that in all situations like (4.10), if U is a play and h is
1D-injective, then U ′ is again a play and (h, h′ , h′′ ) is in D(S)H . Then, D(S)is fibred.
We thus consider conditions for this to hold. In Section 4.4.3, we show that
if it holds for seeds, then it extends to all plays. In Section 4.4.4, we investigate
conditions for the result to hold for seeds.
This all relies on a few elementary facts about 1D-pullbacks and 1D-injective
maps in presheaf categories, which we now prove.

4.4.2

A Little Theory of 1D-Pullbacks and 1D-Injectivity
Required: 2.2.5.
Recommended: ∅.

Let us start by recasting the definitions of 1D-injectivity and 1D-pullback in
the following setting:Definition 4.4.4. A one-way category consists of category C equipped with afunctor to 2, the ordinal 2 viewed as a category.
128

Any direct category d∶ C → ω may be viewed as a one-way category by postcomposing with the functor ω → 2 mapping everyone to 1 except 0 which ismapped to itself.
Definition 4.4.5. Let d∶ C → 2 be a one-way category. The dimension of an
object of C is its image by d. A natural transformation between presheaves over
C is 1D-injective if and only if its components on objects of dimension 1 are
injective. A square of natural transformations is a 1D-pullback if and only if it
is at all objects of dimension 1.
Proposition 4.4.6. The definitions of dimension (or, more precisely, whether
a dimension is equal to 0 or not), 1D-injectivity, and 1D-pullbacks given for
direct categories d∶ C → ω coincide with their analogues for the corresponding
one-way category C → ω → 2.
Proof. Trivial.
We here work in the simpler setting of presheaves over a one-way category,but by the proposition we may transport our results from the one-way categorical setting to the direct categorical one. We will do so silently in the sequel.
There are several functors from one-way categories to categories, but theimportant one for us restricts its argument to dimension 1:
Definition 4.4.7. Let π1 ∶ Cat/2 → Cat denote pullback along ⌜1⌝ ∶ 1 → 2.
In principle, this should rely on some global choice of pullbacks, but theeasiest is to pick the pullbacks making each arrow i1 ∶ π1 (C) ↪ C an inclusion.
Notation 4.4.8. We denote π1 (C) by C∣1 .
We now have the standard chain of adjunctions:
∑i1
⋀

C∣1


∆i 1


⋀

C,

∏i1

where ∆i1 , ∑i1 and ∏i1 respectively denote restriction, left Kan extension andright Kan extension along the opposite of i1 .
⋀Proposition 4.4.9. A morphism in C is 1D-injective if and only if its imageby ∆i1 is injective.
A square in C is a 1D-pullback if and only if its image by ∆i1 is a pullback.
⋀

Proof. By definition and the fact that limits are pointwise in presheaf categories.
It is instructive to push things just a bit further. In particular, we establish
a characterisation of 1D-injectivity and pullbacks analogous to the standard
universal properties of injectivity and pullbacks, though relative to objects ofC∣1 . Our first step is:⋀

Proposition 4.4.10. The left adjoint ∑i1 is full and faithful, and the comonad∑i1 ○∆i1 is idempotent, so that C∣1 is a coreflective, full subcategory of C.
⋀

⋀

129

Proof. It is well known [60, Proposition 4.23] that the unit of the adjunction
is an isomorphism when we extend and restrict along a fully-faithful functor.
Furthermore, it is also well-known [76] that if the unit of an adjunction is an
isomorphism, then the left adjoint is full and faithful. The comultiplication of
the induced comonad is then an isomorphism by construction.
Our characterisations will stem from the more general:
Lemma 4.4.11. Consider any full coreflection



L∶ C

D ∶R.

For any small category J and functor D∶ J → D, if RD has a limit in C, thenL(limj RD(j)) has the universal property of a limit of D relative to objects ofC, i.e., we have for all X ∈ C:∫

j∈J

D(LX, D(j)) ≅ D(LX, L(lim RD(j)))
jnaturally in X.
Proof. We have∫j∈J

D(LX, D(j)) ≅ ∫j∈J

C(X, RD(j)) ≅ C(X, lim RD(j))
j≅ D(LX, L(lim RD(j))),jwhere the last step is by full faithfulness of L.
⋀

Corollary 4.4.12. A square in C as below left is a 1D-pullback if and only if
for all X ∈ C∣1 , u and v as below right making the outer diagram commute, there
is a unique mediating morphism h as shown, such that ph = u and qh = v:⋀Aq∑i1 (X)
C

p

B

v
h

A

g
f

u

D

q

p

B

C
g

D.

f
⋀

Proposition 4.4.13. Consider any morphism m∶ X → Y in C. The following
are equivalent:
1. m is 1D-injective;
2. for all f, g∶ ∑i1 (Z) → X, mf = mg implies f = g;
3. the square
X

X
m

X

m

Y

is a 1D-pullback.
Proof. By definition, these three items are respectively equivalent to130(4.11)

• (1’) ∆i1 (m) is monic,• (2’) for all f, g∶ Z → ∆i1 (X), ∆i1 (m)f = ∆i1 (m)g implies f = g;
• (3’) the image by ∆i1 of the square (4.11) is a pullback.
But now these three are well-known to be equivalent.

4.4.3

A Necessary and Sufficient Fibredness Criterion
Required: 4.4.1, 4.4.2.
Recommended: ∅.
⋀⋀We now prove some basic facts about Cospan(C), D0 (C), and CospanJS (C),from which we derive useful results about plays, and eventually our main abstract result, namely that, under the hypothesis that seeds admit cartesian
restrictions (which we investigate independently in the next section), D(S) is
fibred.
Let us start with some notation:
X will be denoted by
Notation 4.4.14. The cospan underlying any play u∶ Ytusu
Y Ð→ U ←Ð X (using capitalisation for the middle object). We will often denotestcospans Y Ð→U ←Ð X simply by ⟨U ⟩, leaving the context provide the missing
information. Furthermore, pushouts exist in Cospan(C)H (they are given bytaking pushouts levelwise) and when we write pushouts of cospans, the notationmeans that they are cospans in Cospan(C)H . We will often take pushouts ofcospans in D0 (C)H , but such pushouts are not necessarily pushouts in D0 (C)H(the square itself does not necessarily lie in D0 (C)H ).
⋀⋀Let us start with some preliminary work about tightness.
Lemma 4.4.15. For any position X, we have Pl(X) ≅ ∑i1 (∆i1 (X)) (recalling
Definition 4.3.16). In particular, X is tight if and only if εX ∶ ∑i1 (∆i1 (X)) → X
is epi.
Proof. By definition.
Lemma 4.4.16. Consider any diagram
A

f

g

l

C

h

B
k

D

⋀

in C where only the outer square and the bottom right triangle are known tocommute, i.e., kf = hg and kl = h. If A is tight and k is 1D-injective, then also
the top left triangle commutes.
Proof. Post-composing with k, we have by hypothesis that kf = hg = klg, hence
kf εA = klgεA . By 1D-injectivity of k and Proposition 4.4.13, we get f εA = lgεA .
By tightness of A and Lemma 4.4.15, we finally obtain f = lg.
131

Definition 4.4.17. The cofree invariant position of a cospan Y → U ← X isgiven by the pullback
Z

Y

X

U.

The terminology is justified by the following:
Proposition 4.4.18. Fixing any global choice of pullbacks, taking the cofree
invariant position Zu of any play u induces a functor Z− ∶ Cospan(C)H → C∣1
which is right adjoint to the subcategory inclusion C∣1 ↪ Cospan(C)H . The
inclusion being obviously full and faithful, the unit is an isomorphism, and theassociated comonad is idempotent.
⋀

⋀

⋀

⋀

Proof. Let us take a play ⟨U ⟩, denote by Z its cofree invariant positions, take aposition T and a morphism id ●T → ⟨U ⟩, i.e., a diagram as the solid part of
T

Y

T

U

T

Z
T

X,

from which we get a dashed morphism T → Z by universal property of pullback.
Conversely, given a morphism T → Z, the morphism id ●T → ⟨U ⟩ is simply built
by composition.
⋀

Lemma 4.4.19. Any pushout in Cospan(C)H as below left, where Z is a position, may be factored as below right, where Z0 is the cofree invariant positionof U :
id ●Z

⟨U ⟩

id ●Z

id ●Z0

⟨U ⟩

⟨V ⟩

⟨W ⟩

⟨V ⟩

⟨V ′ ⟩⟨W ⟩.

If ⟨V ⟩ is isomorphic to id ●Z ′ for some position Z ′ , then ⟨V ′ ⟩ is isomorphic to
id ●Z0′ for some position Z0′ .
Proof. The last point is a consequence of colimits being pointwise in presheaf
categories. For the first, we get a map Z → Z0 such that id ●Z → ⟨U ⟩ = id ●Z →id ●Z0 → ⟨U ⟩ by adjunction. We can then define ⟨V ′ ⟩ as the pushout of ⟨V ⟩along id ●Z → id ●Z0 and obtain a unique morphism ⟨V ′ ⟩ → ⟨W ⟩ by its universal
property: this yields a diagram as desired, whose right-hand square is again apushout by the pushout lemma.
Lemma 4.4.20. Cofree invariant positions are stable under pushout in thefollowing sense: if Z is the cofree invariant position of ⟨U ⟩ and132

id ●Z

id ●Z ′⟨U ⟩⟨U ′ ⟩

is a pushout, then Z ′ is the cofree invariant position of ⟨U ′ ⟩.
Proof. Let us first name the involved presheaves: ⟨U ⟩ = (Y → U ← X) and⟨U ′ ⟩ = (Y ′ → U ′ ← X ′ ). Since Z is the cofree invariant position of ⟨U ⟩, we may
apply Corollary 4.2.7 to
Z

Y
Z′

Y′

X

U
U ′,

X′
to obtain that the front face is also a pullback.
⋀Lemma 4.4.21. In Cospan(C)H , pushout squares are preserved by vertical composition. More explicitly, given two vertically composable pushouts as below left
and centre, the composite square below right is again a pushout:
⟨U0 ⟩

⟨U1 ⟩

⟨V0 ⟩

⟨V1 ⟩

⟨U0 ⟩ ● ⟨V0 ⟩⟨U1 ⟩ ● ⟨V1 ⟩

⟨U2 ⟩

⟨U ⟩

⟨V2 ⟩

⟨V ⟩

⟨U2 ⟩ ● ⟨V2 ⟩⟨U ⟩ ● ⟨V ⟩.

Proof. Let us first name the involved presheaves: ⟨Ui ⟩ = (Yi → Ui ← Xi ), ⟨Vi ⟩ =(Zi → Vi ← Yi ), and similarly for ⟨U ⟩ and ⟨V ⟩. If we call Λ the posetal category
with objects 0, 1, and −1, and morphisms generated by 0 → 1 and 0 → −1 (the“walking span” category), we introduce a bifunctor from Λ × Λ to C through thefollowing diagram:
⋀

V1

V0

V2

Y1

Y0

Y2

U1

U0

U2 .

By computing its colimit first horizontally, then vertically, we get ⟨U ⟩ ● ⟨V ⟩,which by interchange of colimits is the desired pushout.
⋀

Lemma 4.4.22. Any morphism in CospanJS (C)H is cartesian if and only if it
has the shape of the front face of (4.10), i.e., its top square is a pullback andits middle morphism is in JS .
133

Proof. The “if” direction follows from the proof of Proposition 4.4.1. For the“only if” direction, the considered properties are stable under composition withisomorphisms in CospanJS (C)H . But any cartesian α∶ ⟨U ⟩ → ⟨U ′ ⟩ is uniquely
isomorphic in CospanJS (C)H /⟨U ′ ⟩ to the cartesian lifting of ⟨U ′ ⟩ along cod(α)
computed as in (4.10), hence the result.
⋀⋀

When we want to show that a morphism of cospans is cartesian, we needby Lemma 4.4.22 to show that the middle morphism is in JS . The next few
lemmas prepare for Corollary 4.4.25, which is the main tool we will use to showthat some morphisms belong to JS .
⋀Some 1D-pullbacks in C satisfy the universal property of pullbacks withrespect to tight positions. Concretely:
Lemma 4.4.23. For any commuting diagram as the solid part of
T

h
k

A

f

C

B

D

with the marked mono and 1D-pullback, and where T is a tight position, there
exists a unique map k making the diagram commute.
Proof. We construct in turn both dashed maps in
Pl(T )

l

f

A

C

k

εT

h

T

D∶

B

• l follows from universal property of 1D-pullbacks (Corollary 4.4.12), since
Pl(T ) ≅ ∑i1 (∆i1 (T )) (Lemma 4.4.15),• k then follows again by Lemma 4.4.15 (which ensures that εT is epi) andlifting in the (Epi, Mono) factorisation system.
The construction of k however does not a priori ensure that f ○ k = h, but
f ○ k ○ εT = f ○ l = h ○ εT which entails the result by tightness.
This yields an analogue of the pullback lemma:
Lemma 4.4.24. In any commuting diagram
A

B

C

D

E

F

with the marked mono, pullback and 1D-pullback, the outer rectangle has theuniversal property of pullbacks w.r.t. tight positions.
134

Proof. A diagram chasing similar to the proof of the pullback lemma, using
Lemma 4.4.23.
Corollary 4.4.25. For any seeds Y → M ← X and S → C ← T , any commuting
diagram as the solid part of
T

U

X

C

V

M

with the marked 1D-pullback, such that at least one of U → X and U → V ismonic, may be completed as shown.
Proof. Because M is a seed, the bottom square of S(C → M ) yields a morphism
T → X making the diagram commute. We conclude by Lemma 4.4.23.
Lemma 4.4.26. For any commuting diagram of 1D-injective maps of the form
U

sU

fU

U

W

sV

f
′
sU ′

W

V
fV

′
sV ′

V′

⋀

with the marked 1D-pullbacks in C, such that
• sU and sV are jointly surjective and both monic,• sU ′ and sV ′ are jointly surjective and both monic,• fU and fV are in JS ,we have that f ∈ JS .
Proof. Consider any morphism T → C in JS and commuting square
T

W

C

W ′.

We want to show that there is a unique diagonal filler C → W . By Proposition 4.4.13, uniqueness follows from 1D-injectivity of f and the fact thatC ≅ ∑i1 (∆i1 (C)), so we only need to show existence. Furthermore, by joint
surjectivity and because C is a representable, C → W ′ factors either through U ′or through V ′ (possibly both).
Both cases being symmetric, we only treat one. If C → W ′ factors through′U , then we get a commuting diagram as the solid part of

135

T

W
k

U
l

U′
W ′,

C

hence a map k as indicated by Lemma 4.4.23, using monicity of sU . By hypothesis, U → U ′ is in JS , so there is a unique map l∶ C → U making both triangles
commute. By composing it with U → W , we get the desired diagonal filler.
This is the first crucial lemma of this section, which states that verticalcomposition in D0 (C) preserves CospanJS (C)-cartesianness, and will be used toinductively prove that plays admit cartesian restrictions under the condition
that seeds do (Theorem 4.4.30). Explicitly:⋀⋀

Lemma 4.4.27. If any two vertically composable double cells of Cospan(C)are both in D0 (C) and CospanJS (C), and are cartesian in the latter, then their
vertical composite is again cartesian (in the latter).
⋀

Proof. Consider any two composable vertical morphisms ⟨U ⟩ = (Y → U ← X)
and ⟨V ⟩ = (Z → V ← Y ), and similarly ⟨U ′ ⟩ and ⟨V ′ ⟩, together with composable cartesian double cells α∶ ⟨U ⟩ → ⟨U ′ ⟩ and β∶ ⟨V ⟩ → ⟨V ′ ⟩. To show that thecomposite is cartesian, it is enough by Lemma 4.4.22 to show that it has theshape of the front face of (4.10), i.e., that its top square is a pullback and thatU ● V → U ′ ● V ′ is right-orthogonal to JS .
Because ⟨U ⟩ → ⟨U ′ ⟩ is cartesian, by Lemma 4.4.22, the left face of
Y

V
U ●V

U

Y′

V′
U ′ ● V ′,U′

is a pullback, so by two applications of Corollary 4.3.15 and Corollary 4.2.7
respectively, its front face is a 1D-pullback and its right one is a pullback. By
Lemma 4.4.26, the obtained map U ●V → U ′ ●V ′ is thus in JS . Since ⟨V ⟩ → ⟨V ′ ⟩is cartesian, by Lemma 4.4.22, the left-hand square below is a pullback, hence
so is the right-hand one by the pullback lemma:
Z

Z′

Z

Z′

V

V′

U ●V

U ′ ● V ′,which concludes the proof.

136

We will also need to start the induction somewhere, so we need to showthat moves admit cartesian restrictions when seeds do (Lemma 4.4.29), which
is based on the following lemma:
Lemma 4.4.28. For any pushout
id ●Z

id ●h

id ●Z ′

(4.12)

k

P

P′

⋀

in Cospan(C)H where h ∈ D0 (C)h (Z, Z ′ ) and k ∈ D(S)H (id ●Z , P ), P ′ is a playand P → P ′ is cartesian and lies in D0 (C)H (hence also in D(S)H ).
Proof. The fact that P → P ′ lies in D0 (C)H follows form 1D-injectivity of h,stability of monos under pushout in Set, and the fact that pushouts along monosare pullbacks by adhesivity of Set. Let us show the other properties by induction
on the play.
We prepare the induction by treating the case of moves. Let us thus assume
that P = ⟨M ⟩ is a move. We know that any move ⟨M ⟩ is a pushout of someseed ⟨M0 ⟩. By Lemma 4.4.19, we may assume that it is the pushout of ⟨M0 ⟩along a morphism Z0 → Z0′ , where Z0 is the cofree invariant position of ⟨M0 ⟩.
Since Z0 is the cofree invariant position of ⟨M0 ⟩, by Lemma 4.4.20, we knowthat Z0′ is the cofree invariant position of ⟨M ⟩. Therefore, id ●Z → ⟨M ⟩ factors as
id ●Z → id ●Z0′ → ⟨M ⟩. Now, we define Z ′′ as the pushout below and id ●Z ′′ → ⟨P ′ ⟩by its universal property:
id ●Z

id ●Z ′

id ●Z0′id ●Z ′′⟨M ⟩⟨P ′ ⟩.

Now, two applications of the pushout lemma give that
id ●Z0id ●Z ′′⟨M0 ⟩⟨P ′ ⟩

is a pushout, and since Z0 → Z ′′ is 1D-injective (as the composite of two 1Dinjective maps), ⟨P ′ ⟩ is a move, which we also call ⟨M ′ ⟩.
Let us now show that the obtained morphism ⟨M ⟩ → ⟨M ′ ⟩ is cartesian using
Lemma 4.4.22, i.e., by showing that it has the shape of the front face of (4.10).
By the pushout lemma, the top square
Y

Y′

M

M′

137

is a pushout along Y → M , which is monic, so it is a pullback by adhesivity(Lemma 4.2.4). Moreover, to show that M → M ′ is right-orthogonal to JS , wetake any T → C in JS and commuting square as the solid part of
T

M

C

M ′.

Since M → M ′ is an isomorphism in dimensions > 1 and C is a representable ofdimension > 1, C → M ′ can be factored uniquely as shown above. Now, since T
is tight and M → M ′ is 1D-injective, by Lemma 4.4.16, we get that the top-lefttriangle commutes as well, hence C → M is the desired diagonal filler.
Now that we have shown that moves are stable under pushouts of the desired
form and that the resulting morphism is cartesian, we proceed to show that it
is also the case for arbitrary plays by induction on ⟨P ⟩.
If Y → P ← X contains zero moves, then the result is obvious. If Y → P ←X contains at least one move, we decompose it as ⟨M ⟩ ● ⟨U ⟩, for some move
T → M ← X and play Y → U ← T containing fewer moves than P .
Because the square below
Z
T

U

M

P

is a pushout along a monomorphism, hence a pullback, we obtain a uniquedashed map as shown such that the diagram commutes. Thus, id ●Z → P
factors as a vertical composite of two cells id ●Z → U and id ●Z → M . By
Lemma 4.4.21, the desired pushout (4.12) is the vertical composite of the following two pushouts:
id ●Z

id ●Z ′

id ●Z

id ●Z ′⟨U ⟩⟨U ′ ⟩⟨M ⟩⟨M ′ ⟩.

Since ⟨U ′ ⟩ and ⟨M ′ ⟩ are plays by induction hypothesis, so is ⟨P ′ ⟩. Moreover,by induction hypothesis again, ⟨U ⟩ → ⟨U ′ ⟩ and ⟨M ⟩ → ⟨M ′ ⟩ are cartesian, andtherefore, so is ⟨P ⟩ → ⟨P ′ ⟩, by Lemma 4.4.27.
Remark. The morphism P → P ′ thus computed is not opcartesian in general.
To see this, consider the signature Sπ of the π-calculus, and push the play P =⟨om,c,d ⟩ along [m] → [n] a ∣ c [m] to get P ′ . Now, P clearly has a morphism to
σn,a,m,c,d (given by Sπ (σ)), but P ′ does not, because its final position contains aplayer of type [n], while the final position of σn,a,m,c,d only contains two playersof type [n + 1] and [m] respectively.
Lemma 4.4.29. If seeds admit cartesian restrictions in D(S), then so do moves.

138

Proof. Consider any move as in (4.8) and horizontal morphism h∶ X ′ → X. We
start by forming the cube
Z0′

Z′
X0′

X′
(4.13)

h0

Z0

h

Z
X0

X,

where the dashed arrow is obtained by universal property of pullback. By the
pullback lemma, the left-hand face is again a pullback. Now, by Lemma 4.4.19,
we may assume that Z0 → X0 is monic, so by adhesivity the top face of (4.13)
is again a pushout.
By Lemma 4.4.28, the morphism ⟨µ⟩ → ⟨M ⟩ is cartesian. By hypothesis, we
obtain a cartesian lifting of ⟨µ⟩ along h0 , say Y0′ → U0′ ← X0′ . We get a morphism
Z0′ → U0′ by composing Z0′ → X0′ and X0′ → U0′ , and then a morphism Z0′ → Y0′ byuniversal property of pullback, remembering that, by Lemma 4.4.22, the square
Y0′

Y0

U0′

µ

is a pullback. We may thus push the obtained lifting along id ●Z0′ → id ●Z ′ toobtain a play ⟨U ′ ⟩ and a cartesian morphism ⟨U0′ ⟩ → ⟨U ′ ⟩ by Lemma 4.4.28.
It also induces, by universal property of pushout, a morphism ⟨U ′ ⟩ → ⟨M ⟩ in
Cospan(C)H as in⋀

id ●Z0′id ●Z ′
⟨U0′ ⟩⟨U ′ ⟩

id ●Z0

id ●Z
⟨µ⟩

⟨M ⟩.

We want to show that ⟨U ′ ⟩ is the cartesian restriction of ⟨M ⟩ along h. In orderto do that, we first need to show that ⟨U ′ ⟩ → ⟨M ⟩ is a morphism of plays, i.e.,that it belongs to D(S)H .

139

Now consider the following cubes:
X0′

U0′
X′

X0

Z0′
U′

Y0′

µ
X

Z′

Z0
M

Y′

Z
Y0

Y,

where, in the left-hand case, both pushouts are obtained by the pushout lemma.
In the left-hand cube, by pointwise adhesivity and Corollary 4.3.15, we obtainthat U ′ → M is 1D-injective and that the front face is a 1D-pullback. In theright-hand cube, Corollary 4.3.15 entails that Y ′ → Y is 1D-injective. Thisentails in particular that ⟨U ′ ⟩ → ⟨M ⟩ indeed is a morphism of plays.
It remains to show that ⟨U ′ ⟩ → ⟨M ⟩ is cartesian, for which by Lemma 4.4.22
it is sufficient to show that it has the shape of the front face of (4.10).
First, the upper square is a pullback by pointwise application of Lemma 4.2.6
in
Y0′

U0′
Y′

U′

Y0

µ
M.

Y

So the only point left to show is that U ′ → M lies in JS . To show this, weconsider any morphism T → C in JS and commuting square
T

U′

C

M

and show that there is a unique diagonal filler. Uniqueness follows from the factthat U ′ → M is 1D-injective and that C ≅ Σi1 (∆i1 (C)), so we only need to showthat there exists such a diagonal filler.
First, since µ → M is an isomorphism in dimensions > 1 and C is a representable of dimension > 1, we know that C → M factors through µ → M in aunique way. We now want to show that T → U ′ factors through U0′ → U ′ in sucha way that

140

T

U0′

U′

C

µ

M

commutes.
Stepping back a little, let us recall a cube considered above, as below left

T
X0′

U0′
X′

T

U0′

C

µ,

U′

C
X0

µ
X

M

where we added the map T → X0 given by S(C → µ). By Lemma 4.4.24 on
the front face, using tightness of T , we obtain a unique arrow T → X ′ , whichfurther gives by universal property of pullback a unique dashed arrow T → X0′
making everything commute. In particular, we obtain a square as the solid part
above right by composing the arrow T → X0′ we just obtained with X0′ → U0′ .
But now U0′ → µ is in JS , so there is a unique dashed diagonal map asshown making both triangles commute, which gives rise to a map C → U ′ bycomposition, hence the result.
Finally, we state and prove our first fibredness criterion:
Theorem 4.4.30. If seeds admit cartesian restrictions in D(S), then D(S) is
fibred.
Proof. Let us consider any play Y → P ← X and show that its cartesian restriction along X ′ → X in CospanJS (C) lies in D(S), which is enough by Lemma 4.4.3.
We proceed by induction on Y → P ← X. If it is the composite of 0 moves,then X → P and Y → P are isomorphisms and the result is obvious. If it is
the composite of n + 1 moves, then it can be decomposed as ⟨M ⟩ ● ⟨U ⟩ for somemove T → M ← X and play Y → U ← T . By Lemma 4.4.29, we know that ⟨M ⟩admits a cartesian restriction along X ′ → X, say T ′ → V ′ ← X ′ . Furthermore,by induction hypothesis, ⟨U ⟩ admits a cartesian restriction along T ′ → T , say
Y ′ → U ′ ← T ′ . By Lemma 4.4.27, the vertical composition of ⟨V ′ ⟩ → ⟨M ⟩ and⟨U ′ ⟩ → ⟨U ⟩ is cartesian, hence the result.
⋀141

4.4.4Cartesian Lifting of Seeds
Required: 4.4.3.
Recommended: ∅.

In the previous section, we have shown that D(S) is fibred as soon as seeds
admit cartesian restrictions in D(S). In this section, we exhibit sufficient conditions for the latter to be the case. I.e., possibly under additional hypotheses,
in the setting of (4.10), if ⟨U ⟩ is a seed, then its restriction ⟨U ′ ⟩ is a play and(h, h′ , h′′ ) is a morphism of plays.
The basic idea of our proof is that there are two possible cases: either X ′“contains all of” X, or it does not. In more precise terms, either h is a retraction,or it is not. In both cases, for the given seed µ, we• first construct a candidate restriction ⟨U ′ ⟩,• prove that it is indeed a play and that the morphism ⟨U ′ ⟩ → ⟨µ⟩ is amorphism of plays,• and then finally show that it is a cartesian lifting of ⟨µ⟩ along h by showingthat it has the shape of the front face of (4.10).
The main difference between the two cases is that, in the first one, X can bethought of as a sub-position of X ′ , so we basically extend µ so that it is played
from all of X ′ . By contrast, in the second case, X ′ does not contain X, so it is
impossible to play µ from it, and the restriction consists of all the “pieces” of µthat can be played from X ′ .
Let us make a first hypothesis that will be useful throughout the whole proof.
It is equivalent to asking that moves never erase channels, in the sense that, if
a channel occurs in the initial position of a move, then it also does in its final
position. The hypothesis is the following:
Definition 4.4.31. A signature S is persistent when for any seed Y → M ← X,
the morphism Z → X from its cofree invariant position is an isomorphism indimension 0.
Lemma 4.4.32. The seeds of any persistent signature admit cartesian liftings
along retractions.
Proof. Consider any such signature S. By Lemma 4.4.2, it is enough to provethat the cartesian lifting in CospanJS (C) lies in D(S). Consider any seed Y →M ← X and 1D-injective retraction h∶ X ′ → X. Since h is a retraction, there is asection h′ ∶ X → X ′ such that hh′ = id X . We call Z the cofree invariant position
of Y → M ← X and define Z ′ as the pullback
⋀

Z
r′

u

X

Z′
h′

u

r

X

Z
u

′

′

142

h

X

and r′ ∶ Z → Z ′ by its universal property. As a section, r′ is mono, so in particular
1D-injective. We know that u is an isomorphism in dimension 0 by persistence,and so is u′ as a pullback of u, which entails by Lemma 4.2.1 in the opposite
category that the left-hand square above is a pushout in dimension 0. But in
dimensions > 0, h is an isomorphism, hence so are h′ and r′ (as a pullback of h′ ),so by the same argument, the left-hand square is also a pushout in dimensions> 0. It is thus a pushout in all dimensions, hence a pushout in C, since colimits
are computed pointwise in presheaf categories.
We define the cospan ⟨M ′ ⟩ as the pushout
⋀

id ●Z

id ●r′

id ●Z ′

id ●r

β

⟨M ⟩

α′

⟨M ′ ⟩(4.14)

id ●Z
α

⟨M ⟩
and α∶ ⟨M ′ ⟩ → ⟨M ⟩ by its universal property. Now, if we define (l, k, h̃) = α,(l′ , k ′ , h̃′ ) = α′ , and (l′′ , k ′′ , h′′ ) = β, we can assume without loss of generalitythat h′′ = u′ and that h̃′ = h′ , since both
r′

Z
u

Z′
u′
′

X

h′

id ●Z

and

id ●r′

id ●Z ′
β

⟨M ⟩

X

α′

⟨M ′ ⟩

are pushouts. Similarly, by the pushout lemma, we get that
Z′

r

u

u′

X

Z

′
h

id ●Z ′

and

id ●r

id ●Z

β

⟨M ′ ⟩Xα⟨M ⟩are pushouts, so we can assume that h̃ = h. By Lemma 4.4.28 in the left-handsquare of (4.14), we get that ⟨M ′ ⟩ is a play. Now, by Lemma 4.4.28 in theright-hand square, we get that α is cartesian, so ⟨M ′ ⟩ is a lifting of ⟨M ⟩ alongh.
Remark. The lemma above shows that, if a signature is persistent, then it
admits cartesian liftings along retractions. The converse actually holds. Indeed,
consider any signature S that is not persistent. This means that there is somemove m0 in the base category C whose seed ⟨M ⟩ is such that the morphism fromthe cofree invariant position Z to X is not an isomorphism in dimension 0.
Since that morphism is a monomorphism as the pullback of Y → M , which ismono, it cannot be an epimorphism in dimension 0 (because all epi monos areisos in Set). This implies that there is a channel c∶ ∗ → M for some object ∗ oftsdimension 0 that is in the image of X Ð→ M , but not in that of Y Ð→ M.
Let us consider the move ⟨M ⟩ and try to build its cartesian lifting along[c,X]∗ + X ÐÐÐ→ X. If such a cartesian lifting ⟨U ′ ⟩ → ⟨M ⟩ exists, because it iscartesian, id ⟨M ⟩ must factor through it in a unique way, as in
143

Y
M

Y′

Y

X

U′

M

∗+X

X.

Therefore, U ′ → M must be a retraction, but it is also 1D-injective so it isbijective in dimensions > 0. In particular, U ′ (m) is isomorphic to M (m) forall moves m. Now, since U ′ must be isomorphic to m0 in dimensions > 0, it
is necessarily the composite of a single m0 move. But the only way to play m0∗+s∗+tfrom ∗ + X is to be isomorphic to ∗ + Y ÐÐ→ ∗ + M ←ÐÐ ∗ + X. So we want tofind a pair of morphisms as the dashed arrows in:∗+Y[g,g ′ ]

s

∗+s

∗+M

[f,f ′ ]

M
t

∗+t

∗+X

Y

X.
[c,X]

In particular, it must be that tc = f = sg. But we chose c such that tc is not in
the image of s, so this is impossible, hence ⟨M ⟩ has no cartesian lifting along[c, X].
When h is not a retraction, we need some more hypotheses to construct
restrictions (and ensure that they are indeed cartesian). We will need threehypotheses. The first one, monolithicity, restricts the possible ways to modelinteractions between players. It is not necessary, but makes proofs much simpler. The second one, fragmentation, forces all interactions to have restrictions
to single players. This condition is necessary for seeds to admit cartesian restrictions (otherwise, the seed corresponding to an interaction could be restrictedalong one of the players). The last condition, separation, states that, if a player
is created by an interaction, then it is the avatar of a single one of the players
involved in that interaction. This is related to the notion of view: to define
the vie of the created player, we take the view of the player it was created by.
This condition is also necessary, otherwise a player created during an interaction
could end up being created multiple times in a restriction, which would break
1D-injectivity.
First, we want to limit the possible interactions between moves:
Definition 4.4.33. A signature is monolithic when for all morphisms of playsα∶ (Y → M ← X) → (Y ′ → M ′ ← X ′ ) between any two seeds, if X is not a
representable, then M = M ′ .
A signature is monolithic roughly when restricting a move Y ′ → M ′ ← X ′describing an interaction to a strict sub-position X of X ′ cannot yield an interaction. In other words, interactions cannot be broken down into smaller144

interactions (e.g., an interaction between three players cannot be broken down
into an interaction between only two of them). Though it is possible to relax
this limitation, this would not only induce an explosion of the number of cases
to analyse, but we would also need to put another kind of restriction, which
would more difficult to check, which is why we decided to stick to a simple case.
Moreover, such “partial interactions” do not appear to bring much expressivenessto our framework.
Remark. Since the base category is direct, monolithicity ensures that, if there
is a morphism α between seeds as above, and X is not a representable, thenα = (id Y , id M , id X ).
A second hypothesis that we make says that there should exist a “biggest
part” of any move from the point of view of any player involved in it. Basically,
we want to ensure that any seed Y → µ ← X has restrictions along all morphismsof positions h∶ X ′ → X, and we prove this property by pasting together the“biggest part” of what each player in X ′ sees of µ when restricted along h.
We here give a notion that entails the desired property, and basically amounts
to asking that seeds admit cartesian restrictions along morphisms of the form
yd → X with respect to other seeds (as opposed to arbitrary plays):s

Definition 4.4.34. A signature is fragmented if and only if for all seeds Y Ð
→
sM,x

t

tM,x

M←
Ð X and players x∶ d → X, there exists a seed YM,x ÐÐÐ→ M∣x ←ÐÐ d and amorphism fM,x ∶ M∣x → M in C such that:(a) the top square of S(fM,x ) is a pullback, and(b) for any seed Y ′′ → M ′′ ← X ′′ and commuting diagram as the solid part
below, there is a map M ′′ → M∣x making the diagram commute.
M ′′
X ′′

M∣x f

M

d

X

(4.15)

M,xRemark. Since fM,x is 1D-injective and M ′′ is a representable of dimension> 1, the morphism M ′′ → M∣x in the hypothesis above is necessarily unique.
Lemma 4.4.35. If a signature S is persistent, monolithic, and fragmented, theneach morphism S(fM,x ) is a cartesian lifting of ⟨M ⟩ along x in D(S).
Proof. By Lemma 4.4.22, it is enough to prove that the top square of S(fM,x )is a pullback and that fM,x in JS . The first point holds by (a). To prove thesecond one, consider any morphism T → C in JS and commuting square
T

M∣x
fM,x

M.

C
145

We need to show that there is a unique diagonal filler C → M∣x . By Corollary 4.4.25, we obtain a unique morphism T → d making the diagram below left
commute:
T

d

X

C

M∣x

M

C
T

M∣x

M

d

X,

which may be arranged as on the right to have the shape of (4.15). We thus
conclude by (b).
Lemma 4.4.35 exhibits cartesian liftings along players d → X. Let us now
consider more general cases, assuming a third property saying that each player
involved in a synchronisation M (i.e., a seed whose initial position contains
several players) is related to at most one of the “biggest parts” of M , in thesense of our above explanation of fragmentedness.
Definition 4.4.36. A signature S is separated if it is fragmented and, forall moves µ ∈ ob(C∣≥2 ) with seed S(µ) = (Y → µ ← X), players d ∈ ob(C∣1 ),x1 ∶ d1 → X and x2 ∶ d2 → X, and y1 ∶ d → µ∣x1 and y2 ∶ d → µ∣x2 making
y1

d

µ∣x1

y2

fµ,x1

µ∣x2

fµ,x2

µ

commute, we have x1 = x2 (and hence fµ,x1 = fµ,x2 ).
Remark. Separation really only says something in the case where the diagonalx∶ d → µ does not factor through X. Indeed, if it does, then by the properties of
1D-pullbacks, x also factors through x1 and x2 , hence by directedness of C is infact equal to x1 and x2 .
Remark. Separation is related to the notion of view in game semantics (andindeed, in the cases we are interested in, separation is derived from what is called
the axiom of views in [50]). It basically states that any player that is created ina move M is created by at most one player.
When h is not a retraction, the restriction of a seed along h has a particularform that we call a “quasi-move”, which basically consists of several moves played“in parallel”, i.e., independently from one another.
Definition 4.4.37. A quasi-move is any cospan that is isomorphic to a pushoutof the form∑i∈n id Zi
●

id ●h

∑i∈n ⟨Mi ⟩

id ●Z
⟨U ⟩,

146

in D0 (C)H , where the ⟨Mi ⟩’s are seeds.
Lemma 4.4.38. Every quasi-move is a play.
siti

Proof. Let ⟨Mi ⟩ = (Yi Ð→ Mi ←Ð Xi ) for all i ∈ n. By Lemma 4.4.28, it is enoughto show that ∑i ⟨Mi ⟩ is a play. We proceed by induction on n. If n = 0, theresult is trivial. Otherwise, we have∑⟨Mi ⟩ ≅ (⟨M1 ⟩ + ∑ id Xi ) ● (id Y1 + ∑⟨Mi ⟩).
●

i

●

i>1

i>1

By induction hypothesis, both components are plays, so by Lemma 4.4.21, thecomposite also is.
st

We can now exhibit the construction of the restriction of a seed Y Ð→M ←ÐXalong a morphism h∶ X ′ → X that is not a retraction.
Theorem 4.4.39. The seeds of any persistent, monolithic, and separated signature S admit cartesian liftings in D(S).
Proof. By Lemma 4.4.32, it is enough to deal with the case where h is nota retraction. We first build the candidate restriction. Let Z be the cofree
invariant position of ⟨M ⟩. By fragmentedness, we know that for each player
sM,x

tM,x

(d, x) ∈ pl(X), there exists a seed YM,x ÐÐÐ→ M∣x ←ÐÐ d and a morphism(lM,x , fM,x , x)∶ ⟨M∣x ⟩ → ⟨M ⟩ satisfying (a) and (b) of Definition 4.4.34. Letting
Z ′ = X ′ ×X Z, for any player (d, x) ∈ pl(X ′ ) we may thus construct by universal
property of pullback a map rM,x as in
ZM,hx

YM,hx

rM,x

d

M∣hx

x

Z′

(4.16)

r

X′

Z
h

Y
M,

X

where ZM,hx → Z comes from the universal property of Z. We first want toshow that∑(d,x)∈pl(X ′ ) ZM,hx∑(d,x)∈pl(X ′ ) d[rM,x ](d,x)∈pl(X ′ )Z′(4.17)
X′[x](d,x)∈pl(X ′ )is a pushout and that all involved maps are 1D-injective. First, it is a pullback:by Lemma 4.2.2, it suffices to show ZM,hx = d ×X ′ Z ′ for each x, which follows
by three consecutive applications of the pullback lemma in (4.16). Because it
is a pullback of two 1D-injective maps, all of its maps are in fact 1D-injective.
But then, recalling that the pullback of any isomorphism is in fact a pushoutsquare, we have:• in dimension 1, ∑(d,x)∈pl(X ′ ) d → X ′ is an isomorphism and147

• in dimension 0, Z ′ → X ′ is an isomorphism by persistence,
so the square is a pushout in all dimensions, hence a proper pushout.
We now define our candidate restriction ⟨U ′ ⟩ as the quasi-move below, and′⟨U ⟩ → ⟨M ⟩ by its universal property:
id ●[r′∑(d,x)∈pl(X ′ ) id ZM,hx●∑(d,x)∈pl(X ′ ) ⟨M∣hx ⟩M,x ](d,x)∈pl(X ′ )id ●Z ′

(l′ ,k′ ,h′ )id ●r⟨U ′ ⟩

id ●Z(l,k,h̃)⟨M ⟩.

[S(fM,hx )](d,x)∈pl(X ′ )First, ⟨U ′ ⟩ is a quasi-move, and therefore a play by Lemma 4.4.38. Moreover,because (4.17) is a pushout, we can assume without loss of generality that it is
the bottom square of the pushout defining ⟨U ′ ⟩. Thus, h̃ = h.
Furthermore, the morphism [S(fM,hx )](d,x)∈pl(X ′ ) is in D(S)H . Indeed, thatits bottom square is a 1D-pullback follows from Lemma 4.2.2; 1D-injectivity ofits bottom component is 1D-injectivity of h ○ [x](d,x)∈pl(X ′ ) ; 1D-injectivity of its
top component follows from that of its middle component. So let us consider an
object c of dimension > 0 and two morphisms f1 , f2 ∶ c → ∑(d,x)∈pl(X ′ ) M∣hx thatare equal when composed with [fM,hx ](d,x)∈pl(X ′ ) . Since c is a representable, f1
and f2 must factor through one of the coproduct injections, so fi = inj (di ,xi ) ○ fi′
for some f1′ ∶ c → M∣hx1 and f2′ ∶ c → M∣hx2 . We thus have a commuting diagram
c

f2′

M∣hx1

M∣hx2
fM,hx2

f1′
fM,hx1M.

We want to exhibit a square as above but with an object d of dimension 1
instead of c. If c is of dimension 1, we take d = c. Otherwise , by monolithicity,
we know that S(c) must have a representable as its initial position, and since
all initial positions must be tight, it must be a representable of dimension 1.
We thus get a morphism x∶ d → c for some object d of dimension 1. We can now
compose the diagram above with that morphism, which gives us a diagram onwhich we may apply the property of separation, which gives us that hx1 = hx2 .
Now,
fM,hx1 f1′ = [fM,hx ](d,x)∈pl(X ′ ) inj (d1 ,x1 ) f1′= [fM,hx ](d,x)∈pl(X ′ ) f1
= [fM,hx ](d,x)∈pl(X ′ ) f2
= [fM,hx ](d,x)∈pl(X ′ ) inj (d2 ,x2 ) f2′= fM,hx2 f2′= fM,hx1 f2′ .
Therefore, since fM,hx1 is 1D-injective and c ≅ ∑i1 (∆i1 (c)), we have that f1′ = f2′
by Proposition 4.4.13, hence f1 = f2 , so [fM,x ](d,x)∈pl(X ′ ) is indeed 1D-injective.
148

We now want to show that the morphism (l, k, h)∶ ⟨U ′ ⟩ → ⟨M ⟩ is in D(S)H ,i.e., that all its components are 1D-injective. We know that [rM,x ](d,x)∈pl(X ′ )is bijective in dimensions > 0, as the pullback of [x](d,x)∈pl(X ′ ) , which is byconstruction. Thus, the components of the map (l′ , k ′ , h′ ) are bijective in dimensions > 0, which entails that ⟨U ′ ⟩ → ⟨M ⟩ is in D(S)H .
Finally, let us prove that ⟨U ′ ⟩ is the restriction of ⟨M ⟩ along h. To this end,
let us first prove that k is in JS : consider any T → C in JS and commuting
square
T

U′

C

M.

By Corollary 4.4.25, we get a dashed map as in
T

X′

X

C

U′

M,

which makes the diagram commute. If C were equal to M , then, since C is
direct, C → M would be an identity, and so would T → X by Lemma 4.3.20,
which contradicts the hypothesis that h is not a retraction. Thus, C is different
from M . Therefore, by monolithicity, we know that T is representable, and of
dimension 1 by tightness. Hence, T → X ′ factors as T = d0 → ∑(d,x)∈pl(X ′ ) d →X ′ . We thus have the solid part of:
T

d0

C

M∣hx0

inj (d0 ,x0 )∑(d,x)∈pl(X ′ ) d

h′

X′

h

X

inj (d0 ,x0 )∑(d,x)∈pl(X ′ ) M∣hx

k′

U′

k

M,

(4.18)

which we can reorganise as the solid part of:CTM∣hx0 f

M

d0

X

M,hx0

hx0

on which we can use fragmentedness to get a dashed map making both diagrams
commute. Since (4.18) commutes, it is obvious that C → U ′ obtained as thecomposite C → M∣hx0 → U ′ is a desired diagonal filler. Uniqueness of C → U ′ isgiven by Proposition 4.4.13, since k is 1D-injective, and C ≅ ∑i1 (∆i1 (C)).

149

Lastly, we prove that the right-hand square below is a pullback:Z ′ + ∑(d,x)∈pl(X ′ ) YM,hx

Y′

Z + ∑(d,x)∈pl(X ′ ) M∣hx

U′Y
(4.19)′M.

By Lemma 4.2.2, the outer square is a pullback because the square below left(by Lemma 4.2.1) and each of the squares below right (by fragmentedness) are:
Z′

Y

YM,x

Y

Z′

M

M∣x

M.

Moreover, the left-hand square in (4.19) is also a pullback by Lemmas 4.2.1,
4.4.28 (because we know that the top squares of cartesian liftings are pullbacks),
and 4.2.2. Since Z ′ + ∑(d,x)∈pl(X ′ ) M∣x → U ′ is epi, Lemma 4.2.3 entails that thedesired square is a pullback.
Corollary 4.4.40. For any persistent, monolithic, and separated signature S,
D(S) is fibred.
As an easy application, we get:
Proposition 4.4.41. D(Sπ ) is fibred.
Proof. By Corollary 4.4.40, it suffices to verify that Sπ is persistent, monolithic,
and separated, which is routine.

4.5

Perspectives

We have introduced a notion of signature for the sheaf-based approach to concurrent game semantics [50, 29]. We have shown how to, from such a signature,
automatically build a pseudo double category of concurrent traces, which weinterpret as plays in some sort of game. Finally, we have introduced the notion of fibredness, which allows us to build categories of plays from our pseudo
double categories, and given two criteria to prove that a pseudo double category
is fibred, one necessary and sufficient, the other simpler but only sufficient. The
second criterion is still general enough to show that many interesting calculi yieldfibred pseudo double categories, as illustrated by the example of the π-calculus,
which can also be adapted to recover this property of a previous construction of
CCS, as well as to show that the pseudo double category for HON games that
we define in Chapter 5 is fibred.
The link between the pseudo double category we construct and games isfurther explored in Chapter 5, where we build a signature for HON games
and investigate the link between the categories of plays we obtain and more
traditional categories of plays.
Unfortunately, there are constructions that we would like to be able to do
but that do not fit in this framework. One limitation of this framework isthat moves are defined as pushouts along any (1D-injective) map, but for some150

calculi, we would like to be able to restrict the class of morphisms along which
we are allowed to push. For example, in a π-calculus with match and mismatch
operators, there would be a move εn,a,b that may only be played when channels
a and b are equal, and a move δn,a,b that may only be played when a and b aredifferent. The first move is not difficult to define, we simply add morphismss, t∶ [n] → εn,a,b , quotient maps by ssi = tsi and tsa = tsb , and define its seeds′t′

to be [n]a=b Ð→ εn,a,b ←Ð [n]a=b , where [n]a=b is the representable [n] whosechannels a and b have been identified, or, more formally, the coequaliser of
2⋅∗

sa

[n]

sb

and s′ and t′ are given by universal property of coequaliser applied to s and t
respectively. This is not perfect however, in the sense that the obtained signature is not fragmented. The clean solution to overcome this problem is to define
another move ε0n,a,b , with morphisms s, t∶ [n] → ε0n,a,b and ∂∶ ε0n,a,b → εn,a,b satisstfying the obvious equations, and define its seed as [n] Ð→ ε0n,a,b ←Ð [n]. Finally,
there would be a special kind of plays (called closed-world plays) that do notcontain any move built from ε0n,a,b .
However, defining δn,a,b is trickier. Indeed, the only restriction to be able toplay this move is that a and b should be different. So we should model it as an
object δn,a,b with maps s, t∶ [n] → δn,a,b , with the morphisms in C quotientedst

by ssi = tsi , and define its seed to be [n] Ð→ δn,a,b ←Ð [n]. However, since weare allowed to push along any morphism, nothing prevents us from building the
move
[n]

[n]a=bδn,a,bM

2⋅∗[sa ,sb ]∗[n][n]a=b ,which is a move δn,a,b played by a player whose a and b channels are equal,
exactly what we wanted to avoid! So, in this case, we would want to be able topush this move only along those morphisms that do not identify a and b. The
only solution here is to allow only plays in which all moves m over δn,a,b aresuch that m ⋅ (tsa ) ≠ m ⋅ (tsb ) in closed-world plays. This is much more difficultin the sense that we are refusing plays based on the morphisms along which we
push seeds, rather than simply forbidding some moves.
Another example where we do not want to be able to push along any morphism is that of HON games. Let us take the following position as a concrete
example:
A

x

B

y

C

.

It consists of two players, x on the left and y on the right. The basic idea isthat there are three kinds of moves in our calculus for HON games: Λ and @,which correspond to Opponent and Proponent moves, and β, which corresponds151

to the synchronisation of both moves. The Λ and @ moves should correspondto interacting with the environment, while the β moves should correspond tointernal moves. Therefore, even though y is able to play @ on its own (byinteracting with the environment), it should not be able to play it in the position
drawn above, because such a move should be internal, and thus synchronisedwith a Λ move by x.
Moreover, the persistence property, which is necessary for our construction
to admit restrictions along retractions, is sometimes too restrictive. Indeed, inthe variant of HON games that we give in Chapter 5, the notion of view differsfrom the notion of view that was given in previous models of CCS and the πcalculus based on the same techniques [50, 29]. In order to recover the standard
notion of view, one would need to add a new move to the base category, together
with a seed that does not verify persistence.
Some possible future work on this framework would thus be to generalise it
to accept some or all of the examples above.

152

Chapter 5

Justified Sequences in String
Diagrams
5.1

Motivation

In this chapter, we study the link between two approaches to concurrent gamesemantics. At the level of plays, the first one is based on traditional notions of
HON games, while the second one is based on string diagrams, as illustrated in
Chapter 3. We reuse the machinery developed in Chapter 4 to define a pseudo
double category of string diagrams for HON games and prove that it is fibred,thus allowing us to define categories of views and plays. We then set out toexplore the link between the two approaches at the level of plays.
While the categories of plays we obtain are not the same, at the level ofstrategies, both approaches follow the same idea, by defining innocent strategies
as sheaves over plays for a Grothendieck topology induced by the embedding of“views” into “plays”. We make the link between the two approaches formal byproving that they in fact define equivalent categories of innocent strategies.

Two approaches to concurrent game semantics
Recent advances in concurrent game semantics have produced new game models
for a non-deterministic, simply-typed λ-calculus on the one hand [97], and for
CCS and the π-calculus on the other hand [49, 50, 29]. These models are basedon categories of innocent and concurrent strategies that are defined in bothcases as categories of sheaves over a site of plays.
The first model, by Tsukada and Ong, has proven to successfully extend
the most fundamental results of game semantics (interpreting terms as innocent
strategies and composing strategies to form a cartesian closed category of arenas
and innocent strategies) to a non-deterministic λ-calculus. On the other hand,
our approach aims to give a general framework to build game models for different
calculi, in order to study translations between them.
There is a clear, yet informal relationship between the two approaches inthat they both define innocent strategies as sheaves for a Grothendieck topology
induced by embedding views into plays. However, despite this similarity, the153notions of views and plays differ significantly. Indeed, Tsukada and Ong [97]define them as justified sequences of moves satisfying additional conditions, as
in standard Hyland-Ong/Nickau game semantics [56, 87], while in [49, 50, 29],
plays are defined as ad hoc string diagrams describing the game, close in spirit toideas originally suggested by Melliès in a different setting (circa 2008, publishedas [83]). Since the notions of plays differ significantly, it is legitimate to wonder
to what degree the approaches are related.

The level of views and plays
In this chapter, we go beyond this informal similarity and show a tight correspondence between the two approaches at the level of plays. Specifically, in Section 5.2, we design a pseudo double category DHON of string diagrams for HON
games whose vertical morphisms represent concurrent traces in HON games,
just like we did for the π-calculus in Section 4.3. From DHON , we design, foreach pair of arenas A and B, categories E(A ⊢ B) and EV (A ⊢ B) respectivelyof plays and views for HON games.
In Tsukada and Ong’s model, there are also standard categories PA,B and
VA,B of plays and views as defined in standard game semantics (and which
we call TO-plays and TO-views to disambiguate), with a notion of morphism
inspired by Melliès’s work [80]. In Sections 5.3 and 5.4, we show how to embed
these categories into E(A ⊢ B) and EV (A ⊢ B) respectively (whose objects we
simply call plays and views).
We give two ways to define this embedding. The first way, which we explain
in Section 5.3, goes through a third model, whose plays are proof trees in an
ad hoc sequent calculus, and whose views are branches of those trees. The
categories of trees and branches are equivalent to those of plays and views
respectively, so they can be thought of as another possible representation ofthese objects. Trees may also be seen as a maximal parallelisation of TO-plays,
while branches are simply equivalent to TO-views.
This definition is not very satisfactory, in the sense that trees are treatedvery informally, and a formal treatment (e.g., by defining proof trees as certain
pointed presheaves over a well-chosen base category) would not make thingseasier than defining it directly. It however gives a good idea of how the embedding works, and what the discrepancy between our notion of play and that ofTsukada and Ong is, which is why we still choose to expose it. Then, in Section 5.4, we give a more formal definition of the embedding and show it verifies
all the desired properties.
We thus obtain, for each pair of arenas A and B, a commuting square ofembeddings of categories:
VA,B
F
V

iTO

E (A ⊢ B)

PA,B
F

V

i

(5.1)

E(A ⊢ B),

where iTO denotes the embedding of TO-views into TO-plays, i denotes the embedding of views into plays, and F V and F denote the constructed embeddings,
respectively from TO-views into views and from TO-plays into plays. Our first
result is that all these embeddings are full and that F V is an equivalence of154

categories (Theorem 5.3.11).

The level of strategies
However, we are not only interested in comparing views and plays, but also
innocent strategies, which are at the core of game semantics. The square in
Figure 5.1 gives a correspondence at the level of plays, but it also yields atight correspondence between strategies in both approaches. More precisely, it
induces an equivalence between innocent strategies in both contexts and showsthat this equivalence is compatible with innocentisation. Section 5.5 is devoted
to proving this result.
To be more precise, there are two notions of innocent strategy in standard
game semantics: the first one is a prefix-closed set of views, the second one isa prefix-closed set of plays verifying an extra condition called innocence. Bothin Tsukada and Ong’s approach and in ours, the first notion generalises topresheaves on views, which we call behaviours and TO-behaviours. The second
notion generalises to sheaves on plays, which we simply call innocent strategies
and innocent TO-strategies. In particular, mere presheaves on plays are possibly
non-innocent strategies.
The idea behind this generalisation is the following: a prefix-closed set ofviews (in, say, VA,B ) is a presheaf of booleans B∶ Vop
A,B → 2 (where 2 is theordinal 0 → 1 viewed as a category). Similarly, a prefix-closed set of plays is apresheaf S∶ Pop
A,B → 2. This presheaf is a sheaf for the Grothendieck topology
induced by the embedding of VA,B into PA,B when S(p) is accepted if and only
if S(v) is accepted for all views v → p. The notion of morphism in PA,B isslightly non-standard in HON games: morphisms are usually defined as prefix
ordering, but they are here defined to satisfy the property that morphisms v → p
correspond to morphisms from a view of p to p (which is not necessarily a prefixof p). The condition of being a sheaf is exactly innocence, which states that aplayer can change its behaviour only according to what they have “seen”, i.e.,their view, of the play).
However, that is not sufficient to model concurrent strategies, because there
may be several different ways to accept a play (or, in other words, a machine
may be in several different states after a given trace). The classical example isthat of Milner’s coffee machines.
⋅
b

⋅

⋅

a

a
c

b

⋅

⋅

a

⋅

⋅

⋅

⋅

c

Both machines accept exactly the same traces: ε, a, ab, and ac. However, one
has a single way of accepting the trace a, after which it still accepts b andc, while the other makes a choice when accepting a whether to accept b or c.
The first machine has one way of accepting a, while the second has two. Thus,
modelling concurrent strategies correctly requires to know all the different states
the strategy can end in after reading a trace: it is not a presheaf of booleans,
but a presheaf of sets. Notice that it is now easy to differentiate between thetwo machines: if we call Sl the strategy of the left-hand machine and Sr that of155

the right-hand one, we have that Sl (a) is a singleton, while Sr (a) contains twoelements, so they indeed are different.
The functors F and F V give rise to functors ∆F ∶ E(A ⊢ B) → PA,B and
⋀

⋀

⋀

⋀

∆F V ∶ EV (A ⊢ B) → VA,B , where ∆f is pre-composition by f op . Since F V is anequivalence of categories, so is ∆F V , hence behaviours and TO-behaviours areequivalent.
A strategy is innocent (resp. TO-innocent) when it is in the essential imageof ∏i (resp. ∏iTO ), where ∏f denotes right Kan extension along f op . This
may also be seen as a sheaf condition stating that an innocent strategy accepts
a play if and only if it accepts all the views that can be embedded into thatplay (see Section 2.2.7). Using the theory of exact squares (Section 2.2.6), thesquare (5.1) provides a categorical explanation of why both induced categories
of innocent strategies are equivalent. Indeed, it is exact (Corollary 5.5.2), whichmeans that
⋀

VA,B

∏iTO

∆F V

PA,B
∆F

⋀

EV (A ⊢ B)

⋀

(5.2)

⋀

∏i

E(A ⊢ B)

commutes up to isomorphism. In other words, ∆F turns into an equivalence
when restricted to innocent strategies and the saturation functors ∏i ∶ EV
A⊢B →EA⊢B and ∏iTO ∶ VA,B → PA,B that embed behaviours (resp. TO-behaviours)
into strategies (resp. TO-strategies) are compatible with this equivalence. Thisimplies that the innocentisation functors ∏i ○∆i and ∏iTO ○∆iTO , which turn any
strategy into an innocent strategy, are also compatible with this equivalence.
Remark. Had we wanted to make F an equivalence of categories rather than amere full embedding, we could easily have imposed an additional condition on ourplays akin to alternation in a classical HON-game setting. The point is that wewant to compare the purely diagrammatic notion of play with the classical one.
And since we obtain an equivalence between both notions of innocent strategies
anyway, we feel the result is in fact more convincing.

Overview
In Section 5.2, we define the base category for HON games in the same way
as for the π-calculus, derive categories of views and plays for HON games fromit, and give a useful characterisation of these categories as subcategories ofcoslices of a presheaf category. We then give a slightly informal, but intuitive
definition of the embedding of Tsukada and Ong’s plays into ours and prove all
the desired properties of this embedding in Section 5.3, which is the core resultof this chapter. In Section 5.4, we present a formal definition of this embedding
and prove all the desired properties. Finally, in Section 5.5, we build on therelationships to show the relationship between plays to give the second result of
this paper, which is that both models have equivalent categories of strategies,
and that this equivalence is compatible with saturation.

156

5.2

HON Games as String Diagrams

We first build our model of HON games as string diagrams. We reapply themachinery we have developed in Chapter 4 to build a base category for HON
games and derive a pseudo double category of string diagrams representing its
plays, as well as categories of views and plays.

5.2.1

Building the Pseudo Double Category
Required: 4.3.3, 2.1.3.
Recommended: ∅.

Sequent calculus and informal description of the game
Like in the case of the π-calculus, our first step is to give an operational description of our language to guide us through steps (i)–(iii). For arena games, theoperational description comes in the form of a sequent calculus on arenas (seeSections 2.1.1 and 2.1.3 for details). This is close in spirit to Melliès’s work [83]– though the latter takes place in a linear setting. The idea is to understandan arena A = ∑i mi .Ai as a logical formula much like ⋀i ¬Ai , and to consider
the straightforward focalised [8] sequent calculus
on these formulas. Remember√√that the set of roots of A is denoted by A, and that for all m in A, A ⋅ mdenotes the arena strictly below m.
In our case, the sequent calculus that will guide our construction is:
Λ(Γ⊢A),m@(Γ,A,∆⊢),∣Γ∣+1,m

Γ, A ⋅ m ⊢Γ, A, ∆ ⊢ A ⋅ mΓ⊢AΓ, A, ∆ ⊢

cut

Γ⊢A

∆, A, ∆′ ⊢∆, Γ, ∆′ ⊢ ,(5.3)

where sequents are lists of arenas, with possibly a distinguished arena, written(A1 , . . . , An ⊢) or (A1 , . . . , An ⊢ A). Let Γ range over lists of arenas, ∣Γ∣ denotethe length of Γ, and for all i ∈ ∣Γ∣, Γi the ith arena of Γ. We generalise thesenotations to sequents: this generalisation is obvious when the sequent is of theform S = (Γ ⊢), then ∣S∣ = ∣Γ∣ and Si = Γi , and when S = (Γ ⊢ A), we choose∣S∣ = ∣Γ∣ and Si = Γi , which may be a bit surprising, but this definition makes
statements simpler in our work.
Remark. The sequent calculus we use here does not make much sense from alogical point of view. It however makes sense when seen in relationship with thefollowing sequent calculus:
rightΓ, A ⋅ m ⊢

(∀m ∈

Γ⊢A

√

left

A)

Γ, A, ∆ ⊢ A ⋅ m
Γ, A, ∆ ⊢

cut

Γ⊢A

∆, A, ∆′ ⊢∆, Γ, ∆′ ⊢ .

(5.4)

Note that this sequent calculus is a fragment of intuitionistic logic when an arena
A = ∑i∈n mi .Ai is interpreted as JAK = ⋀i∈n (¬ JAi K), and proofs in this calculus
are proofs of intuitionistic logic.
Positions will be some kind of graphs whose vertices (which we again callplayers) are labelled by sequents, whose edges (which we again call channels) are157

labelled by arenas, and such that each player labelled (Γ ⊢ A) has ∣Γ∣ incomingedges labelled Γi and one outgoing edge labelled A, and similarly for players
labelled (Γ ⊢).
Example 5.2.1. For example, the drawing below represents a position with threeplayers: x labelled (B, A ⊢), y1 labelled (A, C ⊢ B), and y2 labelled (A ⊢ A);
as well as four edges: a and a′ labelled A, b labelled B, and c labelled C (wedid not write the label of channels and only their names for readability, but weusually do the opposite and do not write names and only labels).
c

y1
b

x

a
a′

y2
We see in this example that our graphs are not exactly graphs, but somethingslightly more general, for two reasons: edges may have several targets, and they
may also be open-ended.
As in our game for the π-calculus, we think of players as agents that may
interact through channels. We now want to express the possible interactionsin this game, and our sequent calculus again guides us through this step. The
cut rule shows when two players may interact: when the first player’s outgoingchannel is equal to one of the second player’s incoming channels. The interaction
between players is governed by the shapes of the Λ and @ rules. In other words,
two players can interact according to the Λ and @ rules if and only if they arelinked by a cut rule. Now we just have to show the “shape” of this interaction.
As prescribed by Curry-Howard, we see this interaction as a step in a formof proof of a certain formula. We write A = ∑i∈n mi .Ai for the arena sharedby the two players. Let x by the negative player, labelled (Γ ⊢ A), and y the
positive one, labelled (∆, A, ∆′ ⊢); x should provide a proof of JAK, while yshould require such a proof to prove a contradiction. When they interact, ychooses some i ∈ n and asks x for a proof of ¬ JAi K, i.e., y now provides a proofof JAi K which x may inspect to prove a contradiction. Therefore, y turns into(∆, A, ∆′ ⊢ Ai ), while x turns into (Γ, Ai ⊢).
Moreover, x should not only change into a proof of contradiction assuming
JAi K, but since y may inspect the proof of JAK again, the original x player should
also remain in the final position.
Another way to look at this is to see the dynamics of interaction as cut
elimination. If we extend our calculus with sharing (we do not describe how
this works exactly), then it comes with the following cut elimination rule:π′∆1 , A, ∆2 ⊢ A ⋅ m
π
A′⊢ A
Γ
A′1 , A, ∆2 ⊢∆∆′1 , Γ, ∆′2 ⊢

↝

π
π′
Γ⊢A
∆1 , A, ∆2 ⊢ A ⋅ m
πm∆′1 , Γ, ∆′2 ⊢ A ⋅ m
Γ,′ A ⋅ m ⊢ ,A∆′1 , Γ, ∆′2 ⊢158

where π is
πm...

Γ, A ⋅ m ⊢

...

(∀m ∈

√

A)

Γ⊢A

.

Indeed, if we see players as the parts of a proof that interact with each other, inthe cut rule above left, we see two players sharing a channel of type A on which
they may interact according to π and π ′ followed by a left rule respectively.
After applying the cut elimination rule, we are now in presence of three playersthat act according to π, π ′ , and πm respectively. This means that, in the final
position of the interaction, there should be three players: a player x labelled(Γ ⊢ A) that corresponds to the left part of the proof, a player y labelled(∆1 , A, ∆2 ⊢ A ⋅ m) that corresponds to the middle part of the proof, and aplayer x′ labelled (Γ, A ⋅ m ⊢) that corresponds to the right part of the proof.
We see that the left part of the proof is linked to the middle part by a cut
rule on an arena A, while the middle and right parts of the proof are linked
by a cut rule on an arena A ⋅ m, which did not exist in the initial proof. Thismeans that x and y should share the corresponding channel of type A, while yand x′ should share the corresponding channel of type A ⋅ m. Moreover, Γ isshared between the left and right parts of the proof, so x and x′ should share
all their channels in Γ. Finally, we may notice that the left part of the proof isπ both before and after eliminating the cut rule, so x should have exactly thesame behaviour before and after interacting. This will be imposed by having x“survive” the move, i.e., in such an interaction, the player labelled (Γ ⊢ A) in
the final position of the move is equal to the one in the initial position (and notjust another player with the same label).
If we try to picture this, we get that such a move should have for initial
position the one on the left-hand side below, and for final position the one on
the right-hand side below.
Γ1

⋮
Γn

A

↝

⋮

x′

Γ1

∆1

∆m

⋮
Γn

∆1

A⋅m
y
A
x

⋮
∆m

A third and final way to understand this interaction is in terms of interpretation of programs. In our game, players are placeholders for program fragments,
and channels are the means through which two program fragments may interact.
When we see things this way, positive players (those players that are labelled(Γ ⊢)) represent program fragments that are currently computing, while negative players (those labelled (Γ ⊢ A)) represent program fragments waiting to
be called on. A positive player labelled (Γ ⊢) represents a program fragmentthat has access to resources of type Γi , some of which may be continuations. A
negative player labelled (Γ ⊢ A) represents a program fragment that has accessto resources of type Γi (among which there may be continuations) and provides
a value of type A.
Two players x labelled (Γ ⊢ A) and y labelled (∆, A, ∆′ ⊢) interact when
the program fragment corresponding to y calls the one corresponding to x.
159

When this happens, y must stop computing to wait for x’s answer, and x starts
computing, with a new resource available: the continuation to y to give theiranswer. We thus see that there is a reversal of roles: x was negative before theinteraction and becomes positive afterwards, and vice versa for y. Moreover,x should still have access to the resources in Γ, so it should now be labelled(Γ, A ⋅ m ⊢). Similarly, y should also still have access to the resources it hadaccess to before, so it should be labelled (∆, A, ∆′ ⊢ A ⋅ m), waiting to be calledback on A ⋅ m. Finally, y should be able to call x again later in their execution
if they need to, and x should behave “the same” if we want our game to modela pure language, so the original copy of x should still be present in the final
position.
Stage (i): positions
Let us now formalise this. We call L the base category on which the pseudo
double category of string diagrams for HON games is built. We first build L1 ,which represents positions in our game, as follows:
Definition 5.2.2. Let L1 be the category freely generated by the graph with• a vertex for each arena,• a vertex for each sequent,• for each sequent S = (A1 , . . . , An ⊢) and i ∈ n, an edge si ∶ Ai → S,
• for each sequent S = (A1 , . . . , An ⊢ A), an edge t∶ A → S, and for all i ∈ n,an edge si ∶ Ai → S.
Example 5.2.3. The (informal) position of Example 5.2.1 is modelled as thepresheaf X defined by:• X(A) = {a, a′ }, X(B) = {b}, X(C) = {c},• X(A, C ⊢ B) = {y1 }, X(A ⊢ A) = {y2 }, X(B, A ⊢) = {x},• X(c) = ∅ otherwise,• y1 ⋅ s1 = y2 ⋅ s1 = a, y1 ⋅ s2 = c, y1 ⋅ t = x ⋅ s1 = b, and y2 ⋅ t = x ⋅ s2 = a′ ,Indeed, if we draw its category of elements, we obtain the graph on the left below,
which we draw as on the right, which is the desired position.
c

s2

y1

s1

t

C

b

a

B

x
a′

s1

y2

y1

s1

x

A

s2

A

y2

t

160

Stage (ii): selecting spans
Let us now select the spans our moves are built from. For all arenas A =∑i∈I mi .Ai and i ∈ I, we will have a span β corresponding to the move sketched in
the informal presentation. But in order for the obtained pseudo double category
to be fibred, we need to introduce one additional move for each player in theinitial position. This makes two moves: the one corresponding to the Λ(Γ⊢A),mand the one corresponding to @(Γ,A,∆⊢),∣Γ∣,m . As announced above, we should
enforce the fact that the player x survives the move β (and therefore Λ as well).
Given this, let us now select spans for√the Λ, @, and β moves.
For all sequents S = (Γ ⊢ A) and m ∈ A, consider the span SΛ
S,m =
Λ
wS,m

uΛ
S,m

Λ
Λ
Λ
YS,m
←ÐÐÐ ZS,m
ÐÐÐ→ XS,m
,

where
Λ
• XS,m= (Γ ⊢ A),Λ• YS,m= (Γ ⊢ A) ∣ (Γ, A ⋅ m ⊢) is the pushout∑i∈∣Γ∣ Γi[si ]i∈∣Γ∣(Γ, A ⋅ m ⊢)inr[si ]i∈∣Γ∣(Γ ⊢ A)(Γ ⊢ A) ∣ (Γ, A ⋅ m ⊢)inlΛ
• and ZS,m
= (Γ ⊢ A),Λ
with the obvious morphisms uΛ
S,m = id S and wS,m = inl. The form of the pushout(Γ ⊢ A)∣(Γ, A⋅m ⊢) reflects the fact that x and x′ should share all their channels
in Γ, as explained in the informal introduction.
√
For all S ′ = (∆ ⊢), i ∈ ∣∆∣, and m ∈ ∆i , consider the span S@
S ′ ,i,m =@wS′ ,i,mu@
S ′ ,i,m

YS@′ ,i,m ←ÐÐÐÐ ZS@′ ,i,m ÐÐÐÐ→ XS@′ ,i,m ,where• XS@′ ,i,m = (∆ ⊢),• YS@′ ,i,m = (∆ ⊢ Ai ⋅ m)
• and ZS@′ ,i,m = ∑i∈∣∆∣ ∆i ,with the obvious morphisms.
√
For all sequents S = (Γ ⊢ A) and S ′ = (∆ ⊢) with ∆i = A and m ∈ A,
consider the span SβS,S ′ ,i,m =β
wS,S′ ,i,muβ
S,S ′ ,i,m

β
β
β
YS,S
ÐÐÐÐÐ ZS,S
ÐÐÐÐ→ XS,S
′ ,i,m ←′ ,i,m Ð′ ,i,m ,

where
161

β
• XS,S′ ,i,m is the pushout

A

si

S′

t

S

inr
β
XS,S ′ ,i,m ,inlβ• YS,S′ ,i,m denotes the pushout[si ,t]A + (A ⋅ m)(Γ ⊢ A ⋅ m)inr[inl ○t,inr ○s∣∆∣+1 ]S ∣ (∆, A ⋅ m ⊢)β
YS,S
′ ,i,m ,inlβ• and ZS,S
′ ,i,m = (S + ∑j≠i ∆j ),with the obvious morphisms.
Stage (iii): augmenting the base category
At last, we augment our base category L1 with new objects and morphisms thatmodel moves, just like in the case of the π-calculus.
Definition 5.2.4. Let L consist of L1 , plus:• For all sequents S = (Γ ⊢ A) and m ∈t√A, an object ΛS,m with mapssSÐ
→ ΛS,m ←Ð (Γ, A ⋅ m ⊢) such that t ○ si = s ○ si for all i ∈ ∣Γ∣,√
• For all sequents S = (∆ ⊢), i ∈ ∣∆∣, and m ∈ ∆i , an object @S,i,m withtsmaps S Ð→ @S,i,m ←Ð (∆ ⊢ Ai ⋅ m) such that t ○ si = s ○ si for all i ∈ ∣∆∣,• For all sequents S = (Γ ⊢ A) and S ′ = (∆ ⊢), with i ∈ ∣∆∣ such that ∆i = A√
λ@and m ∈ A, an object βS,S ′ ,i,m with maps ΛS,m Ð→ βS,S ′ ,i,m ←Ð @S ′ ,i,msuch that
λ ○ t ○ t = @ ○ t ○ siandλ ○ s ○ s∣∆∣+1 = @ ○ s ○ t.

√
For all sequent S = (Γ ⊢ A) and m in A, we have by Yoneda a morphismΛΛt∶ XS,m→ ΛS,m . Moreover, we get s′ ∶ YS,m→ ΛS,m by universal property of
pushout in:∑i∈∣Γ∣ Γi[si ]i∈∣Γ∣(Γ, A ⋅ m ⊢)inr[si ]i∈∣Γ∣(Γ ⊢ A)

inl

s

Λ
YS,m
s′
t

ΛS,m .

Proposition 5.2.5. For all sequents S = (Γ ⊢ A) and move m insquare162√

A, the

Λ
wS,m

Λ
ZS,m

Λ
YS,m

uΛ
S,m

s′

Λ
XS,m

ΛS,m

t

is a pullback.
Proof. A simple check.
There are of course similar propositions for @S,i,m and βS,S ′ ,i,m .
We may now choose the signature describing HON games by choosing afunctor from L∣≥2 to Cospan(L). In fact, for each valid tuple (S, S ′ , i, m), L∣≥2
locally looks like the poset⋀

βS,S ′ ,i,m@λ

@S ′ ,i,m

ΛS,m⋀viewed as a category. We define our functor L∣≥2 → Cospan(L)H to map this to
Λ
YS,m

inl

β
YS,S
′ ,i,minr

YS@′ ,i,mΛS,mλβS,S ′ ,i,m@

@S ′ ,i,m

Λ
XS,m

inl

β
XS,S
′ ,i,minr(5.5)

XS@′ ,i,m .

We may easily check that this assignment yields a functor.
⋀

Definition 5.2.6. Let SHON ∶ L∣≥2 → Cospan(L)H denote the obtained functor.

5.2.2

Categories of Views and Plays
Required: 5.2.1, 4.4.4.
Recommended: ∅.

We may now construct the pseudo double category DHON based on thesignature SHON using the machinery from Chapter 4. We thus get a pseudo
double category of concurrent traces that represent HON games.
We may then prove:
Lemma 5.2.7. DHON is fibred.
Proof. By Corollary 4.4.40, it suffices to show that SHON is persistent, monolithic, and separated, which is routine.
From this, we get for each position X a category E(X) of plays over X, as
defined in Definition 4.3.30 and which may concretely be characterised as thecategory with:• as objects, all plays U ∶ Y

X,163• as morphisms from U ∶ Y
X to U ′ ∶ Y ′X, all double cells α as below
left, quotiented by the equivalence relation generated by relating α on theleft to α ○ (U ● γ) on the right:
Z

Y′

Z′

W

Y

α

W′
U

′

U

γ

Z

Y′

W

Y

α

U′

U

X

X

X

X.

Remark. Notice that, by Lemma 4.2.1, any α as above whose middle component
is 1D-injective automatically has a 1D-pullback bottom square. Moreover, if the
middle component is 1D-injective, then the top component also is.
As explained in Section 4.3.4, composition is defined using cartesian cells. The
composition of α and β below is β ○ (α ● γ), where γ is the cartesian lifting of s.
Z ′′

Z′
γ

Z

s

Y

β
α

Y ′′

W′
′

W

Y

s′

U ′′

U′

U

X

r

X

r′

X.

Composition defined this way indeed possesses an identity (the identity cell)and is associative (because cartesian cells compose both horizontally and vertically).
To relate to traditional HON game semantics, we need to define categories
of views and plays that are the counterparts of the traditional categories PA,B
and VA,B (see Section 2.1.3 for definitions). For this reason, we now restrict
our attention to particular shapes of initial positions. The counterpart to PA,B
in our case is simply the category E(A ⊢ B).
Remark. The construction may look too involved, since we end up restricting
our attention to plays over (A ⊢ B), that is, with only one player. For example,
β moves can never occur in a play over (A ⊢ B). Indeed, for such a move tohappen, the outgoing edge of one player must be equal to one of the incomingedges of another player. But we cannot find this pattern in the initial position,and positions where this pattern does not appear are stable under Λ and @ moves,
so a β move can never be played.
However, this machinery is built in the same way as our other string diagrammatic models, and it allows us to treat the multi-party positions that willappear in plays uniformly, and with the same intuitions as in playground models. The β move also makes sense in larger positions, for example when trying
to define interaction sequences in string diagrams. In this framework, we may
define interaction sequences just like plays, but with a different initial position:
an interaction sequence on the arena triple (A, B, C) is a play on the position(A ⊢ B ⊢ C), which is defined as the pushout164

(A ⊢ B)

t

B
s1

inl

(B ⊢ C)(A ⊢ B ⊢ C).

inr(This definition is however unsatisfactory for technical reasons, and we need toadapt the definition of the base category for it to be meaningful.)
In particular, we use this category in Chapter 6 to study fine invariants ofinteraction sequences in HON games.
We now need to give a counterpart to the notion of view. But fibred pseudo
double categories are inspired from the notion of playgrounds [50, 29], a categorical gadget that is in turn inspired from game semantics and come with anotion of view. In the setting of playgrounds, there are special moves calledbasic moves, which track only one player, and views are defined as compositesof such moves. The idea is that, if the behaviour of a player only depends on its
view (which is the basic idea of innocence), then its behaviour cannot dependon how other players play.
In our case, the idea is the same, but this exact approach fails on two points.
• Since there is a duality in HON game semantics between Opponent andProponent, who usually play alternatively, and we are only interested in
Proponent (because we want to describe the behaviour of the program,and not that of the environment), only composites of basic moves of evenlength should be views.
• We do not have all the basic moves that we need to define views this easily.
Indeed, one of the playground axioms, the axiom of views, basically states
X and player y∶ Y in the final position of M ,that, for all moves M ∶ Y
there should exist a cell
y

d
v

Y

αy,M

y,M

dy,M

xy,M

M

X,

where v y,M is a basic move or an equivalence and xy,M ∶ dy,M → X is aplayer. As the reader can see, this means that basic moves should haveplayers as their initial and final positions, and that for any move andplayer in its final position, there should be a basic move that corresponds
to what that player “sees” of the move. But, if we take the move Λ(Γ⊢A),mΛand the player inr∶ (Γ, A ⋅ m ⊢) → YS,m, there is no way to fill the diagram(Γ, A ⋅ m ⊢)

inr
α

v

d

x

Λ
YS,m
ΛS,m

(Γ ⊢ A).

What we do at this point in our other models is to define a new move,say λ(Γ⊢A),m , that only contains the player labelled (Γ, A ⋅ m ⊢) in its final
position. However, if we do that, then the channel labelled A in the initial165

position is not present in the final position, which breaks persistence, andthus our proof of fibredness.
Because of this, we should find an alternative definition of view that follows thesame idea: a view should only follow one player.
Definition 5.2.8. For any play U ∶ Y(A ⊢ B), we define the binary relation≺U on all moves m∶ µ → U of U (where µ ∈ L∣≥2 ) by m ≺U m′ if and only
if m ⋅ s = m′ ⋅ t. When m ≺U m′ , we say that m′ causally depends on m.
Furthermore, we omit the subscript when clear from context.
(A ⊢ B) such that the reflexive, transitive closure
A preview is a play U ∶ Y≺∗ of ≺U is a total order on the moves of U .
A view is a preview of positive, even length (i.e., it is the composite of apositive, even number of moves).
In other words, a preview is a play that does not contain any β moves andthat can be written as a composite M1 ●. . .●Mn of moves in a unique way (up toisomorphism of moves). This means that we may assign a number to each move,according to its place in the previous sequence, and that the kth move has tooccur before the k + 1th. In particular, no two moves may occur “in parallel”, or,if we decompose U as U1 ● Q ● U2 with Q a quasi-move (recall Definition 4.4.37),
then Q is actually a move. It also implies that U is an alternation of Λ and @moves, and that the k + 1th move is played by the unique player created by thekth move (i.e., that player who is in the final position of the kth move, but not
in its initial position).
Our counterpart to VA,B is:Definition 5.2.9. Let EV (A ⊢ B) be the full subcategory of E(A ⊢ B) spanningviews.
Let us also give a useful lemma on views:(A ⊢ B) be a view isomorphic to a composite ofLemma 5.2.10. Let V ∶ Z
a play U ∶ Y(A ⊢ B) and a move M ∶ Z ′Y . Then U is also a view.
Proof. Let (l, k, id (A⊢B) )∶ U ● M → V be the isomorphism. Because k is an
isomorphism, we have that ≺U ●M and ≺V have the same structure: all moves mV
in V are in the image of k, and m ≺U ●M m′ if and only if k(m) ≺V k(m′ ). Since
V is a view, we know that ≺V is of the form k(m1 ) ≺V . . . ≺V k(mn ), where m1 ,. . . , mn are all the moves in U ● M . Therefore, we have m1 ≺U ●M . . . ≺U ●M mn .
Now, it suffices to notice that ≺U ●M is an extension of ≺U , and that adding themove M can only add pairs m ≺ m′ in which m is a move from U and m′ is themove from M , so m′ is necessarily mn , so ≺∗U is a total order.
We finally give the notions of strategy that are associated to this game.
As mentioned in this chapter’s introduction, there are actually two notions ofstrategies, just like in game semantics.
Definition 5.2.11. An (A ⊢ B)-behaviour (or simply a behaviour) is a presheaf over EV (A ⊢ B).
Definition 5.2.12. An (A ⊢ B)-strategy (or simply a strategy) is a presheaf
over E(A ⊢ B). A strategy is innocent when it is in the essential image of ∏i ,where i is the inclusion of EV (A ⊢ B) into E(A ⊢ B).
166

5.2.3Characterisations of Views and Plays
Required: 5.2.2.
Recommended: ∅.

Before relating our categories of views and plays with Tsukada and Ong’s,
we digress a little in this section to establish the announced characterisation ofE(A ⊢ B) and EV (A ⊢ B), as subcategories of the coslice (A ⊢ B)/L.
⋀⋀

Definition 5.2.13. Let E′ (A ⊢ B) denote the subcategory of (A ⊢ B)/L spanstning morphisms t∶ (A ⊢ B) → U for which there exists a play Y Ð→U ←Ð (A ⊢ B),
and 1D-injective morphisms (Definition 4.3.10) between them.
Let (EV )′ (A ⊢ B) denote the full subcategory of E′ (A ⊢ B) spanning views.
There is an obvious candidate functor U∶ E(A ⊢ B) → E′ (A ⊢ B) mapping

s

t

Y Ð
→U ←
Ð (A ⊢ B) to t and a morphism
Z

Y′
W
U ●W

Y

α

U′

U
(A ⊢ B)(A ⊢ B)αfrom ⟨U ⟩ to ⟨U ′ ⟩ (remember Notation 4.4.14) to the composite U → (U ● W ) Ð→U ′.
Lemma 5.2.14. U is compatible with the equivalence relation ∼ (defined in
Notation 4.3.27) and yields a functor U∶ E(A ⊢ B) → E′ (A ⊢ B).
Proof. To show that U is compatible with ∼, we simply show that, for all situations as in (4.9), (⟨W ⟩, α) and (⟨W ′ ⟩, α ○ (u ● γ)) have the same image throughU. Given a diagram as the solid part of
Z′

Z
W′

Y′
γ

W
U ● W′

Y

U ●γ

U ●W

α

U′

U
X

X,

we get U ● γ by universal property of pushout, and the images through U of thetwo morphisms we are interested in are
167

α

U →U ●W Ð
→ U′

U ●γ

α

U → U ● W ′ ÐÐ→ U ● W Ð→ U ′,

andwhich are equal by construction of U ● γ. Functoriality of the obtained assignment is straightforward.
The rest of this section is devoted to proving:
Theorem 5.2.15. U is an equivalence, and thus restricts to an equivalence atthe level of views UV ∶ EV (A ⊢ B) → (EV )′ (A ⊢ B).
Since U is surjective on objects by definition, we just need to prove thatthe underlying functor to (A ⊢ B)/L is faithful and that its image on homsets
precisely spans 1D-injective morphisms.
This is in fact an easy consequence of:⋀(A ⊢ B) and u′ ∶ Y ′(A ⊢ B),
Lemma 5.2.16. Assume given plays u∶ Y′
and a 1D-injective morphism h∶ U(u) → U(u ).
Y and a morphism α∶ (u ● w) → u′ in
There exists a quasi-move w∶ Z
α
D(SHON )H such that h = (U → U ● W Ð→ U ′ ), which is minimal in the senseα′that, for any (w′ , α′ ) such that h = (U → U ● W ′ Ð→ U ′ ), there exists a uniqueγ∶ w → w′ such that α decomposes as α′ ○ (u ● γ), as in
Z

γ

s

Z′

Y′

w′

w

α′

Y

u′

u

(A ⊢ B)(A ⊢ B).

In the rest of the proof, we show how to build (w, α) and how to factor it
through any (w′ , α′ ) as above. The idea is that positive players (those of theform (Γ ⊢)) are always present in the final position (they can only play Λ moves,and they are present in the final positions of those moves), while negative players(those of the form (Γ ⊢ A)) are in the final position of a play if and only if they
never play (because they are not present in the final positions of @ moves). For
u ● w to have a map α to u′ , the final position Z of w must be contained inthat of u′ , which means that all negative players in Z must also exist in Y ′ . To
ensure this, we define w′ to play @ moves for all the negative players of w′ thatare not in the final position of u′ .
In order to prove this, we need to analyse final positions of plays as follows.
Given a position X ∈ L, recalling Terminology 4.3.9, let us call a channel an
input when it occurs as x ⋅ si , for some player x ∈ X(S) for some sequent S, andan output when it occurs as x ⋅ t. In general positions, channels may be both
inputs and outputs, but in coproducts of sequents, each channel is one or theother, but not both. Let us generalise this situation:⋀

Definition 5.2.17. A position is polar when each of its channels is either an
input or an output but not both.
Non-polar positions either have disconnected channels (which are neither
inputs nor outputs) or channels which are both inputs and outputs.

168

From this point on until the end of the proof of Lemma 5.2.16, we will
implicitly use the fact that β moves never occur in the plays we consider, whichholds because we only consider plays starting from polar positions. In particular,
we will use notations such as m ⋅ t or m ⋅ s for arbitrary moves m, which is illdefined in general, but well-defined for Λ and @ moves.
Lemma 5.2.18. Any polar position admits a surjective and 1D-injective map
from a coproduct of sequents, given by the counit of the comonad of Proposition 4.4.10.
Proof. The counit is clearly 1D-injective, and it is surjective because all channels
are connected to at least one player (otherwise, they would not have a polarity).
Lemma 5.2.19. For all plays u∶ Y

(A ⊢ B), Y is polar.

Proof. This follows from the more general fact that, for any u∶ Ypolar X, Y is polar, which is proved by induction on the length of u.

X withDefinition 5.2.20. An interface is a position consisting only of channels.
Any polar position X comes with a canonical (up to isomorphism) monic
map IX +OX ↪ X from some coproduct of two interfaces IX and OX , surjective(hence iso) in dimension 0, such that IX covers inputs and OX covers outputs.
Note that all maps preserve polarity, i.e., any h∶ X → Y maps positive channels
to positive channels and negative ones to negative ones, but they may also add
polarities to some channels, so, e.g., a positive channel may be mapped to achannel that is both positive and negative.
Notation 5.2.21. We call any map as in Lemma 5.2.18 a polar cover of thegiven position. We fix a global choice of such polar covers, which, for any polarεX, we denote by Pl(X) = (∑i∈PX XiP ) + (∑i∈NX XiN ) X X, where each XiP
is a positive sequent, i.e., one of the form (Γ ⊢), and each XiN is a negative
sequent, i.e., one of the form (Γ ⊢ A), and PX and NX are the numbers of
positive and negative players in X, respectively.
Finally, by Lemma 4.4.28, any play u on Pl(X) “descends” to a play (εX ⋅u)∶ (εX ⋅ Y )X, as the pushout
id ●IPl(X) +OPl(X)u

id ●IX +OXαuXεX ⋅ u.

We now need a further observation on final positions. These are a priori
associated to some play, but in fact we may pose:⋀

Definition 5.2.22. The final position ↑U of a presheaf U ∈ L is the smallest
subpresheaf of U containing all channels and negative players, as well as all
positive players x for which there exists no move m with m ⋅ t = x. We deem theelements of ↑U final in U .
Accordingly, a morphism h∶ Y → U with Y a position, is called final if andonly if it is isomorphic to ↑U → U (in L/U ).
⋀169

Intuitively, the final position retains only those positive players who haven’t
yet played any move.
(A ⊢ B), su is final.

Lemma 5.2.23. For all plays u∶ Y
Proof. By induction on u.

Our next step will have to do with fullness of U. It will rely on the following
notion:(A ⊢ B), a 1D-injective morphism
Definition 5.2.24. For any play u∶ Yh∶ X → U (remember Notation 4.4.14) is P -ample if and only if for all S, i, r
and m ∈ U (@S,i,r ), if m ⋅ t ∈ Im(h) then m ⋅ s ∉ Im(h).
The idea behind P -ample morphisms is that such a morphism X → U only
takes a “slice” of the play at some point in time, and so all players in X havecausally independent images in U . (This is only a rough idea, and there may a
player causally dependent on another in a P -ample morphism.)(A ⊢ B), final players of U are called
Definition 5.2.25. For any play u∶ Ysurvivors, while non-final players are called doomed. The set of survivors of U
is denoted by Surv(U ) and the set of doomed players by Doom(U ).
For any h∶ X → U , we reflect the decomposition of pl(U ) into survivors anddoomed players as pl(X) = Surv(X) ⊎ Doom(X).
Of course, all doomed players are positive.
Lemma 5.2.26. For any play u and moves m1 and m2 in U , if m1 ⋅ s = m2 ⋅ s,then m1 = m2 .
Proof. By induction on u.
su

X, let ⌈u⌉ denote the cospan Y Ð→

Notation 5.2.27. For any play u∶ Y
UU.

Lemma 5.2.28. Assume given any polar position X, play u∶ Y
(A ⊢ B),and P -ample morphism h∶ X → U .
There exist quasi-seeds (vertical morphisms which are either seeds or identities) Mi ∶ Yi
XiP for all i ∈ PX and a 1D-injective αh as in(∑i∈PX Yi + ∑j∈NX XjN )Mh(∑i∈PX XiP + ∑j∈NX XjN )

M

αX h

εX ⋅ (∑i∈PX Yi + ∑j∈NX XjN )εX ⋅Mh
εX

X

Y

αh

⌈u⌉

U,

h

where bottom squares are all 1D-pullbacks, Mh = (∑i∈PX Mi + ∑j∈NX XjN ) and,⋀on the right, the cospan ⌈u⌉ is viewed as a vertical morphism in Cospan(L).

Proof. Let X N = ∑j∈NX XjN and X P = ∑i∈PX XiP . By Lemma 5.2.23, any
negative player x in X uniquely corresponds to some negative player x′ in Y ,mapped to h(x) by su . This yields a cell

170

XN

Y
αN

⌈u⌉

U.

XN

Now, for any positive survivor x in X (over some sequent Sx ), if we define
Yx = Sx , there is a cell
Yx

Y
αx

Sx

⌈u⌉

U
⌜h(x)⌝

analogous to the one above.
Finally, for any doomed x ∈ X(Sx ), let x′ = h(x) denote its image in U (Sx ).
Because x is doomed, there exists a (unique) move m ∈ U (@Sx ,i,r ) for some i andSx ) = SHON (@Sx ,i,r ) denote the seed ofr, such that m ⋅ t = x′ . Let (Mx ∶ Yx
m. By definition of SHON , Yx is a negative sequent, and we let y = m⋅s ∈ U (Yx ).
By the same argument as above, y has a unique antecedent y ′ in Y and so there
exists a cell
Yx
Mx

Sx

⌜y ′ ⌝
αx⌜h(x)⌝

Y
⌈u⌉

U.
⋀

By copairing all these cells, we obtain a cell αh0 ∶ Mh → ⌈u⌉ in Cospan(L),which decomposes as desired by universal property of pushout and the fact that
id ●IU +OU is the universal interface with a map to U (so IX + OX → U factors
through IU + OU ). It remains to prove that all involved maps are 1D-injective
and that all bottom squares are 1D-pullbacks.
Let us first show that αh0 is 1D-injective. In dimension 2, if m, m′ ∶ @S,i,r →Mh are two moves such that αh0 m = αh0 m′ , then (αh0 m) ⋅ t = (αh0 m′ ) ⋅ t, so
αh0 (m ⋅ t) = αh0 (m′ ⋅ t), but m ⋅ t and m′ ⋅ t have antecedents in X N + X P , so thiscontradicts 1D-injectivity of hεX . In dimension 1, the set of players of Mh is
isomorphic to the coproduct of players of X N , X P , and Y N , where Y N denotes∑x∈Doom(X) Yx , the set of players created by the @S,i,r moves in Mh . SincehεX is 1D-injective, players in the image of X N and X P cannot be equated by
αh0 . Players in Y N and X P cannot be equated because they lie over different
objects (those in Y N are over negative sequents, while those in X P are overpositive ones). By construction, players in Y N cannot be equated by αh0 : byLemma 5.2.26, in a play, if m ⋅ s = m′ ⋅ s, then m = m′ . So the only possibility
for αh0 not to be 1D-injective is for a player in Y N to be equated with a player
in X N . Let us call y N and xN these two players. By construction of Mh , weknow that there is a player xP in the image of X P and a move m in Mh suchthat y N = m ⋅ s and xP = m ⋅ t. But then, h(εX (xN )) = αh0 (y N ) = αh0 (m) ⋅ s andh(εX (xP )) = αh0 (m) ⋅ t, which contradicts P -ampleness of h.
The left-hand square has a 1D-pullback bottom square by Lemma 4.4.28
and the fact that id ●IPl(X) +OPl(X) → id ●IX +OX is bijective in dimensions > 0. The
large rectangle has a 1D-pullback bottom square by Lemma 4.2.2. Finally, theright-hand square has a 1D-pullback bottom square by Lemma 4.2.3.
171

We have three further handy lemmas:
Lemma 5.2.29. For any horizontal morphism h∶ X ′ → X and play u∶ Y
X,there exists at most one cell id ●X ′ → u with bottom border h.
For any @S,i,r ∈ ob(L), morphism h∶ S → X, and play u∶ Y
X, there exists
at most one cell SHON (@S,i,r ) → u with bottom border h.
Proof. The first proof is by monicity of Y → U . For the second, because X → U
and Y → U are monic, any cell α∶ SHON (@S,i,r ) → u is uniquely determined byits middle component @S,i,r → U . But, by Yoneda, that component itself is determined the image of m = id @S,i,r (which is the move element in SHON (@S,i,r )).
But this is in fact uniquely determined by the image of t ∈ y@S,i,r (the player
element), so it is uniquely determined by h(id S ). Indeed, by an easy induction
on u, there is at most one m′ ∈ U (@S,i,r ) such that m′ ⋅ t = h(x).
Lemma 5.2.30. For any play u and player x in U , either x is in the image oftu or there exists a move m such that x = m ⋅ s. Dually, either x is in the imageof su or there exists m in U (@S,i,r ), for some S, i, r, such that x = m ⋅ t.
Proof. By induction on u.
We now define a relation analogous to ≺ (Definition 5.2.8), but on players:
Definition 5.2.31. For all plays u and players x and y in u, let x ≺u y if andonly if there exists m such that x = m ⋅ t and y = m ⋅ s. As before, we omit thesubscript when clear from context.
Lemma 5.2.32. For all morphisms h∶ U(u) → U(u′ ) in E′ (A ⊢ B), if h(x) ≺u′h(y) with x positive, i.e., over some (Γ ⊢), then x ≺u y.
Proof. Let m′ witness h(x) ≺u′ h(y). By Lemma 5.2.30, we have h(y) ∉ Im(tu′ ),so y ∉ Im(tu ), and hence there exists m ∈ U such that m ⋅ s = y, again byLemma 5.2.30. Now, by naturality of h, we have h(m) ⋅ s = h(y) so h(m) = m′
by Lemma 5.2.26. Again by naturality of h, we get h(m ⋅ t) = m′ ⋅ t = h(x), so
by 1D-injectivity of h we obtain x = m ⋅ t and hence x ≺u y.
Lemma 5.2.16 now follows:
Proof of Lemma 5.2.16. Given u, u′ and h, let k = h ○ su . This morphism is P ample. Indeed, consider any m′ ∈ U ′ (@S,i,r ) with k(x) = m′ ⋅ t, and k(y) = m′ ⋅ s.
Then we have k(x) ≺u′ k(y) so by Lemma 5.2.32, there exists m witnessing
su (x) ≺u su (y), so su (x) ∈ Im(su ) and m ⋅ t = su (x), which, by Lemma 5.2.30,
is a contradiction.
Since k is P -ample, by Lemma 5.2.28, we get a cell (l, αk , k)∶ w → ⌈u′ ⌉ with
Y a quasi-move. This in particular ensures that the squarew = ε Y ⋅ Mk ∶ Z
Y
U

W

h

172

U′

commutes. By universal property of pushout, this induces a unique morphismUWα∶ u ● w → u′ such that α ○ inj W
U = h and α ○ inj W = αk (where inj U ∶ U ↪ U ● W
Uand inj W ∶ W ↪ U ● W are the pushout injections). Let us show that α is
1D-injective by showing that W ∖ Y and U ∖ Y have disjoint images in U ′in dimensions > 0. In dimension 1, if αk (xW ) = h(xU ) for some players xWof W ∖ Y and xU of U , then by construction of W , xW is a negative player,
hence so is xU , and therefore xU is in Y by Lemma 5.2.23. In dimension 2, if
αk (mW ) = h(mU ) for some moves mW of W and mU of U , then by constructionof W , mW must be such that mW ⋅ t = tw (y) for some player y in Y , and mW is
also necessarily an @ move, and thus, so must mU . Now, h(mU ⋅ t) = h(mU ) ⋅ t =αk (mW ) ⋅ t = αk (mW ⋅ t) = αk (tw (y)) = k(y) = h(su (y)), so by 1D-injectivityof h, mU ⋅ t = su (y), which is a contradiction by Lemma 5.2.30. To show thatthe bottom square of α∶ u ● w → u′ is a 1D-pullback, it suffices to notice that
α is 1D-injective and the bottom component is an identity, so the square is a
1D-pullback by Lemma 4.2.1.
It remains to show that the pair (w, α) is minimal. Consider thus any (w′ , α′ )′such that α′ ○ inj W
U = h.
By Lemma 5.2.30, a positive player x ∈ U (S) in the image of tu is doomed if
and only if there is a move m ∈ U (@S,i,r ), for some i and r, such that x = m ⋅ t.
Now, let us observe that, by construction of W , for any positive player x of
Y , tw (x) ∈ Doom(W ) if and only if k(x) ∈ Doom(U ′ ).
But, for any player x in Y , if k(x) is doomed in U ′ then tw′ (x) is doomed in′
W (otherwise, tw′ (x) has an antecedent in Z ′ by Lemma 5.2.30, and thus k(x)has an antecedent in Y ′ , which is a contradiction, again by Lemma 5.2.30).
This entails that Mk → U ′ lifts through α′ ○ inj U
W ′ , as desired, uniquely byLemma 5.2.29. But then w → U ′ also lifts through α′ by universal property ofMkpushout, uniquely because αZ
is epi.
Proof of Theorem 5.2.15. Lemma 5.2.16 easily entails that the image of U in
(A ⊢ B)/L on homsets spans 1D-injective morphisms. Faithfulness follows fromminimality of the constructed pair (w, α).
⋀

5.3

The Level of Plays: Intuition

We now want to define the functor F ∶ PA,B → E(A ⊢ B) and show that it is afull embedding and that it restricts to an equivalence F V ∶ VA,B → EV (A ⊢ B)
on views. For reasons we explain at the end of this section, the arguments usedhere are not as formal as one would expect, so this whole section is here more
to give the reader intuition about F than a formal construction and proofs of
its properties, which are delayed to Section 5.4.

5.3.1

Illustration on an Example
Required: 5.2.3.
Recommended: ∅.

To give some intuition about how this embedding works, we apply it to an
example, illustrated in Figure 5.1. This embedding is decomposed into two
steps: the first one maps TO-plays to some form of proof trees, and the second173qr ql tl fr fl tr
1
fr
tr
tl
fl
ql
qr
2
Bl , {t, f}r , ∅l ⊢ ∅r
Bl , {t, f}r , ∅l ⊢ ∅rtr
fr
Bl , {t, f}r , ∅l ⊢Bl , {t, f}r , ∅l ⊢tl , fl
Bl , {t, f}r ⊢ {t, f}lql
Bl , {t, f}r ⊢qr
Bl ⊢ Br
3
Bl , {t, f}r , ∅l ⊢ ∅rtr
Bl , {t, f}r , ∅l ⊢ ∅r
Bl , {t, f}r , ∅l ⊢Bl , {t, f}r ⊢ {t, f}lfrfl
Bl , {t, f}r , ∅l ⊢Bl , {t, f}r ⊢ {t, f}ltl
Bl , {t, f}r ⊢ {t, f}lql
Bl , {t, f}r ⊢Bl ⊢ Brqr
Bl ⊢ Br
4
tr
fl
fr
tl
ql
qr

Figure 5.1: The big picture174

one maps these proof trees to plays as string diagrams. In our example, we
further refine both steps: TO-plays are first mapped to P -view trees [16], thento proof trees, then to a linearised form of the same proof tree, and finally to astring diagram.
In our example, we study a play s on (Bl , Br ), the pair of two boolean arenas,
where l and r are only present to show in which copy of B moves are played. We
show how s may be mapped to a string diagram P , explain why this mapping
is functorial, and how it restricts to an equivalence on views.
Our plays are as defined in Section 5.2, but, for the sake of readability,
we omit channels when drawing positions. We thus need to have a way to
distinguish between positive and negative players. We depict the positive ones
and negative ones as . The only two moves that may occur in a playason (A ⊢ B) are built from the seeds ΛS,m and @S,i,m , which are depicted as
m

m

and
respectively, with their initial positions at the bottom andthe final ones at the top, but where we omit channels. We can then draw movesm, which is a moveby drawing a seed and the rest of the position, as inon a position with two players, with the left player playing an @ move. A play
can then be represented as a vertical pasting of moves.
A morphism of plays f (i.e., a morphism in D(SHON )H ) is then just like aninjective morphism of graphs whose vertices are players and whose edges are
moves: it sends players and moves labelled c to players and moves with thesame label and respects the graph structure of the play. It should also respect
the initial and final positions in the sense that the image of the source’s initialand final positions should be contained in the target’s initial and final positions.
A morphism f ∶ U → U ′ in E(A ⊢ B) is then just an inclusion of the graphrepresenting U into that representing U ′ that respects the initial position.
As a first step (Step 1 in Figure 5.1), we map our example play s to its P view tree [16], a tree whose branches are the TO-views of s. There are two typesof “arrows” in this tree: the ones depicted as proper arrows, which correspondto justification pointers in s, and the ones that create the tree structure, whichcorrespond to the view of each move, as defined inductively:• if m is an O-move, then in the tree it is the child of its predecessor in thesequence,• if m is a P -move, then in the tree it is the child of its justifier in thesequence.
Since, in the tree structure, all O-moves point to their predecessors, P -view
trees can only branch at odd depth.
We then map this P -view tree (Step 2) to a partial proof tree (i.e., a proof
tree whose branches may be left unfinished) in a sequent calculus based on
arenas. Partial proof trees in this sequent calculus represent explorations of
proofs in sequent calculus (5.4) (what we call exploration is basically a sub-treeof the whole proof), so it is not very surprising that these partial proof trees
are equivalent to string diagrams. By definition of the sequent calculus these
proof trees will be built on, they may branch arbitrarily, but only at odd depth,
just like P -view trees. This notion of play comes with a notion of view, which
175

are simply branches in this sequent calculus. Even though both notions aretrees and look alike (the structures are clearly similar), there are some subtle
differences: the P -view tree is labelled by moves, while the proof tree is labelledby sequents of arenas, and the P -view tree contains pointers, while the proof
tree does not. A little bit of work has to be done to prove that this mapping
is a full embedding and that it restricts to an equivalence on views. We prove
this for the composite of Steps 1 and 2 in Section 5.3.3.
Steps 3 and 4 are conceptually simple, but somewhat tricky to formalise,
so we do not detail them in the rest of the chapter. Step 3 maps the proof
tree, which may branch with an arbitrary degree, to a similar tree that only
branches in a binary way. Let us call the result of Step 3 a sequential proof
tree (in the sense that we have sequentialised some of the tree structure). To
do this, we change the rules on which our proof trees are built. Here, the rulesthat have a positive sequent as conclusion are the same as in the previous proof
trees, but the rules that have a negative sequent as conclusion have necessarily
two premises: a positive one like in the previous proof trees, and a copy of theconclusion. Sequentialising a proof tree is now completely obvious: if a node
has n premises, we just apply the sequential rule n times. There is a choice tobe made on the order in which we sequentialise the rules, but all these choices
lead to isomorphic plays in the end. For example, we have decided to linearise
the tree by applying tl first, and then fl in our example, but the reverse ordering
would clearly yield the same string diagram. Step 4 is completely direct: all therules of the proof tree now exactly correspond to moves in our game, so we justmimic the structure of the proof tree. Nodes in the tree become players withthe same label, and deduction rules become moves in our game. Here again,
since the tree is a branching structure, we may choose to apply the moves indifferent orders, but all choices lead to isomorphic plays. In our example, wehave chosen to play tl , fr , fl , and tr in that order, but we could have played fr
at any point after tl (and all the resulting plays are isomorphic).
To show that this mapping reduces to an equivalence when restricted toviews on both sides, we should first say what our views look like when drawn
like the bottom play in Figure (5.1). They are simply non-branching plays,
in the sense that, for all Λ moves (the only moves that can possibly branch),
only the created player may play in the rest of the play. For example, the play
depicted at the bottom of Figure (5.1) is not a view because, both players in the
final position of the tl move play (fr and fl respectively). Equivalently, since all
equal signs are mathematical equalities in the presheaf that represents the play,
we may collapse the whole structure along these equal signs. A play is then aview if and only if this collapse is linear, i.e., it never branches. Now, we canmap views in our setting back to TO-views by reading moves from bottom to
top in our view (this is unambiguous because views do not branch). We explain
in Section 5.3.3 how to recover pointers from the structure of a play, and how
this implies that the sequence defined by taking moves from bottom to top in aview is actually a TO-view.
Finally, let us briefly mention the case of morphisms. Morphisms of TOplays are injective functions that respect views (in the sense that it “maps views
to views”). Through Step 1, they are mapped fully and faithfully to injective
morphisms of rooted trees, i.e., those injective morphisms of trees that map
its source’s root to its target’s root. Through Step 2, they are mapped fully176

and faithfully to inclusions of proof trees, which is the notion of morphism of
proof trees. This is not surprising since P -view trees are mapped to proof treesthat have exactly the same structure and the notions of morphisms are similar inboth settings. Through Steps 3 and 4, inclusions of proof trees are mapped fully
and faithfully to morphisms in EV (A ⊢ B). This is once again not surprisingbecause both notions of morphisms are similar, in the sense that they can bothbe seen as morphisms of trees.

5.3.2

From String Diagrams to Proof Trees
Required: 5.3.1.
Recommended: ∅.

In this section, we build another model of HON games based on proof trees
and show that it has equivalent categories of views and plays as our string
diagrammatic model.
The sequent calculus these proof trees are built on is:
right

...

Γ, A ⋅ m(i) ⊢...

(∀i ∈ n)left

Γ, A, ∆ ⊢ A ⋅ m(5.6)
Γ, A, ∆ ⊢√where the right rule can be applied with any√ m∶ n → A for a positive n andthe left rule can be applied with any m ∈ A. Notice how, apart from theabsence of a cut rule, the sequent calculus (5.4) we have introduced at the
beginning differs only slightly from this one: there, in the right rule, m must
always be a bijection. Moreover, while the objects of interest are “complete”
trees in the first case, the objects of interest here are “incomplete” trees. This
once again corresponds to the fact that we are interested in explorations of
proofs, and not proofs themselves. Therefore, some branches of the proof may
not be explored (hence the fact that m need not be surjective) and others may
be explored more than once (hence m need not be injective).
An S-tree is a partial proof tree (i.e., a proof tree whose branches may be left
unfinished) whose conclusion is S. For all sequents S, the counterpart of E(S)is the category T(S) of S-trees and morphisms of such, which are inclusions,both in width and depth, of S-trees, defined inductively by:Γ⊢A• the empty S-tree has exactly one morphism to all other S-trees,• if, for all i in n, Ti is a (Γ, A ⋅ mi ⊢)-tree, and for all i in m, Ti′ is a
T1 . . . Tn
(Γ, A ⋅ m′i ⊢)-tree, then the set of morphisms from
to
Γ⊢A
′
′
T1 . . . Tm
is the disjoint union, for all injective g∶ n → m such thatΓ⊢A′′
mg(i) = mi , of ∏i∈n T(Γ, A ⋅ mi ⊢)(Ti , Tg(i)),• if T and T ′ are (Γ, A, ∆ ⊢ A ⋅ m)-trees, then the set of morphisms fromT
T′
is T(Γ, A, ∆ ⊢ A ⋅ m)(T, T ′ ).
toΓ, A, ∆ ⊢Γ, A, ∆ ⊢Notice that morphisms treat the premises of a (Γ ⊢ A) node as if they wereunordered.
We also need a counterpart of EV (S), which is given by S-branches:
177

Definition 5.3.1. An S-branch is a non-branching S-tree (i.e., an S-tree whoseright rules are all unary) of positive, even depth. Let B(S) be the full subcategory of T(S) spanning S-branches.
Remark. Representing plays as trees is reminiscent of Boudes’s work [16], andour trees are indeed close to his P -view trees (it may be shown that a slightvariant of this notion is equivalent to ours), but there are some differences. The
first one is that his notion of morphism of trees is different. In particular, thefunctor from TO-plays to trees is not full with his definition of morphism. The
second one is that we allow branches of odd depth, when he does not. Both thesedifferences are easily remediable, but there are two more fundamental differences:
the nodes of his trees are labelled by moves in an arena while ours are labelled bysequents of arenas, and his P -view trees contain pointers while our trees do not.
Some work must therefore be done to know whether the two notions coincide.
Example 5.3.2. The tree in the middle of Figure 5.1 (between Steps 2 and 3)
is an example of (B, B)-tree. Here is an example of (A ⊢ B)-tree:
A, B ⋅ m ⊢A, B ⋅ m ⊢m, m .
A⊢B
None of these trees are branches (they both branch at some point). Note that,while the first tree intuitively represents a TO-play, the other one does not, as
it lacks alternation: it is as if Opponent had played m twice in a row. This
example also shows that morphisms treat premises as if they were unordered, inthe sense that there are two morphisms from that tree to itself (one that maps
both branches to themselves and one that swaps them).
Here is an example of (A ⊢ B)-branch:
A, B ⋅ m ⊢ A ⋅ m′m′ .
A, B ⋅ m ⊢mA⊢B
We will later need this technical result:
Proposition 5.3.3. T(A, B ⊢ C) and T(A + B ⊢ C) are isomorphic.
This is a conceptually simple result, and we only sketch the proof.
Proof. We want to show by induction that TN (A, B ⊢ C) and TN (A + B ⊢ C)
are isomorphic, where TN (S) is the category of S-trees of height at most S.
This is enough to prove the main result, because T(S) is the colimit of the
TN (S)’s, and colimits of isomorphic diagrams are isomorphic.
But we first need to generalise the induction hypothesis. For all integers
n, m and maps γ∶ n → m, we define γ(A1 , . . . , An ) as the m-tuple whose kth
component is ∑γ(i)=k Ai . We generalise this notation to sequents in the obvious
way: γ(Γ ⊢ A) = (γ(Γ) ⊢ A) and γ(Γ ⊢) = (γ(Γ) ⊢). It is now easy to showthat for all integers n and m and all maps γ∶ n → m and sequent S of length n,
TN (S) ≅ TN (γ(S)).
We now show that (A ⊢ B)-trees and branches are just an alternative wayof representing plays and views:
178

Lemma 5.3.4. T(A ⊢ B) and E(A ⊢ B) are equivalent, and so are B(A ⊢ B)
and EV (A ⊢ B), and these equivalences are such that
B(A ⊢ B)

T(A ⊢ B)EV (A ⊢ B)

E(A ⊢ B)

commutes.
The intuition behind this statement is that sequents in the proof tree correspond to players who exist at some point in the play, and that deduction rules
correspond to what such players can do during the play. The trees are meant
to be read bottom up: at the beginning of a play in E(A ⊢ B), there is only one
player of type (A ⊢ B) present in the play. Because that player is negative, they
are present in the final position of any move they play, and there is no causal
dependence between the different moves they can play, so they can be seen as
being played in parallel, independently from one another, which corresponds
to the right rule with a family I of cardinal n if the player plays n different
moves. On the contrary, positive players are never present in the final positionsof any move they play, so they may only play once, hence the form of the left
rule, which allows for a single move to be played.
Proof. By Theorem 5.2.15, the lemma is equivalent to showing that T(A ⊢ B)
and B(A ⊢ B) are equivalent to the subcategories of the coslices of Theorem 5.2.15 (which are denoted E′ (S) and (EV )′ (S) for any sequent S) andthat the desired diagram commutes. We actually show a slightly more general
result, by replacing (A ⊢ B) above by any sequent S.
The basic idea is very simple: if U is a play and T is an S-tree that isequivalent to it (for the equivalence that will be defined below), then nodes ofT correspond exactly to players of U ; edges of T exactly to moves of U ; andan edge e connects a node x to its parent y in T exactly when the player that
corresponds to y plays the move that corresponds to e, resulting in the creationof a new player that corresponds to x.
For any sequent S, S-trees may be interpreted as elements of S/L inductively
like so:⋀• the empty S-tree is interpreted as id ∶ S → S,
• if T is a (Γ, A, ∆ ⊢ A ⋅ m)-tree interpreted as f ∶ (Γ, A, ∆ ⊢ A ⋅ m) → U , thenT
is interpreted as ̃t defined by universal property of pushout in
Γ, A, ∆ ⊢(Γ, A, ∆ ⊢)t@(Γ,A,∆),∣Γ∣+1,ms(Γ, A, ∆ ⊢ A ⋅ m)
f

̃
t

̃
U

U,

• if Ti ’s are (Γ, A ⋅ m(i) ⊢)-trees interpreted as fi ∶ (Γ, A ⋅ m(i) ⊢) → Ui , thenT1 . . . Tn
is interpreted as the arrow (Γ ⊢ A) → U ′ resulting fromΓ⊢A
the wide pushout of t̃1 , . . . , t̃n :
179

t̃1

(Γ ⊢ A)
⋰

̃1
U

̃
t

t̃n

̃n
U

̃,
U

where t̃i is defined by universal property of pushout in:(Γ ⊢ A)t

Λ(Γ⊢A),m(i)s(Γ, A ⋅ m(i) ⊢)
fi

t̃i

Ũi

Ui .
⋀

The interpretation of morphisms of S-trees is a morphism in the coslice S/L,
and it is defined by induction on the S-tree structure:• if the interpretation of T is f ∶ S → U , the only morphism from the empty
S-tree to T is sent to f (remember that the interpretation of the empty
tree is id S ),• if T → T ′ is sent to α∶ f → f ′ , we get a morphism from the interpretationTT′of
to that ofby universal property of pushout
Γ, A, ∆ ⊢Γ, A, ∆ ⊢in(Γ, A, ∆ ⊢)t@(Γ,A,∆),∣Γ∣+1,ms(Γ, A, ∆ ⊢ A ⋅ m)
f

̃
t

̃
U

U

t̃′
α

̃′
U

U ′,

′
′
̃
• if Ti → Tg(i)is sent to αi ∶ fi → fi′ , then we get α̃i ∶ Ũi → U
as above,g(i)T1 . . . Tn
and a morphism from the interpretation of
to that ofΓ⊢A′′
T1 . . . Tm
by universal property of wide pushout in
Γ⊢A

S

S
̃n
U

̃′
U
k

̃1
U

⋰

′
̃
U
g(1)

⋰

̃
U

′
Ũ
g(n)

̃′
U
l

̃′ ,
U

where k, . . . , l are the indices of m that are not in the image of g.
180

This interpretation is functorial.
The interpretation of the left rule corresponds to an @ move, and theinterpretation of the right rule to an n-composite of Λ moves. Therefore, theinterpretation of an S-tree is a composite of moves, so it is a play, hence theimage of the interpretation is contained in E′ (S).
Conversely, any play in E(S) may be interpreted as an S-tree. The interpretation of a play P is defined by induction on the number of moves P iscomposed of. The construction maintains the invariants that all nodes in the
S-tree correspond to exactly one player of the same type in P , and that a node
x is a child of y if and only if the player corresponding to x is created by amove played by y in P . The empty play (composite of 0 moves) is interpreted
as the empty S-tree, and if P is composite Q ● M where Q is a play and M amove 1 , and Q is interpreted as the S-tree on the left below, where the node S ′corresponds to the player who plays M , then P is interpreted as on the right
below, where S ′′ is the resulting sequent (i.e., if S ′ = (Γ ⊢ A) and M is a ΛS ′ ,mmove, then S ′′ = (Γ, A ⋅ m ⊢), and if S ′ = (Γ ⊢) and M is an @S ′ ,i,m move, then
S ′′ = (Γ ⊢ Γi ⋅ m)), and the new S ′′ node in the tree corresponds to the player
created by M .
T1′
T1

...

Tn
T

...
S′

T1′

′
Tm

T1

...

...

′
Tm

S

Tn

S ′′

′

T

Even though this looks wrong at first sight in the case where S ′ is of the form(Γ ⊢) (because then the tree could possibly branch on such sequents, which isforbidden by the structure of our trees), we know that such a player may only
play at most once in a play, so m must be equal to 0 in that case, so there is nocontradiction.
Moreover, in the case of plays whose initial positions consist of a single
player, a morphism in U → V in E(S) can be reduced to an injective mappingof moves of U to those of V that preserves both causality (if a player x is createdby a move m and plays a move m′ , then the image of m′ must be played by aplayer created by the image of m) and the initial player (the image of all moves
played by the initial player of U must be played by the initial player of V ).
Therefore, a morphism of plays U → V is equivalent to a mapping of edges in
the interpretation of U to those in the interpretation of V that respects causality(if an edge is under another in the source tree, then its image must be under
the other’s image in the target tree) and initiality (the image of all edges thatstart from the root must start from the root), i.e., they are exactly morphismsof S-trees. This interpretation is also functorial.
It can easily be seen that both composites of these two interpretations (theone from T(S) to itself and the one from E′ (S) to itself) are naturally isomorphic
to identities: for any of the two interpretations, the number of nodes in the tree
is equal to the number of players in the corresponding play (and they have thesame type), the number of edges of the tree to that of moves in the play (andthey have again the same type), and their structure (what we called “initiality”
and “causality” above) is preserved. Therefore, the image of a tree T throughthe composite of both interpretations has the same number of nodes and edges
1 There may be several such decompositions, but they all result in the same interpretation.

181

as as T , and these nodes and edges are structured exactly the same in both
trees, so they are isomorphic (and similarly for plays).
Therefore, the two interpretations form an equivalence between T(S) andE′ (S), and therefore T(S) and E(S) are equivalent.
Moreover, the definition of views ensures exactly that views are linear, inthe sense that a player cannot play more than one move. It is then easy to show
that, if a player cannot play more than one move, then its interpretation must
be a branch, and conversely that, in the interpretation of a branch, each player
must play at most once. Therefore, the equivalence restricts to an equivalence
between B(S) and EV (S), hence the result.

5.3.3

From Proof Trees to Justified Sequences
Required: 5.3.2.
Recommended: ∅.

Now that we have introduced our model based on proof trees and shown that
it is equivalent to that based on string diagrams in the sense of Lemma 5.3.4, wewant to show that this tree model is related to Tsukada and Ong’s in a similar
sense. Namely, we want to construct a full embedding from PA,B to T(A ⊢ B)
and then show that it restricts to an equivalence F V ∶ VA,B → B(A ⊢ B). By
combining both results, we thus get a full embedding from PA,B to E(A ⊢ B)
that restricts to an equivalence on the respective categories of views. This willthen yield a further correspondence between categories of strategies.
Let us first build F (s) by induction on s. If s is empty, F (s) is simply
the empty (A ⊢ B)-tree. Otherwise, s can be written as a sum 2 of threadss = ∑i∈n ti (recall the definition of of thread from Definition 2.1.53). Now, eachthread ti is of the form m1i m2i si for moves m1i , m2i and a play si , and a slight
generalisation of a result at the start of Section 3.5 in [97] gives:
Proposition 5.3.5. For all arenas A and B, if TA,B is the full subcategory ofPA,B spanning threads, χ∶ (mm′ )/TA,B → PC,C⋅m′ , (mm′ s) ↦ s is an isomorphism, where C = A + B ⋅ m.
Each si can therefore be mapped to a (Ci ⊢ Ci ⋅ m2i )-tree recursively, where
Ci = A + B ⋅ m1i . By Proposition 5.3.3, this gives an (A, B ⋅ m1i ⊢ Ci ⋅ m2i )-treeF̃(si ), which can in turn be composed with the left and right rules to giveF (s) as below:
F̃(si )...

m = m2i
A, B ⋅ m1i ⊢A ⊢ B.

...

m(i) = m1i

This interpretation extends to a functor in the obvious way: each move ina TO-play turns into an edge in its interpretation, and a morphism of TOplays g∶ s → t is mapped to the morphism of (A ⊢ B)-trees that maps the edgethat corresponds to m to the one that corresponds to g(m). This is indeed amorphism of (A ⊢ B)-trees because morphisms of TO-plays respect views.
2 This is not a coproduct in P
A,B , but it is a coproduct in the category with the same
objects and morphisms, except that morphisms need not be injective.

182

Lemma 5.3.6. F is a full embedding.
Proof. Injectivity on objects is easy to prove, but requires to treat trees formallyas pointed presheaves and construct F carefully with this definition, so we skip
it. Faithfulness is also easy to prove: if two morphisms of TO-plays f, g∶ s → t are
different, then there must be an index i such that f (i) ≠ g(i), so the morphisms
F (f ) and F (g) map the edge that corresponds to i to different edges, so they
are different. The proof of fullness is mostly straightforward: a morphism of(A ⊢ B)-trees from F (s) to F (t) is a mapping of the edges of F (s) to thoseof F (t), which directly corresponds to a mapping of moves in s to those in t.
All that is left to show is that this mapping is a morphism of TO-plays, i.e.,that it is compatible with the pointers in s and t. This is intuitively the casebecause morphisms of (A ⊢ B)-trees map branches to branches, and branches
correspond to views in HON games. We show that it is indeed the case by
explaining how to recover pointers in s from the structure of F (s), and thenshow that morphisms of (A ⊢ B)-trees are necessarily compatible with thosepointers. We explain in details how to read pointers from F (s) below.
First, recovering the moves in s from F (s) is easy: they are all the m’s usedin any left or right rule, with the obvious multiplicities. Recovering pointers
is a bit trickier and requires to know what an occurrence of an arena in a tree
is, as well as what it means for a move to create such an occurrence, and what
it means for a move to be played on the occurrence of an arena. Lemmas 5.4.20
and 5.4.24, which are proved independently, then explain how to recover pointersfrom our structure of plays (these lemmas are expressed in the context of plays
as string diagrams, and we translate them here to fit the context of plays as
proof trees). They can be stated as follows: each move m is justified by themove that created the arena occurrence m was played on.
Definition 5.3.7. Let T be an S-tree. The set of moves occurring in T is the
disjoint union of all the moves of the rules of T , where, in (5.3), there is a single
move m occurring in the left rule, and the moves that occur in the right rule
are all the m(i)’s.
In the left rule, m plays on A and creates A ⋅ m. In the right rule, m(i)plays on A and creates A ⋅ m(i). Additionally, if
Γ, A ⋅ m(1) ⊢. . . Γ, A ⋅ m(n) ⊢Γ⊢A

is the first rule of T , then m(i) creates all the arenas in (Γ, A ⋅ m(i) ⊢).
The occurrences of an arena in an S-tree T is an arena that is either thenegative arena in the conclusion of T (if it exists) or an arena created by a rulein T .
This definition simply means that, if
T1

...
S′

Tk

is a strict sub-tree of an S-tree T , then, for all i ∈ ∣S ′ ∣, all the arenas that appear
at the ith position of any sequent in any of the Tj ’s, is thought of as equal tothe arena Γi in the sequent at the bottom of this tree. (Note that in the string183

diagrammatic play that corresponds to T , the elements that correspond to theinterpretations of two such arenas are indeed equal).
Example 5.3.8. There are four occurrences of the empty arena ∅ in the tree
of Figure 5.1, created by tl , fl , fr , and tr respectively. There are also two occurrences of the boolean arena: the first one exists (Br ) at the beginning, and thesecond one (Bl ) is created by qr (and shared by all sequents above in the tree).
In the first tree of Example 5.3.2, there are two occurrences of the A arena,
created by both m moves. This is an artefact of playing on the arena pair (A, B)
rather than on A → B, but this is more natural in our setting (for example, thenotion of interaction sequence, which is used to study composition of strategies,
is the same as that of play, but on particular positions).
In the tree in Figure 5.1, the ql move is played on the occurrence of B called
Bl , which is created by qr , so ql is justified by qr . Similarly, fr is played on
the occurrence of {t, f} called {t, f}r , which is also created by qr , so fr is also
justified by qr . We thus recover the pointer structure from the P -view tree, i.e.,
the pointer structure of the play we started from.
Bl , {t, f}r , ∅l ⊢ ∅r
Bl , {t, f}r , ∅l ⊢ ∅rtr
fr
Bl , {t, f}r , ∅l ⊢Bl , {t, f}r , ∅l ⊢tl , fl
Bl , {t, f}r ⊢ {t, f}lql
Bl , {t, f}r ⊢qr
Bl ⊢ Br
The tree above is the tree from Figure (5.1), with colours indicating which movecreated which arena occurrences. The reader can now readily check that the
pointer structure recovered when applying the method described above indeed
gives back the pointer structure of the TO-play at the top of Figure (5.1). (However, it is impossible, from the tree structure, to exactly recover the order ofmoves in the TO-play.)
Lemma 5.3.9. F restricts to a functor F V ∶ VA,B → EV (A ⊢ B).
Proof. Let us take a TO-view s = (n, f, ϕ), and show that F (s) is a branch. The
proof trees of our sequent calculus can only branch with the use of a right rule.
In that case, by the method described above to recover pointers, we get that
two Opponent moves are justified by the same Proponent move. But we know
by Lemma 2.1.24 that all Opponent moves in s are justified by the preceding
move, so there can be no two Opponent moves justified by the same Proponent
move.
Lemma 5.3.10. F V is an equivalence of categories.
Proof. Since i, iTO , and F are fully faithful, F V is also fully faithful by left
cancellation, since fully faithful functors are the right class of a factorisation
system (see Example 2.2.87). Now, to show that F V is essentially surjective on
objects, we simply need to build an antecedent through F V of any view v. The
candidate TO-view is given by taking all moves of v from the root to the top(this is unambiguous since v is non-branching) and pointers given by the method
described above. All that is left is to verify that the candidate TO-view is indeeda TO-view, which is done by verifying that it is a TO-play, that it has positive184

length, and that all Opponent moves are justified by the preceding move. The
first two points are easy, since the way we have chosen the antecedent may begeneralised to any play, and the antecedent verifies all properties of TO-plays,
except perhaps for alternation and having positive, even length, which are bothtrivial in our case because views do not branch and have positive, even depth.
The second point is obvious by construction.
Remark. The proof above gives some insight on the only fundamental difference
between our plays and TO-plays: ours only verify a weak form of alternation,
where Opponent may play several moves in a row, but Proponent may only
answer once per Opponent move.
By putting everything together, we get:
Theorem 5.3.11. The square in Figure 5.1 commutes, F is a full embedding,and F V is an equivalence of categories.

5.4

The Level of Plays: Formal Proof

We have just seen a proof that (5.1) commutes, that F is a full embedding, andF V an equivalence of categories. However, this proof is not very satisfactory.
The whole presentation is actually a bit sloppy because the treatment of proof
trees is. Indeed, if we define trees, as is usually the case in computer science,
as functions from a skeleton to some set of labels, where the skeleton is a set offinite sequences of natural numbers that is closed under prefix (if (u1 , . . . , un+1 )is in a skeleton, then so is (u1 , . . . , un )) and predecessor (if (u1 , . . . , un + 1) isin a skeleton, then so is (u1 , . . . , un )), then the functor from PA,B to T(A ⊢ B)
is not a full embedding, but only fully faithful. This does not make our final
result on categories of strategies any weaker (we still get equivalent categories
of strategies), but the link between our plays and Tsukada and Ong’s become abit weaker. As a counterexample, consider the two TO-plays on the arena pair(A, B) below, where all moves are in B, and m1 is the only initial move in B.
m1 m2 m1 m2 m3 m4 m3 m4

m1 m2 m1 m2 m3 m4 m3 m4They are both interpreted as the (A ⊢ B)-tree
A, B/m1 , B/m3 ⊢ B/m4
A, B/m1 , B/m3 ⊢ B/m4
A, B/m1 , B/m3 ⊢A, B/m1 , B/m3 ⊢A, B/m1 ⊢ B/m2
A, B/m1 ⊢ B/m2
A, B/m1 ⊢A, B/m1 ⊢A ⊢ B.
However, if (A ⊢ B)-trees are treated as pointed presheaves, then we canget the desired full embedding (in the case of the example shown above, thetrees we get are isomorphic, but not equal). The problem is that this requires
a careful definition of the functor F ∶ PA,B → T(A ⊢ B), and that it is hard to
grasp any intuition from the definitions. The problem is not that we only geta fully faithful morphism, but that, no matter which definition we choose fortrees, the formal proof is not any easier:185• treating (A ⊢ B)-trees as labelled skeletons requires a careful managementof indices, which is exactly what we do in the formal proofs, but directly
between TO-plays and plays,• while treating (A ⊢ B)-trees as pointed presheaves does not make the proof
any simpler than ignoring (A ⊢ B)-trees altogether, since plays themselves
can be seen as pointed presheaves by Theorem 5.2.15.
We thus rectify the sloppiness of the previous section by formally defining
the full embedding F ∶ PA,B → E(A ⊢ B) and proving that it satisfies all thedesired properties. We define it directly, without using T(A ⊢ B), as a formal
treatment of trees does not make the definitions any simpler.
In Section 5.4.1, we actually construct our functor F from TO-plays to plays,
which is proved in Section 5.4.2 to be fully faithful. We then show in Section 5.4.3 that F restricts to a functor F V from TO-views to views, which is anequivalence of categories.

5.4.1

Constructing the Functor
Required: 5.2.3.
Recommended: 5.3.3.

In this section, we define the functor F ∶ PA,B → E(A ⊢ B). By Theorem 5.2.15, constructing F reduces to defining a fully-faithful functor F ∶ PA,B →E′ (A ⊢ B) restricts to views, as in:
VA,B
F
V ′

iTO

PA,B
F

V

(E ) (A ⊢ B)

(5.7)

E (A ⊢ B).
′i

We first construct F on objects, which requires some preparatory notation
on arenas and preplays.
Notation 5.4.1. We define (A, B)/m = A/m when m is in A and (A, B)/m =B/m when m is in B.
We immediately notice:
′
′
Lemma
/ A m′ , then
√ 5.4.2. For all m, m in MA + MB , if m ⊢A⊸B m and ⋆ ⊢m′ ∈ (A, B)/m and (A, B)/m′ = (A, B)/m ⋅ m′ .

Proof. Trivial.
Notation 5.4.3. In any preplay s = (n, f, ϕ) and i ∈ n, let Ks (i) denote thes,ilength of ⌈s⌉i , and let ⌈s⌉i = (I1s,i , . . . , IK
) (where ⌈s⌉i is the sequence of alls (i)indices of moves in the view of s at index i, so Ijs,i are numbers). Furthermore,
let I0s,i = 0 for all i ∈ n.
By recasting the definition of views in HON games in terms of Ks (i) and
Ijs,i , we get a few useful relations. First, we can follow the Ks (−)’s through aview. Indeed, for all i ∈ n:186

s,ϕ(i)• if i is odd, then Ks (i) = 1 + Ks (ϕ(i)) and for all j < Ks (i), Ijs,i = Ij
with the convention that Ks (0) = 0;,

• if i is even, then Ks (i) = 1 + Ks (i − 1) and for all j < Ks (i), Ijs,i = Ijs,i−1 .
Furthermore, the definition of views reflects into the following relations:
s,i
• IK
= i;
s (i)
s,i
• for all odd k ∈ Ks (i), Ik−1
= ϕ(Iks,i );s,i• for all even k ∈ Ks (i), Ik−1
= Iks,i − 1.

We often omit both superscripts when clear from context. For all j ∈ Ks (i),j and Ij have the same parity. This in particular gives ϕ in terms of I, forodd (i.e., Opponent) moves. In the case of even (or Proponent) moves, by
P -visibility, when j is even, we have ϕ(j) ∈ ⌈s⌉i and so there exists a uniquel ∈ Ks (i) such that ϕ(j) = Il . By alternation, ϕ(j) is odd and so l also is. Thus,
there exists a unique Ls (j) ∈ Ks (i)/2 such that l = 2Ls (j) − 1. In summary, we
have:Lemma 5.4.4. For all i ∈ n and j ∈ ⌈s⌉i , letting k ∈ Ks (i) be such that Iks,i = j,
we have• ϕ(j) = I2Ls (j)−1 if j is even ands,i• ϕ(j) = ϕ(Iks,i ) = Ik−1
if j is odd.

Lemma 5.4.5. For all preplays s, i ∈ ∣s∣, and j ∈ ⌈s⌉i , Ks (j) ≤ Ks (i) and for
all k ∈ Ks (j), Iks,j = Iks,i .
Proof. By induction on i. If i is odd and ϕ(i) = 0, then the result is obvious. If
i is odd and ϕ(i) > 0, then either j = i, in which case the result is obvious, orj ∈ ⌈s⌉ϕ(i) , in which case Ks (j) ≤ Ks (ϕ(i)) = Ks (i) − 1 by induction hypothesis,s,ϕ(i)

and for all k ∈ Ks (j), Iks,j = Ik
= Iks,i by induction hypothesis and the factthat k < Ks (i). If i is even, the proof follows the same pattern.
Furthermore, the sequence of all I2l−1 for l ∈ Ks (i)+1(where the division is2
understood in the integer setting and thus in particular equals Ks2(i) when i iseven) is relevant in our context. It consists of all odd indices in ⌈s⌉i . Let us
provide some notation for this:Notation 5.4.6. For all maps x∶ n → X to some set X, let us denote by [x(i)]i∈nthe sequence (x(1), . . . , x(n)).
So, e.g., the above subsequence of I is denoted by [I2l−1 ]l∈ Ks (i)+1 . Using this2
notation, we may explicitly characterise the sequents associated to each stageof s. As we will see below, for each move i ∈ n, S s,i+1 will be the sequent of theplayer “created by the ith move” in F (s).
Notation 5.4.7. For any justified sequence s = (n, f, ϕ), we define (A, B)s/i =(A, B)/f (i) . We extend this by convention to (A, B)s/0 = B.
187

Definition 5.4.8. For any i ∈ n ⊎ {0}, let S s,i+1 denote the sequent defined by• (A, [(A, B)s/I s,i ]l∈ Ks (i)+1 ⊢) if i is odd and
22l−1• (A, [(A, B)s/I s,i ]l∈ Ks (i) ⊢ (A, B)s/I s,i ) if i is even.
2

2l−1

Ks (i)

In particular, when i = 0, the definition yields S s,1 = (A ⊢ B).
First, let us observe:√√
Lemma 5.4.9. For all i ∈ ∣s∣, if f (i) ∉ A, then f (i) ∈ (A, B)s/ϕ(i) and(A, B)s/i = (A, B)s/ϕ(i) ⋅ f (i).
√Proof. If ϕ(i) = 0, then f (i) ∈ B, so the formula obviously holds because(A, B)s/0 = B. Otherwise, the result is a direct application of Lemma 5.4.2,
using the fact that f (ϕ(i)) ⊢A,B f (i).
Which entails:
Corollary 5.4.10. The arenas (A, B)s/I1 , . . . , (A, B)s/IK (i) are related bys•(A, B)s/Ik = (A, B)s/Ik−1 ⋅ f (Ik ) when k is odd,

• (A, B)s/Ik = (A, B)s/I2L (I )−1 ⋅ f (Ik ) when k is even and f (Ik ) ∉s•k(A, B)s/Ik = A ⋅ f (Ik ) when k is even and f (Ik ) ∈√√A, andA,for all k ∈ Ks (i).
Proof. By Lemmas 5.4.4 and 5.4.9 for the first two points. For the third point,
we have (A, B)s/Ik = (A, B)/f (Ik ) = A/f (Ik ) = A ⋅ f (Ik ).
We now show a few useful lemmas about TO-plays and morphisms of such.
The first one simply states that morphisms of TO-preplays map views to views:
Lemma 5.4.11. If g∶ s → s′ is a morphism of TO-preplays, then for all i ∈∣s∣ ⊎ {0}:• Ks′ (g(i)) = Ks (i),s′ ,g(i)• for all j ∈ Ks (i), Ij= g(Ijs,i ).

Proof. Let us start with the first point, by induction on i. For the base case,
we have Ks′ (g(0)) = Ks′ (0) = 0 = Ks (0) by definition. Now, for the induction
step, consider i > 0. If i is odd:
Ks′ (g(i)) = 1 + Ks′ (ϕ′ (g(i)))= 1 + Ks′ (g(ϕ(i)))= 1 + Ks (ϕ(i))= Ks (i)188

because g(i) is odd
because ϕ′ g = gϕby induction hypothesis
because i is odd,

and similarly when i is even.
For the second point, we again proceed by induction on i. The base casetrivially holds because Ks (i) = 0. For the induction step, consider any i > 0. If
i is odd, then for all j < Ks (i):s′ ,g(i)Ijs′ ,ϕ′ (g(i))= Ijbecause g(i) is odd and j < Ks (i) = Ks′ (g(i))

s′ ,g(ϕ(i))= Ijs,ϕ(i))= g(Ij= g(Ijs,i )

because ϕ′ g = gϕby induction hypothesis
because i is odd and j < Ks (i),and similarly if i is even. Finally, when j = Ks (i), we have:s′ ,g(i)s′ ,g(i)IKs (i) = IK ′ (g(i))
s= g(i)s,i= g(IK)s (i)by the first point

as desired.
Lemma 5.4.12. If g∶ s → s′ is a morphism of TO-preplays, then for all i ∈′{0} ⊎ ∣s∣, (A, B)s/g(i) = (A, B)s/i .
Proof. We have (A, B)s/g(i) = (A, B)/f ′ (g(i)) = (A, B)/f (i) = (A, B)s/i .
′Lemma 5.4.13. If g∶ s → s′ is a morphism of TO-preplays, then for all i ∈′{0} ⊎ ∣s∣, S s,i+1 = S s ,g(i)+1 .
Proof. When i is odd, then g(i) is also odd, so
S s ,g(i)+1 = (A, [(A, B)s s′ ,g(i) ]′′/I2l−1l∈Ks′ (g(i))+1
2⊢).

By Lemma 5.4.11, we know that Ks′ (g(i)) = Ks (i) and that for all l ∈Ks′ (g(i))+1,2′s ,g(i)s,iI2l−1 = g(I2l−1), which directly implies the result by Lemma 5.4.12. The proof
is similar when i is even.

Lemma 5.4.14. If g∶ s → s′ is a morphism of TO-preplays, then for any eveni ∈ ∣s∣, we have Ls′ (g(i)) = Ls (i).
Proof. Since ϕ′ (g(i)) = g(ϕ(i)), we know thats′ ,g(i)s′ ,g(i)s,iI2L ′ (g(i))−1 = ϕ′ (g(i)) = g(ϕ(i)) = g(I2L) = I2Ls (i)−1s (i)−1ss′ ,g(i)by Lemma 5.4.11, which entails the desired result, since k ↦ Ik

is monic.

Returning to the construction of F on objects, in fact, we construct it on
all preplays in PPA,B , by induction on their length, and eventually restrict toplays. In order for our induction step to make sense, we should make explicit a
few invariants that our assignment will satisfy.
Notation 5.4.15. In the following, we will denote x ⋅ f by x ⊙ f when x is aplayer, and use x ⋅ f only when x is a move. (This is useful because all channels,
players, and moves will be natural numbers, so this notation should spare thereader a few headaches.)189

t

For any preplay s = (n, f, ϕ), the associated morphism F (s) = ((A ⊢ B) Ð→
U ) in E′ (A ⊢ B) will satisfy:(P1) The sets U (A) for all arenas A are pairwise disjoint, and ⊎A∈A U (A) = n+2;
this induces a map a∶ n + 2 → A, where A denotes the set of all sub-arenasof A or B, such that for all i ∈ n + 2, i ∈ U (a(i));(P2) The sets U (S) for all sequents S are pairwise disjoint, and ⊎S∈S U (S) =n+1; this induces a map s∶ n+1 → S, where S denotes the set of all sequentsof sub-arenas of A or B, such that for all i ∈ n + 1, i ∈ U (s(i));(P3) The sets U (µ) for all moves µ ∈ ob(L∣2 ) are pairwise disjoint, and we have⊎µ∈L∣2 U (µ) = n; this induces a map m∶ n → ob(L∣2 ) such that for all i ∈ n,i ∈ U (m(i));(P4) for all i ∈ n, i ⋅ s = i + 1 (move i creates player i + 1);(P5) the player n + 1 is final in U ;(P6) for all i ∈ n + 1, s(i) = S s,i .
When n = 0, the preplay s is mapped by definition to a morphism that is
isomorphic to the identity on (A ⊢ B) and that verifies the conditions above.
There are two such morphisms, and we (arbitrarily) choose (A ⊢ B) −∼ U suchthat
U (A ⊢ B) = {1},1 ⊙ s1 = 1,
1 ⊙ t = 2.
(5.8)
t′

→
For the induction step, consider any s = (n+1, f, ϕ) and assume that (A ⊢ B) Ð
U ′ satisfies (P1)–(P6) for the immediate prefix s′ of s.
t

We define F (s) = ((A ⊢ B) Ð→ U ) by a specific choice of composite U ′ ● M ,s0′for some move M ∶ ↑U
↑U , itself constructed by choosing some seed Y0 Ð→
t0µ ←Ð X0 with representable X0 and final player x ∈ U ′ (X0 ), and taking the
pushout
X0

t0

µ

⌜x⌝

↑U ′

M,

which ensures that F (s) is in E′ (A ⊢ B). The map t0 being injective, so is
the induced map U ′ → U . We choose to make it an inclusion, which makes
it entirely determined by the choice of “created” elements, i.e., of images of
elements in µ ∖ X0 . Because µ ∈ ob(L∣2 ), we know that in all cases there isexactly one created channel, one created player, and one new move. Since thechannels, players and moves of U ′ respectively are the elements of n+2, n+1 andn, we will systematically pick the created elements to be respectively n + 3, n + 2
and n + 1. Thus, we only need to choose x final in U ′ and µ and show that (P6)
is preserved. Let us proceed by case analysis:√• If n + 1 is odd and ϕ(n + 1) = 0, then f (n + 1) ∈ B so we may pickµ = Λ(A⊢B),f (n+1) , which leaves us with the task of picking some player inU ′ (A ⊢ B). But by (P6), 1 ∈ U ′ (S s,1 ) = U ′ (A ⊢ B): we simply pick 1. To
190

show that (P6) is preserved, we compute S s,n+2 to check that it is equal to(A, B⋅f (n+1) ⊢), which comes from the facts that Ks (n+1) = 1+Ks (ϕ(n+1)) = 1+0 = 1 and (A, B)s/I s,n+1 = (A, B)s/I s,n+1 = (A, B)s/n+1 = B ⋅f (n+1).
1

Ks (n+1)• If n + 1 is odd and ϕ(n + 1) ≠ 0, then let i = ϕ(n + 1). Thus,√we havef (i) ⊢A⊸B f (n + 1), so by Lemma 5.4.2 we have f (n + 1) ∈ (A, B)s/i(because n + 1 is odd, so f (n + 1) is not initial in A). Furthermore, by (P4)′
and (P6), (i ⋅ s) = (i + 1) is in U (S s ,i+1 ), which, because i is even byalternation, is equally
U (A, [(A, B)s s′ ,i ]′s ,iBut IK= i, so (A, B)s s′ ,i
′ (i)
/IK

Ks′ (i)2/IK

s′ (i)= (A, B)s/i = (A, B)s/i : we pick x = (i + 1)′s

⊢ (A, B)s s′ ,i ).
′′/I2l−1 l∈′s′ (i)and µ = ΛS s′ ,i+1 ,f (n+1) . We thus have that n + 2 is a player over(A, [(A, B)s s′ ,i ], (A, B)s s′ ,i⋅ f (n + 1) ⊢),′′/I2l−1 l∈

Ks′ (i)2/IK

s′ (i)

which is S s,n+2 as desired, because Ks′ (i) = Ks (i) = Ks (n + 1) − 1 (for the′number of arenas), (A, B)s s′ ,i = (A, B)/I s,i = (A, B)/I s,n+1 (to show that
/I2l−12l−1

2l−1

the bracketed arenas are equal to those of S s,n+2 ), and (A, B)s s′ ,i′/IK1) = (A, B)/I s,i

Ks (i)⋅f (n+1) = (A, B)/I s,n+1⋅f (n+s′ (i)Ks (n+1)−1s,n+1⋅f (IK) = (A, B)/I s,n+1
s (n+1)Ks (n+1)

by Corollary 5.4.10 (to show that the last arena is equal to that of S s,n+2 ).
• If n + 1 is even, then we pick x = (n ⋅ s) = n + 1 (by (P4)). Moreover, n + 1′
is in U (S s ,n+1 ) by (P6), which, because n is odd, is equally
U (A, [(A, B)s s′ ,n ]′/I2l−1 l∈

Ks′ (n)+1
2⊢).

√
If now f (n + 1) ∈ A, then we pick µ = @S s′ ,n+1 ,1,f (n+1) . Otherwise, taking
k = n + 1 in Corollary 5.4.10 yields(A, B)s/n+1 = (A, B)s/I s,n⋅ f (n + 1) = (A, B)s/I s,n′

2Ls (n+1)−1

2Ls (n+1)−1⋅ f (n + 1).

s,nBut since n + 1 is even and 2Ls (n + 1) − 1 < Ks (n + 1), I2L=
s (n+1)−1
√
′
s′ ,n
s
I2Ls (n+1)−1 , so in particular f (n + 1) ∈ (A, B) s′ ,nand, in view of/I2L (n+1)−1s

the form of S
, we may pick µ = @S s′ ,n+1 ,1+Ls (n+1),f (n+1) . The facts,n+2that n+2 is in U (S) follows by a computation similar to the one donein the previous case.
s′ ,n+1

The chosen player is final in U ′ by definition when n + 1 is odd, and by (P5)otherwise.
We now want to show that F as defined here extends to a functor. We willdefine the image of a morphism of TO-plays below, but we first need a few
preparatory lemmas.
We first state and prove a few lemmas about the presheaf U obtained byapplying the construction above.
191

Lemma 5.4.16. For all preplays s, if F (s) = ((A ⊢ B) → U ), then for all i ∈ ∣s∣:• i ∈ U (ΛS s,ϕ(i)+1 ,f (i) ) if i is odd,
• i ∈ U (@S s,i ,1,f (i) ) if i is even and f (i) ∈√A,• i ∈ U (@S s,i ,1+Ls (i),f (i) ) if i is even and f (i) ∉√A.

Proof. By induction on s:• if s is empty, then the result is obvious,• otherwise, there are two possible cases. Either i < ∣s∣, in which case, if
we denote by s′ the immediate prefix of s, and F (s′ ) = ((A ⊢ B) → U ′ ),we know by induction hypothesis that i belongs to U ′ (µ) ⊆ U (µ) for the′desired µ (because S s,i = S s ,i and Ls (i) = Ls′ (i)). Or i = ∣s∣, in whichcase the result holds by construction.
We can now state and prove the lemma we are interested in:Lemma 5.4.17. If g∶ s → s′ is a morphism of TO-plays, F (s) = ((A ⊢ B) → U ),and F (s′ ) = ((A ⊢ B) → U ′ ), then:• for all µ ∈ L∣2 , if i ∈ U (µ), then g(i) ∈ U ′ (µ),• for all S ∈ L∣1 , if i + 1 ∈ U (S), then g(i) + 1 ∈ U ′ (S),• for all C ∈ L∣0 , if i + 2 ∈ U (C), then g(i) + 2 ∈ U ′ (C).
Proof. For the first point, let us assume that i is odd. We know that if i is in
U (µ), then by Lemma 5.4.16 we have µ = ΛS s,ϕ(i)+1 ,f (i) . But then S s,ϕ(i)+1 =′′′S s ,g(ϕ(i))+1 = S s ,ϕ (g(i))+1 by Lemma 5.4.13 and the fact that gϕ = ϕ′ g, soµ = ΛS s′ ,ϕ′ (g(i))+1 ,f ′ (g(i)) (since f ′ (g(i)) = f (i)), so by Lemma 5.4.16 we haveg(i) ∈ U ′ (µ). The proof is similar in the other cases (note√ that, in particular,
the proof uses Lemma 5.4.14 when i is even and f (i) ∉ A).
The proofs of the other two points follow a similar pattern (alternatively,
one may notice that, for all k in ∣s∣, s(k + 1) and a(k + 2) are determined bym(k) by construction).
We will use the following notation to define F (g):Definition 5.4.18. If f is a function from n to m, we define f˜∶ n + 1 → m + 1
by f˜(1) = 1 and f˜(i + 1) = f (i) + 1 for all i ∈ n.
The following lemma will be useful later:
Lemma 5.4.19. If g∶ (n, f, ϕ) → (n′ , f ′ , ϕ′ ) is a morphism of TO-plays, theng̃(2i) = g(2i).
Proof. We have g̃(2i) = g̃(2i−1+1) = g(2i−1)+1 = g(2i) because g is a morphismof TO-plays.
Now, if g∶ s → s′ is a morphism of TO-plays, F (s) = ((A ⊢ B) → U ), andF (s′ ) = (X → U ′ ), we define k = F (g)∶ U → U ′ as:192• kµ (x) = g(x) for all µ ∈ L∣2 and x ∈ U (µ),• kS (x) = g̃(x) for all S ∈ L∣1 and x ∈ U (S),˜• kA (x) = g̃(x)for all A ∈ L∣0 and x ∈ U (A).
This is indeed well-defined by Lemma 5.4.17 and (5.8). We need to prove twoother lemmas in order to show that k is natural.
Lemma 5.4.20. For all preplays s and i ∈ ∣s∣, if F (s) = ((A ⊢ B) → U ), then:• i ⋅ t = i if i is even,• i ⋅ t = ϕ(i) + 1 if i is odd.
Proof. By induction on s and case distinction on i, where the only interestingcase is when i = ∣s∣, in which case both points hold by construction.
By (P4), the player created by each move i is i+1. The next lemma describes
how its associated sequent, S s,i+1 (Definition 5.4.8), connects to its environment.
Intuitively, this is quite simple: all non-new connections are as in S s,i ; and the
new formula connects to the created channel, i + 2. The technical statement is
obfuscated by index handling, so let us explain this a bit. By construction, if i
is odd, S s,i+1 is positive and has 1 + Ks (i)+1
hypotheses. If i is even, S s,i+1 is
2
negative and has 1 + Ks2(i) hypotheses. In both cases, the first hypothesis is A,
and the others have been created by previous moves. In fact, when i is even,so is Ks (i), so 1 + Ks2(i) = 1 + Ks (i)+1. So for all i ∈ n, S s,i+1 has 1 + Ks (i)+122hypotheses.
Lemma 5.4.21. For all preplays s, i ∈ ∣s∣, if F (s) = ((A ⊢ B) → U ), then,recalling Definition 5.4.8 and the fact that i ⋅ s = i + 1, we have:• if i is odd:
– (i + 1) ⊙ sj = (ϕ(i) + 1) ⊙ sj for all j ∈ Ks (i)+1and
2– (i + 1) ⊙ s Ks (i)+1 +1 = i + 2;
2

• if i is even:– (i + 1) ⊙ sj = i ⊙ sj for all j ∈ Ks2(i) + 1,
– (i + 1) ⊙ t = i + 2.
Proof. By induction on s and case distinction on i, where the only interestingcase is when i = ∣s∣, in which case all points hold by construction.
We can now prove that k defined above is a natural transformation, whichamounts to showing that all diagrams of the form
U (µ)

kµ

U ′ (µ)U ′ (α)

U (α)

U (S)

or

193

kS

U ′ (S)U ′ (β)

U (β)

U (C)

U (S)
′

kS

U (S)

U (C)
′

kC

(5.9)

commute, for all α∶ S → µ and β∶ C → S. The left-hand side diagram can now
be shown to commute using Lemma 5.4.20, and the right-hand side one using
Lemma 5.4.21 within an induction. For example, the following computationshows that the right-hand side diagram commutes for i > 1 odd and β = sj for+ 1 (i = 1 can easily be verified by hand):j < Ks (i)+12
˜ ⊙ sj ) = g̃((ϕ(i˜g̃(i− 1) + 1) ⊙ sj )= g̃(ϕ(i − 1) + 1) ⊙ sj

by Lemma 5.4.21
by induction hypothesis= (g(ϕ(i − 1)) + 1) ⊙ sj
= (ϕ′ (g(i − 1)) + 1) ⊙ sj

because gϕ = ϕ′ g

= (g(i − 1) + 1) ⊙ sj

by Lemma 5.4.21= g̃(i) ⊙ sj .
The other points either follow a similar pattern or can be proved directly byLemma 5.4.20 or 5.4.21.
When restricted to (A ⊢ B), k turns into id (A⊢B) , as desired. Finally, k is
1D-injective by injectivity of g, which ends the definition of F on morphisms.
It remains to prove functoriality of F , which follows directly from functoriality of −̃.

5.4.2

Full Faithfulness
Required: 5.4.1.
Recommended: ∅.

This section is devoted to proving:
Theorem 5.4.22. The functor F ∶ PA,B → E′ (A ⊢ B) is a full embedding.
We start by giving two lemmas that express ϕ in function of F (s), making
injectivity on objects of F obvious. Remember that, for all i in n, S s,i has
Ks (i)+1+ 1 hypotheses.
2+ 1:
Lemma 5.4.23. For all preplays s, i ∈ ∣s∣, and j ∈ ⌈s⌉i , and k ∈ Ks (j)+1
2(j + 1) ⊙ sk = (i + 1) ⊙ sk .
Proof. By induction on i − j and Lemma 5.4.21.
The next lemma expresses the justifier ϕ(i) of i in terms of F (s), using
the fact that moves and created channels are in bijection, each move i creating
channel i+2. The idea here is that if some positive move i is played on a sequent(A1 , . . . , AN ⊢), say on Ak , then ϕ(i) should be the move that has created Ak .
But, i being positive, the involved player is just i itself, and the corresponding
channel is i⊙sk , which has been created by move i⊙sk −2. There is one exception
though: when k = 1, the move is played on A, so by definition of A ⊸ B, itsjustifier is the first move played on B in the corresponding view. But this isprecisely the move having created i ⊙ s2 , i.e., i ⊙ s2 − 2.
Lemma 5.4.24. For all preplays s, if F (s) = ((A ⊢ B) → U ) and i ∈ U (@S,k,m ),
then:
194

• ϕ(i) = i ⊙ sk − 2 if k > 1,
• ϕ(i) = i ⊙ s2 − 2 if k = 1.
Proof. Let us assume k > 1 (the other case is similar). By Lemma 5.4.16,s,ik = 1 + Ls (i). Now, on the one hand ϕ(i) = I2L, and on the other hands (i)−1s,ϕ(i)s,i
ϕ(i) = IKs (ϕ(i)) = IK
, so 2Ls (i) − 1 = Ks (ϕ(i)), since k ↦ Iks,i is monic.
s (ϕ(i))+1, so since ϕ(i) ∈ ⌈s⌉i−1 , Lemma 5.4.23 entails
Therefore, we have k = Ks (ϕ(i))+1
2that (ϕ(i) + 1) ⊙ sk = i ⊙ sk . But, by Lemma 5.4.21, since k = Ks (ϕ(i))+1+ 1, we2
also have that (ϕ(i) + 1) ⊙ sk = ϕ(i) + 2. We thus derive ϕ(i) + 2 = i ⊙ sk , hence
the result.
Now, faithfulness is easy: if g and g ′ are two morphisms s → s′ , then, lettingk = F (g) and k ′ = F (g ′ ), we know by (P3) that the U (µ)’s form a partitionof n, and by definition of k and k ′ that kµ (x) = g(x) and kµ′ (x) = g ′ (x) for allx ∈ F (s)(µ) and µ ∈ L∣2 . Therefore, if kµ = kµ′ for all µ ∈ L∣2 , then g = g ′ .
Proving fullness is a bit more involved. Let us start with a lemma assertingthat any natural transformation k∶ F (s) → F (s′ ) is layered just as any F (g). In
order to formalise this, let us state:
Definition 5.4.25. For any TO-play s and i ∈ {0, 1, 2}, we define F (s)∣i =⊎c∈L∣i F (s)(c).
For any k∶ F (s) → F (s′ ) in E′ (A ⊢ B) and i ∈ {0, 1, 2}, letk∣i ∶ F (s)∣i → F (s′ )∣idenote the restrictions of k to each given domain and codomain.
When U = F (s) for some s = (n, f, ϕ), we know by construction that F (s)∣2 =n, F (s)∣1 = n + 1, and F (s)∣0 = n + 2. This allows us to state:
Lemma 5.4.26. For any k∶ F (s) → F (s′ ) in E′ (A ⊢ B),k∣1 = k̃∣2and̃
k∣0 = k̃∣2 .
⋀Proof. Because E′ (A ⊢ B) is a subcategory of the coslice (A ⊢ B)/L, we knowthat k∣1 (1) = 1, k∣0 (1) = 1, and k∣0 (2) = 2. It thus remains to prove thatk∣1 (i + 1) = k∣2 (i) + 1 and k∣0 (i + 2) = k∣1 (i + 1) + 1, for all i ∈ n.
We havek∣1 (i + 1) = k∣1 (i ⋅ s)
= k∣2 (i) ⋅ s (by naturality of k)= k∣2 (i) + 1
for the first point. We treat the second point by case analysis on the parity ofi, using naturality and Lemma 5.4.21:
k∣0 (2i + 1) = k∣0 ((2i) ⊙ sN )= k∣1 (2i) ⊙ sN
= k∣1 (2i) + 1

andwhere in the odd case N = Ks (2i−1)+1
+ 1.
2
195

k∣0 (2i + 2) = k∣0 ((2i + 1) ⊙ t)
= k∣1 (2i + 1) ⊙ t= k∣1 (2i + 1) + 1

We are finally able to prove that F is full. Consider any s = (n, f, ϕ) ands′ = (n′ , f ′ , ϕ′ ), with F (s) = ((A ⊢ B) → U ) and F (s′ ) = ((A ⊢ B) → U ′ ),together with a morphism k∶ U → U ′ in E′ (A ⊢ B). We know by (P3) that
the U (µ)’s form a partition of n for µ in L∣2 . We can therefore define the mapg∶ n → n′ by g = k∣2 . Our goal is to show that g is a morphism s → s′ of TO-plays
and that F (g) = k. But given the first point, the latter follows from g = k∣2 bydefinition of F and Lemma 5.4.26.
So let us show that g is a morphism of TO-plays.
• To show that f ′ (g(i)) = f (i), we notice that g(i) belongs to U ′ (m′ (g(i))),but also to U ′ (m(i)), because g(i) = k∣2 (i) = km(i) (i)∶ U (m(i)) → U ′ (m(i)).
Since all U ′ (µ) are disjoint, for µ in L∣2 , we have that m(i) = m′ (g(i)).
Now, by construction, m(i) is either ΛS,f (i) or @S,k,f (i) , and m′ (g(i))
either ΛS,f ′ (g(i)) or @S,k,f ′ (g(i)) , hence the result.
• Furthermore, g is injective by 1D-injectivity of k.
• We also know that k is natural, so we get commuting diagrams as in (5.9)
for all α∶ S → µ and β∶ C → S. By taking α = s, we get that g(2i − 1) =g(2i) − 1 and g(ϕ(2i − 1)) = ϕ′ (g(2i − 1)) for all i ∈ n/2. The last point weneed to show is that g(ϕ(2i)) = ϕ′ (g(2i)) for all i ∈ n/2. Let us consider
the case where m(2i) = @S,k,m and k > 1 (the proof is similar for k = 1).
By alternation, ϕ(2i) is odd, so ϕ(2i) ≥ 1, hence (2i) ⊙ sk = ϕ(2i) + 2 ≥ 3,
˜
by Lemma 5.4.24, since k > 1. Thus, by definition, g̃((2i)⊙ sk ) = g((2i) ⊙˜
sk − 2) + 2. This entails that g(ϕ(2i)) = g((2i) ⊙ sk − 2) = g̃((2i)⊙ sk ) − 2 =̃̃k∣2 ((2i) ⊙ sk ) − 2 = k∣0 ((2i) ⊙ sk ) − 2 = k∣1 (2i) ⊙ sk − 2 = g̃(2i) ⊙ sk − 2 =g(2i) ⊙ sk − 2 = ϕ′ (g(2i)), by Lemmas 5.4.24, 5.4.26, and 5.4.19.
This proves that g is indeed a morphism of TO-plays, hence ends the proof of
Theorem 5.4.22.

5.4.3

Restriction to Views
Required: 5.4.2.
Recommended: ∅.

At last, we show how our functor F ∶ PA,B → E′ (A ⊢ B) restricts to an
equivalence on views, which achieves the construction of our candidate exact
square (5.7).
We start with:
Lemma 5.4.27. If Y → U ← (A ⊢ B) is a play, then ≺∗u (Definition 5.2.8) isan order.
Proof. It suffices to show that ≺∗ is antisymmetric, which we do by induction
on U . If U ≅ id A⊢B , then the result is direct. Otherwise, it is the composite ofa move Y → M ← Y ′ and a play Y ′ → U ′ ← (A ⊢ B), and ≺∗U ′ is an order by
induction hypothesis. Now, it suffices to notice that ≺∗U is an extension of ≺∗U ′ ,and that adding the move M can only add pairs x ≺ y in which y is an elementthat is not in U ′ , which cannot break antisymmetry of ≺∗U .
This allows us to show:196

Lemma 5.4.28. The functor F restricts to a functor F V ∶ VA,B → (EV )′ (A ⊢B).
Proof. Let s = (n, f, ϕ) be any view. By Lemma 5.4.27, ≺∗ is an order. But for
all i ∈ n − 1, using Lemma 5.4.20:• if i is odd: (i + 1) ⋅ t = i + 1 = i ⋅ s,
• if i is even: (i + 1) ⋅ t = ϕ(i + 1) + 1, but because s is a view and i + 1 is odd,
ϕ(i + 1) = i, hence (i + 1) ⋅ t = i + 1 = i ⋅ s.
In both cases, we have i ≺ i + 1, hence ≺∗ is a total order.
By left cancellation, F V is fully faithful (see the beginning of the proof of
Lemma 5.3.10). If we prove that it is also essentially surjective, we will obtain:
Theorem 5.4.29. The restriction F V ∶ VA,B → (EV )′ (A ⊢ B) is an equivalence.
Let us start by showing that any preview (A ⊢ B) → V in (EV )′ (A ⊢ B) is
isomorphic to some canonical preview, in the following sense.
Definition 5.4.30. A preview (A ⊢ B) → V of length n is canonical if andonly if(i) it satisfies points (P1)–(P3),(ii) the element of V (A ⊢ B) corresponding to (A ⊢ B) → V via Yoneda is 1,
with 1 ⊙ s1 = 1 and 1 ⊙ t = 2,(iii) for all i ∈ n, i ⋅ t = i, i ⋅ s = i + 1, and i ⋅ ν = i + 2,
where i ⋅ ν denotes the channel created by move i, i.e.,• if i ∈ V (@S,k,m ), then i ⋅ ν = i ⋅ s ⊙ t,
• if i ∈ V (ΛS,m ), then i ⋅ ν = i ⋅ s ⊙ s∣S∣+1 , where ∣(Γ ⊢ A)∣ = ∣Γ∣.
In words, a preview is canonical when the ith move is represented by i andplayed by i, and its created player and channel are respectively i + 1 and i + 2.
Of course, we have:
Lemma 5.4.31. For all TO-views s, F (s) is canonical.
Proof. By induction on s.
Lemma 5.4.32. Any preview is isomorphic to a unique canonical preview.
Proof. By induction on the given preview:• if the preview is isomorphic to id ●(A⊢B) , then the result is obvious,• otherwise, it is the composite of a play Y → V ← X and a move Z →M ← X. By induction hypothesis and Lemma 5.2.10, Y → V ← (A ⊢ B)
is isomorphic to a canonical preview Yc → Vc ← (A ⊢ B). To show theresult, it suffices to show that M is played by the player y in Y that is
mapped to n+1 in Vc . But, since ≺Vc ●M and ≺V ●M have the same structure,
if M were played by another player than y, ≺∗Vc ●M would not be a totalorder, which would contradict the fact that we started from a view.
197Lemma 5.4.33. In any canonical preview V , for any sequent S and playeri ∈ V (S), we have ∣S∣ = i/2+1 and furthermore for all 0 ≤ k < ∣S∣, i⊙sk+1 = 2k+1.
Proof. By induction on V .
Proof of Theorem 5.4.29. Lemma 5.4.32 allows us to restrict attention to theclaim that canonical previews have antecedents in TO-previews (which, remember, are TO-preplays s = (n, f, ϕ) such that ⌈s⌉n = s). We again proceed byinduction on the given canonical preview V . If V is the identity preview, thenan antecedent is given by the empty TO-preview. Now, assume V ′ is any canonical preview of length n and V = V ′ ●M is a canonical preview. By induction
hypothesis, we get s′ = (n, f ′ , ϕ′ ) such that F (s′ ) = V ′ .
We will define our candidate antecedent s for V by case analysis on M . In
both cases, we will first need to show that s is indeed a TO-preview, and thenthat F (s) = V . By construction, F (s) will be determined by picking a player inV ′ (i.e., a valid index in n + 1) and a valid move object in L. By canonicity ofV , it will thus be enough to show that these correspond to those of V .
There are two cases, depending on M :√• if (n + 1) ∈ V (ΛS,m ) with S = (A1 , . . . , AN ⊢ C) and m ∈ C, then we
define s = (n + 1, f, ϕ) as the extension of s′ by– f (n + 1) = m,
– ϕ(n + 1) = n.
Let us first show that s is a TO-preview. Alternation and P -visibility aretrivial, so we only need to verify that s is a justified sequence and that⌈s⌉n+1 = s:
– ϕ(n + 1) < n + 1: holds trivially;√– if ϕ(n + 1) = 0, then f (n + 1) ∈ B: if ϕ(n + 1) = 0, then by definition√n = 0, so S = (A ⊢ B), hence C = B and f (n + 1) = m ∈ B, as
desired;– if ϕ(n + 1) ≠ 0, then f (ϕ(n + 1)) is the parent of f (n + 1) in A ⊸ B:
indeed, in that case, n ∈ V (@(A1 ,...,AN ⊢),k,m′ ) by Lemma 5.4.16, for√some k ∈ N and m′ ∈ Ak , and C = Ak ⋅ m′ , so m′ ⊢A⊸B m;– finally, ⌈s⌉n+1 = s: if ϕ(n + 1) = 0, then ⌈s⌉n+1 = (n + 1) and n = 0, andotherwise ⌈s⌉n+1 = ⌈s′ ⌉ϕ(n+1) ⋅ (n + 1) = ⌈s′ ⌉n ⋅ (n + 1) = s′ ⋅ (n + 1), as
desired.
By construction, the image of s under F is obtained by adding a new move,n + 1, to F (s′ ) (i.e., to V ′ by induction hypothesis), with (n + 1) ⋅ t = n + 1,of the form ΛS s′ ,n+1 ,m . This agrees with V , so F (s) = V , as desired.
√• if (n + 1) ∈ V (@S,k,m ), with S = (A1 , . . . , AN ⊢) and m ∈ Ak , then we
define s = (n + 1, f, ϕ) as the extension of s′ by– f (n + 1) = m,
– ϕ(n + 1) = (n + 1) ⊙ sk − 2 if k > 1,
– ϕ(n + 1) = (n + 1) ⊙ s2 − 2 if k = 1.
198

Let us first show that s is a TO-preview. Alternation is again trivial, andso is P -visibility (because s′ is a preview), so we only need to verify thats is a justified sequence such that ⌈s⌉n+1 = s:
– ϕ(n + 1) < n + 1: if k = 1, then by Lemma 5.4.33 we have ϕ(n + 1) =(n+1)⊙s2 −2 = 2+1−2 = 1 < n+1 because n+1 is even; otherwise, byLemma 5.4.33 again we have ϕ(n+1) = (n+1)⊙sk −2 = 2(k−1)+1−2 =2k−3 and N = (n+1)/2+1, with k ≤ N , so ϕ(n+1) ≤ 2((n+1)/2+1)−3 =n < n + 1;√
– if ϕ(n + 1) = 0, then f (n + 1) ∈ B: we in fact have ϕ(n + 1) ≠ 0,
because ϕ(n + 1) is always odd by Lemma 5.4.33;– if ϕ(n + 1) ≠ 0, then f (ϕ(n + 1)) is the parent of f (n + 1) in A ⊸ B:
indeed, in that case, we have, by Lemma 5.4.16 and the fact thatϕ(n + 1) is odd, that ϕ(n + 1) ∈ V (Λ(A1 ,...,Ak−1 ⊢C),m′ ) for some m′ ∈√C, with Ak = C √⋅ m′ ; but then f (ϕ(n + 1)) = m′ is indeed the parentof f (n + 1) = m ∈ Ak ;– finally, ⌈s⌉n+1 = ⌈s′ ⌉n ⋅ (n + 1) = s′ ⋅ (n + 1), as desired.
By construction, the image of s under F is obtained by adding a new move,n + 1, to F (s′ ) (i.e., to V ′ by induction hypothesis), with (n + 1) ⋅ t = n + 1,of the form @S s′ ,n+1 ,k′ ,m for some valid k ′ . The equation agrees with V ,so by canonicity it is enough to show k = k ′ .
Again, there are two cases:√– if f (n + 1) ∈ A, then k ′ = 1 but also k = 1;
– otherwise k ′ = 1 + Ls (n + 1) by definition of F . Since s is a preview,
Il = l for all l in n + 1, and so ϕ(n + 1) = I2Ls (n+1)−1 = 2Ls (n + 1) − 1 =2k ′ − 3. But, as we saw above, ϕ(n + 1) = 2k − 3, so k = k ′ , as desired.
This concludes the proof that F (s) = V .

5.5

The Level of Strategies
Required: 5.4.3, 2.2.6.
Recommended: 2.2.7.

In this chapter’s final section we exploit the link we have exhibited between
the different categories of plays and views to link the categories of strategies inboth approaches. An interesting point is that it is very simple to prove this linkusing the theory of exact squares.
In the previous section, we have built a commuting square which we reproduce here for convenience:
VA,B

iTO

F

FV
V

E (A ⊢ B)

PA,Bi

E(A ⊢ B),

where F is a full embedding and F V is an equivalence by Theorem 5.3.11.
199

Lemma 5.5.1. The square above is exact.
Proof. By Lemma 2.2.69.
From which we deduce:
Corollary 5.5.2. For all arenas A and B, the square
⋀

∏iTO

VA,B

⋀

PA,B

∆F V

∆F

⋀

EV (A ⊢ B)⋀∏i

E(A ⊢ B)

commutes up to isomorphism.
Restriction along F V induces an equivalence between behaviours over (A ⊢B) and TO-behaviours over (A, B).
Restriction along F induces a functor from strategies over (A ⊢ B) to TOstrategies over (A, B), which restricts to an equivalence on innocent strategies.
The moral of this result is that our views and plays faithfully represent Tsukada and Ong’s. Indeed, both notions of behaviour essentially coincide andmoreover, although our categories of plays are slightly richer, our innocent
strategies restrict to theirs and furthermore their process of extending behaviours to innocent strategies coincides with ours up to this restriction.
This also implies that these equivalences are compatible with innocentisation, which takes a possibly non-innocent strategy and canonically turns it into
an innocent strategy. This is done by sheafification, which, in our case, is thefunctor ∏i ○∆i . Indeed, consider the diagram:E(A ⊢ B)

∆

∆

PA,B

∆

EV (A ⊢ B)∏

E(A ⊢ B)

∆

∆

VA,B

PA,B .

∏

Remember that, when drawing diagrams using ∏’s, ∑’s, and ∆’s, we only draw
the underlying diagram (which in particular means that ∆ arrows point in the“wrong” direction). If we take the top path in the diagram above, we first innocentise the strategy (inside the string diagrammatic setting) and then take theequivalent TO-strategy. If we take the bottom path, we first take the equivalent
TO-strategy, and then innocentise it (inside Tsukada and Ong’s setting). But
the left-hand square commutes because the underlying diagram (without the∆’s) does, and the right-hand side one commutes by exactness.

5.6

Perspectives

One may notice that a crucial point is left untreated here: Tsukada and Ong cancompose strategies, while it is not clear how to do this directly in our setting.
Two steps are required to compose strategies, parallel composition and hiding:the first executes two strategies in parallel, and the second one hides the middle
200

arena. While parallel composition is easy to manipulate in our setting because
our game is intrinsically multi-party, hiding could admittedly be more difficult
to handle.
Another point, which we already mentioned at the end of Chapter 4 is that
we do not use quite the same definition of views in this setting as in our othermodels. As we explained when we defined views, we cannot define views as inour other models and use our proof of fibredness. If we used the same technique
as in our previous models, we would break persistence, which we proved to benecessary for fibredness (Theorem 4.4.30) to hold (see the remark after the proof
of Lemma 4.4.32). We thus cannot hope to have the same definition of view for
our model of HON games as in our model of the π-calculus using this notionof signature. This point makes us think that maybe the notion of signature weused is a bit too restrictive. It is not yet clear to us how to solve this problem.
Another problem with this setting is that interaction sequences are not faithfully modelled by plays on the pushout
B(A ⊢ B)ts1(B ⊢ C)inlinr(A ⊢ B ⊢ C).

Indeed, using the same techniques as in this chapter, it is not hard to show that
there is a full embedding IA,B,C → E(A ⊢ B ⊢ C), where IA,B,C is the category ofinteraction sequences in Tsukada and Ong’s model. However, there are objectsin E(A ⊢ B ⊢ C) that do not make much sense from a computational point ofview, as we try to explain now. Let us call x0 the initial (A ⊢ B) player and y0
the initial (B ⊢ C) player, and let us give ourselves terms f ∶ A → B and g∶ B → C
of some language (say a non-deterministic λ-calculus) interpreted as strategies
Sf on (A ⊢ B) and Sg on (B ⊢ C). After some moves have been played on
the position (A ⊢ B ⊢ C), one can divide the final position into two “teams” ofplayers: those players x such that x0 ≺∗ x, and those such that y0 ≺∗ x. The firstteam is made of those players that represent some ongoing or frozen computationof f , while the second team is made of players that represent computations ofg. Some moves make complete sense from a computational point of view:• β moves between two players: it can be proved that such a move is always
played between two players that are on different teams, and they correspond to an interaction between f and g, just like playing on the middle
arena in an interaction sequences in traditional game semantics,• Λ and @ moves with the outside (i.e., on sub-arenas of A or C): theycorrespond to interacting with the outside, just like playing on the two
extremal arenas in traditional game semantics,• Λ moves on B: it can be proved by induction that such moves may only
be played by players of the first team, and they correspond once again tointeraction with the outside, since program fragments other than g may
call f .
The last point is slightly more controversial, but it makes sense if we see (A ⊢B ⊢ C) as a sub-position of201

y′ C ′
A

x
B

y

C

and the Λ move as a sub-move of a β move between x and y ′ . However, @moves on B do not make sense from a computational point of view, because
they represent g asking f for a value, but somehow ending up interacting withthe outside while doing so. This corresponds to the fact that positions of the
form
A′

x′

A

x

y

C

B

do not really make sense in our game, and that y must thus necessarily synchronise with x if they want to play @ on B.
An idea that could possibly solve this problem would be to define plays
not as presheaves, but as sheaves for a Grothendieck topology stating that β
moves are covered by @ moves and the presence of a player that could play Λto synchronise with that @ move.

202

Chapter 6

Composing
Non-Deterministic Strategies
6.1

MotivationGame models offer an intuitive and simple semantical framework that nonetheless provides fully abstract models for a variety of languages. However, theproofs involved are usually very complex with respect to the definitions. Let us
give the example of two fundamental properties of these models that are notstraightforward to prove. Their proofs also depend on the particular variant ofgames studied, which raises the issue of finding a theory that would be generalenough to encompass a large number of these models, but also powerful enoughto factor out these proofs.
The first one is maybe the most fundamental property of a game model (orany denotational model). It is that games and strategies (or the interpretationsof programs in the case of denotational models) form a category and that composition of strategies coincides with composition of programs. Even the factthat games and strategies form a category is not straightforward to prove.
Another fundamental notion is that of innocence, which is the fact that the
behaviour of a program should only depend on what it “sees” of the environment(typically, how the environment interacts with the program, the values it sends
to the program, etc.), and not on the rest of the execution (how the environment
interacts with other program fragments, how it computes the values it sends
to the program, etc.). This is of course not a reasonable hypothesis in general,
because the program may for example keep a pointer or reference to some values
that change depending on how a value is computed, but a key result in gamesemantics is that innocent strategies exactly correspond to the interpretationsof purely functional programs. It is therefore crucial to verify that innocent
strategies form a subcategory of the category of games and strategies.
The work we discuss in this chapter started as an attempt at taking theproof of Tsukada and Ong [97] that their arenas and innocent strategies forma category and recasting it using different tools that we thought to be more fit
for this purpose. By using high-level tools, we get the same result with simpler
proofs, and are also able to precisely extract the hypotheses used in the proofs

203without drowning in details about how exactly plays are represented.
This led us to a surprisingly broad framework, that may be applied to streamline the proofs that composition of strategies is associative and unital in different
settings. In non-technical terms, we first define an abstract gadget, which wecall a game setting (which basically represents plays) and show how that gadget
gives rise to a notion of strategy, as well as copycat strategies and a composition functor. We then show that, under mild hypotheses, games and nondeterministic strategies form a category. Under some more hypotheses, we provethat non-deterministic, innocent strategies form a subcategory of strategies. A
game semanticist should be doubtful at this point, as it is well known that nondeterministic, innocent strategies do not compose, but the notion of strategy we
use here is slightly different from the traditional one, though there is an intuitive correspondence between the two. We then treat composition of “traditional”
strategies and show that non-deterministic strategies form a category and that
restraining to deterministic, innocent strategies gives a subcategory. In passing,
we can pinpoint where our method fails if we try to show that non-deterministic,
innocent strategies compose.
All the while, we make sure to relate composition of our strategies, which
are not exactly traditional, with composition of traditional ones, and show inwhich sense the two correspond.

6.1.1

The Main Ideas

We define strategies as presheaves over a category of plays. Such a strategy S
accepts the play p if S(p) is non-empty and rejects it otherwise. We may thinkof S(p) as the set of states S may be in once it has played p (if S cannot bein any state after playing p, then S refuses to play p altogether). The fact that
S may be in several states after playing p reflects the fact that S is inherently
non-deterministic. If there is a morphism p → p′ (which typically means that p
is a prefix of p′ ), then the presheaf structure induces a function from S(p′ ) toS(p), so that, if p′ is accepted, then so is p. This notion of strategy is not exactly
traditional because a strategy may accept a play in several ways (the cardinalof S(p)), while a traditional strategy barely accepts or rejects plays. We thus
also define “traditional” strategies as presheaves to 2, the ordinal 0 → 1 seen
as a category. There is an obvious way to translate presheaves as presheaves
to 2, given by collapsing all non-empty sets to 1 and the empty set to 0. We
thus have two fundamentally different types of strategies: general strategies (org-strategies) and boolean ones (or b-strategies).
Our first contribution is to define composition of g-strategies and copycat
g-strategies as polynomial functors [62, 35] (i.e., composites of ∏’s, ∑’s, and∆’s) and to show that these definitions agree with Tsukada and Ong’s. Ourdefinition of composition is conceptually simple, in the sense that it can directly
be read as “the composite σ1 ; σ2 of two strategies accepts a play p on the pairof games (A, C) if there is an interaction sequence u on (A, B, C) that projects
to p and whose projections to (A, B) and (A, C) are accepted by σ1 and σ2
respectively”. The use of polynomial functors also gives us the opportunity to use
Guitart’s theory of exact squares (see Section 2.2.6), which shifts the focus fromthe categories of presheaves to the base categories, leading to simpler proofs.
We thus show that, under some hypotheses on the game setting, composition204

of g-strategies is associative and unital. We also show how this implies thatcomposition of b-strategies is associative and unital by exhibiting links between
compositions in both settings.
We then set out to instantiate our framework on different game settings, suchas traditional HON games and AJM games, different variations on HON games,
and Tsukada and Ong’s games. We also show how the hypotheses imposed on
game settings are actually necessary by showing that Blass games, a classic
example of strategies whose composition is not associative, do not verify them.
Finally, we treat the case of innocent strategies. Traditionally, a strategy S
is innocent when it accepts a play p if and only if it accepts all the views (aparticular type of play) that embed into it. Hirschowitz has argued [50] that
this idea may be recast as a sheaf condition, by viewing a play as covered by
its views. An innocent g-strategy is simply a sheaf for the topology inducedby the embedding of views into plays. By adding structure describing the embedding of views into plays to our game settings, we can express innocence andstudy composition of innocent strategies. We show that composition of innocent
g-strategies is associative under some conditions. To study composition of traditional, deterministic, innocent b-strategies, we need to take into account thefact that the notion of morphism of plays may have changed: typically, we want
to infer that games and innocent b-strategies form a category for HON games
from the fact that Tsukada and Ong’s g-strategies form a category, but Tsukada
and Ong consider a richer notion of morphism than prefix inclusion, which isthe notion of morphisms of plays in HON games. We thus have more notionsof innocence: p-innocence if morphisms form a poset (e.g., prefix inclusion) andc-innocence if morphisms form a proper category. From the fact that innocent
cg-strategies form a category, we derive that innocent pg-strategies form a category. We cannot infer that innocent pb-strategies form a category (because
they do not), but manage to show that it is the case for deterministic, innocent
pb-strategies.

6.1.2

A Technical Point
Required: 2.2.6.
Recommended: ∅.

As everything is expressed in terms of polynomial functors, the theory ofexact squares provides a powerful toolbox to show that diagrams commute (upto isomorphism). However, this theory is limited to squares of one of the forms
⋀

A

∆T

∑S

⋀

B

∑V

⋀

C

⋀

A

or

⋀

∆U

∏T

∆S

C

B

∆V

⋀

D

⋀

⋀

∏U

D.

It is even easier to show that squares that only involve one of ∏, ∑, or ∆commute, since it suffices to show that the underlying diagram (the one on thebase categories, rather than the presheaf categories) commutes. But we will alsoneed a lemma to make left and right Kan extension commute, which we now
discuss.
205

Consider an exact square as below left. Because it is exact, the middle
natural transformation is an isomorphism, so it can be inverted, which gives
rise by the mate calculus to a square as below right.
A
S

B

T
ϕ

U

∆T

⋀

C

A

⋀

⋀

C

A

∏T

⋀

C

ϕ̃

V

∑ϕ

∑S

∑V

⋀

D

∑S

⋀

B

D

∆U

∑V

⋀

B

⋀

∏U

D

Definition 6.1.1. An exact square is distributive when ϕ̃ is an isomorphism.
SU

Let us consider any functors A Ð→BÐ→ D with S a discrete fibration andU fully faithful. Remember that, in Section 2.2.5, we denoted by ∂ ∗ (S) the
presheaf that corresponds to S through the equivalence of presheaves and discrete fibrations. Let C = el(∏U (∂ ∗ (S)) denote the category of elements of theright Kan extension of ∂ ∗ (S) along U op , and let V denote its projection to
D. Because U is fully faithful, the counit ε of the adjunction ∆U ⊣ ∏U is an
isomorphism, so the left-hand square of
A

εS

⋅

C
V =∏U (S)∆U (V )

S

B

B

D

U

is a pullback. The right-hand square is a pullback by Lemma 2.2.58, so therectangle also is by the pullback lemma. By Lemma 2.2.70, it is exact, so wemay wonder whether or not it is distributive. This square is called the local
pushforward square of S and U .
Lemma 6.1.2. Local pushforward squares are distributive.
Proof. We first prove the corresponding result for the equivalent categories of
discrete fibrations. There, because S and V are discrete fibrations, ∑S becomes post-composition with S, and similarly for ΣV . So the result essentiallystates that for any discrete fibration P ∶ X → A, ∏U (∑S (P )) ≅ ∏U (SP ) ≅∏U (S) ∏T (P ) ≅ V ○ ∏T (P ) ≅ ∑V (∏T (P )), where the only non-obvious pointis that ∏U (SP ) ≅ ∏U (S) ∏T (P ). To prove that this isomorphism holds, weshow that ∏U (S) ∏T (P ) enjoys the same universal property as ∏U (SP ). In
other words, we show that, for all discrete fibrations Q∶ Y → D, [∆U (Q), SP ] ≅[Q, ∏U (S) ∏T (P )], naturally in Q.
We first show how to map each morphism F in [Q, ∏U (S) ∏T (P )] to amorphism in [∆U (Q), SP ]. Given such a morphism, we have a diagram as thesolid part of
X
Z′

P

A
∆U (Q)aY
F

Z∏T (P )

T

C
Q

S

B

∏U (S)

U

206

D

and want to define the dashed arrow. (We can build the top square because fully
faithful functors are the right class of a factorisation system, so are stable underpullbacks, and U is fully faithful.) We could simply define it by the universal
property of pullback (and that would indeed be the right construction), but we
prefer using adjunctions ∆ ⊣ ∏, because it will make the proof more symmetric.
We have that ∏T (P )F is a morphism from Q to ∏U (S), so it corresponds by
adjunction to a morphism P ′ from ∆U (Q) to S, and
Z′
P

Z

′

∏T (P )FA

C

T

is a pullback by the pullback lemma, so that P ′ is isomorphic to ∆T (∏T (P )F ).
But now, F is a morphism from ∏T (P )F to ∏T (P ), which yields by adjunction
a morphism F̃ from ∆T (∏T (P )F ) to P , hence from P ′ to P . We thus getthat F̃ is a morphism from ∆U (Q) to SP , and this mapping is monic andnatural because all arrows arise from the use of natural isomorphisms. The
proof that any morphism in [∆U (Q), SP ] may be mapped naturally to one in[Q, ∏U (S) ∏T (P )] is similar.
What we have shown here is that
∏T

DFibA

DFibC

∑S

∑V

DFibB

∏U

DFibD

commutes up to isomorphism. We now transfer this result, replacing DFibX
with X through the following diagram:
⋀

⋀

⋀

∏T

A

C

∑V
⋀

∑S

B

∏T

DFibA

⋀

∏U

D

⋀

D.

DFibC
∑V

∑S

DFibB

∏U

DFibD

Our goal is to prove that the top part of the diagram commutes up to isomorphism, which we prove by showing that everything else does. We just proved thatbottom square commutes up to isomorphism, and the final triangle also does because (π, ∂ ∗ ) forms an equivalence, so we are left with showing that the verticalsquares commute up to isomorphism.
For any functor F ∶ C → D, we know that the left-hand square below commutes up to isomorphism, so by pre- and post-composing with ∂ ∗ , we get thatthe right-hand one does too, using the fact that (π, ∂ ∗ ) form an equivalence.
⋀

C

∆F

π

DFibC

⋀

⋀

D

C

π
∆F

∂

DFibD

∗

DFibC

207

∆F

⋀

D
∂∗

∆F

DFibD

Now, using the fact that ∑F ⊣ ∆F and π ⊣ ∂ ∗ form adjunctions and uniquenessof left adjoint up to isomorphism, we get that the left-hand square below commutes up to isomorphism, and similarly for the right-hand one, using ∆F ⊣ ∏F ,∂ ∗ ⊣ π, and uniqueness of right adjoint.
⋀

C

∑F

π

DFibC

∑F

⋀

⋀

D

C

π

π

DFibD

DFibC

∏F

⋀

D
π

∏F

DFibD

Applying this result to all four vertical faces concludes the proof.

6.2

Polynomial Functors for Abstract Game Semantics

The main idea behind game settings is that they describe plays with two or more
players, and the link that must exist between these notions of plays. We organise
this information into a categorical structure from which we abstractly get two
notions of strategies: the presheaf-based one and essentially the standard one.
We then prove that games and strategies form a category, for both notions ofstrategies, and exhibit a link between composition of both types of strategies.
The construction of a typical game model relies on the definition of notions ofplays between increasingly many players. There is first a notion of game. Eachgame A involves two players O (Opponent) and P (Proponent), and featuresin particular a set of plays PA , which may be endowed with the prefix orderingor with a more sophisticated notion of morphism, thus forming a category ofplays.
Example 6.2.1. In games based on arenas (see Section 2.1 for some examples),a game is an arena A taken from the set A of all arenas. Plays on such arenas
are typically defined as alternating justified sequences of elements of A of evenlength (this is enough to understand the intuitions). This definition is however
not broad enough (see the definition of PA,B in the case of HON-style games
just below), so, if we consider HON-style games, PA will be given by potentiallynon-alternating justified sequences of elements of A of any finite length, as in
Definition 2.1.4.
The crucial step to view strategies as morphisms is to consider the arrowgame A ⊸ B, which intuitively describes the interaction of a middle player M
acting as Opponent against a left player L and as Proponent against a rightplayer R, as in
L

M
B

R
B
qR

qM
tL
fM .
208

(6.1)

In this example, M plays like the negation function on booleans: R asks its
return value by playing the move q R ; M in turn asks L for an argument byplaying q M , to which L answers true by playing tL ; M eventually answers theoriginal question by playing f M (in Section 2.1.1, L and R are seen as a single
player, since they are both played by the environment).
However, there is a subtlety: one often needs to restrict attention to a certain
subcategory PA,B ↪ PA⊸B . There must be projections to PA and PB , first
because it makes the whole categorical formalisation simpler, but also because
we do not get the right notion of copycat strategy otherwise (for a technicalreason). Note that this is not simply a trifling detail, as it is the very reason
why we take all justified sequences in PA (instead of the more traditional choiceof alternating justified sequences of even length).
Example 6.2.2. In HON-style games, PA,B would consist of alternating sequences of even length of PA⊸B . The projections of a play in PA,B to A and B
may not be alternating or have even length, so it is crucial to be liberal in the
choice of PA .
For composition of strategies, the situation (6.1) is then scaled up to combinations of two such situations in which a first middle player M1 plays on theright with a second one, say M2 , as in
L

M1

M2

B

B

R

(6.2)

B.

Plays in such combinations are standardly called interaction sequences, andtypically form a subcategory PA,B,C ↪ P(A⊸B)⊸C . An important point is thatinteraction sequences admit projections to PA,B , PB,C , and PA,C , which satisfy
the obvious equations with respect to further projections to PA , PB , and PC ,e.g., the following square commutes:
PA,B,C

PA,C

PB,C

PC .

Example 6.2.3. In HON games, PA,B,C typically consists of alternating justified sequences on (A ⊸ B) ⊸ C which end in A or C and whose projections to
A ⊸ B and B ⊸ C are plays.
Finally, in order to prove associativity of composition, one defines generalisedinteraction sequences as a subcategory PA,B,C,D ↪ P((A⊸B)⊸C)⊸D , again withprojections satisfying the obvious equations.

6.2.1

Plays as a Category-Valued Presheaf
Required: 2.2.5.
Recommended: ∅.

Let us now organise all this data (PA , PA,B , PA,B,C , PA,B,C,D , and theexistence of projections) into a simple categorical structure. First, as suggested
by our notation, for all lists L = (A0 , . . . , An−1 ) of games, we construct a category
PL .
209

Example 6.2.4. In the HON case, we may take PL to consist of alternating
justified sequences on (. . . (A0 ⊸ A1 ) ⊸ . . .) ⊸ An−1 whose projection to eachAi ⊸ Ai+1 is a play, and which end in A0 or An−1 , the leftmost and rightmost
arenas.
For the same reasons as before, we need projections from PL to PL′ , where
L′ contains one less arena than L. If L is the list A0 , . . . , An−1 , we define L−k tobe the list A0 , . . . , Ak−1 , Ak+1 , . . . , An−1 . We thus need projections δk ∶ PL → PL−k(for “delete k”), for all k ∈ [n].
A similar construction, relevant for defining copycat strategies is insertions
ιk ∶ PL → PL+k (for “insert k”), where k ∈ [n] and L+k denotes A0 , . . . , Ak−1 , Ak ,Ak , Ak+1 , . . . An−1 . For example, there is an insertion ι1 from PA,B to PA,B,B .
Intuitively, this functor maps any play u in PA,B to the interaction sequencein PA,B,B which duplicates all moves on B. So in a situation like (6.2), M2
would act as a “proxy” between M1 and R, repeating M1 ’s moves to R andconversely. For a precise definition and an example in the case of HON games,
see Section 6.3.1.
We can express the existence of all insertion and deletion morphisms in a
simple categorical structure. Let ∆ be the simplex category, i.e., the category
whose objects are finite ordinals [n] and whose morphisms [n] → [m] are orderpreserving functions from n to m. Let us call i the embedding of ∆ into Set.
Recall that A is the set of all games. Then ∆/A (or, more precisely, i ↓ ⌜A⌝)
has finite lists of games as objects, i.e., maps L∶ [n] → A for some n, and asmorphisms (n, L) → (n′ , L′ ) all monotone maps f making the following triangle
commute:
f

[n]
L

[n′ ]
L′

A.
Example 6.2.5. We will use the following morphisms to define δk and ιk . Let
dnk ∶ [n] → [n + 1] miss k ∈ [n], i.e., dnk (i) = i for i < k and dnk (j) = j + 1 for j ≥ k.
E.g., d21 yields a map (A, C) → (A, B, C) for all games A, B, C. Similarly,
consider ink ∶ [n + 1] → [n] which collapses k ∈ [n] ⊆ [n + 1] and k + 1 ∈ [n + 1].
E.g., for n = 2 and k = 0, it yields a map (A, A, B) → (A, B) for all A and B.
As promised, this yields a way to organise the categories of plays involved ina typical game model into a coherent categorical structure: we will show below
that, for quite a few game models, the assignment L ↦ PL induces a categoryvalued presheaf on ∆/A, i.e., a functor (∆/A)op → Cat. Furthermore, the maps
δk and ιk introduced earlier will respectively be given by P(dk ) and P(ik ).
In the following, we will only need to use this structure up to lists of length 4:
Definition 6.2.6. For any p in N and set A, let A[1,p] denote the full subcategory of ∆/A spanning lists L of length up to p.
In the next sections, we will define strategies, composition and copycat
strategies abstractly, based on the category-valued presheaf P on A[1,4] . Thisis quite demanding, but we are rewarded with a high-level view of composition,
which yields abstract proofs of associativity and unitality, under mild hypotheses
on P. We will define a game setting to consist of a set A and a category-valued
210

presheaf satisfying these hypotheses. Of course, it will remain to show, for eachconsidered game model, that• plays indeed form a game setting and• the standard definitions of composition and copycat strategies agree withthe abstract ones.

6.2.2

Copycats and Composition as Polynomial Functors
Required: 6.2.1, 2.2.4.
Recommended: ∅.

Let us now start our reconstruction of a game model from an arbitrary
category-valued presheaf P on A[1,4] . Our first step is to define strategies.
Standardly, a strategy σ∶ A → B is a prefix-closed set of plays in PA,B (generally required to be non-empty). Equivalently, it is a functor Pop
A,B → 2, where,
we recall, 2 denotes the ordinal 0 → 1 viewed as a category. In Tsukada andOng’s model [97], PA,B is a proper category, and strategies are generalised topresheaves on PA,B , i.e., functors Pop
A,B → Set. This is indeed a generalisation
because 2 embeds into Set (more on this in Section 6.2.4).
The basis of our approach will be the general notion:⋀

Definition 6.2.7. Let the category of strategies from A to B be PA,B . The:
category of boolean strategies is PA,B , the category of functors Pop
A,B → 2.
The next step in our reconstruction of a game model from A and P is todefine identities and composition.
Definition 6.2.8. A functor is polynomial if it is isomorphic to some finite
composite of functors of the form ∆F , ∏F and ∑F .
This definition may be seen as a generalisation of Fiore’s [35], and would
turn out to be the same if his polynomial functors are ever proved to be closed
under composition.
Remember that we will use two notations for polynomial functors:• the “full” notation, which we will mainly use in the definitions: it is simply
⋀

⋀

⋀

∆H

⋀

to write the functor as, say, A ÐÐ→ B ÐÐ→ C ÐÐ→ D,∏F∑G• a lighter notation, which we will mainly use in the proofs, in which theunderlying functors and presheaf categories are left implicit, so the same∆functor as above would be written A Ð→ B Ð→ C ←Ð D.
∏∑

In particular, note that, in the second notation, we draw arrows in the direction∆of the underlying arrow, so the ∆ arrows are reversed, like C ←Ð D. This may be
more difficult to read in general, but our diagrams will always be written fromleft to right (and most from top-left to bottom-right), so they should not be too
difficult to read. The real point of this notation is that it shifts the focus fromthe categories of presheaves to the underlying ones, which helps a lot, since ourproofs will all focus on the level of the base categories, thanks to exact squares
and local pushforward squares.
211

As a warm-up before considering composition, we would like to start with
our abstract definition of copycat strategies. A natural way to define the copycat
strategy id A ∶ A → A is to decree that it accepts all plays in PA,A that are in
the image of the insertion functor ι0 ∶ PA → PA,A . Indeed, recalling (6.1) andaccording to the discussion about insertions right after Example 6.2.4, suchplays are precisely those in which M acts as a proxy between L and R, which
agrees with the standard definition of copycat strategies.
This definition has the advantage of concreteness, but let us give an equivalent, polynomial definition. Because an object of a category C is the sameas a functor 1 → C, we may define id A as a functor 1 → PA,A . Furthermore, 1
is a presheaf category: indeed it is ∅, presheaves over the empty category. So
we may view the copycat strategy over A as a functor ∅ → PA,A . In order topresent it as a polynomial functor, we will need to assume that the insertionfunctor ι0 ∶ PA → PA,A is a discrete fibration, whose relevant property here is thecharacterisation of left extension along them, as given by Lemma 2.2.27. Hereis our polynomial presentation of copycat:
⋀

⋀

⋀

⋀

Proposition 6.2.9. If the insertion functor ι0 ∶ PA → PA,A is a discrete fibra⋀∑ι0⋀tion, then the functor ∅ Ð→ PA ÐÐ→ PA,A is isomorphic the copycat strategy
id A .
⋀∏!

Proof. First, because ∏! is right adjoint to ∆! , it preserves the terminal object(which is the unique object of ∅), hence maps 1 to the terminal presheaf on PA ,defined to map any play in PA to 1. So we reduce to showing that id A ≅ ∑ι0 (1).
By Lemma 2.2.27, we know that (∑ι0 X)(p) ≅ ∑ι0 (q)=p X(q) for any presheaf
X on PA and p ∈ PA,A . So in particular when X = 1 we get ∑ι0 (1)(p) ≅1 if p ∈ Im(ι0 )as desired.
∑ι0 (q)=p 1 ≅ {∅ otherwise,⋀

The next step is to express composition of strategies using the same language of polynomial functors. Remember from Section 2.1 that composition ofstrategies is standardly defined as follows. The composite σ; τ of two boolean
strategies σ and τ over (A, B) and (B, C) respectively, is defined to accept all
plays p ∈ PA,C for which there exists u ∈ PA,B,C such that δ1 (u) = p and δ2 (u)and δ0 (u) are accepted by σ and τ respectively. In [97], this is extended toa functor PA,B × PB,C → PA,C , whose definition is essentially a proof-relevant
version of the boolean one:⋀⋀⋀

Definition 6.2.10. The composite σ; τ of two strategies σ and τ over (A, B)
and (B, C) respectively, maps any play p ∈ PA,C to the set of triples (u, x, y)
where u is in PA,B,C is such that δ1 (u) = p, x is in σ(δ2 (u)), and y in τ (δ0 (u)).
Let us present this polynomially. First, by universal property of coproductwe have PA,B ×PB,C ≅ PA,B + PA,B , so the problem reduces to defining a functor
PA,B + PB,C → PA,C . Here is our candidate:
⋀

⋀

⋀

⋀

⋀

Definition 6.2.11. Let mA,B,C denote the polynomial functor∆δ2 +δ0

⋀

⋀

∏∇

⋀

∑δ1

⋀

PA,B + PB,C ÐÐÐÐ→ PA,B,C + PA,B,C ÐÐ→ PA,B,C ÐÐ→ PA,C ,212

where ∇ = [id , id ].
This definition is legitimated by:
Proposition 6.2.12. If δ1 is a discrete fibration, mA,B,C agrees with Definition 6.2.10, i.e., for all σ and τ , we have (σ; τ ) ≅ mA,B,C [σ, τ ].
Proof. We can express left Kan extension along δ1 as a sum by Lemma 2.2.27.
We also have that ∇ is a discrete opfibration, so ∏∇ (X)(u) ≅ X(inl u)×X(inr u)
by Lemma 2.2.28, and therefore:
mA,B,C [σ, τ ](p) = ∑δ1 (∏∇ (∆δ2 +δ0 [σ, τ ])) (p)≅ ∑δ1 (u)=p ∏∇ (∆δ2 +δ0 [σ, τ ]) (u)≅ ∑δ1 (u)=p (∆δ2 +δ0 [σ, τ ](inl u) × ∆δ2 +δ0 [σ, τ ](inr u))≅ ∑δ1 (u)=p [σ, τ ]((δ2 + δ0 )(inl u)) × [σ, τ ]((δ2 + δ0 )(inr u))≅ ∑δ1 (u)=p [σ, τ ](inl(δ2 (u))) × [σ, τ ](inr(δ0 (u)))≅ ∑δ1 (u)=p σ(δ2 (u)) × τ (δ1 (u)),
where ∑ means right Kan extension on the first line and disjoint union on allother lines, which clearly coincides with Tsukada and Ong’s definition.
Remark. The discrete fibredness hypothesis is satisfied in most game models,with the notable exception of the saturated interpretation of AJM games (seeSection 6.3.3), in which the projection is a non-discrete fibration.

6.2.3

Game Settings, Associativity and Unitality
Required: 6.2.2, 6.1.2.
Recommended: ∅.

We have now expressed copycat strategies and composition abstractly, relying only on the postulated category-valued presheaf. Let us now consider
associativity. It has become standard in game semantics to prove associativityof composition using a zipping result [9] stating that both squares
PA,B,C,D

δ2

PA,B,Dδ0

PA,B,C,D

δ0

PB,C,D

PA,C,D

δ3

PB,D

δ1

δ1

δ2

PA,B,C

δ1

(6.3)

PA,C

are pullbacks. This holds in all considered game models.
Finally, we need to add one last bit to our axiomatisation to prove that
copycat strategies are identities for composition. Suppose that u in PA,A,B issuch that δ2 (u) = ι0 (s) for some sequence s in PA , then we intuitively want tohave u = ι0 (δ0 (u)), which does not hold in general. We want both squares
PA,B

δ1

ι0

PA,A,B

PA

PA,B

ι0
δ2

δ0

ι1

PA,A

PA,B,B

PB
ι0

δ0

PB,B

to be pullbacks, which is a slight generalisation of this intuition.
213

(6.4)

Definition 6.2.13. A game setting consists of a set A (whose elements wecall games or arenas) and a category-valued presheaf P on A[1,4] such that all
projections PA,B,C → PA,C and insertions PA → PA,A are discrete fibrations,and all squares (6.3) and (6.4) are pullbacks.
We call both squares (6.3) the zipping squares of P and both squares (6.4)
the copycat squares of P.
Remark. By zipping, because discrete fibrations are stable under pullbacks, all
the horizontal projections in the squares (6.3) are discrete fibrations, and similarly, all insertions in the squares 6.4 also are.
One of our main results is:
Theorem 6.2.14. In any game setting, composition of strategies is associative
up to isomorphism, and copycat strategies are units up to isomorphism.
To prove this theorem, let us start with an alternative description of composition, which relies on the following intermediate category:Definition 6.2.15. For any triple of arenas A, B, C, let P(A,B),(B,C) denotethe lax colimit [61] of
δ2

PA,B

δ0

PA,B,C

PB,C ,

i.e., the initial category equipped with natural transformations
δ2

PA,B

PA,B,C
λ

l

δ0

PB,C

ρ

m

r

P(A,B),(B,C) .
The obtained category has as objects the disjoint union of objects from PA,B ,PB,C , and PA,B,C . It inherits the corresponding morphisms, and has additional
morphisms λu ∶ δ2 u → u and ρu ∶ δ0 u → u for all u satisfying the obvious naturality
requirements that, for all f ∶ u → u′ in PA,B,C ,δ2 (u)

δ2 (f )

δ2 (u′ )
u

u

′

f

δ0 (f )

δ0 (u′ )
ρu′

ρu

λu′

λu

u

δ0 (u)

(6.5)

u

′

f

commute. We have:
Proposition 6.2.16. Composition is isomorphic to the polynomial functor∏[l,r]

⋀

∆m

⋀

⋀

∑δ1

⋀

PA,B + PB,C ÐÐÐ→ P(A,B),(B,C) ÐÐ→ PA,B,C ÐÐ→ PA,C .

Proof. This follows from Lemma 2.2.65 by observing that the square214

PA,B,C + PA,B,C∇

PA,B,Cmδ2 +δ0

PA,B + PB,C

P(A,B),(B,C)[l,r]is a cocomma square, where ∇ denotes the copairing [id , id ]. Indeed, bothcategories have the same universal property, expressed differently.
PA,B + PB,C + PC,D ∏ P(A,B),(B,C) + PC,D ∆ PA,B,C + PC,D ∑ PA,C + PC,D∏∏

PA,B + P(B,C),(C,D)∏∏

P(A,B),(B,C),(C,D)

P(A,C),(C,D)∆∆∆

PA,B + PB,C,D∑

PA,B,C,D∑∑

PA,B + PB,D∏

P(A,B),(B,D)∑

PA,B,D∆

PA,C,D∑

PA,D

Figure 6.1: Diagram for associativity
Proving associativity thus reduces to showing that the perimeter of the diagram of Figure 6.1 commutes up to isomorphism. In order to do this, we introduce the category P(A,B),(B,C),(C,D) , similar to P(A,B),(B,C) but with fourarenas, which is constructed as the lax colimit of
δ0

PA,B

δ2

PB,C

δ2

PA,B,C

PB,C,D
δ3

PA,B,C,D .

δ0

PC,D

δ0

It has as objects the objects of all six categories and morphisms as in those categories, plus morphisms δi (u) → u whenever this makes sense (and composites
thereof), with the same kind of naturality constraints as P(A,B),(B,C) .
In the diagram of Figure 6.1, both little squares commute up to isomorphism
because the underlying squares do. It thus suffices to show that both heptagons
commute up to isomorphism. Both cases are symmetric, so we only treat thebottom left one. We then need to introduce yet another category, P(A,B),(B,C,D) ,which is like P(A,B),(B,C),(C,D) , except that PB,C,D is not decomposed into PB,C
and PC,D : it is the lax colimit of
PA,B

δ2 δ2

PA,B,C,D

δ0

PB,C,D .

These categories are related by the full embeddings given by the universal
properties of P(A,B),(B,C) and P(A,B),(B,C,D) (indeed, P(A,B),(B,C),(C,D) has lax
cocones from PA,B ← PA,B,C → PB,C and PA,B ← PA,B,C,D → PB,C,D given byits own definition):P(A,B),(B,C) ↪ P(A,B),(B,C),(C,D) ↩ P(A,B),(B,C,D) .
The crucial reason why the heptagon commutes is:215

Lemma 6.2.17. The square
PA,B + PB,C,D[l,r]P(A,B),(B,C,D)
P(A,B),δ1

PA,B +δ1

PA,B + PB,D

[l,r]

P(A,B),(B,D)

is a local pushforward square.
Proof. The square is obviously a pullback, so, by Lemma 2.2.84, it suffices toshow that ∂ ∗ (P(A,B),δ1 ) is a sheaf for the Grothendieck topology induced by theembedding [l, r].
Remember that, if F ∶ C → D is a functor, a sieve S covers an object dof D for the topology induced by F if and only if it contains all morphismsof the form F c → d. In our case, a sieve S covers l(pA,B ) if and only if it
contains all morphisms of the form [l, r](p) → l(pA,B ) for p in PA,B + PB,D ,but since there are no morphisms of the form r(−) → l(−), S covers l(pA,B )if and only if it contains all morphisms of the form l(p) → l(pA,B ) for p in
PA,B . In particular, it must contain id l(pA,B ) = l(id pA,B )∶ l(pA,B ) → l(pA,B ), so
it must be the maximal sieve. Similarly, a sieve S covers r(pB,D ) if and only
if it is the maximal sieve. The sheaf condition is therefore not constraining on
objects of the form l(pA,B ) and r(pB,D ) (all matching families necessarily havea unique amalgamation given by the identity morphism). For objects of theform m(uA,B,D ), a sieve S is covering if and only if it contains all morphisms of
the form [l, r](p) → m(uA,B,D ), but since all such morphisms can be factored aseither λuA,B,D f or ρuA,B,D f , a sieve is covering if and only if it contains λuA,B,D
and ρuA,B,D .
Consider a sieve S covering uA,B,D . A matching family for S is a family
xf ∈ ∂ ∗ (P(A,B),δ1 )(c) for all morphisms f ∶ c → m(uA,B,D ) in S such that xf ⋅g = xf g for all f and g, and an amalgamation for such a family is an x ∈∂ ∗ (P(A,B),δ1 )(uA,B,D ) such that x ⋅ f = xf for all f ∈ S. If we consider any
matching family x− for S, since ∂ ∗ (X)(c) ≅ X −1 (c) and S contains ρuA,B,D ,−1
xρuA,B,D is an element of P−1(A,B),δ1 (r(δ0 (uA,B,D ))) ≅ δ1 (δ0 (uA,B,D )), i.e., anelement uB,C,D of PB,C,D such that δ1 (uB,C,D ) = δ0 (uA,B,D ). Therefore, by
zipping, we get an element uA,B,C,D of PA,B,C,D that projects to uA,B,D and
uB,C,D , which is exactly an element of P−1(A,B),δ1 (m(uA,B,D )). We take uA,B,C,D
as our candidate amalgamation x. It is the only possible choice of amalgamation,
because, any amalgamation u′A,B,C,D must project to uA,B,D (because it must
be an element over m(uA,B,D )) and also to uB,C,D (because we must havex ⋅ ρuA,B,D = xρuA,B,D = uB,C,D ), so it must be equal to uA,B,C,D by the zipping
squares (6.3) being pullbacks.
We now show that it is indeed an amalgamation, i.e., that x ⋅ f = xf for
all f ∈ S. This is obviously the case for objects of the form l(pA,B ) because
there is only one element above each such object. For objects of the formr(pB,D ), the result come from the fact that all morphisms r(pB,D ) → m(uA,B,D )ρuA,B,Dr(f )factors uniquely as r(pB,D ) ÐÐ→ r(δ0 (uA,B,D )) ÐÐÐÐÐ→ m(uA,B,D ), and wehave chosen x such that x⋅ρuA,B,D = uB,C,D . For objects of the form m(u′A,B,D ),the result comes from the fact that elements above m(u′A,B,D ) are in bijection
with those above r(δ0 (u′A,B,D )) through − ⋅ ρu′A,B,D , and that the result holds
for those objects.
216

PA,B + P(B,C),(C,D)

PA,B + PB,C,D∆

PA,B + PB,D

∑
∏

∏

∏

P(A,B),(B,C),(C,D)∏∆

P(A,B),(B,C),(C,D)∆∆

P(A,B),(B,C,D)∑

P(A,B),(B,D)∆∆

PA,B,C,D∑

PA,B,D

Figure 6.2: Zoom into the bottom left heptagon of Figure 6.1
This leads us to fill the heptagon in Figure 6.2. The top right square commutes by Lemmas 6.1.2 and 6.2.17. The top triangle commutes up to isomorphism by Lemma 2.2.68, the bottom one because the underlying diagram
commutes, and the bottom-right square by Lemma 2.2.70.
Associativity finally follows from:
Lemma 6.2.18. The left square commutes up to isomorphism.
Proof. The classical limit formula for right Kan extensions gives that the rightKan extension of a presheaf X over C along F ∶ C → D is given at d by the limit∂dXof (C ↓ d)op Ð→ Cop Ð→ Set. So, in our case:• following the left and bottom arrows we obtain a presheaf mapping any
u ∈ PA,B,C,D to the limit of((PA,B + P(B,C),(C,D) ) ↓ u)op → (PA,B + P(B,C),(C,D) )op → Set,
• following the top and right arrows, we obtain a presheaf mapping any u
to the limit of((PA,B + PB,C,D ) ↓ u)op → (PA,B + P(B,C),(C,D) )op → Set,
where u is seen as an object of P(A,B),(B,C),(C,D) in the formulas. Now, the inclusion functor (PA,B +PB,C,D ) ↓ u → (PA,B +P(B,C),(C,D) ) ↓ u is readily checked
to be final [76, IX.3], so its opposite is initial and both limits are isomorphic.
This ends the proof of associativity.
Left and right unitality are entirely symmetric, so we only treat one. First,
we observe that, because ι0 ∶ PA → PA,A is a discrete fibration, so is ι0 +PA,B ∶ PA +
PA,B → PA,A + PA,B . In the diagram of Figure 6.3, the top path is compositionof a strategy on PA,B with the copycat strategy on PA,A and its bottom path
is isomorphic to the identity (because the first three morphisms are isomorphic
to the identity and δ1 ι0 = P(d21 )P(i20 ) = P(i20 d21 ) = P(id [2] ) = id PA,B ). So if
we manage to show that all the squares commute, we will have proven (left)
unitality.
To pave the diagram, we introduce the category PA,(A,B) , which we define
as the lax colimit of
PA

δ1

PA,B

217

PA,B

∅ + PA,B∏!+PA,B∏[!,PA,B ]PA + PA,B∑ι0 +PA,B

PA,A + PA,B∏[l,r]∏rPA,B∏[l,r]

PA,(A,B)ρ∑Pι ,(A,B)
0

P(A,A),(A,B)

∆m

PA,B

∆m

PA,B

PA,A,B∑ ι0

PA,B .

∑ δ1

Figure 6.3: Diagram for left unitality
and Pι0 ,(A,B) ∶ PA,(A,B) → P(A,A),(A,B) by its universal property. The top-leftsquare commutes up to isomorphism because the underlying diagram does, thebottom-right because it is exact by Lemma 2.2.71.
The bottom-left square commutes as well because the underlying square isexact, which we prove by the zigzag criterion: by construction of PA,(A,B) , any
r(f )

ρ p′

morphism r(p) → m(p′ ) in PA,(A,B) can be factored as r(p) ÐÐ→ r(p′ ) ÐÐ→m(p′ ), which is our candidate factorisation. For any other such factorisation
r(g)

ρq

m(h)

r(p) ÐÐ→ r(q) Ð→ m(q) ÐÐÐ→ m(p′ ), we have by construction of PA,(A,B) thathg = f , from which we get that
p
f

g

q

h
h

q

p′
p′

h

p′
is a lantern.
Finally, the crucial reason why the diagram commutes is:
Lemma 6.2.19. The square
PA + PA,B[l,r]

PA,(A,B)

ι0 +PA,B

PA,A + PA,BPι0 ,(A,B)[l,r]P(A,A),(A,B)

is a local pushforward square.
Proof. First, the square is obviously a pullback. It is also routine to check thatPι0 ,(A,B) is a discrete fibration. So, by Lemma 2.2.84, it suffices to show that∂ ∗ (Pι0 ,(A,B) ) is a sheaf. Given a sieve S covering an object of the form l(p) orr(p), it is trivial to show there is a unique amalgamation for any compatible
family for S, because S necessarily contains the identity. For objects of theform m(u), a sieve is covering if and only if it contains λu and ρu . In particular, a compatible family x− for a sieve S covering u must contain an elements = xλu over r(δ2 (u)). This element is such that ι0 (s) = δ2 (u) (because it is218

above r(δ2 (u)) and that elements above r(p) are antecedents of p through ι0 ).
Therefore, because the copycat squares (6.4) are pullbacks, we get an element p
such that δ1 (p) = s and ι0 (p) = u. In particular, it is an element above u, which
we take as our candidate amalgamation x. This is the only possible choice of
amalgamation because an amalgamation x must be an element over u (which
implies ι0 (x) = u) and must restrict to the compatible family, in particularx ⋅ λu = xλu = δ2 (u), and the copycat squares are pullbacks, so there is a uniquesuch element.
We now show that p is indeed an amalgamation. It restricts to the desiredelements over objects of the form r(p) because there is only one element above
such an object. For elements of the form l(p), the result comes from the fact that
l(f )

λu

all morphisms l(p) → m(u) can be written as l(p) ÐÐ→ l(δ2 (u)) Ð→ m(u) andp admitting the desired restriction to xλu by construction. For elements of theform m(u′ ), the result comes from the fact elements above are in bijection withthose above l(δ2 (u′ )) through − ⋅ λu′ , and the result holds for those objects.
This ends the proof of (left) unitality.

6.2.4

The Boolean Case
Required: 6.2.3.
Recommended: ∅.

Let us conclude this section by treating the boolean case: until now, ourstrategies were given by general presheaves (Definition 6.2.7). We would like toderive from Theorem 6.2.14 that boolean strategies also form a category.
The bridge to the boolean case is given by the embedding r∶ 2 ↪ Set mapping0 ≤ 1 to ∅ → 1. This functor has a left adjoint l mapping ∅ to 0 and collapsing
all non-empty sets to 1. Furthermore, r being fully faithful, we have in fact
a full reflection, which induces a further one between presheaves and boolean
presheaves:
Proposition 6.2.20. For any small category C, post-composition by l and r
yield a full reflectionl!

[C , Set]
op[Cop , 2].

r!

The left adjoint l! is called booleanisation.
Proof. The pair of functors l! ⊣ r! clearly forms an adjunction and r! is clearly afull embedding.
Because 2 is complete and cocomplete, replacing Set with 2 in Definition 6.2.8
yields a notion of boolean polynomial functor:
Notation 6.2.21. Any functor F ∶ C → D induces restriction, left Kan extension::
and right Kan extension functors between boolean presheaf categories C and D,
respectively denoted by ∆F , ∑F and ∏F . Accordingly, the boolean version of
any polynomial functor P will be denoted by P .
219

We may thus transfer our polynomial definitions of copycat and composition
to boolean strategies. Concrete examples of game settings will be considered in
Section 6.3, for which we have:
Proposition 6.2.22. In all the game settings of Section 6.3, m coincides withstandard composition.
To show that our results in the presheaf case transfer to the boolean case,we show that the polynomial functors we used commute with booleanisation.
This is easy for left extensions and restrictions:
Proposition 6.2.23. For all functors F ∶ C → D, the following squares commute
up to isomorphism.
[Cop , Set]

∑F

[Dop , Set]

[Cop , Set]

∆F

[Dop , Set]

l!

l!

l!

l!

[Cop , 2][Dop , 2][Cop , 2][Dop , 2]

¯
∑
F

¯F
∆

Proof. Commutation with restriction is obvious because l! is post-compositionby l and ∆F is pre-composition by F . For left Kan extension, the reflection l,being a left adjoint, preserves colimits, which is precisely what ∑F computes.
Things do not work out so well with right extensions in general. In orderto show that our polynomial functors commute with booleanisation, it is thus
useful to delineate a sufficiently large class of limits that are preserved by l:Lemma 6.2.24. The left adjoint l preserves products.
Proof. A product ∏i Xi is non-empty just when each Xi is, hence just whenl(Xi ) = 1 for all i, i.e., when ∏i l(Xi ) = 1. Thus l(∏i Xi ) = 1 if and only if∏i l(Xi ) = 1, hence l(∏i Xi ) = ∏i l(Xi ).
Proposition 6.2.25. booleanisation commutes with ∏F , for any F ∶ C → D suchthat for all d ∈ ob(D) the comma category F /d is a coproduct of categories witha terminal object.
⋀

Proof. Indeed, consider any such F . For any X ∈ C and d ∈ D, letting F /d ≅∑i∈nd Ddi with ϕdi ∶ F (cdi ) → d denoting the terminal object in Ddi , we have that[[F −, d], X] ≅ ∏i∈nd X(cdi ). Indeed, we may map any natural transformation α
to the tuple (αcdi (ϕdi ))i∈nd and conversely any tuple (xi )i∈nd to the transformation that maps f ∶ F c → d to xi ⋅ g, where f = ϕdi F (g) is given by universal
property of terminal object. These maps are inverse to each other because α isnatural. Therefore, we have:l! (∏F (X))(d) = l(∏F (X)(d))≅ l([[F −, d], X])≅ l(∏i∈nd X(cdi ))≅ ∏i∈nd l(X(cdi ))≅ ∏i∈nd l! (X)(cdi )≅ ∏i∈nd [[F −, d], l! (X)]≅ ∏F (l! (X))(d),220(by Lemma 6.2.24)

as desired.
Proposition 6.2.26. The class of functors F such that ∏F commutes withbooleanisation contains all functors ∇C ∶ C + C → C and !∶ ∅ → C, and it is closed
under composition and coproduct (i.e., F + G∶ C + C′ → D + D′ is in it if F and
G are).
Proof. This is direct for composition and easy consequences of the previous
proposition for everything else.
As desired, we obtain:
Proposition 6.2.27. In any game setting, composition of boolean strategies is
associative and unital up to isomorphism.
Proof. Both results state that two polynomial functors, say P1 and P2 between
categories of the form [Cop , 2] are naturally isomorphic. But knowing that their
set-versions, say P1 and P2 , are isomorphic, we may form
[Cop , Set]

P1

[Dop , Set]

P2
l!

l!

[Cop , 2]

P1[Dop , 2].

P2

In both cases, this diagram commutes serially by Propositions 6.2.23 and 6.2.26,
and we have proved that the top parallel functors are isomorphic. But l! isepi, which entails that the bottom parallel functors are also isomorphic, as
desired.
Remark. Please note that we have not claimed that boolean composition agrees
with general, set-based composition, i.e., commutation of the diagram below.
⋀

PA,B + PB,C

m

r!

⋀

PA,C
r!

:

PA,B + PB,C

m

:

PA,C

In fact it does not in general, and this is the main cause for the failure of stabilityof boolean, innocent strategies under composition [46, Section 3.7.2]. What does
hold, however, is• commutation of booleanisation with composition as on the left below,• the characterisation of boolean composition given below right, as set-based
composition followed by booleanisation (because l! ⊣ r! is a full reflection,
so the counit is an isomorphism).
⋀

PA,B + PB,C

m

l!
:

PA,B + PB,C⋀⋀

PA,B + PB,C

PA,C

r!

l!
m

m

:

:

PA,B + PB,C

PA,C

221

⋀

PA,C
l!

m

:

PA,C

Let us move on to exhibit a few concrete game settings. We will return tothe boolean case in Section 6.4.3, to deal with innocence.

6.3

Applications

In this section, we show that a number of standard game models fit into ourframework. In Section 6.3.1, we consider HON games, in their p-form, which by
the results of Section 6.2 yields categories of pg and pb-strategies. We then refine
our results by considering variants in which some constraints are imposed on
strategies (or equivalently plays) in Section 6.3.2: first a local form of constraint,
followed by a slightly more involved form, obtained by enriching games withvalidity predicates on plays. These variants are shown to form game settings(hence yield categories of pg and pb-strategies). AJM games are considered in
Section 6.3.3, and also shown to form a game setting. Finally, we explain in
Section 6.3.4 why Blass games fail to form a game setting.

6.3.1

Hyland-Ong/Nickau Games
Required: 6.2.4, 2.1.1.
Recommended: ∅.

We define arenas, plays, interaction sequences, etc, as in Section 2.1.1.
A classical lemma in HON games is (and can for example be found in [96]):
Proposition 6.3.1. A justified sequence s on an arena triple (A, B, C) is aninteraction sequence if and only if its projection to (A, B), (B, C), and (A, C)
are plays.
Therefore, we have the wanted projection δi from interaction sequences toplays. Furthermore, a similar lemma holds for generalised interaction sequences,
yielding projections from generalised interaction sequences to interaction sequences.
Let us finally define the insertion functors. The intuition is simply to create
two copies of the kth arena and play whatever is played on it in both copies(Opponent moves are played in the right-hand copy first, while Proponent moves
are played in the left-hand copy first, which mimics program flow).
Let us start with the simplest case, where s is in PA .
Definition 6.3.2. If s = (n, f, ϕ) is a justified sequence on A, then we defineι0 (s) to be the sequence s̃ = (2n, f˜, ϕ̃) with f˜(2i − 1) = f (i)ai and f˜(2i) = f (i)ai(where ai denotes the right-hand copy of A if f (i) is an Opponent move and theother copy otherwise, and ai is the copy of A that is not ai ), ϕ̃(2i − 1) = 2ϕ(i),and2i − 1
if f (i) is an initial moveϕ̃(2i) = {2ϕ(i) − 1 otherwise.
Proposition 6.3.3. The mapping ι0 thus defined is a functor from PA to PA,A .
Proof. We want to show that, for any justified sequence s in PA , s̃ is an alternating justified sequence of even length, and everything is direct except for the factthat it is justified. Then f˜(ϕ̃(2i−1)) = f˜(2ϕ(i−1)) = f (ϕ(i−1))aϕ(i−1) . Because222

s is a justified sequence, f (ϕ(i − 1)) and f (i − 1) have opposite polarities, soaϕ(i−1) = ai−1 , so f˜(ϕ̃(2i − 1)) = f (ϕ(i − 1))ai−1 ⊢ f (i − 1)ai−1 = f˜(2i − 1). If f (i)is initial, we have f˜(ϕ̃(2i)) = f˜(2i−1) = f (i)r ⊢ f (i)l = f˜(2i). And finally, whenf (i) is not initial, f˜(2i) = f˜(2ϕ(i)−1) = f (ϕ(i))aϕ(i) ⊢ f (i)aϕ(i) = f (i)ai = f˜(2i).
Finally, to show that ι0 is a functor, we need to show that, if s is a prefix oft, then s̃ is a prefix of t̃, which is direct.
Example 6.3.4. The justified sequence on B below left, which is not alternating,yields the copycat play on the right:
B
B
q
q
a

B
q

q
q
q
a
a.

Note that this example shows that it is indeed crucial to take PA to be theset of all justified sequences in our construction if we want to get all copycat
plays in the image of ∅ Ð→ PA Ð
→ PA,A .
In general, the insertion functor ιk ∶ PL → PL+k maps the justified sequences = (n, f, ϕ) to s̃ = (n + nk , f˜, ϕ̃) (where nk is the number of moves on the kth
arena in s) defined as follows.
We first define a surjective map α∶ n + nk → n that maps each occurrence ofa move in s̃ to the move of s it copies: if f (i) is on the kth arena, then i has
two antecedents through α, and only one otherwise. It is defined as α(0) = 0(for the induction to go through), α(1) = 1, and∏α(i + 1) = {α(i)α(i) + 1∑

if f (α(i)) is in the kth arena and α(i) ≠ α(i − 1)otherwise.

We can now define f˜ and ϕ̃ using this map. Let us denote by f (i) the index of
the arena f (i) is played in (in s) and by mi the move m if it is played in the
ith arena (in s̃), then we define f˜ as:⎧f (α(i))dk (j)⎪⎪⎪⎪⎪ f (α(i))k+1
˜
f (i) = ⎨⎪⎪⎪⎪⎪⎩ f (α(i))k

if f (α(i)) = j ≠ kif α(i) ≠ α(i − 1) and f (α(i)) is an Opponent moveor α(i) = α(i − 1) and f (α(i)) is a Proponent moveotherwise,

where dk ∶ p → p + 1 misses k: dk (i) = i if i < k and dk (i) = i + 1 if i ≥ k (where pis the number of arenas s is played on).
For ϕ̃, things are slightly messier because the initial moves in the kth arena
should now be justified by their predecessors, but the rest of the pointers should
be given by s. To define it, let us notice that all i such that f (i) is in the kth
arena have two antecedents through α, say i1 and i2 , and that one of them issuch that f˜(i1 ) is in the kth arena and the other is in the k + 1th arena. Let−1
us call αk−1 (i) and αk+1(i) these two antecedents. If we generalise this notation,223we get αj−1 (i), which denotes the antecedent of i that is played in the jth arena.
Two such antecedents are always equal, but they may not exist. However, there
is always a j such that i has an antecedent through αj , and it has two suchantecedents if and only if f (i) = k (in which case its two antecedents are theones described above).
Lemma 6.3.5. If s = (n, f, ϕ), then for all i in n, if αj−1 (i) exists, thenf˜(αj−1 (i)) = f (i)j .
Proof. Direct.
We define ϕ̃ by:
−1
⎧
αj+1
(i)
⎪
⎪
⎪
−1
−1
α
ϕ̃(αj (i)) = ⎨ j+1 (ϕ(i))⎪⎪ α−1 (ϕ(i))⎪⎩ j

if j = k and f (i) is initial in Aj
if f (i) is initial in Aj
otherwise,−1
where, by convention, αp+1(0) = 0 if s is played on p arenas. (The reader may
notice that this construction is a generalisation of the construction of ι0 ∶ PA →
PA,A defined above.)

Proposition 6.3.6. If s is a play (resp. an interaction sequence), then s̃ is aninteraction sequence (resp. a generalised interaction sequence). Furthermore,
the mappings thus defined extend to functors.
Proof. On objects, it is enough to show that s̃ is a justified sequence that ends inan outmost arena and whose first and last projections are plays (resp. interaction
sequences).
The easiest point is that s̃ ends in one of the outmost arenas. This is direct
if k is not one of the outmost arenas or if it is one of them, but s ends inthe other outmost arena. Otherwise f˜(n + nk ) = f (α(n + nk ))k+ε = f (n)k+ε ,where ε equals 1 if and only if f (n) is a Proponent move (because we know thatα(n + nk ) = α(n + nk − 1)). But we know that s must end with a Proponent
move if it ends in its rightmost arena and with an Opponent move otherwise,
so we have thatf (n)1+0f˜(n + nk ) = {f (n)p+1

if s ends in its leftmost arena
if s ends in its rightmost arena Ap .

Let us now show that s̃ is justified. We consider any αj−1 (i) for some i in nand show that f˜(ϕ̃(αj−1 (i))) ⊢ f˜(αj−1 (i)).
• The simplest case is when f (i) is not initial in Aj , in which case wehave f˜(ϕ̃(αj−1 (i))) = f˜(αj−1 (ϕ(i))) = f (ϕ(i))j ⊢ f (i)j = f˜(αj−1 (i)), using
Lemma 6.3.5.
• Now, if f (i) is initial in Aj , there are two cases.
−1– If j = k, then we have f˜(ϕ̃(αj−1 (i))) = f˜(αj+1(i)) = f (i)j+1 ⊢ f (i)j =−1˜f (αj (i)).
−1– Otherwise, f˜(ϕ̃(αj−1 (i))) = f˜(αj+1(ϕ(i)))) = f (ϕ(i))j+1 ⊢ f (i)j =−1˜f (αj (i)).

224

The last thing to prove on objects is that the projections of s̃ (which isplayed on (A1 , . . . , Ap+1 )) to (A1 , . . . , Ap ) and (A2 , . . . , Ap+1 ) are plays (resp.
interaction sequences). We do this by induction on the number of arenas s isplayed on:• if s is played on 1 arena, then there is nothing to prove,• if s is played on p+1 arenas and the duplicated arena is one of the outmost
arenas, then one of the projections is s itself (so it is indeed a play) andthe other is ι(s′ ) for some s′ played on p − 1 arenas, so it is a play by
induction hypothesis,• if s is played on p + 1 arenas and the duplicated arena is none of theoutmost arenas, then both projections are in the same case as the second
projection in the case above, so they are plays by induction hypothesis.
Finally, to prove that ιk is a functor, we need to show that if s is a prefix oft, then s̃ is a prefix of t̃, which is direct.
Proposition 6.3.7. The category-valued presheaf P defined by respectively taking PA , PA,B , PA,B,C and PA,B,C,D to be the posets of all justified sequences,
plays, interaction sequences and generalised interaction sequences, for all arenas
A, B, C, D, with projections and insertions as above, forms a game setting.
Proof. For P to be a category-valued presheaf over ∆/A, one should verify thatthe simplicial identities hold. They do, but we skip the details.
Copycat plays form a full subcategory and are closed under prefix, hence
insertions ι0 ∶ PA → PA,A are discrete fibrations. Projections δ1 ∶ PA,B,C → PA,C
are discrete fibrations: the restriction of any u ∈ PA,B,C along any p ≤ δ1 (u) may
be taken to be the shortest prefix of u whose projection is p (longer such prefixes
end neither in A nor C). The fact that squares (6.3) are pullbacks is a slightvariation on the standard zipping lemma, proved very similarly. Finally, forsquares (6.4), it suffices to notice that, if u in PA,A,B is such that δ2 (u) = ι0 (s)for some s in PA , then δ0 (u) is mapped to u by ι0 and to s by δ1 , and similarlyin the symmetric case.

6.3.2

Constraining Strategies
Required: 6.3.1, 2.1.2.
Recommended: ∅.

In the previous section, we consider a rather rough notion of play. Standardly, further constraints are considered on strategies, such as P -visibility, Ovisibility, well-threadedness, and well-bracketing (when games are equipped with
an appropriate question-answer discipline). For example, a P -visible strategy is
one which only accepts P -visible plays. One then needs to prove that such constraints are robust, i.e., are preserved by composition and satisfied by identities.
This is done in a very clean and modular way in Harmer’s thesis [46, Chapter
3]. In order for our framework to apply to such constrained strategies, we may
start from the game setting for unconstrained plays and convert the proof ofrobustness of a constraint c into the construction of a sub-game setting Pc thatis restricted to constrained plays.
225

We consider constraints in {P -vis, wb, wt}, respectively denoting P -visibility,
well-bracketing, and well-threadedness.
Proposition 6.3.8. Each set c ⊆ {P -vis, wb, wt} of constraints gives rise to agame setting Pc and an embedding c∶ Pc ↪ P of category-valued presheaves.
Proof. We define each PcA,B to be the set of plays defined by our chosen setof constraints c. We then take PcA to be the full subcategory of PA consisting of projections of such plays, PcA,B,C the full subcategory of PA,B,C whose
projections are in PcA,B and PcB,C , and similarly for PcA,B,C,D .
We then check that the morphisms factor through the constrained categories. For projections δ1 ∶ PcA,B,C → PA,C , this is [46, Proposition 3.4.3] forP -visibility; the implicit proof of [78, Lemma 3.2.4] handles well-bracketing;well-threadedness follows similarly to P -visibility. For insertions, we easily reduce to showing that it is the case for ι0 ∶ PcA → PA,A , which is true by definitionof PcA (note that PcA = PA except when c contains well-bracketing). This yields
the desired category-valued presheaf.
It remains to show that it forms a game setting. Projections δ1 are discrete
fibrations because all involved constraints are stable under prefix, so our candidate restriction, defined exactly like in the previous section, is indeed in PA,B,C .
We then want to show that constrained plays satisfy zipping. But constraints
are merely imposed on the projections of interaction sequences, and thus areclearly stable under zipping. The case of copycat squares is similar.
Corollary 6.3.9. For all sets of constraints in {P -vis, wb, wt}, arenas andstrategies satisfying these constraints form a category.
Note that we have not claimed that composition in these game settings agrees
with composition in our setting for basic HON games. We will show that they
do indeed agree later.
Remark. One could think of treating O-visibility the same way, but this fails
for the following reason. The play s on the pair of arenas (A, A) pictured on
the left below is O-visible, so we would need its right projection δ0 (s) to be in
PcA , or our composition will fail to be unital, because the copycat play ι0 (δ0 (s))
would not be in PA,A . Unfortunately, that copycat play, which we have drawn
on the right below, is not O-visible, so δ0 (s) cannot be in PcA either...
m

m

m

m
m

m

m

m
m

m

m

m

m

m′

′

m′

m′

m′

m′
m′

m′
226

At this point, we could consider O-visibility only when plays are already P visible, which may help (indeed, notice that our example of s is not P -visible).
Proposition 6.3.10. Each set c ⊆ {P -vis, O-vis, wb, wt} of constraints containing P -vis gives rise to a game setting Pc and an embedding c∶ Pc ↪ P of
category-valued presheaves.
Proof. The construction is the same as for Proposition 6.3.8. The implicit proofof [78, Lemma 3.2.4] shows that projections δ1 ∶ PcA,B,C → PA,C factor through
PcA,C . Because copycat strategies are identities for composition, ι0 ∶ PcA → PA,A
factors through PcA,A . From this, we get that all projections and insertions
factor through the constrained categories.
Beyond the constraints mentioned above, a similar result may be proved
for the refined notion of game in McCusker’s thesis [78]. Remember that McCusker’s games A are just like arenas, except that they come equipped with
an abstract validity predicate PA , which is a subset of the set LA of legal plays(P -visible, O-visible, well-bracketed plays), respecting some conditions (see Section 2.1.2 for more details). McCusker then defines PA⊸B to consist of legal
plays in LA⊸B whose projections to A and B are in PA and PB (instead ofsimply LA and LB ), respectively. He finally proceeds in a similar way to defineinteraction sequences and generalised interaction sequences.
In order to organise McCusker’s games into a game setting, we should use
as a base not mere arenas, but the set Ap of pairs (A, PA ) of an arena anda predicate on legal plays satisfying the conditions. From the first projectionp∶ Ap → A, we get the solid part of the cube
!

∆/Ap

1

β
!

∆/A

1
⌜Ap ⌝

α

∆

i

∆

Set

p

i

⌜A⌝

Set.

We thus derive a functor ∆/p∶ ∆/Ap → ∆/A as the dashed arrow by universal property of comma, and for any L ∈ (∆/Ap ), we define PpL to be the fullsubcategory of P(∆/p)(L) spanning plays whose projections satisfy the requiredpredicates. We thus obtain:
Proposition 6.3.11. The pair (Ap , Pp ) forms a game setting.
Proof. The insertions and projections are obviously well-defined. As before,
copycat plays form a full subcategory of PA,A , so insertions are discrete fibrations, and projections are discrete fibrations because validity predicates arestable under prefix. It only remains to show that zipping and copycat holds,
which again follows from PA⊸B being only about projections to A and B.
Corollary 6.3.12. Games and strategies form a category.

227

Beyond this result, we would like to prove that composition and identity inthe constrained game settings agree with the original, which is what we will now
prove.
Definition 6.3.13. Given game settings (A, P) and (B, Q), a morphism between
them consists of a pair of a map f ∶ A → B and a natural transformation(∆/f )op(∆/A)op(∆/B)op

α
P

Cat.

(6.6)

Q

We will denote such a morphism by α∶ P → Q ⋅ f .
⋀⋀In such a situation, the functor ∑αA,B ∶ PA,B → Qf (A),f (B) maps strategies inthe sense of (A, P) to strategies in the sense of (B, Q). Let us prove that under
mild hypotheses this functor commutes with composition.
Definition 6.3.14. We say that a tuple (A, P, f, α) as above forms a local
morphism on (B, Q) when
• for all A, B in A, αA,B ∶ PA,B → Qf (A),f (B) is a discrete fibration and−1−1−1• for all u ∈ Qf (A),f (B),f (C) , αA,B,C(u) ≅ αA,B(δ2 (u)) × αB,C(δ0 (u)).

Example 6.3.15. In any constrained setting, we have a local morphism αc ∶ Pc →c
P where αL∶ PcL → PL is given by inclusion. Similarly, we have a local morphismp p
α ∶ P → P ⋅ p given again by inclusion (where, we recall, p is the functor Ap → A
that forgets the predicate). Indeed, in both settings, all αL ’s are inclusions,hence full embeddings of prefix orderings, and being an interaction sequence isall about the projections being plays, so the second point is verified as well.
Lemma 6.3.16. A morphism (f, α) as in (6.6) whose components are discrete fibrations is a local morphism if and only if ∂ ∗ (α(A,B),(B,C) ), the presheaf induced by the discrete fibration P(A,B),(B,C) ↪ Q(f (A),f (B)),(f (B),f (C)) isa sheaf for the Grothendieck topology induced by the embedding Qf (A),f (B) +Qf (B),f (C) ↪ Q(f (A),f (B)),(f (B),f (C)) .
Proof. Let us denote by A′ the game f (A), etc, and by l and r the embeddings
of QA′ ,B ′ and QB ′ ,C ′ into Q(A′ ,B ′ ),(B ′ ,C ′ ) . Let us assume that the morphism
is local. To show that ∂ ∗ (α(A,B),(B,C) ) is a sheaf, let us consider an object cof Q(A′ ,B ′ ),(B ′ ,C ′ ) , a sieve S covering it, and a matching family, and show that
there is a unique amalgamation. If c is of the form l(−) or r(−), then S necessarily contains the identity, so there is indeed a unique amalgamation. If c isof the form m(w), then S must contain λw and ρw . In particular, any matching family x− thus contains an element pA,B above l(δ2 (w)) and an element
pB,C above r(δ0 (w)). These elements are such that αA,B (pA,B ) = δ2 (w) andαB,C (pB,C ) = δ0 (w), so because α is local, we get a unique element uA,B,C suchthat αA,B,C (uA,B,C ) = w, which is exactly an element above m(w), which wetake as our candidate amalgamation. Proving that it is the unique amalgamation is then routine.
Conversely, if ∂ ∗ (α(A,B),(B,C) ) is a sheaf, then the unique amalgamation−1−1−1
gives the isomorphism between αA,B,C(u) and αA,B(δ2 (u)) × αB,C(δ0 (u)).
228

In order to explain the discrete fibredness hypothesis, consider the case of aset of constraints c, and imagine that there exists some interaction sequence u
in PA,B,C , but not in PcA,B,C , such that δ2 (u) and δ0 (u) are in the respective
essential images of PcA,B and PcB,C , say as α(p1 ) and α(p2 ). Further assumingthat σ and τ accept p1 and p2 , m(∑α (σ), ∑α (τ )) clearly accepts δ1 (u), while∑α (mα (σ, τ )) does not, because the interaction sequence which could witness
it lies outside Pc (assuming that no interaction sequence from Pc projects to
δ1 (u)).
Proposition 6.3.17. For any local morphism α∶ P ↪ Q ⋅ f , the following squarecommutes up to isomorphism.
⋀⋀

PA,B × PB,C

⋀

mA

PA,C

∑αA,B × ∑αB,C

∑αA,C

⋀ ⋀

Qf (A),f (B) × Qf (B),f (C)⋀mB

Qf (A),f (C)Proof. By Proposition 6.2.16, the result reduces to the commutation of
PA,B + PB,C∏∑

QA′ ,B ′ + QB ′ ,C ′P(A,B),(B,C)∆

PA,B,C∑∏

Q(A′ ,B ′ ),(B ′ ,C ′ )∑∑∆QA′ ,B ′ ,C ′

PA,C
∑

∑

QA′ ,C ′up to isomorphism, where A′ = f (A) and so on. The right-hand square commutes up to isomorphism because the underlying square does, the middle one
commutes by Lemma 2.2.70, and the left-hand one by Lemmas 6.3.16 and 6.1.2.
Corollary 6.3.18. For all set of constraints c, composition in Pc commuteswith embedding into P. Similarly, composition in Pp commutes with embedding
into P.
There are other kinds of constraints like innocence or single-threadedness,
which may not be treated this way. We will deal with innocence in Section 6.4.

6.3.3

AJM Games: a Partial Answer
Required: 6.2.4, 2.1.4.
Recommended: 6.3.1.

Let us now consider the alternative approach to game semantics that are
AJM games [6] (see Section 2.1.4 for more details). On the one hand, thisapproach is more elementary than HON games in that games do not feature
justification pointers. On the other hand, games feature a partial equivalence
relation between plays, which needs to be dealt with at the level of strategies.
In order to organise such games into a game setting, we have two sensible
choices for the notion of morphism between plays: beyond the prefix ordering,
we may also incorporate equivalence between plays. Presheaves then amount toso-called saturated strategies.
The definitions of PA and PA,B are done exactly as explained in Section 2.1.4.
However, we need to slightly change the definition of PA,B,C for it to fit in our229

setting. Indeed, if we take PA,B,C to be the set of all sequences in MA +MB +MC
whose projections are plays, then δ1 may not be a discrete fibration: if s is aprefix of δ1 (u) and the last moves of u are in B, then there are several prefixesof u whose projection to (A, C) is s, and all these prefixes form an ordered list ofinteraction sequences, so δ1 cannot be a discrete fibration. Therefore, we define
PA,B,C similarly to HON games: an interaction sequence is a sequence of moves
in MA + MB + MC whose projections are plays and whose last move is in A or
C. We define PA,B,C,D similarly.
Using this definition, we can show that AJM games fit in our framework.
However, this has a cost: we will need to be careful when showing that thecomposition we derive from our framework is the traditional composition in
AJM games.
Proposition 6.3.19. AJM games form a game setting.
Proof. Insertion functors are obviously well-defined. For projections δ1 , it suffices to notice that δ0 (u) and δ2 (u) being plays, their projections are in PA
and PC , so δ1 (u) is a play. Squares (6.3) being pullbacks is once again a slightvariation of the standard zipping lemma. The case of squares (6.4) is treatedexactly like in HON games. To show that projections δ1 ∶ PA,B,C → PA,C are
discrete fibrations, we need to canonically restrict any u ∈ PA,B,C along anys ≤ δ1 (u), which is done just like in HON games.
Proposition 6.3.20. Composition derived from the game setting for AJM
games is isomorphic to traditional composition in AJM games.
⋀⋀

Proof. Let us take two strategies σ ∈ PA,B and τ ∈ PB,C and show that σ; τ
accepts a play p if and only if m(σ, τ ) does.
If m(σ, τ ) accepts p, then there is an interaction sequence u in PA,B,C suchthat δ1 (u) = p and σ accepts δ2 (u) and τ accepts δ0 (u). But then, u is also a
witness that σ; τ accepts p.
Conversely, we know that σ; τ accepts p if and only if there is an interaction
sequence u (but not necessarily in PA,B,C ) that projects to p and whose projections are accepted by σ and τ . Then we define ũ to be the longest prefix of uthat ends either in A or C. We have that ũ is in PA,B,C because its projections
to A and C are equal to those of u, and it is a witness that m(σ, τ ) acceptsp.
For saturated strategies, the idea is to incorporate for all A, B the partial
equivalence relations ≈A and ≈B into the category of plays.
Proposition 6.3.21. AJM games form a category-valued presheaf by mapping
each list of games to the corresponding set of plays with as morphisms between
any two plays u and v:• a singleton when there exists some play w such that u ≈ w ≤ v (or equivalently there exists w such that u ≤ w ≈ v);• none otherwise.
However, the obtained category-valued presheaf is not a game setting because projections PA,B,C → PA,C and insertions PA → PA,A are not discrete230fibrations in general. Indeed, the fibres of PA,B,C → PA,C are proper groupoids
in general, thus making it a non-discrete Grothendieck fibration. The case of
PA → PA,A is worse: the restriction of a play in s ∈ PA along a morphism p → q in
PA,A may at best be mapped to some p′ isomorphic to p in general, thus making
it a Street fibration. Our approach may generalise in this direction, but this will
involve advanced categorical concepts such as stacks (which are to fibrations assheaves are to discrete fibrations), so we leave it for future work.

6.3.4

A Non-Example: Blass Games
Required: 6.2.4, 2.1.5.
Recommended: ∅.

In the previous sections, we have shown that several approaches to gamesemantics form game settings, with the exception of the saturated AJM setting.
It may be instructive to consider Blass’s games [14, 15], as they are well-known
for their non-associative composition. The reader may refer to Section 2.1.5 fordetailed definitions.
For the sake of simplicity, and because it is enough to exhibit a counterexample, let us consider only alternating Blass games, i.e., pairs A = (T, s) of atree T and a starting player s ∈ {O, P }, such that polarity alternates between
O and P . For a Blass game A = (T, s), PA is the set of vertices of T ordered byposition (x ≤ y if x is an ancestor of y in T ), seen as a category. We define PA,B
as the set of vertices of the game A ⊸ B, where Proponent has just played. If
we imagine plays in as both game trees A and B drawn side-by-side, then an
object of PA,B is a pair (x, y) of a vertex of A and one of B that is a child of apair where it was Proponent’s turn to play (i.e., a pair (O, P )). In other words,
they are the pairs (x, y) of vertices in A and B of type (O, O) or (P, P ), except
maybe the initial pair. We define PA,B,C similarly.
These definitions are the natural ones given by Blass games. We cannotchange the definition of PA,B , because that would change the definition ofstrategies, and we want our strategies to correspond to standard strategies inBlass games. Similarly, we cannot easily change the definition of PA,B,C , because this definition is at the very base of our definition of composition. However, with these definition, we cannot have both squares (6.3) be pullbacks ingeneral. Indeed, consider the case where the respective polarities of A, B, C
and D are O, P , O and P , and A is non-empty. Then, let PlA,B,C,D denote theleft-hand pullback and PrA,B,C,D denote the right-hand one. We will show thatboth pullbacks cannot be the same category by exhibiting a play in PlA,B,C,D
which is not in PrA,B,C,D . First, let us observe that the initial polarities fromthe respective points of view of A ⊸ B, B ⊸ C and C ⊸ D are like so:
A
A
P

B
B
P

B
B
O

C
C
O

C
C
P

D
D
P.

Letting a denote any initial move of A, the sequence a is then legal in PA,B,D(the polarities are P P both in A ⊸ B and A ⊸ D) and the empty sequence islegal in PB,C,D . Thus, a is legal in PlA,B,C,D by the left-hand pullback. However, if the two pullbacks were isomorphic, then by the properties of projections231

a ∈ PlA,B,C,D would be mapped to a ∈ PrA,B,C,D under the isomorphism. But
PrA,B,C,D cannot contain a because this play is illegal in PA,B,C (because thepolarity is P O in A ⊸ C).

6.4

Innocence

6.4.1

Concurrent Innocence
Required: 6.2.3, 2.1.3, 2.2.7.
Recommended: ∅.

In the previous sections, we have constructed a category of games andstrategies parameterised over an arbitrary game setting which unifies a number of such categories as instances of the same construction. However, in gamemodels of purely functional languages, the relevant category is the identity-onobjects subcategory of innocent strategies. In this section, we extend gamesettings with a notion of view, which allows us to construct a subcategory of
innocent strategies.
In order to achieve this, we will use the recent recasting of innocence as asheaf condition [51, 50, 97]. Starting from HON games, the first step is to refine
the posets PA , PA,B , and PA,B,C,D into proper categories (with exactly the same
objects), say P+A , P+A,B , and P+A,B,C,D , with the crucial feature that for any playp ∈ P+A,B and index i of a move in p, there is a morphism ⌈p⌉i → p. This of course
does not hold with the prefix ordering, as the view is rarely a prefix. This idea
was introduced in [80] in a slightly different setting.
Passing from P to P+ raises the issue of how to extend the abstract framework. Should it now contain two category-valued presheaves? Or should we
simply forget about prefix-based strategies and accept P+ as the new basic set
up? We do not make any definitive choice here, but for simplicity and modularity reasons, we choose to first work with P+ only, and introduce P in a second
stage.
Indeed, perhaps surprisingly, the approach using simply P+ works for Tsukada and Ong’s model. If we take P+L to be the categories with the same objects
as PL for HON games with the P -visibility constraint, but whose morphisms are
given by block-preserving maps (see Section 2.1.3 for more details), we have:
Proposition 6.4.1. Tsukada and Ong’s P+ forms a game setting.
Proof. This mainly follows from Lemmas 39, 46 and 47 of [96] or is obvious. The
only non-obvious point that is not shown by these lemmas is that the zipping
squares are pullbacks (because Lemma 47 is only about objects). Noticingthat the zipping lemma is all about choosing a good pushout will save us sometrouble. Indeed, if u = (n, f, ϕ) is in PA,B,D and v = (m, g, ψ) is in PB,C,D andtheir projections to (B, D) are equal, they may be represented as the back facesof the cube below, and the zipping w of u and v may be seen as a good choiceof pushout, compatible with pointers, and such that the maps n → q and m → q
are increasing, as in

232

p

m
n
f

MB,D

q

g

MB,C,Dh

MA,B,C,D ,

MA,B,D

where p is the length of δ0 (u). Such a square is a pushout if and only if (i) nand m are jointly surjective and (ii) i in q is in the image of both n and m if
and only if it is in the image of p (because all the relevant maps are monic).
This pushout (or rather, the maps n → q and m → q) is standardly given by thezipping lemma (although it is usually not explained from this point of view).
We are going to build maps n → q and m → q that make the square above a
pushout as is done in the zipping lemma.
One builds n → q and m → q by induction on (n, m), by looking at theswitching automata for PA,B,D and PB,C,D and combining them into the switching automaton for PA,B,C,D . The different automata are as drawn below.
OD

p1

p2

q1

PA

p3

q2

PD

PD
OA

OD

PC
PB

p2

q1

PB

OC

q3

OB

OB
OD

p1 q1

p2 q2
PD

OA

PA

PC

OC

PB

p3 q1

p2 q3
OB

The automata respectively start in state p1 , q1 , and p1 q1 , and to know theantecedents of k + 1 in q, we just keep track of the biggest i in n and j in mthat already have an image as well as the state pq our automaton is in, and,based on that information, choose whether i + 1 or j + 1 (or both) are mapped
to k + 1. An induction invariant is that i and j are such that δ0 (u∣i ) = δ1 (v∣j ).
For example, if the automaton is in the state p1 q1 , then the first automaton
is in state p1 , so the next move in u is either an Opponent move in D or a
Proponent move in A, and the second automaton is in state q1 , so the next
move in v is either an Opponent move in D or a Proponent move in B. But
we know that both projections to (B, D) are equal up to i and j, so if the next
move of u is in D, then so is the next move of v, and that is what the zippingchooses (both i + 1 and j + 1 are mapped to k + 1). Otherwise, the next movein u is a Proponent move in A, and that is what the zipping chooses (only
i + 1 is mapped to k + 1). Pointers in w are inherited from those in u and v(which is well-defined because these pointers agree on (B, D)). To prove thatthe sequence thus defined is the standard zipping of u and v, we need to showthat it is a justified sequence (which is mostly obvious because the pointers are
inherited from u and v) and that its projections to (A, B, D) and (B, C, D) are233

u and v, which is by adhesivity (Lemma 4.2.5). Indeed, both horizontal faces
are pushouts along monos, and the back faces are pullbacks because they are
projections, so the front faces are also pullbacks.
Now, we want to show that the same idea can be used to show that
PA,B,C,D

PA,B,D

PB,C,DPB,D

is a pullback on morphisms as well. The idea is that, if u = (n, f, ϕ) andu′ = (n′ , f ′ , ϕ′ ), a morphism u → u′ is simply a map n → n′ satisfying some
additional conditions. In particular, if we have two morphisms α∶ u → u′ andβ∶ v → v ′ whose projections to (B, D) are equal, then we have a diagram as thesolid part of
p

m
inr
inl

n
p′

q

β

α

m′

γ
inr′

n′
MB,D

f

inl′
g′

q′

h

′

MB,C,Dh′

MA,B,C,D ,

MA,B,D

where γ∶ q → q ′ , obtained by universal property of pushout, is our candidate
morphism from w to w′ . First, let us notice that this is the only possible
choice of γ because inl and inr are jointly surjective. Another point that candirectly be checked is that the projections of γ are indeed α and β (again byadhesivity, as above). Therefore, the only thing left to show is that γ is amorphism from w to w′ , which means that it is injective, compatible with hand h′ , pointers, and maps basic blocks to basic blocks. The first point is
by extensivity (Lemma 4.2.6). The second is by uniqueness in the universal
property of q. For compatibility with pointers, if we call χ the pointer function
w inherits from α and β (and similarly χ′ for w′ ), inl and inr being jointly
surjective, we may compute, for moves i in A + PB + D (i.e., for moves i suchthat i and ϕ(i) are in A + B + D)γ(χ(inl(i))) = γ(inl(ϕ(i)))

by definition of χ

= inl (α(ϕ(i)))′= inl′ (ϕ′ (α(i)))= χ′ (inl′ (α(i)))

by definition of χ′= χ′ (γ(inl(i))),where the penultimate equality comes from the fact that the definition of χ′ only′
depends on the state of the automaton and the “types” of u′i+1 and vj+1
, and theexistence of α and β ensure that we are in the same state of the automaton when234

building k + 1 (in w) and γ(k + 1) (in w′ ). A similar computation shows that γ
also preserves pointers for moves of the form inr(j) for moves in B + C + D.
Finally, we must show that γ preserves basic blocks, i.e., that if h(k) is
in PA + MB + MC + OD , then γ(k + 1) = γ(k) + 1. Each k corresponds to anarrow in the switching automaton, which is the arrow taken while building h.
In the switching automaton on (A, B, C, D), the horizontal arrows correspondto steps in the construction of h where k has an antecedent in n and one in m(and they correspond to certain pairs of arrows in both switching automata),
the left-hand side ones correspond to steps where k only has an antecedent in
n (and to certain arrows of the switching automaton on (A, B, D)) and theother ones to steps where k only has an antecedent in m. Consider any k suchthat h(k) is in PA + MB + MC + OD . It corresponds to one of the arrows, butcannot be the OA or PD arrows. If it corresponds to an arrow that points
to one of the right-hand states, we know that k has an antecedent j in m,
and we have γ(k + 1) = γ(inr(j) + 1) = γ(inr(j + 1)) because all arrows fromsome right-hand state come from the switching automaton on (B, C, D), so
we know the next move also has an antecedent in m. But β preserves basic
blocks and g(j) = h(inr(j)) = h(k) is in PB + C + OD (because we only took thearrows that point to one of the right-hand states), so β(j + 1) = β(j) + 1. Now,
because k corresponds to an arrow that points to a right-hand state, we knowthat the next arrow also comes from the switching automaton for (B, C, D),
so inr′ (β(j) + 1) = inr′ (β(j)) + 1. This finally gives the desired result because
inr′ (β(j)) = γ(inr(j)). The proof is similar when we take one of the arrows thatpoint to one of the left-hand states.
Returning to the abstract setting, the new data thus merely consists of a fullsubcategory iA,B ∶ VA,B ↪ PA,B , for all A, B, whose objects are called views.
Definition 6.4.2. The category of innocent strategies is the essential image of∏iA,B ∶ VA,B → PA,B (or equivalently the category of sheaves for the Grothendiecktopology induced by iA,B , by Lemma 2.2.84). The domain VA,B is the categoryof behaviours.
⋀⋀⋀

We now would like to establish that in any game setting equipped withsuch full embeddings, innocent strategies form a subcategory. However, ourproof relies on two additional properties. The first one, already observed in [97,Lemma 32], states that one can reconstruct uniquely any interaction sequence
from its projection to PA,C , say u, together with a compatible family, indexed by
all views v of u, of interaction sequences projecting to v. The second property
essentially says that any morphism v → δ2 (u) from a view v ∈ VA,B to theprojection of some interaction sequence u ∈ P+A,B,C factors canonically throughδ2 (w) of some interaction sequence w whose projection δ1 (w) is a view (andsimilarly for δ0 ).
Let us introduce both properties in more detail.
The first property essentially says that interaction is local. The projection PA,B,C → PA,C , as a discrete fibration, induces a presheaf ∂ ∗ (δ1 ) on PA,C
which we will require to be in the essential image of ∏iA,B ∶ VA,C → PA,C . By
Lemma 2.2.84, this is equivalent to requiring that ∂ ∗ (δ1 ) be a sheaf for theGrothendieck topology induced by the embedding iA,C . Similarly, we require
⋀

235

⋀

the presheaf induced by ι0 ∶ PA → PA,A to be a sheaf for the Grothendieck topology induced by the embedding VA,A → PA,A . Let us record this as:
Definition 6.4.3. A game setting (A, P) equipped with full embeddings iA,B
from VA,B to PA,B is local if and only if ∂ ∗ (δ1 ) and ∂ ∗ (ι0 ) are sheaves.
Proposition 6.4.4. Tsukada and Ong’s P+ is local.
Proof. For δ1 , the result is precisely [97, Lemma 32]. For ι0 , just observe thata play is copycat if and only if all its views are.
So locality is the first property we need to require of our game settings withviews. The second property has to do with projections, e.g., δ2 ∶ PA,B,C → PA,B .
It essentially says that any morphism v → δ2 (u) with v ∈ VA,B and u ∈ PA,B,C
factors “canonically” through some δ2 (w) with w ∈ VA,B,C , where VA,B,C is thepullback
VA,B,C

PA,B,C
δ1

VA,C

iA,C

PA,C .

In order to define such canonicity, we appeal to the theory of analytic functors [59, 98, 99].
Definition 6.4.5 (Weber [98, 99]). A functor T ∶ C → D admits generic factorisations relative to an object d ∈ D if and only if any f ∶ d → T c admits afactorisation as below left
d
g

Ta

d
f

Th

g

Tc

Ta

g′
Tk

Th

Tb
T h′

Tc

such that for all commuting squares as the exterior above right, there exists a
lifting k as shown such that g ′ = T k ○g and h = h′ k. The middle object a is called
the arity of f – all generic factorisations share the same a up to isomorphism.
For all subcategories B ↪ C and E ↪ D, a functor C → D admitting generic factorisations relative to all objects of E with arities in B is called (B, E)analytic [39].
Definition 6.4.6. A game setting (A, P) equipped with full embeddings iA,B
from VA,B to PA,B is view-analytic when δ2 is (VA,B,C , VA,B )-analytic and δ0is (VA,B,C , VB,C )-analytic.
Proposition 6.4.7. Tsukada and Ong’s game setting [97] is view-analytic.
The following proof is due to Takeshi Tsukada (private communcation):
Proof. Let us take a play u = (n, f, ϕ) in PA,B,C , a view v = (p, g, ψ) in VA,B ,and a morphism α∶ v → δ2 (u). We want to show that there exists w in PA,B,C
whose projection δ1 (w) is in VA,C and morphisms β∶ v → δ2 (w) and γ∶ w → usuch that α = δ2 (γ) ○ β. We further want that, for any other such w′ , β ′ , and γ ′ ,236there exists a morphism ζ∶ w → w′ such that δ2 (ζ) ○ β = β ′ and γ ′ ○ ζ = γ. (Weonly treat the case of δ2 , proving the same properties for δ0 follows exactly thesame pattern.)i
For all i in n, let us define the sequence wA,B,C
of indices of u by induction
as follows:
0
wA,B,C= ε,iwA,B,C={i−1
wA,B,C⋅iϕ(i)wA,B,C ⋅ i

if f (i) is in OA , MB , or PC
if f (i) is in PA or OC .
α(p)Our candidate w will more or less be wA,B,C (this is slightly wrong because it
is not always exactly an interaction sequence). To prove that v embed into w,ii
we also define the families vA,B
and vB,Cof sequences, which are only defined
if f (i) is in MA + MB or MB + MC respectively:
⎧
i
⎪
⎪
⎪ i−1
vA,B ⋅ i
⎪
ϕ(i)
⎪
⎪
⎪
⎩ vA,B ⋅ i
0
vB,C
= ε,
⎪
i
vA,B
=⎨

i
vB,C
={

i−1
vB,C
⋅i
ϕ(i)
vB,C ⋅ i

if f (i) is in OB and f (ϕ(i)) is in MC
if f (i) is in OA or PB
if f (i) is in PA or OB (and f (ϕ(i)) is not in MC ),if f (i) is in OB or PC
if f (i) is in PB or OC .

We now want to prove the following properties as preliminary work towards theresult:α(p)(i) α(v) = vA,B (where α of a sequence is its application to each move in thesequence),iii(ii) for all i in n, vA,B
and vB,C
are previews and included in wA,B,C(when
they are defined),i(iii) for all i in n, wA,B,C
is a pre-interaction sequence (a sequence whose left
and right projections are preplays),i(iv) for all i in n, δ1 (wA,B,C) is a preview.

We prove (i) by induction on the length of v: if v is only one move, then the
result is obvious, otherwise v = v ′ ⋅ m with v ′ = (p′ , g ′ , ψ ′ ) a view. If p′ + 1 iseven, thenα(p′ +1)vA,Bα(p′ +1)−1= vA,B⋅ α(p′ + 1)α(p′ )

by preservation of OP -blocks= α(v)

by induction hypothesis.

= vA,B ⋅ α(p′ + 1)

237

When p′ + 1 is odd, we haveα(p′ +1)vA,Bϕ(α(p′ +1))

⋅ α(p′ + 1)α(ψ(p′ +1))

⋅ α(p′ + 1)

= vA,B= vA,Bα(p′ )= vA,B ⋅ α(p′ + 1)

because all Opponent moves point
to their predecessors in views= α(v)

by induction hypothesis.

ii
For (ii), proving that vA,B
and vB,C
are views is a simple induction on i:it suffices to show that all Opponent moves point to their predecessors, whichiis direct by definition. To prove that they are included in wA,B,C, we proceeediby induction on i. If i is 0, then the result is obvious. Otherwise, if vA,B
isdefined (otherwise there is nothing to prove), then the result is obvious wheniif (i) is in OA , PA , or PB (because vA,B
and wA,B,C
follow the “same” recursive
definition) and when f (i) is in OB and f (ϕ(i)) in MC (because this is theibase case for vA,B). When f (i) is in OB and f (ϕ(i)) is not in MC , then
ϕ(i)

ϕ(i)

i
vA,B
= vA,B ⋅ i ⊆ wA,B,C ⋅ i by induction hypothesis, but δ0 (u) is a play and thusi−1
i, being a Proponent move (in δ0 (u)) must point into ⌈δ0 (u)⌉i−1 = vB,C
(because
i−1
i−1
i−1
vB,C is a view and its last move is i − 1). But then ϕ(i) ∈ vB,C ⊆ wA,B,C by
ϕ(i)

i
i
i
induction hypothesis, so necessarily wA,B,C ⊆ wA,B,C, and finally vA,B
⊆ wA,B,Ci(the case of vB,C is similar).
For (iii), we also proceed by induction on i. The projections are obviously
alternating and justified, and the proof of P -visibility follows directly from (ii).
i
Finally, (iv) is obvious by definition of wA,B,C
since the beginning of eachbasic block points to the end of the preceding one.
We can now put all this together to prove the result. Our candidate w isα(p)wA,B,C , augmented with the moves of the basic block containing α(p) fromα(p) + 1 to the end of the block. By (iii), w is an interaction sequence (itis a pre-interaction sequence, all Proponent moves point into their views inboth projections (same trick as in the proof of (ii)) and it ends in either A or
C because we augmented it with the last moves of the block). Its projection
to (A, C) is a view by (iv), because we only possibly added the last move ofα(p)the last basic block to wA,B,C , and that last move cannot change the view (itis a Proponent move). We choose β∶ v → δ2 (w) to be the obvious morphism
induced by α, which exists by (i) and (ii), and we choose γ∶ w → u to begiven by inclusion. We obviously have that α = δ2 (γ) ○ β. The existence ofthe ζ morphism for any other such decomposition comes from the fact that w
is actually the smallest interaction sequence that is a view when projected to(A, C), is contained in u, and contains v (this is direct from the definition ofiwA,B,C).

We may now state our main result about innocence:
Definition 6.4.8. An innocent game setting is a game setting (A, P) equippedwith full embeddings iA,B ∶ VA,B ↪ PA,B , which is both local and view-analytic.
Theorem 6.4.9. In any innocent game setting, innocent strategies form a subcategory.
238

We prove this theorem in two lemmas. The first states stability of innocence
under composition; the second says that copycat strategies are innocent.
Lemma 6.4.10. In any innocent game setting, the composite of two innocent
strategies is again innocent.
Proof. Because a strategy X, say on (A, B), is innocent if and only if it isisomorphic to ∏iA,B (∆iA,B (X)), it suffices to show that starting from any pairof behaviours [B1 , B2 ] ∈ VA,B + VB,C , if we extend them to innocent strategies,
compose, and eventually apply innocentisation (i.e., ∏iA,C ○∆iA,C ), then the last
step is redundant. In other words, we need to show that the perimeter of⋀

VA,B + VB,C∏

PA,B + PB,C∏∆

P(A,B),(B,C)∆

VA,B + VB,C∏∏

PA,B + PB,C

PA,C

VA,B,C

∑

VA,C

∆

∏

P(A,B),(B,C)

∏

∑

∆
∆

V(A,B),(B,C)∏

VA,B + VB,C

PA,B,C∆

PA,B,C∏∑

PA,C

commutes up to isomorphism. We proceed by showing that innocentisation isredundant at every intermediate step, but this requires us to define intermediate
categories of views adequately. In particular, to define V(A,B),(B,C) , consider
first the lax colimit C of PA,B ← VA,B,C → PB,C , and then restrict it to its fullsubcategory spanning objects from VA,B,C , VA,B , and VB,C .
Returning to our claim, the top-left square commutes by Lemma 2.2.68, thetop square because the underlying diagram commutes, the top-right square by
Lemma 2.2.70, the bottom-left square because the underlying diagram commutes, and the bottom-right one by locality and Lemma 6.1.2.
Let us finally show that the bottom square is exact, using the zigzag criterion
and view-analyticity. Let us take v in V(A,B),(B,C) , uA,B,C in PA,B,C , and amorphism f ∶ v → m(uA,B,C ) in P(A,B),(B,C) . If v has the form m(vA,B,C ), thenthe zigzag criterion holds directly by taking vA,B,C . Otherwise, if v is of the form
λuA,B,Cl(f0 )l(vA,B ), then f is of the form l(vA,B ) ÐÐÐ→ l(δ2 (uA,B,C )) ÐÐÐÐÐ→ m(uA,B,C ),which factors through some l(δ2 (vA,B,C )) by view-analyticity, and the zigzag
criterion holds. The proof is similar if v is of the form r(vB,C ).
We finally prove innocence of identities:
Lemma 6.4.11. Copycat strategies are innocent.
Proof. We proceed as for preservation of innocence by composition: by showingthat copycat is the same as copycat followed by innocentisation. This yields thediagram
∅

∏

∅

∏

PA

∑

∆

∆

VA

∑

∏

VA,A
∏

∏

∅

PA,A

PA

239

∑

PA,A ,

where VA is defined as the marked pullback. The bottom-left square commutes
because underlying functors do, the top-left one commutes by Lemma 2.2.68,
the bottom-right one commutes by locality and Lemma 6.1.2, and the top-rightone by Lemma 2.2.70.

6.4.2

Prefix-Based Innocence
Required: 6.4.1.
Recommended: ∅.

In the previous section, we have shown that innocent strategies behave wellin any innocent game setting. However, our only concrete example of an innocent game setting for now is Tsukada and Ong’s P+ . There is in fact a further
example, given by enriching arenas with bracketing information and restricting P+A,B to well-bracketed plays [97, Section VII]. This shows that innocence isstable under cg-composition. But we are also interested in pb-composition of innocent strategies, since most of the examples are of this form. As mentioned before, innocence is not stable under pb-composition in general [46, Section 3.7.2],
unless one restricts to deterministic strategies. In an attempt to better understand this phenomenon, we first move in this section from cg-composition to
pg-composition, and prove that innocence remains stable there. In the next section, we will explain why this does not carry over to pb-composition, although,as is well-known, it does on deterministic strategies.
We proceed by first defining innocent pg-strategies in an extended frameworkand then showing that our definition extends the standard one. We then showthat pg-innocent strategies include copycats and are closed under composition.
Definition 6.4.12. Consider game settings (A, P+ ) and (A, P) with the same
set of arenas and V making P+ innocent, further equipped with a componentwise
identity-on-objects natural embedding k∶ P ↪ P+ such that each iA,B ∶ VA,B ↪
P+A,B factors through kA,B . Let a presheaf on PA,B be innocent via P+ , or P+ ⋀

∏iA,B

⋀

∆kA,B

innocent, if and only if it is in the essential image of VA,B ÐÐÐ→ P+A,B ÐÐÐ→⋀PA,B . Similarly, let a presheaf on PA,A be P+ -copycat if and only if it is in the
⋀

∑ι0

⋀

∆kA,A

⋀

essential image of 1 ≅ ∅ Ð→ P+A ÐÐ→ P+A,A ÐÐÐ→ PA,A .
⋀∏!

In such a setting, one could consider studying (V, P) directly. However, it
will rarely form an innocent game setting (essentially only when k is an isomorphism).
Example 6.4.13. Let us take the classical HON setting with P -visible plays,
which only differs from Tsukada and Ong’s setting by its morphisms. A matching family for a play p in PA,C is then the data, for all views v that are a prefixof p, of an interaction sequence uv that projects to v, and such that uv is a prefixof uv′ when v is a prefix of v ′ . Matching families for p are thus isomorphic tointeraction sequences that project to the longest prefix of p that is a view. If∂ ∗ (δ1 ) were a sheaf, it would mean that there is a single way to amalgamate
matching families. In other words, for all plays p and interaction sequence uvthat projects to the longest prefix v of p that is a view, there should be a unique uthat projects to p and that admits uv as a prefix, which is clearly false in general.
240

Let us now state the transfer result.
Proposition 6.4.14. In the setting of Definition 6.4.12, if all naturality squares
PA,B,C

PA,C

P+A,B,C

P+A,C

PA

PA,A

P+A

P+A,A

and

are pullbacks, then P+ -innocent strategies are closed under composition and comprise P+ -copycat strategies, which are exactly copycat strategies.
Proof. We proceed as in the previous section: we first need to show that theexterior of the following diagram commutes up to isomorphism
PA,B + PB,C∏

P(A,B),(B,C)∆

VA,B + VB,C

∏

∆

∆

P+A,B + P+B,C∏

PA,B,C∑∆

P+(A,B),(B,C)∆

P+A,B,C

PA,C
∆

∑

P+A,C

∆

∆

(Theorem 6.4.9)

VA,C∏

VA,B + VB,C∏

P+A,B + P+B,C∏

P+(A,B),(B,C)

∆

∆

∆

PA,B + PB,C∏

P+A,B,C∑∆

P(A,B),(B,C)∆

PA,B,C

P+A,C∆∑

PA,C ,

where the diagram should be read starting from VA,B + VB,C . Indeed, the top
path corresponds to composition of two P+ -innocent strategies followed by innocentisation, while the bottom one simply corresponds to composition. Because
the triangle and top square commute (because the underlying diagrams do) andthe bottom part of the diagram is exactly the same as the top one, by Theorem 6.4.9, this reduces to exactness of the top-left and top-right squares. The
former follows by construction of P+(A,B),(B,C) , using the zigzag criterion. The
latter follows by discrete fibredness of P+A,B,C → P+A,C and the square being apullback, using Lemma 2.2.70.
The fact that copycat strategies are P+ -innocent amounts to commutation
of
∅

∏

P+A

∑

∆

∅

∏

P+A,A
∆

PA

∑

PA,A

up to isomorphism. The left-hand square is exact by Lemma 2.2.71 and theright-hand one is by Lemma 2.2.70, so the diagram commutes. This also shows241that P+ -copycat strategies are all copycat strategies, so they are exactly theunits of composition.
Of course, we have:
Proposition 6.4.15. Both hypotheses are satisfied in the case of HON gameswith P -visibility, with P+ being Tsukada and Ong’s games.
Proof. This is simply because morphisms in HON games are exactly morphisms
in Tsukada and Ong’s games that are also prefixes.
We will see in the next section why this notion of P+ -innocence indeed makes
sense for HON games by showing that boolean P+ -innocent strategies are exactly
traditional innocent strategies of HON games.

6.4.3

Boolean Innocence
Required: 6.4.2.
Recommended: ∅.

We finally consider boolean innocence. Let us start by showing that thenotion of P+ -innocence indeed makes sense, since boolean P+ -innocent strategies
correspond to traditional innocent strategies in HON games (where boolean P+ innocence and copycats are the obvious boolean counterparts to P+ -innocenceand copycats).
Proposition 6.4.16. A strategy in the standard HON sense is innocent if andonly if it is boolean P+ -innocent for Tsukada and Ong’s P+ . It is copycat if andonly if it is boolean P+ -copycat.
Proof. A boolean P+ -innocent strategy is (isomorphic to) the image of a behaviour B in VA,B through ∆kA,B ○ ∏iA,B . Let us compute this on a play p:∆kA,B (∏iA,B (B))(p) = ∏iA,B (B)(kA,B (p))≅∫

v∈VA,B≅[i(v),kA,B (p)]⋀ B(v) A,B≅

B(v)[iA,B (v),kA,B (p)]because 2 is an orderv∈VA,B⋀B(v)because 0∅ = 1,f ∶iA,B (v)→kA,B (p)which means that the strategy accepts p if and only if it accepts all of the views
v that map into p, which is exactly the traditional definition of an innocent
strategy. Conversely, any innocent strategy is isomorphic to ∆kA,B ○ ∏iA,B ○∆jA,B
of itself (where jA,B ∶ VA,B → PA,B is the functor such that iA,B = kA,B jA,B )because this functor does not change the value of presheaves on views, and theresult accepts a play if and only if it accepts all of its views, just like the strategy
we started from. The case of copycats is similar.
As mentioned before, innocent boolean strategies are not closed under composition. One usually either imposes a further determinism constraint, or relaxes
the innocence constraint. It might be instructive to see how trying to derive the242boolean case from the set-based one using our methods directly points to the
problem.
Indeed, suppose given any innocent game setting (A, P, V, i). We would liketo show that two boolean polynomial functors, say::

P1 , P2 ∶ VA,B + VB,C → PA,C

coincide. Here P1 is right extension to plays followed by composition and P2 isthe same, followed by innocentisation, i.e., restriction to views followed by right
extension to plays. (Let us note in passing that the arguments we are goingto give directly apply to the case where, instead of an innocent game setting(A, P, V, i), we have an innocent game setting equipped with a subcategory ofjkplays (A, V Ð→ P Ð→ P+ ) and study P+ -innocent boolean strategies.) A firstattempt to show this would be to show that⋀

VA,B + VB,C

Pi

⋀

PA,C

l!

l!

:

VA,B + VB,C

:

PA,C

Pi

commutes (where, remember, l! is as in Proposition 6.2.20), like when we deduced from associativity and unitality of composition of set-based strategies
that composition of boolean strategies is also associative and unital. However,this does not hold because ∏iA,B is not in the class of functors that commute
with l! in general.
A second attempt is to show that each Pi factors as⋀

VA,B + VB,C

Pi

⋀

PA,C

r!

l!

:

VA,B + VB,C:

PA,C .

Pi

Then because we have already shown that P1 ≅ P2 , we would automatically get
P1 ≅ P2 as desired.
Now, both functors have the form
: Q : ∑ δ1

: R :→ PA,B,C ÐÐ→ PA,C Ð
VA,B + VB,C Ð→ PA,C ,where Q and R are only composed of ∆s and ∏s. One can show that ∏s and∆s commute with r! , so we may hope to prove the desired factorisation like so:⋀

VA,B + VB,C

Q

PA,B,C

VA,B + VB,C

r!

Q

∑δ1

?

:

PA,B,C

⋀

PA,C
r!
:

∑δ1

R

PA,C

⋀

PA,C
r!

R

:

PA,C

l!

∼

r!
:

⋀

:

PA,C

where the right triangle commutes up to isomorphism because l! ⊣ r! is a reflection. (We could try other factorisations, by changing where we insert thecounit of l! ⊣ r! , but for P2 , both Q and R contain a ∏ functor, which means
243

that they cannot commute to l! .) The only problematic square is the marked
one. And indeed, if the considered boolean strategies, say X1 and X2 , are nondeterministic, then ∑δ1 (r! (Q[X1 , X2 ])) may accept some p ∈ PA,C in more than
one way (see [46, 3.7.2]), which readily makes it non-isomorphic to any presheaf
in the image of r! .
Remark. Exactly the same argument explains why boolean composition cannot
agree with set-based composition in general (as was noted in Remark 6.2.4).
Standardly, the problem is overcome by restricting to deterministic strategies,
for which the marked square commutes.
Finally, we proceed similarly in the case of copycat strategies. In this case,the problematic square
⋀

PA

∑ ι0

r!

PA,A
r!

:

PA

⋀

:

∑ ι0

PA,A

does commute, because the involved colimits are coproducts which are either
empty or singleton:
Proposition 6.4.17. In any innocent game setting (A, P, V, i), boolean copycat
strategies are innocent. This extends to the setting of Proposition 6.4.14, sothat, as is standard, copycats are innocent pb-strategies.
Proof. For any behaviour B and play p, because ι0 is a discrete fibration, we
have ∑ι0 (r! (B))(p) ≅ ∑ι0 (s)=p r(B(s)) by Lemma 2.2.27, which is non-empty if
and only if there is an s in PA such that ι0 (s) = p and B(s) = 1. We also havesr! (∑ι0 (B)) (p) ≅ r (∫ B(s) ⋅ [p, ι0 (s)]), which is non-empty if and only if there
is an s in PA equipped with a morphism f ∶ p → ι0 (s) and such that B(s) = 1.
By discrete fibredness of ι0 , both conditions above are equivalent. Therefore,
commutation of the diagram above reduces to showing that ∑ι0 (r! (B))(p) iseither empty or a singleton, which is direct from the formula given above.

6.5

Perspectives

We have introduced game settings and their innocent variant, a categoricalframework for game semantics, aiming at unifying existing game models andfacilitating the construction of new ones. Under mild hypotheses, we get categories of games and strategies in an abstract way, and, under further hypotheses,a category of games and innocent strategies. We have shown how this may be
extended to categories with fewer morphisms and to boolean strategies, andhow composition in all these different settings are related. We have shown thatmany traditional and recent models fit in this setting, and also exhibited some
limitations of game settings (games where composition is not associative andcomposition of boolean innocent strategies).
A lot remains to be done, starting with the incorporation of further instances.
The saturated view of AJM games (Section 6.3.3) seems at hand, but will involve244

significantly more advanced category theory, as Street fibrations and stacks will
replace discrete fibrations and sheaves. We would first need to generalise thelemmas of exactness from fibrations to Street fibrations, which should prove very
easy, but the tougher part would be to prove that local pushforward squares(with a Street fibration) are distributive. Indeed, our current method uses theadjoint equivalence between presheaves and discrete fibrations, and it is notclear whether this would work with Street fibrations.
A less obvious direction is the treatment of more exotic game models [5,80, 81, 84, 83, 47, 92, 21], notably those based on event structures. It also
seems that strategies may compose in our game model (defined in Chapter 5),
based on the proof of Proposition 6.4.7. So maybe our game model also fits thisframework.
Another direction is categorification: instead of reasoning up to isomorphism, we could refine our point of view and prove that games and strategies infact form a bicategory, as, e.g., in [92].
We also plan to go beyond mere categories of games and strategies andconstruct structured categories of various kinds, depending on the consideredlanguage. These could be, e.g., cartesian closed, symmetric monoidal closed,
linear, or Freyd categories. Indeed, proving that we have a category of games
and strategies is actually a weak result if we want to interpret any serious
language in it. This brings us to another research direction: beyond gamemodels, we should investigate game semantics, i.e., the correspondence with
operational semantics, as initiated in [27] in a different setting.
Beyond the realm of game semantics itself, we have the following formulafor composition:(σ; τ )(p) = ∑δ1 (∏∇ (∆δ2 +δ0 ([σ, τ ])))(p)
≅∫
≅∫

u
u

∏∇ (∆δ2 +δ0 ([σ,τ ]) )(u) × [p, δ1 u]σ(δ2 (u)) × τ (δ0 (u)) × [p, δ1 u],which looks awfully like Day convolution. Indeed, it seems like this could be
written as(σ; τ )(p) ≅ ∫(p1 ,p2 )∈PA,B ×PB,C

σ(p1 ) × τ (p2 ) × Pop
A,C (p1 ⊗ p2 , p)

where ⊗ is a kind of object that represents the hiding of p1 and p2 along B if they
coincide, and some “error” element otherwise. The idea is that, in some cases(e.g., simple games), we have that PA,B,C ≅ PA,B ×PB PB,C , so each interaction
sequence u is actually given by a pair (p1 , p2 ) with p1 in PA,B and p2 in PB,C ,in which case the formula above makes sense. For it to make sense in general
seems to require a slight generalisation of Day convolution from the context of
monoidal categories to a broader one: indeed, we want to take the objects p1
and p2 in different categories, and the tensorial product lands in yet anothercategory.

245

Bibliography[1] LICS 2015. Proc. 30th Symposium on Logic in Computer Science, 2015.
IEEE.
[2] Samson Abramsky. Sequentiality vs. concurrency in games and logic. Mathematical Structures in Computer Science, 13(4):531–565, 2003.
doi: 10.1017/S0960129503003980.
URL https://doi.org/10.1017/
S0960129503003980.
[3] Samson Abramsky and Radha Jagadeesan. Games and full completenessfor multiplicative linear logic. Journal of Symbolic Logic, 59(2):543–574,
1994.
[4] Samson Abramsky and Radha Jagadeesan. A game semantics for genericpolymorphism. Annals of Pure and Applied Logic, 133(1-3):3–37, 2005.
[5] Samson Abramsky and Paul-André Melliès. Concurrent games and fullcompleteness. In LICS, pages 431–442. IEEE, 1999. doi: 10.1109/LICS.
1999.782638.
[6] Samson Abramsky, Radha Jagadeesan, and Pasquale Malacaria. Full abstraction for PCF. Information and Computation, 163(2):409–470, 2000.
doi: 10.1006/inco.2000.2930.
[7] Samson Abramsky, Dan R. Ghica, Andrzej S. Murawski, C.-H. Luke Ong,and Ian D. B. Stark. Nominal games and full abstraction for the nu-calculus.
In Logic in Computer Science, 2004. Proceedings of the 19th Annual IEEE
Symposium on, pages 150–159. IEEE, 2004.
[8] Jean-Marc Andreoli. Logic programming with focusing proofs in linear
logic. Journal of Logic and Computation, 2(3):297–347, 1992. doi: 10.1093/
logcom/2.3.297. URL http://dx.doi.org/10.1093/logcom/2.3.297.
[9] Patrick Baillot, Vincent Danos, Thomas Ehrhard, and Laurent Regnier.
Believe it or not, AJM’s Games Model is a Model of Classical Linear Logic.
In LICS, pages 68–75. IEEE, 1997. ISBN 0-8186-7925-5. doi: 10.1109/
LICS.1997.614933.
[10] Paolo Baldan, Andrea Corradini, Tobias Heindel, Barbara König, andPaweł Sobociński. Processes and unfoldings: concurrent computations inadhesive categories. Mathematical Structures in Computer Science, 24(4),2014. doi: 10.1017/S096012951200031X.

246

[11] Henk Barendregt. The lambda calculus: its syntax and semantics. Studies
in logic and the foundations of Mathematics, 1984.
[12] Gérard Berry and Gérard Boudol. The chemical abstract machine. In Proc.
17th International Symposium on Principles of Programming Languages,
pages 81–94, 1990. doi: 10.1145/96709.96717.
[13] Gérard Berry and Pierre-Louis Curien. Sequential algorithms on concrete
data structures. Theoretical Computer Science, 20(3):265–321, 1982.
[14] Andreas Blass. Degrees of indeterminacy in games. Fundamenta Mathematica, LXXVII:151–162, 1972.
[15] Andreas Blass. A game semantics for linear logic. Annals of Pure andApplied Logic, 56(1–3):183–220, 1992. doi: 10.1016/0168-0072(92)90073-9.
[16] Pierre Boudes. Thick subtrees, games and experiments. In TLCA,
volume 5608 of LNCS, pages 65–79. Springer, 2009. doi: 10.1007/
978-3-642-02273-9_7.
[17] Aldridge K. Bousfield. Constructions of factorization systems in categories.
Journal of Pure and Applied Algebra, 9(2-3):287–329, 1977.
[18] Nathan J. Bowler. A unified approach to the construction of categories ofgames. PhD thesis, University of Cambridge, 2011.
[19] Aurelio Carboni, Stephen Lack, and Robert F. C. Walters. Introduction toextensive and distributive categories. Journal of Pure and Applied Algebra,
84(2), 1993.
[20] Simon Castellan, Pierre Clairambault, and Glynn Winskel. Concurrent
Hyland-Ong games. GaLoP, 2014.
[21] Simon Castellan, Pierre Clairambault, and Glynn Winskel. The parallel
intensionally fully abstract games model of PCF. In LICS 2015 [1].
[22] Pierre Clairambault. Strong functors and interleaving fixpoints in gamesemantics. RAIRO - Theor. Inf. and Applic., 47(1):25–68, 2013. doi: 10.
1051/ita/2012028. URL https://doi.org/10.1051/ita/2012028.
[23] Thierry Coquand. A semantics of evidence for classical arithmetic. Journalof Symbolic Logic, 60(1):325–337, 1995. doi: 10.2307/2275524.
[24] Clovis Eberhart and Tom Hirschowitz. Presheaves for Processes and Unfoldings. http://www.lama.univ-savoie.fr/~eberhart/ProcUnfold.
pdf, 2015. Online extended abstract for a talk at CALCO Early Ideas.
[25] Clovis Eberhart and Tom Hirschowitz. Justified sequences in string diagrams: a comparison between two approaches to concurrent game semantics. Preprint, 2016. URL https://hal.archives-ouvertes.fr/
hal-01372582.

247

[26] Clovis Eberhart and Tom Hirschowitz. Justified sequences in string diagrams: a comparison between two approaches to concurrent game semantics. In Proc. 7th International Conference on Algebra and Coalgebrain Computer Science, LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2017. To appear.
[27] Clovis Eberhart and Tom Hirschowitz. Game semantics as a singularfunctor, and definability as geometric realisation. Preprint, 2017. URL
https://hal.archives-ouvertes.fr/hal-01527171.
[28] Clovis Eberhart and Tom Hirschowitz. What’s in a game? A theory ofgame models. Accepted for publication at LICS 2018, November 2017.
URL https://hal.archives-ouvertes.fr/hal-01634162.
[29] Clovis Eberhart, Tom Hirschowitz, and Thomas Seiller. An intensionally
fully-abstract sheaf model for π. In Proc. 6th International Conference on
Algebra and Coalgebra in Computer Science, volume 35 of LIPIcs, pages
86–100. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2015. doi:
10.4230/LIPIcs.CALCO.2015.86.
[30] Clovis Eberhart, Tom Hirschowitz, and Thomas Seiller. An intensionally
fully-abstract sheaf model for π (expanded version). Logical Methods in
Computer Science, 13(4), 2017. doi: 10.23638/LMCS-13(4:9)2017. URL
https://doi.org/10.23638/LMCS-13(4:9)2017.
[31] Charles Ehresmann. Catégories structurées. Annales scientifiques de l’Ecole
Normale Supérieure, 80(4):349–426, 1963.
[32] Charles Ehresmann. Catégories et structures. Dunod, 1965.
[33] Hartmut Ehrig. Introduction to the algebraic theory of graph grammars. In
Graph-Grammars and Their Application to Computer Science and Biology,
volume 73 of LNCS. Springer, 1979.
[34] Hartmut Ehrig, Reiko Heckel, Martin Korff, Michael Löwe, Leila Ribeiro,
Annika Wagner, and Andrea Corradini. Algebraic approaches to graphtransformation–part II: Single pushout approach and comparison withdouble pushout approach. In Handbook Of Graph Grammars And Computing By Graph Transformation: Volume 1: Foundations, pages 247–312.
World Scientific, 1997.
[35] Marcelo P. Fiore. Discrete generalised polynomial functors - (extended
abstract). In Proc. 39th International Colloquium on Automata, Languages
and Programming, volume 7392 of LNCS, pages 214–226. Springer, 2012.
doi: 10.1007/978-3-642-31585-5_22.
[36] Cédric Fournet and Georges Gonthier. The reflexive cham and the joincalculus. In Proc. 23rd International Symposium on Principles of Programming Languages, pages 372–385, 1996. ISBN 0-89791-769-3. doi:
10.1145/237721.237805.
[37] Richard H. G. Garner. Polycategories. PhD thesis, University of Cambridge, 2006.

248

[38] Richard H. G. Garner. A homotopy-theoretic universal property of Leinster’s operad for weak ω-categories. Math. Proc. Camb. Phil. Soc., 147:
615–628, 2009.
[39] Richard H. G. Garner and Tom Hirschowitz. Shapely monads andanalytic functors.
Journal of Logic and Computation, 28(1):33–83,
2018. doi: 10.1093/logcom/exx029. URL http://dx.doi.org/10.1093/
logcom/exx029.
[40] Dan R. Ghica and Andrzej S. Murawski. Angelic semantics of fine-grained
concurrency. Annals of Pure and Applied Logic, 151(2–3):89 – 114, 2008.
doi: 10.1016/j.apal.2007.10.005. URL http://www.sciencedirect.com/
science/article/pii/S0168007207000851.
[41] Jean-Yves Girard. Linear logic. Theoretical Computer Science, 50, 1987.
[42] Marco Grandis and Robert Paré. Limits in double categories. Cahiers deTopologie et Géométrie Différentielle Catégoriques, 40(3):162–220, 1999.
[43] Marco Grandis and Robert Paré. Adjoints for double categories. Cahiersde Topologie et Géométrie Différentielle Catégoriques, 45(3):193–240, 2004.
[44] Marco Grandis and Robert Paré. Kan extensions in double categories (Onweak double categories, Part III). Theory and Applications of Categories,
20(8):152–185, 2008.
[45] René Guitart. Relations et carrés exacts. Annales des Sciences Mathématiques du Québec, 4(2):103–125, 1980.
[46] Russell Harmer. Games and Full Abstraction for Nondeterministic Languages. PhD thesis, Imperial College, University of London, 1999.
[47] Russell Harmer, J. Martin E. Hyland, and Paul-André Melliès. Categorical
combinatorics for innocent strategies. In Proc. 22nd Symposium on Logic in
Computer Science, pages 379–388. IEEE, 2007. doi: 10.1109/LICS.2007.14.
[48] Michel Hirschowitz, André Hirschowitz, and Tom Hirschowitz. A theory
for game theories. In Proc. 27th Foundations of Software Technology andTheoretical Computer Science, pages 192–203. Springer, 2007.
[49] Tom Hirschowitz. Full abstraction for fair testing in CCS. In Proc. 5thInternational Conference on Algebra and Coalgebra in Computer Science,
volume 8089 of LNCS, pages 175–190. Springer, 2013. doi: 10.1007/
978-3-642-40206-7_14.
[50] Tom Hirschowitz. Full abstraction for fair testing in CCS (expanded version). Logical Methods in Computer Science, 10(4), 2014. doi: 10.2168/
LMCS-10(4:2)2014.
[51] Tom Hirschowitz and Damien Pous. Innocent strategies as presheaves andinteractive equivalences for CCS. In Proc. of Interaction and Concurrency
Experience, pages 2–24. Electronic Proceedings in Theoretical Computer
Science, 2011. doi: 10.4204/EPTCS.59.2.

249

[52] Kohei Honda and Nobuko Yoshida.
Game-Theoretic Analysis ofCall-by-Value Computation.
tcs, 221(1-2):393–456, 1999.
doi:
10.1016/S0304-3975(99)00039-0.
URL https://doi.org/10.1016/
S0304-3975(99)00039-0.
[53] Dominic J. D. Hughes. Games and definability for System F. In Logic in
Computer Science, 1997. LICS’97. Proceedings., 12th Annual IEEE Symposium on, pages 76–86. IEEE, 1997.
[54] J. Martin E. Hyland. Game semantics. Semantics and logics of computation, 14:131, 1997.
[55] J. Martin E. Hyland. Game semantics. In Andrew M. Pitts and Peter Dybjer, editors, Semantics and Logics of Computation, pages 131–184. Cambridge University Press, 1997.
[56] J. Martin E. Hyland and C.-H. Luke Ong. On full abstraction for PCF:
I, II, and III. Information and Computation, 163(2):285–408, 2000. doi:
10.1006/inco.2000.2917.
[57] Peter T. Johnstone. Sketches of an Elephant: A Topos Theory Compendium- Volume 2. Oxford University Press, 2002.
[58] André Joyal. Remarques sur la théorie des jeux à deux personnes. Gazettedes Sciences Mathématiques du Québec, 1(4):46–52, 1977.
[59] André Joyal. Foncteurs analytiques et espèces de structure. In Combinatoire énumérative (Montréal 1985), volume 1234 of Lecture Notes in Mathematics, pages 126–159. Springer, 1986.
[60] G. Maxwell Kelly. Basic concepts of enriched category theory, volume 64
of London Mathematical Society Lecture Note Series. Cambridge University Press, 1982. Republished as: Reprints in Theory and Applications of
Categories 10 (2005).
[61] G. Maxwell Kelly. Elementary observations on 2-categorical limits. Bulletinof the Australian Mathematical Society, 39:301–317, 1989.
[62] Joachim Kock. Notes on polynomial functors. Working notes, 2009. URL
http://mat.uab.es/~kock/cat/polynomial.pdf.
[63] Jean-Louis Krivine. A call-by-name lambda-calculus machine. HigherOrder and Symbolic Computation, 20(3):199–207, 2007. ISSN 15730557. doi: 10.1007/s10990-007-9018-9. URL https://doi.org/10.1007/
s10990-007-9018-9.
[64] Stephen Lack and Paweł Sobociński. Adhesive categories. In Proc.
7th Foundations of Software Science and Computational Structures,volume 2987 of LNCS, pages 273–288. Springer, 2004. doi: 10.1007/
978-3-540-24727-2_20.
[65] Yves Lafont. Interaction combinators. iandcomp, 137(1):69–101, 1997.
doi: 10.1006/inco.1997.2643. URL https://doi.org/10.1006/inco.
1997.2643.
250

[66] James Laird. A categorical semantics of higher order store. Electronic notes
in Theoretical Computer Science, 69:209–226, 2003.
[67] James Laird. A game semantics of the asynchronous pi-calculus. In Proc.
16th International Conference on Concurrency Theory, volume 3653 of
LNCS, pages 51–65. Springer, 2005. doi: 10.1007/11539452_8.
[68] James Laird. Game semantics and linear CPS interpretation. Theoreticalcomputer science, 333(1-2):199–224, 2005.
[69] James Laird. Game semantics for higher-order concurrency. In Proc.
26th Foundations of Software Technology and Theoretical Computer Science, volume 4337 of LNCS, pages 417–428. Springer, 2006. doi: 10.1007/
11944836_38.
[70] James Laird. Game semantics for call-by-value polymorphism. In Samson
Abramsky, Cyril Gavoille, Claude Kirchner, Friedhelm Meyer auf der Heide,and Paul G. Spirakis, editors, Automata, Languages and Programming,
pages 187–198, Berlin, Heidelberg, 2010. Springer Berlin Heidelberg. ISBN
978-3-642-14162-1.
[71] James Laird. Game Semantics for a Polymorphic Programming Language. J. ACM, 60(4):29:1–29:27, September 2013. ISSN 0004-5411. doi:
10.1145/2508028.2505986. URL http://doi.acm.org/10.1145/2508028.
2505986.
[72] Tom Leinster. Higher Operads, Higher Categories, volume 298 of London
Mathematical Society Lecture Notes. Cambridge University Press, Cambridge, 2004.
[73] Paul Blain Levy. Morphisms between plays. GaLoP, 2013.
[74] Ralph Loader. Finitary pcf is not decidable. Theoretical Computer Science,
266(1-2):341–364, 2001.
[75] Paul Lorenzen and Kuno Lorenz. Dialogische logik. Wissenschaftliche
Buchgesellschaft, 1978.
[76] Saunders Mac Lane. Categories for the Working Mathematician. Number 5
in Graduate Texts in Mathematics. Springer, 2nd edition, 1998.
[77] Saunders Mac Lane and Ieke Moerdijk. Sheaves in Geometry and Logic: A
First Introduction to Topos Theory. Universitext. Springer, 1992.
[78] Guy McCusker. Games and Full Abstraction for a Functional Metalanguagewith Recursive Types. PhD thesis, Imperial College, University of London,
1996.
[79] Paul-André Mellies. Asynchronous games 1: Uniformity by group invariance, 2003.
[80] Paul-André Melliès. Asynchronous games 2: the true concurrency of innocence. In Proc. 15th International Conference on Concurrency Theory, volume 3170 of LNCS, pages 448–465. Springer, 2004. doi: 10.1007/
978-3-540-28644-8_29.
251[81] Paul-André Melliès. Asynchronous games 4: A fully complete model ofpropositional linear logic. In Proc. 20th Symposium on Logic in Computer
Science, pages 386–395. IEEE, 2005. ISBN 0-7695-2266-1. doi: 10.1109/
LICS.2005.6.
[82] Paul-André Melliès. Asynchronous games 3: An innocent model of linear
logic. Electronic Notes in Theoretical Computer Science, 122:171–192, 2005.
[83] Paul-André Melliès. Game semantics in string diagrams. In Proc. 27th
Symposium on Logic in Computer Science, pages 481–490. IEEE, 2012.
doi: 10.1109/LICS.2012.58.
[84] Paul-André Melliès and Samuel Mimram. Asynchronous games: Innocence
without alternation. In Proc. 19th International Conference on Concurrency Theory, volume 4703 of LNCS, pages 395–411. Springer, 2007. doi:
10.1007/978-3-540-74407-8_27.
[85] Robin Milner, Joachim Parrow, and David Walker. A calculus of mobile
processes, I/II. Information and Computation, 100(1):1–77, 1992.
[86] Andrzej S. Murawski and Nikos Tzevelekos. Nominal game semantics.
Foundations and Trends in Programming Languages, 2(4):191–269, 2016.
doi: 10.1561/2500000017. URL https://doi.org/10.1561/2500000017.
[87] Hanno Nickau. Hereditarily sequential functionals. In Proc. Logical Foundations of Computer Science, volume 813 of LNCS, pages 253–264. Springer,
1994. doi: 10.1007/3-540-58140-5_25.
[88] Mogens Nielsen, Gordon Plotkin, and Glynn Winskel. Event structuresand domains, part 1. Theoretical Computer Science, 13:65–108, 1981.
[89] Robert Paré. Universal covering categories. Rendiconti dell’Istituto diMatematica dell’Università di Trieste, 1993.
[90] Robert Paré. Yoneda theory for double categories. Theory and Applicationsof Categories, 25(17):436–489, 2011.
[91] Michal R. Przybylek. The other pullback lemma. ArXiv e-prints, November
2013.
[92] Silvain Rideau and Glynn Winskel. Concurrent strategies. In Proc. 26th
Symposium on Logic in Computer Science, pages 409–418. IEEE, 2011. doi:
10.1109/LICS.2011.13.
[93] Dana S. Scott. Domains for denotational semantics. In Mogens Nielsen andErik Meineche Schmidt, editors, Automata, Languages and Programming,
pages 577–610, Berlin, Heidelberg, 1982. Springer Berlin Heidelberg. ISBN
978-3-540-39308-5.
[94] Michael Shulman. Framed bicategories and monoidal fibrations. Theory
and Applications of Categories, 13(9):147–163, 2008.
[95] Morten Heine Sørensen and Pawel Urzyczyn. Lectures on the Curry-Howard
isomorphism, volume 149. Elsevier, 2006.

252

[96] Takeshi Tsukada and C.-H. Luke Ong. Innocent strategies are sheaves overplays - deterministic, non-deterministic and probabilistic innocence. CoRR,
abs/1409.2764, 2014. URL http://arxiv.org/abs/1409.2764.
[97] Takeshi Tsukada and C.-H. Luke Ong. Nondeterminism in game semantics
via sheaves. In LICS 2015 [1].
[98] Mark Weber. Generic morphisms, parametric representations and weakly
cartesian monads. Theory and Applications of Categories, 13:191–234,
2004.
[99] Mark Weber. Familial 2-functors and parametric right adjoints. Theory
and Applications of Categories, 18(22):665–732, 2007.

253

Appendix A

A Proof of View-Analyticity
in Tsukada and Ong’s Model
This appendix exposes the original proof of view-analyticity in Tsukada andOng’s model, as we proved it. It requires tools from Chapter 5, and while it isarguably more complex than Takeshi Tsukada’s proof, we have chosen to keep
it inside this dissertation because it shows that we can define a notion of hiding
on plays defined as string diagrams for the λ-calculus.
We first need to introduce a notion of interaction sequence in the setting ofstring diagrams, which we will simply call an interaction. Let (A ⊢ B ⊢ C) be
the position given by the pushout:(A ⊢ B)t

B
s1(B ⊢ C)(A ⊢ B ⊢ C).

If we draw this position, we get:
A

B

C

.

In any position reached by a play starting from (A ⊢ B ⊢ C), players can be
split in two groups: the avatars of the left-hand player and those of the righthand one. Similarly, edges can be split into three groups, depending on whichedge they stem from.
Definition A.0.1. Let I(A, B, C) denote the full subcategory of E(A ⊢ B ⊢C) spanning plays whose “internal” moves (those that are played on an edge
stemming from the middle one) are β moves. We call such plays interactions.
Let us show on an example how interactions on (A, B, C) can be mapped toplays on (A, C). Let us consider the interaction on the left of Figure A.1, andits mapping to a play on (A, C) on the right (written with the initial positionat the top for readability). The interaction of Figure A.1 corresponds to theinteraction sequence:

254

A

B

A

C

C⋅c
A

C

C⋅c

B

C

B⋅b

C⋅c

A

B

C

A

C

A⋅a

B⋅b

C⋅c

A⋅a

C⋅c

A

B

C

A

C

A⋅a

B⋅b

C⋅c

A⋅a

C⋅c

A

B

C

A

C

A

C

C⋅c

C⋅c′

C⋅c′
A⋅a

B⋅b

C⋅c

A⋅a

C⋅c

A

B

C

A

C

B⋅b′

C⋅c′

A⋅a

B⋅b

C⋅c

A⋅a

C⋅c

A

B

C

A

C

A⋅a′

B⋅b′

C⋅c′

A⋅a′

C⋅c′

C⋅c′

Figure A.1: An interaction and its projection
A

B

C
c

b
a
c′
b′
a′ .
One can map the interaction on the left to the play on the right by playing
only Λ and @ moves. For this to make sense, we have to show that any movethat is played in the interaction may be played in the play created by playing
only Λ and @ moves.
To prove this, the idea is to take a linearisation of our play U and to draw
zones in every intermediate position Xi . Each zone in Xi will correspond to aplayer in the projection of Xi to (A ⊢ C). They are defined inductively by:255• in the initial position X0 , there is only one zone and it encompasses thewhole position,• after an @ move, zones “do not change”, in the sense that the newly createdplayer is incorporated to the zones of the player who played the @ move,• after a β move, all zones are left unaltered except for the (only) zone that
contains the edge the β move is played on, which is extended with the
newly created player,• after a Λ move, all zones are left unchanged, and a new zone is created,
containing all players that are in the (unique) zone of the player who
played the Λ move, plus the newly created player.
To prove that this actually works requires a few lemmas that are simply provedby mutual induction on the number of moves in a play (this is purely technicaland not difficult).
In the drawing of Figure A.1, there are three zones in the interaction’sbottom-most position: one that contains the top two players and the left-side
one, one that contains the bottom two players and the left-side one, and onethat contains the left-side and right-side players.
Since a single zone is created when a Λ move is played and zones are left
unchanged in the other cases, we can see that zones correspond to players in
the projection. More precisely, zones even have the same “interface” as players(incoming and outgoing edges), except that zones may have the same incomingedge multiple times in their interfaces: @ moves add an outgoing edge both toa player and an interface, Λ moves create both a player and an interface withthe outgoing edge replaced by an incoming one, and β moves do not change theshape of the interface (except that it may duplicate some incoming edges). Thisshows that all moves that are played in the interaction can also be played in the
projection on (A, C), which is thus well defined.
Now, we want to take a zone Z of Xi and define its history, i.e., the “smallest”
subplay of U that starts from its initial position X0 and contains Z. The history
is defined recursively as:• the empty play if Z is the only zone of X0 ,• if Z is a zone of Xn+1 , then its history is the history of the zone in Xn
it comes from, plus the move played between Xn and Xn+1 if the createdplayer is in Z (i.e., take all moves that happen in Z, except if they are Λ
moves and Z is the zone where the initial player is).
To prove Proposition 6.4.7, we will take a well-chosen zone Z, define W to be
its history, and show that W corresponds to an interaction sequence wA,B,C
that satisfies all the properties to show that Tsukada and Ong’s game setting isview-analytic.
Proof sketch of Proposition 6.4.7. Consider an interaction sequence uA,B,C , aview vA,B , and a morphism f ∶ vA,B → δ2 (uA,B,C ) (the construction is the samefor δ0 (uA,B,C )). Just like there is a full embedding from plays as justified sequences to plays as string diagrams, there is a full embedding of interaction
sequences into interactions, which takes all moves of uA,B,C and plays a Λ move256

for each Opponent move from the point of view of the interaction sequence (i.e.,
Opponent moves in C and Proponent moves in A), @ moves for Proponent
moves, and β moves for internal moves on B. Let U denote the interaction that
corresponds to uA,B,C through this mapping. Now, each move of uA,B,C corresponds to a move of U , so, in particular, the last move of f (vA,B ) corresponds
to some move in U . That move can either be an Opponent move in A or a
Proponent move in B, which means that it corresponds to either an @ moveor a β move. In particular, it corresponds to a zone of U : the zone the moveis played on (were the move a Λ, it would be slightly more difficult because
it might correspond to two different zones, but this case never happens). We
define W to be the history of that zone, plus all the moves that happen in thatzone until the next @ move (including all these extra moves is needed to ensurethat W corresponds to a play that ends in A or C).
Now we want to show that: (i) W corresponds to an interaction sequence
wA,B,C on (A, B, C) through the mapping defined above, (ii) f canonicallyfactors through δ2 (wA,B,C ), and (iii) δ1 (wA,B,C ) is a view, which will prove
view-analyticity.
For the first point, W corresponds to an interaction sequence if and only if it
ends in A or C and its obvious left and right projections correspond to plays as
justified sequences. The first point is by definition of W . For the projections, weknow that they correspond to P -visible justified sequences (because all string
diagrammatic plays do), so we just need to show that they are alternating andof even length. Because U is built from uA,B,C , by the switching condition, weknow that there is at most one positive player in any of the Xn ’s, so whenevera positive player is created, they must play the next move (or at least be partof it if the next move is a β). Now, if we look at one of the projections of U ,say the one to (A, B), if a Λ move happens in the projection of W (such a move
may be the projection of a β move of U ), then it creates a positive player inthe zone, which will necessarily play the next move in U . This next move must
therefore also be in W . If the Λ move is not in W , then a positive player isindeed created, but it is not in the zone, so the move it plays will not be in W
either. Therefore, W always takes two moves of U of opposite polarities in arow, so it is alternating and of even length.
For the second point, we have a morphism h∶ wA,B,C → uA,B,C given by
the fact that it is a sub-sequence of uA,B,C (more precisely, it is given by the
inclusion of W into U and the fact that the mapping of interaction sequences into
interactions is fully faithful). Moreover, all moves of vA,B are necessarily played
in wA,B,C because W contains the final move of f (vA,B ), so it must contain theviews of all involved players (by construction of string diagrams). Since vA,B
is a view, it becomes a branch V when turned into a string diagram, and since
we know where to map the final player into W , there is at most one map fromV to the projection WA,B of W to (A, B). But that map must exist because
W contains all the moves that made playing the last move of vA,B possible
in U . Therefore, there is a unique morphism V → WA,B that corresponds tothe morphism vA,B → δ2 (uA,B,C ). Since the mapping is fully faithful, thismeans that there is a morphism g∶ vA,B → δ2 (wA,B,C ) (because projections ofinteraction sequences are compatible with projections of interactions). We havef = δ2 (h)g.
Finally, for the last point, we need to show that the projection δ1 (wA,B,C )257

is a view, for which it is sufficient to show that the projection of W to (A, C)
is a view. To show that a string diagram is a view, it suffices to show that it
is non-empty and that the player who plays the next move is always the newly
created player. It is obviously non-empty because W contains the last moveof f (vA,B ) and ends in either A or C. Now, since the moves that are playedin W are only the ones that create a new player in a determined zone andzones bijectively correspond to players in the projection to (A, C), moves of W
“follow” the distinguished zone, which is either the expanded zone (in the caseof β or @ moves) or the newly created one (in the case of Λ moves), so they
follow the newly created player.

258

RésuméLa programmation concurrente a grandement gagné en popularité ces dernières
années, notamment grâce à l’augmentation du nombre de cœurs par processeuret à la mise en œuvre pratique de la programmation distribuée. Cependant, laprogrammation concurrente est bien moins intuitive que les paradigmes de programmation traditionnels, et la plupart des programmes reste donc incapabled’utiliser plusieurs cœurs en parallèle. Une façon de rendre la programmation
concurrente plus intuitive pourrait être de créer des langages spécifiquement
pour faire de la concurrence, mais cela nécessite de comprendre les notions qui
sous-tendent la programmation concurrente. On peut faire un parallèle avec
la programmation fonctionnelle : un aspect intéressant (pour un théoricien)d’OCaml ou de Haskell est que ce sont des langages dont le développement
s’appuie sur une théorie bien comprise. On peut utiliser ces langages pour tester l’efficacité des techniques de programmation fonctionnelle sur de vrais problèmes, plutôt que sur des problèmes académiques. Si ces techniques s’avèrent
utiles, les paradigmes de programmation fonctionnelle peuvent être ajoutés àdes langages plus « grand public », tels que Python ou C++, où ils pourrontêtre utilisés pour résoudre certains problèmes plus facilement. Ce travail est une
contribution à la sémantique de jeux concurrents, un domaine de recherche qui
utilise la sémantique de jeux pour mieux comprendre la concurrence.

Sémantique des langages de programmation
La sémantique des langages de programmation (que l’on appellera aussi simplement sémantique) est un domaine de l’informatique dont le but est de donner
un sens mathématique aux programmes informatiques. En effet, un terme d’unlangage n’est rien de plus qu’une suite de symboles, et elle n’a pas de sens en
soi. Elle ne fait sens que dans le contexte d’un langage de programmation particulier. L’idée de la sémantique est de construire des modèles mathématiquesdes langages de programmation pour prouver des propriétés de ces langages.
Il y a plusieurs raisons pour lesquelles on peut vouloir donner un sens mathématique à un programme : prouver que les programmes écrits dans un certain
langage ont de bonnes propriétés, prouver qu’un programme particulier à lecomportement attendu, prouver qu’un programme s’arrête en un temps raisonnable, prouver que deux programmes ont le même comportement... Une autre
raison d’étudier les langages de programmation réside dans les liens qu’ils entretiennent avec la logique. C’est ce qu’on appelle la correspondance de CurryHoward [95]. Sous sa forme la plus basique, cette correspondance dit qu’un type
A d’un langage de programmation peut aussi être vu comme une formule logique
259

JAK d’une certaine logique, et vice versa. Mais ce qui est intéressant dans cettecorrespondance est le point suivant : les programmes de type A correspondentà des preuves de JAK dans la logique. La correspondance va même plus loin, en
disant que la composition des programmes correspond à des coupures dans lalogique (une coupure est une étape dans une preuve où l’on ne prouve rien denouveau, par exemple quand on introduit un lemme). Enfin, la correspondance
est aussi dynamique, au sens où la normalisation (l’exécution) d’un programmecorrespond à l’élimination des coupures de la preuve (l’élimination des coupures
est un processus qui transforme une preuve en une autre preuve de la même formule qui ne contient aucune coupure, et qui peut être vue comme le fait deremplacer tous les lemmes par leurs preuves chaque fois qu’ils sont utilisés, aulieu de prouver les lemmes une seule fois pour toutes). La sémantique est donc
une façon de mieux comprendre la logique, et vice versa.

Une carte (surannée) de la sémantique
On va maintenant ébaucher une vue légèrement périmée de la sémantique (quenous nous efforcerons de corriger dans un second temps, en montrant que lepaysage de la sémantique est plus complexe).
La sémantique peut prendre différentes formes, plus ou moins adaptées à
démontrer certains types de propriétés. Il y a deux branches principales : lasémantique opérationnelle, qui décrit un programme comme une sorte de machine, et la sémantique dénotationnelle, qui décrit les programmes comme desstructures mathématiques bien connues.
Sémantique opérationnelle
La sémantique opérationnelle est probablement la façon de représenter les programmes qui est la plus proche des intuitions qu’ont les programmeurs. Elledécrit les programmes comme des suites d’instructions exécutées par une sortede machine. Cette description est très proche de ce qui se passe en effet dans un
ordinateur, mais les ensembles d’instructions utilisés en sémantique opérationnelle simplifient les instructions réellement utilisées.
La sémantique opérationnelle revêt différentes formes, mais toutes se conforment au schéma esquissé ci-dessus. La forme de sémantique opérationnelle
la plus commune s’appuie sur les systèmes de transitions étiquetés (ou LTS,
pour labelled transition system), qui sont en gros des graphes dont les sommets
sont les différents états possibles d’un programme et les arêtes sont les étapesd’exécution d’un programme qui commence dans un certain état et finit dans un
autre. Donner les règles de réduction d’un langage formel (tel que le λ-calcul [11]ou le π-calcul [85]) correspond exactement à définir un LTS dont les sommets
sont les termes du langage et les arêtes sont les réductions possibles. Voici, parexemple, un LTS très simple pour le λ-calcul :M’(λx.M )N → M [N /x]

M → M′
M N → M ′N

N → N′.
MN → MN′

Certains LTS s’appuient sur la notion de machine abstraite [63]. Commeleur nom l’indique, les machines abstraites sont dans un certain sens encore
plus proche de l’idée d’une machine qui exécute une suite d’instructions. Elles
260

exécutent en général un programme (ou terme) en face d’un contexte appelépile, et le terme et la pile peuvent tous deux être modifiés par les différentes
instructions de la machine. Par exemple, la machine peut empiler les arguments
d’une application puis les dépiler au moment de les utiliser. C’est exactement
ce que fait cette machine pour le λ-calcul :M N ⋆ π → M ⋆ N ∶∶ π

(λx.M ) ⋆ N ∶∶ π → M [N /x] ⋆ π.

Ici, π désigne la pile (une suite de λ-termes). La première règle dit que, face à
une application, la machine empile l’argument, et la seconde dit que, face à une
abstraction, la machine dépile un argument et effectue la substitution.
Sémantique dénotationnelle
On a vu que, pour la sémantique opérationnelle, l’interprétation d’un programme est proche de sa syntaxe. À l’inverse, en sémantique dénotationnelle, lesprogrammes sont représentés par des structures mathématiques connues. L’idée
est d’interpréter un type A par un certain type d’espace JAK (par exemple, desespaces topologiques) et les programmes de type A → B par des morphismesde JAK dans JBK (dans le cas des espaces topologiques, les morphismes sont les
fonctions continues).
Les domaines de Scott [93] offrent un exemple d’une telle sémantique. Grossièrement, un domaine de Scott est un ensemble muni d’un ordre qui représente
de le niveau d’« information » que l’on possède sur un certain type d’objet : x < ysignifie que y donne plus d’informations sur l’objet qu’il représente que x. Par
exemple, le domaine de Scott pour les entiers naturels a un plus petit élément (on ne sait rien sur l’entier en question) et un élément pour chaque entier (quisont tous plus grands que , mais incomparables entre eux) qui représentent lefait que l’on connaît la valeur de l’entier :
0

1

2

3

...

.
Un morphisme entre domaines de Scott est en gros une fonction croissante. En
termes de ce que cela représente pour les programmes, cela signifie que, plus unprogramme a d’informations sur ses entrées, plus il peut produire d’information
sur sa sortie. Par exemple, la dénotation (l’interprétation) d’un programme qui
calcule le prédécesseur, mais boucle sur 0, serait la fonction qui envoie  et 0sur  et chaque n > 0 sur n − 1.
Pour qu’une sémantique dénotationnelle soit considérée comme « bonne »,elle doit satisfaire plusieurs critères. Supposons qu’on nous donne une relation sur les termes d’un langage qui dit si deux termes ont le même comportement (par exemple, ils renvoient toujours le même résultat quand on leurdonne les mêmes entrées). La première propriété (et la plus évidente) qu’unesémantique dénotationnelle doit satisfaire est la correction, c’est-à-dire que deux
programmes dont le comportement est différent doivent avoir des dénotations
différentes. Il est très difficile de dire quoi que ce soit sur une sémantique qui nerespecte même pas cette propriété. La seconde propriété est la complétude, c’està-dire que deux programmes qui ont le même comportement doivent avoir des261

dénotations égales. Quand une sémantique satisfait ces deux propriétés, on dit
qu’elle est pleinement abstraite. La pleine abstraction est une propriété intéressante dans le sens où il suffit d’étudier l’égalité dans le modèle pour en déduire
si deux programmes ont des comportements équivalents. Une autre propriété
intéressante est la définissabilité (compacte) du modèle, c’est-à-dire de savoir si
tous les éléments du modèle sont l’image d’un terme du langage.
Enfin, une propriété cruciale de la sémantique dénotationnelle est la compositionalité, c’est-à-dire que la dénotation d’un programme peut se déduire decelles de ses sous-programmes. Par exemple, dans le cas du λ-calcul, on voudrait
pouvoir calculer JM N K à partir de JM K et JN K. Si l’on considère M comme une
fonction de type A → B dont l’argument N est de type A, on est tenté de définir
JM N K comme JM K (JN K), ce qui est en effet une définition compositionnelle. (Lavéritable définition est en fait légèrement plus complexe car il faut interpréter
des dérivations de typage, et non des termes.)La sémantique aujourd’hui
Aujourd’hui, il existe un spectre impressionnant de modèles de langages deprogrammation, dont certains peuvent aussi bien être vus comme dénotationnels
que comme opérationnels. L’exemple parfait de ce cas de figure est la sémantiquede jeux : elle peut à la fois être vue comme une sémantique dénotationnelle
parce qu’elle interprète les programmes par des stratégies sur une une notion
générale de jeu, mais, les stratégies encodent aussi les possibles exécutions duprogramme, ce qui rend cette interprétation dynamique, et, dans de nombreux
cas, les stratégies sont en bijection avec les formes normales du langage, ce qui
rend le modèle très proche de la syntaxe, ce qui sont deux raisons de penser
qu’elle est aussi proche de la sémantique opérationnelle.
Avec le temps, la définition des mots « dénotationnel » et « opérationnel » achangé pour prendre un sens plus large. Par exemple, il a longtemps été admis
qu’un modèle qui n’est pas pleinement abstrait n’est pas un modèle dénotationnel (plus particulièrement s’ils ne sont pas complets, car si un modèle n’est
pas correct, il ne mérite peut-être même pas le nom de modèle), mais beaucoup
aujourd’hui considèrent ces modèles comme dénotationnels, dans une certaine
mesure. Certains modèles sont indiscutablement dénotationnels (par exemple lesdomaines de Scott) alors que d’autres ne le sont pas du tout (par exemple les
LTS). Entre ces deux extrêmes, il existe tout un continuum de modèles que l’onpeut voir comme plus ou moins dénotationnels, et ce en s’appuyant principalement sur deux points. Le premier est à quel point les structures utilisées pourinterpréter les types et les programmes est « mathématique ». Plus les modèles
s’appuient sur des structures communes (par exemple les espaces topologiques
ou les espaces vectoriels), plus ils sont considérés comme dénotationnels. Plus
ils s’appuient sur des structures ad hoc (par exemple des LTS ou des catégories
dérivées de la syntaxe du langage), moins ils sont considérés comme dénotationnels. Le second critère que l’on prend en compte est si le modèle a de bonnes
propriétés (telles que la pleine fidélité) ou non : plus ils ont de bonnes propriétés,plus ils sont considérés dénotationnels. Sur ces deux points, la sémantique dejeux est dans une situation intermédiaire : les stratégies ne sont pas aussi communes que les espaces vectoriels ou topologiques, mais elles ne sont pas non plus
des structures ad hoc, et bien que le modèle ne soit pas pleinement abstrait, il

262

est compositionnel, indépendant de la syntaxe et un quotient extensionnel donne
un modèle pleinement abstrait.
De façon similaire, la notion de modèle opérationnel a évoluée avec le temps.
Auparavant, on considérait qu’un modèle était opérationnel si la structure pourinterpréter les termes était dérivée de la syntaxe, comme c’est le cas pour les
LTS. Aujourd’hui, les modèles opérationnels possèdent une dimension supplémentaire : un modèle est considéré comme opérationnel s’il est dynamique, c’està-dire que l’on peut retrouver l’exécution d’un programme à partir de son interprétation.
Il est probable que, de nos jours, la dichotomie entre modèles opérationnels
et dénotationnels soit trop grossière pour être vraiment pertinente. Peut-être
qu’une façon pertinente de la raffiner serait de définir plusieurs axes sur lesquels
placer un modèle : selon qu’ils s’appuient sur des structures mathématiques
communes (comme les espaces topologiques) ou soient syntaxiques (comme lesLTS), qu’ils soient statiques (fonctions entre espaces) ou dynamiques (stratégies), qu’ils soient intentionnels (où l’égalité se dérive de la réduction des termes)
ou extensionnels (où l’égalité se dérive d’une notion d’observation), etc.

Sémantique de jeux
Nous avons expliqué ce que sont la sémantique opérationnelle et la sémantiquedénotationnelle (tout en restant à un niveau plutôt informel) et avons affirmé
que la sémantique de jeux peut être vue comme les l’une ou l’autre. Nous allons
maintenant expliquer avec un peu plus de détails ce qu’est la sémantique dejeux, car elle est au cœur de ce travail.

La naissance de la sémantique de jeux
La sémantique de jeux est née dans le monde de la logique, sous la forme dela logique de dialogue [75]. La logique de dialogue définit les preuves d’une
formule comme deux entités qui débattent pour savoir si la formule est valide :Joueur, qui essaie de montrer que la formule est vraie, et Opposant, qui essaie demontrer qu’elle est fausse. Il s’agit d’un jeu formel qui décrit un débat entre deux
personnes (sensées) qui débattent pour savoir si une proposition mathématique
est vraie ou non : ils continuent de défendre leur position respective jusqu’à cequ’un d’entre eux soit convaincu qu’il avait tort. Une formule est vraie si Joueura une stratégie gagnante dans un certain jeu formel sur cette formule, ce qui
revient à dire qu’il est toujours capable de convaincre Opposant que la formule
est vraie, peu importe les objections levées par Opposant.
La logique de dialogues a ensuite été introduite dans le monde des langages
de programmation sous le nom de sémantique de jeux par une longue liste d’auteurs, en particulier Berry et Curien [13] (sous le nom d’algorithmes séquentiels), qui sont les premiers à avoir utiliser la notion d’interaction en sémantiquedes langages de programmation et à donner une sémantique séquentielle et dénotationnelle d’un langage d’ordre supérieur, Blass [14, 15], qui a exhibé unlien entre sémantique de jeux et logique linéaire [41], Joyal [58], qui fut le premier a construire une catégorie de jeux et stratégies, Coquand [23], qui a lié lasémantique des jeux à la dynamique de l’élimination des coupures (et donc àl’évaluation des programmes), Abramsky, Jagadeesan et Malacaria [6], ainsi que263

Hyland et Ong [56] et Nickau [87], qui ont construit les modèles de jeux les plus
connus, et qui sont encore utilisés aujourd’hui : les jeux AJM et les jeux HON.
Les idées de base de la sémantique des jeux viennent directement de la logique de dialogues : les types sont interprétés par des jeux formels (que l’on peutvoir comme des formules) et les programmes par des stratégies décrivant l’interaction du programme avec son environnement (et que l’on peut voir comme despreuves). Rentrons un peu plus dans les détails : les types sont interprétés pardes jeux (que l’on appelle parfois des arènes) sur lesquels on définit une notion
de parties. Les parties représentent toutes les interactions qu’un élément d’un
type donné peut avoir avec son environnement. Les programmes sont ensuiteinterprétés par des stratégies dans ce jeu, c’est-à-dire que ce sont des ensembles
de parties qui satisfont certaines contraintes. Ces parties sont toutes les interactions que ce programme peut avoir avec l’environnement. Ici, en revanche, à ladifférence de la logique de dialogues, les stratégies ne servent qu’à calculer desvaleurs, et il n’y a pas de notion de stratégie « gagnante ».
Par exemple, on peut définir les parties sur le jeu des entiers naturels commeles suites (q N)∗ , où q est un coup dans le jeu qui représente l’environnement
qui demande la valeur du nombre (q pour « question ») et N est n’importequel entier naturel, qui représente le programme retournant ce nombre commerésultat. La stratégie qui correspond à un compteur qui augmente de 1 chaquefois qu’il est appelé serait l’ensemble des parties de la forme q 1 q 2 . . . q n. Pourles fonctions de type int → int, on peut définir les parties comme les suites
de la forme (qr (ql Nl )∗ Nr )∗ , où qr est un coup qui représente l’environnement
demandant le résultat de la fonction (r pour « right », comme dans la copie
droite de int), Nr représente le programme renvoyant son résultat à l’environnement, ql représente le programme demandant la valeur de son argument (lpour « left ») et Nl représente l’environnement donnant la valeur de l’argument
à la fonction. Une séquence telle que décrite ci-dessus correspond donc à l’environnement demandant le résultat d’une fonction un certain nombre de fois,et, à chaque fois, la fonction demande à son tour la valeur de son argument uncertain nombre de fois avant de retourner son résultat. Par exemple, la stratégie associée à la fonction successeur contiendrait toutes les parties de la forme
qr ql n1l (n1 + 1)r . . . qr ql nkl (nk + 1)r . La structure exacte des parties dépend dequelle sémantique de jeux on utilise et importe peu ici, car les exemples ci-dessus
donnent une bonne idée de ce que peuvent être des parties et des stratégies.
Deux autres idées sont présentes dans presque tous les modèles de jeux.
La première est l’innocence, qui dit que les programmes purs (ceux qui n’utilisent que de la programmation purement fonctionnelle) sont interprétés par desstratégies innocentes. Le comportement de ces stratégies dépend d’une quantitéd’information limitée sur l’histoire de la partie. L’information à laquelle unetelle stratégie a accès encode le morceau de l’interaction entre le programme etl’environnement qui a mené à la situation présente. En particulier, une fonction ne ajuster son comportement qu’en fonction de ce qui s’est passé lors del’appel courant à la fonction. Par exemple, la stratégie associée au programme
du compteur décrit plus haut n’est pas innocente parce qu’elle doit se souvenir de la dernière réponse qu’elle a donné, alors qu’une stratégie innocente nepeut s’appuyer que sur qr (et, en effet, le compteur est un programme impur).
En revanche, la stratégie associée à la fonction successeur est innocente car sa
réponse (nk + 1)r ne dépend que de nkl .
264

Enfin, un aspect important de la sémantique de jeux est le façon de composer les stratégies. En effet, les modèles de jeux sont compositionnels, et il y a
en particulier une notion de composition de stratégies qui correspond à la composition des programmes. Elle est définie en deux étapes appelées composition
parallèle et masquage. La composition parallèle est ce qui permet aux stratégies
d’interagir. Pour la définir, il faut une notion de « partie » sur trois jeux : si on
se donne une stratégie σ sur les jeux A et B et une stratégie τ sur les jeux B
et C, la composition parallèle σ∥τ est une stratégie sur les jeux A, B et C. Elle
accepte de jouer une partie sur (A, B, C) si et seulement si σ accepte de jouer
sa projection sur (A, B) et τ accepte de jouer sa projection sur (B, C). L’idée
est que σ et τ communiquent sur le jeu B. La deuxième étape (le masquage),consiste à effacer ce qui se passe sur B pour faire une stratégies seulement sur
les jeux A et C.
Comme nous l’avons déjà mentionné, les modèles de jeux peuvent à la foisêtre considérés comme dénotationnels parce que les programmes sont interprétéspar des stratégies, qui sont des structures générales. D’un autre côté, ils sontaussi opérationnels parce que les stratégies sont souvent en bijection avec lesformes normales et que l’interprétation des programmes correspond exactement
à ses interactions avec l’environnement, ce qui en fait des modèles proches del’exécution dynamique.

Le monde hétéroclite des modèles de jeux
Aujourd’hui, les modèles de jeux existants prennent racines dans des idées etdes formalismes différents, ce qui donne un paysage très divers. Blass [14, 15]a construit ce qui est probablement considéré comme un des premiers modèlesde jeux. Dans son approche, un jeu est décrit par l’arbre de ses positions et lesparties sont les branches de cet arbre. Dans le cas des fonctions de type A → B,
les parties peuvent être vues comme la paire d’une branche dans A et d’une
branche dans B. Une stratégie est juste le choix d’un coup à jouer à chaqueposition de l’arbre. La composition des stratégies est définie en jouant sur trois
arbres en même temps (puis en masquant ce qui se passe sur l’arbre central).
Malheureusement, la composition des stratégies n’est pas associative (à caused’un problème technique sur la polarité des coups).
Les premiers modèles de jeux qui ont été largement utilisés, et dont desvariantes sont encore utilisées de nos jours, sont les jeux AJM [6] et HON [56],qui ont tous deux été développés dans les années 90. Chez AJM, les jeux sontdéfinis comme des ensembles de coups munis de conditions pour savoir quelles
suites de coups sont des parties valides. Chez HON , les jeux sont définis commedes ensembles de coups structurés et les parties comme des séquences structurées(la structure exacte importe peu ici). Les deux modèles définissent ensuite lesstratégies comme des ensembles de partis clos par préfixes et la composition
de stratégies par composition parallèle et masquage (les deux opérations sontdéfinies de manière similaire dans les deux modèles).
Aujourd’hui, il existe de nombreuses variantes des jeux HON et AJM, construites pour résoudre différents problèmes. Premièrement, un certain nombrede ces variantes, qui imposent des conditions supplémentaires pour qu’une séquence soit une partie valide, sont décrites dans la thèse de Harmer [46]. Certaines variantes ne sont pas couvertes par cette référence, par exemple [52], dans265laquelle la polarité des coups est renversée. Certaines variantes enrichissent lesjeux avec de la structure supplémentaire, par exemple des « liens copycat » [70],des actions de groupe [79, 7, 86] ou de la « cohérence » [68]. Certains modèles
s’appuient sur les mêmes idées que les jeux AJM et HON, mais on peut insérer des jeux dans d’autres jeux, par exemple dans les jeux polymorphes [53],les jeux variables [4], les jeux ouverts [22] ou les jeux contextuels [71]. D’autres
variantes ne peuvent être classées ni comme des jeux AJM, ni comme des jeux
HON, mais s’appuient sur les mêmes idées, comme par exemple la catégorie séquoïdale construite dans [66]. Certains modèles définissent les jeux comme desarbres (un peu à la manière de Blass) et les stratégies comme des morphismesde jeux [54, 47].
De plus, la sémantique de jeux a donné naissance à de nombreux modèles
concurrents. Cela parait naturel, dans le sens où un point fondamental dela concurrence est l’interaction des agents, et l’interaction est précisément aucœur de la sémantique de jeux. Certains de ces modèles s’appuient sur les jeux
HON [67, 69, 40, 97], d’autres sur des structures plus exotiques. Parmi ces structures, on trouve les structures d’événements [88], dont un des points centraux
est la notion de conflit entre événements, qui n’existe pas dans les modèles évoqués ci-dessus. Elles sont donc adaptées à l’étude de la concurrence et ont donné
naissance à de nombreux modèles [92, 20, 21] intéressants. Grossièrement, elles
décrivent les positions par des ensembles d’événements compatibles, les coups
consistent à ajouter un événement à une position, et les stratégies sont desmorphismes entre jeux. Melliès a fait un travail important pour comprendre lecœur de la sémantique des jeux avec ses jeux asynchrones [80, 82, 81, 84], qui
s’appuient aussi sur des structures d’événements.
Les terrains de jeux [50, 29, 30] sont une autre structure exotique utilisée ensémantique de jeux. Les travaux rédigés dans cette thèse s’inspirent profondément de cette structure. Pour simplifier, les terrains de jeux sont des catégories
doubles (en gros des catégories avec des morphismes verticaux et horizontaux etoù la composition n’est définie qu’entre morphismes de la même classe) dont les
objets sont les positions d’un jeu, les morphismes horizontaux sont les inclusions
de positions et les morphismes verticaux les parties dans le jeu. Elles doivent
satisfaire un certain nombre de propriétés pour que la construction fasse sens entant que modèle de jeux. À partir d’un terrain de jeux, on peut définir de façon
abstraite la catégorie E(X) des parties qui commencent à la position X. Les
stratégies sont ensuite définies comme des préfaisceaux sur E(X), l’idée étant
que cette définition est une généralisation de la notion standard de stratégie
en tant qu’ensemble de parties clos par préfixe. Cette méthode a cependant undéfaut qui est que, à ce jour, on ne sait pas comment composer les stratégies
par composition parallèle et masquage. Tous les exemples connus de terrains dejeux font partie du cadre plus général dans lequel les parties sont définies commedes diagrammes de cordes (qui sont des formalisations de dessins intuitifs utilisés en sémantique des jeux). Dans ce cadre, les coups sont définis comme desdiagrammes de corde de base et les parties comme des coups collés les uns aux
autres. La plupart des travaux décrits dans cette thèse s’inscrivent dans cettelignée des diagrammes de cordes.

266

Motivation et contributions
L’idée principale qui a motivé ce travail a été de mieux comprendre le paysage
des modèles de jeux. Plus précisément, alors qu’il y a de nombreux modèles dejeux, dont certains sont très similaires et d’autres basés sur des idées totalement
différentes, il y a très peu de littérature qui tisse des liens entre ces différents
modèles. Notre but a été de comprendre les modèles de jeux, en particulier à
travers l’abstraction : nous avons essayé d’isoler des propriétés vérifiées dansdifférents modèles de jeux et d’en donner des versions abstraites pour étudier laclasse des modèles qui vérifient ces propriétés pour prouver de façon abstraite
des propriétés de tous ces modèles. Un autre point caractéristique de notre approche est notre utilisation constante d’outils catégoriques avancés pour rendre
les constructions et les preuves plus efficaces. Pour cela, nous avons bénéficiéde travaux précédents effectués dans le même état d’esprit, à savoir les récentstravaux qui ont interprété l’innocence comme une condition de faisceau, grâceà une notion de morphisme entre parties due à Melliès. Un outil que nous introduisons pour la première fois en sémantique des jeux est la théorie des carrés
exacts [45], qui est un outil clé dans notre travail et donne des preuves efficaces
dans les chapitres 5 et 6.
Contributions principales
Nous donnons ici une liste des résultats principaux de chacune des contributionsqui constituent cette thèse. Un peu plus bas, des sections sont dédiées à chaquecontribution pour l’expliquer plus en détail.
Modèles fibrés Notre première contribution, étudiée dans le chapitre 4, suitle motif d’abstraction évoqué plus haut. Toutes les instances connues de modèlesà base de diagrammes de cordes (un pour CCS [50], un pour le π-calcul [29], unpour les jeux HON, que nous étudions au chapitre 5 et un pour le join-calcul [36]qui reste non publié) sont construits de la même manière : on définit d’abord
les positions comme des sortes de graphes, puis les coups comme des arêtes dedimension supérieure et enfin les parties comme des composées de coups. Nousappelons ces positions et parties des diagrammes de cordes car ils formalisent ce
que les physiciens appellent ainsi. Pour pouvoir définir une catégorie de parties
qui commencent à une position donnée, ces modèles doivent être fibrés, ce qui
dit en gros que toute partie peut être restreinte aux sous-positions de sa position
initiale. On donne d’abord une façon abstraite de construire des modèles àbase de diagrammes de cordes à partir d’une description opérationnelle d’unlangage qui généralise les constructions déjà existantes. On donne ensuite uncritère nécessaire et suffisant pour que notre modèle soit fibré et un autre critère,seulement suffisant, mais plus simple à prouver. Cette contribution est baséesur [25].
Un pont entre modèles Notre seconde contribution principale, étudiée dansle chapitre 5, est une connexion entre deux variantes des jeux HON. La première
variante [97] s’appuie sur la définition de séquence justifiée, qui est standard en
sémantique des jeux, alors que le second suit l’approche à base de diagrammes decordes telle que décrite dans notre contribution précédente. Il y a un lien informel

267évident entre les deux modèles, dans le sens où ils définissent tous deux les
stratégies innocentes comme des faisceaux pour une topologie de Grothendieckinduite par le plongement des vues dans les parties. On montre que ce lien
peut être rendu plus solide : les deux modèles sont équivalents dans le sens où
ils produisent des catégories de stratégies innocentes équivalentes. On donne
d’abord un premier argument à base d’arbres de dérivation dans un calcul desséquents ad hoc qui décrit les jeux HON, mais l’argument est trop peu formel,
et on donne donc ensuite une preuve plus formelle, sans utiliser les arbres dedérivation. Cette contribution se base sur [26] (qui donne l’argument avec lesarbres de dérivation) et sa version longue [25] (qui donne la preuve directe).
Un noyau des modèles de jeux Notre dernière contribution principale, étudiée dans le chapitre 6, développe un cadre général pour étudier les modèles dejeux. L’idée est d’essayer de réduire les modèles de jeux à quelques propriétés
basiques sur les parties et de retrouver les constructions principales des modèles de jeux à partir de ces propriétés de base. En se donnant une structure
qui représente les parties, on montre comment définir un notion de stratégie
concurrent et comment les composer en faisant une composition parallèle etun masquage. On montre que, sous certaines conditions, la composition desstratégies est associative et unitaire. On montre ensuite comment définir une
catégorie de stratégies innocentes, sous réserve d’avoir un peu plus de structure.
On montre aussi que ce beaucoup de modèles de jeux existants rentrent dans ce
cadre. Cette contribution est basée sur [28].
Contributions qui n’apparaissent pas dans cette thèse
Nous donnons ici quelques contributions que l’on considère comme mineures ou
qui ne sont pas étudiées dans cette thèse.
Diagrammes de cordes pour les traces concurrentes et les dépliages
La première de ces contributions est décrite dans le chapitre 3, qui se basesur [24], et que l’on utilise comme une introduction aux diagrammes de cordes,
qui seront très utilisés dans les chapitres 4 et 5. On montre comment les utiliser
pour modéliser les traces concurrentes simplement, on donne quelques exemples
d’applications de cette construction, et on l’illustre sur l’exemple des réseaux dePetri.
Un modèle de jeux pour le π-calcul Dans [29] et sa version longue [30], on
construit un modèle du π-calcul qui est intentionnellement pleinement abstrait
pour l’équivalence de tests équitable (la pleine abstraction intensionnelle est simplement la définissabilité, avec le sous-entendu qu’un quotient du modèle donne
un modèle pleinement abstrait, quotient qui est par ailleurs souvent inévitable,vu que les modèles pleinement abstraits ne sont parfois pas récursivement présentables [74]). On définit d’abord une notion de partie pour le π-calcul à basede diagrammes de cordes (ce sera d’ailleurs l’exemple utilisé dans le chapitre 4),
puis on montre comment interpréter les termes par des stratégies. Pour montrer
que cette interprétation est intentionnellement pleinement abstraite, on utilise
la théorie des terrains de jeux, qui nous donne de façon abstraite un LTS qui
correspond à notre notion de stratégie, LTS que l’on relie à celui du π-calcul.
268

Plusieurs idées développées dans le chapitre 4 trouvent leur source dans ce papier, en particulier l’utilisation des systèmes de factorisation pour montrer quele modèle est fibré.
Interpréter les termes par des stratégies de façon abstraite Dans [27],on étudie l’interprétation des termes par des stratégies dans les modèles dejeux de façon abstraite. L’idée est de définir une notion de paraterme qui est
suffisamment large pour inclure les vues, les parties et les termes. On définit
ensuite l’interprétation des termes par des stratégies de façon abstraite sous laforme d’un foncteur singulier. Cette construction généralise des constructions
existantes. On retrouve ensuite un résultat fondamental de la sémantique desjeux, la définissabilité (qui dit que toute stratégie innocente finie est isomorphe
à l’interprétation d’une valeur), sous la forme de la réalisation géométrique.

Modèles fibrés
Dans le chapitre 4, on montre comment construire des modèles à base de diagrammes de cordes et montrer qu’ils sont fibrés sous certaines conditions. On
suppose donnée une catégorie de base C qui décrit la sémantique opérationnelled’un langage. Cette catégorie est équipée d’une notion de dimension. Les objets
de petite dimension sont appelés les joueurs et les canaux et décrivent les positions du jeux, qui sont en gros des graphes de joueurs et de canaux. Les joueurssont les agents de notre jeu et les canaux sont leurs moyens de communiquer
entre eux. Par exemple, pour le π-calcul, une position est simplement une représentation de la topologie du réseau de communication entre les différents agents,
comme dans :
c
x

y,

a

qui représente un position avec deux joueurs x et y qui peuvent communiquer à
travers le canal a, et x a connaissance d’un canal privé c. Les objets de dimension
supérieure décrivent la dynamique du jeu. Par exemple, pour le π-calcul, une
synchronisation dans laquelle x envoie le canal c sur a et où y le reçoit est
dessinée comme à gauche ci-dessous.
c
x′

y′

a

c
x′

x

a

y′

x′

y

x

c

a

y′

y
c

x

269

a

y

Ici, la position initiale de la synchronisation est dessinée en bas et la position
finale en haut, et l’on peut voir que, dans la position finale, l’avatar y ′ de y aconnaissance du canal c que x a envoyé. La synchronisation est un des objets dedimension supérieure de la catégorie C correspondant au π-calcul. Pour chaqueobjet de dimension supérieure de C, on se donne un tel dessin, que l’on appelle
un coup. On appelle le foncteur qui associe à chaque objet de dimension supérieure un coup une signature. Une partie est une composée de coups (qui ne faitque coller plusieurs coups les uns aux autres). Formellement, les positions sontdes préfaisceaux sur les deux premières dimensions de C (il s’agit bien d’unereprésentation formelle de la même chose car les dessins correspondent aux catégories d’éléments des objets de C). Les coups sont des cospans Y → M ← X
de préfaisceaux sur C, où X est la position initiale, Y la position finale et M
représente le coup. Par exemple, le cospan correspondant à la synchronisation
dans le π-calcul est dessiné à droite de celle-ci, avec X en base, Y en haut, M
au milieu et où tous les morphismes sont des inclusions.
À partir de n’importe quelle signature S, on construit une pseudo double
catégorie DS . Pour simplifier, il s’agit d’une structure mathématique qui possède
un ensemble d’objets (ici, les positions), pour chaque paire d’objets X et Y , unensemble de morphismes horizontaux X → Y (ici, les inclusions de la position
X (ici, lesX dans la position Y ) et un ensemble de morphismes verticaux Y
parties dont la position initiale est X et la position finale Y ). Elles ont aussi,
pour tout carré tel que celui dessiné ci-dessous, un ensemble de cellules α (quireprésentent ici le fait que u est incluse dans u′ dans un certain sens).
Y
u

X

k
α

h

Y′
u′
′

X

On veut ensuite définir une catégorie E(X) des parties de position initiale X
et dont les morphismes u → u′ représenteraient le fait que u′ est une extension
de u (formellement, E(X) dépend de S, mais nous ne notons pas la dépendance
pour ne pas alourdir la notation). La définition naturelle d’un morphisme deu∶ Y
X dans u′ ∶ Y ′X est une triplet d’un morphisme vertical w∶ Z → Y ,d’un morphisme horizontal h∶ Z → Y ′ et d’une cellule α comme ceci :
Z

h

Y′

w●

Y

α

●u′

u●

X

X.

Pour pouvoir définit une catégorie, il faut être capable de composer ces morphismes, ce qui nécessite de trouver une façon canonique de compléter le diagramme ci-dessous :

270

Z ′′

h′

Z′
β

●w′

●
h

Z

Y ′′

Y′
α′

w●
α

Y

●u′′

′

●u

u●

X

X

X.

Il faut donc être capable de restreindre toute partie w′ à une sous-position Z deX
sa position initiale. Plus précisément, on veut que, pour toute partie u∶ Y
et morphisme X ′ → X, il existe une partie u′ ∶ Y ′X ′ et une cellule α commeci-dessous telle que, pour tout diagramme de la forme
Y ′′
k′
u′′ ●

k′′
α′′

X ′′

Y′
α′

Y

k

●u

α

u′ ●
′′

h

h′

X′

X,

h

il existe un morphisme pointillé et une cellule correspondante (ce qui signifie queu′ est bien une restriction de u le long de h, ce qui est nécessaire pour que lacomposition soit bien définie dans E(X)). On dit d’un modèle qui vérifie cettepropriété qu’il est fibré.
Pour prouver cette propriété, on utilise les systèmes de factorisation [17].
Cet outil algébrique permet de factoriser tout morphisme d’une catégorie sousla forme r ○l, où l et r appartiennent à des classes L et R fixées et qui sont orthogonales, ce qui signifie qu’elles possèdent une certaine propriété de relèvement.
On construit un système de factorisation dont la classe L est générée par lesjambes X → M de tous les cospans Y → M ← X de notre signature (c’est-à-diretous les coups). Comme les parties u∶ Y
X sont des cospans de préfaisceaux
Y → U ← X, on est en fait en face de la situation décrite par le diagramme àgauche ci-dessous, que l’on complète en factorisant l ○ h en h′ ○ l′ (à l’aide dusystème de factorisation) puis en prenant le produit fibré de f et h′ .
Y ′′

q ′′
′′

Y′

h′′

f′

f ′′

Y
f

s

Y′

U ′′
s′

U′

h′

l′

X′

U
l

h

l′′

f′

l

h′

U

′

l

q
s

X′
271

Y
f

q′

U′

X ′′

X

h′′

h

X

On obtient la propriété désirée en construisant s′ et s′′ dans le diagramme dedroite : le premier vient de la propriété de relèvement de notre système defactorisation et le deuxième de la propriété universelle du produit fibré.
Il reste ensuite à prouver que Y ′ → U ′ ← X ′ est une partie, ce que l’on fait
par récurrence, en supposant que c’est le cas pour les coups. On donne ensuite
un critère suffisant sur C pour que la restriction soit une partie.

Un pont entre modèles
Dans le chapitre 5, on commence par construire une variante des jeux HON
basée sur les diagrammes de cordes, tel qu’expliqué dans A, puis on construit
une traduction entre cette variante et une autre (basée sur la notion standardde séquence justifiée), à la fois au niveau des parties et au niveau des stratégies.
On part d’un calcul des séquents qui décrit les jeux d’arènes et qui rappelle
fortement un calcul des séquents focalisé pour la logique intuitionniste. On dérive
une signature SHON de ce calcul des séquents. Ici, les canaux sont des jeux àdeux joueurs, que l’on dessine comme des arêtes entre les deux joueurs, que l’on
dessine comme des sommets. Les positions ressemblent typiquement à
x

A

y

B

,

C

où, dans cette position particulière, x joue comme Joueur sur B et Opposant
sur A et y comme Joueur sur C et Opposant sur C. Les arêtes pendantes représentent l’interaction avec l’environnement. Cette position représente typiquement une fonction de type A → B, modélisée par x, et une de type B → C,
modélisée par y. Les joueurs qui n’ont que des arêtes entrantes représentent lesparties du programme qui sont en train de calculer, alors que celles qui possèdent une arête sortante attendent qu’une autre partie du programme l’appelle(sur cette arête sortante).
La dynamique de ce jeu est dérivée de l’élimination des coupures de notre
calcul et est dessinée :
Γ1

x′

∆1
A⋅m

⋰

y′

⋱
@

Λ

⋰
Γn

x

β
A

y

⋱

∆m .

La façon la plus simple de comprendre cette interaction est probablement d’unpoint de vue de l’exécution des programmes. Dans la position initiale (en bas dudessin), x est une fonction de type Γ1 → . . . → Γn → A qui produit des résultats
de type A en ayant accès à des ressources de type Γ1 , . . . , Γn , alors que y est une
partie de programme en train de calculer et a accès à des ressources de types∆1 , . . . , ∆m et A (produite par x). L’interaction représente y qui demande à x
sa valeur de retour. Dans la position finale (en haut du dessin), les polarités desdeux joueurs ont changé : l’avatar x′ de x est maintenant en train de calculer,
alors que l’avatar y ′ de y attend que x′ ait fini de calculer et lui renvoie une valeur(c’est la raison pour laquelle x′ a « accès » à y ′ : il s’agit d’un continuation).
272

Remarquons qu’y ′ a toujours accès à x, au cas où il aurait besoin de le rappeler
plus tard lors de son exécution.
On dérive de cette signature une pseudo double catégorie DHON dont les
objets sont les positions, les morphismes horizontaux les inclusions de positionset les morphismes verticaux les parties, tel que décrit dans A. On montre ensuiteque SHON vérifie les conditions pour que DHON soit fibrée, d’où on dérive unecatégorie E(X) de parties de position initiale X. En particulier, on dérive descatégories E(A ⊢ B) au-dessus de chaque position de la forme
A

x

B

.

On dérive aussi des sous-catégories EV (A ⊢ B) qui contiennent uniquement lesvues, qui sont des partie particulières, définies de façon légèrement ad hoc. On
définit ensuite les stratégies comme les préfaisceaux sur E(A ⊢ B) (comme dansles autres modèles à base de diagrammes de cordes) et les stratégies innocentes⋀⋀

comme les préfaisceaux qui sont dans l’image de ∏i ∶ EV (A ⊢ B) → E(A ⊢ B),
où i est le plongement de EV (A ⊢ B) dans E(A ⊢ B), où C est la catégorie despréfaisceaux sur C et ∏ est l’extension de Kan à droite.
Il existe aussi des catégories standard correspondant à celles-ci dans le cadre
des jeux HON basés sur des séquences justifiées : la catégorie PA,B des parties surles arènes (A, B) et la catégorie VA,B des vues. De façon similaire, les stratégies
sont définies comme des préfaisceaux sur PA,B et les stratégies innocentes commecelles qui sont dans l’image de ∏iHON (où iHON est le plongement de VA,B dans
PA,B ).
Durant la plus grande partie du reste du chapitre, on construit un carré
commutatif comme à gauche ci-dessous, où F est un plongement plein et F V est
une équivalence de catégories.
⋀

VA,B

iTO

VA,B

i

E(A ⊢ B)
⋀

∏iTO

∆F V

F

FV
V

E (A ⊢ B)

⋀

PA,B

⋀

PA,B
∆F

⋀

EV (A ⊢ B)

⋀

⋀

∏i

E(A ⊢ B)En particulier, on a que EV (A ⊢ B) et VA,B sont équivalentes à travers le foncteur de restriction ∆F V . Mais on peut même aller plus loin : comme F V est uneéquivalence de catégories et F est plein et fidèle, le carré est exact [45], ce qui
veut dire que le carré de droite commute à isomorphisme près. Cela signifie que
les catégories de stratégies innocentes des deux modèles sont équivalentes et quecette équivalence est compatible avec les foncteurs de saturation ∏i et ∏iHON .
Les différences entre ces deux variantes sont donc principalement de l’ordre dela présentation.
La partie difficile de ce travail est de définir les foncteurs F et F V évoqués
ci-dessus. Le second est simplement défini comme la restriction du premier aux
vues, donc la partie la plus difficile est de définir F . On donne deux façons de lefaire : d’abord en utilisant un argument informel, puis en donnant une preuve
formelle.
La première façon fait appel à des arbres de dérivation pour un calcul des séquents ad hoc. On définit une catégorie T(A ⊢ B) dont les objets sont les arbres273

de conclusion (A ⊢ B) et dont les morphismes sont les inclusions d’arbres, etune sous-catégorie B(A ⊢ B) de branches de conclusion (A ⊢ B). On décompose
le carré en
VA,B

B(A ⊢ B)EV (A ⊢ B)

T(A ⊢ B)E(A ⊢ B)

iTO

PA,B

i

en montrant d’abord que T(A ⊢ B) est équivalente à E(A ⊢ B), que cetteéquivalence se restreint à une équivalence entre B(A ⊢ B) et EV (A ⊢ B), puis
en construisant un plongement plein de PA,B dans T(A ⊢ B) et en prouvant
qu’il se restreint à une équivalence entre VA,B et B(A ⊢ B). Cet argument n’est
cependant pas totalement satisfaisant au sens où les arbres ne sont pas traités
suffisamment formellement et un traitement formel ne rendrait pas le problème
plus simple à résoudre que sans utiliser T(A ⊢ B).
On donne donc une construction formelle de F et F V sans passer par T(A ⊢B). Les preuves de ce chapitre sont beaucoup plus ad hoc que dans le reste decette thèse, ce qui n’est pas très surprenant, dans le sens où on essaie de tisser
du lien entre deux modèles qui sont construits en utilisant des méthodes très
différentes.

Un noyau des modèles de jeux
Dans le chapitre 6, on décrit comment définir plusieurs catégories de stratégies à
partir d’une description basique d’un modèle de jeux. On se donne un foncteur
P qui décrit un modèle de jeux. Pour tout jeu A, P donne une catégorie PA
des parties sur le jeu A. Il donne aussi, pour tous jeux A et B, une catégorie
PA,B de parties sur la paire de jeux (A, B), et ainsi de suite pour les triplets
et quadruplets de jeux. Il donne aussi des foncteurs d’insertion, par exemple
ι0 ∶ PA,B → PA,A,B qui, typiquement, ne fait que dupliquer ce qui se passe sur
A ; et des foncteurs de suppression, par exemple δ1 ∶ PA,B,C → PA,C qui, typiquement, efface ce qui se passe sur B.
On dérive de façon abstraite une notion de stratégie d’un tel P : une stratégie
sur la paire de jeux (A, B) est un préfaisceau sur PA,B (on étudie les stratégies
sur les paires de jeux pour montrer qu’elles forment une catégorie, mais on
pourrait définir des stratégies sur un seul jeu de la même façon). L’idée est
qu’une stratégie σ accepte une partie p si σ(p) ≠ ∅ (plus précisément, σ(p) est
l’ensemble des états dans lesquels la stratégie peut se retrouver après avoir jouép). Pour montrer que les jeux et stratégies forment une catégorie, on définit lacomposition en tant que composition parallèle plus masquage et des identitéspour cette composition, connues sous le nom de stratégies copycat.
La composition parallèle σ∥τ de deux stratégies σ sur (A, B) et τ sur (B, C)
accepte de joueur une séquence d’interaction (une partie sur trois jeux) u si etseulement si σ accepte de jouer la projection δ2 (u) du u sur (A, B) et τ accepte
de jouer la projection δ0 (u) du u sur (B, C). Le masquage d’une stratégie σ
sur PA,B,C accepte de jouer une partie p si et seulement s’il existe une séquenced’interaction u qui se projette sur p et que σ accepte de jouer, c’est-à-dire qu’elle
accepte de jouer les mêmes parties que σ, sauf que l’on masque se qui se passe
sur B. Enfin, la stratégie copycat sur le jeu A est la stratégie sur PA,A qui« recopie » tous les coups joués par Opposant.
274

Dans le cadre que nous définissons dans ce chapitre, la composition et les
stratégies copycat sont toutes deux définies par des foncteurs polynomiaux.
Étant donné un foncteur F ∶ C → D, le foncteur de restriction ∆F ∶ D → C est
donné par pré-composition par F op . Il admet des adjoints à gauche et à droite∑F ∶ C → D et ∏F ∶ C → D, appelés extensions de Kan à gauche et à droite, respectivement. Pour comprendre ∑F à un niveau intuitif, il faut imaginer que lepréfaisceau ∑F (X) est non-vide au-dessus d’un élément d s’il existe un antécédent c de d tel que X est non-vide au-dessus de c. Pour ∏F , l’intuition est
que X doit être non-vide au-dessus de tous les antécédents de d. On peut donc
penser à ces foncteurs comme à des foncteurs ∃ et ∀. Un foncteur de C dans D
est polynomial si c’est une composée d’un nombre quelconque de restrictions etextensions de Kan à gauche et à droite.
La composition doit être un foncteur de PA,B × PB,C dans PA,C . On peut lavoir de façon équivalente comme un foncteur de PA,B + PB,C dans PA,C . On ladéfinit comme la composée
⋀

⋀

⋀

⋀

⋀

⋀

⋀

⋀

⋀

⋀

⋀

∆δ2 +δ0

⋀

⋀

∏∇

⋀

⋀

∑δ1

⋀

⋀

PA,B + PB,C ÐÐÐÐ→ PA,B,C + PA,B,C ÐÐ→ PA,B,C ÐÐ→ PA,C ,où ∇ est le foncteur codiagonal. Il s’agit bien d’une définition polynomiale, etl’idée derrière cette définition est exactement celle de la composition parallèle
suivie du masquage, ce que l’on peut voir en calculant de ce que fait ce foncteur
avec la description des extensions de Kan qu’on a donnée plus haut. La composéedes deux premiers foncteurs est la composition parallèle : si on appelle θ l’imagede [σ, τ ], alors θ accepte de jouer une séquence d’interaction u si et seulementsi, pour chacun de ses antécédents (c’est-à-dire inl u et inr u), [σ, τ ] accepte dejouer (δ2 +δ0 )(u′ ), c’est-à-dire que σ accepte de jouer δ2 (u) et τ accepte de jouer
δ0 (u). Le dernier foncteur ∑δ1 est le masquage : si on appelle τ l’image de σ,alors τ accepte de jouer p si et seulement s’il existe une séquence d’interaction
u qui se projette sur p et est acceptée par σ.
Les stratégies copycat sont aussi définies comme des foncteurs polynomiaux.
On peut voir la stratégie copycat sur A comme un foncteur de 1 vers PA,A .
Comme 1 ≅ ∅, on peut la définir comme :
⋀

⋀

⋀

∑ι0

⋀

∅ Ð→ PA ÐÐ→ PA,A .

⋀∏!

L’idée est que ∏! est le préfaisceau terminal sur PA , donc il accepte toutes lesparties sur PA , et ∑ι0 (σ) accepte une partie p si et seulement si p est de laforme ι0 (p′ ) et σ accepte p′ . Comme ι0 correspond typiquement à recopier cequi se passe sur une copie de A sur l’autre, la composée est bien la stratégie
copycat sur A : elle accepte de jouer p si et seulement si Joueur recopie tout cequ’Opposant fait.
Notre but est ensuite de montrer que les jeux et les stratégies forment une
catégorie dont la composition et les identités sont celles qu’on vient de définir,
ce qui signifie que la composition doit être associative et neutre pour les stratégies copycat. On prouve que c’est le cas sous certaines conditions. La condition
principale est inspirée de la méthode traditionnelle pour prouver que la composition des stratégies est associative, à savoir le lemme du zipping, qui dit que,dans certains cas, si deux séquences d’interaction se projettent sur la même partie, alors il existe une unique séquence d’interaction généralisée (une partie surquatre jeux) qui se projette sur ces deux séquences d’interaction.
275

Nous faisons tout ceci pour notre notion de stratégie concurrente et nous
voudrions obtenir les mêmes résultats pour les stratégies « traditionnelles »,que l’on voit comme des foncteurs Pop
A,B → 2, où 2 est l’ordinale 0 → 1 vu comme
une catégorie. On dérive du fait que les jeux et stratégies concurrentes forment
une catégorie que c’est aussi le cas pour les jeux et stratégies traditionnelles.
On étudie également un certain nombre de modèles de jeux pour montrer qu’ils
rentrent dans ce cadre et que la composition des stratégies définie abstraitement
dans notre cadre correspond à la composition dans ces différents modèles.
Enfin, on s’attaque à la question de l’innocence. On suppose donnée une
iA,B

sous-catégorie pleine VA,B ÐÐ→ PA,B de vues pour chaque catégorie PA,B . On
définit ensuite les stratégies innocentes comme les préfaisceaux dans l’image de
⋀

∏iA,B

⋀

VA,B ÐÐÐ→ PA,B . L’idée derrière cette définition est qu’un préfaisceau ∏iA,B (σ)
accepte de jouer p si et seulement si, pour tout morphisme v → p d’une vue v
dans p, σ accepte de jouer v. Pour que cette définition soit la bonne, il faut que
PA,B contienne suffisamment de morphismes de parties (dans le cas des jeux
HON, il s’agit des morphismes donnés par Melliès [80], ensuite réutilisés par
Levy [73] puis Tsukada et Ong [96]). Un tel préfaisceau accepte de jouer une
partie p si et seulement s’il accepte de jouer toutes les vues de p, ce qui est
l’idée même de l’innocence. On souhaite montrer que les jeux et les stratégies
innocentes forment une sous-catégorie de la catégorie des jeux et stratégies, ce
que l’on fait en imposant que le modèle vérifie certaines propriétés.
Il est peut-être intéressant de voir quelles méthodes on utilise pour prouver
ce genre de résultat. Prenons par exemple la préservation de l’innocence, qui
dit que la composée de deux stratégies innocentes est encore innocente. Elle est
prouvée en étudiant le diagramme suivant. (Il n’est pas nécessaire de comprendre
ce diagramme.)
VA,B + VB,C∏

V(A,B),(B,C)∆∏

VA,B + VB,C∏

PA,B + PB,C∏

P(A,B),(B,C)

VA,B,C∑∏∆

PA,B,C

VA,C
∏

∑

PA,C

Remarquons d’abord que la question de savoir si le diagramme commute ou nonn’a aucun sens parce qu’il n’y a ni point de départ, ni point d’arrivée dans ce
diagramme. En revanche, quand on passe aux catégories de préfaisceaux (oùles ∆, ∑ et ∏ servent à dire quoi faire sur les foncteurs), les flèches étiquetées∆ se retournent, et on peut se demander si le diagramme commute. Sur lescatégories de préfaisceaux, la ligne du bas correspond à prendre deux stratégies
innocentes et les composer, donc, si le diagramme commute, la composée dedeux stratégies innocentes est dans l’image de ∏iA,C , et donc innocente. Dans lediagramme entre catégories de préfaisceaux, le carré de gauche commute parceque la carré sous-jacent commute et celui du milieu parce que le carré sous-jacent
est exact. Il ne nous reste donc qu’à montrer que le carré de droite commute,ce qui est plus difficile. Quasiment toutes les preuves de ce chapitre suivent lemême schéma. On étudie le diagramme sous-jacent et• pour les carrés faits seulement de ∆ (ou de ∏ ou de ∑), on montre que lediagramme sous-jacent commute,276

• pour les carrés de la forme
A

∏

∆

B

A

∆

C

∑

∆

D

∆

C

∏

B
D

∑

on montre que le carré est exact, ce qui montre que le carré entre catégories
de préfaisceaux commute à isomorphisme près,• pour les carrés de la forme
∑

A
∏

B
∏

C

D
∑

on doit utiliser des preuves plus complexes.

277

Abstract
Game semantics is a class of models of programming languages in which types
are interpreted as games and programs as strategies. Such game models havesuccessfully covered diverse features, such as functional and imperative programming, or control operators. They have recently been extended to nondeterministic and concurrent languages, which generated an in-depth recastingof the standard approach: plays are now organised into a category, on which
strategies are presheaves. The fundamental notion of innocence has also beenrecast as a sheaf condition. This thesis is a study of various constructions appearing in this new approach to game semantics.
We first consider a pattern common to several game models of concurrent
languages, in which games and plays are first organised into a double category,from which strategies are then derived. We provide an abstract construction ofsuch a double category from more basic data, and prove that, under suitable
hypotheses, the result allows the construction of strategies.
Our second contribution is to relate two established techniques for defining
plays: the standard one, based on justified sequences, and a more recent one,based on string diagrams. We (fully) embed the former into the latter and provethat they induce essentially the same model.
Finally, we propose an axiomatisation of the notions of game and play, fromwhich we formally derive a category of games and strategies. We also refine
the axioms to deal with innocence, and prove that, under suitable hypotheses,
innocent strategies are stable under composition.
Résumé
La sémantique des jeux est une approche pour modéliser les langages deprogrammation dans laquelle les types sont interprétés par des jeux et les programmes par des stratégies. Ces modèles de jeux ont couvert des constructions
fonctionnelles et impératives, des opérateurs de contrôle, etc. L’approche a récemment été étendue aux langages non-déterministes et concurrents, provoquantau passage un changement de perspective profond : les parties sont maintenantorganisées en une catégorie, sur laquelle les stratégies sont des préfaisceaux. La
notion fondamentale d’innocence a aussi été caractérisée comme une conditionde faisceau. Cette thèse s’attache à l’étude de quelques constructions apparaissant dans ces nouveaux modèles de jeux.
D’abord, constatant que, dans plusieurs de ces modèles, l’étape cruciale consiste à définir une catégorie double de jeux et de parties, nous proposons uneconstruction abstraite d’une telle catégorie double à partir de données de base,puis nous démontrons que, sous des hypothèses adéquates, le résultat obtenu
permet en effet la construction des stratégies.
Dans un second temps, nous établissons un lien entre deux techniques existantes pour définir les parties : la technique standard, fondée sur les séquences
justifiées, et une autre plus récente utilisant les diagrammes de cordes. Nous
définissons un plongement (plein) de la première dans la seconde et prouvons
qu’elles induisent essentiellement le même modèle.
Enfin, nous proposons une axiomatisation des notions de jeu et de partie, delaquelle nous tirons une catégorie de jeux et stratégies. Nous raffinons ensuite lesaxiomes pour traiter l’innocence et nous démontrons que, sous des hypothèses
adéquates, les stratégies innocentes sont stables par composition.
278