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

Lemma sublist_extend : forall {A} (l : list A) ls i j, sublist i j (extend l ls) = extend (sublist i j l) (sublist i j ls).