intuition.
specialize (map_eq_all _ _ _ H); intros.
eapply map_eq_if_all.
intuition.
Qed.
Fixpoint getSomes(A : Type)(ls : list (option A)) :=
match ls with
| nil => nil
| o :: ls' =>
match o with
| None => getSomes ls'
| Some x => x :: (getSomes ls')
end
end.

(* Specifications: *)
Lemma nth_nil:
forall (A : Set)(i : nat)(def : A),
nth i nil def = def.