Sorting algorithm proved by Coq