[Oxford Internship] The Category of Event Structures

11 minute read

My M1 intership has just begun! This time, it’s at Oxford University, under the supervision of Ohad Kammar.

It will revolve around the foundations of concurrency semantics. To be more precise:

different kinds of maps between Glynn Winskel’s event structures give rise to different kinds of concurrency models. These are expressible as monads over event structures with symmetry and rigid maps. The goal will be to describe these monads using algebraic operations and equations.

Just like last year, I’ll try to write about it with blog posts.

To begin with, let’s begin with the main protagonists: event structures.

The Category of Event Structures

Objects

In broad strokes, event structures are a way to represent a set of events (that are part of a given process) depending on one another: events may be caused/cause/conflict with other events.

An event structure EE,E,ConE:

is given by:

  • a poset (E,E) of events (where is thought of as the causal dependency relation) such that
    • for all eE, e{eEeEe} (downward closure) is finite
  • a consistency relation ConEPfin(E) such that
    • for all eE, {e}ConE
    • ConE is stable under inclusion
    • if xConE and eEex then x{e}ConE
Configurations of an event structure E:
C(E){xEx is consistent and down-closed}

where

x is consistentPfin(x)ConE

and

x is down-closedxexex

NB: Co(E) is the set of finite configurations.

E

1.

pE,pCo(E)

This stems from the fact that p is:

  • finite by definition of E being an event structure
  • down-closed, by transitivity of E
  • consistent, as

    • {p}ConE
    • and by the third property of ConE (with x={p}): p1p,{p,p1}ConE

      as a result of which, by a straightforward recurrence (by setting x={p,p1},,{p,p1,,pn}):

      p1,,pnp,{p,p1,,pn}ConE

      so by closure under inclusion:

      p1,,pnp,{p1,,pn}any finite subset of p is of this formConE

2.

A finite subset of events is in the consistency relation iff it occurs as a subset of a finite configuration.

  • : if xConE, then xxexe, which is:

    • finite, as it is a finite (x is finite) union of finite (by the event structure definition) sets
    • down-closed, by transitivity of E
    • consistent: like in the first exercise (and since any subset of x is in ConE by closure by inclusion), we can show by recurrence that for all y{e(1),,e(k)}Pfin(x):

      e1(1),,en1(1),,e1(k),,enk(k)x,y{e1(1),,en1(1),,e1(k),,enk(k)}ConE

      which implies, by closure under inclusion, that:

      e1(1),,en1(1),,e1(k),,enk(k)x,{e1(1),,en1(1),,e1(k),,enk(k)}any finite subset of x is of this formConE
  • : owing to the fact that any configuration is consistent.

3.

For all e,eE, we have: ee(xCo(E),exex)

  • : it’s due to the fact that x is down-closed, as a configuration.

  • : with xe, it results that ee, i.e. ee

Maps

A map of event structures f:EF:

is a function f:EF that is

  • configuration preserving: if xCo(E), then f[x]Co(F)
  • locally injective: for xCo(E), if e1,e2x and f(e1)=f(e2)F, then e1=e2
A rigid map of event structures:

is a map that is also monotone: if e1Ee2, then f(e1)Ff(e2).

4.

For any map f:EF:

eE,fef(e)

fe is the smallest configuration containing fe, since

  • it is a configuration
  • for any configuration y such that fey, fey as y is down-closed

And:

  • as f preserves configurations, f[e] is also a configuration
  • fef[e]

so the result follows by minimality of fe.

5.

For any map f:EF:

xE,f[x]f[x]
f[x]=f[exe]=exf(e)(since the direct images preserve union)=exf(e)(by definition of  on sets)exf(e)(by the previous lemma)=f[exe]=f[x](by definition of x )

6.

Any map f:EF is causality reflecting on configurations:

e1,e2xC(E),fe1Ffe2e1Ee2

If f(e1)f(e2)f(e2), then there exists e0Ee2 such that

f(e1)=f(e0)

As the configuration x is down-closed: e0x. On top of that, as f is injective on the configuration xe1,e0:

e1=e0

and e1=e0Ee2

NB: a map is not necessarily causality reflecting on the whole carrier set, as exemplfied by the following counter-example: if

  • E{a,b}ConE{{a},{b},}aEb
  • F{c}ConF{{c},}

then the only map f:EF (sending all the elements to c) is not reflecting causality:

c=f(a)Ff(b)=c but ab

7.

Note that f:EF is

  • monotone iff eE,f[e]f(e)
  • causality reflecting on configurations iff $∀ x ∈ \Confstar[E], ∀ e∈ x, \, f^{-1}_{ x}[\dc f(e)] ⊆ \dc e$

The proof is straightforward.

8.

Any rigid map f:EF is configuration reflecting on configurations:

xxC(E),f[x]C(F)xC(E)

Let’s show that any xxC(E) such that f[x]C(F) is a configuration of E.

  • x is consistent, as x is (and is transitive)

  • x is down-closed:

    As f[x] is a configuration, hence down-closed:

    f[x]f[x]

    But f being monotone implies:

    f[x]f[x]

    So

    f[x]f[x]

    and as taking preimages preserves inclusion and f is injective on the configuration xx:

    x=injectivityf1(f(x))f1(f(x))=injectivityx

9.

Any map f:EF is rigid iff

xCo(E),yCo(F),yf[x]xCo(E),xxfx=y
  • : Let’s assume that f is rigid and yf[x]. Then yf[x], where xPfin(x). All that remains to be shown is that x is a configuration, which directly results from the previous lemma.

  • : it’ll be sufficient to show that for all eE, f[e]f(e). As f is a map:

    yf(e)f[e]

    So there exists Co(E)xe such that fx=y. On top of that, f(e)y so by injectivity of f on the configuration e:

    ex

    Therefore:

    ex(as x is down-closed)f[e]f[x]=yf(e)(as images preserve inclusion)

Well-founded posets

A well-founded/finitary poset:

is a poset in which every element has only a finite number of elements below it.

10.

Let P be a well-founded poset. Then P,P,Pfin(P) is an event structure.

All the properties to check are trivially true:

  • P is indeed a partial order for which all the downard closures are finite (as P is well-founded)

  • all the singletons are members of Pfin(P)

  • Pfin(P) is stable under inclusion

  • the augmentation property holds, as x{e} is finite provided x is.

11.

Let P,Q be well-founded posets, and f:PQ be any function. Then: f is a rigid map iff pP,f[p]=fp and f is causality reflecting.

  • : if f is a rigid map, then it is a map, and it is causality reflecting on configurations as showed previously, and for all pP:

    • f[p]fp as f is monotone
    • fpf[p] as shown previously (since fp is the smallest configuration containing fp)
  • : if f is causality reflecting and f[p]=fp, then:

    • f is monotone as f[p]fp for all pP
    • f is configuration preserving, as the image of a finite set is a finite set
    • f is injective (and hence locally injective): if f(e)=f(e), then as f is causality reflecting:

      • f(e)Ff(e) so eEe
      • f(e)Ff(e) so eEe

      thus e=e by antisymmetry.

Path lifting property

The category of paths :
  • Objects: finite posets (seen as event structures)
  • Morphisms: rigid maps

Let I:E be its full embedding in the category of event structures and rigid maps.

Comma category IE:
  • Objects: pairs P,f where P and f:PE is a rigid map
  • Morphisms: a:P,fQ,g where a:PQ is a rigid map and the following triangle commutes:
PafQgE
A map f:EF satisifies the path lifting property:

iff any such commuting square where P,Q factors into two commuting triangles:

PEfQF

12.

We can regard Co(E), as a sub-category of the comma IE. Is it full?

It’s not: with

  • E{α,β},αβ
  • x{α}Co(E)
  • f{xEαβ

then the following diagram commutes:

xffEidE

so that fHomIE(x,E), but f is not the inclusion map.

13.

A rigid map f:EF satisfies the path lifting property iff:

xCo(E),yCo(F),f[x]yxCo(E);xxf[x]=y
  • : Let xCo(E) and yCo(F) such that f[x]y. Then by lifting property, the following square factors into these two triangles (where ιx and ιy are the inclusion maps):

    xιxf|xEfyιyφF

    By setting xφ[y]:

    • xCo(E): since is the image of a finite configuration by a configuration-preserving map
    • xx: as

      f[x]yφ[f[x]]=ιx[x]=xφ[y]x(since taking images preserves inclusion)
    • f[x]=f[φ[y]]=ιy(y)=y
  • : let P,Q such that the following square commutes:

    PpgEfQqF

    Then xp[P]Co(E) and yq[Q]Co(F) (images of finite configurations by configuration-preserving maps) are such that

    f[x]=f[p(P)]=q[g[P]]g[P]Qq[Q]y

    so there exists a finite configuration Co(E)xx such that f[x]=y.

    By local injectivity, the function $f_{ x’}^{ y}: x’ ⟶ y(corestrictiontoyoftherestrictiontox’$) is bijective. One can check that its inverse ${f_{ x’}^{ y}}^{-1}$ remains a rigid map:
    • it is injective, thus locally injective.
    • it is monotone, since the map f is causality reflecting on configurations (as seen previously)
    • it is configuration-preserving, that is:

      Co(F)yy,f1[y]Co(E)

      It amounts to show that

      xx,yf[x]Co(F)xCo(E)

      which results from f being configuration-reflecting on the configuration x (as it is a rigid map: cf. lemma 8).

    So by setting $φ ≝ {f_{ x’}^{ y}}^{-1} \circ q$, the result follows, as
    φg=f|x|y1qg=fp=p(as fp:Pf[x]f[x]=y ) PpgEfQqφF

Leave a comment