End PermSeq.
Notation perm_eql s1 s2 := (perm_eq s1 =1 perm_eq s2).
Notation perm_eqr s1 s2 := (perm_eq^~ s1 =1 perm_eq^~ s2).
Arguments perm_eqP {T s1 s2}.
Arguments perm_eqlP {T s1 s2}.
Arguments perm_eqrP {T s1 s2}.
Prenex Implicits perm_eq.
Hint Resolve perm_eq_refl : core.
Section RotrLemmas.
Variables (n0 : nat) (T : Type) (T' : eqType).
Implicit Type s : seq T.

Lemma mask_rot m s : size m = size s ->
mask (rot n0 m) (rot n0 s) = rot (count id (take n0 m)) (mask m s).