Table of Contents
Fetching ...

Measuring data types

Lukas Mulder, Paige Randall North, Maximilien Péroux

TL;DR

The paper develops a Sweedler-style theory of measuring coalgebras to enrich endofunctor algebras over coalgebras, showing that, under accessible lax symmetric monoidal endofunctors on a locally presentable closed category, Alg is enriched, tensored, and cotensored over coAlg. It then extends the W-type/W-co type paradigm by introducing C-initial algebras and a measuring-tensor framework, enabling partial and infinite inductive definitions to be controlled via measurings. The authors provide a general existence theorem for universal measurings, derive dual representations via C-triangulators, and illustrate the theory through extensive, detailed examples of unit, empty, monoid, naturals, lists, and tree data types. The results connect categorical semantics of inductive data types with practical semantic interpretations in programming languages, offering a robust toolkit for analyzing and constructing inductive/coinductive types via enriched categorical structures.

Abstract

In this article, we combine Sweedler's classic theory of measuring coalgebras -- by which $k$-algebras are enriched in $k$-coalgebras for $k$ a field -- with the theory of W-types -- by which the categorical semantics of inductive data types in functional programming languages are understood. In our main theorem, we find that under some hypotheses, algebras of an endofunctor are enriched in coalgebras of the same endofunctor, and we find polynomial endofunctors provide many interesting examples of this phenomenon. We then generalize the notion of initial algebra of an endofunctor using this enrichment, thus generalizing the notion of W-type. This article is an extended version of arXiv:2303.16793, it adds expository introductions to the original theories of measuring coalgebras and W-types along with some improvements to the main theory and many explicitly worked examples.

Measuring data types

TL;DR

The paper develops a Sweedler-style theory of measuring coalgebras to enrich endofunctor algebras over coalgebras, showing that, under accessible lax symmetric monoidal endofunctors on a locally presentable closed category, Alg is enriched, tensored, and cotensored over coAlg. It then extends the W-type/W-co type paradigm by introducing C-initial algebras and a measuring-tensor framework, enabling partial and infinite inductive definitions to be controlled via measurings. The authors provide a general existence theorem for universal measurings, derive dual representations via C-triangulators, and illustrate the theory through extensive, detailed examples of unit, empty, monoid, naturals, lists, and tree data types. The results connect categorical semantics of inductive data types with practical semantic interpretations in programming languages, offering a robust toolkit for analyzing and constructing inductive/coinductive types via enriched categorical structures.

Abstract

In this article, we combine Sweedler's classic theory of measuring coalgebras -- by which -algebras are enriched in -coalgebras for a field -- with the theory of W-types -- by which the categorical semantics of inductive data types in functional programming languages are understood. In our main theorem, we find that under some hypotheses, algebras of an endofunctor are enriched in coalgebras of the same endofunctor, and we find polynomial endofunctors provide many interesting examples of this phenomenon. We then generalize the notion of initial algebra of an endofunctor using this enrichment, thus generalizing the notion of W-type. This article is an extended version of arXiv:2303.16793, it adds expository introductions to the original theories of measuring coalgebras and W-types along with some improvements to the main theory and many explicitly worked examples.
Paper Structure (68 sections, 32 theorems, 306 equations)

This paper contains 68 sections, 32 theorems, 306 equations.

Key Result

Theorem 1

Let $\mathscr{C}$ be a locally presentable, closed symmetric monoidal category. Let $F\colon \mathscr{C}\rightarrow \mathscr{C}$ be an accessible, lax symmetric monoidal functor. Then the category of $F$-algebras in $\mathscr{C}$ is enriched, tensored and contensored over the closed symmetric monoid

Theorems & Definitions (140)

  • Theorem : \ref{['thm:enriched']}
  • Example 2.1.1
  • Example 2.1.2
  • Example 2.2.1
  • Definition 2.3.1: convolution algebra
  • Example 2.3.2
  • Definition 2.4.1: partial homomorphism
  • Example 2.4.2
  • Example 2.4.3
  • Example 2.4.4
  • ...and 130 more