algebras

def

A Functor F:CD\mathcal{F}: \mathcal{C} \rightarrow \mathcal{D}, where C\mathcal{C} and D\mathcal{D} are categories, assigns (1) to any object ACA\in \mathcal{C} an object F(A)D\mathcal{F}(A)\in \mathcal{D}, (2) to any arrow f:ABCf:A\rightarrow B\in \mathcal{C} an arrow F(f):F(A)F(B)D\mathcal{F}(f) : \mathcal{F}(A) \rightarrow \mathcal{F}(B) \in \mathcal{D}, such that (3) F\mathcal{F} preserves composition and identies.

def

Let F:CC\mathcal{F}: \mathcal{C} \rightarrow \mathcal{C} be a functor. An F\mathcal{F}-algebra is a pair (A,α)(A,\alpha) consisting of an obhect AA and an arrow α:F(A)A\alpha:\mathcal{F}(A)\rightarrow A. F\mathcal{F} is the type, AA is the carrier, α\alpha is the structure map of the algebra.

example

(N,[zero,succ])(\mathbb{N}, [zero, succ]) is an NN-algebra, defined via functor N:SetSetN:Set\rightarrow Set for everty set XX by N(X)=1+XN(X)=1+X

def

Let F:CCF: \mathcal{C} \rightarrow \mathcal{C} be a functor. An homomorphism of FF-algebras (A,α)(A,\alpha), (B,β)(B,\beta) is an arrow f:ABf:A\rightarrow B such that fα=βF(f)f\circ \alpha = \beta\circ F(f):

coalgebras

def

Let F:CC\mathcal{F}: \mathcal{C} \rightarrow \mathcal{C} be a functor. An F\mathcal{F}-coalgebra is a pair (A,α)(A,\alpha) consisting of an obhect AA and an arrow α:AF(A)\alpha:A\rightarrow \mathcal{F}(A). F\mathcal{F} is the type, AA is the carrier, α\alpha is the structure map of the coalgebra.

Coalgebras are like algebras, but the structure map is reversed.

def

Let F:CCF: \mathcal{C} \rightarrow \mathcal{C} be a functor. An homomorphism of FF-algebras (A,α)(A,\alpha), (B,β)(B,\beta) is an arrow f:ABf:A\rightarrow B such that βf=F(f)α\beta\circ f = F(f)\circ \alpha:

Coalgebras are the dual form of algebra and are derived via the categorical principle of duality.

inductive and coinductive definitions

def

An initial FF-algebra is an FF-algebra that is an \textit{initial object} in the category of all FF-algebras and FF (A,α)(A,\alpha), (B,β)(B,\beta) is an arrow f:ABf:A\rightarrow B such that βf=F(f)α\beta\circ f = F(f)\circ \alpha: - F(A)F(f)F(B)F(A)\xrightarrow{F(f)}F(B) - AαF(A)A\xrightarrow{\alpha}F(A) - BβF(B)B\xrightarrow{\beta}F(B) - AfBA\xrightarrow{f}B For this definition to make sense FF must be a functor and act not only on objects, but also on arrows.