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

Lemma Znth_extendr_ge : forall {A}{d: Inhabitant A} (l : list A) ls i, Zlength l <= i -> Znth i (extendr l ls) = Znth i ls.