The Structure of First-Order Causality

The Structure of First-Order Causality

Abstract

Game semantics describe the interactive behavior of proofs by interpreting formulas as games on which proofs induce strategies. Such a semantics is introduced here for capturing dependencies induced by quantifications in first-order propositional logic. One of the main difficulties that has to be faced during the elaboration of this kind of semantics is to characterize definable strategies, that is strategies which actually behave like a proof. This is usually done by restricting the model to strategies satisfying subtle combinatorial conditions, whose preservation under composition is often difficult to show. Here, we present an original methodology to achieve this task, which requires to combine advanced tools from game semantics, rewriting theory and categorical algebra. We introduce a diagrammatic presentation of the monoidal category of definable strategies of our model, by the means of generators and relations: those strategies can be generated from a finite set of atomic strategies and the equality between strategies admits a finite axiomatization, this equational structure corresponding to a polarized variation of the notion of bialgebra. This work thus bridges algebra and denotational semantics in order to reveal the structure of dependencies induced by first-order quantifiers, and lays the foundations for a mechanized analysis of causality in programming languages.

Denotational semantics were introduced to provide useful abstract invariants of proofs and programs modulo cut-elimination or reduction. In particular, game semantics, introduced in the nineties, have been very successful in capturing precisely the interactive behavior of programs. In these semantics, every type is interpreted as a game (that is as a set of moves that can be played during the game) together with the rules of the game (formalized by a partial order on the moves of the game indicating the dependencies between them). Every move is to be played by one of the two players, called Proponent and Opponent, who should be thought respectively as the program and its environment. The interactions between these two players are sequences of moves respecting the partial order of the game, called plays. In this setting, a program is characterized by the set of plays that it can exchange with its environment during an execution and thus defines a strategy reflecting the interactive behavior of the program inside the game specified by the type of the program.

The notion of pointer game, introduced by Hyland and Ong [4], gave one of the first fully abstract models of PCF (a simply-typed extended with recursion, conditional branching and arithmetical constants). It has revealed that PCF programs generate strategies with partial memory, called innocent because they react to Opponent moves according to their own view of the play. Innocence is in this setting the main ingredient to characterize definable strategies, that is strategies which are the interpretation of a PCF term, because it describes the behavior of the purely functional core of the language (-terms), which also corresponds to proofs in propositional logic. This seminal work has lead to an extremely successful series of semantics: by relaxing in various ways the innocence constraint on strategies, it became suddenly possible to generalize this characterization to PCF programs extended with imperative features such as references, control, non-determinism, etc.

Unfortunately, these constraints are quite specific to game semantics and remain difficult to link with other areas of computer science or algebra. They are moreover very subtle and combinatorial and thus sometimes difficult to work with. This work is an attempt to find new ways to describe the behavior of proofs.

Generating instead of restricting. In this paper, we introduce a game semantics capturing dependencies induced by quantifiers in first-order propositional logic, forming a strict monoidal category called . Instead of characterizing definable strategies of the model by restricting to strategies satisfying particular conditions, we show here that we can equivalently use a kind of converse approach. We show how to generate definable strategies by giving a presentation of those strategies: a finite set of definable strategies can be used to generate all definable strategies by composition and tensoring, and the equality between strategies obtained this way can be finitely axiomatized.

What we mean precisely by a presentation is a generalization of the usual notion of presentation of a monoid to monoidal categories. For example, consider the additive monoid . It admits the presentation , where and are two generators and is a relation between two elements of the free monoid on . This means that is isomorphic to the free monoid on the two generators, quotiented by the smallest congruence (wrt multiplication) such that . More generally, a (strict) monoidal category (such as ) can be presented by a polygraph, consisting of typed generators in dimension 1 and 2 and relations in dimension 3, such that the category is monoidally equivalent to the free monoidal category on the generators, quotiented by the congruence generated by the relations.

Reasoning locally. The usefulness of our construction is both theoretic and practical. It reveals that the essential algebraic structure of dependencies induced by quantifiers is a polarized variation of the well-known structure of bialgebra, thus bridging game semantics and algebra. It also proves very useful from a technical point of view: this presentation allows us to reason locally about strategies. In particular, it enables us to deduce a posteriori that these strategies actually compose, which is not trivial, and it also enables us to deduce that the strategies of the category are definable (one only needs to check that generators are definable). Finally, the presentation gives a finite description of the category, that we can hope to manipulate with a computer, paving the way for a series of new tools to automate the study of semantics of programming languages.

A game semantics capturing first-order causality. Game semantics has revealed that proofs in logic describe particular strategies to explore formulas, or more generally sequents. Namely, a formula (or a sequent) is a syntactic tree expressing in which order its connectives must be introduced in cut-free proofs. In this sense, it can be seen as the rules of a game whose moves correspond to connectives. For instance, consider a sequent of the form

where and are propositional formulas which may contain free variables. When searching for a proof of , the quantification must be introduced before the quantification, and the quantification can be introduced independently. Here, introducing an existential quantification on the right of a sequent should be thought as playing a Proponent move (the strategy gives a witness for which the formula holds) and introducing an universal quantification as playing an Opponent move (the strategy receives a term from its environment, for which it has to show that the formula holds); introducing a quantification on the left of a sequent is similar but with polarities inverted since it is the same as introducing the dual quantification on the right of the sequent. So, the game associated to the formula will be the partial order on the first-order quantifications appearing in the formula, depicted below (to be read from the top to the bottom):

This partial order is sometimes called the syntactic partial order generated by the sequent. Possible proofs of sequent in first-order propositional logic are of one of the three following shapes:

where denotes the formula where every occurrence of the free variable has been replaced by the term . These proofs introduce the connectives in the orders depicted respectively below

which are all total orders extending the partial order of the game : these correspond to the plays in the strategies interpreting the proofs in the game semantics. In this sense, they have more dependencies between moves: proofs add causal dependencies between connectives.

Some sequentializations induced by proofs are not really relevant. For example consider a proof of the form

The order in which the introduction rules of the universal and existential quantifications are introduced is not really significant here since this proof might always be reorganized into the proof

by “permuting” the introduction rules. Similarly, the following permutations of rules are always possible:

Interestingly, the permutation

is only possible if the term used in the introduction rule of the connective does not have as free variable. If the variable is free in then the rule introducing can only be used after the rule introducing the connective. Now, the sequent will be interpreted by the following game

Whenever the connective depends on the connective ( whenever is free in the witness term provided for ), the strategy corresponding to the proof will contain a causal dependency, which will be depicted by an oriented wire

and we sometimes say that the move justifies the move . A simple further study of permutability of introduction rules of first-order quantifiers shows that this is the only kind of relevant dependencies. These permutations of rules where the motivation for the introduction of non-alternating asynchronous game semantics [18], where plays are considered modulo certain permutations of consecutive moves. However, we focus here on causality and define strategies by the dependencies they induce on moves (a precise description of the relation between these two points of view was investigated in [16]). They are also very closely related to the motivations for the introduction of Hintikka’s games and independence friendly logic [6].

We thus build a strict monoidal category whose objects are games and whose morphisms are strategies, in which we can interpret formulas and proofs in the connective-free fragment of first-order propositional logic, and write for the subcategory of definable strategies. One should thus keep in mind the following correspondences while reading this paper:

category logic game semantics combinatorial objects
object formula game syntactic order
morphism proof strategy justification order

This paper is devoted to the construction of a presentation for this category. We introduce formally the notion of presentation of a monoidal category in Section 1 and recall some useful classical algebraic structures in Section 2. Then, we give a presentation of the category of relations in Section 3 and extend this presentation to the category , that we define formally in Section 4.

1Presentations of monoidal categories

We recall here briefly some basic definitions in category theory. The interested reader can find a more detailed presentation of these concepts in MacLane’s reference book [14].

Monoidal categories. A monoidal category is a category together with a functor

and natural isomorphisms

satisfying coherence axioms [14]. A symmetric monoidal category is a monoidal category together with a natural isomorphism

satisfying coherence axioms and such that . A monoidal category is strictly monoidal when the natural isomorphisms , and are identities. For the sake of simplicity, in the rest of this paper we only consider strict monoidal categories. Formally, it can be shown that it is not restrictive, using MacLane’s coherence theorem [14]: every monoidal category is monoidally equivalent to a strict one.

A (strict) monoidal functor between two strict monoidal categories and is a functor between the underlying categories such that for every objects and of , and . A monoidal natural transformation between two monoidal functors is a natural transformation between the underlying functors and such that for every objects and of , and . Two monoidal categories and are monoidally equivalent when there exists a pair of monoidal functors and and two invertible monoidal natural transformations and .

Monoidal theories. A monoidal theory is a strict monoidal category whose objects are the natural integers, such that the tensor product on objects is the addition of integers. By an integer , we mean here the finite ordinal and the addition is given by (we will simply write instead of in the following). An algebra of a monoidal theory in a strict monoidal category is a strict monoidal functor from to ; we write for the category of algebras from to and monoidal natural transformations between them. Monoidal theories are sometimes called PRO, this terminology was introduced by MacLane in [13] as an abbreviation for “category with products”. They generalize equational theories – or Lawere theories [12] – in the sense that operations are typed and can moreover have multiple outputs as well as multiple inputs, and are not necessarily cartesian but only monoidal.

Presentations of monoidal categories. We now recall the notion of presentation of a monoidal category by the means of typed 1- and 2-dimensional generators and relations.

Suppose that we are given a set whose elements are called atomic types or generators for objects. We write for the free monoid on the set and for the corresponding injection; the product of this monoid is written . The elements of are called types. Suppose moreover that we are given a set , whose elements are called generators (for morphisms), together with two functions , which to every generator associate a type called respectively its source and target. We call a signature such a 4-uple :

Every such signature generates a free strict monoidal category , whose objects are the elements of and whose morphisms are formal composite and formal tensor products of elements of , quotiented by suitable laws imposing associativity of composition and tensor and compatibility of composition with tensor, see [2]. If we write for the morphisms of this category and for the injection of the generators into this category, we get a diagram

in together with a structure of monoidal category on the graph

where the morphisms are the morphisms (unique by universality of ) such that and . The size of a morphism in is defined inductively by

In particular, a morphism is of size if and only if it is an identity.

Our constructions are an instance in dimension 2 of Burroni’s polygraphs [2], and Street’s 2 computads [21], who made precise the sense in which the generated monoidal category is free on the signature. Namely, the following notion of equational theory is a specialization of the definition of a 3-polygraph to the case where there is only one generator for 0-cells.

Every equational theory defines a monoidal category obtained from the monoidal category generated by the signature by quotienting the morphisms by the congruence generated by the relations of the equational theory : it is the smallest congruence (wrt both composition and tensoring) such that for every element of .

We say that a monoidal equational theory is a presentation of a strict monoidal category when is monoidally equivalent to the category generated by . Any monoidal category admits a presentation (for example, the trivial presentation with the set of objects of , the set of morphisms of , and the set of all equalities between morphisms holding in ), which is not unique in general. In such a presentation, the category generated by the signature underlying should be thought as a category of “terms” (which will be considered modulo the relations described by ) and is thus sometimes called the syntactic category of .

We sometimes informally say that an equational theory has a generator to mean that is an element of such that and . We also say that the equational theory has a relation to mean that there exists an element of such that and .

We say that two equational theories are equivalent when they generate monoidally equivalent categories. A generator in an equational theory is superfluous when the equational theory obtained from by removing the generator and all equations involving , is equivalent to . Similarly, an equation is superfluous when the equational theory obtained from by removing the equation is equivalent to . An equational theory is minimal when it does not contain any superfluous generator or equation.

Notice that every monoidal equational theory where the set is reduced to only one object generates a monoidal category which is a monoidal theory ( is the free monoid on one object), thus giving a notion of presentation of those categories.

Presented categories as models. Suppose that a strict monoidal category is presented by an equational theory , generating a category . The proof that presents can generally be decomposed in two parts:

  1. is a model of the equational theory

    : there exists a functor . This amounts to checking that there exists a functor such that for all morphisms in , implies .

  2. is a fully-complete model of the equational theory

    : the functor is full and faithful.

We sometimes say that a morphism of represents the morphism of .

Usually, the first point is a straightforward verification. Proving that the functor is full and faithful often requires more work. In this paper, we use the methodology introduced by Burroni [2] and refined by Lafont [11]. We first define canonical forms which are canonical representatives of the equivalence classes of morphisms of under the congruence generated by the relations of . Proving that every morphism is equal to a canonical form can be done by induction on the size of the morphisms. Then, we show that the functor is full and faithful by showing that the canonical forms are in bijection with the morphisms of .

It should be noted that this is not the only technique to prove that an equational theory presents a monoidal category. In particular, Joyal and Street have used topological methods [8] by giving a geometrical construction of the category generated by a signature, in which morphisms are equivalence classes under continuous deformation of progressive plane diagrams (we give some more details about those diagrams, also called string diagrams, later on). Their work is for example extended by Baez and Langford in [1] to give a presentation of the 2-category of 2-tangles in 4 dimensions. The other general methodology the author is aware of, is given by Lack in [9], by constructing elaborate monoidal theories from simpler monoidal theories. Namely, a monoidal theory can be seen as a monad in a particular span bicategory, and monoidal theories can therefore be “composed” given a distributive law between their corresponding monads. We chose not to use those methods because, even though they can be very helpful to build intuitions, they are difficult to formalize and even more to mechanize: we believe indeed that some of the tedious proofs given in this paper could be somewhat automated, a first step in this direction was given in [17] where we describe an algorithm to compute critical pairs in polygraphic rewriting systems of dimension 2.

String diagrams. String diagrams provide a convenient way to represent and manipulate the morphisms in the category generated by a presentation. Given an object in a strict monoidal category , a morphism can be drawn graphically as a device with two inputs and one output of type as follows:

when it is clear from the context which morphism of type we are picturing (we sometimes even omit the source and target of the morphisms). Similarly, the identity (which we sometimes simply write ) can be pictured as a wire

The tensor of two morphisms and is obtained by putting the diagram corresponding to above the diagram corresponding to . So, for instance, the morphism can be drawn diagrammatically as

Finally, the composite of two morphisms and can be drawn diagrammatically by putting the diagram corresponding to at the right of the diagram corresponding to and “linking the wires”. The diagram corresponding to the morphism is thus

Suppose that is a signature. Every element of such that

where the and are elements of , can be similarly represented by a diagram

where wires correspond to generators for objects and circled points to generators for morphisms. Bigger diagrams can be constructed from these diagrams by composing and tensoring them, as explained above. Joyal and Street have shown in details in [8] that the category of those diagrams, modulo continuous deformations, is precisely the free category generated by a signature (which they call a “tensor scheme”). For example, the equality

in the category of the above example, which holds because of the axioms satisfied in any monoidal category, can be shown by continuously deforming the diagram on the left-hand side below into the diagram on the right-hand side:

All the equalities satisfied in any monoidal category generated by a signature have a similar geometrical interpretation. And conversely, any deformation of diagrams corresponds to an equality of morphisms in monoidal categories.

2Algebraic structures

In this section, we recall the categorical formulation of some well-known algebraic structures, the most fundamental in this work being maybe the notion of bialgebra. We give those definitions in the setting of a strict monoidal category which is not required to be symmetric. We suppose that is a strict monoidal category, fixed throughout the section.

Symmetric objects. A symmetric object of is an object together with a morphism

called symmetry and pictured as

such that the diagrams

and

commute. Graphically,

(the first equation is sometimes called the Yang-Baxter equation for braids). In particular, in a symmetric monoidal category, every object is canonically equipped with a structure of symmetric object.

Monoids. A monoid in is an object together with two morphisms

called respectively multiplication and unit and pictured respectively as

such that the diagrams

commute. Graphically,

A symmetric monoid is a monoid equipped with a symmetry morphism which is compatible with the operations of the monoid in the sense that it makes the diagrams

commute. Graphically,

are satisfied, as well as the equations obtained by turning the diagrams upside-down. A commutative monoid is a symmetric monoid such that the diagram

commutes. Graphically,

In particular, a commutative monoid in a symmetric monoidal category is a commutative monoid whose symmetry corresponds to the symmetry of the category: . In this case, the equations can always be deduced from the naturality of the symmetry of the monoidal category.

A comonoid in is an object together with two morphisms

respectively drawn as

satisfying dual coherence diagrams. Similarly, the notions symmetric comonoid and cocommutative comonoid can be defined by duality.

The definition of a monoid can be reformulated internally, in the language of equational theories:

The equations correspond precisely to the equations for a monoid object . If we write for the monoidal category generated by the equational theory , the algebras of in a strict monoidal category are precisely its monoids: the category of algebras of the monoidal theory in is monoidally equivalent to the category of monoids in . Similarly, all the algebraic structures introduced in this section can be defined using algebraic theories.

Bialgebras. A bialgebra in is an object together with five morphisms

such that is a symmetry for , is a symmetric monoid and is a symmetric comonoid. The morphism is thus pictured as in , and as in , and and as in . Those two structures should be coherent, in the sense that the diagrams

should commute. Graphically,

should be satisfied.

A bialgebra is commutative (cocommutative) when the induced symmetric monoid (symmetric comonoid ) is commutative (cocommutative), and bicommutative when it is both commutative and cocommutative. A bialgebra is qualitative when the diagram

commutes. Graphically,

Dual objects. An object of is said to be left dual to an object when there exists two morphisms

called respectively the unit and the counit of the duality and respectively pictured as

making the diagrams

commute. Graphically,

We write for the equational theory associated to dual objects.

3Presenting the category of relations

We now introduce a presentation of the category of finite ordinals and relations, by refining presentations of simpler categories. This result is mentioned in Examples 6 and 7 of [5] and is proved in three different ways in [10], [19] and [9]. The methodology adopted here to build this presentation has the advantage of being simple to check (although very repetitive) and can be extended to give the presentation of the category of games and strategies described in Section ?.

The simplicial category. The simplicial category is the monoidal theory whose morphisms are the monotone functions from to . It has been known for a long time that this category is closely related to the notion of monoid, see [14] or [11] for example. This result can be formulated as follows:

In this sense, the simplicial category impersonates the notion of monoid. We extend here this result to more complex categories.

Multirelations. A multirelation between two finite sets and is a function . It can be equivalently be seen as a multiset whose elements are in or as a matrix over , or as a span

in the category of finite sets – for the latest case, the multiset representation can be recovered from the span by

for every element . If and are two multirelations, their composition is defined by

This corresponds to the usual composition of matrices if we see and as matrices over , and as the span obtained by computing the pullback

if we see and as spans in . The cardinal of a multirelation is the sum

of its coefficients. We write for the monoidal theory of multirelations: its objects are finite ordinals and morphisms are multirelations between them. It is a strict symmetric monoidal category with the tensor product defined on objects and morphisms by disjoint union, and thus a monoidal theory. In this category, the object can be equipped with the obvious structure of bicommutative bialgebra

In this structure, is the multirelation defined by for or , is the multirelation dual to , and and are uniquely defined by the fact that the object is both initial and terminal in . We now show that the category of multirelations is presented by the equational theory of bicommutative bialgebras. We write for the syntactic category of (the monoidal category generated by the underlying signature of ), so that is the monoidal category generated by , where is the congruence generated by the relations of . The bicommutative bialgebra structure induces an “interpretation functor” such that , , , and . Since, the morphisms satisfy the equations of bicommutative bialgebra, the interpretations of two morphisms of related by will be equal. The interpretation functor thus extends to a functor .

For every morphism in , where , we define a morphism written by

Graphically,

The stairs morphisms are defined inductively as either or where is a stair, and are represented graphically as

The length of a stairs is defined as if it is an identity , or as the length of the stairs plus one if it is of the form . The stairs of length is written .

Morphisms which are precanonical forms are defined inductively: is either empty or

or

where is a precanonical form. In this case, we write respectively as (the identity morphism ), as , as or as (where is the length of the stairs in the morphism). Algebraically,

and

Precanonical forms are thus the well formed morphisms (where compositions respect types) generated by the following grammar:

In order to simplify the notation, we will remove the superscripts in the following and simply write instead of .

It is easy to remark that every non-identity morphism of a category generated by a monoidal equational theory (such as ) can be written as , where is a generator, thus allowing us to reason inductively about morphisms, by case analysis on the integer and on the generator . Using this technique, we can prove that

By induction on the size of .

  • If then and . If then . Otherwise, we have and is equivalent to a canonical form by induction on .

  • Otherwise, the morphism is of the form with and . By induction hypothesis, the morphism is equivalent to a canonical form. Moreover, the morphism is of the form where is either , , , or . We show the result by distinguishing these five cases for and for each case by distinguishing whether the precanonical form of is of the form , , or .

    1. Suppose that .

      1. If then we distinguish two cases.

        • If then we have the equivalence

          where is equivalent to a precanonical form by induction hypothesis.

        • Otherwise, the morphism can be represented by

          and is of the form , where the morphism is equivalent to a precanonical form by induction hypothesis.

      2. If then the morphism can be represented by

        and is of the form where the morphism is equivalent to a precanonical form by induction hypothesis.

      3. If then we distinguish four cases

        • If then we have the equivalence

          and is of the form where the morphism is equivalent to a precanonical form by induction hypothesis.

        • If then we have the equivalences

          and we actually are in the case which is handled just below.

        • If then we have the equivalence

          and is of the form where the morphism is equivalent to a precanonical form by induction hypothesis.

        • If then can be represented by

          and is of the form where the morphism is equivalent to a precanonical form by induction hypothesis.

    2. Suppose that .

      1. If then which is a precanonical form.

      2. If then we distinguish two cases.

        • If then which is a precanonical form.

        • Otherwise, where is equivalent to a precanonical form by induction hypothesis.

      3. If then where the morphism is equivalent to a precanonical form by induction hypothesis.

      4. If then we distinguish two cases.

        • If then where the morphism is equivalent to a precanonical form by induction hypothesis.

        • Otherwise, where the morphism is equivalent to a precanonical form by induction hypothesis.

    3. Suppose that .

      1. If then we distinguish two cases.

        • If then where is a precanonical form.

        • Otherwise, where is equivalent to a precanonical form by induction hypothesis.

      2. If then where the morphism is equivalent to a precanonical form by induction hypothesis

      3. If the we distinguish three cases.

        • If then where the morphism is equivalent to a precanonical form by induction hypothesis

        • If then where the morphism is equivalent to a precanonical form by induction hypothesis.

        • Otherwise, where the morphism is equivalent to a precanonical form by induction hypothesis.

    4. Suppose that .

      1. If then we distinguish two cases.

        • If then where the morphism is a precanonical form.

        • Otherwise, where is equivalent to a precanonical form by induction hypothesis.

      2. If then where the morphism is equivalent to a precanonical form by induction hypothesis.

      3. If then we distinguish three cases.

        • If then where the morphism is equivalent to a precanonical form by induction hypothesis.

        • If then where the morphism is equivalent to a precanonical form by induction hypothesis.

        • Otherwise, where the morphism is equivalent to a precanonical form by induction hypothesis.

    5. Suppose that .

      1. If then we distinguish two cases.

        • If then where the morphism is equivalent to a precanonical form by induction hypothesis.

        • Otherwise, where the morphism is equivalent to a precanonical form by induction hypothesis.

      2. If then where the morphism is equivalent to a precanonical form by induction hypothesis.

      3. If then we distinguish four cases.

        • If then where the morphism is equivalent to a precanonical form by induction hypothesis.

        • If then where the morphism is equivalent to a precanonical form by induction hypothesis.

        • If then where the morphism is equivalent to a precanonical form by induction hypothesis.

        • Otherwise, where the morphism is equivalent to a precanonical form by induction hypothesis.

The canonical forms are precanonical forms which are normal wrt the following rewriting system:

when considered as words generated by the grammar . It is routine verifications to show that two precanonical forms and such that rewrites to are equivalent. This rewriting system thus provides us with a notion of canonical form for precanonical forms:

We first show that the rewriting system is terminating by defining an interpretation of precanonical forms into , ordered lexicographically. This interpretation is defined on generators by

and on composition and identities by

where and are such that and . It can be remarked that the rules are strictly decreasing wrt this interpretation:

and

The rewriting system is therefore terminating. It moreover locally confluent, since the two critical pairs are joinable:

The rewriting system being terminating, it is thus confluent.

From Lemmas ? and ?, we can finally deduce that every morphism of the category is equivalent to an unique canonical form.

We show the result by showing that the functor is full, that every multirelation is the image of a precanonical form in , by induction on and on the cardinal of .

  1. If then is the interpretation of the precanonical form , with occurrences of .

  2. If and for every , then is of the form , where is the multirelation such that . By induction hypothesis, is the interpretation of a precanonical form and is therefore the interpretation of the precanonical form .

  3. Otherwise, we necessarily have and there exists and index such that . We write for the greatest such index. The multirelation is of the form

    Where is the multirelation defined by and for every . The multirelation is thus of cardinal and is the interpretation of a precanonical form by induction hypothesis. Finally, is the interpretation of the precanonical form .

The proof of the previous lemma provides us with an algorithm which, given a multirelation , builds a precanonical form whose interpretation is . The execution of this algorithm consists in enumerating the coefficients of the multirelation column after column. We suppose given a multirelation . In pseudo-code, the algorithm can be written as follows:

for to do
for downto do
for to do
print “
done
print “
done
done
for to do
print “
done
print “

The word printed by the algorithm will be a precanonical form whose interpretation is .

Knowing the general form of canonical forms, it is easy to show that the precanonical form produced by the algorithm are actually canonical forms. Conversely, every canonical form can be read as an “enumeration” of the coefficients of a multirelation in a way similar the previous algorithm. This shows that, in fact, multirelations are in bijection with the canonical forms . A morphism of being equivalent to an unique canonical form, we finally deduce that

Relations. The monoidal category has finite ordinals as objects and relations as morphisms. This category can be obtained from by quotienting the morphisms by the equivalence relation on multirelations such that two multirelations are equivalent when they have the same null coefficients. We can therefore easily adapt the previous presentation to show that

In particular, precanonical forms are the same and canonical forms are defined by adding the rule

to the rewriting system , which remains normalizing.

4A game semantics for first-order causality

Suppose that we are given a fixed first-order language , that is

  • a set of proposition symbols with given arities,

  • a set of function symbols with given arities,

  • and a set of first-order variables .

Terms

and formulas are respectively generated by the following grammars:

(we only consider formulas without connectives here). We suppose that application of propositions and functions always respect arities. Formulas are considered modulo renaming of bound variables and substitution of a free variable by a term in a formula is defined as usual, avoiding capture of variables. In the following, we sometimes omit the arguments of propositions when they are clear from the context. We also suppose given a set of axioms, that is pairs of propositions, which is reflexive, transitive and closed under substitution (so that the obtained logic has the cut-elimination property). The logic associated to these formulas has the following inference rules:

Games and strategies. Games are defined as follows.

The size of a game is the cardinal of its set of moves .

If and are two games, their tensor product is defined by disjoint union on moves, polarities and causality:

The opposite game of the game is obtained from by inverting polarities of moves:

Finally, the arrow game is defined by

A game is filiform when the associated partial order is total (we are mostly interested in such games in the following).

The size of a game is the cardinal of and the size of a strategy is the cardinal of the relation .

A category of games. At this point it would be very tempting to build a category whose

  • objects are games,

  • morphisms are strategies on the game .

The identity strategy (the apostrophe sign is only used here to identify unambiguously the two copies of ) would be the strategy such that for every move in and in , which are instances of a same move , we have whenever and whenever (it can easily be checked that this definition satisfies the axioms for strategies). Now consider two strategies and . The partial order on the set is relation on , a subset of , and similarly for . The partial order corresponding to composite of the two strategies and would be defined as the transitive closure of the relation on restricted to the set . It is easily checked that identities act as neutral elements for composition. Similar ideas for composing strategies were in particular developed in the appendix of [7].

For example, consider the game with two Proponent moves and and the empty causality relation, the game with two Proponent moves and and the causality relation , the strategy such that and and the strategy such that and . Their composite is the strategy such that and . This can be viewed graphically as follows:

In the diagram above the dotted arrows represent the causal dependencies in the games and solid arrows the dependencies in the strategies.

However, the composite of two strategies is not necessarily a strategy! For example consider the game defined as before excepted that is now an Opponent move, the game defined as before excepted that is now an Opponent move, the strategy (where denotes the empty game) such that and the strategy such that and . Their “composite” is not a strategy because it does not satisfy the acyclicity property:

This is a typical example of the fact that compositionality of strategies in game semantics is often a subtle property that should be checked very carefully.

Fortunately, if we restrict the previous attempt of construction of a category, by only allowing finite filiform games as objects, then we actually construct a category (the composite of two morphisms is a morphism) that we write . Moreover, we show that the connective-free fragment of first-order propositional logic can be interpreted in this category and that the conditions imposed on strategies characterize exactly the strategies interpreting proofs (Theorem ?).

We could give a direct proof of the fact that is actually a category. However, a direct proof of the fact that the composite of two acyclic strategies is acyclic is combinatorial, lengthy and requires global reasoning about strategies. This proof would show, by reductio ad absurdum, that if the composite of two strategies contains a cycle (together with the causality of the game) then one of the strategies already contains a cycle. So, it would moreover not be very satisfactory in the sense that it would not be constructive. Instead of proceeding in this way, we define the category in an abstract fashion, construct a presentation of this category, and conclude a posteriori that in fact its only morphisms are strategies, which implies in particular (Theorem ?) that strategies do actually compose!

We first define a weaker notion of strategy

In particular, every strategy is a cyclic strategy. From this definition it is very easy to build a category whose

  • objects are games,

  • morphisms are strategies on the game ,

  • identities and composition are defined as above.

Since the definition of cyclic strategy is much weaker than the notion of strategy, it is routine to check that the category is well-defined. We now define the category as the category generated in by finite filiform games and strategies, the smallest category whose

  • objects are finite filiform games,

  • for every objects and , and every strategy in the sense of Definition ?, we have that is a morphism in ,

  • for every objects , and , if is a morphism in and is a morphism in then their composite (in the category ) is a morphism in .

As mentioned above, we will show in Theorem ? that the only morphisms of this category are actually strategies.

A monoidal structure on . If and are two games, the game (to be read before ) is the game defined as on moves and polarities and is the transitive closure of the relation