|
17 | 17 | could define things like the ``$n$-th prime,'' and pick a fairly |
18 | 18 | straightforward coding. But here we do not have primitive |
19 | 19 | recursion---in fact we want to show that we can do primitive recursion |
20 | | -using minimization---so we need to be more clever. |
| 20 | +using minimization---so we need to be more clever. |
21 | 21 |
|
22 | 22 | \begin{lem} |
23 | 23 | \ollabel{lem:beta} |
|
42 | 42 | minimization---however, we're allowed to use addition, multiplication, |
43 | 43 | and~$\Char{=}$. There are various ways to prove this lemma, but one of |
44 | 44 | the cleanest is still G\"odel's original method, which used a |
45 | | -number-theoretic fact called Sunzi's Theorem (traditionally, the ``Chinese Remainder Theorem''). |
| 45 | +number-theoretic fact called Sunzi's Theorem |
| 46 | +(traditionally, the ``Chinese Remainder Theorem''). |
46 | 47 |
|
47 | 48 | \begin{defn} |
48 | 49 | Two natural numbers $a$ and $b$ are \emph{relatively prime} iff their |
|
51 | 52 | \end{defn} |
52 | 53 |
|
53 | 54 | \begin{defn} |
54 | | -Natural numbers $a$ and $b$ are \emph{congruent modulo~$c$}, $a \equiv b \mod c$, iff $c \mid (a-b)$, i.e., $a$ and $b$ have the |
| 55 | +Natural numbers $a$ and $b$ are \emph{congruent modulo~$c$}, |
| 56 | +$a \equiv b \mod c$, iff $c \mid (a-b)$, i.e., $a$ and $b$ have the |
55 | 57 | same remainder when divided by~$c$. |
56 | 58 | \end{defn} |
57 | 59 |
|
|
76 | 78 |
|
77 | 79 | A couple of observations will help us in this regard. Given |
78 | 80 | $y_0$, \dots,~$y_n$, let |
79 | | -\[ |
80 | | -j = \max(n, y_0, \dots, y_n) + 1, |
81 | | -\] |
| 81 | +\begin{align*} |
| 82 | +j &= \max(n, y_0 + 1, \dots, y_n + 1), \\ |
| 83 | +m &= \lcm(1,\dots,j), |
| 84 | +\end{align*} |
82 | 85 | and let |
83 | 86 | \begin{align*} |
84 | | -x_0 & = 1 + \fact{j} \\ |
85 | | -x_1 & = 1 + 2 \cdot \fact{j} \\ |
86 | | -x_2 & = 1 + 3 \cdot \fact{j} \\ |
| 87 | +x_0 & = 1 + m \\ |
| 88 | +x_1 & = 1 + 2 \cdot m \\ |
| 89 | +x_2 & = 1 + 3 \cdot m \\ |
87 | 90 | & \vdots \\ |
88 | | -x_n & = 1 + (n+1) \cdot \fact{j} |
| 91 | +x_n & = 1 + (n+1) \cdot m |
89 | 92 | \end{align*} |
90 | 93 | Then two things are true: |
91 | 94 | \begin{enumerate} |
92 | | -\item\ollabel{rel-prime} $x_0$, \dots,~$x_n$ are relatively prime. |
| 95 | +\item\ollabel{rel-prime} $x_0,\dots,x_n$ are relatively prime. |
93 | 96 | \item\ollabel{less} For each $i$, $y_i < x_i$. |
94 | 97 | \end{enumerate} |
95 | | -To see that \olref{rel-prime} is true, note that if $p$ is a prime number and $p |
96 | | -\mid x_i$ and $p \mid x_k$, then $p \mid 1 + (i+1) \fact{j}$ and $p \mid |
97 | | -1 + (k+1) \fact{j}$. But then $p$ divides their difference, |
| 98 | +To see that \olref{rel-prime} is true, note that if $p$ is a prime number |
| 99 | +and $p \mid x_i$ and $p \mid x_k$, then $p \mid 1 + (i+1) m$ and |
| 100 | +$p \mid 1 + (k+1) m$. But then $p$ divides their difference, |
98 | 101 | \[ |
99 | | -(1 + (i+1)\fact{j}) - (1+ (k+1)\fact{j}) = (i-k) \fact{j}. |
| 102 | +(1 + (i+1)m) - (1+ (k+1)m) = (i-k) m. |
100 | 103 | \] |
101 | | -Since $p$ divides $1 + (i+1)\fact{j}$, it can't divide $\fact{j}$ as well |
| 104 | +Since $p$ divides $1 + (i+1)m$, it can't divide $m$ as well |
102 | 105 | (otherwise, the first division would leave a remainder of~$1$). So $p$ |
103 | | -divides $i-k$, since $p$ divides $(i-k)\fact{j}$. But $\left| i-k |
104 | | -\right|$ is at most~$n$, and we have chosen $j > n$, so this implies |
105 | | -that $p \mid \fact{j}$, again a contradiction. So there is no prime |
106 | | -number dividing both $x_i$ and $x_k$. Clause~\olref{less} is easy: we have $y_i < |
107 | | -j < \fact{j} < x_i$. |
| 106 | +divides $i-k$, since $p$ divides $(i-k)m$. But $\left|i-k\right|$ is at |
| 107 | +most~$n$, and we have chosen $j \geq n$, so this implies that |
| 108 | +$p \mid m$, again a contradiction. So there is no prime number dividing |
| 109 | +both $x_i$ and $x_k$. Clause~\olref{less} is easy: |
| 110 | +we have $y_i < j \leq m < x_i$. |
108 | 111 |
|
109 | 112 | Now let us prove the $\beta$ function lemma. Remember that we can use |
110 | 113 | $0$, successor, plus, times, $\Char{=}$, projections, and any function |
|
144 | 147 | \beta^*(d_0,d_1,i) & = \fn{rem}(1+(i+1) d_1,d_0) \text{ and}\\ |
145 | 148 | \beta(d,i) & = \beta^*(K(d),L(d),i). |
146 | 149 | \end{align*} |
147 | | -This is the function we want. Given $a_0$, \dots,~$a_n$ as above, let |
| 150 | +This is the function we want. Given $a_0,\dots,a_n$ as above, let |
148 | 151 | \[ |
149 | | -j = \max(n,a_0,\dots,a_n)+1, |
| 152 | +j = \max(n,a_0+1,\dots,a_n+1), |
150 | 153 | \] |
151 | | -and let $d_1 = \fact{j}$. By \olref{rel-prime} above, we know that |
152 | | -$1+d_1$, $1+2 d_1$, \dots, $1+(n+1) d_1$ are relatively prime, and |
153 | | -by~\olref{less} that all are greater than $a_0$, \dots,~$a_n$. By |
154 | | -Sunzi's Theorem there is a value~$d_0$ such that for each~$i$, |
| 154 | +and let $d_1 = \lcm(1,\dots,j)$. By \olref{rel-prime} above, |
| 155 | +we know that $1+d_1$, $1+2 d_1$, \dots, $1+(n+1) d_1$ are relatively |
| 156 | +prime, and by~\olref{less} that all are greater than $a_0,\dots,a_n$. |
| 157 | +By Sunzi's Theorem there is a value~$d_0$ such that for each~$i$, |
155 | 158 | \[ |
156 | 159 | d_0 \equiv a_i \mod (1+(i+1)d_1) |
157 | 160 | \] |
|
0 commit comments