Composition series

My friend after some time in industry is back in school, currently taking graduate algebra. I was today looking at one of his homework and in particular, I thought about and worked out one of the problems, which is to prove the uniqueness part of the Jordan-Hölder theorem. Formally, if G is a finite group and

1 = N_0 \trianglelefteq N_1 \trianglelefteq \cdots \trianglelefteq N_r = G and 1 = N_0' \trianglelefteq N_1' \trianglelefteq \cdots \trianglelefteq N_s' = G

are composition series of G, then r = s and there exists \sigma \in S_r and isomorphisms N_{i+1} / N_i \cong N_{\sigma(i)+1} / N_{\sigma(i)}.

Suppose WLOG that s \geq r and as a base case s = 2. Then clearly, s = r and if N_1 \neq N_1', N_1 \cap N_1' = 1. N_1 N_1' = G must hold as it is normal in G. Now, remember there is a theorem which states that if H, K are normal subgroups of G = HK with H \cap K = 1, then G \cong H \times K. (This follows from (hkh^{-1})k^{-1} = h(kh^{-1}k^{-1}), which shows the commutator to be the identity). Thus there are no other normal proper subgroups other than H and K.

For the inductive step, take H = N_{r-1} \cap N_{s-1}'. By the second isomorphism theorem, N_{r-1} / H \cong G / N_{s-1}'. Take any composition series for H to construct another for G via N_{r-1}. This shows on application of the inductive hypothesis that r = s. One can do the same for N_{s-1}'. With both our composition series linked to two intermediary ones that differ only between G and the common H with factors swapped in between those two, our induction proof completes.