Notation perm_eql s1 s2 := (perm_eq s1 =1 perm_eq s2).Notation perm_eqr s1 s2 := (perm_eq^~ s1 =1 perm_eq^~ s2).

(* Specifications: *)
Lemma perm_eqlE s1 s2 : perm_eql s1 s2 -> perm_eq s1 s2.
Lemma perm_eqlP s1 s2 : reflect (perm_eql s1 s2) (perm_eq s1 s2).
Lemma perm_eqrP s1 s2 : reflect (perm_eqr s1 s2) (perm_eq s1 s2).
Lemma perm_catC s1 s2 : perm_eql (s1 ++ s2) (s2 ++ s1).
Lemma perm_cat2l s1 s2 s3 : perm_eq (s1 ++ s2) (s1 ++ s3) = perm_eq s2 s3.
Lemma perm_cons x s1 s2 : perm_eq (x :: s1) (x :: s2) = perm_eq s1 s2.
Lemma perm_cat2r s1 s2 s3 : perm_eq (s2 ++ s1) (s3 ++ s1) = perm_eq s2 s3.
Lemma perm_catAC s1 s2 s3 : perm_eql ((s1 ++ s2) ++ s3) ((s1 ++ s3) ++ s2).
Lemma perm_catCA s1 s2 s3 : perm_eql (s1 ++ s2 ++ s3) (s2 ++ s1 ++ s3).
Lemma perm_rcons x s : perm_eql (rcons s x) (x :: s).
Lemma perm_rot n s : perm_eql (rot n s) s.
Lemma perm_rotr n s : perm_eql (rotr n s) s.
Lemma perm_eq_rev s : perm_eq s (rev s).
Lemma perm_filter s1 s2 P : perm_eq s1 s2 -> perm_eq (filter P s1) (filter P s2).
Lemma perm_filterC a s : perm_eql (filter a s ++ filter (predC a) s) s.
Lemma perm_eq_mem s1 s2 : perm_eq s1 s2 -> s1 =i s2.
Lemma perm_eq_all s1 s2 P : perm_eq s1 s2 -> all P s1 = all P s2.
Lemma perm_eq_size s1 s2 : perm_eq s1 s2 -> size s1 = size s2.
Lemma perm_eq_small s1 s2 : size s2 <= 1 -> perm_eq s1 s2 -> s1 = s2.
Lemma uniq_leq_size s1 s2 : uniq s1 -> {subset s1 <= s2} -> size s1 <= size s2.
Lemma leq_size_uniq s1 s2 : uniq s1 -> {subset s1 <= s2} -> size s2 <= size s1 -> uniq s2.
Lemma leq_size_perm s1 s2 : uniq s1 -> {subset s1 <= s2} -> size s2 <= size s1 -> s1 =i s2 /\ size s1 = size s2.
Lemma perm_uniq s1 s2 : s1 =i s2 -> size s1 = size s2 -> uniq s1 = uniq s2.
Lemma perm_eq_uniq s1 s2 : perm_eq s1 s2 -> uniq s1 = uniq s2.
Lemma uniq_perm_eq s1 s2 : uniq s1 -> uniq s2 -> s1 =i s2 -> perm_eq s1 s2.
Lemma catCA_perm_ind P : (forall s1 s2 s3, P (s1 ++ s2 ++ s3) -> P (s2 ++ s1 ++ s3)) -> (forall s1 s2, perm_eq s1 s2 -> P s1 -> P s2).
Lemma catCA_perm_subst R F : (forall s1 s2 s3, F (s1 ++ s2 ++ s3) = F (s2 ++ s1 ++ s3) :> R) -> (forall s1 s2, perm_eq s1 s2 -> F s1 = F s2).
Lemma size_rotr s : size (rotr n0 s) = size s.
Lemma mem_rotr (s : seq T') : rotr n0 s =i s.
Lemma rotr_size_cat s1 s2 : rotr (size s2) (s1 ++ s2) = s2 ++ s1.
Lemma rotr1_rcons x s : rotr 1 (rcons s x) = x :: s.
Lemma has_rotr a s : has a (rotr n0 s) = has a s.
Lemma rotr_uniq (s : seq T') : uniq (rotr n0 s) = uniq s.
Lemma rotrK : cancel (@rotr T n0) (rot n0).
Lemma rotr_inj : injective (@rotr T n0).
Lemma rev_rotr s : rev (rotr n0 s) = rot n0 (rev s).
Lemma rev_rot s : rev (rot n0 s) = rotr n0 (rev s).
Lemma rot_addn m n s : m + n <= size s -> rot (m + n) s = rot m (rot n s).
Lemma rot_add_mod m n s : n <= size s -> m <= size s -> rot m (rot n s) = rot (if m + n <= size s then m + n else m + n - size s) 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 rotr_rotr m n s : rotr m (rotr n s) = rotr n (rotr m s).