85. Uniqueness theorems

In a particular system such as the positive integers, any uniqueness theorem gives a rule of inference. Such a rule only applies to the data type for which the uniqueness theorem is stated.

85.1.1 Example Theorem 60.2 says that the quotient and remainder are uniquely determined by Definition 60.1. This provides a rule of inference for nonnegative integers:

$$m = qn + r,\ 0 \leq r < n \vdash (q = m \operatorname{div} n) \wedge (r = m \operatorname{mod} n) \tag{85.1}$$

85.1.2 Remark The conclusion of this rule of inference can be worded this way: $q$ is the quotient and $r$ is the remainder when $m$ is divided by $n$. For example, because $m= 50 , n= 12 , q= 4$ and $r= 2$ satisfy Rule (85.1), $4 = 50 \operatorname{div} 12$ and $2 = 50 \operatorname{mod} 12$. You do not have to do a long division to verify that; it follows from Rule (85.1).

85.1.3 Exercise Prove that if $0 \leq m - qn < n$, then $q = m \operatorname{div} n$. (Answer on page 247.)

85.1.4 Exercise Use Rule (85.1) to prove that if $r = m \operatorname{mod} n$ and $r' = m' \operatorname{mod} n$, then $(m + m') \operatorname{mod} n$ is either $r + r'$ or $r + r' - n$.

85.1.5 Exercise Use Rule (85.1) to prove that if $r = m \operatorname{mod} n$, then $n \mid m - r$.

85.1.6 A rule for GCD’s For positive integers $m$ and $n$, the greatest common divisor $\mathrm{GCD}(m,n)$ is the largest integer dividing both $m$ and $n$; this definition was also given in Chapter 60. This obviously determines the GCD uniquely — there cannot be two largest integers which divide both $m$ and $n$. This can be translated into a rule of inference:

$$(\forall e)\Bigl((d \mid m) \wedge (d \mid n) \wedge \bigl((e \mid m \wedge e \mid n) \Rightarrow e \leq d\bigr)\Bigr) \vdash d = \mathrm{GCD}(m,n) \tag{85.2}$$

85.1.7 Example Let’s use the rule just given to prove Theorem 64.1. We must prove that the number $d$ which is the product of all the numbers $p^{\min(\mathrm{e}_{p}(m),\mathrm{e}_{p}(n))}$ for all primes $p$ which divide $m$ or $n$ or both is $\mathrm{GCD}(m,n)$.

First, $d \mid m$ and $d \mid n$, since the exponent of any prime $p$ in $d$, which is

$$\min(\mathrm{e}_{p}(m),\mathrm{e}_{p}(n))$$

is obviously less than or equal to $\mathrm{e}_{p}(m)$ and to $\mathrm{e}_{p}(n)$, so Theorem 62.4 applies. Thus we have verified two of the three hypotheses of Rule (85.2). As for the third, suppose $e \mid m$ and $e \mid n$. Then $\mathrm{e}_{p}(e) \leq \mathrm{e}_{p}(m)$ and $\mathrm{e}_{p}(e) \leq \mathrm{e}_{p}(n)$, so $\mathrm{e}_{p}(e) \leq \min(\mathrm{e}_{p}(m),\mathrm{e}_{p}(n))$, so $e \mid d$. But if $e \mid d$, then $e \leq d$, so the third part of Rule (85.2) is correct. Hence the conclusion that $d = \mathrm{GCD}(m,n)$ must be true.

85.1.8 Exercise State and prove a rule like Rule (85.2) for $\mathrm{LCM}(m,n)$.

Pages 124–125 of the book (PDF).