1. Categories

1.1Introduction

This brief introduction is taken from Awodey’s book.

What is category theory? As a first approximation, one could say that category theory is the mathematical study of (abstract) algebras of functions.

The historical development of the subject has been, very roughly, as follows:

1945: Eilenberg and Mac Lane’s “General theory of natural equivalences” was the original paper, in which the theory was first formulated.

Late 1940s: The main applications were originally in the fields of algebraic topology, particularly homology theory, and abstract algebra.

1950s: Grothendieck et al. began using category theory with great success in algebraic geometry.

1960s: Lawvere and others began applying categories to logic, revealing some deep and surprising connections.

1970s: Applications were already appearing in computer science, linguistics, cognitive science, philosophy, and many other areas.

One very striking thing about the field is that it has such wide-ranging applications. In fact, it turns out to be a kind of universal mathematical language like Set Theory. As a result of these various applications, category theory also tends to reveal certain connections between different fields like Logic and Geometry.

In fact, just as the idea of a topological space arose in connection with continuous functions, so also the notion of a category arose in order to define that of a functor, at least according to one of the inventors. The notion of a functor arose - so the story goes on - in order to define natural transformations. One might as well continue that natural transformations serve to define adjoints, so we have the following succession:

Before getting down to business, let us ask why it should be that category theory has such far-reaching applications. Well, we said that it is the abstract theory of functions, so the answer is simply this:

And everywhere that functions are, there are categories. Indeed, the subject might better have been called abstract function theory, or, perhaps even better: archery.

1.2Definition

定义 1.2.1. A category consists of the following data:

(1)

objects: (not necessarily sets). The class of objects of is denoted by .

(2)

arrows (or morphisms): (not necessarily functions). The class of arrows of is denoted by . The class of arrows between two objects of is denoted by or .

(3)

For every arrow there are objects and called the domain and the codomain of respectively. We write , where and .

(4)

For every arrows and there is an arrow denoted and called the composite of and .

(5)

For every object there is an arrow denoted and called the identity arrow.

which satisfy the following axioms:

(i)

Associativity:

(ii)

Unit:

If are objects and is an arrow in a category , then sometimes we simply denote and instead of and .

1.3Examples

The Category

objects: sets

arrows: functions

composition: composition of functions

identity arrow: identity function

There are variations of this category obtained by restricting the sets and/or the functions, such as: the category of finite sets and functions, the category of sets and injective functions etc.

Categories of Structured Sets

(1)

The category of groups and group homomorphisms, denoted by . The category of abelian groups and group homomorphisms, denoted by .

(2)

The category of monoids and monoid homomorphisms, denoted by .

(3)

The category of unitary rings and unitary ring homomorphisms, denoted by . The category of commutative unitary rings and unitary ring homomorphisms, denoted by .

(4)

The category of rings and ring homomorphisms, denoted by . The category of commutative rings and ring homomorphisms, denoted by .

(5)

The category of fields and field homomorphisms, denoted by .

(6)

The category of left vector spaces over a field and -linear maps, denoted by . The category of left modules over a unitary ring and -module homomorphisms, denoted by .

(7)

The category of graphs and graph homomorphisms, denoted by .

(8)

The category of topological spaces and continuous maps, denoted by .

(9)

The category of real Banach spaces and linear contractions, denoted by .

(10)

The category of differentiable (smooth) manifolds and differentiable (smooth) mappings, denoted by .

(11)

The category of preordered sets and monotone mappings, denoted by . The category of posets (partially ordered sets) and monotone mappings, denoted by .

注 1.3.1. All the above examples are concrete categories, which roughly speaking means that the objects are some sets and the arrows are some functions.

The Category

objects: sets

arrows: relations , where

composition: composition of relations, defined for relations and as , where

identity arrow: for every set , the identity arrow is the equality relation , where .

Another Category of Finite Sets:

Objects: finite sets (or simply natural numbers)

arrows: for every finite sets with and with , define an arrow to be a matrix in (where is a fixed field).

composition: multiplication of matrices

identity arrow: identity matrix

Poset Categories

Given a poset , we may construct an associated category called a poset category:

Objects: the elements of

arrows: we say that there is an arrow between , and we write , if and only if .

composition: composition of arrows in the sense that if and only if

identity arrow: we have for every object .

Monoid Categories

Given a monoid , we may construct an associated category:

objects: the single object

arrows: the elements of

composition: the multiplication of the elements of

identity arrow: the identity element from the monoid

The Category

定义 1.3.2. A covariant functor (or simply functor) between two categories and is a mapping of objects of to objects of and of arrows of to arrows of , denoted by satisfying the axioms:

(i)

For every in , we have in .

(ii)

For every object of , we have .

(iii)

For every composable pair of arrows and in , we have hence the commutativity of the following left diagram implies the commutativity of the right diagram:

For functors and , one defines the composite functor by

The category :

objects: small categories (that is, categories such that and are sets)

arrows: covariant functors

composition: composition of functors

identity arrow: identity functor for every category , defined by the identity on objects and on arrows.

A Category form Logic

Given a deductive system of logic, we may construct an associated category of proofs:

objects: formulas

arrows: implications

composition: succesive implications

identity arrow: each formula implies itself

A Category from Computer Science

Given a functional programming language , we may construct an associated category:

objects: data types of

arrows: computable functions on (“processes”)

composition: succesive computable functions , where the output of the first arrow is the input of the second arrow

identity arrow: “do nothing” procedure

A Category from Physics

objects: physical system

arrows: physical processes which take a physical system of type of into a physical system of type

composition: sequential composition of physical processes

identity arrow: the physical process leaving the physical system invariant

1.4Isomorphisms

定义 1.4.1. In any category , an arrow is called an isomorphism if there is an arrow such thatSince inverses are unique, we write .

We say that is isomorphic to , written if there exists an isomorphism between them.

We recall the following famous theorem from Group Theory.

定理 1.4.2 (Cayley). Every group is isomorphic to a subgroup of a symmetric group.

证明. Let be a group and consider the symmetric groupFor every , defineOne proves that , that is is bijective. We may now defineOne shows that is an injective homomorphism. Then .

By the first isomorphism theorem, it follows thatBut is a subgroup of , so that we are done. Note that is sometimes called the Cayley representation of .

注 1.4.3. Note the two different levels of isomorphisms that occur in the proof of Cayley’s theorem. There are bijective functions , which are isomorphisms in , and there is the isomorphism between and in . Cayley’s theorem says that any abstract group can be represented as a “concrete” one, that is, a subgroup of a symmetric group.

We may give the following category-theoretic analogue.

定理 1.4.4. Every category with a set of arrows is isomorphic to one in which the objects are sets and the arrows are functions.

证明. Define the Cayley representation of , that is, the category corresponding to via the isomorphism, to be the following concrete category:

objects: sets of the form for objects of

arrows: functions for arrows in , defined by for every in .

One shows the required properties.

1.5Constructions on Categories

Product Category

Let and be categories. The product category is defined as follows:

objects: pairs for some objects and

arrows: pairs for some arrows and

composition: for every composable arrows , their composite is defined as

identity arrow: for every object , the identity arrow is .

Clearly, the construction may be generalized for a finite number of categories.

Opposite Category

Let be a category. The opposite category of is defined as follows:

objects: the objects of . We denote by the object of viewed as an object of .

arrows: the arrows of the form for some arrow in .

composition: for every arrows and in , their composite is defined as

identity arrow: for every object , the identity arrow is .

Arrow Category

Let be a category. The arrow category of is defined as follows:

objects: the arrows of .

arrows: an arrow , where and are arrows of , is a square

where and are arrows in , which is commutative in the sense that

composition: for every composable arrows and in , their composite is defined as

identity arrow: for every object in , the identity arrow is .

1.6Free Categories

Let be a set, which will be called an “alphabet”. Denote by the set of all “words” of with “letters” from , that is, strings of elements from . We call the Kleene closure of . Denote by the empty word. We immediately have the following result.

定理 1.6.1. Let be a set. Consider on the operation “.” defined by concatenation. Then is a monoid with identity element , called the free monoid on .

定理 1.6.2 (Universal Mapping Property of the Free Monoid). With the above notation, there is an injective monoid homomorphism with the property that for every monoid and for every function , there is a unique monoid homomorphism such that , that is, the following diagram is commutative

证明. Let be the inclusion homomorphism, which is an injective monoid homomorphism. Define byOne checks that is a monoid homomorphism and for every , that is, .

For uniqueness, suppose that there is another monoid homomorphism such that . For every we havehence .

推论 1.6.3. Universal mapping property of the free monoid determines it uniquely up to an isomorphism.

证明. Suppose that and are free monoids on a set . Consider the inclusion homomorphisms and . Since is a free monoid, by universal mapping property there is a monoid homomorphism such that . Since is a free monoid, by universal mapping property there is a monoid homomorphism such that . It follows that . But we also have . Then by the uniqueness from universal mapping property we must have .

    

Similarly, we have . Hence is a monoid isomorphism.

Next let us see how can we generalize the above results to categories.

To each category we may associate a graph , where the class of vertices consists of the objects of , while the class of edges consists of the arrows of . Then we have two functions (source) defined by for every arrow , and (target) defined by for every arrow .

We define the free category on the graph , denoted by , as follows:

objects: the vertices of

arrows: the paths in

composition: the concatenation of paths in

identity arrow: for every the identity arrow is the loop on .

We may define a functor , called the forgetful functor, which associates to a category its underlying graph having as edges the arrows of , and as vertices the objects of , and to a functor between categories its underlying graph homomorphism (that is, a functor without the conditions on composition and identity). One may prove the following result.

定理 1.6.4 (Universal Mapping Property of the Free Category on a Graph). With the above notation, there is a graph homomorphism with the property that for every category and for every graph homomorphism , there is a unique functor such that , that is, the following diagram is commutative:

推论 1.6.5. Universal mapping property of the free category on a graph determines it uniquely up to a graph isomorphism.

1.7Large, Small and Locally Small Categories

定义 1.7.1. A category is called:

(1)

small if both classes of objects and arrows are sets.

(2)

large if it is not small.

(3)

locally small if for every objects , is a set.

例 1.7.2.  

(1)

The category of finite sets and functions is equivalent to a small category.

(2)

, , and are locally small, but not small.

(3)

is large, but not locally small. Indeed, if is a locally small category which is not small, and is the category with one object and one arrow, then functors are simply objects of , so is not a set.