induction n; destruct ls; intuition; simpl in *; try discriminate.
apply gt_n_S.
eapply IHn.
case_eq (shiftOut ls n); intuition; trivial.
rewrite H0 in H.
destruct p.
discriminate.
Qed.

Theorem shiftOut_Some_inv : forall n ls v ls',
shiftOut ls n = Some (v, ls') ->
(n <= length ls)%nat.