Example/Warning. Modular exponentiation [01FA]

Let n:\mathbb {N} be natural number and let k:\mathbb {Z}_m be an integer modulo m. Then the modular exponentiation of k by n is defined to be the normal form {\mathopen {}\left [k^n\right ]\mathclose {}}_m of k^n modulo m.

Warning: modular exponentiation respects congruence in the base, but not the exponent: in other words, even if n\equiv n'\mod m, it need not be the case that k^n \equiv k^{n'} \mod m.