From Jacobs and Rutten A Tutorial on (Co)Algebras and (Co)Induction
Induction uses initiality of algebras. Initiality involves unique existence. Existence allows definition by induction. Uniqueness allows proof by induction.
Initial algebras are obtained from closed terms, generated by iteratively applying the algebra’s constructor operations.
Coalgebras relate to observation/destruction.
For induction, show that property hold for atomic terms, and then if for a term, also for operation acting on it. No subalgebras of initial algebra.
Coalgebraically, take machine which changes unknown state when a button is pressed repeatedly until light comes on. Observe number of times until light comes on {never, 0, 1,…}.
In an induction definition of a function , one defines the values of on all constructors.
In a coinductive definition of a function , one defines the values of all destructors on each outcome .
E.g, for lists of elements of , algebras of , define
Constructors appear inside the function.
Define for applied to infinite list of elementwise, so give values of destructors
Function appears inside the destructors.
Another important point, not clear from the examples above, is that one naturally defines maps from an initial algebra or to a final coalgebra. (In particular, given an endofunctor , there is a map from its initial algebra to its final coalgebra.)
Last revised on May 1, 2009 at 21:51:26. See the history of this page for a list of all contributions to it.