fact: Definition test_spock N a dec := if (2 ?< N) then let Nm1 := Pos.pred N in let F1 := mkProd dec in match (Nm1 / F1)%P with | (Npos R1, N0) => if (1 ?< a) then if (a ?< N) then if (N ?< F1 * F1) then let op := cmk_op (Peano.pred (nat_of_P (get_height 63 (plength N)))) in let wN := znz_of_Z op (Zpos N) in let wa := znz_of_Z op (Zpos a) in let w1 := znz_of_Z op 1 in let mod_op := make_mod_op op wN in let pow := mod_op.(power_mod) in let ttimes := mod_op.(mul_mod) in let pred:= mod_op.(pred_mod) in let gcd:= ZnZ.gcd in let A := pow_mod_pred _ mod_op (pow wa R1) dec in match all_pow_mod _ mod_op w1 A dec with | (p, aNm1) => match ZnZ.to_Z aNm1 with (Zpos xH) => match ZnZ.to_Z (gcd p wN) with (Zpos xH) => true | _ => false end | _ => false end end else false else false else false | _=> false end else false.
imports: List ZArith Zorder ZCAux LucasLehmer Pocklington ZArith Znumtheory Zpow_facts CyclicAxioms Cyclic63 Int63Compat Bignums(DoubleCyclic BigN) Pmod Mod_op W Lucas PocklingtonCertificat NEll Bits