(** A list of [n] elements, all equal to [x]. *)

Fixpoint list_repeat {A: Type} (n: nat) (x: A) {struct n} :=
  match n with
  | O => nil
  | S m => x :: list_repeat m x
  end.

Lemma in_list_repeat: forall (A: Type) n (x: A) y, In y (list_repeat n x) -> y = x.