Category theory Notes

Posted on March 1, 2020
Tags: typetheory

Category theory with UML

Cat object morphism
Vect vector space linear maps
Groups unit group homomorphisms
Mfd(manifolds) smooth manifolds Continuous Maps
Top Topological Spaces Continuous Maps
Rel Sets Binary relations
Meas Measurable Spaces measurable maps
Par sets partial functions

1 Basics

1.1 Isomorphisms

  • Set: bijective maps
  • Mfd(manifolds): diffeomorphisms
  • Top : homeomorphisms which are invertible continuous map with continuous inverses.

1.2 Monomorphisms

  • Set: Injective maps
  • Top: Injective continuous maps
  • FVect(finite-dimension Vect): injective linear map
  • Group: injective group homeomorphisms

1.3 Split monomorphisms

  • Set: Every injective function has a left inverse. Therefore every monomorphism is split.

  • FVect: Every injective linear map has a left inverse. Therefore every monomorphism is split.

  • Rings: injective map

  • Top:

Generally, monomorphisms are not conceptually related to splits even though it looks the case in Set and FVect. General case is Top

1.4 Epimorphism

  • Set: Surjective map
  • FVect: Surjective continuous linear map
  • Algebra: inclusion
    • Natural number is Included in Integers
  • Rings: NOT a surjective map
    • Example: \(Int \rightarrow Rationals\) is a epimorphism but obviously not an surjective map

1.5 Split Epimorphism

2 Functors

2.1 Cocycle

Functors are just 1-cocycles

3 Yoneda Embedding Theorem

3.1 Matrix Example

A matrix transformation through row operation is a natural transformation between presheaves.

Matrix transformation by row operation is isomorphic to a matrix

4 PreSheaf

A functor that takes a dual morphism to set category.

\[f^{OP} \Rightarrow Set\]

5 Applicative

6 Natural

Below is a natural transformation wrt Object a on functors List and Maybe
Natural Transformation can be considered a family of morphisms between functors wrt an object or morphism.

g :: ∀a b. a -> b 
naturaltransformation_a :: ∀ a. List a -> Maybe a

6.1 Naturality square

7 Algebras

3 equivalent ways to define an algebra

\[(\mathbb{N},0::\top \rightarrow \mathbb{N},(+)::\mathbb{N}\times\mathbb{N} \rightarrow \mathbb{N})\] \[(\mathbb{N},in::\top + \mathbb{N}\times\mathbb{N} \rightarrow \mathbb{N}) \tag{fuse + and 0}\] \[let\ F X = \top + X \times X \qquad (\mathbb{N}, in::F\ \mathbb{N} \rightarrow \mathbb{N})\tag{package into functor}\]

Other examples of an algebra

F Algebras are just a set with operations that return values in that set

Inductive datatypes correspond to initial algebras.
The homomorphisms are catamorphisms or folds.