7.5: Functions need to be Well-Defined
( \newcommand{\kernel}{\mathrm{null}\,}\)
The discussion of modular arithmetic ignored a very important point: the operations of addition, subtraction, and multiplication need to be well-defined. That is, if ¯a1=¯a2 and ¯b1=¯b2, then we need to know that
- ¯a1+n¯b1=¯a2+n¯b2,
- ¯a1−n¯b1=¯a2−n¯b2, and
- ¯a1×n¯b1=¯a2×n¯b2.
Fortunately, these statements are all true. Indeed, they follow easily from Exercise 5.1.19:
- Since ¯a1=¯a2 and ¯b1=¯b2, we have a1≡a2(modn) and b1≡b2(modn), so Exercise 5.1.19(1) tells us that a1+b1≡a2+b2(modn). Therefore ¯a1+b1=¯a2+b2, as desired.
The proofs for −n and ×n are similar.
One might try to define an exponentiation operation by: ˉa∧nˉb=¯ab for ˉa,ˉb∈Zn.
Unfortunately, this does not work, because ∧n is not well-defined:
Find a1,a2,b1,b2∈Z, such that [a1]3=[a2]3 and [b1]3=[b2]3, but [ab11]3≠[ab22]3.
Assume m,n∈N+.
- Show that if n>2, then absolute value does not provide a well-defined function from Zn to Zn. That is, show there exist a,b∈Z, such that [a]n=[b]n, but [|a|]n≠[|b|]n.
- Show that if m∣n, then there is a well-defined function f:Zn→Zm, given by f([a]n)=[a]m.
- Show that if we try to define a function g:Z3→Z2 by \(g\left([a]_{3}\right)=[a]_{2}), then the result is not well-defined.