Math originated 3,000 years ago in Geometry by Greek Euclid with Axioms and deductive （演译） Proof-drivenLogic.

Geometry = Geo (Earth) + Metry (Measurement).

Math evolved from 2-dimensional Euclidean Geometry through 17 CE French Descartes’s Cartesian Geometry using the 13CE Arabic invention “Algebra” in Equations of n dimensions: ,

Use of Algebra: 1) Evaluation of algebraic equations (in CT: “Functor”) ; 2) Manipulation. eg. Substitution (in CT : “Monad” ), Container (in CT: “Endo-Functor” ), Algebraic Operations (in CT: “Pure, Return, Binding” ).

Lawvere Theories: unified all definitions of Monoids (from Set to CT)

Free Monoid = “List” (in Programming). Eg. Concatenation of Lists = new List (Composition, Associative Law) ; Empty List (Unit Law).

Advance of Math in 21CE comes back to Geometry in new Math branches like Algebraic Geometry, Algebraic Topology, etc.

Note: The only 2 existing human Languages invented were derived from forms & shapes (images) of the mother Earth & Nature:

Ancient Greek Geometry (3000 years) ;

Ancient Chinese Pictogram Characters (象形汉字, 3000 years 商朝. 甲骨文 ) .

Note: Both John Baez and his wife Lisa Raphals (Professor in Chinese) work now in National University of Singapore – Center of Quantum Technologies & Philosophy, respectively.

Haskell & any FP compiler don’t check the Category Theory proof if your codes (eg. fmap) follow Functor’s Laws (eg. Preserve structure, identity) or Monad’s Laws !

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)

Fermat (*) (Light travels in least time), Feynman (Quantum Physics).

In IT: Neural Network (AI) uses both 1 & 2.

More examples…

In Medicine:

Western Medicine: germs/ viruses, anatomy, surgery

Traditional Chinese Medicine (中医): Accupunture, Qi, Yin-Yang.

Note (*): Fermat : My alma mater university in Toulouse (France) named after this 17CE amateur mathematician, who worked in day time as a Chief Judge of Toulouse City, after works spending time in Math and Physcis. He co-invented Analytic Geometry (with Descartes), Probability (with Pascal), also was the “Father of Number Theory” (The Fermat’s ‘Little’ Theorem and The Fermat’s ‘Last’ Theorem). He used Math to prove light travels in straight line (before Newton) due to “Least Time taken” (explained here in this BM video).

Note: We just look at the Category “Types Set” from external Macroview, “forget ” what it contains, we only know the “composition” (Arrows) between the Category “Type Set”, also “forget” what these Arrows (sin,cosin, tgt, etc) actually are, we only study these arrows’ behavior (Associativity).

Vector Space (to + – , × ÷ by multiplier Field scalars);

Ring (to + x) in co-homology

etc.

then apply algebra (Linear Algebra, Matrices) with computer to compute these invariants (homology, co-homology, etc).

A topological space can be formed by a “Big Data” Point Set, e.g. genes, tumors, drugs, images, graphics, etc. By finding (co)- / homology – hence the intuitive Chinese term (上) /同调 [2] – is to find “holes” in the Big Data in the 10,000 (e.g.) dimensional space the hidden information (co-relationship, patterns, etc). Note: [1] Analogy of an”Invariant” in Population: eg. “Age” is an invariant can be added in the “Population Space” as the average age of the citizens.

Just one example: a function with 2 inputs from A and B and results from C would have the type A x B -> C but in functional languages like Haskell we are using A -> (B -> C), i.e. a function that returns a function. This “currying” is exactly a the categorical definition of a cartesian closed category as one where Hom(AxB,C) is isomorphic to Hom(A,B -> C) and in this case you can replace Hom(X,Y) with X -> Y.

It is well known that effects in functional programming can be modelled by monads which is a concept from category theory. Nowadays a weaker structure called applicative functors has become very popular – needless to say also a concept from Category Theory.

Not all languages are functional (yet) but even non-functional languages can be understood using concepts from category theory.

Excellent Category Theory lectures by retired Prof Steven Roman from Uni. California: he used pen and A4 – paper with iPhone camera. Simple & good. (Only lighting could be brighter.)

Category Theory is one level higher abstraction, above the Abstract Algebra (Group, Ring, Field, Vector Space, Set…). It is the “Math of Math”, to make difficult math easy by studying the ‘Relationship’ (or Morphism, drawn as Arrows).

Lecture 1: study five topics
◇ Category
◇ Functor
◇ Natural Transformatiom
◇ Universal Ptoperty
◇ Adjoint