(* There is nth_error in the Coq library, but it seems to return something in Type. *)
Fixpoint nth_option(A : Set)(ls : list A)(i : nat) :=
  match ls with 
    | nil => None
    | a :: ls' =>
      match i with
        | O => Some a
        | S i' =>
          nth_option ls' i'
          end
  end.

Theorem list_pred_snd_split_eq_l: forall (A B : Set) (a : list (B * A)) (b : list A), list_pred (fun (a0 : B * A) (b0 : A) => snd a0 = b0) a b -> b = snd (split a).