As software becomes more complicated for high-speed trains, driverless cars, missile weapons. .. and AI deeplearning algorithm, we can’t depend our life safety on the programmers who don’t understand the advanced maths behind these algorithms.

The Advanced Math is the Category Theory – the most advanced math foundation above “Set Theory” since WW2. Functional Programming is based on Category Theory with mathematical functions – always output correctly with no “side-effects”.

There exists in almost all Universities a clear division between pure and applied mathematics. A friendly (and sometimes not so friendly) rivalry exists between both sides of the divide, with separate conferences, separate journals and in many cases even a whole separate language. Category Theory was seen as such an abstract area of research that even pure mathematicians started to refer to it as “abstract nonsense“, and until the mid 1980’s almost all category theorists occupied a place hidden somewhere up above the ‘cloud level’ in the highest reaches of the peaks that defined “pure” maths.

…

By the mid 1990’s and then by the turn of the millenium, a whole world of computer programmers were learning basic category theory as part of their induction into functional programming. The best known product of these efforts is the Haskell language, but even in the past 7 or 8 yrs, workshops on category theory for computer programmers of all types have flourished and proliferated. It is almost as if there are two separate communities masquerading as one – mathematical category theory and computer programming category theory – and never the twain would meet. Or so it seemed, until now.

Note: check a , b is in co-variant or contra-variant position.

Example 3: F = Id

Right-hand-side: a(data structure)

Left-hand-side : “(a -> x) “is a function called “handler” (or “continuation“) which takes the argument “a” to provide it as output : “(a -> x ) -> x“.

eg. handler to database query, over internet…(technique used in Compiler)

Co-Yoneda Lemma : (Contra-variant a , F)

Yoneda Embedding: Full and Faithful

Note: Instead of proving a , b are isomorphic, sometimes it is easier to prove the functors C(a, -) & C(b, -) are isomorphic.[Proof Trivial: functors preserve composition and identity]

Application: Co-Yoneda Lemma : (Contra-variant a , F)