arXiv ScienceSearch

arXiv · 2404.02679

Rendering string diagrams recursively

Abstract

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.

Explore related subjects

Keep this discovery

BibTeXRIS

Celia Rubio-Madrigal, Jules Hedges. 2024-04-03. Rendering string diagrams recursively. https://arxiv.org/abs/2404.02679

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

A model structure for cartesian 2-fibrations

Cartesian 2-fibrations provide a way to understand indexed categories, but their classical ``straightening'' construction requires several layers of weak coherence data. This paper develops a homotopical framework that replaces much of this bookkeeping with a fully strict model. By using marked 2-categories to record the cartesian morphisms and 2-cells, we construct a model structure whose fibrant objects are precisely the cartesian 2-fibrations over a fixed 2-category $\mathcal{C}$. We then show that the marked Grothendieck construction identifies these 2-fibrations, up to weak equivalence, with strict 2-functors from $\mathcal{C}$ into $2\mathrm{Cat}$. As an additional contribution, we construct localizations of 2-categories that simultaneously invert selected morphisms and 2-cells.

math.CT

A Natural Fuzzy Order on Fuzzy Numbers

This paper introduces a natural fuzzy order on fuzzy numbers that extends the natural orders on real numbers and interval numbers. We investigate its completeness properties and show that the space of uniformly bounded fuzzy numbers is conically complete and conically cocomplete, and that it is complete if and only if the underlying continuous t-norm is the G\"odel t-norm. Moreover, it is proved that this space constitutes a \([0,1]\)-enriched domain if and only if the underlying continuous t-norm satisfies the (S) condition. These results provide a foundation for ordering fuzzy numbers.

math.CT

Noetherian forms of free non-symmetric operads

In this paper, we study certain categories of labeled finite rooted ordered trees over a fixed set of labels where each label is equipped with an arity: a fixed number of children that the vertex with the given label must have. Equivalently, these are expression trees for operations in a free non-symmetric operad. A morphism between these trees matches a pruning of one tree (a prefix) with an entire subtree of another (a suffix). We characterize such categories, up to isomorphism, in terms of suitable exactness properties. It turns out that these categories exhibit strong algebraic behavior, in the sense that every such category, when appended with a strict initial object, has a particularly nice noetherian form.

math.CT