Can someone fill the gap in the following proof, that the parity of the number of adjacent transpositions which yield a permutation $\pi$ is fixed ?
In a course I took this was done in the following way: Let $\pi=\tau_1\ldots\tau_n = \sigma_1\ldots\sigma_m$ be two different ways to write $\pi$ using adjacent transposition. Since we know, that a the number of inversions of $\pi$, $\mathrm{inv} (\pi)$, composed with an adjacent transposition, $(i,i+1)$, is $\mathrm{inv} (\pi) \pm 1$ (in short: $\mathrm{inv} (\pi \circ (i,i+1))=\mathrm{inv} (\pi) \pm 1$), it thus follows [this is the step that I don't understand! Why does it follow], that $n+m \equiv 0 \mod 2$ which is equivalent to $n \equiv m \mod 2$, so the parity is the same.
Are there also different proofs for this fact?