Let $\mathcal{A}$ be an abelian category and let $X$ and $Y$ be objects in $\mathcal{A}$. The Yoneda $\text{Ext}^{n}(Y,X)$ is defined by the following:


First we consider the class $\text{E}^{n}(Y,X)$ of all exact sequences in $\mathcal{A}$ of the form $E : 0 \rightarrow X \rightarrow Z\_{n} \rightarrow \cdots \rightarrow Z\_{1} \rightarrow Y \rightarrow 0$. Then we defined two exact sequences $E$ and $E'$ in $\text{E}^{n}(Y,X)$ to be equivalent if there are exact sequences $E' = E\_{0}, \ldots, E\_{k} = E'$ in $\text{E}^{n}(Y,X)$ such that for each $0 \leqslant j \leqslant k-1$, there is either a morphism $E\_{j} \rightarrow E\_{j+1}$ or a morphism $E\_{j+1} \rightarrow E\_{j}$ with fixed ends. (Here by morphism with fixed ends I mean a morphism of complexes such that the left morphism $X \rightarrow X$ and the right morphism $Y \rightarrow Y$ are the identities.) Then we define $\text{Ext}^{n}(Y,X)$ to be the collection of equivalence classes in $\text{E}^{n}(Y,X)$ determined by the above relation (which is an equivalence relation).


However, I saw many texts in the internet which give another definition for the above equivalence relation (see for example definition 13.27.4 [here](https://stacks.math.columbia.edu/tag/06XP)). They say that $E$ and $E'$ are equivalent if there are morphisms with fixed ends $E \leftarrow E'' \rightarrow E'$ for some $E''$ in $\text{E}^{n}(Y,X)$. How can we prove that these definitions give rise to the same equivalence relation?


Obviously, if $E$ and $E'$ are equivalent by the second definition, then they are equivalent in the first definition, but how can we prove the converse?



Definition of the Yoneda Ext
You can always reduce an arbitrary "zigzag" as in the first definition, to one of length two, as in the second definition, by applying the following trick:


1. Whenever you encounter morphisms $E\_{j-1}\to E\_j\to E\_{j+1}$ or $E\_{j-1}\leftarrow E\_j\leftarrow E\_{j+1}$ that go in the same direction, take their composite.
2. Whenever you encounter morphisms of the form $E\_{j-1} \to E\_j \leftarrow E\_{j+1}$, replace by their pullback. More precisely, let $E\_j'$ be the pullback of this diagram and take the new morphisms to be $E\_{j-1} \leftarrow E\_j'\rightarrow E\_{j+1}$.


By applying steps 1 and 2 repeatedly, you necessarily arrive at a zigzag of length 2 (or 1, then you can insert a suitable identity).


A slightly less "algorithmic" perspective on the same argument: Note that the relation from the second definition is not obviously an equivalence relation! It is not clear a priori that it is transitive. And it is clear that the first definition is precisely the equivalence relation generated by the second relation. Thus, you need to check precisely that the second definition is already transitive, i.e. you need to figure out how to compose these length 2 zigzags (or spans). And that's where the pullback comes in.


