Orders of residues #
Let ℓ be a prime and a > 1 a natural number. The multiplicative order of a modulo ℓ ^ r
has unbounded ℓ-adic valuation as r grows: for every j, the power ℓ ^ j divides it for all
large r (ZMod.eventually_pow_dvd_orderOf_natCast).
When ℓ ∣ a the residue of a is not a unit and its order is 0 from r = 1 on. Otherwise the
order divides φ(ℓ ^ r) = ℓ ^ (r - 1) (ℓ - 1), so if ℓ ^ j did not divide it, it would divide
the number ℓ ^ (j - 1) (ℓ - 1), which does not depend on r; then ℓ ^ r would divide the
positive number a ^ (ℓ ^ (j - 1) (ℓ - 1)) - 1 for every r, which is absurd.
For the residue a = 𝔑𝔭 of a prime 𝔭 ∤ ℓ of a number field, this order is the residue degree
of 𝔭 in the cyclotomic extension of level ℓ ^ r, so the statement says that these residue
degrees become divisible by any given power of ℓ along the cyclotomic tower.
A residue whose order is φ(n) is a primitive root modulo n. A primitive root modulo n is
one modulo every divisor of n, and for an odd prime p a primitive root modulo p ² is one
modulo every power of p.
The order of q modulo n decides which of the numbers q ^ k - 1 are divisible by n: those
with k a multiple of the order. Modulo a prime p, an element of even order 2 * m has m-th
power -1, so if a / b has order 2 * m then p divides a ^ k + b ^ k exactly for the odd
multiples k of m; for b = 1 this decides which q ^ k + 1 are divisible by p.
Main results #
ZMod.orderOf_natCast_dvd_orderOf_natCast: form ∣ n, the order ofamodulomdivides its order modulon.ZMod.eventually_pow_dvd_orderOf_natCast: for everyj,ℓ ^ jdivides the order ofamoduloℓ ^ rfor all larger.ZMod.isUnit_of_orderOf_eq_totient,ZMod.zpowers_eq_top_of_orderOf_eq_totient: a residue of orderφ(n)is a unit, and generates(ℤ/n)ˣ.ZMod.exists_orderOf_natCast_eq_totient: if(ℤ/n)ˣis cyclic, some natural number is a primitive root modulon.ZMod.orderOf_natCast_eq_totient_of_dvd: a primitive root modulonis a primitive root modulo every divisor ofn.ZMod.orderOf_natCast_prime_pow_eq_totient: for oddp, a primitive root modulop ²is a primitive root modulo everyp ^ e.ZMod.dvd_pow_sub_one_iff_orderOf_natCast_dvd: forq > 0,n ∣ q ^ k - 1iff the order ofqmodulondividesk.Nat.Prime.dvd_pow_add_pow_iff_of_orderOf_eq_two_mul: ifa / bhas order2 * m ≠ 0modulo a primep, thenp ∣ a ^ k + b ^ kiffm ∣ kand¬ 2 * m ∣ k.Nat.Prime.dvd_pow_add_one_iff_of_orderOf_natCast_eq_two_mul: ifqhas order2 * m ≠ 0modulo a primep, thenp ∣ q ^ k + 1iffm ∣ kand¬ 2 * m ∣ k.
References #
- K. Ireland and M. Rosen, A Classical Introduction to Modern Number Theory, Chapter 4, §1, Theorem 2.
Primitive roots #
Divisibility of q ^ k - 1 and q ^ k + 1 #
Suppose that a / b has order 2 * m modulo a prime p, with m ≠ 0. Then p divides
a ^ k + b ^ k exactly for the odd multiples k of m. The inverse is that of ZMod p, which is
the field inverse since p is prime; the hypothesis on the order forces p ∤ b.