Cyclicity of the units of ZMod n #
ZMod.isCyclic_units_iff : (ZMod n)ˣ is cyclic iff
one of the following mutually exclusive cases happens:
n = 0(thenZMod 0 ≃+* ℤand the group of units is cyclic of order 2);n = 1,2or4nis a powerp ^ eof an odd prime number, or twice such a power (with1 ≤ e).
The individual cases are proved by inferInstance and are
also directly provided by :
The case of prime numbers is also an instance:
ZMod.not_isCyclic_units_eight:(ZMod 8)ˣis not cyclicZMod.orderOf_one_add_mul_prime: the order of1 + a * pmodulop ^ (n + 1)isp ^ nwhenpdoes not dividea.ZMod.orderOf_five: the order of5modulo2 ^ (n + 3)is2 ^ (n + 1).ZMod.isCyclic_units_of_prime_pow: the case of odd prime powersZMod.isCyclic_units_two_pow_iff:(ZMod (2 ^ n))ˣis cyclic iffn ≤ 2.
The proofs mostly follow [Ireland and Rosen, A classical introduction to modern number theory, chapter 4] [IrelandRosen1990].