A proof for modular arithmetic theorem

Click For Summary

Homework Help Overview

The discussion revolves around proving a theorem in modular arithmetic, specifically the equivalence relation defined by a ≡ b (mod m) for integers a and b, and a positive integer m. Participants are exploring the implications of this definition and the conditions under which it holds true.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • Participants are attempting to construct a proof for the theorem, discussing the implications of the definition of modular equivalence and the properties of integers involved. Questions are raised about the structure of the proof, particularly regarding the distinction between equivalence and equality, and the necessity of precision in mathematical arguments.

Discussion Status

The discussion has seen various attempts at constructing a proof, with some participants providing feedback on the clarity and correctness of the arguments presented. There is a recognition of the complexity of the proof, and some participants have made progress in refining their arguments based on peer feedback.

Contextual Notes

Participants are encouraged to clarify definitions and assumptions, such as the range of values for the modulus and the integers involved. There is also mention of the need for a structured approach to proving "if and only if" statements in mathematics.

r0bHadz
Messages
194
Reaction score
17

Homework Statement


Let a and b be integers, and let m be a positive integer. Then a ≡ b (mod m) if and only
if a mod m = b mod m.

Homework Equations

The Attempt at a Solution


By definition a ≡ b (mod m) => m| (a-b)

mx = a -b => mx + b = a => b = a mod m

b = a - mx => b = m(-x) + a => a = b mod m

a = (a mod m) mod m = a mod m => a=b => a mod m = b mod m

does this seem right?
 
  • Like
Likes   Reactions: YoungPhysicist
Physics news on Phys.org
r0bHadz said:

Homework Statement


Let a and b be integers, and let m be a positive integer. Then a ≡ b (mod m) if and only
if a mod m = b mod m.

Homework Equations

The Attempt at a Solution


By definition a ≡ b (mod m) => m| (a-b)

mx = a -b => mx + b = a => b = a mod m

b = a - mx => b = m(-x) + a => a = b mod m

a = (a mod m) mod m = a mod m => a=b => a mod m = b mod m

does this seem right?

I'm sorry to say this is not a valid proof. First, note the difference between ##\equiv## and ##=## in this context. Note also that ##a \ mod \ m## is a non-negative integer in the range ##0## to ##m-1##.

In your proof, you have:

r0bHadz said:
b = a mod m

But, ##b## could be any integer and we could have ##b > m##, hence equality with ##a \ mod \ m## is impossible. Also, ##b## could be negative etc.

Also, a proof of an "if and only if" needs to be structured something like:

Let ##a \equiv b \ mod \ m \ \dots##.

Finally, you must be precise. You introduced ##x## without saying what ##x## was. Is it a real number, an integer, a positive integer?

In general, pure mathematics isn't about putting a few calculations together, it's about a precise, logical flow. This is something you need to try to develop.
 
r0bHadz said:

Homework Statement


Let a and b be integers, and let m be a positive integer. Then a ≡ b (mod m) if and only
if a mod m = b mod m.

I suggest you do the following implication first. Show that:

if a mod m = b mod m then a ≡ b (mod m)

Post that and then once you have done this, you can try the converse.
 
Pero what you wrote made a lot of sense, I've started the proof over again and this is what I got.

Let a ≡ b(mod m ) => m| (a-b) => a-b = mx for x ∈ ℤ

=> a = mx + b

*** if m|a and m|b => a = mp and b = mo for p,o∈ℤ then m| a-b so from m|(a-b) we know m|b

so b = mo + r
a = mx + b can be written as a = mx + (mo + r) => a = m(x+o) + r so

r = a mod m

Now I need to show that r = b mod m correct? Also is my proof starting to look at least a little better
 
r0bHadz said:
Pero what you wrote made a lot of sense, I've started the proof over again and this is what I got.

Let a ≡ b(mod m ) => m| (a-b) => a-b = mx for x ∈ ℤ

=> a = mx + b

*** if m|a and m|b => a = mp and b = mo for p,o∈ℤ then m| a-b so from m|(a-b) we know m|b

so b = mo + r
a = mx + b can be written as a = mx + (mo + r) => a = m(x+o) + r so

r = a mod m

Now I need to show that r = b mod m correct? Also is my proof starting to look at least a little better

Yes, this is looking better. You don't need to do the case where ##a, b \equiv 0 \ mod \ m## separately. But, you do need to specify that ##0 \le r < m##. And that, by definition, means that ##r = b \ mod \ m##.

If you tidy that up, you have the first implication. The converse should be simpler.

Note that this proof is a little bit more difficult than expected.
 
a≡b(mod m) => m | a-b => mx = a-b for x ∈ℤ

b = my + r and 0≤r<m by definition, so b mod m = r by definition

mx = a- (my + r) => mx + my + r = a => m(x+y) + r = a so by definition a mod m = r as wellConverse:

a mod m = b mod m => a = mx + r and b = my + r 0≤r<m

=> a-b = mx + r - my - r => a-b = m(x-y)

=> m | a-b which is equivalent to a ≡ b(mod m)
 
This proof was difficult but I think I'm done proving it now. I'm reading Rosens discrete math book rn. Do you recommend giving a proof for every theorem even if I'm not asked to do so?
 
r0bHadz said:
This proof was difficult but I think I'm done proving it now. I'm reading Rosens discrete math book rn. Do you recommend giving a proof for every theorem even if I'm not asked to do so?

Yes, the proof looks correct.

I don't know Rosen's book, so I'm not sure. Generally, you should do at most what the book asks. Anything extra might be useful, but it also takes more time.
 
  • Like
Likes   Reactions: r0bHadz

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
Replies
1
Views
1K
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 40 ·
2
Replies
40
Views
5K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K