+  induction xs.
- constructor.
- simpl in H.
destruct xs.
* constructor.
* constructor. simpl in H. apply IHxs. remember (a <=? z)%Z. destruct b.
simpl. apply H. congruence.
apply Z.leb_le. destruct (a <=? z)%Z; congruence.
+  induction xs.
- auto.
- simpl. destruct xs. auto.
simpl. remember (a <=? z)%Z. destruct b.
inv H. intuition.
inv H. apply Z.leb_le in H4. congruence.
Qed.

Lemma insert_permutation2 : forall x xs x2, Permutation xs x2 ->
Permutation (x::xs) (insert x x2).