intuition.
inversion H; clear H; subst.
trivial.
Qed.

Lemma shiftOut_ls_eq : forall n ls1 ls2 v ls1' ls2',
shiftOut ls1 n = Some (v, ls1') ->
shiftOut ls2 n = Some (v, ls2') ->
(firstn n ls1) = (firstn n ls2).