Prove that wavesort is sufficient for correctness of iteration-reordering.