(* Use of this source code is governed by the license described	* * in the LICENSE file at the root of the source tree.		*)
Local Open Scope list_scope.
induction ls; intuition; simpl in *.
destruct n; try omega.
destruct n.
simpl.
trivial.
simpl.
eapply IHls.
omega.
Qed.

Theorem firstn_S :
forall (A: Type)(defA : A)(n : nat)(ls : list A),
n < length ls ->
firstn (S n) ls =
(firstn n ls) ++ ((nth n ls defA) :: nil).