Fixpoint extend {A} (l : list A) ls :=
  match l, ls with
  | x :: xs, y :: ys => (x :: y) :: extend xs ys
  | _, _ => ls
  end.

Lemma sublist_combine : forall {A B} (l1 : list A) (l2 : list B) i j, sublist i j (combine l1 l2) = combine (sublist i j l1) (sublist i j l2).