Skip to main content
fix error
Source Link
David Spivak
  • 8.7k
  • 1
  • 28
  • 64

For any monoid $(M,e,*)$ in $\mathsf{Set}$ there is a corresponding comonad $y^M$ on $\mathsf{Set}$. It sends a set $A$ to the set of morphisms into $A$ from $M$, $$ A\mapsto A^M. $$ Note that $y=y^1$ is the identity endofunctor on $\mathsf{Set}$.

Under the Yoneda embedding, the counit $y^M\to y$ corresponds to the monoid unit $e\colon 1\to M$, and the comultiplication $y^M\to (y^M)^M\cong y^{M^2}$ corresponds to the monoid multiplication $*\colon M^2\to M$.

As an example, this class of comonads includes the stream comonad (mentioned above), using the monoid of $(\mathbb{N},0,+)$ of natural numbers under addition.

Here are three more polynomial comonads for any set $S$:

  • Store comonad (mentioned above), the functor $F(y)= Sy^S$.
  • Constant comonad, the functor $F(y)=S$, with projection and diagonal.
  • Linear comonad, the functor $F(y)=Sy$, with projection and diagonal.

For any monoid $(M,e,*)$ in $\mathsf{Set}$ there is a corresponding comonad $y^M$ on $\mathsf{Set}$. It sends a set $A$ to the set of morphisms into $A$ from $M$, $$ A\mapsto A^M. $$ Note that $y=y^1$ is the identity endofunctor on $\mathsf{Set}$.

Under the Yoneda embedding, the counit $y^M\to y$ corresponds to the monoid unit $e\colon 1\to M$, and the comultiplication $y^M\to (y^M)^M\cong y^{M^2}$ corresponds to the monoid multiplication $*\colon M^2\to M$.

As an example, this class of comonads includes the stream comonad (mentioned above), using the monoid of $(\mathbb{N},0,+)$ of natural numbers under addition.

Here are three more polynomial comonads for any set $S$:

  • Store comonad (mentioned above), the functor $F(y)= Sy^S$.
  • Constant comonad, the functor $F(y)=S$, with projection and diagonal.
  • Linear comonad, the functor $F(y)=Sy$, with projection and diagonal.

For any monoid $(M,e,*)$ in $\mathsf{Set}$ there is a corresponding comonad $y^M$ on $\mathsf{Set}$. It sends a set $A$ to the set of morphisms into $A$ from $M$, $$ A\mapsto A^M. $$ Note that $y=y^1$ is the identity endofunctor on $\mathsf{Set}$.

Under the Yoneda embedding, the counit $y^M\to y$ corresponds to the monoid unit $e\colon 1\to M$, and the comultiplication $y^M\to (y^M)^M\cong y^{M^2}$ corresponds to the monoid multiplication $*\colon M^2\to M$.

As an example, this class of comonads includes the stream comonad (mentioned above), using the monoid of $(\mathbb{N},0,+)$ of natural numbers under addition.

Here are three more polynomial comonads for any set $S$:

  • Store comonad (mentioned above), the functor $F(y)= Sy^S$.
  • Linear comonad, the functor $F(y)=Sy$, with projection and diagonal.
Source Link
David Spivak
  • 8.7k
  • 1
  • 28
  • 64

For any monoid $(M,e,*)$ in $\mathsf{Set}$ there is a corresponding comonad $y^M$ on $\mathsf{Set}$. It sends a set $A$ to the set of morphisms into $A$ from $M$, $$ A\mapsto A^M. $$ Note that $y=y^1$ is the identity endofunctor on $\mathsf{Set}$.

Under the Yoneda embedding, the counit $y^M\to y$ corresponds to the monoid unit $e\colon 1\to M$, and the comultiplication $y^M\to (y^M)^M\cong y^{M^2}$ corresponds to the monoid multiplication $*\colon M^2\to M$.

As an example, this class of comonads includes the stream comonad (mentioned above), using the monoid of $(\mathbb{N},0,+)$ of natural numbers under addition.

Here are three more polynomial comonads for any set $S$:

  • Store comonad (mentioned above), the functor $F(y)= Sy^S$.
  • Constant comonad, the functor $F(y)=S$, with projection and diagonal.
  • Linear comonad, the functor $F(y)=Sy$, with projection and diagonal.
Post Made Community Wiki by David Spivak