Category Theory
Zulip Server
Archive

You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.


Stream: learning: questions

Topic: Intuition for the 'naturality axiom'


view this post on Zulip সায়ন্তন রায় (Dec 30 2022 at 06:20):

Not sure if I have asked this here earlier, but I was rereading the definition of natural transformation yesterday and I couldn't understand the intuition behind this definition, in particular the naturality axiom. From a purely linguistic point of view, in natural transformation the word 'natural' is an adjective (the situation is somewhat similar to well-formed formulas in logic, which is just a bad terminology). So, naively, it gives us the impression that there are certain things called transformations and some of them are natural. However from the definition itself it is not clear (at least to me) why natural transformations are called transformation and what is so natural about them. In particular the naturality axiom does not look natural at all to me, if we try to look at it from the general perspective. Is this just a bad terminology (motivated by some particular example(s), where it made sense) or is there something deep in it?

view this post on Zulip Jean-Baptiste Vienney (Dec 30 2022 at 11:55):

In a category, you have objects say A,BA,B… which are related by morphisms between objects. Say f:ABf:A \rightarrow B. Take two categories C,D\mathcal{C}, \mathcal{D}. A functor F:CDF:\mathcal{C} \rightarrow \mathcal{D} is a « construction » done from every object ACA \in \mathcal{C} to give something new, namely F(A)DF(A) \in \mathcal{D}.

Such constructions are frequent in mathematics. Examples: product of sets, disjoint union of sets, tensor product of vector spaces, dual of a vector space…

Category theory points out that you can also apply these construction to morphisms! and the definition of functor asks for constructions which do this in a good way.

Imagine that you are in a pure categorical world. You start with some objects A,B,CA,B,C… and some morphisms f,gf,g… between them and the only way to build new objects is to use functors F,GF,G…. Then most of your morphisms are going to look like F(f):F(A)F(B)F(f):F(A) \rightarrow F(B).

It happens that in maths you often have morphisms between two constructions F(A)F(A) and G(A)G(A) applied to the same object AA. You can call it a transformation αA:F(A)G(A)\alpha_{A}:F(A) \rightarrow G(A) between these two constructions. How does it interact with the morphisms F(f)F(f)? Often, with the naturality axiom. Thus the « natural » transformations between these constructions, which happen in the « mathematical nature » are called natural transformations.

Is it profound? Yes I guess, although I can’t tell exactly why. In logic (at least in linear logic) you start with letters A,BA,B… and you create morphisms only by using functors (logical connectors) and natural transformations (rules of inference). It happens that all your morphisms are natural transformations (in fact a more general kind of transformations, but the idea is here).

In mathematics, you can look at whatever crazy morphisms from F(A)F(A) to G(A)G(A) and they can be « non-natural » transformations. But it seems that they are not the interesting ones. And logical foundations of maths (as opposed to set-theoretical ones) seem to give them less importance.

view this post on Zulip Jean-Baptiste Vienney (Dec 30 2022 at 12:07):

That’s how I think of naturality although it’s incomplete.

view this post on Zulip Josselin Poiret (Dec 30 2022 at 15:05):

for another (maybe less beginner-friendly) take on natural transformations, you can actually argue that natural transformations aren't a core concept in category theory, and that you can uncover its definition from another source: objects in a category C C correspond exactly to functors 1C \mathbb{1} \rightarrow C , and arrows to functors 2C \mathbb{2} \rightarrow C . Now, suppose we're pretty sure we want our categorical language to have functor categories [C,D] [C, D] , in the sense of having exponential objects in Cat Cat . Then, we know by the defining adjunction that the objects of [C,D] [C, D] would correspond exactly to functors CD C \rightarrow D , and arrows to functors 2×CD \mathbb{2} \times C \rightarrow D . Now, if you unroll that last bit, you get the definition of a natural transformation! Now, of course, the definitions of adjoints require some pre-existing concept of a natural transformation, but we're not actually using the naturality here to recover the definition.

view this post on Zulip David Egolf (Dec 30 2022 at 16:58):

I have felt disappointed by the motivation for natural transformations in the books I've been learning from - although the idea of a natural transformation corresponding to a "translation" of structures in the target category is pretty nice. So this is interesting to me!

Adjoints still scare me, but the similarity between ((1C1 \to C with 2C2 \to C as objects and arrows in CC)) and ((CDC \to D with 2×CD2 \times C \to D as objects and arrows in a functor category)) is very cool! I guess if we think of 2×C2 \times C as sort of like two copies of CC connected by some morphisms, then this roughly corresponds to my intuition of natural transformations between functors from CC to DD as translating between two images of CC under functors to DD. A functor from 2×C2 \times C to DD is a generalized element of "kind" 2×C2 \times C in DD, so intuitively it tries to specify something similar in some way to 2×C2 \times C inside DD.

I think coproducts exist in CatCat? If so, then this makes me wonder if functors of the form CDC \to D and 2⨿CD2 \amalg C \to D form objects and arrows of a category, where 2⨿C2 \amalg C is the coproduct of 22 with CC.

view this post on Zulip Josselin Poiret (Dec 30 2022 at 17:24):

@David Egolf the fact that it's interesting to look at 2×CD 2 \times C \to D is because ×C - \times C is left adjoint to [C,] [C, -] , so functors 2[C,D] 2 \to [C, D] are in 1-to-1 correspondance with functors 2×CD 2 \times C \to D (that's what being adjoint means, roughly). I don't think you'll find much motivation for functors 2⨿CD 2 \amalg C \to D , they're just pairs of functors 2D 2 \to D and CD C \to D , ie an arrow of D D and a functor CD C \to D .

view this post on Zulip David Egolf (Dec 30 2022 at 17:31):

That makes sense @Josselin Poiret ! I was just trying to change "product" for "coproduct" and hoping good things would still happen, without thinking about it too carefully.

view this post on Zulip John Baez (Dec 31 2022 at 00:45):

David Egolf said:

I think coproducts exist in CatCat?

Yes.

If so, then this makes me wonder if functors of the form CDC \to D and 2⨿CD2 \amalg C \to D form objects and arrows of a category, where 2⨿C2 \amalg C is the coproduct of 22 with CC.

By the way coproducts work, a functor 2⨿CD2 \amalg C \to D is the same as a pair consisting of a functor 2D2 \to D and a functor CDC \to D. It's unclear to me what you'd want to do with that pair. Maybe you meant to write 2×CD 2 \times C \to D?

view this post on Zulip David Egolf (Dec 31 2022 at 01:42):

@John Baez Josselin Poiret pointed this out above as well. I wasn't remembering any intuition for coproducts in CatCat when I wrote what you're quoting, so I had been hoping for something more exciting to happen. Oh well! Hopefully now I'll remember this stuff a bit better at least!
I do appreciate both of you explaining this, although I wish my original thoughts had been a little more interesting :upside_down: .

view this post on Zulip John Baez (Dec 31 2022 at 10:26):

It's often good to think of binary coproducts as "disjoint unions" - that's how they work for Set and Top and Cat, for example. So when I visualize a coproduct I often see it as two separate blobs. The reason this intuition can be helpful is that in any category a morphism from a coproduct is just a map from each of its parts.

view this post on Zulip John Baez (Dec 31 2022 at 10:28):

A binary coproduct in the category of groups is not just the disjoint union of those two groups, since any two elements of a group need to talk to each other (you can multiply them). But a binary coproduct in the category of groupoids really is just a disjoint union: you just set the two groupoids next to each other.

view this post on Zulip John Baez (Dec 31 2022 at 10:29):

A coproduct in Vect is not just a disjoint union of vector spaces, since any two elements need to talk to each other. But it's a direct sum, which is the next best thing.

view this post on Zulip John Baez (Dec 31 2022 at 10:31):

Returning to the original topic, I find that the reason for the naturality axiom is a bit hard to explain... but not impossible. For example, it's a generalization of "coordinate independence" or "general covariance", which Einstein considered to be an important principle in physics.

view this post on Zulip John Baez (Dec 31 2022 at 10:32):

Saying how this works takes a bit of time, but the basic idea is that "constructions should get along with maps between things".

view this post on Zulip John Baez (Dec 31 2022 at 10:32):

I'm sorry, I'm not actually explaining this, just pointing in the vague direction of an explanation!

view this post on Zulip সায়ন্তন রায় (Dec 31 2022 at 14:53):

Suppose you have only the following in your data:

The term 'naturality' here means something like "the choice of α\alpha's spring from the data without assuming anything else". This intuition is more or less in accord with the standard intuition because when you are making arbitrary choices, it is you who are making the choices. Something is natural when, the result is independent of your choice. This is precisely what the commutativity of the diagram gives us.

Note that from the data the only information you can conclude are the existence of F(B),F(C),G(B),G(C),F(h)F(B), F(C), G(B), G(C), F(h) and G(h)G(h). So if you want to go from F(B)F(B) to G(C)G(C), there are precisely two paths that you have (thinking of any other path will include existence of objects and morphisms which is not derivable from the information given). Again, to prevent arbitrary choices here, we need the commutativity of the diagram.

(This is a response which I got from one of my professors to whom I asked this question. Maybe this is helpful to others also.)

view this post on Zulip Jean-Baptiste Vienney (Dec 31 2022 at 15:22):

John Baez said:

Returning to the original topic, I find that the reason for the naturality axiom is a bit hard to explain... but not impossible. For example, it's a generalization of "coordinate independence" or "general covariance", which Einstein considered to be an important principle in physics.

Could you explain this a little bit more? :grinning_face_with_smiling_eyes: That would be very interesting to us.

view this post on Zulip David Egolf (Jan 01 2023 at 17:15):

This document recently mentioned in #general > learning CT looks to be interesting for developing intuition for naturality: https://github.com/BartoszMilewski/Publications/blob/master/TheDaoOfFP/DaoFP.pdf . Interestingly "naturality" is discussed on its own before getting to natural transformations. I assume the author relates the two in the section on natural transformations!
update: Yes, this document has been helpful for my understanding of naturality. I hope it is for anyone else interested as well.

view this post on Zulip John Baez (Jan 02 2023 at 09:50):

Jean-Baptiste Vienney said:

John Baez said:

Returning to the original topic, I find that the reason for the naturality axiom is a bit hard to explain... but not impossible. For example, it's a generalization of "coordinate independence" or "general covariance", which Einstein considered to be an important principle in physics.

Could you explain this a little bit more?

Sure; consider any sort of coordinate-independent map in differential geometry. I don't know what's the most familiar, but let's take the Lie bracket of vector fields on a manifold. How can we say this is coordinate-independent?

view this post on Zulip John Baez (Jan 02 2023 at 09:53):

Here's one way. There's a category C of smooth manifolds and diffeomorphisms. To any manifold M we can assign a set V(M) of vector fields on M, and this gives a functor

V : C \to Set

view this post on Zulip John Baez (Jan 02 2023 at 09:58):

The Lie bracket is a way of turning two vector fields v,w on a manifold into one vector field [v,w] and in fact it gives a natural transformation from the functor

C (V,V)\stackrel{(V,V)}{\longrightarrow} Set ×\times Set ×\stackrel{\times}{\longrightarrow} Set

view this post on Zulip John Baez (Jan 02 2023 at 09:59):

sending any manifold M to the set of pairs of vector fields on M, to the functor

V: C \to Set

view this post on Zulip John Baez (Jan 02 2023 at 10:01):

When you check out what it means for this natural transformation to be natural, you'll see it means this functor gets along nicely with morphisms in C, which are diffeomorphisms - e.g. coordinate transformations, regarded "actively".

view this post on Zulip John Baez (Jan 02 2023 at 10:01):

So, the upshot is that it says the Lie bracket is coordinate-independent.

view this post on Zulip John Baez (Jan 02 2023 at 10:03):

But I guess this will only make sense if you've thought about "active" and "passive" coordinate transformations, and the Lie bracket... and it may require doing the calculation to see what the naturality square in the definition of natural transformation actually gives in this case!

view this post on Zulip John Baez (Jan 02 2023 at 10:05):

Anyway, the idea is that the nice maps between functors are the ones that get along with morphisms, and this is a big generalization of Einstein's thoughts on general covariance.

view this post on Zulip Jules Hedges (Jan 02 2023 at 13:07):

Perhaps it's useful for someone to also say that naturality is kinda like parametric polymorphism in programming (as implemented by type quantification or generics/templates/etc depending on the language) - when you write code that operates on many types in a uniform way

view this post on Zulip Josselin Poiret (Jan 03 2023 at 11:07):

Jules Hedges said:

Perhaps it's useful for someone to also say that naturality is kinda like parametric polymorphism in programming (as implemented by type quantification or generics/templates/etc depending on the language) - when you write code that operates on many types in a uniform way

right, although parametricity is a syntactical approximation of naturality that's slightly stronger: paremetricity enforces naturality by syntactical restrictions, but you can't expect naturality to always arise from something parametric