Notice, when (a,m)=1, this conclusion is precisely Euler's theorem, hence, this conclusion can be regarded as a generalization of Euler's theorem.
If one of a,m equals 1, the proposition is obvious, so we assume a,m are both greater than 1.
Let m=m1⋅m2, where the prime factors of m1 are all prime factors of a, and (a,m2)=1. Consequently, (m1,m2)=1. To prove (2) holds, we only need to prove respectively:
am≡am−q(m)(modm2)am≡am−q(m)(modm1)
Since (3) ⇔aφ(m)≡1(modm2) (because (a,m2)=1), and φ(m)=φ(m1, m2)=φ(m1)φ(m2) (the proof of this conclusion is given in the exercises). Using Euler's theorem, we know aq(m2)≡1(modm2), hence (aqϕm2))q(m1)≡1(modm2), i.e.,
aϕ(m)≡1(modm2),
so, (3) holds.
For (4), we only need to prove: m1∣am−α(m). For this, we only need to prove: for any prime factor p of m1, we have
vp(m1)⩽vp(a)(m−φ(m))
In fact, by the definition of m1, we know vp(m1)=vp(m)⩾1,vp(a)⩾1, thus, we have
vp(m1)=vp(m)⩽2vp(m)−1⩽pρvρ(m)−1⩽(p−1)pvρ(m)−1⩽(p−1)pvρ(m)−1φ(pvρ(m)m)=pvρ(m)φ(pvρ(m)m)−pvρ(m)−1φ(pvρ(m)m)⩽pvρ(m)φ(pρvρ(m)m)−φ(pvρ(m))φ(pvρ(m)m)=pvρ(m)φ(pρvρ(m)m)−φ(m)⩽pvρ(m)pρvρ(m)m−φ(m)=m−φφ(m)⩽vp(a)(m−φ(m))
So, (5) holds, and consequently, (4) holds.
In summary, the proposition holds.