arXiv reader

Measuring data types

Lukas Mulder, Paige Randall North and Maximilien Péroux

arXiv
2405.14678v2 · PDF · 7 July 2026
Categories
math.CT, cs.LO, math.AT
Licence
CC BY 4.0 The site shows the text.

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.

Items 35

Theorem

Theorem 1.1

EBZ5

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 cotensored over the closed symmetric monoidal category of F-coalgebras in \mathscr{C}.

Theorem

Theorem 2.1

EAJX

Given k-algebras A and B, the measuring coalgebra (\underline{\mathrm{Alg}}_k(A, B), \widetilde{\mathrm{ev}}) exists and is determined by the following equalizer in \mathrm{coAlg}_k

\begin{tikzcd} \underline{\mathrm{Alg}}_k(A, B) \ar[dashed]{r}{\overline{\mathrm{ev}}} & T^\vee ([A, B]) \ar[shift left =1]{r}{\Phi}\ar[shift right =1]{r}[swap]{\Psi} & T^\vee\left([A^{\otimes 2}, B]\right)\oplus T^\vee([A, k]). \end{tikzcd}
Theorem

Theorem 2.2

LL6D

Given a k-algebra B and a k-coalgebra C, the measuring tensor (C\triangleright A, u) exists and is the following coequalizer in \mathrm{Alg}_k

\begin{tikzcd} {T(C\otimes_k A^{\otimes 2})} \oplus T(C\otimes_k k) \ar[shift left =1]{r}{\Phi}\ar[shift right =1]{r}[swap]{\Psi} & T(C\otimes_k A) \ar[dashed]{r}{u'} & C\triangleright A. \end{tikzcd}
Theorem

Theorem 2.3

F1B8

The category \mathrm{Alg}_k of k-algebras is enriched in the closed symmetric monoidal category (\mathrm{coAlg}_k, \otimes_k, k, \underline{\mathrm{coAlg}}_k(-,-)) of k-coalgebras, for which the hom-coalgebra between two algebras A and B is given by the universal measuring \underline{\mathrm{Alg}}_k(A, B). It is also tensored over \mathrm{coAlg}_k via the measuring tensor and cotensored via the convolution algebra. In other words, we obtain the following natural isomorphisms in \mathrm{coAlg}_k:

\underline{\mathrm{coAlg}}_k(C, \underline{\mathrm{Alg}}_k(A, B))\cong \underline{\mathrm{Alg}}_k(C\triangleright A, B) \cong \underline{\mathrm{Alg}}_k(A, [C,B]).
Proof

Proof

DAQJ

The convolution algebra [-,-]\colon \mathrm{coAlg}_k^\mathrm{op}\times \mathrm{Alg}_k \rightarrow \mathrm{Alg}_k determines \mathrm{Alg}_k as a right module over \mathrm{coAlg}_k^\mathrm{op}, in the sense that we have the following natural isomorphisms in \mathrm{Alg}_k for all coalgebras C,D and algebra A

[C\otimes_k D, A]\cong [C, [D,A]] \quad \quad [k, A]\cong A.

Thus \mathrm{Alg}_k^\mathrm{op} is a left module over \mathrm{coAlg}_k via [-,-]^\mathrm{op}\colon \mathrm{coAlg}_k\times \mathrm{Alg}_k^\mathrm{op}\rightarrow \mathrm{Alg}_k^\mathrm{op}. Moreover, for any algebra B, the induced functor [-,B]^\mathrm{op}\colon \mathrm{coAlg}_k\rightarrow \mathrm{Alg}_k^\mathrm{op} has a right adjoint \underline{\mathrm{Alg}}_k(-, B)\colon \mathrm{Alg}_k^\mathrm{op}\rightarrow \mathrm{coAlg}_k as we have the natural isomorphism

\mathrm{coAlg}_k(C, \underline{\mathrm{Alg}}_k(A, B))\cong \mathrm{Alg}_k(A, [C, B]).

By [hylandetal, 3.1], we obtain that \mathrm{Alg}_k^\mathrm{op} is enriched, tensored and cotensored over \mathrm{coAlg}_k. Thus \mathrm{Alg}_k is enriched, tensored and cotensored over \mathrm{coAlg}_k.

Theorem

Theorem 3.1

ZR78

Given any function f\colon A \to B in \mathrm{Set}, the categorical W-type W(f) exists [dybjer, Thm. 1]. In fact, all categorical W-types exist in any topos [mp, Prop. 3.6] with a natural numbers object.

Theorem

Theorem 3.2 (Adámek’s fixed point theorem)

9AEZ

Consider a category \mathscr{C} with an initial object 0 and colimits of sequences \omega \to \mathscr{C}, where \omega denotes the countably infinite ordinal. Consider an endofunctor F that preserves these colimits. Then the colimit of the following sequence is an initial algebra of F:

0 \xrightarrow{!} F0 \xrightarrow{F!} F^2 0 \to \cdots.
Theorem

Theorem 3.3 (Adámek’s fixed point theorem)

2NSS

Consider a category \mathscr{C} with a terminal object 1 and limits of sequences \omega \to \mathscr{C}, where \omega denotes the countably infinite ordinal. Consider an endofunctor F that preserves these limits. Then the limit of the following sequence is a terminal coalgebra of F:

\cdots \to F^2 1 \xrightarrow{F !} F 1 \xrightarrow{!} 1.
Theorem

Theorem 4.1

Z7GV

Suppose that \mathscr{C} is a symmetric monoidal closed category that is locally presentable, and that F\colon \mathscr{C}\rightarrow \mathscr{C} is a symmetric lax monoidal, accessible endofunctor. Given F-algebras A and B, then the universal measuring coalgebra ({\underline{\mathrm{Alg}}}(A,B), \widetilde{\mathrm{ev}}) exists and is determined as the following equalizer diagram in {\mathrm{coAlg}}:

\begin{tikzcd} {\underline{\mathrm{Alg}}}(A,B) \ar[dashed]{r}{\overline{\mathrm{ev}}} & \mathrm{Cof}\big( [A,B]\big) \ar[shift left]{r}{\Phi} \ar[shift right]{r}[swap]{\Psi} & \mathrm{Cof}\big( [FA, B]\big). \end{tikzcd}
Proof

Proof

P59L

Since every C-indexed partial homomorphism \widetilde{\varphi}\colon C\rightarrow [A, B] is equivalent to a coalgebra homomorphism C\rightarrow \mathrm{Cof}([A,B]) that coequalizes the parallel morphisms described above, we see that the category \mathscr{M}(A,B) of measurings from A to B is equivalent to the category of cones over the aforementioned parallel morphisms. Thus they have equivalent terminal objects {\underline{\mathrm{Alg}}}(A,B).

Theorem

Theorem 4.2

CCFV

Suppose that \mathscr{C} symmetric monoidal closed category that is locally presentable, and that F\colon \mathscr{C}\rightarrow \mathscr{C} is an accessible endofunctor. Consider an F-coalgebra C and an F-algebra A. The measuring tensor (C\triangleright A, u) exists and is determined as the following coequalizer in {\mathrm{Alg}}:

\begin{tikzcd} \mathrm{Fr}(C\otimes FA)\ar[shift left]{r}{\Phi} \ar[shift right]{r}[swap]{\Psi} & \mathrm{Fr}(C\otimes A) \ar[dashed]{r}{u'} & C\triangleright A. \end{tikzcd}
Proof

Proof

W3IB

For (1), asking that \alpha restricts to a map \alpha_Q is exactly asking that (Q, \alpha_Q) is an algebra of F and that the quotient map constitutes a total algebra homomorphism q\colon (A, \alpha) \to (Q, \alpha_Q). Since the forgetful functor \mathrm{Alg} \to \mathscr{C} is faithful, it reflects epimorphisms. The second statement (2) is immediate.

Proof

Proof

KJKL

For (1), consider \iota \colon S \rightarrowtail C. Asking that \chi restricts to a morphism \chi_S means exactly that \iota constitutes a total algebra homomorphism \iota \colon (S, \chi_C) \to (C, \chi). This is a monomorphism since the forgetful functor U\colon \mathrm{Alg} \to \mathscr{C} is faithful and thus reflects monomorphisms.

For (2), consider a monomorphism \iota\colon(S, \chi_S) \rightarrowtail (C, \chi). In order to show that \iota \colon S \to C is also a monomorphism, consider two points x, y\colon1 \to S in \mathscr{C} such that \iota x = \iota y. Since \mathscr{C} is assumed to be well-pointed, it suffices to show that x = y. Note that \llbracket{x}\rrbracket = \llbracket{\iota x}\rrbracket = \llbracket{\iota y}\rrbracket = \llbracket{y}\rrbracket, and let ((I, \chi_I), \top_n) denote a coalgebra generated by a point of this index. Then we get two maps \overline x, \overline y\colon(I, \chi_I) \to (S, \chi_S) and a map \overline{\iota x} = \overline{\iota y} \colon (I, \chi_I) \to (C, \chi) such that \iota \overline x = \overline{\iota x} = \overline{\iota y} = \iota \overline y. Since \iota is a monomorphism, \overline x = \overline y, but then x = \overline x \top_n = \overline y \top_n = y\colon * \to \mathscr{C}.

Proof

Proof

1DR7

We first claim that {\mathrm{Alg}}(A, [C,B]) is empty or a singleton for any coalgebra C. Since !_A\colon \mathbb N \to A is an epimorphism, the function

{\mathrm{Alg}}(A, [C,B]) \xrightarrow{!^*_A} {\mathrm{Alg}}(\mathbb N, [C,B])

is an injection, and since \mathbb N is initial, {\mathrm{Alg}}(\mathbb N, [C,B]) \cong *. Thus, {\mathrm{Alg}}(A, [C,B]) is a singleton, in the case where the only map \mathbb N \to [C,B] factors through A, and otherwise is empty.

We now claim that the canonical map \llbracket{-}\rrbracket\colon{\underline{\mathrm{Alg}}}(A,B) \to {\mathbb N_\infty} is a monomorphism. Suppose there are maps a,b\colon C \to {\underline{\mathrm{Alg}}}(A,B) from a coalgebra C such that \llbracket{a}\rrbracket = \llbracket{b}\rrbracket. Recall that the coalgebra {\underline{\mathrm{Alg}}}(A,B) is defined by the following universal property for any coalgebra C

{\mathrm{coAlg}}(C,{\underline{\mathrm{Alg}}}(A,B)) \cong {\mathrm{Alg}}(A, [C,B]).

Thus, {\mathrm{coAlg}}(C,{\underline{\mathrm{Alg}}}(A,B)) is a singleton, so a = b, and \llbracket{-}\rrbracket is monic.

Proof

Proof

73VB

Suppose (C, \chi_C) and (D, \chi_D) are coalgebras. Then C\otimes D has the following coalgebra structure:

\begin{tikzcd} {C \otimes D} \ar{r}{\chi_C \otimes \chi_D} & [1em] {F(C) \otimes F(D)} \ar{r}{\nabla_{C,D}} & {F(C\otimes D).} \end{tikzcd}

The morphism \eta\colon \mathbb I\rightarrow F(\mathbb I) provides the coalgebraic structure on \mathbb I.

To see that ({\mathrm{coAlg}}, \otimes, (\mathbb I, \eta)) is a symmetric monoidal category, we first need to check that (C, \chi_C)\otimes (\mathbb I, \eta)\cong (C, \chi_C). On objects, we have C\otimes \mathbb I\cong C as \mathbb I is a monoidal unit. The coalgebraic structures correspond as we have the following commutative diagram by unitality of (F, \nabla, \eta):

\begin{tikzcd} C \ar{r}{\cong}\ar{d}[swap]{\chi} & C\otimes \mathbb I \ar{dr}{\chi\otimes \eta} \\ F(C) \ar[bend right=2em, equals]{rrrr} \ar{r}{\cong} & F(C)\otimes \mathbb I \ar{r}[swap]{\mathrm{id}\otimes \eta}& F(C)\otimes F(\mathbb I) \ar{r}{\nabla} & F(C\otimes \mathbb I)\ar{r}{\cong} & F(C). \end{tikzcd}

Similarly, we have a natural isomorphism (\mathbb I, \eta)\otimes (C, \chi_C)\cong (C, \chi_C) from the identification \mathbb I\otimes C\cong C. Moreover, we also have the following natural isomorphism

((C, \chi)\otimes (C', \chi')) \otimes (C'', \chi'') \cong (C, \chi)\otimes ((C', \chi') \otimes (C'', \chi'')),

lifted from (C\otimes C')\otimes C''\cong C\otimes (C'\otimes C''). Lastly, the symmetry C\otimes C'\cong C'\otimes C lifts to {\mathrm{coAlg}}. Therefore as \mathscr{C} is symmetric monoidal, the above natural identifications assemble to a symmetric monoidal structure on {\mathrm{coAlg}} as the pentagon, triangle, hexagon and symmetric identities remain valid in {\mathrm{coAlg}}.

Suppose now that \mathscr{C} is locally presentable and closed, and F is accessible. Then for all objects X\in \mathscr{C}, we have that X\otimes -\colon \mathscr{C}\rightarrow \mathscr{C} is a left adjoint functor, with right adjoint given by its the internal hom [X, -]\colon \mathscr{C}\rightarrow \mathscr{C}. Since \mathrm{coAlg} is also locally presentable and colimits are computed in \mathscr{C}, we get that for all C\in \mathrm{coAlg}, the induced functor C\otimes -\colon \mathrm{coAlg}\rightarrow \mathrm{coAlg} also preserves all colimits and thus must be a left adjoint as \mathrm{coAlg} is locally presentable. We denote by \underline{\mathrm{coAlg}}(C,-)\colon \mathrm{coAlg}\rightarrow \mathrm{coAlg} its right adjoint. The construction is natural in C and thus defines the desired closed structure on \mathrm{coAlg}.

Theorem

Theorem 4.3

ACLV

Suppose that \mathscr{C} is a locally presentable, symmetric monoidal closed category. Let F\colon \mathscr{C} \to \mathscr{C} be an accessible lax symmetric monoidal endofunctor. Then the category {\mathrm{Alg}} is enriched, tensored, and cotensored over the closed symmetric monoidal category {\mathrm{coAlg}} respectively via

{\mathrm{Alg}}^\mathrm{op} \times {\mathrm{Alg}}\xrightarrow{{\underline{\mathrm{Alg}}}(-,-)} {\mathrm{coAlg}}, \quad {\mathrm{coAlg}}\times {\mathrm{Alg}} \xrightarrow{-\triangleright-} {\mathrm{Alg}}, \quad {\mathrm{coAlg}}^\mathrm{op}\times {\mathrm{Alg}}\xrightarrow{[-,-]} {\mathrm{Alg}}.

In other words, for any coalgebra C, and algebras A and B, we obtain the natural identifications in \mathrm{coAlg}:

\underline{\mathrm{coAlg}}(C, {\underline{\mathrm{Alg}}}(A,B))\cong {\underline{\mathrm{Alg}}}(C \triangleright A, B) \cong {\underline{\mathrm{Alg}}}(A, [C, B]).
Proof

Proof

G9J0

The convolution algebra functor [-,-]\colon{\mathrm{coAlg}}^\mathrm{op}\times {\mathrm{Alg}}\rightarrow {\mathrm{Alg}} presents {\mathrm{Alg}} as a right module over {\mathrm{coAlg}}^\mathrm{op}. Thus {\mathrm{Alg}}^\mathrm{op} is a left module over {\mathrm{coAlg}} via

[-,-]^\mathrm{op}\colon {\mathrm{coAlg}}\times {\mathrm{Alg}}^\mathrm{op} \rightarrow {\mathrm{Alg}}^\mathrm{op}.

Moreover, for any A\in {\mathrm{Alg}}, the functor [-,B]^\mathrm{op}\colon{\mathrm{coAlg}}\rightarrow {\mathrm{Alg}}^\mathrm{op} has a right adjoint {\underline{\mathrm{Alg}}}(-, B)\colon{\mathrm{Alg}}^\mathrm{op}\rightarrow {\mathrm{coAlg}} as shown in ?. Thus, by [hylandetal, 3.1], the category {\mathrm{Alg}}^\mathrm{op} is enriched over {\mathrm{coAlg}} with tensor [-,-]^\mathrm{op}. Therefore {\mathrm{Alg}} is enriched over {\mathrm{coAlg}} with power [-,-].

Theorem

Theorem 4.4

RLMW

Let \mathscr{C} be a locally presentably and closed symmetric monoidal category. Let F,G\colon \mathscr{C}\to \mathscr{C} be accessible endofunctors. Assume that F is lax symmetric monoidal, and that G is an F-module, in the sense that there is a transformation

FX \otimes GY \to G( X \otimes Y)

natural in X,Y and satisfying the diagrams of [yetter, Def. 39]. Then the category {\mathrm{Alg}}_{G} is enriched, tensored and cotensored over {\mathrm{coAlg}}_F.

Proof

Proof

2UFG

We obtain a convolution algebra {\mathrm{coAlg}}_F^\mathrm{op} \times {\mathrm{Alg}}_{G} \to {\mathrm{Alg}}_{G} by taking a coalgebra (C,\chi) and an algebra (A, \alpha) to the following composite

\begin{tikzcd} G[C,A] \ar{r} & {[FC, GA]} \ar{r}{\chi^*} \ar{r} & {[C, FA]} \ar{r}{\alpha_*} & {[C,A]}, \end{tikzcd}

where the unmarked arrow is the adjunct of the following composite

\begin{tikzcd} FC\otimes G([C,A]) \ar{r} & G(C\otimes [C,A]) \ar{r}{G(\mathrm{ev})} & GA \end{tikzcd}

where \mathrm{ev} denotes evaluation. The action on morphisms is given by the naturality of constituent arrows of this constructed algebra structure. The functoriality is inherited from the functoriality of [-, -].

The diagrams of [yetter, Def. 39] exactly correspond to the opposite

[-,-]^\mathrm{op} \colon {\mathrm{coAlg}}_F \times {\mathrm{Alg}}_{G}^\mathrm{op} \to {\mathrm{Alg}}_{G}^\mathrm{op},

this functor being a left action in the sense of [hylandetal]. Since [-,A]^\mathrm{op} preserves colimits, so does [-,A]^\mathrm{op} \colon {\mathrm{coAlg}}_F \to {\mathrm{Alg}}_{G}^\mathrm{op}. Since {\mathrm{coAlg}}_F is locally presentable, and \mathrm{Alg}_G^\mathrm{op} is essentially small, the functor has a right adjoint. Thus, by [hylandetal, Prop. 3.1], we see that {\mathrm{Alg}}_{G}^\mathrm{op} is enriched, tensored and cotensored in {\mathrm{coAlg}}_F. Thus, {\mathrm{Alg}}_{G} is enriched, tensored and cotensored in {\mathrm{coAlg}}_F.

Proof

Proof

AWWH

To apply previous result, we only need to show there exists an F-module structure on GF, that is, we need a certain natural map

FX \otimes GFY \to GF( X \otimes Y).

The \mathscr{C}-enrichment of G produces a map X \otimes GY \rightarrow G(X\otimes Y) for any objects X and Y in \mathscr{C}. Indeed, this is the adjunct of

\begin{tikzcd} X \ar{r} & {[Y, X\otimes Y]} \ar{r} & {[GY, G(X\otimes Y)]}, \end{tikzcd}

where the first map is the coevaluation of the internal hom, and the second map is induced by the \mathscr{C}-enrichment. We apply this map to FX and FY to get the following composition

FX \otimes GFY \rightarrow G(FX\otimes FY) \xrightarrow{G \nabla} GF (X \otimes Y).

One can check that this makes the diagrams of [yetter, Def. 39] commute.

Proof

Proof

9CYZ

We consider an object \lim^C\mathrm{id}_{\underline{\mathrm{Alg}}} with the following universal property:

{\mathrm{Alg}}(A,{\lim}^C\mathrm{id}_{\underline{\mathrm{Alg}}}) \cong \lim_{X \in {\mathrm{Alg}}} \ {\mathrm{coAlg}} (C, {\underline{\mathrm{Alg}}}(A,X)).

(This is the limit of \mathrm{id}_{\underline{\mathrm{Alg}}} weighted by the constant functor at C.) Since the hom {\mathrm{coAlg}} (C, {\underline{\mathrm{Alg}}}(A,-)) preserves limits and \lim_{X \in {\mathrm{Alg}}} X \cong \mathbb N, we have

\begin{aligned} \lim_{X \in {\mathrm{Alg}}} \ {\mathrm{coAlg}} (C, {\underline{\mathrm{Alg}}}(A,X)) &\cong {\mathrm{coAlg}} (C, {\underline{\mathrm{Alg}}}(A,\lim_{X \in {\mathrm{Alg}}} X)) \\ &\cong {\mathrm{coAlg}} (C, {\underline{\mathrm{Alg}}}(A,\mathbb N)) \\ &\cong {\mathrm{Alg}}(A, [C,\mathbb N]) \\ &= {\mathrm{Alg}}(A, C^*). \end{aligned}

Thus, C^* has the universal property of \lim^C\mathrm{id}_{\underline{\mathrm{Alg}}}.

Note that for any C-initial algebra A, we have \lim_{X \in {\mathrm{Alg}}} \ {\mathrm{coAlg}} (C, {\underline{\mathrm{Alg}}}(A,X)) is the terminal object. Thus, by this universal property of C^*, there is a unique map A \to C^*.

Proof

Proof

01RY

Consider the coalgebra morphism m \colon (\mathbb{n}-1)^\circ \to \mathbb{n}^\circ, i \mapsto i. This induces a morphism

\begin{aligned} m\triangleright A \colon (\mathbb{n}-1)^\circ \triangleright A &\to \mathbb{n}^\circ \triangleright A \\ [n,i,a] &\mapsto [n,i,a]. \end{aligned}

This morphism is monomorphic by definition. Since A is \mathbb{n}^\circ-initial, we know \mathbb{n} \triangleright A is an initial object. This means m\triangleright A is a monomorphism into the initial object, hence an isomorphism.

Proof

Proof

3HXC

Let k\leq n. Define the coalgebra morphism

\begin{aligned} p_j \colon \mathbb{k}^\circ &\to \mathbb{n}^\circ \times \mathbb{n}^\circ \\ i &\mapsto (i,i+j) \end{aligned}

for all 0 \leq j \leq n-k. Consider the composition of measurings \varphi \circ (\mathrm{id} \times -_{A} \circ \varphi) \in \mu_{\mathbb{n}^\circ \times \mathbb{n}^\circ}(A,\mathbb N). We can precompose this measuring with the coalgebra morphism p_j to obtain a measuring

\mathbb{k}^\circ \times A \xrightarrow{p_j \times \mathrm{id}_A} \mathbb{n}^\circ \times \mathbb{n}^\circ \times A \xrightarrow{\varphi \circ (\mathrm{id} \times -_{A} \circ \varphi)} \mathbb N.

We also have the coalgebra morphism f\colon \mathbb{k}^\circ \to \mathbb{n}^\circ, i \mapsto i which we can precompose with \varphi. This gives us a measuring

\mathbb{k}^\circ \times A \xrightarrow{f \times \mathrm{id}_A} \mathbb{n}^\circ \times A \xrightarrow{\varphi} \mathbb N.

Since A is also \mathbb{k}^\circ-initial, we know these measurings must coincide. Hence we can state \varphi(i,a) = \varphi(i,-_{A} \circ \varphi(i+j,a)) for all i \in \mathbb{k}^\circ and 0 \leq j \leq n-k. The only restriction placed on k was that k \leq n. Iterating over all 0 \leq k \leq n, we arrive at the desired result

\varphi(i,a) = \varphi(i,-_{A}\circ \varphi(i+j,a))

for all 0 \leq i \leq n and 0 \leq j \leq n-i.

Proof

Proof

EKW9

Since \varphi(i,a) = \varphi(i, (\varphi(i, a))_A) by the previous lemma, we know [0,i,a] = [0, i, (\varphi(i, a))_A] in \mathbb{n}^\circ \triangleright A. We also have [\varphi(i,a),z] = [0,i,a], and by definition of the equivalence relation \sim, we have [0, i, (\varphi(i, a))_A] = [\min(i, \varphi(i, a)), z]. From this we conclude

\varphi(i,a) = \min(i, \varphi(i, a)),

hence \varphi(i,a) \leq i for all i \in \mathbb{n}^\circ.

Proof

Proof

TQ3H

We proceed by induction over k. For k = 0, we have that \mathbb{k} \cong 1, the terminal object in the category of algebras. Hence \varphi_0 : A \to 1 is an algebra morphism. For the inductive step, assume \varphi_{k-1} : A \to \mathbb{k}-1 is an algebra morphism. We wish to show \alpha_k(\varphi_k(a)) = \varphi_k(\alpha(a)) for all a \in A. If \varphi_k(a) = 0, we know

\begin{aligned} \varphi(k,\alpha(a)) & = 1 + \varphi(k-1,a) \\ &= 1 + \varphi(k-1, (\varphi(k,a))_A) \\ & = 1 + \varphi(k-1, 0_A) \\ & = 1 = \alpha_k(0) \\ &= \alpha_k(\varphi(k,a)). \end{aligned}

If \varphi_k(a) \geq 0 we can make the following deduction

\begin{aligned} \alpha_k(\varphi_k(a)) &= \alpha_k(\varphi(k, a))\\ &= 1 + \alpha_{k-1}(\varphi(k,a) - 1)\\ &= 1 + \alpha_{k-1}(\varphi(k,(\varphi(k,a)) - 1)_A)\\ &= 1 + \alpha_{k-1}(\varphi(k-1,(\varphi(k,a) - 1)_A))\\ &= 1 + \varphi(k-1, \varphi(k,a)_A)\\ &= 1 + \varphi(k-1, a)\\ &= \varphi(k,\alpha(a)). \end{aligned}
Proof

Proof

2J5D

By ?, there exists a unique morphism A \to [\mathbb{n}^\circ, \mathbb N] for any \mathbb{n}^\circ-initial algebra A. Since \mathbb{n} is \mathbb{n}^\circ-initial we know there exists a unique morphism m \colon \mathbb{n} \rightarrowtail [\mathbb{n}^\circ, \mathbb N]. Upon closer inspection m turns out to be a monomorphism. Given any two morphisms f,g \colon A \to \mathbb{n}, we can draw the following diagram

\begin{tikzcd} A & {[\mathbb{n}^\circ, \mathbb N]} \\ & \mathbb{n} \arrow["{!}", from=1-1, to=1-2] \arrow["f"', shift right, from=1-1, to=2-2] \arrow["g", shift left, from=1-1, to=2-2] \arrow["m"', tail, from=2-2, to=1-2]. \end{tikzcd}

Since the morphism A \to [\mathbb{n}^\circ, \mathbb N] is unique, we know the composites m \circ f = m \circ g, and by m being mono we conclude f = g. Hence, there can be at most one algebra morphism from a \mathbb{n}^\circ-initial algebra A to \mathbb{n}.

Theorem

Theorem 5.1

VKGQ

The algebra \mathbb{n} is the terminal \mathbb{n}^\circ-initial algebra.

Proof

Proof

QJVN

Given an \mathbb{n}^\circ initial algebra A, by Proposition ? we obtain an algebra morphism \varphi_n \colon A \to \mathbb{n}. By Lemma ? it is unique. We conclude \mathbb{n} is the terminal \mathbb{n}^\circ-initial algebra.

Proof

Proof

2OTZ

Consider the coalgebra morphism \iota\colon S_{M,n-1}^\circ \to S_{M,n}^\circ, s \mapsto s. This induces a morphism

\begin{aligned} \iota\triangleright A \colon S_{M,n-1}^\circ \triangleright A &\to S_{M,n}^\circ \triangleright A \\ [e_{\operatorname{Fr}}] &\mapsto [e_{\operatorname{Fr}}]\\ [s,a] &\mapsto [s,a]\\ [m,\ell] &\mapsto [m, \mathtt{map}(\iota \triangleright A)(\ell)]. \end{aligned}

This morphism is monomorphic by definition. Since A is S_{M,n}^\circ-initial, we know S_{M,n} \triangleright A is an initial object. This means \iota\triangleright A is a monomorphism into the initial object, hence an isomorphism.

Proof

Proof

BNCX

Let k\leq n. First, we define a function which takes two trees and appends the second tree to all the roots of the first tree. We define it as

\begin{aligned} (++) \colon S_{M,\infty} \times S_{M,\infty} &\to S_{M,\infty} \\ (e_S, s) &\mapsto s\\ ((m, \ell), s) &\mapsto (m, \mathtt{map}( (++) s )(\ell)). \end{aligned}

For all 0 \leq j \leq n-k, define the coalgebra morphism

\begin{aligned} p_j\colon S_{M,k}^\circ &\to S_{M,n}^\circ \times S_{M,n}^\circ \\ s &\mapsto (s,\widetilde{s} ++ s_j), \end{aligned}

where \widetilde{s} is the unique tree \widetilde{s} \in S_{\{e\}, k} such that \mathtt{shape}(\widetilde{s}) = \mathtt{shape}(s).

Consider the composition of measurings \varphi \circ (\mathrm{id} \times \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A} \circ \varphi) \in \mu_{S_{M,n}^\circ \times S_{M,n}^\circ}(A,S_{M}). We can precompose this measuring with the coalgebra morphism p_j to obtain a measuring

S_{M,k}^\circ \times A \xrightarrow{p_j \times \mathrm{id}_A} S_{M,n}^\circ \times S_{M,n}^\circ \times A \xrightarrow{\varphi \circ (\mathrm{id} \times \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A} \circ \varphi)} S_{M}.

We also have the coalgebra morphism \iota\colon S_{M,k}^\circ \to S_{M,n}^\circ, s \mapsto s which we can precompose with \varphi. This gives us a measuring

S_{M,k}^\circ \times A \xrightarrow{\iota \times \mathrm{id}_A} S_{M,n}^\circ \times A \xrightarrow{\varphi} S_{M}.

Since A is also S_{M,k}^\circ-initial, we know these measurings must coincide. Hence we can state \varphi(s,a) = \varphi(s, \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A} \circ \varphi(\widetilde{s} ++ s_j,a)) for all s \in S_{M,k}^\circ and 0 \leq j \leq n-k. The only restriction placed on k was that k \leq n. Iterating over all 0 \leq k \leq n, we arrive at the desired result

\varphi(s,a) = \varphi(s, \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A}\circ \varphi(\widetilde{s} ++ s_j,a))

for all 0 \leq i \leq n and 0 \leq j \leq n-i. In particular this holds for s = s_i, and noting s_i ++ s_j = s_{i + j} we obtain the desired result.

Proof

Proof

S2GU

We will proceed by induction over i. For the base case i = 0, we have s_0 = e_S, so \varphi(s_0, a) = e_S \in S_{M,0}. For the induction step, assume \varphi(s_i, a) \in S_{M,i}. Using s_{i+1} = (e,(s_i)^{(\infty)}) and the previous lemma we can write \varphi(s_{i+1}, a) = \varphi( (e,(s_i)^{(\infty)}), \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A}(\varphi(s_{i+1}, a))). Let \alpha\colon 1 + M \times (S_M)^{\leq \infty} \to S_M, then we can write (m,s) = \alpha^{-1}(\varphi(s_{i+1}, a)) where s is the list with components s_i. We then know by definition of a measuring that

\varphi(s_{i+1}, a) = \varphi( (e,(s_i)^{(\infty)}), \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A}(\varphi(s_{i+1}, a))) = (e \bullet m, \mathtt{map}(\varphi)(\mathtt{zip}((s_i)^{(\infty)}, k) ) ),

where k = \mathtt{map}( \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A})(s). By the induction hypothesis, we know

\mathtt{map}(\varphi)(\mathtt{zip}((s_i)^{(\infty)}, k) ) \in (S_{M,i})^{\leq \infty},

hence \varphi(s_{i+1}, a) \in S_{M,i + 1} by definition. This concludes the induction step and the proof.

Proof

Proof

13QA

We proceed by induction over k. For k = 0, we have that S_{M,k} \cong 1, the terminal object in \mathrm{Set}. Hence \varphi_0\colon A \to S_{M,0} is an algebra morphism. For the inductive step, assume \varphi_{k-1}\colon A \to S_{M,k-1} is an algebra morphism. We wish to show \varphi_k is an algebra morphism. In more detail, we aim to show

\alpha_k(m, \mathtt{map}(\varphi_k)(\ell)) = \varphi_k(\alpha(m,\ell))

for all (m,\ell) \in M \times A^{\leq \infty}. First, we will write \ell = (a_i)_{i = 0}^j, where j \in {\mathbb N_\infty}. We can now write

\begin{aligned} \alpha_k(m, \mathtt{map}(\varphi_k)(\ell)) &= \alpha_k(m, \mathtt{map}(\varphi_k)((a_i)_i))\\ &= \alpha_k(m, (\varphi_k(a_i))_i)\\ &= \alpha_k(m, (\varphi_k \circ \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A} \circ \varphi_k(a_i))_i). \end{aligned}

Writing \varphi_k \circ \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A} \circ \varphi_k(a_i) = t_i, we can make the case distinction

t_i = \begin{cases} e_S &\text{ if } \varphi_k(a_i) = e_S \in S_M \\ (m_i, \mathtt{map}(\varphi_{k-1} \circ \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A})(a_i)) &\text{ if } \varphi_k(a_i) = (m_i,a_i) \in S_M \end{cases}

by \varphi \colon S_{M,n}^\circ \times A \to S_M being a measuring. This means

\alpha_k(m, \mathtt{map}(\varphi_k)(\ell)) = \alpha_k(m, (t_i)_i).

By the algebra structure of S_{M,k}, we can write this as \alpha_k(m, (t_i)_i) = (m,(r_i)_i), where

r_i = \begin{cases} e_S &\text{ if } \varphi_k(a_i) = e_S \in S_M \\ \alpha_{k-1}(m_i, \mathtt{map}(\varphi_{k-1} \circ \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A})(a_i)) &\text{ if } \varphi_k(a_i) = (m_i,a_i) \in S_M. \end{cases}

By the induction hypothesis \alpha_{k-1}(m_i, \mathtt{map}(\varphi_{k-1} \circ \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A})(a_i)) = (\varphi_{k-1} \circ \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A})(m_i, a_i) and we can write

r_i = (\varphi_{k-1} \circ \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A})(\varphi_k(a_i)) = (\varphi_{k-1} \circ \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A} \circ \varphi_{k-1})(a_i)

using ?. Retracing our steps, we now compute

\begin{aligned} \alpha_k(m, \mathtt{map}(\varphi_k)(\ell)) &= (m,(r_i)_i)\\ &= (m, (\varphi_{k-1} \circ \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A} \circ \varphi_{k-1})(a_i)_i)\\ &= (m, \mathtt{map}(\varphi_{k-1}) (( \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A} \circ \varphi_{k-1})(a_i))_i)\\ &= \varphi_k(\alpha(m, ( \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A} \circ \varphi_{k-1})(a_i))_i ))\\ &= (\varphi_k \circ \mathord{\mathpalette\raised@mathinvertedexclamationmark\relax} _{A} \circ \varphi_k)(\alpha(m, (a_i)_i ))\\ &= \varphi_k(\alpha(m, \ell)) \end{aligned}

using that \varphi is a measuring twice. We conclude \varphi_k \colon A \to S_{M,k} is an algebra morphism for all 0 \leq k \leq n.

Proof

Proof

7PEQ

By ?, there exists a unique morphism A \to [S_{M,n}^\circ, S_{M}] for any S_{M,n}^\circ-initial algebra A. Since S_{M,n} is S_{M,n}^\circ-initial we know there exists a unique morphism \iota \colon S_{M,n} \rightarrowtail [S_{M,n}^\circ, S_{M}].

This map is given by

\begin{aligned} \iota \colon S_{M,n} &\to [S_{M,n}^\circ, S_{M}] \\ e_S &\mapsto \operatorname{const}_{e_S}\\ (m,\ell) &\mapsto \left( s' \mapsto \begin{cases} e_S &\text{ if } s' = e_S \\ (m'\bullet m, \mathtt{map}(\iota)(\mathtt{zip}(\ell,\ell'))) &\text{ if } s' = (m', \ell'). \end{cases} \right). \end{aligned}

We can easily conclude \iota is a monomorphism by observing that \iota(s)(s_n) = s for all s \in S_{M,n}. Given any two morphisms f,g\colon A \to S_{M,n}, we can draw the following diagram

\begin{tikzcd} A & {[S_{M,n}^\circ, S_{M}]} \\ & S_{M,n} \arrow["{!}", from=1-1, to=1-2] \arrow["f"', shift right, from=1-1, to=2-2] \arrow["g", shift left, from=1-1, to=2-2] \arrow["\iota"', tail, from=2-2, to=1-2]. \end{tikzcd}

Since the morphism A \to [S_{M,n}^\circ, S_{M}] is unique, we know the composites \iota \circ f = \iota \circ g, and by \iota being mono we conclude f = g. Hence, there can be at most one algebra morphism from a S_{M,n}^\circ-initial algebra A to S_{M,n}.

Theorem

Theorem 5.2

LYYX

The algebra S_{M,n} is the terminal S_{M,n}^\circ-initial algebra.

Proof

Proof

KQZD

Given an S_{M,n}^\circ-initial algebra A, by ?, we obtain an algebra morphism \varphi_n \colon A \to S_{M,n}. By ?, it is unique. We conclude \mathbb{n} is the terminal S_{M,n}^\circ-initial algebra.

Source and licence

The text on this page is from arXiv:2405.14678v2 by Lukas Mulder, Paige Randall North and Maximilien Péroux, under the licence CC BY 4.0. The corpus made these changes: it read the items out of the LaTeX source, it expanded the macros of the paper, it put each proof after its statement, and it converted the text to HTML. The formulas are the TeX of the paper, and KaTeX renders them. A formula or a reference can look different from the PDF. The page is published under CC BY 4.0.

The record of each item is in analysis/objects/2405/2405.14678.jsonl.