1

In the comments and answer to another recent question, it became apparent that category theorists who work with the ‘many hom-class’ definition of a category implicitly view composition as a function of five variables, three of them the objects that define the hom-classes the composable arrows live in.

This is, to put it mildly, very counterintuitive to me. I can’t think of a single time in my years working with (fibered) categories where composition depended on the objects involved, but maybe I just didn’t notice due to not looking for it. To this end,

What are some examples of ‘naturally occurring’ categories $\mathcal{C}$ where we have objects $X,Y,Z,X’,Y’,Z’$ and arrows $$f\in{\bf Hom}_\mathcal{C}(Y,Z)\cap {\bf Hom}_\mathcal{C}(Y’,Z’),$$ $$g\in{\bf Hom}_\mathcal{C}(X,Y)\cap{\bf Hom}_\mathcal{C}(X’,Y’)$$ such that $$f\circ_{_{XYZ}}g\neq f\circ_{_{X’Y’Z’}}g?$$

Any relevant input is appreciated.

Alec Rhea
  • 9,009
  • 1
    Of course, as soon as I post this Kleisli categories pop to mind — their characterization where we keep the same objects but change the composition seems to depend on objects, so maybe there is a naturally occurring Kleisli category for a monad on a category with overlapping hom-classes satisfying this property… – Alec Rhea May 11 '22 at 12:40
  • 13
    Most category theorists would regard this question as meaningless in general because the existence of such $X$, $Y$, $Z$, $X'$, $Y'$, $Z'$, $f$, $g$ is not an isomorphism-invariant property of the category $C$. – Reid Barton May 11 '22 at 14:38
  • 3
    The key point is that the action of a functor (or in particular, an isomorphism of categories) on morphisms is also of "typed" nature, i.e., depends implicitly on the objects involved. If we allow in our foundations/definitions the possibility that $f : X \to Y$ and also $f : X' \to Y'$, we definitely do not require that $F_{XY}(f) = F(f) : FX \to FY$ and $F_{X'Y'}(f) = F(f) : FX' \to FY'$ are also equal! I wrote a longer answer at https://mathoverflow.net/questions/418804/category-with-domain-codomain-relations/. – Reid Barton May 11 '22 at 16:19
  • 3
    I like this question, and it’s quite hard to find a really unassailable example. (Brian Shin’s answer is nice, but it would be even nicer to have an example that was not “hand-rolled” but constructed by standard textbook constructions.) But the same phenomenon can be illustrated easily more with functors — it’s not hard to give examples where the action on morphisms really depends on their source and target. [cont’d in next comment] – Peter LeFanu Lumsdaine May 11 '22 at 21:07
  • 4
    [cont’d] E.g. take $\newcommand{\Set}{\mathrm{Set}}\Set$ to be the cat of sets, with hom-sets not artificially disjointified, i.e. morphisms are just functions $f$, not triples $(X,Y,f)$. In particular, all morphisms out of the empty set are equal. Now consider the functor $F : \Set \to \Set$ sending $X$ to $2^{0^X}$, so $F0$ has 2 elements, and $FX$ is a singleton for $X$ non-empty. Now $F$ sends the empty function $0\to 0$ to the identity on the 2-element set $F0$; but it sends the empty function $0 \to 1$ to the unique (and non-injective) map $F0 \to F1$. – Peter LeFanu Lumsdaine May 11 '22 at 21:09
  • 1
    +1 for "hand-rolled" – Brian Shin May 12 '22 at 03:36

2 Answers2

6

Here is a way to see that Brian Shin’s example can be obtained from (standard many-hom-sets presentations of) more general constructions — so this shows clearly that constructions from the standard literature can lead to cases where composition genuinely depends on the objects.

$\newcommand{\C}{\mathcal{C}}\newcommand{\op}{\mathrm{op}}\newcommand{\id}{\mathrm{id}}$First, take the category of elements $\int_{\C^\op} F$ of a presheaf $F : \C^\op \to \mathrm{Set}$ to have:

  • objects are pairs $(c,x)$, where $c \in \C$, $x \in F(c)$;
  • maps $(c',x') \to (c,x)$ are maps $f : c' \to c$ such that $x|_f = x'$.

In particular, applying this over the terminal category $\C = \{*\}$ yields a construction of discrete categories $DX = \int_1 X$ in which all identities are equal: $DX((*,x),(*,x)) = \{ \id_*\}$.

Now, take the Grothenedieck construction of a functor $\newcommand{\D}{\mathcal{D}}\D : \C \to \mathrm{Cat}$ to have:

  • objects are pairs $(c,d)$, where $c \in \C$, $d \in \D(c)$;
  • maps $(c,d) \to (c',d')$ are pairs $(f,g)$, where $f : c' \to c$, and $g : \D(f)(d) \to d'$.

Now take $G$ and $G'$ to be two different groups on the same underlying set, viewed as one-object categories; and consider the functor $\mathcal{G} : D2 \to \mathrm{Cat}$ picking out $G$ and $G'$. Then the Grothendieck construction of $\mathcal{G}$ recovers Brian Shin’s example: its hom-sets are $\{\id_*\} \times G$ and $\{\id_*\} \times G'$, i.e. the same set with different composition operations.


That said, let me address where you write:

it became apparent that category theorists who work with the ‘many hom-class’ definition of a category implicitly view composition as a function of five variables […] This is, to put it mildly, very counterintuitive to me.

I really want to convince you it shouldn’t be counterintuitive: it’s just being slightly more explicit about something you’re doing all the time anyway, in many situations.

As in my previous answer, think about group operations (I’ll write multiplicatively). We think of multiplication as a function of two variables — and for a fixed group, of course, it is. But with varying groups, it also depends on the group. And this really matters — for instance, when we take the product of a family of groups $\prod_i G_i$, we define its pointwise multiplication as $(x \cdot y)_i = x_i \cdot y_i$. Formally of course this must mean $x_i \cdot_i y_i$ — the multiplication used depends on $i$. But this doesn’t disrupt our intuition of it as a binary operation; it just also depends on another parameter i.

Of course, you could avoid that dependence by assuming that the groups in the family must be disjoint, or compatible where they intersect, in order to form the product. But I think most modern algebraists would find such a restriction highly artificial, and unnecessary anyway — the dependence is nothing to be worried by. Indeed, once you look for it, this sort of thing is everywhere in mathematical practice. A large part of Martin-Löf’s original motivation for dependent type theory was analysing how mathematicians use this sort of dependency in practice. For me, meeting dependent type theory was like Molière’s character learning he’d been speaking prose all his life.

Coming back to the typed-hom-sets definition of category: The point isn’t to focus on the extra dependence on objects. The point is to let us ignore the question intersection/disjointness of objects, and view it as just as irrelevant as the question of whether different abstract groups are disjoint; and we achieve it by exactly the same mechanism.

Mark Wildon
  • 10,750
  • 3
  • 44
  • 70
5

How about the following. Define a category $\mathcal{C}$ with two objects $A,M$ and the following hom-sets.

  1. $\mathrm{Hom}(A,A) = \mathrm{Hom}(M,M) = \mathbb{N}$, the set of natural numbers (including zero), and
  2. $\mathrm{Hom}(A,M) = \mathrm{Hom}(M,A) = \varnothing$.

The composition is specified by

  1. $\mathrm{Hom}(A,A) \times \mathrm{Hom}(A,A) \to \mathrm{Hom}(A,A)$ is addition $(n,m) \mapsto m+n$, and
  2. $\mathrm{Hom}(M,M) \times \mathrm{Hom}(M,M) \to \mathrm{Hom}(M,M)$ is multiplication $(n,m) \mapsto mn$.

Is this "naturally occurring"? Maybe not.

  • Ah, I guess this is exactly what @Peter LeFanu Lumsdaine was talking about in the linked post, just packaged as an example. – Brian Shin May 11 '22 at 18:53
  • This is interesting; I would call this class of examples “totally disconnected”, where we basically just take a bunch of monoid structures on the same set and form a category with an object for every monoid and define composition in the hom-class for each object to be the corresponding monoid operation. Are there any examples with ${\bf Hom}_\mathcal{C}(X,Y)\neq\emptyset$ for some $X\neq Y\in\mathcal{C}$? – Alec Rhea May 11 '22 at 19:52
  • 2
    The example is natural, and even more so if we replace $\mathbb{N}$ with a group $G$. The we have a groupoid consisting of two copies of $G$ qua category. For instance, this could appear as an exercise for students: show that a group $G$ qua a category is equivalent to the groupoid consisting of two copies of $G$. – Andrej Bauer May 11 '22 at 20:12
  • 2
    @AlecRhea we could do something a bit contrived and just add a third object to the above example which is final. – Brian Shin May 11 '22 at 20:25
  • 2
    @BrianShin Nice! And I agree with Andrej, this would make a great introductory exercise — if the books I learned from had an exercise along these lines it would have avoided the semi-existential crisis I’ve been having about disjoint hom-sets for the past few weeks. – Alec Rhea May 11 '22 at 21:10