Natural transformation

As Eilenberg–Mac Lane first observed, β€œcategory” has been defined in order to define β€œfunctor” and β€œfunctor” has been defined in order to define β€œnatural transformation.”

[cite:@maclane2000categories]

In category theory, a natural transformation defines a mapping between functors.

Definition

The notion of a mapping between parallel mappings should remind you of homotopies except for the fact that natural transformations are not generally invertible [cite:@riehl2017category]. A natural transformations is invertible iff it is comprised solely of isomorphisms, in which case it is called a natural isomorphism.

A natural transformation Ξ·:Fβ‡’G between homogeneous functors F,G:𝐂→𝐃 is a family of mappings Ξ· such that, for any cβˆˆπ‚, Ξ·c is a 𝐃-morphism Ξ·c:Fcβ†’Gc. These Ξ·c morphisms are called the components of the natural transformation. Further, it is required that for any 𝐂-morphism f:xβ†’y, the naturality condition commutes.

When defining a specific natural transformation, it is usually most convenient to say "the arrows {f,g,…} are natural," meaning that each arrow defines a component of the natural transformation.[cite:@riehl2017category]

Examples

Power set inclusions

There is a natural transformation Ξ·:\Idπ’πžπ­β‡’P from the identity functor to the covariant power set functor whose components are inclusions Ξ·A:Aβ†’PA carrying each element a∈A to the singleton {a}∈PA. The naturality condition specialises to and does indeed commute.

Natural transformations between actions

For a group G, an action is defined by a functor Xβˆ—:𝐁G→𝐂 associated with some object Xβˆˆπ‚ equipped with a left action of G. Since 𝐁G hosts only a single object, a natural transformation Ξ·:Xβˆ—β‡’Yβˆ— between two actions Xβˆ—,Yβˆ—:𝐁G→𝐂 consists of just one morphism Ξ·βˆ—:Xβ†’Y. The lone morphism is said to be G-equivalent, meaning that the diagram commutes.

Categorification of the natural numbers

This example constructs a categorification of the natural numbers and uses natural isomorphisms to describe laws of arithmetic.

Given sets A and B, let A×B denote their cartesian product, let A+B denote their disjoint union, and let BA denote the set of functions A→B. The relation between these operations are defined by the following natural isomorphisms:

  1. Distributivity of Γ— over +, defined between a pair of functors π’πžπ­3β†’π’πžπ­: (A,B,C)↦AΓ—(B+C)β‰…(A,B,C)↦(AΓ—B)+(AΓ—C)

  2. Distributivity of exponentiation over Γ—, defined between functors π’πžπ­2Γ—π’πžπ­op: (A,B,C)↦(AΓ—B)Cβ‰…(A,B,C)↦ACΓ—BC

  3. Products of powers, defined between functors π’πžπ­Γ—(π’πžπ­op)2β†’π’πžπ­: (A,B,C)↦AB+Cβ‰…(A,B,C)↦ABΓ—AC

  4. Curry/uncurry isomorphism, defined between functors π’πžπ­Γ—(π’πžπ­op)2β†’π’πžπ­: (A,B,C)↦(AB)Cβ‰…(A,B,C)↦ABΓ—C

Notice how each variable appearing as an exponent is contravariant. This is because the map (B,A)↦AB is a contravariant functor β€” namely, the two-sided represented functor.

We can reverse this "categorification" to understand the concept's meaning. We can decategorify by restricting the featured natural isomorphisms to 𝐅𝐒𝐧iso, the category of finite sets and bijections between them, and rewritng the isomorphisms in terms of natural numbers |A|, |B|, and |C| in place of the sets [cite:@riehl2017category].

Natural transformations between hom-functors

A natural transformation hβˆ—:𝐂[βˆ’β†’y]⇒𝐂[βˆ’β†’z] between hom-functors arises for any two morphisms f:wβ†’x, h:yβ†’z in a locally-small category 𝐂.[cite:@riehl2017category] Post-composition by h and pre-composition by f define functions between hom-sets as in 𝐂[xβ†’y]β†’βˆ’h𝐂[xβ†’z]↓fβˆ’β†“fβˆ’π‚[wβ†’y]β†’βˆ’h𝐂[wβ†’z], where gβˆ’ denotes a function h↦gh, and similar is the case of βˆ’g. The various instantiations of βˆ’h are then natural and define hβˆ—.

It is important to remember that our notation suggests that βˆ’h is "polymorphic" in a sense.

Notation

Riehl and Wikipedia always use η:F⇒G to denote a natural transformation.[cite:@riehl2017category] However, one could justify usage of η:F→G just as functors share notation with morphisms: natural transformations are morphisms in the functor category, just as functors are morphisms in the category of (small) categories.

Composition

Interestingly, natural transformations have not one, but two notions of composition. The former, vertical composition, takes natural transformations Ξ·:Fβ‡’G and Ξ΅:Gβ‡’H and gives a single transformation Ξ·Ξ΅:Fβ‡’H. Orthogonally, horizontal composition inputs natural transformations Ξ·:Fβ‡’G and Ξ΅:Jβ‡’K and spits out a transformation Ξ·βˆ—Ξ΅:FJβ‡’GK.

Vertical composition of natural transformations

Vertical composition is what one typically thinks of when they hear "composition."

Given natural transformations Ξ·:Fβ‡’G and Ξ΅:Gβ‡’H, their vertical composition Ξ·Ξ΅:Fβ‡’H is a natural transformation defined by the concatenation of Ξ·'s and Ξ΅'s naturality conditions:[cite:@enwiki:1294050027] Vertical composition is associative and has identity per the natural transformation \id{F} : F \naturalto F ParseError: Function "\id" is not trusted at position 1: \Μ²iΜ²dΜ²{F} : F \natura… whose components are identity morphisms. This paves way for its use in the definition of the functor category, the category of functors and natural transformations between them.

Horizontal composition of natural transformations

Given natural transformations Ξ·:Fβ‡’G and Ξ·:Jβ‡’K, their horizontal composition Ξ·βˆ—Ξ΅:FJβ‡’GK is defined by first transforming the 'outside,' then transforming the 'inside:'[cite:@enwiki:1294050027]