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

(* Specifications: *)
Lemma firstn_repeat_le : forall A (x:A) m n, m <= n -> firstn m (repeat n x) = repeat m x.
Lemma in_repeat_eq : forall A (x y:A) n, In x (repeat n y) -> x=y.
Lemma map_repeat : forall A B (f:A->B) n x, map f (repeat n x) = repeat n (f x).
Lemma multl_repeat_power : forall n x, multl (repeat n x) = power x n.
Lemma length_repeat : forall A n (x:A), length (repeat n x) = n.
Lemma nth_repeat : forall A n (x:A) d i, i < n -> nth i (repeat n x) d = x.