induction 1; intuition; subst.
inversion H.
inversion H1; clear H1; subst.
simpl in *.
eapply evalDet_steps_bind_done_inv in H0.
destruct H0. destruct H.
intuition.
case_eq (P x); intuition;
rewrite H in H1.
inversion H1; clear H1; subst.
simpl in *.
inversion H6; clear H6; subst.
econstructor;
eauto.
eapply evalDet_repeat_steps_step.
eauto.
trivial.
eapply IHevalDet_steps.
eapply evalDet_steps_trans.
eapply evalDet_steps_bind_done.
eauto.
rewrite H.
econstructor.
trivial.
case_eq (P a); intuition.
Qed.

(* Specifications: *)
Lemma evalDet_steps_repeat_done_inv : forall (A : Set)(P : A -> bool)(c : Comp A) s a s',
evalDet_steps (cs_more (Repeat c P) s) (cs_done a s') ->
evalDet_repeat_steps P (cs_more c s) (cs_done a s').