(** Pocklington's theorem (finally). Proves Pocklington for natural numbers. *)

Theorem pocklington :
forall (n q m : nat) (a : Z) (qlist : natlist),
n > 1 ->
n = S (q * m) ->
q = product qlist ->
allPrime qlist ->
Mod (Exp a (pred n)) 1 n ->
allLinCombMod a n m qlist -> n <= q * q -> Prime n.