On page 63 of Volume 1 of Stanley’s Enumerative Combinatorics there is a statement,
Clearly $w$ is uniquely determined by $w'$ and $w''$, and $\operatorname{inv}(w) = \operatorname{inv}(w') + \operatorname{inv}(w'')$.
Can someone explain why this is true? how is $w$ uniquely determined by $w'$ and $w''$?
Here $w$ is any permutation of the multiset $\left\{1^{a_1},\dots,m^{a_m}\right\}$; $w'$ is the permutation of $\left\{2^{a_2},\dots,m^{a_m}\right\}$ obtained by removing the $1$’s from $w$; and $w''$ is the permutation of $\left\{1^{a_1},2^{n-a_1}\right\}$ obtained from $w$ by changing every element greater than $2$ to $2$, where $n=\sum_{k=1}^ma_k$. The expression $\operatorname{inv}(w)$ designates the number of inversions of $w$, which is the number of pairs of indices $(i,j)$ with $i