MuPAD codes which implement limit-computable functions that cannot be bounded by any computable function

For a positive integer n, let f(n) denote the smallest non-negative integer b such that for each system S \subseteq {x_k=1,x_i+x_j=x_k,x_i*x_j=x_k: i,j,k \in {1,...,n}} with a solution in non-negative integers x_1,...,x_n, there exists a solution of S in {0,...,b}^n. We prove that the function f is strictly increasing and dominates all computable functions. We present an infinite loop in MuPAD which takes as input a positive integer n and returns a non-negative integer on each iteration. Let g(n,m) denote the number returned on the m-th iteration, if n is taken as input. Then, g(n,m) \leq m-1, 0=g(n,1)<1=g(n,2) \leq g(n,3) \leq g(n,4) \leq ... and g(n,f(n))<f(n)=g(n,f(n)+1)=g(n,f(n)+2)=g(n,f(n)+3)=.... A MuPAD code constructed on another principle contains a repeat-until loop and implements a limit-computable function \xi: N-->N that cannot be bounded by any computable function. This code takes as input a non-negative integer n, immediately returns 0, and computes a system S of polynomial equations. If the loop terminates for S, then the next instruction is executed and returns \xi(n).

Limit-computable functions, also known as trial-and-error computable functions, have been thoroughly studied, see [6, pp. 233-235] for the main results.Our first goal is to present an infinite loop in MuPAD which finds the values of a limit-computable function f : N \ {0} → N \ {0} by an infinite computation, where f dominates all computable functions.There are many limit-computable functions f : N \ {0} → N \ {0} which cannot be bounded by any computable function.For example, this follows from [2, p. 38, item 4], see also [5, p. 268] where Janiczak's result is mentioned.Unfortunately, for all known such functions f , it is difficult to write a suitable computer program.A sophisticated choice of a function f will allow us to do it.

Let
E n = {x k = 1, x i + x j = x k , x i • x j = x k : i, j, k ∈ {1, . . ., n}} For a positive integer n, let f (n) denote the smallest non-negative integer b such that for each system S ⊆ E n with a solution in non-negative integers x 1 , . . ., x n there exists a solution of S in non-negative integers not greater than b.This definition is correct because there are only finitely many subsets of E n .
For each integer n ≥ 12, the following system S ⊆ E n has infinitely many solutions in non-negative integers x 1 , . . ., x n and each such solution (x 1 , . . ., for any n ≥ 12.
The Davis-Putnam-Robinson-Matiyasevich theorem states that every recursively enumerable set M ⊆ N n has a Diophantine representation, that is for some polynomial W with integer coefficients, see [3].Assume that d i = deg(D, x i ) ≥ 1 for each i ∈ {1, . . ., p}.We can compute a positive integer n > p and a system T ⊆ E n which satisfies the following two conditions:  Proof.The Davis-Putnam-Robinson-Matiyasevich theorem and Lemma 2 for K = N imply that there exists an integer s ≥ 3 such that for any non-negative integers where the formula Φ(x 1 , x 2 , x 3 , . . ., x s ) is a conjunction of formulae of the forms For an integer n ≥ 6 + 2s, let S n denote the following system with n variables.By the equivalence (E), S n is satisfiable over N. If a n-tuple (x 1 , x 2 , x 3 , . . ., x s , . . ., w, y, u) of non-negative integers solves S n , then by the equivalence (E), The following infinite loop in MuPAD is also stored in [14].It takes as input a positive integer n and returns a non-negative integer on each iteration.Unfortunately, on each iteration the program executes a brute force algorithm, which is very time consuming.input("input the value of n",n): X:=[0]: while TRUE do Y:=combinat::cartesianProduct(X $i=1..n): W:=combinat::cartesianProduct(X $i=1..n): for s from 1 to nops(Y) do for t from 1 to nops(Y) do m:=0: Theorem 2. Let g(n, m) denote the number returned on the m-th iteration, if n is taken as input.Then, For each positive integer n, f (n) equals the smallest non-negative integer b such that for each x ∈ N n there exists a duplicate of x in {0, . . ., b} n .For each positive integers n and m, g(n, m) equals the smallest non-negative integer b such that for each x ∈ {0, . . ., m − 1} n there exists a duplicate of x in {0, . . ., b} n .
If we replace the instruction: by the following two instructions: if g=nops(X)-1 then print(g) end_if: then the changed code ( [13]) performs an infinite computation of f (n) which returns a finite sequence of non-negative integers.The same sequence is returned by the algorithm presented in the flowchart below.
The next theorem is a corollary from Theorems 1 and 2.
Theorem 3.There exists a computable function ϕ : N × N → N which satisfies the following conditions: 1) For each non-negative integers n and l, ϕ(n, l) ≤ l 2) For each non-negative integer n,

3)
For each non-negative integer n, the sequence {ϕ(n, l)} l∈N is bounded from above.
4) The function is strictly increasing and dominates all computable functions.

5)
For each non-negative integer n, . The following MuPAD code, which is also stored in [12], computes the values of ϕ(n, l).
input("input the value of n",n): input("input the value of l",l): n:=n+1: Let us fix a computable enumeration D 0 , D 1 , D 2 , . . . of all Diophantine equations.The following flowchart illustrates an infinite computation of a limit-computable function that cannot be bounded by any computable function.For each non-negative integer n, the function has a non-zero value at n if and only if the equation D n has a solution in non-negative integers.Unfortunately, the function does not have any easy implementation.
Frequently, it is hardly to decide whether or not a limit-computable function is computable.For a positive integer n, let χ(n) denote the smallest non-negative integer b such that for each system S ⊆ E n with a solution in non-negative integers x 1 , . . ., x n this solution belongs to [0, b] n .The function χ is limit-computable and the code presented in [10] (and stored in [8]) performs an infinite computation of χ.A computability of χ is an open problem.Matiyasevich's conjecture on single-fold Diophantine representations ( [4]) implies that χ is not computable.In this case, χ dominates all computable functions.
The following MuPAD code is also stored in [7].j,k,"*"]} end_if: end_for: end_for: end_for: m:=m+1: until S minus T={} end_repeat: print(max(W[i] $i=1..nops(W))): Theorem 4. The above code implements a limit-computable function ξ : N → N that cannot be bounded by any computable function.The code takes as input a non-negative integer n, immediately returns 0, and computes a system S of polynomial equations.If the repeat-until loop terminates for S , then the next instruction is executed and returns ξ(n).
The last three facts imply that the code assigns to n a finite and non-empty system S which consists of equations of the forms: x k = 1, x i + x j = x k , and x i • x j = x k .Conversely, each such system S is assigned to some non-negative integer n.
Starting with the instruction m := 2, the code tries to find a solution of S in non-negative integers by performing a brute-force search.If a solution exists, then the searching terminates and the code returns a non-negative integer ξ(n) such that the system S has a solution in non-negative integers not greater than ξ(n).In the opposite case, execution of the code never terminates.
A negative solution to Hilbert's Tenth Problem ( [3]) and Lemma 2 for K = N imply that the code implements a limit-computable function ξ : N → N that cannot be bounded by any computable function.
Execution of the last code does not terminate for n = 7 • 11 • 13 • 17 • 19 − 1 = 323322, when the code tries to find a solution of the system {x 1 + x 1 = x 1 , x 1 = 1}.Execution terminates for any n < 323322, when the code returns 0 and next 1 or 0. The last claim holds only theoretically.In fact, for n = 2 18 − 1 = 262143, the algorithm of the code returns 1 solving the equation To avoid long and and trivial computations, the next code implements a slightly changed function ξ : N → N. The code, which is also stored in [11], computes the system S and the set V of all variables which occur in equations from S .If any variable in V has an index greater than card(V), then the code continues execution as for the system S = {x 1 = 1}, which is formally defined as the set {1}.The commercial version of MuPAD is no longer available as a stand-alone product, but only as the Symbolic Math Toolbox of MATLAB.Fortunately, the presented codes can be executed by MuPAD Light, which was and is free, see [16].
Let P denote a predicate calculus with equality and one binary relation symbol, and let Λ be a computable function that maps N onto the set of sentences of P. The following pseudocode in MuPAD implements a limit-computable function σ : N → N that cannot be bounded by any computable function.
input("input the value of n",n): print(0): k:=1: while Λ(n) holds in all models o f size k do k:=k+1: end while: print(k): The proof follows from the fact that the set of sentences of P that are true in all finite and non-empty models is not recursively enumerable, see [1, p. 129], where it is concluded from Trakhtenbrot's theorem.The author has no idea how to transform the pseudocode into a correct computer program.
The next theorem, which is now widely known, strengthens Janiczak's result mentioned earlier.Proof.The last pseudocode and the previous two codes compute appropriate functions.
The last pseudocode and the previous two codes have metamathematical character as they syntactically compute mathematical objects (sentences, systems of equations) that correspond to non-negative integers.The author will try to write a computer code with the following properties: 6) The first instruction takes as input a non-negative integer n.

7)
The execution of the code may terminate or not.

9)
The last instruction returns a positive integer.10) All other instructions return nothing.
11) The code implements some limit-computable function µ : N → N that cannot be bounded by any computable function.
12) The code does not use any enumeration of mathematical objects which differs from the canonical enumeration of non-negative integers.

Theorem 5 .
There exists a computable function g :N × N → N such that the function f : N → N defined by f (n) = {m ∈ N : g(n, m) = 0} = ∅ min m ∈ N : g(n, m) = 0 , if {m ∈ N : g(n, m) = 0} ∅cannot be bounded by any computable function.