I have a problem about some result appearing just before the proposition 1.5.2 in Combinatorics of Coxeter Groups by Bjorner, Brenti. It's about the inversions in $S_n$.
I don't understand why 1.26) is true.
$\text{inv}(xs_i)=\text{inv}(x)\pm1$
I can understand why we lose/add the element $(i ,i+1)$, but I'm not sure why the we keep the same number of inversions. For example if $(p,q)\in [1,n]^2\backslash \{i,i+1\}$ with $p<q$, it's ok since $s_i:=(i,i+1)$ won't move them (as stated by David, these are generators of $S_n$)
Now suppose that $(p,q)\neq (i,i+1)$ but they have a factor in common, namely either $p=i+1$, or $q=i$. In this case it's not clear why $s_i(p,q)$ is still an inversion of $x$.