induction c; intuition; simpl in *.
discriminate.
case_eq (evalDet_step c s); intuition;
rewrite H1 in H0; try discriminate.
inversion H0; clear H0; subst.
erewrite evalDet_step_app_done_eq;
eauto.
inversion H0; clear H0; subst.
erewrite IHc.
eauto.
trivial.
case_eq (shiftOut s n); intuition;
rewrite H0 in H.
destruct p.
inversion H; clear H; subst.
erewrite shiftOut_app; eauto.
discriminate.
inversion H; clear H; subst.
trivial.
Qed.

(* Specifications: *)
Lemma evalDet_steps_app_eq_h : forall (A : Set)(x y : comp_state A),
evalDet_steps x y ->
forall (c : Comp A) s s' s'' a,
x = (cs_more c s) ->
y = (cs_done a s'') ->
evalDet_steps (cs_more c (s ++ s')) (cs_done a (s'' ++ s')).