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.

Lemma perm_to_subseq s1 s2 :
subseq s1 s2 -> {s3 | perm_eq s2 (s1 ++ s3)}.