Catamorphism - Catamorphisms in Category Theory

Catamorphisms in Category Theory

Category theory provides the necessary concepts to give a generic definition that accounts for all initial data types (using an identification of functions in functional programming with the morphisms of the category Set or some related concrete category). This was done by Grant Malcolm.

Returning to the above example, consider a functor F sending r to a + r × r. An F-algebra for this specific case is a pair (r, ), where r is an object, and f1 and f2 are two morphisms defined as f1: a → r, and f2: r × r → r.

In the category of F-algebras over such F, an initial algebra, if it exists, represents a Tree, or, in Haskell terms, it is (Tree a, ).

Tree a being an initial object in the category of F-algebras, there is a unique homomorphism of F-algebras from Tree a to any given F-algebra. This unique homomorphism is called catamorphism.

Read more about this topic:  Catamorphism

Famous quotes containing the words category and/or theory:

    Despair is typical of those who do not understand the causes of evil, see no way out, and are incapable of struggle. The modern industrial proletariat does not belong to the category of such classes.
    Vladimir Ilyich Lenin (1870–1924)

    A theory if you hold it hard enough
    And long enough gets rated as a creed....
    Robert Frost (1874–1963)