fact: Definition test_pock N a dec sqrt := if (2 ?< N) then let Nm1 := Pos.pred N in let F1 := mkProd dec in match Nm1 / F1 with | (Npos R1, N0) => if is_odd R1 then if is_even F1 then if (1 ?< a) then let (s,r') := (R1 / (xO F1))in match r' with | Npos r => let A := pow_mod_pred (pow_mod a R1 N) dec N in match all_pow_mod 1%N A dec N with | (Npos p, Npos aNm1) => if (aNm1 ?= 1) then if gcd p N ?= 1 then if check_s_r s r sqrt then (N ?< (times ((times ((xO F1)+r+1) F1) + r) F1) + 1) else false else false else false | _ => false end | _ => false end else false else false else false | _=> false end else false.
imports: List ZArith Zorder ZCAux LucasLehmer Pocklington ZCmisc Pmod