Category Theory II 2: Limits, Higher order functors

1.2 Introduction to Limit 

Analogy : Product to Cones (Limit)

2.1 Five categories used to define Limit:

  1. Index category (I)
  2. Category C: Functors (constant ,  D)
  3. Cones (Lim D)
  4. Functor Category [I, C ]:objects are (consant,D ), morphsms are natural transormations
  5. Set category of Hom-Set Cones [I,C] to Hom-Set C (c , Lim D )

2.2 Naturality

3.1 Examples: Equalizer

CoLimit = duality of Limit (inverted cone = co-Cone)

Functor Continuity = preserve Limit

BM Category Theory 10: Monad & Monoid

10.1 Monad

Function : compose “.“, Id

Monad: compose “>=>“, return

Imperative (with side effects eg. state, I/O, exception ) to Pure function by hiding or embellishment in Pure function but return “embellished” result.

10. 2 Monoid

Monoid in category of endo functors = Monad

Ref Book : 

What is the significance of monoids in category theory? by Bartosz Milewski 

Category Theory 9: Natural Transformations, BiCategories

In essence, in all kinds of Math, we do 3 things: 

1) Find Pattern among objects (numbers, shapes, …), 
2) Operate inside the objects (+ – × / …), 
3) Swap the object without modifying it (rotate, flip, move around, exchange…).

Category  consists of :
1) Find pattern thru Universal Construction in Objects (Set, Group, Ring, Vector Space, anything )
2) Functor which operates on 1).
3) Natural Transformation as in 3).

\boxed {\text {Natural Transformation}}

\boxed {\text {Morphism of Functors}}


Functors (F, G) := operation inside a container 
\boxed { F :: X \to F_{X}, \:  F :: Y \to F_{Y}}

\boxed {G :: X \to G_{X}, \: G :: Y \to G_{Y}}

Natural Transformation  ({\eta_{X}, \eta_{Y}}) := swap the content ( F_{X} \text { with } G_{X},  F_{Y} \text { with } G_{Y} ) in the container without modifying it.
\boxed{\eta_{X} :: F_{X} \to G_{X} , \: \eta_{Y} :: F_{Y} \to G_{Y}}

9.2 Bicategories 

“Diagram Chasing”:

2- Category

Cat = Category of categories (C, D)

The functors {F, G} instead of being a Set (“Hom-Set”) – like functions  form a function object “Exponentialfunctors also form a category, noted : \boxed {[C,D] = D^{C} }

BiCategory (different from 2-Category): the Associativity and Identity are not equal (as in 2-Category),  but only up to Isomorphism.
Note : when n is infinity,  n-Category & Groupoid (HOTT: Homotopy Type Theory)

Reading Book: chap 10

Curry-Howard-Lambek Isomorphism

Curry-Howard-Lambek Isomorphism

\boxed {\text {Category} \iff \text {Algebra} \iff \text {Logic} \iff \lambda \text {-Calculus}}

Below the lecturer said every aspect of Math can be folded out from Category Theory, then why not start teaching Category Theory in schools.

That was the idea proposed by Alexander Grothendieck to the Bourbakian Mathematicians who rewrote all Math textbooks after WW2, instead of in Set Theory, should switch to Category Theory. His idea was turned down by André Weil.

\boxed { a^{b + c} = a^{b} \times a^{c} }

\boxed {\text {Left-side: Either b c } \to a}

\boxed {\text {Right-side: } (b \to a , c\to a) }

\boxed { (a^{b})^{c} = a^{b \times c}}

\boxed { c \to (b \to a) \sim (b ,c) \to a}

\boxed { (a \times b)^{c} = a^{c} \times b^{c}}

\boxed {c \to (a,b) \sim (c \to a , c \to b)}

BM Category Theory 8 : Function objects (Exponentials), Curry / unCurry


[Revision] Product (or Sum = co-Product) is a Bifunctor

  • takes 2 objects to produce 3rd object;
  • takes 2 morphisms to produce 3rd morphism. 

Functions are “morphisms between Category objects”  = a Hom-Set, which itself is an object : ‘a -> b’.

Using the same method of Universal Construction of Product objects in category :  

  1. Define a Pattern ,
  2. Ranking which object is better, 
  3. Pick the best object up to an UNIQUE Isomorphism.

we can similarly construct the Function Objects ‘a => b‘ (in Haskell as ‘a -> b’) :

Intuitively, the above diagram is interpreted as: 

  • evalthe Function object(a=>b) x ato return result b
  • g is up to Unique isomorphism (hSAME as ‘eval: \boxed {g = eval \circ (h \text { x } id )}

Curry / Non-curry : Associative (yellow brackets below are optional).

\boxed {z \to (a \to b ) \iff z \to a \to b }

\boxed { (f a ) \: b \iff f a \: b }

Note: function (f a) returns as a new  function which applies on argument b. Equivalently, also read as “f takes 2 arguments a, b”.


f :: Bool -> Int

Bool = {0, 1}
{ f = (Int \text { x }  Int) = Int^{2} = Int ^ {Bool}}

The number of possibilities of applying f from a to b is \boxed {b^{a}} , hence we call:  
\boxed {\text {Function object f as EXPONENTIAL}}

8.2  Algebraic Data Types