Here$\require{AMScd}$Here are two results about groups:
(The Third isomorphism theoremThe third isomorphism theorem) Suppose that I have $A \triangleleft B \triangleleft C$ and $A \triangleleft C$. Then $C/B \cong (C/A)/(B/A)$.
(An exercise I just assigned my studentsAn exercise I just assigned my students) Suppose that we have $X \triangleleft Z$ and $Y \triangleleft Z$ with $X \cap Y = 1$. Then $(Z/X)/Y \cong (Z/Y)/X$.
Vague question a student just asked meVague question a student just asked me: Is there is some general context in which to think of these results and why they look similar?
We can write these as diagrams with exact rows and columns:
$$\begin{matrix} && && 1 && 1 && \\ && && \downarrow && \downarrow && \\ 1 &\to& A &\to& B &\to& B/A &\to& 1 \\ && = && \downarrow && \downarrow && \\ 1 &\to& A &\to& C &\to& C/A &\to& 1 \\ && && \downarrow && \downarrow && \\ && && C/B & \cong & (C/A)/(B/A) && \\ && && \downarrow && \downarrow && \\ && && 1 && 1 && \\ \end{matrix}$$
$$\begin{matrix} && && 1 && 1 && \\ && && \downarrow && \downarrow && \\ && && X &=& X && \\ && && \downarrow && \downarrow && \\ 1 &\to& Y &\to& Z &\to& Z/Y &\to& 1 \\ && = && \downarrow && \downarrow && \\ && Y &\to& Z/X &\to& (Z/X)/Y \cong (Z/Y)/X &\to& 1 \\ && && \downarrow && \downarrow && \\ && && 1 && 1 && \\ \end{matrix}$$
If \begin{gather} \begin{CD} @. @. 1 @. 1 \\ @. @. @VVV @VVV \\ 1 @>>> A @>>> B @>>> B/A @>>> 1 \\ @. @| @VVV @VVV \\ 1 @>>> A @>>> C @>>> C/A @>>> 1 \\ @. @. @VVV @VVV \\ @. @. C/B @>\cong>> (C/A)/(B/A) \\ @. @. @VVV @VVV \\ @. @. 1 @. 1 \end{CD} \\ \begin{CD} @. @. 1 @. 1 \\ @. @. @VVV @VVV \\ @. @. X @= X \\ @. @. @VVV @VVV \\ 1 @>>> Y @>>> Z @>>> Z/Y @>>> 1 \\ @. @| @VVV @VVV \\ 1 @>>> Y @>>> Z/X @>>> (Z/X)/Y \cong (Z/Y)/X @>>> 1 \\ @. @. @VVV @VVV \\ @. @. 1 @. 1 \end{CD} \end{gather} If we were in an abelian category, these would be two forms of the octahedral axiom.
Vague but more technical questionVague but more technical question: Is there something like ana semi-abelian category which includes the case of groups, and where we have something like an octahedral axiom?