Let $\mathsf{C}$ be a category and $S$ be a collection of morphisms in $\mathsf{C}$. In this generality, we can construct the localization $S^{-1}\mathsf{C}$ by posing its objects to be the same as those in $\mathsf{C}$ and a morphism $M\to N$ to be a path
where the $L_i$ are objects of $\mathsf{C}$, the arrows to the right are morphisms of $\mathsf{C}$, and the arrows to the left are elements of $S$, up to equivalence. This equivalence relation, denoted $\sim$, says basically that compositions should behave well
that we may ignore identities
and that arrows to the left correspond to inverses
Usually, $S$ satisfies the axioms of a (left) multiplicative system which implies that every path is equivalent to a path of the form
which we call a roof. We wish to see if two roofs define the same morphism without ever dealing with longer paths, so we say that two roofs are $\sim_L$ equivalent if there exists an object $L$ in $\mathsf{C}$ and morphisms $p_1:L_1\to L$, $p_2:L_2\to L$ making the diagram
commute, and such that $p_2\circ s_2=p_1\circ s_1$ is in $S$.
In order for this to be useful, of course both notions should coincide. That is, there should exist a dashed isomorphism making the diagram
commute. I can verify that $\sim_L$ is indeed an equivalence relation (as is $\sim$), that such a map exists and that it is surjective. How can I prove that it's also injective?