Proof with auto.
intros.
unfold qs.
match goal with
|- context C [Fix_sub ?A ?R ?P ?p ?f ?x] =>
let folded := context C [ Fix_sub A R P p raw_body x ] in
change folded
end.
apply fix_measure_utils.rect.
intros.
apply raw_body_ext.
intros.
destruct x1. destruct y.
simpl in H0.
subst...
intros.
erewrite raw_body_ext.
rewrite bodies.
unfold body.
destruct x0...
simpl.
rewrite <- (vec.list_round_trip (x0 :: x1)).
apply X1.
intros.
unfold qs. fold raw_body...
intros.
unfold qs. fold raw_body.
f_equal; assumption.
Qed.

(* Specifications: *)
Lemma rect_using_lists (Q: list X -> M (list X) -> Type):
(Q nil (ret nil)) ->
(forall h t, (forall y, length y <= length t -> Q y (qs cmp pick y)) -> Q (h::t) (selectPivotPart (h::t))) ->
forall x, Q x (qs cmp pick x).