(** Zpocklington is equivalent to pocklington but only uses numbers in Z. *)

Theorem Zpocklington :
forall (n q m a : Z) (qlist : Zlist),
(n > 1)%Z ->
(0 <= q)%Z ->
(0 <= m)%Z ->
n = (q * m + 1)%Z ->
q = zproduct qlist ->
allZPrime qlist ->
ZMod (ZExp a (n - 1)) 1 n ->
ZallLinCombMod a n m n qlist -> (n <= q * q)%Z -> ZPrime n.