Category Theory (updating)

Page content

Definition of a category

  • Objects and arrows exist.
  • There should be identity arrows for all objects.
  • Arrows should be composited.
  • Associativity holds.

The arrows are also called morphisms.

Terminology: domain and codomain

$\mathrm{dom}(f)\xrightarrow{f} \mathrm{cod}(f)$

Directed graphs and categories

If $f:A\rightarrow B$ and $g:B\rightarrow C$ exist but $h := g\cdot f$ doesn’t, it violates the rule of composition. Hence the graphs are not categories in general.

Initial object

An initial object of a category $C$ is an object $I$ in $C$ such that for every object $X$ in $C$, there exists precisely one morphism $I \rightarrow X$.

Terminal object

When every objects in a category has an arrow to the object $T$, the object $T$ is called a terminal object. It’s also called a final object.

More presicely, $T$ is terminal if for every object $X$ in $C$ there exists exactly one morphism $X \rightarrow T$.

Null object

If an object is both initial and terminal, it is called a zero object or null object.

Opposite category

The opposite category or dual category $\mathrm{C^{op}}$ of a given category $\mathrm{C}$ is formed by reversing the morphisms, i.e. interchanging the source and target of each morphism.

It is also denoted as $A$ over asterisc, like $A^*$

Functor

  • A Functor is a mapping between categories.
  • It’s like an arrow from category to category.
  • It preseves compositions $F(g\cdot f) = F(g)\cdot F(f)$.
  • Identitiy arrows are mapped to identity arrows.

Contravariant functor

A covariant functor is a functor which preserves the directon of arrows. $f:a\rightarrow b$ is mapped to an arrow $F(f):F(a)\rightarrow F(b)$.

A contravariant functor $F$ from a category $C$ to a category $D$ is simply a functor from the opposite category $\mathrm{C_{op}}$ to $D$, s.t., $$ F(a) = a, \\ f(a) = b \ \Rightarrow\ F(f(b)) = a. $$

One sometimes says covariant functor when referring to non-contravariant functors, for emphasis.

Isomorphism

In a category $\mathrm{C}$, two objects $A$ and $B$ are called isomorphic If there are arrows $f$ and $g$ such that $f:A\rightarrow B,\ g:B\rightarrow A$ and $f\cdot g =1_A,\ g\cdot f=1_B$. Such $f$ and $g$ are called isomorphism.

By definition, when a category has multi-terminal objects, all those terminal objects are isomorphic (unique up to isomorphism).

Monoid

In set theory, a monoid is a set equipped with an associative binary operation and an identity element.

A monoid is a category because:

  • the object as the monoid (the set)
  • arrows are elements of the monoid
  • the identity arrow is the unit element.

Hom-set

Given object $x$ and $y$ in a category $C$. Hom-set $\mathrm{Hom}(x,y)$ is the collection of all morphisms from $x$ to $y$.

(Strictly speaking, the category $C$ should be locally small category, but we’ll skip this definition.)

Large, small, and locally small

In this post, the category theory is built upon the set theory.

A category is small if the collection of objects the collection of arrows are sets. Otherwise the category is called large.

A category $C$ is called locally small if for all objects in category $X$ and $Y$, $\mathrm{Hom}(X,Y)$ is a set.

Product category

Imagine a simple tuple which can be defined from two categories. This is different concept from categorical product.

Projection functors

Just extract a single category from a product category. $$ \mathrm{pr}_1(C,D) = C \\ \mathrm{pr}_1(f,g) = f $$

Poset and Preordered set

  • Preorder = proset = reflexivity+transitivity. Bigger than Poset.
  • Poset = partially ordered set = reflexivity+transitivity+antisymmetry.

The poset definition above is called non-strict partial order. Once you delete all equal signes from non-strict, the set become Strict partial order.

Examples of categories

NotionNameobjectsarrows(morphism)
$\mathrm{Sets}_{\mathrm{fin}}$FinSetAll finite setsAll functions between the objects
$\mathrm{Rel}$Category of relationsSetsBinary relations that holds $aRb$ ($a$ and $b$ is the objects)
$\mathrm{Pos}$Category of posetsThe class of all posetsisotone maps (order-preserving mapping)
$\mathrm{Cat}$Category of all categoriesAll categoriesAll functors
$\mathrm{Mon}$Category of monoidsmonoidsfunctions that preserve monoid structure

Isomorphism (category)

An morphism $f:A \rightarrow B$ is an isomorphism if $g:B\rightarrow A$ exists s.t. $gf = 1A$ and $fg=1B$.

We denote it as:

$$ A \cong B. $$

Arrow categories

The arrow category $C^\rightarrow$ of a category $C$ is,

  • objects are all arrows in $C$,
  • an arrow from $f_1:A\rightarrow B$ to $f_2:A’\rightarrow B’$ is (if exist) a pair of arrows $g=(g_1, g_2)$ in $C$ such that the following commutative diagram is the case:

There is no way to express an arrow “from an arrow $f_1$ to another arrow $f_2$”, so arrows in arrow categories are defined by pairs of arrows and its commutative square.

Here is an example of an arrow category:

Slice categories

The $a$ slice category of $C$, written by $C/a$, is slice-off from $C$ which is repalted to $a$.

  • objects are all arrows $f\in C$ such that $\mathrm{cod}(f)=a$.
  • an arrow $x$ in $C/a$ (fron an arrow to another arrow) are also arrows in $C$ (if exist) such that, it is a bridge from an arrow $f_1$ to another arrow $f_2$:

Product

Let $A$ and $B$ be objects. When you imagine “product of two things”, it could be some compositions of two things, and it could be decomposed into original two part.

We’d like to call this “product of $A$ and $B$” as a product candidate. Depending on how to “combine”, you can imagine several candidates of the product. In category theory, there is “the best” candidate among them. “The best” would be defined as follows.

The best candidate always have (unique) isomorphisms from other candidates.

This best candidate is called product of two categories, denoted as $A\times B$ in the following diagram.

$X$ is another product candidate, and $f$ is the isomorphism from that candidate.

Example: GCD

Suppose objects are natural numbers and arrows indicate multiplication of a certain value.

The above diagram representing a simple intuitive category of natural number products.

Now, select two object, for example, $60$ and $48$. What would be the product of the two object?

The answer is $12$, the GCD:

Coproduct

Opposite category of a product.

In the natural number example, the coproduct is LCM:

Comma categories

Suppose three categories $A$, $B$, $C$, and two functors $S:A\rightarrow C$ and $T:B\rightarrow C$. We can construct a comma category $S\downarrow T$ as follows:

  • objects in the comma category are triplets $(a, b, h)$, where $a$ and $b$ are objects of $A$ and $B$ and $h$ is a morphism in $C$.
  • morphisms from $(a_1, b_1, h)$ to $(a_2, b_2, h’)$ are pairs $(f, g)$ where $f:a_1\rightarrow a_2$ and $g:b_1\rightarrow b_2$ and the following diagram commutes:

Comma category: example

Suppose the following two categories:

And suppose the new category with morphisms $h$:

You can construct the comma category as follows:

In a single diagram:

Universal property

  • A universal morphism is defined by morphism “from an object $X$ to a functor $F$” or “from a functor to an object $X$”. I don’t put a lot of meaning of the meaning of this morphism so far, but the definition assumes the following:

    • $F: C \rightarrow D$
    • $X\in D$
  • A universal morphism from $X$ to $F$ is a unique pair $(A,u:X\rightarrow F(A))$, where for any morphism of the form $f:X\to F(A’)$ in $D$, there exists a unique morphism $h:A\to A’$ in $C$ (this unique existence is called a unique property).

    • Red: pre-condition that a universal morphism should exist.
    • Blue: component of a universal morphism.
    • Green: supplemental objects and arrows to explain universal property.

The blue parts $(A,u:X\rightarrow F(A))$ are “universal”. If the universal properties exist for $X$ and $F$, for any cases $F(A’)$ related (=can draw morphism) to $X$, you can fist map (uniquely) the object $X$ to $F(A)$ by the universal property $u$, and after then you can map the $F(A)$ to the first case $F(A’)$. You can think “through” the universal property.

It is hard for me yet to express in a simple English what is the universal property and what is “universal”.

Free category

Quiver

A quiver is a directed graph where loops and multiple arrows between two vertices are allowed.

Construct a free category from a quiver

The free category or path category generated by a quiver is the category that results from freely concatenating arrows together, whenever the target of one arrow is the source of the next.

The objects of the category are the vertices of the quiver, and the morphisms are paths between objects.

Here are several examples:

Note that, there are infinite arrows (infinitely many paths) if there is a loop in the quiver.

Forgetful functor

A forgetful functor (also known as a stripping functor) ‘forgets’ or drops some or all of the input’s structure or properties ‘before’ mapping to the output.

For example, $\mathrm{Cat}$ has a forgetful functor $U$ into the quiver category $\mathrm{Quiv}$ ($U: \mathrm{Cat} \rightarrow \mathrm{Quiv}$). $U$ “[forgets] which arrows are composites and which are identities”.

Natural transformation

A natural transformation $eta$ is a morphism from a functor to another functor.



  • The product is an example of universal property.

In Terms of se Theorie, Singleton ist Onkyo Terminal Objekt

preorder set is similar with category without parallel arrows

we can ask is there a product in this category?

memo

  • Universal properties: basical
  • Natural transformation: map from a functor to another functor
  • Corn: continuously drive a structure
  • Limit: No more natural transformation in the corn.Generalized category sproduct?

Skipped this time from aw

  • arrow category
  • slice category

Materials

My Notes