If I understand correctly, we can model inductive data types as initial F-algebras and co-inductive data types as final F-coalgebras (for an appropriate endofunctor F
) [1]. I understand that according to Lambek's lemma the initial algebras (and final coalgebras) are fixed point solutions of the isomorphism T ≅ F T
, but I don't see why the initial algebra is the least fixed point, while the final coalgebra is the greatest fixed point. (Is it obvious that the isomorphism T ≅ F T
has a solution?)
Also I'm not really clear on how are inductive and co-inductive data types defined in type theory. Are there any recommended resources on this topic and maybe their relationship to category theory?
Thank you!
a: FA->A
andb: B->FB
. So, in particular,a^-1 : A->FA
is also a coalgebra andb^-1: FB->B
is an algebra. Hence, we get an algebra-morphismA->B
and a coalgebra morphismA->B
. (They might be the same ones if we think of them as C-morphisms). So, we could say that A is "less" than B since there's a morphism between them in C. It is not a proper comparison since C is a category, not a poset, but there is some analogy. In a sense, a category is an extension of a preorder. – Granuloma