Table of Contents
Fetching ...

Context-Free Languages of String Diagrams

Matt Earnshaw, Mario Román

TL;DR

The paper extends formal language theory to monoidal categories by defining context-free monoidal languages as morphisms into diagram contexts, unifying languages of words, trees, and graphs within a single algebraic framework. It develops diagram-contexts, raw optics, and the optical-contour adjunction to prove a two-dimensional representation theorem: any context-free monoidal language is the image of a regular monoidal language under a monoidal functor. By leveraging polygraphs, multicategories, and diagrammatic syntax, the work provides a versatile, unified approach to parsing and reasoning about diagrammatic languages, with concrete instances such as balanced parentheses, unbraids, and hypergraphs. The results open pathways to automata-like formalisms for monoidal languages and suggest broader applicability to other diagrammatic structures beyond monoidal categories.

Abstract

We introduce context-free languages of morphisms in monoidal categories, extending recent work on the categorification of context-free languages, and regular languages of string diagrams. Context-free languages of string diagrams include classical context-free languages of words, trees, and hypergraphs, when instantiated over appropriate monoidal categories. Using a contour-splicing adjunction, we prove a representation theorem for context-free languages of string diagrams: every such language arises as the image under a monoidal functor of a regular language of string diagrams.

Context-Free Languages of String Diagrams

TL;DR

The paper extends formal language theory to monoidal categories by defining context-free monoidal languages as morphisms into diagram contexts, unifying languages of words, trees, and graphs within a single algebraic framework. It develops diagram-contexts, raw optics, and the optical-contour adjunction to prove a two-dimensional representation theorem: any context-free monoidal language is the image of a regular monoidal language under a monoidal functor. By leveraging polygraphs, multicategories, and diagrammatic syntax, the work provides a versatile, unified approach to parsing and reasoning about diagrammatic languages, with concrete instances such as balanced parentheses, unbraids, and hypergraphs. The results open pathways to automata-like formalisms for monoidal languages and suggest broader applicability to other diagrammatic structures beyond monoidal categories.

Abstract

We introduce context-free languages of morphisms in monoidal categories, extending recent work on the categorification of context-free languages, and regular languages of string diagrams. Context-free languages of string diagrams include classical context-free languages of words, trees, and hypergraphs, when instantiated over appropriate monoidal categories. Using a contour-splicing adjunction, we prove a representation theorem for context-free languages of string diagrams: every such language arises as the image under a monoidal functor of a regular language of string diagrams.
Paper Structure (7 sections, 3 theorems, 1 equation, 4 figures)

This paper contains 7 sections, 3 theorems, 1 equation, 4 figures.

Key Result

Proposition 6

String diagrams with "generators" in a "polygraph" construct a "monoidal category" (fig:string-diagrams). The monoidal category of string diagrams over a polygraph is the ""free strict monoidal category"" over the polygraph joyal91selinger2011. Every monoidal category is equivalent to a strict one.

Figures (4)

  • Figure 1: (Left) Generic form of a context-free rule. (Right) Context-free rules as a morphism of multigraphs into spliced arrows; here, spliced arrows in a monoid.
  • Figure 2: The free strict monoidal category over a polygraph $Γ$ has set of objects $S_Γ^{*}$ and morphisms string diagrams given inductively over the generators of $Γ$ as above, quotiented by isotopy. The leftmost rule denotes the empty diagram. We use colours here to indicate sorts. In string diagrammatic syntax, the usual equations required for term syntax, such as associativity of the tensor product, hold automatically.
  • Figure 3: Transitions for the Sierpiński "monoidal automaton" (left) and an element of the language (right). The initial and final states are the empty word.
  • Figure :

Theorems & Definitions (17)

  • Definition 1
  • Definition 2: Melliès and Zeilberger mellies2
  • Definition 3: Melliès and Zeilberger mellies2
  • Definition 4: Melliès and Zeilberger mellies2
  • Definition 5
  • Proposition 6
  • Definition 7
  • Definition 8
  • Definition 9
  • Example 10
  • ...and 7 more