induction c; intuition; simpl in *.
discriminate.
case_eq (evalDet_step c s); intuition;
rewrite H1 in H0.
inversion H0; clear H0; subst.
eapply evalDet_step_done_skipn.
eauto.
discriminate.
inversion H0; clear H0; subst.
eauto.
case_eq (shiftOut s n); intuition;
rewrite H0 in H.
destruct p.
inversion H; clear H; subst.
exists n.
eauto using shiftOut_skipn.
discriminate.
inversion H; clear H; subst.
exists O.
simpl.
trivial.
Qed.

Lemma evalDet_steps_done_skipn_h : forall (A : Set)(x y : comp_state A),
evalDet_steps x y ->
forall (c : Comp A) s a s',
x = (cs_more c s) ->
y = (cs_done a s') ->
exists n, s' = skipn n s.