Papers
Topics
Authors
Recent
Search
2000 character limit reached

Free Cornering with Protocol Choice

Updated 7 July 2026
  • Free cornering with protocol choice extends a monoidal category model by incorporating branching constructors, enriching the interaction protocols between processes.
  • It introduces left-controlled (U+W) and right-controlled (U×W) choices that affect resource exchanges in a strict single-object monoidal double category.
  • The framework employs term rewriting with terminating and confluent β-rules, supporting a coherence theorem that uniquely aligns vertical 2-cells with base morphisms.

Free cornering with protocol choice is an extension of the free cornering of a monoidal category in which interaction protocols may branch. In the underlying free-cornering construction, objects of a strict monoidal category represent resources, morphisms represent processes, horizontal composition tensors independent processes in parallel, and vertical composition synchronizes interactions through “corner” cells that pass resources between processes. Protocol choice enriches the vertical exchange language with two branching constructors, U+WU+W and U×WU\times W, corresponding respectively to left-controlled and right-controlled choice. The resulting structure is presented as a strict single-object monoidal double category, admits an operational semantics by term rewriting, and satisfies a coherence theorem identifying closed vertical cells with ordinary morphisms of the base category (Nester et al., 2023, Nester et al., 1 Aug 2025), building on the original free-cornering framework used to study optics and comb diagrams (Boisseau et al., 2022).

1. Free cornering as a double-categorical process theory

The free cornering of a strict monoidal category AA is a single-object double category whose horizontal edge-monoid is (ObA,,I)(\mathrm{Ob}\,A,\otimes,I) and whose vertical edges are generated by exchange data (Nester et al., 1 Aug 2025). In the earlier formulation for a strict monoidal category CC, horizontal edges are the objects of CC, while vertical edges are polarized objects

Corner(C)V=(C0×{,}),\mathrm{Corner}(C)_V=\bigl(C_0\times\{\circ,\bullet\}\bigr)^*,

that is, the free strict monoid on symbols AA^\circ and AA^\bullet (Boisseau et al., 2022). These polarized generators encode directed resource passage along the vertical boundary.

The generating 2-cells consist of ordinary morphisms of the base category, treated as cells with trivial exchange boundaries, together with corner cells that expose or absorb one resource token. In the notation of the rewriting presentation, these are

A,  A,  A,  A,A⌜,\;A⌝,\;A⊏,\;A⊐,

while in the optics-oriented presentation they appear as corner cells satisfying the usual yanking identities (Nester et al., 1 Aug 2025, Boisseau et al., 2022). These yanking equations are the key coherence axioms ensuring that corner cells behave as companion–conjoint structure for resource exchange.

This construction is motivated as a model of interacting processes. A 2-cell with horizontal boundary U×WU\times W0 and vertical boundaries given by exchanges U×WU\times W1 and U×WU\times W2 describes a process transforming U×WU\times W3 to U×WU\times W4 while interacting along its left and right boundaries according to those protocols (Nester et al., 1 Aug 2025). The graphical significance of this viewpoint was already visible before protocol choice was added: horizontal cells with no top or bottom wires recover optics, and more general horizontal cells with alternating polarized boundaries represent comb diagrams (Boisseau et al., 2022).

2. Adding branching communication protocols

Protocol choice extends the vertical exchange language by adjoining two binary constructors. In the 2025 rewriting presentation, the exchange monoid is generated by

  • U×WU\times W5,
  • U×WU\times W6 and U×WU\times W7 for each U×WU\times W8,
  • sequential composition U×WU\times W9,
  • internal choice AA0,
  • external choice AA1,

subject only to associativity and unit for AA2 (Nester et al., 1 Aug 2025). The intended meaning is asymmetric: AA3 is the protocol in which the left participant first chooses whether to do AA4 or AA5, whereas AA6 is the protocol in which the right participant first chooses whether to do AA7 or AA8 (Nester et al., 2023). A common misconception is to treat AA9 and (ObA,,I)(\mathrm{Ob}\,A,\otimes,I)0 as formally interchangeable branching operators; the construction does not do so, because the polarity of the chooser is part of the protocol semantics.

In the 2023 construction, the vertical monoid is enlarged from (ObA,,I)(\mathrm{Ob}\,A,\otimes,I)1 to

(ObA,,I)(\mathrm{Ob}\,A,\otimes,I)2

and the horizontal edge-monoid remains unchanged (Nester et al., 2023). The new double category retains the same resource theory horizontally and changes only the interaction language vertically. This distinction is structurally important: protocol choice is not a coproduct on ordinary morphisms of (ObA,,I)(\mathrm{Ob}\,A,\otimes,I)3, but an extension of the exchange boundary calculus.

The new generators introduced for branching are projections, injections, pairing, and copairing. Their universal-property behavior can be summarized as follows.

Constructor Boundary role Characteristic equation
(ObA,,I)(\mathrm{Ob}\,A,\otimes,I)4 projections from (ObA,,I)(\mathrm{Ob}\,A,\otimes,I)5 (ObA,,I)(\mathrm{Ob}\,A,\otimes,I)6, (ObA,,I)(\mathrm{Ob}\,A,\otimes,I)7
(ObA,,I)(\mathrm{Ob}\,A,\otimes,I)8 reacts to right choice cell into (ObA,,I)(\mathrm{Ob}\,A,\otimes,I)9
CC0 injections into CC1 CC2, CC3
CC4 reacts to left choice cell out of CC5

For the 2023 formulation, these constructions require CC6 to be a distributive monoidal category with distributive binary coproducts CC7, and under that hypothesis the free cornering with choice CC8 is again a strict monoidal double category (Nester et al., 2023).

3. Syntax and operational dynamics

The dynamic presentation of free cornering with protocol choice is given by a typed term language CC9 whose terms have judgments

CC0

with CC1 and CC2 (Nester et al., 1 Aug 2025). The grammar contains:

  • CC3 for each morphism CC4,
  • CC5,
  • CC6,
  • vertical composition CC7,
  • horizontal composition CC8,
  • corner cells,
  • injections CC9 into Corner(C)V=(C0×{,}),\mathrm{Corner}(C)_V=\bigl(C_0\times\{\circ,\bullet\}\bigr)^*,0,
  • branching terms Corner(C)V=(C0×{,}),\mathrm{Corner}(C)_V=\bigl(C_0\times\{\circ,\bullet\}\bigr)^*,1 and Corner(C)V=(C0×{,}),\mathrm{Corner}(C)_V=\bigl(C_0\times\{\circ,\bullet\}\bigr)^*,2,
  • projections Corner(C)V=(C0×{,}),\mathrm{Corner}(C)_V=\bigl(C_0\times\{\circ,\bullet\}\bigr)^*,3 from Corner(C)V=(C0×{,}),\mathrm{Corner}(C)_V=\bigl(C_0\times\{\circ,\bullet\}\bigr)^*,4.

Basic equations Corner(C)V=(C0×{,}),\mathrm{Corner}(C)_V=\bigl(C_0\times\{\circ,\bullet\}\bigr)^*,5 are imposed so that Corner(C)V=(C0×{,}),\mathrm{Corner}(C)_V=\bigl(C_0\times\{\circ,\bullet\}\bigr)^*,6 becomes a single-object double category. These include

Corner(C)V=(C0×{,}),\mathrm{Corner}(C)_V=\bigl(C_0\times\{\circ,\bullet\}\bigr)^*,7

together with identities, associativities, and interchange (Nester et al., 1 Aug 2025). In effect, these equations identify the structural syntax with the categorical composition laws already present in the free cornering.

Operational behavior is then introduced by four Corner(C)V=(C0×{,}),\mathrm{Corner}(C)_V=\bigl(C_0\times\{\circ,\bullet\}\bigr)^*,8-rewrite rules: Corner(C)V=(C0×{,}),\mathrm{Corner}(C)_V=\bigl(C_0\times\{\circ,\bullet\}\bigr)^*,9

AA^\circ0

These rules encode two forms of interaction: send–receive cancellation through corner cells, and branch selection through the choice constructors (Nester et al., 1 Aug 2025). The rewriting system is defined modulo the congruence AA^\circ1, so operational steps are taken up to the structural equations of the double category.

To obtain the quotient corresponding to the free cornering with protocol choice, one also adds AA^\circ2-equations: AA^\circ3

AA^\circ4

The resulting congruence AA^\circ5 is the smallest congruence containing the reflexive–transitive–symmetric closure of AA^\circ6 together with these AA^\circ7-laws, and the 2-cells of the free cornering with protocol choice are precisely AA^\circ8 (Nester et al., 1 Aug 2025).

4. Termination, confluence, and coherence

The rewriting theory of Nester and Voorneveld establishes that the AA^\circ9-system is terminating modulo AA^\bullet0 by means of a simple combinatorial measure (Nester et al., 1 Aug 2025). For a term AA^\bullet1, let AA^\bullet2 be the number of “special” constructors, namely corners, AA^\bullet3, AA^\bullet4, AA^\bullet5, and AA^\bullet6. Every AA^\bullet7-step strictly decreases AA^\bullet8, and AA^\bullet9 preserves this measure. Since the system is finitely branching, this yields termination modulo A,  A,  A,  A,A⌜,\;A⌝,\;A⊏,\;A⊐,0.

Local confluence is obtained from the observation that there are no critical overlaps among the four A,  A,  A,  A,A⌜,\;A⌝,\;A⊏,\;A⊐,1-rules A,  A,  A,  A,A⌜,\;A⌝,\;A⊏,\;A⊐,2–A,  A,  A,  A,A⌜,\;A⌝,\;A⊏,\;A⊐,3 (Nester et al., 1 Aug 2025). By Newman’s Lemma, termination plus local confluence implies confluence, so A,  A,  A,  A,A⌜,\;A⌝,\;A⊏,\;A⊐,4 is confluent modulo A,  A,  A,  A,A⌜,\;A⌝,\;A⊏,\;A⊐,5. The same paper also states that if the base monoidal category A,  A,  A,  A,A⌜,\;A⌝,\;A⊏,\;A⊐,6 carries a finitely-branching monoidal rewrite relation A,  A,  A,  A,A⌜,\;A⌝,\;A⊏,\;A⊐,7, then A,  A,  A,  A,A⌜,\;A⌝,\;A⊏,\;A⊐,8 and A,  A,  A,  A,A⌜,\;A⌝,\;A⊏,\;A⊐,9 commute up to U×WU\times W00, and their union remains confluent and terminating modulo U×WU\times W01.

The central structural result is the coherence theorem. Let U×WU\times W02 denote the vertical monoidal category of cells of U×WU\times W03 of type U×WU\times W04, with tensor given by horizontal composition. Then the canonical functor

U×WU\times W05

is an isomorphism of monoidal categories (Nester et al., 1 Aug 2025). Equivalently, every vertical 2-cell is uniquely U×WU\times W06-equal to one arising from a single parallel-noninteracting morphism of U×WU\times W07.

The proof proceeds by normalization, characterization of normal forms, fullness, and faithfulness. Every vertical term U×WU\times W08 rewrites to a U×WU\times W09-normal form; any such normal form has no corners, sums, or products and is therefore U×WU\times W10-equal to a pure U×WU\times W11-term; every morphism in U×WU\times W12 thus comes from some U×WU\times W13 in U×WU\times W14; and if U×WU\times W15, then both are already normal, forcing U×WU\times W16 (Nester et al., 1 Aug 2025). The paper explicitly notes that the U×WU\times W17-equations are only needed to identify different nested U×WU\times W18-normal forms yielding the same pure U×WU\times W19-term.

5. Examples of branching interaction

The most detailed worked example is a vending-machine protocol (Nester et al., 1 Aug 2025). Let U×WU\times W20 be the free symmetric monoidal category generated by the objects

U×WU\times W21

and morphisms

U×WU\times W22

The exchange protocol is

U×WU\times W23

This means that the left participant chooses between a cigarettes branch and two gum branches: pay \$U\times W$242 and receive gum plus \$1 change.

A machine term

U×WU\times W25

implements the three branches by combining corner cells with the base morphisms U×WU\times W26, U×WU\times W27, and U×WU\times W28 (Nester et al., 1 Aug 2025). Three customer behaviors U×WU\times W29, U×WU\times W30, and U×WU\times W31 then represent, respectively, “insert \$U\times W$321 for Gum,” and “insert \$2, get gum+change.” Their interactions satisfy

U×WU\times W33

The first reduction is displayed explicitly: U×WU\times W34 The significance of the example is that the protocol layer disappears under normalization, leaving precisely the intended resource transformation in the base category.

The 2023 construction also provides string-diagram examples illustrating the asymmetry of left and right branching (Nester et al., 2023). One example uses a protocol U×WU\times W35, interpreted as a left choice between sending bread and sending dough, to define a process U×WU\times W36 that yields bread in either branch. A second example uses U×WU\times W37 to describe a right-branching protocol in which the opponent determines whether dough or oven is supplied first; the constructed process responds by baking in either case. These examples clarify that protocol choice is not merely additive syntax but a control structure for interactive scheduling.

6. Relation to optics, strong-functor models, and later developments

Free cornering predates protocol choice and already had a substantive categorical role. In “Cornering Optics,” the free cornering of a monoidal category is shown to provide a natural setting for optics, and more general horizontal cells encode comb diagrams of arbitrary depth (Boisseau et al., 2022). A horizontal cell with vertical boundary U×WU\times W38 is exactly an optic, while a right comb of depth U×WU\times W39 corresponds to a horizontal cell with U×WU\times W40 alternating teeth. This places free cornering with protocol choice inside a broader diagrammatic program: branching protocols enrich the same double-categorical environment in which optics and combs are already expressible.

The 2023 paper also gives a model of protocol choice in terms of strong functors and strong natural transformations (Nester et al., 2023). For a cartesian closed category U×WU\times W41 whose cartesian product distributes over coproducts, the single-object double category U×WU\times W42 has strong endofunctors as vertical edges and strong natural transformations as squares. In this setting, coproducts and products of strong functors realize the injections, projections, pairings, and copairings required for U×WU\times W43 and U×WU\times W44, and there is a strict double-functor

U×WU\times W45

sending

U×WU\times W46

The paper states that U×WU\times W47 provides a fully faithful model of U×WU\times W48 and interprets the protocol constructors in computational-effects terms: U×WU\times W49 may be identified with the reader monad, U×WU\times W50 with the writer comonad, U×WU\times W51 as nondeterministic choice between two effects, and U×WU\times W52 as environment-driven choice (Nester et al., 2023).

A plausible implication is that free cornering with protocol choice sits at a junction of three lines of work: process interaction via double categories, diagrammatic reasoning for optics and combs, and effectful semantics via strong functors. The 2025 rewriting system adds a dynamic and proof-theoretic layer to that junction by showing that the protocol machinery is confluent, terminating, and coherent (Nester et al., 1 Aug 2025). The result is a formalism in which branching interaction can be expressed operationally without losing the categorical identity of the underlying process theory.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (3)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Free Cornering with Protocol Choice.