Notation "[ 'seq' E | i <- s ]" := (map (fun i => E) s)
(at level 0, E at level 99, i ident,
format "[ '[hv' 'seq'  E '/ '  |  i  <-  s ] ']'") : seq_scope.
Notation "[ 'seq' E | i <- s & C ]" := [seq E | i <- [seq i <- s | C]]
(at level 0, E at level 99, i ident,
format "[ '[hv' 'seq'  E '/ '  |  i  <-  s '/ '  &  C ] ']'") : seq_scope.
Notation "[ 'seq' E | i : T <- s ]" := (map (fun i : T => E) s)
(at level 0, E at level 99, i ident, only parsing) : seq_scope.
Notation "[ 'seq' E | i : T <- s & C ]" :=
[seq E | i : T <- [seq i : T <- s | C]]
(at level 0, E at level 99, i ident, only parsing) : seq_scope.

(* Specifications: *)
Lemma filter_mask T a (s : seq T) : filter a s = mask (map a s) s.
Lemma subseq_uniqP s1 s2 :
uniq s2 -> reflect (s1 = filter (mem s1) s2) (subseq s1 s2).
Lemma perm_to_subseq s1 s2 :
subseq s1 s2 -> {s3 | perm_eq s2 (s1 ++ s3)}.