0

In my course notes (provided by my class), I am reading a proof of the simplest case of the Chinese Remainder Theorem: that for $m,n$ with $\gcd(m,n) = 1$ that there is exactly one $x \pmod {mn}$ that satisfies the equations: $x \equiv a \pmod n$ and $x \equiv b \pmod m$. It starts by defining the following: let "let $u \equiv m (m^{-1}\pmod n)$". It then states that $u \equiv 1 \pmod m$ and $u \equiv 0 \pmod n$. I have 2 questions as to notation here:

  1. Why is $\pmod n$ not far to the left in the definition of $u$, but is rather inside the parentheses of $m^{-1}$? Is it valid to show congruences like this? Was this meant to be an equals sign, not a congruence, as indicated by what they concluded about $u$?
  2. How can we give a solution $x \pmod {mn}$in a different modulus, $mn$, than the equations which it is supposed to solve, which are modulus $n$ and $m$ respectively?
Princess Mia
  • 2,403
  • Shouldn't you have known what you meant when you wrote that down? Is there more context? – Trebor Aug 24 '23 at 08:53
  • @trebor I will edit to provide more context – Princess Mia Aug 24 '23 at 08:56
  • Not very clear... With $m^{-1}$ do you mean $\frac 1 m$. If so, what is your goal? to compute the "mod n" of $\frac 1 m$ or to compute the inverse of $(m \mod n)$? – Mauro ALLEGRANZA Aug 24 '23 at 09:06
  • @MauroALLEGRANZA I am not sure what the notes exactly meant, but it was some multiplicative inverse of something modular most likely – Princess Mia Aug 24 '23 at 09:13
  • Agreed... Maybe we need more context to discriminate between: 1) $((m m^{-1}) \mod n)$ that is simply $(1 \mod n)$, or 2) $m (m^{-1} \mod n)$ (assuming it makes sense). – Mauro ALLEGRANZA Aug 24 '23 at 09:55
  • Do your notes define or or use congruence classes, i.e. do they define $, a\pmod{!n},$ as the set of all integers $\equiv a\pmod{!n}?\ $ This is normally notated as $,[a]_n$ or $,a+n\Bbb Z.,$ If instead $,a\pmod{!m},$ denotes not a class but the remainder $,a\bmod n,$ then this incorrect notation, and it is the source of confusion behind many of your recent questions. – Bill Dubuque Aug 24 '23 at 17:30

2 Answers2

1

First, for context, let's briefly review a key idea behind a CRT formula. Since $\,m,n\,$ are coprime,

by Easy CRT: $\,\ \begin{align}&u\equiv 0\!\!\pmod{\!m}\\ &u\equiv 1\!\!\pmod{\!n}\end{align}\iff\ u\equiv m(\color{#c00}{m^{-1}\bmod n})\ \pmod{\!mn}$

We could write this as $\,u\equiv (0,1)\,$ in $\Bbb Z_m\times \Bbb Z_n\,$ in vector notation (or product rings if known)
Similarly we construct $\,v\equiv (1,0)\,$ in $\Bbb Z_m\times \Bbb Z_n.$

So $\,x =av+bu \equiv (a,b)$ is the solution of $\,\begin{align}&x\equiv a\!\!\pmod{\!m}\\ &x\equiv b\!\!\pmod{\!n}\end{align}$

i.e. the "basis" vectors $\,u \equiv (0,1),\, v\equiv (1,0)\,$ span $\,\Bbb Z_m\times \Bbb Z_n\,$ so we can construct any solution from them. As explained here this linearity is the key idea behind this common CRT formula.

Question $(1)\!:\: $ $m(\color{#e40}{m^{-1}\!\pmod{\!n}})\,$ is incorrect notation. It should be $\,m(\color{#c00}{m^{-1}\bmod m})\,$ as above.

Question $(2)\!:\: $ moot with above fix, since we now have a mod operation, not another modulus.

Remark $ $ More precisely: $\,u\bmod mn = m(m^{-1}\bmod n),\,$ i.e. it is already reduced $\!\bmod mn$ since $\,m' = m^{-1}\bmod n < n\,$ so $\,mm' < mn$.

The point is that we need to compute an inverse of $\,m$ modulo $n,\, $ i.e. as an operation in $\Bbb Z_n,\,$ but there is no common notation for that other than $\,m^{-1}\bmod n.\,$ We could use modulus subscripts on the operations to denote operations in $\,\Bbb Z_n,\,$ e.g. $\,a+_n b\,$ but this notation looks confusing in exponents $\,m^{-1_{\large n}}.\,$ Using notation $\,m^{-1}\!\pmod{\! n}\,$ is bad because it promotes confusion between mod as a congruence relation vs. operation - one of the most common sources of confusion for those first learning modular arithmetic. This may be the intended denotation if your notes define $\,a\pmod{\! n}\,$ as the congruence class of all integers $\equiv a \pmod{\!n},\,$ commonly denoted by $\,[a]_n\,$ or $\,a+n\Bbb Z,\,$ and they define arithmetic of these congruence classes. Otherwise the notation is undefined so it is meaningless.

One way to correctly write what your notes intend is as follows:

$${\rm if}\ \ \ \color{#c00}k\equiv m^{-1}\!\!\!\!\pmod{\! n}\ \ \ {\rm then}\ \ \ \begin{align}&u\equiv 0\!\!\pmod{\!m}\\ &u\equiv 1\!\!\pmod{\!n}\end{align}\!\iff\ u\equiv m\:\!\color{#c00}k\!\! \pmod{\!mn}\qquad\qquad$$

We can't substitute $\,m^{−1}\pmod{n}\,$ for $\,\color{#c00}k\,$ on the RHS because that part of the LHS ternary congruence relation is not defined by itself. If instead we replace the LHS by $\,\color{#c00}k=(m^{−1}\bmod n)$ then we can substitute into RHS, yielding what I wrote above.

Bill Dubuque
  • 272,048
  • to clarify, $x \pmod {mn} $ uses the mod as a function which returns a value of the remainder, rather than what it is used off on the side in congruence relations to signify working in the system of mod $mn$? – Princess Mia Aug 24 '23 at 18:00
  • @Shmuel I expanded the Remark to address that. – Bill Dubuque Aug 24 '23 at 18:04
0
  1. If $k$ is any integer which serves as an inverse to $m$ modulo $n$, i.e. $k$ has the property that $km\equiv1$ modulo $n$, then they want us to define the integer $u=km$. It is precisely because $m$ and $n$ are coprime that such an integer $k$ exists. By writing $(m^{-1}\bmod n)$ they have signalled, unclearly, that they want an inverse to $m$ modulo $n$.

1.5: It should be $u\equiv0\bmod\color{red}{m}$ and $u\equiv1\bmod\color{red}{n}$, you wrote this the other way around.

  1. What it means to give a solution $x\bmod(mn)$ could be formalised with some group theoretic presentation of the problem... but more simply, what they mean is:

All solutions $x\in\Bbb Z$ with $x\equiv a\bmod n$ and $x\equiv b\bmod m$ are congruent modulo $mn$. The solution is unique modulo $mn$. If $x_1$ and $x_2$ are two solutions, then $x_1\equiv x_2\bmod mn$.

FShrike
  • 40,125