Theorem. \mathsf {Quickselect} is correct [00QE]

For any array A and any 0 \leq k < |A|, \mathsf {Quickselect}(A,k) correctly returns the element with order index k, that is, the element which would be at index k in a sorted version of A.