The Rabin–Monier bound #
Modulo an odd composite n ≠ 9, at most a quarter of the units are strong liars for the
Miller–Rabin test (ZMod.IsStrongLiar). Rabin Rabin and Monier Monier
proved this independently. Crandall and Pomerance Crandall and Pomerance
state it as Theorem 3.5.4 for odd composite n > 9; this locator comes from secondary sources and
has not been checked against the book. The modulus 9 is a genuine exception: its strong liars are
±1, two of the φ(9) = 6 units.
The proof here is group-theoretic and avoids Monier's exact count. By
ZMod.exists_pow_eq_neg_one_forall_isStrongLiar, there is an m with 2 m ∣ n - 1 and a unit b
with b ^ m = -1 such that every strong liar lies in K = {a : a ^ m = ±1}. It remains to show
that K has index at least 4.
- If
n = p ^ ewithe ≥ 2, the units witha ^ (2 m) = 1containKand have order coprime top: an element of orderpwould givep ∣ 2 m ∣ n - 1. Sincep ^ (e - 1) ∣ φ(n), the index is at leastp ^ (e - 1), which is at least4unlessn = 9. - Otherwise
n = A BwithA, B > 1odd and coprime. The unitsJwitha ^ m ≡ ±1moduloAand moduloBseparately containK. The unit that isbmoduloAand1moduloBis inJbut not inK. The subgroupJis proper because one of the factors has a unit whosem-th power is not±1: the unit1 + A / pifp ^ 2 ∣ A; the unit that isbmodulo one factor and1modulo another ifBsplits further; and, forn = p qwith distinct primes, a generator moduloporq, sincep - 1 ∣ 2 mandq - 1 ∣ 2 mwould forcep = q.
Main results #
ZMod.four_mul_card_powEqOneOrNegOne_le: modulo an odd compositen ≠ 9, the subgrouppowEqOneOrNegOne n mof the strong-liar exponentmhas at most a quarter of the units.ZMod.four_mul_card_isStrongLiar_le: the Rabin–Monier bound: modulo an odd compositen ≠ 9, four times the number of strong liars is at mostφ(n).
References #
The index bound behind the Rabin–Monier theorem. Modulo an odd composite n ≠ 9, for
m with 2 m ∣ n - 1 and a unit b with b ^ m = -1 (as provided by
exists_pow_eq_neg_one_forall_isStrongLiar), the subgroup powEqOneOrNegOne n m of units whose
m-th power is ±1 has at most a quarter of the units.