[Haskell-cafe] Clearly, Haskell is ill-founded

Andrew Coppin andrewcoppin at btinternet.com
Tue Jul 10 16:02:21 EDT 2007


Dan Piponi wrote:
> First a quick bit of background on algebras.
>
> If F is a functor, an F-algebra is an arrow FX->X. For example if we
> choose FX = 1+X+X^2 (using + to mean disjoint union) then an F-algebra
> is a function 1+X+X^2->X. The 1->X part just picks out a constant, the
> image of 1. The X^2->X defines a binary operator and the X->X part is
> an endomorphism. A group has a constant element (the identity) an
> endomorphism (the inverse) and a binary operator (multiplication). So
> a group is an example of an F-algebra (with some extra equations added
> in so a group isn't *just* an F-coalgebra).
>
> A F-coalgebra is an arrow X->FX. As an example, let's pick
> FX=(String,[X]). So an F-coalgebra is a function X->(String,[X]). We
> can view this as two functions, 'appearance' of type X->String and
> 'links' of type X->[X]. If X is the type of web pages, then interpret
> 'appearance' as the rendering (as plain text) of the web page and
> links as the function that gives a list of links in the page. So the
> web forms a coalgebra. (Though you'll need some extra work to deal
> with persistent state like cookies.)

...wooooosh...

...and now I know what normal people must feel like when *I* open my 
mouth. o_O



More information about the Haskell-Cafe mailing list