Inductive uniq: list A -> Prop :=
  uniq_nil: uniq nil
| uniq_cons: forall a l, ~ In a l -> uniq l -> uniq (a::l).Inductive uniq: list A -> Prop :=
  uniq_nil: uniq nil
| uniq_cons: forall a l, ~ In a l -> uniq l -> uniq (a::l).Inductive uniq: list A -> Prop :=
  uniq_nil: uniq nil
| uniq_cons: forall a l, ~ In a l -> uniq l -> uniq (a::l).

(* Specifications: *)
Lemma uniq_perm l1 l2: perm l1 l2 -> uniq l1 -> uniq l2.
Lemma uniq_cons_inv a l: uniq (a::l) -> uniq l.
Lemma uniq_app_inv_l l1 l2: uniq (l1 ++ l2) -> uniq l1.
Lemma uniq_app_inv_r l1 l2: uniq (l1 ++ l2) -> uniq l2.
Lemma perm_incl_inv l1 l2: uniq l1 -> uniq l2 -> incl l1 l2 -> exists l3, perm l2 (l1 ++ l3).
Lemma list_split (A: Type) n1 n2 (l: list A): length l = n1 + n2 -> exists l1, exists l2, l = l1 ++ l2 /\ length l1 = n1 /\ length l2 = n2.
Lemma length_split (A B: Type) (a b: A) (lk: list B) l1 l2: length lk = length ((a:: l1) ++ b :: l2)%list -> exists k1, exists k2, exists lk1, exists lk2, lk = ((k1::lk1) ++ k2::lk2)%list /\ length lk1 = length l1 /\ length lk2 = length l2.
Lemma list_app_inj (A: Type) (l1 l2 l3 l4: list A): length l1 = length l3 -> l1 ++ l2 = l3 ++ l4 -> l1 = l3 /\ l2 = l4.
Lemma list_case (A:Type) (l: list A): l = nil \/ l <> nil.
Lemma list_dec (A: Type) (P: A -> Prop) l: (forall x, P x \/ ~ P x) -> (forall x, In x l -> P x) \/ (exists x, In x l /\ ~ P x).