## BM Category Theory II 8: F-Algebra, Lambek’s Lemma , Catamorphism, Coalgebra, Anamorphism

[Continued from previous BM Category Theory …]

\$latex boxed {
text {type Algebra f a = f a} to text {a}
}&fg=aa0000&s=3\$

Intuition: [Artificial Intelligence] You teach the computer, like a Primary 6 kid, that Algebra is atype of expression (f) which, after evaluation, returns a value.

If a = i (initial)[or u (terminal)],
\$latex boxed {
text {(f i} to text {i )} implies
text {f = Fix-point}
}&fg=0000aa&s=3\$

Intuition: Fix-point because, the Initial “i” after the evaluating the expression f, returns itself “i”.

Lambek’s Lemma
\$latex boxed {
text {Endo-functor = Isomormphism}
}&fg=00aa00&s=3\$

Note: Endo-functor is a functor (equivalent tofunction in Set Theory) within the same Category (Endo = Self = 自)

Video 8.1F-Algebras & Lambek’s Lemma

Video 8.2Catamorphism & Anamorphism

foldr ~ catamorphism (浅层变质) of a Fix-point endo-functor on a List.

Examples: Fibinacci, Sum_List

View original post 147 more words