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.

(* Specifications: *)
Lemma size_rotr s : size (rotr n0 s) = size s.
Lemma rotr_inj : injective (@rotr T n0).
Lemma rotS n s : n < size s -> rot n.+1 s = rot 1 (rot n s).
Lemma rot_rot m n s : rot m (rot n s) = rot n (rot m s).
Lemma rot_rotr m n s : rot m (rotr n s) = rotr n (rot m s).
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).
Lemma resize_mask m s : {m1 | size m1 = size s & mask m s = mask m1 s}.
End Mask.