Rendering string diagrams recursively

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Rubio-Madrigal, Celia, Hedges, Jules
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866917629513433088
author Rubio-Madrigal, Celia
Hedges, Jules
author_facet Rubio-Madrigal, Celia
Hedges, Jules
contents String diagrams are a graphical language used to represent processes that can be composed sequentially or in parallel, which correspond graphically to horizontal or vertical juxtaposition. In this paper we demonstrate how to compute the layout of a string diagram by folding over its algebraic representation in terms of sequential and parallel composition operators. The algebraic representation can be seen as a term of a free monoidal category or a proof tree for a small fragment of linear logic. This contrasts to existing non-compositional approaches that use graph layout techniques. The key innovation is storing the diagrams in binary space-partition trees, maintaining a right-trapezoidal shape for the diagram's outline as an invariant. We provide an implementation in Haskell, using an existing denotational graphics library called Diagrams. Our renderer also supports adding semantics to diagrams to serve as a compiler, with matrix algebra used as an example.
format Preprint
id arxiv_https___arxiv_org_abs_2404_02679
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Rendering string diagrams recursively
Rubio-Madrigal, Celia
Hedges, Jules
Category Theory
Computational Geometry
String diagrams are a graphical language used to represent processes that can be composed sequentially or in parallel, which correspond graphically to horizontal or vertical juxtaposition. In this paper we demonstrate how to compute the layout of a string diagram by folding over its algebraic representation in terms of sequential and parallel composition operators. The algebraic representation can be seen as a term of a free monoidal category or a proof tree for a small fragment of linear logic. This contrasts to existing non-compositional approaches that use graph layout techniques. The key innovation is storing the diagrams in binary space-partition trees, maintaining a right-trapezoidal shape for the diagram's outline as an invariant. We provide an implementation in Haskell, using an existing denotational graphics library called Diagrams. Our renderer also supports adding semantics to diagrams to serve as a compiler, with matrix algebra used as an example.
title Rendering string diagrams recursively
topic Category Theory
Computational Geometry
url https://arxiv.org/abs/2404.02679