Monads 单子(Dr. Eugenia Cheng)

Dr. Eugenia Cheng ‘s Lectures on Category Theory (2007)

1. Definition of Monad,  Example: Monad for Monoids

The name “monad” came from “monoid” and “triad”, which indicated that it is a triple (1 functor + 2 trasformations), monoidic algebraic structure.

Monad = Monoid + Triad

Monad = Monoid (restricted to endofunctors)

Note: She was annoyed nobody had corrected her mistake in (red) Tμ . (I discovered it only on 2nd revision view few years later).

2. Example2: Monad for Categories

Monad for Small Categories (= Set)

3. Algebra = Monad 



What is the difference between Monoid and Monad? (Bartosz Milewski )

Monad (图解)  : 单子
Functor: 函子

Les Categories Pour Les Nuls

“Categories for Dummies”

Example 1:

Paris (P) -> Rome (R) -> Amsterdam (A)

Objects: cities {P, R , A…}

Morphism (Arrow)
: railway 

  • Identity: railway within the city
  • Associative: (P -> R) -> A = P -> (R ->A)

=> Category of “Euro-Rail” 

Remark: In the similar sense, China “One Belt One Road” (OBOR)” 一带一路” is a “Pan-China-Europe-Asian” Category “泛中-欧-亚” 范畴

Example 2:
A, B are categories

functor f : A -> B 

f (B) has the “information” on A, with some loss of information since f may not be a MONOMORPHISM (单射 Injective).

Remark: Technical Drawing, the views from Top , Left, Right, or Bottom of the object are Functors – which provide only 1 view from 1 direction with loss of information from 3 other directions.

Example 3: Natural Transformation

A = 0 1 2 3 

f : A -> B

B = Ladder steps:

g : A -> B

B = Staircase steps :

Natural Transformation: =>  α 

α : f (i) => g (i)

f(0)| => g(0)||
f(1)| => g(1)||
f(2)| => g(2)||
f(3)| => g(3)||

α  transforms naturally the Ladder to the Staircase.