Functions and Categories

§1 Functions

Definition 1. A map f: X → Y is a rule f which assigns to every object x in the source X an object f(x) in the target Y.

Definition 2. Two sets X and Y are equal, denoted X = Y, ⇔ every object of X is an object in Y and every object in Y is an object in X.

Definition 3. Two maps are equal ⇔ their sources are equal, their targets are equal, and their rules do the same thing.

In more symbolic notation this definition reads as follows: Let f: X → Y and g: X′ → Y′ be two maps . Then f = g ⇔ X = X′, and Y = Y′ and f(a) = g(a) for all a in the source.

Definition 4. Suppose we have two maps, f: X → Y and g: Y → Z (note the target of f is the source of g). Then the map h: X → Z is the composition of f and g ⇔ h(x) = g(f(x)) for every x in the source X.

We say that f(x) is the image of x, and that x is a preimage of f(x). The set of all the preimages of y we will call the fiber of y.

The subset of the target Y which consists of elements y assigned to some x is called the image of f. Thus we can say that the image of f is the subset of objects of the target with non–empty fibers.

If A is a subset of the source X, then the image of A in the target Y consists of the set of images of all the objects in A. The image of A is denoted by f(A). Similarly, the preimage of a subset B of the target Y is the set of all objects in the source X whose images are objects in B. The preimage of B is denoted by f^{−1}(B).

If the image of f is the entire target of f, then we say that f is onto. Thus f is onto if and only if no fiber is empty. If the fibers of f have at most one object in it, then we say f is one–to–one. If every fiber of f has exactly one object in it, then we say that f is one–to–one onto or equivalently that f is bijective.

Remark 5. The following are synonyms for types of functions:

Anglosaxon  Latin  Greek
1. One–to–one  injective  monomorphism
2. onto  surjective epimorphism
3. one–to–one–onto bijective  isomorphism

§2. Categories

Definition 6. The identity map 1_{X}: X → X sends x ↦ x for all x ∈ X.

Proposition 7. a) Suppose f: X → Y is a map, then f = f ∘1_{X} = 1_{Y} ∘f (identity law).

b) (f ∘ g) ∘ h = f ∘ (g ∘ h) whenever all compositions are defined (associativity).

Definition 8. A set of functions C is called a (concrete) category if it is: a) closed under composition

b) contains the identity map for every source and target of maps in C.

that means a) If f and g are in C and if f ∘ g is defined, then f ∘ g ∈ C.

b) If f: X → Y is in C, then 1_{X} and 1_{Y} are in C.

Remark 9. The sources and targets of all maps in a category C are called the objects of C, and the maps in C are called the morphisms of C.

We usually describe categories by naming the objects and then the maps. So we have the following examples:

1. The category S of sets and functions.

2. The category of sets and identity maps.

3. The category J of topological spaces and continuous maps. This is also called the topological category.

4. The category of vector spaces and linear transformations.

5. The category of groups and homomorphisms.

6. The category of rings and ring homomorphisms.

7. The category of manifolds and smooth maps. This is called the smooth category.

8. The category of metric spaces and isometries.

9. The category of categories and covariant functors.

Definition 10. A functor is a map of categories F: C → D which preserves composition and takes identities to identities. That is F (1_{X}) = 1_{Y} where Y is some object in D and F (f∘g) = F (f)∘F (g) (called a covariant functor) or F (f∘g) = F (g)∘F (f), (called a contravariant functor).

Note that the identity map C → C is a covariant functor and the composition of two covariant functors is a covariant functor, so covariant functors form a category as in 9.

We have the following examples of functors. First a definition.

Definition 11. Suppose A ⊂ X. The inclusion map i: A ↪ X is the map defined by i(a) = a.

Examples of functors:

1. If A ⊂ C are categories, then the inclusion map i: A → C is a covariant functor, called the forgetful functor.

2. Consider the map S ⟶^{F_{∗}} S which takes any function f: X → Y to a function f_{∗}: 2^{X} → 2^{Y}, where 2^{X} denotes the set of all subsets of X, and where f_{∗}: A ↦ f(A) ∈ 2^{Y}. This F_{∗} is a covariant functor.

3. F^{∗}: S ⟶ S which takes f: X → Y to f^{∗}: 2^{Y} → 2^{X} by B ⊂ Y ↦ f^{−1}(B) ⊂ X. This F^{∗} is a contravariant functor.

4. Homology is a covariant functor from J to the category of abelian groups and homomorphisms.

5. Cohomology is a contravariant functor from J to the category of rings and ring homomorphisms.

§3. Equivalence

Let A be a set.

Definition 12. A relation ∼ on A is an equivalence relation if and only if the following three axioms are satisfied.

a) (Reflexivity) a ∼ a for all a ∈ A.

b) (Symmetry) If a ∼ b, then b ∼ a.

c) (Transitivity) If a ∼ b and b ∼ c, then a ∼ c.

Examples of equivalence relations include equality, congruence modulo N for an integer N, congruence of triangles, similarity of triangles.

The equivalence class of a ∈ A is the set of all x ∈ A such that x ∼ a. The set of equivalence classes of ∼ form a partition of A. A partition of A is a family of disjoint subsets of A covering A. That is A = union of the equivalence classes and each equivalence class has empty intersection with any other. In other words, each a ∈ A is in an equivalence class E(a), and if E(a) ∩ E(b) ≠ 0, then E(a) = E(b).

Conversely, every partition of A gives rise to an equivalence relation on A. Namely a ∼ b ⇔ a and b are in the same subset of the partition.

Let A/ ∼ denote the set of equivalence class of ∼ which partition A. Define the map q: A → A/ ∼ given by q(a) = [a], where [a] denotes the equivalence class containing a. Note q is surjective.

Note that the fibres of any map partition the source.

Definition 13. A map f: X → Y in a category C is an isomorphism in C ⇔ there exists a map g: Y → X in C such that f ∘ g = 1_{Y} and g ∘ f = 1_{X}. Then g is said to be the inverse of f in C. Note the inverse g is also an isomorphism in C with f as its inverse.

Definition 14. We say that two objects X and Y are equivalent in category C or isomorphic in C if there is an isomorphism f in C so that f: X → Y. Denote this by X ∼_{C} Y.

Theorem 15. The relation ∼_{C} is an equivalence relation.

Proof. a) X ∼_{C} X since 1_{X}: X → X is an isomorphism in C.

b) If X ∼_{C} Y then Y ∼_{C} X since X ∼_{C} Y means that there exists an f: X → Y in C which is an isomorphism. The inverse g: Y → X is an isomorphism also, so Y ∼_{C} X.

c) Suppose X ∼_{C} Y and Y ∼_{C} Z, then X ∼_{C} Z. We have isomorphisms in C, f: X → Y and g: Y → Z. Then we claim g ∘ f: X → Z is an isomorphism in C. To see this, we will show that the inverse of g ∘ f, denoted (g ∘ f)′, is equal to f′ ∘ g′, where f′ is the inverse of f in C and g′ is the inverse of g in C. This follows by the following argument:

(g ∘ f) ∘ (f′ ∘ g′) = g ∘ (f ∘ f′) ∘ g′ = g ∘ 1_{Y} ∘ g′
= g ∘ g′ = 1_{Z}

and

(f′ ∘ g′) ∘ (g ∘ f) = f′ ∘ (g′ ∘ g) ∘ f = f′ ∘ 1_{Y} ∘ f
= f′ ∘ f = 1_{X}.

Theorem 16. Suppose f ∈ C has a left inverse and a right inverse. That is, suppose there exists ℓ ∈ C and r ∈ C so that ℓ ∘ f = 1_{X} and f ∘ r = 1_{Y} where f: X → Y. Then

a) ℓ = r and is an inverse to f. Hence f is an isomorphism in C.

b) f is bijective

c) If f is bijective, then f is an equivalence in S, the category of sets and functions.

Proof.

a) Consider ℓ = ℓ ∘ 1_{Y} = ℓ ∘ (f ∘ r) = (ℓ ∘ f) ∘ r = 1_{X} ∘ r = r.

b) Let ℓ = r: = f′. Now f is 1 − 1 since f′ ∘ f = 1_{X} is 1 − 1. Also f is onto since f ∘ f′ = 1_{Y} is onto.

c) Suppose f ∈ S is bijective. Then every fibre has exactly one element in it. Define g: Y → X to be the map which sends each y ∈ Y to the unique element in its fibre f^{−1}(y).

Examples:

1. Isomorphisms in the category S of sets and functions are bijections. Two sets are isomorphic in S if they have the same cardinal number of elements.

2. Isomorphisms in the category of topological spaces and continuous maps are called homeomorphisms and isomorphic spaces are said to be homeomorphic or of the same topological type.

3. In the smooth category, the isomorphisms are called diffeomorphisms and two manifolds are said to be diffeomorphic if they are isomorphic in the smooth category.

4. For groups and homomorphisms we have isomorphic and isomorphism.

5. For metric spaces and isometric maps, we say isometric spaces and isometries.

§4. The category of sets and functions S.

If two sets are isomorphic in S, we say they have the same cardinality, or the same number of elements.

We know from Theorem 16 that in S the bijections are the isomorphisms. So the fact that there is a one–to–one–onto correspondence between X and Y leads us to say they have the same number of elements. The two key theorems are:

Theorem 17, Schroeder–Bernstein.

Suppose f: X → Y and g: Y → X are injective maps. Then there exists a bijection b: X → Y. That is, X and Y have the same cardinality.

Theorem 18. Let 2^{X} denote the set of all subsets of X. Then X and 2^{X} cannot have the same cardinality.

The Schroeder–Bernstein theorem allows us to put a “greater than” relation ≤ on cardinality. So we say that card x < card 2^{X}.

The main cardinalities we will use are: Finite sets, countably infinite sets (of the same cardinality as the set of natural numbers ℤ_{+}), and 2^{ℤ_{+}} (the same cardinality as the real numbers).