Foundations/Functors: Maps Between Categories

Lesson 1.41,721 words

Functors: Maps Between Categories

A functor sends objects to objects and arrows to arrows while preserving composition and identities. Covariant and contravariant functors, the standard stock (forgetful, free, hom, and powerset), and the classification by faithfulness, fullness, and essential surjectivity all follow.

╌╌╌╌

Whenever we conceive of a collection of objects, we should decide at the same time how those objects are to be compared — Simmons states this as the operating principle of the subject.1 Categories are themselves mathematical objects, so the principle applies to them, and the comparison gadget is called a functor. A functor translates one category into another (objects to objects, arrows to arrows) in a way that respects the only structure a category has: composition and identities. The standard constructions of mathematics (take the underlying set, form the free group, form the fundamental group, take the dual space) are all functors, and seeing them as such is one of the first practical uses of the subject.

The definition

The two axioms supply what the following bookkeeping fact needs: from any string in , all ways of applying and composing yield the same arrow .2 A functor is a picture of the source category drawn inside the target category, with all commuting diagrams preserved: if in , then in . In particular, functors preserve isomorphisms: if and then and , so implies .

A functor carries a commuting triangle of to a commuting triangle of ; the image may collapse objects but never breaks an equation between composites.

Functors compose in the evident way (apply one, then the other), and every category has an identity functor . So categories and functors themselves form a category, written (with reserved for the category of small categories, a distinction taken up in the size lesson).3 The pattern structures and their structure-preserving maps form a category applies one level up.

Forgetful and free functors

The easiest functors discard structure.

  • sends a group to its underlying set and a homomorphism to itself-as-function. It forgets the group structure.
  • forgets multiplication, keeping the additive group; forgets addition, keeping the multiplicative monoid. Forgetting can be partial.
  • changes nothing at all: it forgets the property of being abelian rather than any structure.

Forgetful has no precise definition; it is a name for a family of examples, but the family is coherent enough to reason about.4 Simmons tabulates a dozen of these; the pattern is always a functor to a category of less-furnished objects that is the identity on underlying functions.

Free functors run the other way, adding structure as freely as possible.

  • sends to the free group on : words like in the elements of , multiplied by concatenation, with only the cancellation forced by the group axioms. A function induces by renaming letters.
  • sends to the vector space with basis : formal finite -linear combinations .
  • sends to the polynomial ring ; a polynomial is a formal expression in the generators, so this is the free commutative ring.
  • sends to the Kleene closure , the free monoid on .
The free and forgetful functors between Set and Grp run in opposite directions; the precise sense in which they are partners is an adjunction, the subject of a later module.

The pairing is not an accident. Free and forgetful functors are partners in a precise sense — each free functor is left adjoint to its forgetful companion — made precise in the adjunctions module.5

Historically, some of the first functors came from algebraic topology, where the strategy is to convert a hard question about spaces into a tractable one about algebra. The fundamental group is a functor from based spaces to groups: a based continuous map induces a homomorphism , and functoriality, , is what lets topological conclusions be drawn from algebraic computations.

Functors between small categories

When the source and target are one-object or thin categories, functoriality specializes to familiar notions.

Source targetA functor amounts to
monoid monoid a monoid homomorphism
monoid a left -set (an action of )
monoid a -linear representation of
poset poset a monotone map

Expand the -set row. A functor from a one-object category picks a single set and, for each , a function ; functoriality says and . Writing for , these are precisely the axioms of a left action.6 Representation theory, from this angle, is the study of functors out of a one-object category — a first instance of a definition that yields new theorems once recast functorially.

The functor from the two-element group to Set that sends the generator to the swap of 1 and 2 fixing 3; applying the generator twice returns the identity, which is the only functor axiom with content here.

Contravariance

Some natural operations reverse arrows. Simmons's dichotomy is sharp: a functor either preserves the direction of every arrow (covariant) or reverses the direction of every arrow (contravariant) — never a mixture.1

Phrasing contravariance through the opposite category keeps every functor literally covariant and pushes the reversal into the source; this convention simplifies later work. The main examples:

  • Dual spaces. Fix a field . Sending and (precomposition) is a contravariant functor from to itself.
  • Function rings. Sending a space to the ring of continuous real-valued functions on , and a continuous to the homomorphism , , is a contravariant functor from to .7
  • Open sets. Sending a space to its poset of open sets and a continuous to the inverse-image map is contravariant from to .

Contravariant functors into are important enough to be named: a presheaf on is a functor . The name comes from topology: a presheaf on the poset of open sets of a space assigns to each open a set (say, the continuous functions on ) and to each inclusion a restriction map . Presheaves become central in the Yoneda module.

The hom-functors

For a fixed object of any category , composition itself gives two functors into , one of each variance:

On objects, and . On an arrow , the covariant functor post-composes, , and the contravariant functor pre-composes, . The variance check is a two-line computation each way: associates as , while associates as — post-composition preserves order, pre-composition reverses it.8 The dash $-$ is a placeholder for the argument. These hom-functors are central to the subject; the representables module is entirely about them.

Three powerset functors

Different functors can share an object assignment. On objects, send every set to its powerset ; there are three standard ways to extend this to arrows :9

  • Direct image (covariant): , so iff for some .
  • Inverse image (contravariant): , so iff .
  • Universal image (covariant): (complement of the image of the complement), so iff every with lies in .

In a more general setting and are precisely the categorical semantics of the two quantifiers, and the three functors line up into adjunctions . The functor equations to check are and its two companions, with the middle one reversed: .

Faithful, full, essentially surjective

Functions between sets are classified by injectivity and surjectivity; functors admit a finer classification because they act on two levels, objects and arrows. The useful notions live at the hom-set level.

Faithfulness is a hom-set-by-hom-set condition, not global injectivity on arrows. A faithful functor can send two arrows with different sources to the same arrow: the inclusion of a two-object discrete category into collapses everything yet is vacuously faithful on each hom-set.10

Fullness and faithfulness measure the fibers of the hom-set map: for each arrow downstairs, faithful means at most one preimage upstairs, full means at least one.

The stock examples calibrate the definitions:

FunctorFaithfulFullEssentially surjective
yesnono
yesyesno
free yesnono
nonoyes

A subcategory of selects some objects and some arrows among them, closed under composition and identities; it is full when it keeps all arrows between selected objects, so a full subcategory is specified by its objects alone ( inside ). Inclusion functors of subcategories are automatically faithful, and full exactly for full subcategories. One caution: the image of a functor need not be a subcategory, since composable image-arrows can have a composite that is not itself an image — exists downstairs even when and do not compose upstairs.10

Full-and-faithful functors are the categorical notion of embedding: they reflect isomorphism ( implies ), and adding essential surjectivity yields the functors that are equivalences of categories, the notion of the same category. Defining equivalence requires comparing functors to identity functors, which is what natural transformations do; the Yoneda embedding being full and faithful rests on the same vocabulary.

Footnotes

  1. Simmons, An Introduction to Category Theory, §3.1 — functors as the comparison gadgets for categories; Definitions 3.1.1–3.1.2 with the covariant/contravariant dichotomy (always one or the other, never sometimes each). 2
  2. Leinster, Basic Category Theory, §1.2, Definition 1.2.1 and Remarks 1.2.2 — the functor axioms and the unique-composite bookkeeping they guarantee.
  3. Leinster, §1.2, Remarks 1.2.2(b) — functors compose, identity functors exist, and categories and functors form the category .
  4. Leinster, §1.2, Examples 1.2.3 — forgetful functors from , , ; forgetting structure versus forgetting properties (); with Simmons §3.2, Table 3.1 for the extended catalogue.
  5. Leinster, §1.2, Examples 1.2.4 — free groups (words with cancellation), free commutative rings (polynomial rings), and free vector spaces (formal linear combinations) as functors on .
  6. Leinster, §1.2, Examples 1.2.7–1.2.9 — functors between one-object categories are homomorphisms, functors are -sets, functors are representations, and functors between posets are monotone maps.
  7. Leinster, §1.2, Definition 1.2.10 and Examples 1.2.11–1.2.15 — contravariant functors as functors on ; the function-ring functor , dual vector spaces, and presheaves.
  8. Simmons, §3.2 — the covariant and contravariant hom-functors and , with the parallel associativity computations that fix their variances.
  9. Simmons, §3.3.1 — the three powerset functors , , : direct image, inverse image, and universal image, with the quantifier readings and the double adjunction of Exercise 3.3.2.
  10. Leinster, §1.2, Definition 1.2.16, Warning 1.2.17, Definition 1.2.18, and Warning 1.2.19 — faithful and full via hom-set maps, the caution that faithfulness is not injectivity on arrows, full subcategories, and the image-not-a-subcategory example. 2

╌╌ END ╌╌