Definition move_forward {A}(i j:nat)(l:list A)(d:A) : list A :=
  firstn i l ++ firstn j (skipn (S i) l) ++ (nth i l d :: skipn (S (i+j)) l).

Lemma firstn_firstn : forall A n (l : list A), firstn n (firstn n l) = firstn n l.