Fact divides_power p a b : a <= b -> divides (power a p) (power b p).Fact inc_seq_split_lt n f k : 
         (forall i j, i < j < n -> f i < f j) 
      -> { p | p <= n /\ (forall i, i < p -> f i < k) /\ forall i, p <= i < n -> k <= f i }.Fact inc_seq_split_le n f h : (forall i j, i < j < n -> f i < f j) 
                   -> { q | q <= n 
                         /\ (forall i, i < q      -> f i <= h)
                         /\ (forall i, q <= i < n -> h < f i) }.Fact divides_lt p q : q < p -> divides p q -> q = 0.Fact smono_upto_injective n f :
       (forall i j, i < j < n -> f i < f j)
    -> (forall i j, i < n -> j < n -> f i = f j -> i = j).Fact all_ones_joins : w = msum nat_join 0 n (fun i => 1*power i r).Fact all_ones_2_joins : 2*w = msum nat_join 0 n (fun i => 2*power i r).Fact const_u_square : u * u = u1 + u2.Notation r := (power (4*q) 2).Fact is_cipher_of_0 f a : l = 0 -> is_cipher_of f a <-> 1 < q /\ a = 0.Fact is_cipher_of_inj f1 f2 a : is_cipher_of f1 a -> is_cipher_of f2 a -> forall i, i < l -> f1 i = f2 i.Fact is_cipher_of_fun f1 f2 a b : 
          (forall i, i < l -> f1 i = f2 i)
        -> is_cipher_of f1 a 
        -> is_cipher_of f2 b
        -> a = b.

(* Specifications: *)
Lemma is_cipher_of_equiv f1 f2 a b : is_cipher_of f1 a -> is_cipher_of f2 b -> a = b <-> forall i, i < l -> f1 i = f2 i.
Lemma is_cipher_of_const_1 u : 0 < l -> is_cipher_of (fun _ => 1) u <-> l+1 < q /\ exists u1, seqs_of_ones u u1.