2

This is one following question based on one question I asked before.

In mcs.pdf, it has Problem 7.25 in p251(#259).

One version of the the Ackermann function $A:\mathbb{N}^2 \to \mathbb{N}$ is defined recursively by the following rules: $$ \begin{align*} A(m, n)&::=2n &&\text{if } m = 0 \text{ or } n \le 1, &(\text{A-base})\\ A(m, n)&::=A(m-1,A(m,n-1)) &&\text{otherwise} &(AA) \end{align*} $$ Prove that if $B:\mathbb{N}^2 \to \mathbb{N}$ is a partial function that satisfies this same definition, then $B$ is total and $B=A$.

The reason to prove $B=A$ is due to the possibility of Collatz recurrence

Mathematicians have been wondering about this function specification, known as the Collatz conjecture for a while $$ f_4(n)::=\begin{cases} 1,&&\text{if }n\le 1,\\ f_4(n/2)&&\text{if }n> 1\text{ is even},\\ f_4(3n+1)&&\text{if }n> 1\text{ is odd}.\tag{7.5} \end{cases} $$ For example, $f_4(3)= 1$ because $$f_4(3)::= f_4(10)::=f_4(5)::=f_4(16)::=f_4(8)::=f_4(4)::=f_4(2)::=f_4(1)::=1$$ The constant function equal to 1 will satisfy (7.5), but it’s not known if another function does as well. The problem is that the third case specifies $f_4(n)$ in terms of $f_4$ at arguments larger than $n$, and so cannot be justified by induction on $\mathbb{N}$

The reference of problem in the chpater contents

$$ f_2(n)::=\begin{cases} 0,&&\text{if }n=0,\\ f_2(n+1)&&\text{otherwise}.\tag{7.3} \end{cases} $$ This “definition” has a base case, but still doesn’t uniquely determine $f_2$. Any function that is 0 at 0 and constant everywhere else would satisfy the specification, so (7.3) also does not uniquely define anything

...

The Ackermann function can be defined recursively as the function A given by the following rules: $$ \begin{align*} A(m, n)&=2n &&\text{if } m = 0 \text{ or } n \le 1, &(7.6)\\ A(m, n)&=A(m-1,A(m,n-1)) &&\text{otherwise.} &(7.7) \end{align*} $$

Now these rules are unusual because the definition of $A(m, n)$ involves an evaluation of A at arguments that may be a lot bigger than m and n. The definitions of $f_4$ above showed how definitions of function values at small argument values in terms of larger one can easily lead to nonterminating evaluations. The definition of the Ackermann function is actually ok, but proving this takes some ingenuity (see Problem 7.25).

So the key part is to ensure "definitions of function values at small argument values in terms of larger one" is well-defined.

As Julio Di Egidio says, the proof from wikipedia (see point 1) is only one sketch but maybe not rigorous. But I can't think of one more rigorous proof than that because IMHO for one arbitrary $A(m,n)$ we can only follow the recursion implied in the definition as wikipedia shows to get the final value of it.

Here is my edited proof (mainly rephrased from my comments following hints) based on wikipedia and comment hints which is different from the original one (I directly edited in the question as this comment recommends).

Instead of directly manipulating with one arbitrary $A(m,n),m>0,n>1$, we prove by induction without proving the lexicographic order on Products of finite Well-Ordered Sets is well-ordered. This can be always done due to equivalence between Well ordering principle (WOP) and induction.

  1. (A-base): $(m=0)\lor (n\le 1)$. $A(m,n)$ is well-defined by definition.
  2. (AA): Assume for $(m',n')<(m,n)$ (Here we needs to prove the lexicographic order is totally ordered), $A(m',n')$ is well-defined. Then $A(m,n)=A(m-1,A(m,n-1))$ is well-defined since $m-1\ge 0,n-1>0$ which ensures $A(m-1,A(m,n-1))$ can be defined. Then $A(m-1,k),k\in\mathbb{N}$ and $A(m,n-1)$ are well defined.

Then $A(m,n)$ is well-defined for $\mathbb{N}^2$, i.e. total and unique.

Compared with (7.3) and (7.5) where $<$ is defined in $\mathbb{N}$, the induction in Problem 7.25 doesn't depend on one greater object defined by $<$ in $\mathbb{N}^2$. So the behavior is well-defined.

Q:

As Izaak van Dongen says, the above proof is rigorous (Hope my rephrase doesn't misunderstand what Izaak van Dongen says). If so, I will mark this question solved and close it.

An5Drama
  • 436
  • A rigorous proof will not be easy since the Ackermann-function is not primitive recursive. – Peter May 04 '24 at 11:15
  • 2
    What Wikipedia sketches can be made rigorous. In general, if $(X, \le)$ is a well-order then you can define a function $f$ by specifying the value of $f(x)$ in terms of the values of $f(y)$ for $y < x$. This is sometimes called the recursion theorem (for well-orders), and this is the special case $X = \Bbb N^2$. The rough idea is: suppose $A(m, n)$ is not well-defined for all inputs. Let $m_0$ be the least number such that not all values of $A(m_0, n)$ are well-defined, and let $n_0$ be the least such $n$. Can you show this is absurd? – Izaak van Dongen May 04 '24 at 12:03
  • @IzaakvanDongen 1. I think you mean "lexicographic order" as wikipedia says. If that can be thought rigorous then It's fine now. Then I will mark this question solved. 2. More specifically, use the order as normally defined https://en.wikipedia.org/wiki/Lexicographic_order#Cartesian_products. If $A(m_0,n_0)$ is the minimal counterexample, then $A(m_0-1,n),n\in\mathbb{N}$ and $A(m_0,n_0-1)$ is defined. Then by (AA), $A(m_0,n_0)$ is also defined, leading to the contradiction. My problem in the question post is that I skip many steps like $A(m,3)$ and that will cause the too deep nested level. – An5Drama May 04 '24 at 13:55
  • 1
    I can't tell because there's a lot of stuff going on here, but to be complete there needs to be a proof, or a reference to a proof, that $\mathbb N^2$ is well-ordered in the lexicographic order - or else we're at the level where we're assuming it's already known. – JonathanZ May 04 '24 at 14:02
  • Compared with the other 2. (7.5) $f_4(n)$ may be defined by $n'<n$ or $n'>n$ and (7.3) must be defined by $n'>n$. Although $A(m,n)$ may involve "an evaluation of A at arguments that may be a lot bigger than m and n", i.e. $A(m,n-1)$, it is ok when using lexicographic order.
  • – An5Drama May 04 '24 at 14:07
  • @IzaakvanDongen From the above unique sequence which eventually is reduced to $A(m',n'),(m',n')\le (m,n)$ and that they are all reduced to $A(0,p),A(q,1)$ which are unique, we can also say $A(m,n)$ value is uniquely defined. Is that right? – An5Drama May 04 '24 at 14:32