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.

[1]  Samson Abramsky,et al.  A categorical semantics of quantum protocols , 2004, Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science, 2004..

[2]  Aleks Kissinger,et al.  Pattern Graph Rewrite Systems , 2012, DCM.

[3]  John C. Baez,et al.  Categories in Control , 2014, 1405.6881.

[4]  Aleks Kissinger,et al.  !-graphs with Trivial Overlap Are Context-free , 2015, GaM.

[5]  Filippo Bonchi,et al.  Full Abstraction for Signal Flow Graphs , 2015, POPL.

[6]  Pawel Sobocinski,et al.  Representations of Petri Net Interactions , 2010, CONCUR.

[7]  Terrence W. Pratt,et al.  Pair Grammars, Graph Languages and String-to-Graph Translations , 1971, J. Comput. Syst. Sci..

[8]  Aleks Kissinger,et al.  Strong Complementarity and Non-locality in Categorical Quantum Mechanics , 2012, 2012 27th Annual IEEE Symposium on Logic in Computer Science.

[9]  Hartmut Ehrig,et al.  Handbook of graph grammars and computing by graph transformation: vol. 3: concurrency, parallelism, and distribution , 1999 .

[10]  Aleks Kissinger,et al.  Open-graphs and monoidal theories† , 2010, Mathematical Structures in Computer Science.

[11]  Mehrnoosh Sadrzadeh,et al.  Lambek vs. Lambek: Functorial vector space semantics and string diagrams for Lambek calculus , 2013, Ann. Pure Appl. Log..

[12]  Bob Coecke,et al.  Interacting quantum observables: categorical algebra and diagrammatics , 2009, ArXiv.

[13]  A. Joyal,et al.  The geometry of tensor calculus, I , 1991 .

[14]  Aleks Kissinger,et al.  The Compositional Structure of Multipartite Quantum Entanglement , 2010, ICALP.

[15]  Grzegorz Rozenberg,et al.  Boundary NLC Graph Grammars-Basic Definitions, Normal Forms, and Complexity , 1986, Inf. Control..

[16]  Grzegorz Rozenberg,et al.  Handbook of Graph Grammars and Computing by Graph Transformations, Volume 1: Foundations , 1997 .

[17]  Simon Perdrix,et al.  Graph States and the Necessity of Euler Decomposition , 2009, CiE.

[18]  Miriam Backens,et al.  The ZX-calculus is complete for stabilizer quantum mechanics , 2013, 1307.7025.

[19]  Aleks Kissinger,et al.  Quantomatic: A proof assistant for diagrammatic reasoning , 2015, CADE.

[20]  B. Coecke Quantum picturalism , 2009, 0908.1787.

[21]  Andy Schürr,et al.  Specification of Graph Translators with Triple Graph Grammars , 1994, WG.