fact: Definition ell_test (N S: positive) (l: List.list (positive * positive)) (A B x y: Z) := let op := cmk_op (Peano.pred (nat_of_P (get_height 63 (plength N)))) in let mop := make_mod_op op (ZnZ.of_Z N) in if isM2 N then match (4 * N) ?= (ZEll.Zmullp l - 1) ^ 2 with Lt => match y ^ 2 mod N ?= (x ^ 3 + A * x + B) mod N with Eq => let ex := mkEx N S l A B x y in let a := ntriple (Z2z ex op x) (Z2z ex op y) (Z2z ex op 1) in let A := (Z2z ex op A) in let B := (Z2z ex op B) in let d4 := (Z2z ex op 4) in let d27 := (Z2z ex op 27) in let da := mop.(add_mod) in let dm := mop.(mul_mod) in let isc := (da (dm (dm (dm d4 A) A) A) (dm (dm d27 B) B)) in let (a1, sc1) := scal ex op mop isc a S in let (S1,R1) := ZEll.psplit l in let (a2, sc2) := scal ex op mop sc1 a1 S1 in let (a3, sc3) := scalL ex op mop sc2 a2 R1 in match a3 with nzero _ => if (Zeq_bool (Z.gcd (z2Z op sc3) N) 1) then true else false | _ => false end | _ => false end | _ => false end else false.
imports: ZArith Znumtheory Zpow_facts CyclicAxioms Cyclic63 Int63Compat Bignums(DoubleCyclic BigN) W Mod_op ZEll Bits Zmod