Foundations/Natural Transformations and Functor Categories

Lesson 1.51,492 words

Natural Transformations and Functor Categories

A natural transformation is a map between two parallel functors: one component arrow per object, subject to a commuting square for every arrow of the source. Naturality is verified for the determinant, the double dual, and list operations; functors and natural transformations form the functor category [C, D]; and vertical and horizontal composition satisfy the Godement interchange law.

╌╌╌╌

Categories have maps between them, the functors. Functors in turn have maps between them, and this second-level notion is the one category theory was invented for: Eilenberg and Mac Lane introduced categories and functors in order to say precisely what a natural construction is. A natural transformation compares two parallel functors by giving, for every object of , an arrow from its -image to its -image, uniformly in a sense the definition makes exact.

The definition

To see what the compatibility condition should be, start where no condition is needed. Let be the discrete category with objects ; functors are just sequences and of objects of , and the reasonable notion of map from to is a sequence of arrows . In general has arrows too, and the components must respect them.1

The naturality square for the component of a transformation at an arrow : pushing forward along then crossing over equals crossing over then pushing along .

As with categories and functors, the definition is arranged so that each arrow of yields exactly one arrow of — the common diagonal of the square. We write when the double arrow is helpful for distinguishing levels.

The square rules out case-by-case definitions. A family of maps defined by one formula for some objects and another formula for others will generically fail the square for arrows crossing between the cases. Naturality is the formal counterpart of defined the same way for every object.

Worked examples

The functor category

Natural transformations compose. Given and (with ), define ; the two-storey naturality squares stack into one tall rectangle, which commutes because each storey does. Each functor has an identity transformation with components .

Vertical composition stacks naturality squares; the outer rectangle commutes because both inner squares do, giving components then .

The exponent notation is justified on small examples. If is the discrete two-object category, , a pair of objects and a pair of maps, matching . If is a monoid, is the category of left -sets and equivariant maps, and the right -sets. If and are ordered sets, is again an ordered set: the monotone maps, compared pointwise ( iff for all ; at most one transformation exists because all diagrams in a thin category commute).

Natural isomorphism

Since is a category, it comes with a notion of isomorphism automatically.

One direction is immediate. For the other, the inverses must be shown to form a natural family; rearranging the naturality square of around does it. The double dual above is the flagship instance: the canonical are isomorphisms, so as functors.

A natural isomorphism is a bridge of parallel component isomorphisms , each invertible, between the two images of the source category; every square between planks commutes.

for every separately is strictly weaker than . The pointwise statement supplies isomorphisms; naturality demands they be chosen coherently, and sometimes no coherent choice exists (the single dual again). When the source category is discrete the two notions collapse (there are no squares to satisfy), which is why the distinction is invisible until functors enter.

Natural isomorphism also repairs the too-strict notion of sameness for categories. Isomorphism of categories (, on the nose) almost never occurs; the correct notion, equivalence, asks only and , with natural isomorphisms in place of equalities.8 A functor is an equivalence precisely when it is full, faithful, and essentially surjective — the classification set up in the functors lesson. Equivalence is the sense in which the category of finite sets and the category of sets are the same, and in which one-object categories with invertible arrows are groups.

Horizontal composition and the Godement calculus

Vertical composition stacks transformations between functors sharing source and target. There is a second, orthogonal composition when the functors themselves compose. Given

two hybrid whiskerings are available first:9

  • with components — sample at image objects; naturality is 's own naturality at the arrows .
  • with components — apply to the components; naturality is preserving 's squares.

The two constructions are semantically different (one indexes into , the other transports ) yet formally interchangeable, which is why the notation treats them symmetrically. The horizontal composite is defined by either route around the square below, and naturality of makes the routes agree:

Horizontal composition of and : two transformations across consecutive functor pairs compose to one across the composites; the square commutes by naturality, and its diagonal is the component of the composite at .

Horizontal composition is associative, and it meshes with vertical composition through the rule that organizes every calculation involving both:

Composing vertically then horizontally equals composing horizontally then vertically. Godement codified this together with four bookkeeping rules for mixing functors and transformations (e.g. and ); all five reduce to the interchange law plus whiskering-as-horizontal-composition with identities, and . The interchange law is the defining coherence of a 2-category (objects, arrows, and arrows between arrows), of which is the founding example. We will not develop 2-categories, but the law itself returns in the Godement-style computations with monads, where and are natural transformations composed both ways at once.

Combining categories, functors, and natural transformations

Category, functor, and natural transformation together support the constructions of later modules:

  • Functor categories. , the category of presheaves, is where representable functors live; the Yoneda lemma computes its hom-sets out of representables.
  • Natural isomorphism as the right equality. Statements like naturally in and — the definition of an adjunction — only make sense with natural transformations in hand.
  • Limits in functor categories are computed componentwise, one naturality square at a time, in the limits module.

Footnotes

  1. Leinster, Basic Category Theory, §1.3, Definition 1.3.1 and the discrete-category motivation preceding it — components, the naturality square, and the exactly-one-arrow bookkeeping of Remarks 1.3.2.
  2. Leinster, §1.3, Example 1.3.5 — the determinant as a natural transformation between functors ; naturality as defined in the same way for all rings.
  3. Leinster, §1.3, Example 1.3.14 — the canonical evaluation map as a natural isomorphism from the identity to the double-dual functor on .
  4. Leinster, §1.3, Example 1.3.4 — natural transformations between functors recover the -equivariant maps.
  5. Barr & Wells, Category Theory for Computing Science, §4.3.8 — flatten as a natural transformation from the list-of-lists functor to the list functor, and reduce from to the identity on .
  6. Leinster, §1.3, Construction 1.3.6 and Examples 1.3.7–1.3.9 — vertical composition, identity transformations, the functor category , and the computations of , , and for ordered sets.
  7. Leinster, §1.3, Definition 1.3.10, Lemma 1.3.11, and Example 1.3.13 — natural isomorphism as isomorphism in the functor category, the componentwise criterion, and the warning that pointwise isomorphism does not imply natural isomorphism.
  8. Barr & Wells, §4.3.4 — a functor is an equivalence with pseudo-inverse iff and are naturally isomorphic to the identities.
  9. Barr & Wells, §4.4 — the Godement calculus: whiskerings and (Definitions 4.4.2–4.4.3), horizontal composition and its associativity (4.4.4–4.4.6), and the five rules with the interchange law G-1.

╌╌ END ╌╌