The number of inversions in the input sequence
is denoted by Inv. The main observation used in the
proof of Theorem 1.1 is that an element xi that has
not yet been moved from its input position i is swapped
during a partitioning step if and only if the selected
pivot xj satises i j < i or i < j i, or xi is
itself the pivot element (this is seen by inspection of the
code, noting that after a partitioning step, the pivot element xj resides at its nal position j ). We shall only
need the only if" part.