Sie sind auf Seite 1von 4

What does "Well Defined" Mean?

Sooner or later you will have to prove that something is "well defined". So what does
this mean? Let's look at an example.

Example: Congruence Arithmetic


For integers a and b and a positive integer m, we say that a is congruent to b modulo
m, written a = b mod(m), if a - b is evenly divisble by m. Another way of saying this is
there is another integer k such that a = b + k m. For example, 1749 = 15 mod(17)
because 1749 = 15 + (102)(17). We like to think of a and b as representing the same
"number" modulo m. So there are m "numbers" in this system and they are 0, 1, 2,
..., m-1. For example, m = 0 mod(m) so we son't have to list 0.

It turns out that we can do arithmetic with these new "numbers". For example, we can
define addition modulo m by standard addition. But there is a potential problem. What
if a = b mod(m) and c = d mod(m), we should get the same result, modulo m, by
adding a + b or c + d.

Theorem. Addition is well defined modulo m, that is, if a = b mod(m) and c = d


mod(m), then (a+c) = (b+d) mod(m).

Strategy. What do we have to prove? (a+c) = (b+d) mod(m). What does this mean? It
means we must show there is an integer k such that a+c = (b+d) + k m. What are we
assuming? a = b mod(m) and c = d mod(m). This means there are integers k1 and
k2 such that a = b + k1 m and c = d + k2m. What do we do? We can add these last two
equations together to get: (a+c) = (b+d) + (k1+k2)m. So if we were to let k = k1 + k2,
we would have what we want. Now we se what to do. So we write the proof.

Proof. By our assumption, there are integers k1 and k2 such that a = b + k1 m and c = d
+ k2m. Adding these two equations together gives us (a+c) = (b+d) + (k 1+k2)m,
which, by definition, means (a+c) = (b+d) mod(m).

q
So "well defined" means that the definition being made has no internal
inconsistencies and is free of contradictions. To better understand this idea, let's
look at an example where a definition turns out not to be well defined.

Example: Not Well Defined


Using modular arithmetic, consider division. For integers it makes since to talk about
x/2 when x is even. Does this make since modulo 2? For example, let x = 2. In mod (2)
arithmetic, the "number" 2/2 should be the unique solution (y) to the equation 2y =
2 mod (2). But, as you can see, any integer y will satisfy this equation. That is, x/2 is
not well defined.
q
Example:Functions Modulo m
In the previous two examples, we looked at the "numbers" modulo m. In this system
there are only m "numbers", represented by 0, 1, ..., m-1. It is traditional to call this
set Zm. For example, Z4 has 4 elements, represented by 0, 1, 2, 3. Remember, all other
integers are just other names for these 4. For example, 13 = 1 mod(4) and - 13 = 3
mod(4).

Theorem. The function f:Z4 -> Z4, given by f(x) = 2x+1 is well defined.

Strategy. It is easy to see that f(0) = 1, f(1) = 3, f(2) = 5 = 1 mod(4) and f(3) = 7 = 3
mod(4). What do we need to prove? We need to prove that f(a) = f(b) mod (4). That
is, f(a) - f(b) is evenly divisble by 4, that is, (2a+1) - (2b+1) = 2(a - b) is evenly
divisble by 4. What is our assumption? We are assuming a = b mod(4). What does this
mean? It means that a - b is evenly divisble by 4. We can see immediately that our
assumption implies 2(a - b) is divisible by 4, which is what we wanted.

Proof. If a = b mod(m), then (a - b) is divisble by 4. Hence so is (2a + 1) - (2b + 1),


that is f(a) = f(b) mod (m).

Exercises
Prove each of the following.

1. Multiplication is well defined in arithmetic modulo m. That is, if a = b mod(m)


and c = d mod(m), then (a c) = (b d) mod(m).
2. The function f:Zm -> Zm given by f(x) = x2 + x is well defined.

Next==>The Pigeon Hole Principle

<==Back To Proofs by Exhaustion (Case by Case)

Back to Proofs

http://zimmer.csufresno.edu/~larryc/proofs/proofs.welldefined.html

Lecture 32: Operations on modular numbers

 Addition, multiplication, negation of modular numbers is well defined


 Division is sometimes defined
 Units are numbers that you can divide by
 φ(m)φ(m) is the number of units
 Exponentiation is not well defined (we'll fix this next lecture)
 Review exercises:
 Prove that addition, multiplication, negation, subtraction of elements
of ZmZm are all well-defined
 Prove that if an inverse exists, it is unique (so that the "inverse"
operation is a well-defined partial function)
 Prove that exponentiation of elements of ZmZm is not well-defined

Addition, multiplication, subtraction


Last lecture, we defined modular numbers as equivalence classes of integers. In this
lecture, we define basic operations on modular numbers. We will define the
operations using representatives; we need to check that the operations are well
defined.

Claim: Let +:Zm×Zm→Zm+:Zm×Zm→Zm be given by [a]+[b]::=[a+b][a]+[b]::=[a+b].


Then ++ is well-defined.

Proof: We need to check that


if [a]=[a′][a]=[a′] and [b]=[b′][b]=[b′] then [a+b]=[a′+b′][a+b]=[a′+b′].
Assume [a]=[a′][a]=[a′] and [b]=[b′][b]=[b′]. Then there exist cc and dd such
that cm=a−a′cm=a−a′ and dm=b−b′dm=b−b′.
Then a+b−(a′+b′)=(a−a′)+(b−b′)=cm+dm=(c+d)ma+b−(a′+b′)=(a−a′)+(b−b′)=cm+dm=(c+d)m.
Therefore m|(a+b)−(a′+b′)m|(a+b)−(a′+b′), so [a+b]=[a′+b′][a+b]=[a′+b′].

Claim: Let the multiplication operation ⋅:Zm×Zm→Zm⋅:Zm×Zm→Zm be given


by [a][b]::=[ab][a][b]::=[ab]. Then ⋅⋅ is well defined.

Proof: Assume [a]=[a′][a]=[a′] and [b]=[b′][b]=[b′]. Then as in the previous proof, there
exist cc and dd with cm=a−a′cm=a−a′ and dm=b−b′dm=b−b′. We want to show
that m|ab−a′b′m|ab−a′b′. We can substitute b′b′ and a′a′ in this equation using the
assumptions:

ab−a′b′=ab−(a−cm)(b−dm)=ab−ab+(ad+bc)m−dcm2=(⋯)msince cm=a−a′ and dm=b−b′algebr


aab−a′b′=ab−(a−cm)(b−dm)since cm=a−a′ and dm=b−b′=ab−ab+(ad+bc)m−dcm2=(⋯)malgebra

This shows that m|ab−a′b′m|ab−a′b′ so ⋅⋅ is well-defined.

Claim: The negation operation −:Zm→Zm−:Zm→Zm given by −[a]::=[−a]−[a]::=[−a] is


well-defined.

Proof: left as exercise.

Units and division


Definition: If xx and yy are numbers, we say that yy is an inverse of xx if xy=1xy=1.
If xx has an inverse, it is called a unit.

Note: This is a very general definition: it applies in any set that has a reasonable
definition of multiplication and 1. Sets having operations called ++ and ⋅⋅ that satisfy
certain conditions are called rings; one can talk about the units of any ring.
Examples: - The only units of ZZ are 11 and −1−1 - All non-zero elements
of QQ and RR are units - We will see in a later lecture that [a][a] is a unit of ZmZm if
and only if gcd(a,m)=1gcd(a,m)=1.

As another example, let's consider Z5Z5. The elements


of Z5Z5 are {[0],[1],[2],[3],[4]}{[0],[1],[2],[3],[4]}. [0][0] is never a unit: there is nothing
you can multiply 0 by to get 1. [1][1] and [−1][−1] are always units, and are always
their own inverses. In this case, [−1]=[4][−1]=[4]. [2][2] and [3][3] are also units,
because [2][3]=[6]=[1][2][3]=[6]=[1].

In this case, all non-zero elements of Z5Z5 were units, but this is not always the case.
For example, in Z6Z6, the only units are [1][1]and [−1]=[5][−1]=[5]. For
example, [2][2] is not a unit, because

 [2][0]=[0]≠[1][2][0]=[0]≠[1],
 [2][1]=[2]≠[1][2][1]=[2]≠[1],
 [2][2]=[4]≠[1][2][2]=[4]≠[1],
 [2][3]=[6]=[0]≠[1][2][3]=[6]=[0]≠[1],
 [2][4]=[8]=[2]≠[1][2][4]=[8]=[2]≠[1],
 [2][5]=[10]=[4]≠[1][2][5]=[10]=[4]≠[1].

Definition: φ(m)φ(m) is the number of units of ZmZm. It is called


the totient of mm (φφ is also sometimes called the "Euler phi-function").

The above examples show that φ(5)=4φ(5)=4 and φ(6)=2φ(6)=2.

Claim: If x∈Zmx∈Zm has an inverse, then it is unique.

Proof: Suppose xy=[1]xy=[1] and xy′=[1]xy′=[1]. We want to show y=y′y=y′. We have

y=[1]y=(xy′)y=(xy)y′=[1]y′=y′y=[1]y=(xy′)y=(xy)y′=[1]y′=y′

Since the inverse is unique, we can give it a symbol: x−1x−1 is the inverse of xx. We
define x−n::=(x−1)nx−n::=(x−1)n and note that xnx−n=[1]xnx−n=[1].

Exponentiation
We have seen that addition, multiplication, and subtraction of equivalence classes,
when defined in the obvious way, are well-defined. This is not true of exponentiation;
we show this and fix it in the next lecture.

http://www.cs.cornell.edu/courses/cs2800/2017sp/lectures/lec32-modular.html

Das könnte Ihnen auch gefallen