Definition optSwap (A : Set)(opt : option (A * A)) :=
  match opt with
    | None => None
    | Some (a1, a2) =>
      Some (a2, a1)
  end.

Theorem list_pred_nth : forall n (A B : Set) P (lsa : list A)(lsb : list B) defa defb, list_pred P lsa lsb -> P defa defb -> P (nth n lsa defa) (nth n lsb defb).