Fact exp_app n m i v w : @exp (n+m) i (vec_app v w) = exp i v * exp (n+i) w.
Local Notation divides_mult_inv := prime_div_mult.

(* Specifications: *)
Lemma not_prime_1 : ~ prime 1.
Lemma not_qs_1 n : ~ qs n = 1.
Hint Resolve not_prime_1 not_qs_1.
Lemma divides_pow p n k : prime p -> divides p (n ^ k) -> divides p n.
Opaque ps qs.
Lemma ps_exp n m (v : vec nat m) i : ~ divides (ps n) (exp i v).
Coercion tonat {n} := @pos2nat n.
Lemma vec_prod_div m (v : vec nat m) (u0 : nat) (p : pos m) i :
vec_pos v p = S u0 -> qs (p + i) * exp i (vec_change v p u0) = exp i v.
Lemma qs_exp_div i j n v : i < j -> ~ divides (qs i) (@exp n j v).
Proof with eauto.