Equational reasoning with context-free families of string diagrams
String diagrams provide an intuitive language for expressing networks of interacting processes graphically. A discrete representation of string diagrams, called string graphs, allows for mechanised equational reasoning by double-pushout rewriting. However, one often wishes to express not just single equations, but entire families of equations between diagrams of arbitrary size. To do this we define a class of context-free grammars, called B-ESG grammars, that are suitable for defining entire families of string graphs, and crucially, of string graph rewrite rules. We show that the language-membership and match-enumeration problems are decidable for these grammars, and hence that there is an algorithm for rewriting string graphs according to B-ESG rewrite patterns. We also show that it is possible to reason at the level of grammars by providing a simple method for transforming a grammar by string graph rewriting, and showing admissibility of the induced B-ESG rewrite pattern.
💡 Research Summary
This paper presents a formal framework for equational reasoning about infinite families of string diagrams, moving beyond rewriting single diagrams to manipulating entire parametrised classes simultaneously.
String diagrams offer an intuitive graphical language for composing processes in symmetric monoidal categories, with applications in quantum computing, concurrency, and linguistics. Equational reasoning is performed via diagram rewriting, which is mechanized using a discrete combinatorial representation called string graphs and the double-pushout (DPO) rewriting approach.
A key challenge is expressing and proving families of equations, like an n-fold copy rule, where a single schematic rule stands for infinitely many concrete instances. Existing methods, like !-box notation, are limited in the types of graph languages they can define (e.g., they cannot generate arbitrary cliques or long chains).
The core contribution is the definition of B-ESG (Boundary Encoded String Graph) grammars, a class of context-free graph grammars suitable for generating families of string graphs and, crucially, families of string graph rewrite rules. A B-ESG grammar is a pair B = (G, T):
Gis a B-edNCE grammar, a well-studied type of vertex replacement grammar with a “boundary condition” that ensures confluence (independence of derivation order).Ggenerates encoded string graphs, which are string graphs that may also contain special encoding edges (labeled e.g., α, β) connecting node-vertices.Tis a decoding system, a confluent and terminating set of DPO rules that replace each encoding edge with a fixed, connected string graph fragment containing only node-vertices.
The paper establishes several foundational results:
- Well-definedness: It proves that the language generated by any B-ESG grammar, after applying the decoding system
T, consists entirely of well-formed string graphs. - Decidability: It shows that the language membership problem (is a given string graph in the language of
B?) and the match enumeration problem (find all matches of a pattern defined by a B-ESG grammar in a host string graph) are decidable. The decidability of match enumeration implies the existence of an algorithm for rewriting string graphs according to B-ESG rewrite patterns. - B-ESG Rewrite Rules: It defines a B-ESG rewrite rule as a pair of B-ESG grammars with identical non-terminal sets and a 1-to-1 correspondence between productions, thereby defining an infinite family of concrete DPO rewrite rules.
- Meta-level Reasoning: The paper introduces a powerful idea: lifting a standard string graph rewrite rule to the grammar level. It provides a method to transform one B-ESG grammar into another via such a rule, proving the admissibility of the induced B-ESG rewrite pattern. This allows one to prove that all string graphs in a family defined by grammar
B1can be rewritten to corresponding graphs in the family defined byB2, effectively proving an infinite family of equations in one step. This lays the groundwork for performing structural induction via grammar transformation.
In conclusion, the paper provides a rigorous, context-free grammatical foundation for defining and reasoning about families of string diagrams. It solves key decidability problems and opens the door to automated, meta-level inductive proofs over diagram families, significantly enhancing the expressive power and automation potential of diagrammatic reasoning systems.
Comments & Academic Discussion
Loading comments...
Leave a Comment