Rewriting Structured Cospans
Daniel Cicala
Abstract
We develop a theory of rewriting for structured cospans in order to extend compositional methods for modeling open networks. First, we introduce a category whose objects are structured cospans, and establish conditions under which it is adhesive or a topos. These results guarantee that double pushout rewriting can be applied in this setting. We then define structured cospan grammars and construct their associated languages via a 2-categorical framework, capturing both network composition and rewrite dynamics. As an application, we show that for graphs, hypergraphs, Petri nets, and their typed variants, any grammar induces the same language as its corresponding discrete grammar. This equivalence enables an inductive characterization of rewriting, thereby generalizing classical results from graph transformation to a broader class of categorical models.
