(**
   For all numbers q in natlist qlist: 1 is a linear combination
   of a^(m*qlist/qi) and n modulo n.
*)

Definition allLinCombMod (a : Z) (n m : nat) (qlist : natlist) :=
  alllist nat
    (fun q : nat =>
     LinCombMod 1 (Exp a (m * multDrop q qlist) - 1) (Z_of_nat n) n) qlist.

Lemma allLinCombMod_ok : forall (a : Z) (n m : nat) (qlist : natlist), allLinCombMod a n m qlist <-> (forall qi : nat, inlist nat qi qlist -> LinCombMod 1 (Exp a (m * multDrop qi qlist) - 1) (Z_of_nat n) n).