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.
We would like to thank the anonyomous reviewers for their feedback. We also gratefully acknowledge financial support from EPSRC, the Scatcherd European Scholarship, and the John Templeton Foundation.
- 1.Abramsky, S., Coecke, B.: A categorical semantics of quantum protocols. In: Proceedings of 19th IEEE Symposium on Logic in Computer Science (2004)Google Scholar
- 2.Backens, M.: The zx-calculus is complete for stabilizer quantum mechanics. In: Proceedings of 9th Workshop on Quantum Physics and Logic QPL 2012 (2012)Google Scholar
- 3.Baez, J.C., Erbele, J.: Categories in control (2014). arXiv:1405.6881
- 4.Bonchi, F., Sobociński, P., Zanasi, F.: Full abstraction for signal flow graphs. In: Principles of Programming Languages POPL 2015 (2015)Google Scholar
- 7.Coecke, B., Duncan, R., Kissinger, A., Wang, Q.: Strong complementarity and non-locality in categorical quantum mechanics. In: Proceedings of the 27th Annual IEEE Symposium on Logic in Computer Science (2012)Google Scholar
- 13.Kissinger, A., Merry, A., Soloviev, M.: Pattern graph rewrite systems. In: 8th International Workshop on Developments in Computational Models (2012)Google Scholar
- 14.Kissinger, A., Zamdzhiev, V.: !-graphs with trivial overlap are context-free. In: Rensink, A., Zambon, E. (eds.) Proceedings Graphs as Models, GaM 2015, London, UK, 11-12 April 2015, vol. 181. pp. 16–31 (2015). doi: 10.4204/EPTCS.181.2
- 15.Kissinger, A., Zamdzhiev, V.: Quantomatic: a proof assistant for diagrammatic reasoning (2015). arXiv:1503.01034
- 19.Schürr, A.: Specification of graph translators with triple graph grammars. In: Mayr, E.W., Schmidt, G., Tinhofer, G. (eds.) GTTCCS. LNCS. Springer, Heidelberg (1995)Google Scholar