(* Removing duplicates *)

(* Specifications: *)
Lemma size_undup s : size (undup s) <= size s.
Lemma undup_uniq s : uniq (undup s).
Lemma undup_id s : uniq s -> undup s = s.
Lemma filter_undup p s : filter p (undup s) = undup (filter p s).
Lemma undup_nil s : undup s = [::] -> s = [::].
Lemma index_head x s : index x (x :: s) = 0.
Lemma nth_uniq s i j :
i < size s -> j < size s -> uniq s -> (nth s i == nth s j) = (i == j).
Lemma uniqPn s :
reflect (exists i j, [/\ i < j, j < size s & nth s i = nth s j]) (~~ uniq s).
Lemma uniqP s : reflect {in [pred i | i < size s] &, injective (nth s)} (uniq s).
Lemma mem_rot s : rot n0 s =i s.
End EqSeq.