proposition: Lemma exchange_eq_nil: forall A (L : list A) i j, exchange L i j = nil -> L = nil.
proof: Proof. unfold exchange. intros A L i j. case nth_error; auto. case nth_error; auto. destruct L. trivial. destruct j, i; simpl; discriminate. Qed.
imports: Psatz List Arith.Div2 Even Relations RelationClasses PeanoNat Peano_dec Recdef Sorting Permutation Multiset