0

I'm trying to prove that if $N_1\mod(a) = n_1$ and $N_2\mod(a) = n_2$ then $(N_1+N_2)\mod(a) = (n_1+n_2)\mod(a)$

By our assumption $N_1 = am_1 + n_1$ and $N_2 = am_2 + n_2$

So $N_1+N_2 = a(m_1+m_2) + n_1 + n_2$

So $(N_1+N_2)\mod(a) = (a(m_1+m_2) + n_1 + n_2)\mod(a)$

Now my justification was long and considered the case where $n_1+n_2 < a$ and $= a$ and $>$ then a however the solutions I am using to check simply said both $n_1$ and $n_2$ are between $0$ and $a-1$ and so the expression is true. It feels like their reasoning is missing a few steps because I'm not sure how they can go from $n_1$ and $n_2$ between $0$ and $a-1$ to the identity is true. Am I missing something?

Dr. Mathva
  • 8,621
EBL
  • 11
  • Please format your questions using MathJax. This page should give you a start at learning how to typeset mathematics here so that your posts say what you want them to, and also look good. – Brian61354270 Mar 04 '19 at 18:48
  • When you say $N\pmod a = n$ does that require that $0\le n < a$. i.e. that $n$ is the remainder? Most text don't require that. For most text $N \equiv n\pmod a$ just means $N$ and $n$ have the same remainder. It doesn't require one of them is the remainder. e.g. $6\equiv 10 \pmod 4$ because $6$ and $10$ both have the same remainder. – fleablood Mar 04 '19 at 18:56
  • It is in the context of remainders so it requires 0 <= n < a – EBL Mar 04 '19 at 18:59
  • If $N\pmod a = n$ DOES require than $0 \le n < a$ then yes you have to consider if $n_1 + n_2 \ge a$. But in that case $n_1 + n_2 = a + m_3$ for some $0\le m < a$ so $N_1 +N_2 = a(m_1+m_2 +1) + m_3$ and you are done. But I'd say none of that matters. $N_1 + N_2 = a(m_1 + m_2) + (n_1 + n_2)$ is enough. For most texts $0 \le n_1 + n_2 < a$ is not a requirement. – fleablood Mar 04 '19 at 19:00
  • "It is in the context of remainders so it requires 0<=n < a" In that case you are correct. You have to consider that maybe $a\le n_1 + n_2 < 2a$ but that's really very easy. – fleablood Mar 04 '19 at 19:02
  • Ok thanks. This is my first time dealing with modular arithmetic so it was introduced in the context of remainders and the justification you gave is what I did also but was confused by how the solutions sheet jumped a few steps – EBL Mar 04 '19 at 19:03
  • It's a pet peeve of mine but in most test $a \pmod n$ is not an operator that gives you a specific number. It is a statement about a characteristic $a$ might share with other numbers on the basis of what remainder it has. When we say $a\pmod n \equiv b \pmod n$ we don't actually want to find the remainder. We want to say $a$ and $b$ are equivalent and have the same properties in that they have the same remainder. – fleablood Mar 04 '19 at 19:08
  • So what would the proof look like if not requiring 0 <= n < a and instead thinking about it not as an operation but as a congruence like you say most texts use? – EBL Mar 04 '19 at 19:13
  • @EBL See the Congruence Sum Rule linked in my answer in the dupe. – Bill Dubuque Mar 04 '19 at 19:28

0 Answers0