# Finite degree clones are undecidable

A clone of functions on a finite domain determines and is determined by its system of invariant relations (=predicates). When a clone is determined by a finite number of relations, we say that the clone is of finite degree. For each Minsky Machine M we associate a finitely generated clone C such that C has finite degree if and only if M halts, thus proving that deciding whether a given clone has finite degree is impossible.

01/26/2017

### Bounds for Substituting Algebraic Functions into D-finite Functions

It is well known that the composition of a D-finite function with an alg...
05/30/2022

### Categorification of Extended Persistence Diagrams

The extended persistence diagram introduced by Cohen-Steiner, Edelsbrunn...
09/21/2021

### Learning low-degree functions from a logarithmic number of random queries

We prove that for any integer n∈ℕ, d∈{1,…,n} and any ε,δ∈(0,1), a bounde...
12/30/2018

### Abelian varieties in pairing-based cryptography

We study the problem of the embedding degree of an abelian variety over ...
11/28/2019

### Equivalence Relations for Computing Permutation Polynomials

We present a new technique for computing permutation polynomials based o...
09/15/2020

### Bounded-Degree Spanners in the Presence of Polygonal Obstacles

Let V be a finite set of vertices in the plane and S be a finite set of ...
10/30/2018

### Domain and range for angelic and demonic compositions

We give finite axiomatizations for the varieties generated by representa...

## 1. Introduction

A clone is a set of operations on a domain which is closed under composition and contains all projections. Emil Post [33]

in 1941 famously classified all clones on a 2-element domain (the Boolean clones), of which there are countably many, and proved that on a 3-element domain there are continuum many clones. The problem under consideration in this paper has its roots in investigations in the 1970s of the structure of the lattices of clones over domains of more than 2 elements. Before discussing the history of the problem, however, it will be useful to establish some background.

Given a set of relations , the supremum of the arities of the relations contained in is the degree of , written

 deg(R)=sup{arity(R)∣R∈R}.

For a clone , we define the degree to be the infimum of the degrees of all sets of relations which determine :

 deg(C)=inf{deg(R)∣R % determines the clone C}.

Both of these values can be infinite, and we regard them as total functions. Of course, since there are uncountably many clones on domains of more than 2 elements, there is no enumeration of them and hence no standard sense in which can be computable. We resolve this complication by considering only those clones which have finite domain and are generated by finitely many operations (i.e. the clones of finite algebras). The clone generated by the algebra is the smallest clone with domain containing all the . The problem that we consider in this paper is the following, which we call the Finite Degree Problem:

• [leftmargin=6em]

• clone generated by the algebra

• whether .

We show that the Finite Degree Problem is undecidable by constructing for each Minsky Machine a finite algebra such that if is the clone generated by then if and only if halts.

It is difficult to determine the precise origin of the Finite Degree Problem. Questions surrounding the algorithmic computation of the degree of a clone date back to the 1970s with papers by Romov [36, 35] and Jablonskiĭ [17]. The closely related question of deciding whether an algebra admits a natural duality has been open since the late 1970s, but apparently first appears in print in 1991 with Davey [12]. The Finite Degree Problem is likely a contemporary of this problem, but does not appear in print until 2006 in [5] in which it is credited by Ralph McKenzie to Miklós Maróti in 2004. Investigations into which structures have finite degree and under what conditions have yielded a host of results over the years, which we now give a brief overview of. All of the following structures on a finite domain have finite degree:

• [itemsep=0.5em]

• all bands [15];

• many semigroups, but not all [23, 11];

• semilattices, and more generally any clone containing a semilattice operation that commutes with the other operations [13, 10];

• clones containing the lattice operations of and , and more generally algebras with a near unanimity term (if the algebra belongs to a congruence distributive variety, then this is an equivalence) [2, 3];

• groups, rings, and more generally algebras with a cube term (if the algebra belongs to a congruence modular variety, then this is an equivalence) [1, 4].

Aside from results on specific structures, necessary conditions for a clone to have finite degree have also been established. Rosenberg and Szendrei [37] and Davey and Pitkethly [14] both establish general algebraic conditions which imply finite degree.

The technique of encoding a model of computation into an algebraic structure was pioneered by McKenzie [24, 25], where it was proven that it is undecidable whether an algebra is finitely axiomatizable (this is famously known as Tarski’s Problem). Since then, a handful of other authors have used a similar approach to prove that other algebraic properties are undecidable. Maróti [21] proves that it is undecidable whether an algebra has a near unanimity term defined on all but 2 elements of a finite domain (it was later discovered that this is decidable without this restriction, see Maróti [22]). McKenzie and Wood [26] prove certain “omitting types” statements about algebras are undecidable. The author [31] proves that the technical property of DPSC is undecidable, thus giving an alternate proof of the undecidability of Tarski’s Problem. Most recently, Nurakunov and Stronkowski [32] prove that profiniteness is undecidable.

We begin in Section 2 with a discussion of a very simple of model of computation, the Minsky Machine, before continuing on to a brief survey of the necessary algebraic background and some of the notation used in the paper in Section 3. The algebra mentioned above is precisely defined in Section 4, and the exact manner in which it encodes the computation of the Minsky Machine is proven in Section 5. In Section 6 we show that when does not halt. The converse is quite a bit more complicated. Tools necessary for the analysis are developed in Section 7, and the main argument is divided into cases and addressed in Section 8. Lastly, Section 9 contains a statement of the main theorem and a discussion of related open problems.

A great deal of effort was spent in constructing the algebra so that the entire argument would be as straightforward as possible. Much of this effort took the form of computer experimentation and verification, allowing for rapid iteration of the definitions. Significant portions of many of the lemmas and theorems can be verified computationally. The framework that was used was built specifically for this task, but the majority of it is suited to general algebraic structures. This computational framework as well as several examples are available online at the URL below.

http://ittc.ku.edu/~moore/preprints/2018_AM.zip

## 2. Minsky Machines

Minsky Machines are a very simple model of computation for which the halting problem is undecidable, and were defined in 1961 by Marvin Minsky [29, 30]. A Minsky Machine has states , where is the halting state and is the initial state, registers and which hold non-negative values, and a finite set of instructions. Minsky Machine instructions come in two types:

• , interpreted as “in state , increase register by one and enter state ”, and

• , interpreted as “in state , if register is then enter state , otherwise decrease by one and enter state ”.

In order for the instructions to unambiguously describe a Minsky Machine there must be an instruction of the form and for each state there must be at most one instruction of the form .

A Minsky Machine configuration is a triple of the form , where indicates the state of the machine, the contents of the register, and the contents of the register. Formally, a Minsky Machine with states and instructions is an operation on the space of all possible configurations

 M:S×N×N→S×N×N

defined by

 M(i,α,β)=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩(j,α+1,β)if (i,A,j)∈I,(j,α,β+1)if (i,B,j)∈I,(j,α−1,β)if (i,A,k,j)∈I,α≠0,(j,α,β−1)if (i,B,k,j)∈I,β≠0,(k,α,β)if (i,A,k,j)∈I,α=0,(k,α,β)if (i,B,k,j)∈I,β=0,(0,α,β)if i=0.

Since the function is defined by , it is usual to use the same symbol for both. That is, we indicate that has some instruction, say , by simply writing .

A single application of the function to a configuration represents a single computational step of the Minsky Machine. To indicate multiple steps in the computation, we can compose :

 Mn(i,α,β)=M∘⋯∘M(i,α,β).

We say that a Minsky Machine halts on input , if there is some such that . We say that a Minsky Machine halts (without reference to input) if it halts on input . By replacing the halting state with a new state and appending instructions and to the list of instructions, a Minsky Machine can be made to return the registers to before halting. Thus, we can assume without loss of generality that all halting machines return both registers to before halting.

If a given Minsky Machine with states does not have an instruction of the form for some state , then without changing the halting status of the machine we may add an instruction of the form to . We therefore assume throughout that Minsky Machines have exactly one instruction for each state .

Let be the directed graph with vertices and an edge if and only if for some . We call this the state graph of . If there is a state that is not reachable from a directed path starting at then we can eliminate state from without changing the halting status of . We therefore assume that all states are reachable from in the state graph.

Summarizing, we assume the following about every Minsky Machine we consider in this paper:

• returns both registers to before halting,

• has exactly one instruction for each state , and

• every state of is reachable from in the state graph.

By the discussion in the paragraphs above, the halting problem restricted to the set of Minsky Machines satisfying these is still undecidable.

## 3. Algebraic background and notation

In this section we give a brief background of the algebraic notions used in the proof. Good references for additional details are McKenzie, McNulty, Taylor [27] and Burris [7].

An algebra consists of a set , called the universe of , and a set of operations on , called the fundamental operations of . This is typically shortened to . From the operations in we can generate new operations by composition and variable identification. These together with the projections are the terms of . A subset which is closed under all operations from (equivalently, all terms of ) is called a subuniverse. If , then together with the operations from restricted to form a subalgebra of , written .

The operations of extend coordinate-wise to operations of for any . A subuniverse is called a relation (or subpower) of . If is a subset, then the smallest relation containing is called the subalgebra generated by , written . We denote by the set of all relations of . This set is closed under intersection (of equal arity relations), product, permutation of coordinates, and projection onto a subset of coordinates. Another way of saying this is that if relations are viewed as predicates and is a primitive-positive formula in this language of predicates then the set of values in for which is true forms a relation.

From the discussion above, it clear that the operations of determine the relations. The opposite is also true: is a term of if and only if it preserves all the relations of . We can formalize this by introducing two new operations on sets of terms and relations. Let be a domain, be a set of operations on , and a set of subsets of powers of . Define

 Rel(G) =⋃m∈N{R⊆Em∣R is % closed under each operation from G} and Pol(R) =⋃m∈N{f:Em→E∣f % preserves each relation in R}.

These two operations form a Galois connection:

 R⊆Rel(G)if and only ifG⊆Pol(R).

This relationship is quite famous and was first discovered by Geiger [16] and by Bodnarčuk, Kalužnin, Kotov, and Romov [6]. Every Galois connection defines two closure operators. For and these are and , the clone and relational clone, respectively. If is an algebra with fundamental operations then the set of terms of is and the set of relations of is .

If is a set of relations on and (that is, is preserved by every operation which preserves relations in ), then we say that entails and write . It is not difficult to prove that if and only if can be built from the relations in , in finitely many steps, by applying the following constructions:

1. intersection of equal arity relations,

2. (cartesian) product of finitely many relations,

3. permutation of the coordinates of a relation, and

4. projection of a relation onto a subset of coordinates.

We call these entailment constructions. Similarly, for an operation on we write if . We define the degree of to be the supremum of the arities of the relations in ,

 deg(R)=sup{arity()∣∈R}.

For a clone , we define the degree to be the infimum of the degrees of all sets of relations which determine ,

 deg(C)=inf{deg(R)∣R⊨Rel(C)}=inf{deg(R)∣RClo(R)=Rel(C)}.

Finally, for an algebra we define the degree of to be the degree of its clone,

 deg(A)=deg(Clo(A)).

In general, any of these quantities may be infinite. An algebra has finite degree (or is said to be finitely related) if .

Lastly, we adopt a convention for projections of elements and subsets of powers intended to increase readability. If and then

• denote the projection of to coordinates by ,

• denote the projection of to coordinates by , and

• define and likewise .

It is possible to confuse this notation for projection with the notation for function application, but we will take special care to avoid ambiguous situations.

## 4. The algebra A(M)

We begin by defining the underlying set of . Let be a Minsky Machine with states and define

 Mi={⟨i,c⟩∣c∈{∙,×,0,A,B}}andA(M)=N⋃i=0Mi.

We next define several important subsets of . Let

 Y=A(M)∖X D={⟨0,∙⟩,…,⟨N,∙⟩}. E=A(M)∖D, C=A(M)∖(X∪D).

An easy way to keep these straight is that contains elements with content , contains elements with content (“dot”), and contains elements with neither. The set is “not ” and is “not ”. We will now define the operations of . It will be convenient in the operation definitions which follow to make use three “helper” functions which are not operations of . Let

 X(⟨i,c⟩)=⟨i,×⟩,st(⟨i,c⟩)=i,% andcon(⟨i,c⟩)=c.

The second two of these are referred to as the state and content of an element. We extend these functions pointwise on elements of . The algebra has a semilattice reduct with meet defined as

 ⟨i,c⟩∧⟨j,d⟩={⟨i,c⟩if % ⟨i,c⟩=⟨j,d⟩,⟨min(i,j),×⟩otherwise.

The semilattice operation defines an order: we write if and only if . The next two operations encode the computation of on elements of powers of . Let

 M(x,y)=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩⟨j,R⟩if x=⟨i,∙⟩, y=⟨i,0⟩, (i,R,j)∈M,⟨j,0⟩if x=⟨i,∙⟩, y=⟨i,R⟩, (i,R,k,j)∈M,⟨j,∙⟩if x=⟨i,0⟩, y=⟨i,∙⟩, (i,R,j)∈M,⟨j,∙⟩if x=⟨i,R⟩, y=⟨i,∙⟩, (i,R,k,j)∈M,⟨j,c⟩if x=y=⟨i,c⟩, [(i,R,j)∈M or (i,R,k,j)∈M],⟨j,×⟩elif st(x)=st(y)=i, [(i,R,j)∈M or (i,R,k,j)∈M],X(y)otherwise,

and

 M′(x)=⎧⎪⎨⎪⎩⟨k,c⟩if x=⟨i,c⟩, (i,R,k,j)∈M, c≠R,⟨k,×⟩elif st(x)=i, (i,R,k,j)∈M,X(x)otherwise.

The next operations are involved with the representation of initial and halting states of in . Define

The next several operations are technical, but are intimately involved in entailment and enforce a certain regularity on the structure of subpowers of . Let

 N0(x,y,z)=⎧⎪⎨⎪⎩yif x=⟨0,∙⟩, st(y)=st(z),zif x=⟨0,0⟩, z∉D, st(y)=st(z),X(y∧z)otherwise, S(x,y,z)={⟨1,0⟩if x=⟨1,0⟩, y,z∈M1, con((y,z))∈{(∙,0),(0,∙),(0,0)},⟨1,×⟩otherwise, N∙(u,x,y,z)=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩xif x=y∉X, st(x)=st(y)=st(z),xif u∈D, y∈X, st(x)=st(y)=st(z),yif u∈D, x∈X, st(x)=st(y)=st(z),zelif u∈D, z∈{x,y}, st(x)=st(y)=st(z),X(x∧y∧z)otherwise, P(u,v,x,y)={xif st(u)=st(v),yotherwise.

The algebra is

 A(M)=⟨A(M);∧,M,M′,I,H,N0,S,N∙,P⟩.

This completes the definition of .

Each operation of plays an important role in the argument, and each has been defined to be as simple as possible. Though the argument is technical, we now attempt to give rough description of the role that each operation plays.

• The semilattice operation induces an order on the algebra that is “flat” modulo . That is, if then .

• The operations , , and encode the computation of in the relations of . See Example 5.7.

• The operations and are responsible for ensuring the entailment of certain relations when halts. See Theorem 5.12, Corollary 5.13, and Theorem 8.3.

• The operation is ensures that is not finitely related when does not halt. See Lemma 6.2 and Theorem 6.3.

• The operations and are responsible for the entailment of relations which are “non-computational”. See Definition 5.5 and Theorem 8.3.

## 5. The encoding of computation

In this section we build the tools necessary to prove that the relations of encode the computation of in a “faithful” manner.

###### Definition 5.1.

An -ary operation of is said to be -absorbing if for all , if for some then .

###### Definition 5.2.

An element is said to be synchronized if is constant over all ; we refer to the common value as or “the state of ”. A subset is said to be synchronized if all of its elements are.

###### Lemma 5.3.

Each of the following hold for .

1. If is a term of and are synchronized, then is synchronized as well.

2. , , , , and are -absorbing.

3. If then the unary function is -absorbing.

4. For all states there is a term of defined by

 zi(x)={⟨i,0⟩if x∈C,⟨i,×⟩otherwise.
###### Proof.

(1)–(3): These can be proven by carefully examining the definitions of the operations of .

(4): If or then

 M(⟨i,0⟩,⟨i,0⟩)=⟨j,0⟩,

and if then

 M′(⟨i,0⟩)=⟨k,0⟩.

From the assumptions at the end of Section 2, every state can be reached from in the state graph. Hence, there is a way to compose operations from to obtain a term such that

 f(⟨1,0⟩,…,⟨1,0⟩)=⟨i,0⟩.

Let . It follows that . ∎

###### Definition 5.4.

We say that the Minsky Machine has

• -step capacity if

 C≥max{α+β∣Mn(1,0,0)=(i,α,β)% for some n≤k},
• capacity if

 C≥max{α+β∣Mn(1,0,0)=(i,α,β)% for some n},
• and halts with capacity if it has capacity and halts.

We say that the relation has

• capacity if

 ∣∣{i∣∃r∈R∩Ym r(i)∈D}∣∣>C
• and weak capacity if

 ∣∣{i∣∃r∈R r(i)∈D}∣∣>C.

We say that some elements , , witness having capacity (resp. weak capacity) if there are distinct elements

 i1,…,iC+1∈{i∣∃r∈R r(i)∈D}

such that and (resp. ).

Observe that for each the halting problem is decidable for Minsky Machines with capacity

since there are a finite (though quite large) number of configurations. At first glance, the definitions of capacity for machines and relations seem to be at odds. As we will see, however, a relation with capacity

can encode any Minsky Machine computation with capacity .

###### Definition 5.5.

If the relation is synchronized and for all then we call computational.

###### Definition 5.6.

If contains an element such that then we say that is halting

and the vector

is called a halting vector. If is not halting, then we say that is non-halting.

The easiest way to see how relations of encode computation is to work through an example.

###### Example 5.7.

Consider the Minsky Machine

 M={(1,A,2), (2,B,3), (3,A,4,3), (4,B,0,4)}.

Recall that a configuration of is a triple where is a state, is the value of register , and is the value of register . We regard as an operation on the set of configurations. Running through the computation on the initial configuration , we have the table below.

 n0123456Mn(1,0,0)(1,0,0)(2,1,0)(3,1,1)(3,0,1)(4,0,1)(4,0,0)(0,0,0)

(we assumed in Section 2 that all zeroed out their registers on halting.) Let’s see how this is encoded in . Define

 σi(j)={⟨1,∙⟩if i=j⟨1,0⟩otherwise,and=SgA(M)3{σ1,σ2,σ3}

The relation is computational and has capacity . Let . The value will correspond to the state of the computation, and the values

 α=∣∣s−1(⟨st(s),A⟩)∣∣andβ=∣∣s−1(⟨st(s),A⟩)∣∣

will correspond to the value of registers and , respectively. Observe that the elements correspond to the configuration . We will need some notation. Define elements of

 [[ kst∣i1∙∣i2,…,ikA∣ik+1,…,iℓB ]](j)=⎧⎪ ⎪ ⎪⎨⎪ ⎪ ⎪⎩⟨k,∙⟩if j=i1,⟨k,A⟩if j∈{i2,…,ik},⟨k,B⟩if j∈{ik+1,…,iℓ},⟨k,0⟩otherwise.

Let us now see how vectors like this are generated from the . In the computations to follow below, the coordinates are all distinct.

First, observe that . We have

 [[ 2∣i∣j∣∅ ]] [[ 2∣3∣2∣∅ ]] =⎛⎜⎝⟨2,0⟩⟨2,A⟩⟨2,∙⟩⎞⎟⎠=M⎛⎜⎝⟨1,0⟩,⟨1,0⟩⟨1,∙⟩,⟨1,0⟩⟨1,0⟩,⟨1,∙⟩⎞⎟⎠,

corresponding to the configuration . Next,

 [[ 3∣i∣j∣k ]] [[ 3∣1∣3∣2 ]] =⎛⎜⎝⟨3,∙⟩⟨3,B⟩⟨3,A⟩⎞⎟⎠=M⎛⎜⎝⟨2,0⟩,⟨2,∙⟩⟨2,∙⟩,⟨2,0⟩⟨2,A⟩,⟨2,A⟩⎞⎟⎠,

corresponding to the configuration . Next,

 [[ 3∣i∣∅∣j ]] =M([[ 3∣k∣i∣j ]], [[ 3∣i∣k∣j ]]),e% .g., [[ 3∣2∣∅∣1 ]] =⎛⎜⎝⟨3,B⟩⟨3,∙⟩⟨3,0⟩⎞⎟⎠=M⎛⎜⎝⟨3,B⟩,⟨3,B⟩⟨3,A⟩,⟨3,∙⟩⟨3,∙⟩,⟨3,A⟩⎞⎟⎠,

corresponding to the configuration . Next,

 [[ 4∣i∣∅∣j ]] =M′([[ 3∣j∣∅∣j ]]),e.g., [[ 4∣3∣∅∣2 ]] =⎛⎜⎝⟨4,0⟩⟨4,B⟩⟨4,∙⟩⎞⎟⎠=M′⎛⎜⎝⟨3,0⟩⟨3,B⟩⟨3,∙⟩⎞⎟⎠,

corresponding to the configuration . Next,

 [[ 4∣i∣∅∣∅ ]] [[ 4∣1∣∅∣∅ ]] =⎛⎜⎝⟨4,∙⟩⟨4,0⟩⟨4,0⟩⎞⎟⎠=M⎛⎜⎝⟨4,B⟩,⟨4,∙⟩⟨4,∙⟩,⟨4,B⟩⟨4,0⟩,⟨4,A⟩⎞⎟⎠,

corresponding to the configuration . Finally, we have

 [[ 0∣i∣∅∣∅ ]] =M′([[ 4∣i∣∅∣∅ ]]),e.g., [[ 0∣2∣∅∣∅ ]] =⎛⎜⎝⟨5,0⟩⟨5,∙⟩⟨5,0⟩⎞⎟⎠=M′⎛⎜⎝⟨4,0⟩⟨4,∙⟩⟨4,0⟩⎞⎟⎠,

corresponding to the halting configuration .

Since can witness the halting of , the relation will have a lot of “non-computational” vectors in . In general, if a relation does not witness the halting of , then this will not be the case.

Now that we have some intuition for how computation is encoded, let us continue exploring the structure of the relations of .

###### Lemma 5.8.

Let be a relation and let .

1. If is computational non-halting then or .

2. If is computational then or .

3. If is synchronized, then .

4. , and if then .

5. .

###### Proof.

(1)–(4): These items follow directly from the definitions. The most complicated one is item (2), so we will leave the others to the reader. If do not share the same state, then . Assume now that share the same state. If then , so also assume that there is with and (we use being computational here). Hence , so we just need to show that or . The possibilities are

 N∙(a,b,c,d)(k)=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩b=cif b=c∉X,bif c∈X,cif b∈X,b=dif b=d∉X,c=dif c=d∉X,X(b∧c∧d)otherwise.

In all cases we have or , so we are finished.

(5): Let and let . It is not hard to see that for all . We also have that for all , from Lemma 5.3 item (4). The conclusion follows immediately. ∎

###### Definition 5.9.

Define elements of

 (5.1) σi(j)={⟨1,∙⟩if i=j,⟨1,0⟩otherwise.

Let and define the -th sequential algebra of to be

 m=SgA(M)m(Σm).
###### Definition 5.10.

Let be a state of and be such that . Let be the set of permutations on and define to be

This is the set of vectors encoding the Minsky Machine configuration .

###### Lemma 5.11.

Let be as in Definition 5.9.

1. is computational and has capacity .

2. If is a permutation on then .

3. if and only if .

4. If then is halting.

###### Proof.

(1): The generators are witnesses to having capacity . Furthermore, is synchronized, so by Lemma 5.3 item (1), must be as well. Let be such that . Examining the operations of , we can see that any such element must have been generated by elements of with more than one coordinate in . contains no such vectors.

(2), (3): The generators are closed under , so must be as well. Applying item (2) for all permutations of proves item (3).

(4): The generating set contains no vectors in . A careful analysis of the operations of shows that the least complexity term generating an element in from is of the form or , where for some . Looking at the definitions, we can see that is a halting vector in either of these cases. ∎

We are now ready to prove the main result of this section, The Coding Theorem, which proves that encodes the computation of .

###### Theorem 5.12 (The Coding Theorem).

Let be a Minsky Machine.

1. If and has -step capacity , then .

2. If and does not halt with capacity , then for some we have and has -step capacity .

###### Proof.

For the first item, we refer the reader to Example 5.7 and Lemma 5.11.

For the second item, suppose that and does not halt with capacity . We will analyze the generation of . Let and

 Gn={F(¯¯¯g)∣F a fundamental ℓ-ary operation, ¯¯¯g∈Gℓn−1}∪Gn−1.

Observe that , so for some least . A key observation for what follows is that since is closed under coordinate permutation, so is , so implies . After proving the next claim, we will be done.

###### Claim.

If is minimal such that then and has -step capacity .

###### Proof of claim.

The proof shall be by induction on . Observe that , , and has -step capacity . This establishes the basis of the induction.

Suppose now that and let . This implies that for some -ary fundamental operation and . We break into cases depending on which fundamental operation is.

Case : These operations have the property that if then