Before the proof starts note that has elements, and then refers to the element at position with respect to
We know that because they form an inversion, we also know that is sorted in ascending order, therefore we know that , therefore for each we know forms an inversion in as needed.