Modulo Addition is Well-Defined/Real Modulus

Theorem

Let $z \in \R$ be a real number.


This article, or a section of it, needs explaining.
In particular: What if z is zero?
You can help $\mathsf{Pr} \infty \mathsf{fWiki}$ by explaining it.
To discuss this page in more detail, feel free to use the talk page.
When this work has been completed, you may remove this instance of {{Explain}} from the code.


Let:

$a \equiv b \pmod z$

and:

$x \equiv y \pmod z$

where $a, b, x, y \in \R$.


Then:

$a + x \equiv b + y \pmod z$


Proof

\(\ds a\) \(\equiv\) \(\ds b\) \(\ds \pmod z\)
\(\ds c\) \(\equiv\) \(\ds d\) \(\ds \pmod z\)
\(\ds \leadsto \ \ \) \(\ds a \bmod z\) \(=\) \(\ds b \bmod z\) Definition of Congruence
\(\ds x \bmod z\) \(=\) \(\ds y \bmod z\)
\(\ds \leadsto \ \ \) \(\ds \exists k_1 \in \Z: \, \) \(\ds a - b\) \(=\) \(\ds k_1 z\)
\(\ds \exists k_2 \in \Z: \, \) \(\ds x - y\) \(=\) \(\ds k_2 z\)
\(\ds \leadsto \ \ \) \(\ds \paren {a + x} - \paren {b + y}\) \(=\) \(\ds \paren {k_1 + k_2} z\) Definition of Integer Addition
\(\ds \leadsto \ \ \) \(\ds a + x\) \(\equiv\) \(\ds b + y\) \(\ds \pmod z\) Definition of Congruence

$\blacksquare$


Sources

  • 1997: Donald E. Knuth: The Art of Computer Programming: Volume 1: Fundamental Algorithms (3rd ed.) ... (previous) ... (next): $\S 1.2.4$: Integer Functions and Elementary Number Theory: Exercise $24$