United Monoids: Finding Simplicial Sets and Labelled Algebraic Graphs in Trees

02/18/2022
by   Andrey Mokhov, et al.
0

Graphs and various graph-like combinatorial structures, such as preorders and hypergraphs, are ubiquitous in programming. This paper focuses on representing graphs in a purely functional programming language like Haskell. There are several existing approaches; one of the most recently developed ones is the "algebraic graphs" approach (2017). It uses an algebraic data type to represent graphs and has attracted users, including from industry, due to its emphasis on equational reasoning and making a common class of bugs impossible by eliminating internal invariants. The previous formulation of algebraic graphs did not support edge labels, which was a serious practical limitation. In this paper, we redesign the main algebraic data type and remove this limitation. We follow a fairly standard approach of parameterising a data structure with a semiring of edge labels. The new formulation is both more general and simpler: the two operations for composing graphs used in the previous work can now be obtained from a single operation by fixing the semiring parameter to zero and one, respectively. By instantiating the new data type with different semirings, and working out laws for interpreting the resulting expression trees, we discover an unusual algebraic structure, which we call "united monoids", that is, a pair of monoids whose unit elements coincide. We believe that it is worth studying united monoids in their full generality, going beyond the graphs which prompted their discovery. To that end, we characterise united monoids with a minimal set of axioms, prove a few basic theorems, and discuss several notable examples. We validate the presented approach by implementing it in the open-source *algebraic-graphs* library. Our theoretical contributions are supported by proofs that are included in the paper and have also been machine-checked in Agda. By extending algebraic graphs with support for edge labels, we make them suitable for a much larger class of possible applications. By studying united monoids, we provide a theoretical foundation for further research in this area.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/19/2023

Colorings of some Cayley graphs

Cayley graphs are graphs on algebraic structures, typically groups or gr...
research
03/09/2021

The Agda Universal Algebra Library, Part 1: Foundation

The Agda Universal Algebra Library (UALib) is a library of types and pro...
research
09/11/2019

Algebraic Property Graphs

In this paper, we use algebraic data types to define a formal basis for ...
research
06/08/2021

Categorical Data Structures for Technical Computing

Many mathematical objects can be represented as functors from finitely-p...
research
11/05/2021

On Homomorphism Graphs

We introduce a new type of examples of bounded degree acyclic Borel grap...
research
12/11/2017

Operads in algebraic combinatorics

The main ideas developed in this habilitation thesis consist in endowing...
research
01/21/2023

On the Algebraic Properties of Flame Graphs

Flame graphs are a popular way of representing profiling data. In this p...

Please sign up or login with your details

Forgot password? Click here to reset