Understanding modular operations

38 Views Asked by At

I am learning about modular congruence from several books and every one of them have their own notation. I want to disambiguate and disentangle all that stuff into a single coherent theory, so I have a bunch of questions a couple of which I want to ask here.

  • Question $1$

    In one of the books the modular addition and multiplication are defined as follows:

    Let $n$ be a positive integer and $a, b \in \mathbb Z_n.$ We define $$a \oplus b = (a + b) \operatorname{mod} n \\ a \otimes b = (ab) \operatorname{mod} n$$

    I tried justifying the definitions above like so:

    Given any integer $a$ and positive integer $n$, we define $x \operatorname{mod} n :=r$ where $x = nq + r, \ 0 \le r < n$ for some integers $q, r.$ Then $x \operatorname{mod} n \in \{0, 1, 2, \ldots, n - 1\}$. Similarly, $\exists q, r \in \mathbb Z$ s.t. $a + b = nq + r, \ 0 \le r < n$ where $a + b \operatorname{mod} = r \in \mathbb Z \cap [0, n) = \mathbb Z_n.$ Now suppose $a \equiv c \pmod n, b \equiv d \pmod n$. Then $a \oplus b = (a + b) \operatorname{mod} n = (c + d) \operatorname{mod} n = c \oplus d.$ We justify the definition of $a \otimes b$ similarly.

    Does the justification above work?

  • Question $2$

    One of the exercises in the book asks to show $\mathbb Z_n$ is closed under $\oplus, \otimes.$ Does my justification above show closure?