intros n l0.
generalize n; clear n.
elim l0; clear l0.
intros n l1 a nth; elimtype False.
apply (inv_nth_nil n a nth).
intros a0 l0 ih n.
case n; clear n.
intros l1 a nth.
rewrite (inv_nthO a0 l0 a nth).
simpl in |- *; apply My_NthO.
intros n l1 a nth.
simpl in |- *; apply My_NthS.
apply ih.
apply (inv_nthS n a0 l0 a nth).
Qed.

(* Specifications: *)
Lemma nth_app1 :
forall (n : nat) (l0 l1 : list B) (a : B),
my_nth n l1 a -> my_nth (length l0 + n) (l0 ++ l1) a.