Tuesday, January 3, 2017

Categories and special morphism between objects within a category.

In this post, I will give an introduction to category theory. In layman's terms, we can think of a category as a system of Mathematical objects, where there is a way to relate any two objects in the system in a nice way.

Let us dive right into the definition of a category means:

Definition 1:

$\mathcal{C}$ is said to be a category if it consists of:

(1)A class of $Obj(\mathcal{C})$ of objects in a category.
(2)For any objects $A,B \in Obj(\mathcal{C})$, there exists a set $Hom_{\mathcal{C}}(A,B)$ with the following properties :

        i)Given any $f \in Hom_{\mathcal{C}}(A,B)$ and $g \in Hom_{\mathcal{C}}(B,C)$, then there exists $h := g \circ f \in Hom_{\mathcal{C}}(A,C)$.  More formally, There is a function (of sets)

    $$Hom_{\mathcal{C}}(A,B) \times Hom_{\mathcal{C}}(B,C) \rightarrow Hom_{\mathcal{C}}(A,C).$$

        We shall denote the image of the pair $(f,g)$ by $g \circ f$.

        ii)For any objects, $A \in Obj(\mathcal{C})$ there exists, at least one morphism denoted by $1_A \in Hom_{\mathcal{C}}(A,A)$, and is called the identity on A. Moreover, It is identity with respect to morphism composition :

$$f \circ \mathcal{1}_A = f, \mathcal{1}_B \circ f = f.$$
        iii)$Hom_{\mathcal{C}}(A,B) \cap Hom_{\mathcal{C}}(C,D) = \emptyset$.

Most of the time, in categories unlike sets, there is no defined notion of what it mean to be an element of a particular object. That is why category theory is sometimes called abstract nonsense. It is important to remember that abstract nonsense isn't something derogatory, but it refers to the fact that we don't really "know" what is inside each object; however, we do know how objects interact with each other in a category.

A very familiar category is the category of Sets. In fact, we can think of the category of sets in order to recall the definition of a category. We will give examples of categories and prove that they are indeed categories to get our hands dirty and get more familiar with the definition. Whenever the category is understood we shall drop the subscript $\mathcal{C}$. In fact, in the next few examples, we shall do that.

Examples of categories:

Suppose that $S$ is a set with a relation $\sim$ on S that is transitive and reflexive. Define a new category $\mathcal{C}_{S/\sim}$ as follows:

1)$Obj(\mathcal{C}_{S/ \sim}) = S$
2)For any two objects $s_1,s_2 \in S$. If $s_1 \sim s_2$, then we define $Hom(s_1,s_2) = (s_1,s_2)$, otherwise $Hom(s_1,s_2) = \emptyset$.
We have to define how to compose two morphism f and g and see whether the conditions for morphism compositions are satisfied. Suppose $f \in Hom(s_1,s_2)$ and $g \in Hom(s_2,s_3)$. Then, necessarily $f = (s_1,s_2)$ and $g = (s_2,s_3)$. By definition, we have that the following: $$s_1 \sim s_2$$
$$s_2 \sim s_3.$$
Since $\sim$ is transitive, then $g \circ f := (s_1,s_3)$.  We have to verify that the composition as defined is associate. Suppose that $f = (s_1,s_2)$,$g = (s_2,s_3)$,and $h = (s_3,s_4)$. We have to verify that $$h \circ (g \circ f) = (h \circ g) \circ f.$$
By definition of morphism composition as defined:
$$g \circ f = (s_1,s_3)$$
$$h \circ g = (s_3,s_4).$$
Thus, we have $$h \circ (g \circ f) = (s_1,s_4) = (h \circ g) \circ f.$$
A specific instance of this category is $S = \mathbb{Z}$ and $\sim\ = \ \leq$. A diagram in a category is a sequence of morphism between objects in a category. An example of a diagram in this category is:

\begin{equation*}

\xymatrix{
1 \ar[d] \ar[r] \ar[dr] & 2 \ar[d] \ar[ld] \\
3 \ar[r] & 4
}
\end{equation*}

This category will be important to us, as this will provide us with alot of counter examples. More on that later.

The following definition gives a formalism for the question of what does it mean for two objects to be similiar in a category.

Definition 2:
Suppose $\mathcal{C}$ is a category with A and B as objects in this category.

1)$f \in Hom(A,B)$ is said to be an isomorphism iff there exists $g \in Hom(B,A)$ such that
$$f \circ g = 1_A \ \  \& \  \ g \circ f = 1_B.$$
2)Two objects $A$ and $B$ are said to be isomorphic iff there exists an isomorphism f between them.

We might want to generalize the notions of a function being surjective and injective to categories. Since, categories in general don't have elements, so there is only 1 sensible way of doing that.

Definition 3:
Suppose $\mathcal{C}$ is a category with A and B as objects in this category.

1)A morphism $f \in Hom(A,B)$ is said to epic if the following condition occurs:
For all objects $Z \in Obj(\mathcal{C})$ and for all morphism $\alpha_1,\alpha_2 : B \rightarrow D$ such that $\alpha_1 \circ f = \alpha_2 \circ f \implies \alpha_1 = \alpha_2$.

1)A morphism $f \in Hom(A,B)$ is said to monic iff the following condition occurs:
For all objects $U\in Obj(\mathcal{C})$ and for all morphism $\beta_1,\beta_2 : U \rightarrow A$ such that $f \circ \beta_1 = f \circ \beta_2 \implies \beta_1 = \beta_2$.


In the category of sets. A function is epic iff it is surjective and a function is monic iff it is injective. It follows that a function that is both epic and monic is an isomorphism. Hence, we might conjecture that if we have a morphism which is both epic and monic, then it must be an isomorphism. However, the category $(\mathbb{Z},\leq)$ is a category in which every morphism is both epic and monic, but the only isomorphism is between an object and itself. It is good exercise to check the details for this.

Now, we talk about an important aspect of category theory, which really shows why category theory is important. That is universal property. First, we need the following definition:

Definition 4:

Fix a particular category $\mathcal{C}$.

1)An object $\mathbb{I}$ is said to be initial object in a category iff for every object $B \in Obj(\mathcal{C})$ : $Hom(\mathbb{I},B)$ is a singleton. That is for every object $B$ in our category, there is a unique morphism from $\mathbb{I}$ to $B$.
2)An object $\mathbb{F}$ is said to be final object in a category iff for every object $B \in Obj(\mathcal{C})$ : $Hom(B,\mathbb{F})$ is a singleton. That is for every object $B$ in our category, there is a unique morphism from $B$ to $\mathbb{F}$.

We can use this notion to show to define universal property. This will show again and again in our blog. It will show up when we start solving problems from Allufi chapter 0, as well as when we start going towards more advanced things in Allufi chapter 0.

Definition 5:

Fix a particular category $\mathcal{C}$.

A category $\mathcal{C}$ is said to have universal property iff it has either an initial or a final object.

We shall denote initial/final objects as terminal objects. When we want to clarify if it is whether it is initial or final, then we will mention that.  A category doesn't have to have a unique terminal object. However, if a terminal objects exist, and aren't unique, then necessarily they are isomorphic.

Theorem 1:
Fix a particular category $\mathcal{C}$.

1)If  $\mathbb{F}_1$ and $\mathbb{F}_2$ are final objects, then $\mathbb{F}_1 \cong \mathbb{F}_2$.
2)If  $\mathbb{I}_1$ and $\mathbb{I}_2$ are initial objects, then $\mathbb{I}_1 \cong \mathbb{I}_2$.

We shall prove this when we start working on the problems from Allufi chapter 0.  This post gives an introduction to universal properties. In the next post, we give some examples and we will see amazing connections between direct products of two sets and minimum of two numbers.  We will also see connections between disjoint union and maximum of two numbers. Moreover, we will see that direct products and coproducts can be considered as being opposite/dual of each other (whatever that means).


No comments:

Post a Comment