# Comma categories over contravariant functors

Suppose I have categories $\mathcal{A}$, $\mathcal{B}$ and $\mathcal{C}$, and functors $S : \mathcal{A} \to \mathcal{C}$ and $T : \mathcal{B} \to \mathcal{C}$. Then the comma category $(S \downarrow T)$ is the category of pairs consisting of an object $A$ in $\mathcal{A}$ and an object $B$ in $\mathcal{B}$, equipped with a morphism $h : S(A) \to T(B)$.

In this comma category, a morphism from $(A, B, h)$ to $(A', B', h')$ consists of morphisms $f : A \to A'$ and $g : B \to B'$ such that the following diagram (transcribed from https://commons.wikimedia.org/wiki/File:Comma_Diagram.png) commutes:

$$\require{AMScd} \begin{CD} S(A) @>{S(f)}>> S(A')\\ @V{h}VV @VV{h'}V\\ T(B) @>>{T(g)}> T(B') \end{CD}$$

But what if either $S$ or $T$ is a contravariant functor? Then the definition of a comma category still works with almost no changes; the only needed change is that the arrow next to $S(f)$ or $T(g)$ in the diagram needs to be reversed.

So, given a contravariant functor $S : \mathcal{A} \to \mathcal{C}$ and a covariant functor $T : \mathcal{B} \to \mathcal{C}$, define the modified comma category $(S \downarrow T)$ as above, except that the $S(f)$ arrow in the commutative diagram points leftward instead of rightward:

$$\require{AMScd} \begin{CD} S(A) @<{S(f)}<< S(A')\\ @V{h}VV @VV{h'}V\\ T(B) @>>{T(g)}> T(B') \end{CD}$$

Likewise, if $S$ is covariant and $T$ is contravariant, the modified comma category is defined as above with the $S(f)$ arrow pointing rightward and the $T(g)$ arrow pointing leftward; and if $S$ and $T$ are both contravariant, both arrows point leftward.

Note that a modified comma category with a contravariant functor $S : \mathcal{A} \to \mathcal{C}$ is not the same as the corresponding comma category with $S : \mathcal{A}^\text{op} \to \mathcal{C}$. This is because a morphism in the former modified comma category contains a morphism $f : A \to A'$ in $\mathcal{A}$; whereas a morphism in the latter comma category contains a morphism $f : A \to A'$ in $\mathcal{A}^\text{op}$ instead.

Is there an name for "modified comma categories" as defined above, where either $S$ or $T$ (or both) may be contravariant? Are they equivalent to some other, better-known concept? Have they been studied before?

My motivation for asking this is that I'm interested in the ways that categories of algebraic structures can be built out of the category Set. For example, Wikipedia points out that the category of graphs is the slice category $(\text{Set} \downarrow D)$, where $D : \text{Set} \to \text{Set}$ is the "cartesian square" functor which sends $S$ to $S \times S$.

Some algebraic structures have "backward-mapping components"—that is to say, there are some types of structures where given two structures $A$ and $B$, a homomorphism $A \to B$ includes a function from a component of $B$ to a component of $A$ (rather than the other way around, which is more common). I tried to build one of these categories of algebraic structures using the comma category operator, but I found that, since one of the components mapped backwards, I would need one of the functors to be contravariant.

• I've seen this called an "arrow category" in the homotopy literature. – Randall Aug 23 '17 at 19:57
• For the purposes of this question, I'm considering a contravariant functor $\mathcal{C} \to \mathcal{D}$ to be distinct from (but equivalent to) a covariant functor $\mathcal{C}^\text{op} \to \mathcal{D}$. This is because, in the modified definition of a comma category, I want to consider the domain of a contravariant functor $\mathcal{C} \to \mathcal{D}$ to be $\mathcal{C}$, not $\mathcal{C}^\text{op}$. Is there some way I can edit the question to make this clearer? – Tanner Swett Aug 23 '17 at 20:09
• Maybe generalize from the twisted arrow category? – Derek Elkins Aug 23 '17 at 20:19
• @VladimirSotirov I've edited the question to clarify that I'm defining a new "modified comma category" concept and claiming that (as far as I can tell) the new concept is not equivalent to the old concept. Does my question seem clearer now? – Tanner Swett Aug 23 '17 at 20:44
• Yes, thank you. I had misunderstood how you intended to flip the arrow. – Vladimir Sotirov Aug 23 '17 at 20:48

The morphisms in your "modified comma category" for a pair of covariant functors $\mathcal A^{op}\xrightarrow{S}\mathcal C\xleftarrow{T}\mathcal B$ are precisely the interpolants of the pair of functors $\mathcal A^{op}\xleftarrow{\Pi_S}(S\downarrow T)\xrightarrow{\Pi_T}\mathcal B$ where $(S\downarrow T)$ is the usual comma category of covariant functors. In particular, your "modified comma category" makes sense for any pair of functors with common codomain, independently of their variance. Furthermore, I think your modified comma category is actually the object-level of a double category of interpolants, i.e. interpolants themselves have natural notion of morphisms between them which are compatible with the natural notion of composition.

Whether these notions have been studied beyond the reference from which I took the definitions (and doesn't really go in the direction of your "modified comma category") I don't know.

Definition (c.f. Categorical Interpolation: Descent and the Beck-Chevalley condition). Given two functors $\mathcal A\xleftarrow{F}\mathcal D\xrightarrow{G}\mathcal B$, the category of interpolants $/F,G/$ is defined as follows

• An interpolant from an object $A\in\mathcal A$ to an object $B\in\mathcal B$ is an object $D\in\mathcal D$ equipped with a pair of morphisms $A\xrightarrow{\phi} F(D)\in\mathcal A$ and $G(D)\xrightarrow{\psi} B\in\mathcal B$.
• A morphism of interpolants is a triple of morphisms $(a,d,b)\in\mathcal A\times\mathcal D\times\mathcal B$ such that the following squares commute

$$\require{amsCD} \begin{CD} A @>\phi>> F(D) @. @. D @. @. G(D) @>\psi>> B\\ @VaVV @VF(d)VV @. @VdVV @. @VG(d)VV @VbVV\\ A' @>\phi'>> F(D') @. @. D' @. @. G(D') @>\psi'>> B' \end{CD}$$

Example. Given a pair of (covariant) functors $\mathcal A\xrightarrow{S}\mathcal C\xleftarrow{T}\mathcal B$, consider the structure functors $\mathcal A\xleftarrow{\Pi_S}(S\downarrow T)\xrightarrow{\Pi_T}\mathcal B$ given by $$\begin{CD} @. @. @. S(A) @>{S(f)}>> S(A')\\ A @>f>> A' @<\Pi_S<< @V{h}VV @VV{h'}V @>\Pi_T>> B @>g>> B'\\ @. @. @. T(B) @>>{T(g)}> T(B') \end{CD}$$ Then an interpolant from an object $A'\in\mathcal A$ to an object $B'\in\mathcal B$ in $/\Pi_S,\Pi_T/$ is an object $S(A)\xrightarrow{h} T(B)\in(S\downarrow T)$ equipped with morphisms $A'\xrightarrow{f}A\in\mathcal A$ and $B\xrightarrow{g}B'\in\mathcal B$.

In other words, an interpolant in $/\Pi_S,\Pi_T/$ consists of the rows and left column of the square

$$\begin{CD} S(A) @<S(f)<< S(A')\\ @VhVV @Vh'VV\\ T(B) @>T(g)>> T(B') \end{CD}$$

Definition (c.f. ibid.). Any natural transformation $$\begin{CD} \mathcal D @>G>> \mathcal B\\ @VFVV \overset\tau\Rightarrow @VTVV\\ \mathcal A @>S>> \mathcal C \end{CD}$$ determines a functor $/F,G/\xrightarrow{K}(S\downarrow T)$ sending an interpolant $A\xrightarrow{\phi} F(D), G(D)\xrightarrow{\psi}B$ to the composite arrow $S(A)\xrightarrow{S(\phi)}SF(D)\xrightarrow{\tau_D}TG(D)\xrightarrow{T(\psi)}T(B)$, i.e. to the composite determined by the commutative square

$$\begin{CD} SF(D) @<S(\phi)<< S(A) \\ @V\tau_DVV @VVV\\ TG(D) @>T(\psi)>> T(B) \end{CD}$$ In this case we say that $A\xrightarrow{\phi} F(D), G(D)\xrightarrow{\psi}B$ is an interpolant of the object $S(A)\to T(B)\in(S\downarrow T)$.

Example. The tautological natural transformation $S\Pi_S\overset\tau\Rightarrow T\Pi_T$ sending an object $S(A)\to T(B)\in(S\downarrow T)$ to its underlying morphism $S(A)\to T(B)\in\mathcal C$ determines a functor $/\Pi_S,\Pi_T/\xrightarrow{K}(S\downarrow T)$ sending an interpolant $S(A)\xrightarrow{h}S(B)$ equipped with $A\xleftarrow{f} A'$ and $B\xrightarrow{g}B'$ to the composite $S(A')\xrightarrow{h'}T(B')$ given by $S(A')\xrightarrow{S(f)}S(A)\xrightarrow{h}T(B)\xrightarrow{g}T(B')$.

Definition/Conjecture. There is a double category structure on the category of interpolants $/\Pi_S,\Pi_T/$ whose object-level category is precisely the "modified comma category". Roughly, this double category structure is given as follows

• The domain and codomain functors $(S\downarrow T)\xleftarrow{D}/\Pi_S,\Pi_T/\xrightarrow{K}(S\downarrow T)$ are given by the above-described $/\Pi_S,\Pi_T/\xrightarrow{K}(S\downarrow T)$ and the functor $(S\downarrow T)\xleftarrow{D}/\Pi_S,\Pi_T/$ sends an interpolant consisting of the object $S(A)\xrightarrow{h}T(B)\in(S\downarrow T)$ equipped with the morphisms $A\xleftarrow{f}A'\in\mathcal A$ and $B\xrightarrow{g}B'\in\mathcal B$ to its underlying object $S(A)\xrightarrow{h}T(B)$.
• The identities functor $(S\downarrow T)\xrightarrow{I}/\Pi_S,\Pi_T/$ equips an object $S(A)\xrightarrow{h} T(B)$ with the identity morphisms $A\xleftarrow{\mathrm{id}_A}A$ and $B\xrightarrow{\mathrm{id}_B}B$.
• The partial composition functor combines a pair of compatible interpolants according to the diagram

$$\begin{CD} S(A) @<S(f)<< S(A') @<S(f')<< S(A'')\\ @VhVV @Vh'VV @Vh''VV\\ T(B) @>T(g)>> T(B') @>T(g')>> T(B'') \end{CD}$$ More precisely, the conjecture is that the object-level description of the partially-defined composition naturally extends to a morphism-level description, and that associativity of the resulting functorial composition is itself functorial.