Fixpoint repeat {A:Type}(n:nat)(x:A) : list A :=
match n with
| 0 => nil
| S n' => x :: repeat n' x
end.

Lemma multl_repeat_power : forall n x, multl (repeat n x) = power x n.
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).