Notation "'has_ view" := (hasPP _ (fun _ => view))
(at level 4, right associativity, format "''has_' view").
Notation "'all_ view" := (allPP _ (fun _ => view))
(at level 4, right associativity, format "''all_' view").
Section EqIn.
Variables a1 a2 : pred T.

(* Specifications: *)
Lemma eq_in_filter s : {in s, a1 =1 a2} -> filter a1 s = filter a2 s.
Lemma eq_in_find s : {in s, a1 =1 a2} -> find a1 s = find a2 s.
Lemma eq_in_count s : {in s, a1 =1 a2} -> count a1 s = count a2 s.
Lemma eq_all_r s1 s2 : s1 =i s2 -> all^~ s1 =1 all^~ s2.
Lemma has_sym s1 s2 : has (mem s1) s2 = has (mem s2) s1.
Lemma all_pred1_constant x s : all (pred1 x) s -> constant s.
Lemma constant_nseq n x : constant (nseq n x).
Fixpoint uniq s := if s is x :: s' then (x \notin s') && uniq s' else true.