# User:Michiexile/MATH198/Lecture 1

### From HaskellWiki

Michiexile (Talk | contribs) |
Michiexile (Talk | contribs) |
||

Line 55: | Line 55: | ||

In a category, we use a different name for the vertices: ''objects''. This comes from the roots in describing concrete categories - thus while objects may be actual mathematical objects, but they may just as well be completely different. | In a category, we use a different name for the vertices: ''objects''. This comes from the roots in describing concrete categories - thus while objects may be actual mathematical objects, but they may just as well be completely different. | ||

− | + | Just as with the morphisms, there are objects special enough to be named. An object ''v'' is | |

+ | ;''Initial'':if ''[v,w]'' has exactly one element for all other objects ''w''. | ||

+ | ;''Terminal'': if ''[w,v]'' has exactly one element for all other objects ''w''. | ||

+ | ;''A Zero object'': if it is both initial and terminal. | ||

+ | |||

+ | All initial objects are isomorphic. If <math>i_1,i_2</math> are both initial, then there is exactly one map <math>i_1\to i_2</math> and exactly one map <math>i_2\to i_1</math>. The two possible compositions are maps <math>i_1\to i_1</math> and <math>i_2\to i_2</math>. However, the initiality condition holds even for the morphism set ''[v,v]'', so in these, the only existing morphism is <math>1_{i_1}</math> and <math>1_{i_2}</math> respectively. Hence, the compositions have to be this morphism, which proves the statement. | ||

+ | |||

+ | ==Dual category== | ||

+ | |||

+ | The same proof carries over, word by word, to the terminal case. This is an illustration of a very commonly occurring phenomenon - dualization. |

## Revision as of 13:50, 27 August 2009

## Contents |

## 1 Welcome, administrativia

## 2 Introduction

Why this course? What will we cover? What do we require?

## 3 Category

A *graph* is a collection *G*_{0} of *vertices* and a collection *G*_{1} of *arrows*. The structure of the graph is captured in the existence of two functions, that we shall call *source* and *target*, both going from *G*_{1} to *G*_{1}. In other words, each arrow has a source and a target.

We denote by *[v,w]* the collection of arrows with source *v* and target *w*.

A *category* is a graph with some special structure:

- Each
*[v,w]*is a set and equipped with a composition operation . In other words, any two arrows, such that the target of one is the source of the other, can be composed to give a new arrow with target and source from the ones left out.

We write if .

=>

- The composition of arrows is associative.
- Each vertex
*v*has a dedicated arrow 1_{v}with source and target*v*, called the identity arrow. - Each identity arrow is a left- and right-identity for the composition operation.

The composition of with is denoted by . A mnemonic here is that you write things so associativity looks right. Hence, *(gf)(x) = g(f(x))*. This will make more sense once we get around to *generalized elements* later on.

### 3.1 Examples

- The empty category with no vertices and no arrows.
- The category
*1*with a single vertex and only its identity arrow. - The category
*2*with two objects, their identity arrows and the arrow . - For vertices take vector spaces. For arrows, take linear maps. This is a category, the identity arrow is just the identity map
*f*(*x*) =*x*and composition is just function composition. - For vertices take finite sets. For arrows, take functions.
- For vertices take logical propositions. For arrows take proofs in propositional logic. The identity arrow is the empty proof:
*P*proves*P*without an actual proof. And if you can prove*P*using*Q*and then*R*using*P*, then this composes to a proof of*R*using*Q*. - For vertices, take data types. For arrows take (computable) functions. This forms a category, in which we can discuss an abstraction that mirrors most of Haskell. There are issues making Haskell not quite a category on its own, but we get close enough to draw helpful conclusions and analogies.
- Suppose
*P*is a set equipped with a partial ordering relation*<*. Then we can form a category out of this set with elements for vertices and with a single element in*[v,w]*if and only if*v<w*. Then the transitivity and reflexivity of partial orderings show that this forms a category.

Some language we want settled:

A category is *concrete* if it is like the vector spaces and the sets among the examples - the collection of all sets-with-specific-additional-structure equipped with all functions-respecting-that-structure. We require already that *[v,w]* is always a set.

A category is *small* if the collection of all vertices, too, is a set.

## 4 Morphisms

The arrows of a category are called *morphisms*. This is derived from *homomorphisms*.

Some arrows have special properties that make them extra helpful; and we'll name them:

- Endomorphism
- A morphism with the same object as source and target.
- Monomorphism
- A morphism that is left-cancellable. Corresponds to injective functions. We say that
*f*is a monomorphism if for any*g*_{1},*g*_{2}, the equation*f**g*_{1}=*f**g*_{2}implies*g*_{1}=*g*_{2}. In other words, with a concrete perspective,*f*doesn't introduce additional relations when applied. - Epimorphism
- A morphism that is right-cancellable. Corresponds to surjective functions. We say that
*f*is an epimorphism if for any*g*_{1},*g*_{2}, the equation*g*_{1}*f*=*g*_{2}*f*implies*g*_{1}=*g*_{2}.

Note, by the way, that cancellability does not imply the existence of an inverse. Epi's and mono's that have inverses realizing their cancellability are called *split*.

- Isomorphism
- A morphism is an isomorphism if it has an inverse. Split epi and split mono imply isomorphism. Specifically, is an isomorphism if there is a such that
*f**g*= 1_{w}and*g*= 1_{v}. - Automorphism
- An automorphism is an endomorphism that is an isomorphism.

## 5 Objects

In a category, we use a different name for the vertices: *objects*. This comes from the roots in describing concrete categories - thus while objects may be actual mathematical objects, but they may just as well be completely different.

Just as with the morphisms, there are objects special enough to be named. An object *v* is

*Initial*- if
*[v,w]*has exactly one element for all other objects*w*. *Terminal*- if
*[w,v]*has exactly one element for all other objects*w*. *A Zero object*- if it is both initial and terminal.

All initial objects are isomorphic. If *i*_{1},*i*_{2} are both initial, then there is exactly one map and exactly one map . The two possible compositions are maps and . However, the initiality condition holds even for the morphism set *[v,v]*, so in these, the only existing morphism is and respectively. Hence, the compositions have to be this morphism, which proves the statement.

## 6 Dual category

The same proof carries over, word by word, to the terminal case. This is an illustration of a very commonly occurring phenomenon - dualization.