(*************************)
  (** ** Concatenation     *)
  (*************************)

  Fixpoint concat (l : list (list A)) : list A :=
    match l with
     | [] => []
     | x :: l => x ++ concat l
    end.

(* Specifications: *)
Lemma concat_nil : concat [] = [].
Lemma concat_cons : forall x l, concat (cons x l) = x ++ concat l.
Lemma concat_app : forall l1 l2, concat (l1 ++ l2) = concat l1 ++ concat l2.
Lemma in_concat : forall l y, In y (concat l) <-> exists x, In x l /\ In y x.
Lemma list_eq_dec : forall l l':list A, {l = l'} + {l <> l'}.
Lemma count_occ_rev l x : count_occ eq_dec (rev l) x = count_occ eq_dec l x.