# Why pasting a finite number of commutative diagrams is commutative

I am aware that if you paste two commutative squares, that diagram is commutative, but, in general, how can one prove that a diagram (with squares or triangles) is commutative iff every subdiagram is commutative? I can't see how to generalize. Thanks in advance

• How exactly do you define "subdiagram"? I think this question cannot be answered if a rigorous definition lacks. It cannot be your intention that a diagram is also a subdiagram of itself (that would make things trivial here). So it seems as if you must go for something like "atomic subdiagrams". – drhab Aug 11 '18 at 8:43
• It isn't true for arbitrary diagrams actually, there are counterexamples (one was posted on the facebook page Mathematical theorems you had no idea existed, 'cause they're false recently). It's true for poset diagrams though, and you can probably make a formal proof with the disjoint union of posets glued along a pair of elements or something, by just looking at them as functors, and with a certain universal property of the gluing – Max Aug 11 '18 at 8:59
• @Max I can't find the post you're referring to. Exactly what claim does it provide a counterexample to? – Kevin Carlson Aug 11 '18 at 21:14
• @KevinCarlson : after checking, it was actually their second page (Technical difficulties) which they shared at some point. The claim is roughly that "any two commutative diagrams pasted together in any way form a commutative diagram". Here's a link : m.facebook.com/255712798317911/photos/… (note that it doesn't concern posets, or indeed preorders pasted along one arrow, but rather many) – Max Aug 11 '18 at 21:38
• @KevinCarlson neither does it concern your claim that if all squares or all triangles commute, then the whole diagram does – Max Aug 11 '18 at 21:58

A commutative diagram indexed by a preorder (in particular, a poset) $J$ is nothing more or less than a functor $D:J\to C$. Thus the reason that a diagram is commutative if and only if all triangles or squares in it are commutative follows from the composition axiom of a functor: $D(x\circ y)=D(x)\circ D(y)$ says exactly that all triangles in the diagram commute, while one could equivalently define a functor by requiring $D(x)\circ D(y)=D(z)\circ D(w)$ whenever $x\circ y=z\circ w$, which says that all squares commute. (For the less immediate implication between the usual and the new definition of a functor, let $z$ be an identity and $w=x\circ y$.) It's unnatural to ask for commutative diagrams, in the sense that $D$ identifies any two paths between two objects in its image, indexed by non-posets, since a commutative diagram indexed by any category $J$ must factor through the universal poset under $J$. So this is probably the result you want.

• This is a bit too far on the "technically correct" side. When people draw commutative diagrams, they don't usually draw the whole functor $D$ -- they only draw the images of objects under $D$ as well as the images of some morphisms. So a commutative diagram might not contain triangles at all, but, e.g., consist of rectangles and pentagons. Checking that such a diagram is commutative is not automatic then, and I can imagine the simple cycles not always being sufficient. Your post suggests to fill in all the "missing arrows", but this isn't what the OP wants to do. – darij grinberg Aug 11 '18 at 22:44
• @darijgrinberg Sure, that's a good point. In your formulation, the question becomes something more like "How can we check if some set of relations on generating morphisms of a category yields a preorder?" In that form, it seems clear that nothing serious can be said; it would be interesting to see if there's some reasonably general intermediate question. – Kevin Carlson Aug 11 '18 at 23:12

Let us see the case of a diagram made of $2$ square subdiagrams.

$\require{AMScd}$ \begin{CD} A @>f>> B @>j>> E\\ @V g V V @VV h V @VV lV\\ C @>>i> D @>>k> F \end{CD}

For the diagram above to commute, the following three equalities must hold: \begin{align} l\circ j\circ f &= k\circ i\circ g, \tag{1} \\ h \circ f &= i \circ g, \tag{2} \\ l\circ j &= k \circ h \tag{3}. \end{align}

Actually, for the diagram to commute it suffices to show that (2) and (3) hold (i.e. that the two subdiagrams commute), since (1) follows from the last two, essentially by associativity of composition and transitivity of equality. Indeed, \begin{align} (l\circ j)\circ f &= (k \circ h) \circ f &&\text{by (3)} \\ &= k \circ (h \circ f) &&\text{by associativity} \\ &= k \circ (i \circ g) &&\text{by (2)}. \end{align}

This argument can be generalized in a straightforward way to a diagram made of $n$ (square or triangle) subdiagrams, for any $n \geq 2$ (the idea is the same as in the case $n = 2$). Formally, you can prove it by induction on $n$. The details of the proof are not really interesting and require heavy notations, I give you just an intuition.

By definition, the big diagram $D$ made of $n$ square subdiagrams is commutative if, given any two points $A$ and $B$ of $D$, all paths from $A$ to $B$ commute. But to prove that, it is sufficient to check that the $n$ square subdiagrams commute. Indeed, note that the if you have two paths $f$ and $g$ from $A$ to $B$, then you can transform $f$ into $g$ in steps, where each step only deals with edges of one square subdiagram (as we have seen explicitly for the case $n = 2$).

As an exercise, write an explicit proof for the case $n = 3$.

• I'm aware of the case of two squares, as I have said above. My question is for an arbitrary diagram. – HeMan Aug 11 '18 at 6:39