1 Introduction

In [29], Kalimullin, Melnikov and Ng initiated the systematic study of the primitive recursive content of mathematics. The main idea of such studies is eliminating unbounded search from various abstract algorithms in computable structure theory [2, 21, 38]. The main definition in the theory of punctual structures is the following. An algebraic structure is punctual (or fully primitive recursive) if its domain is the set of natural numbers, or an initial segment of it, and the operations and relations are represented by primitive recursive functions. There has been much research focused around the following fundamental problems:

  1. (a)

    Describe punctually presented structures in common classes.

  2. (b)

    Compare different presentations of an algebraic structure.

  3. (c)

    Investigate the primitive recursive content of various classical algebraic results.

These problems are clearly motivated by various results in (Turing) computable algebra and combinatorics [2, 21]. For the foundations of the theory of punctual structures, we cite the surveys [6, 8, 20]. We also note that primitive recursive algebra is very closely technically related to polynomial time algebra; see, e.g., [3, 5, 13, 14]. The main results of the present paper mainly attack problem (b). For more results related to problem (a) and (c), we cite the satellite paper [19] and also [9, 37, 43].

In algebra, algebraic structures are usually viewed up to isomorphism. More generally, it is quite natural to view objects under a notion of similarity that preserves all properties of interest, i.e., one should choose the ‘right’ category to work with. For instance, in topological algebra, it is natural to view structures up to topological isomorphism. In computable algebra, where computable algebraic structures are the main objects of study, it is quite natural to use computable isomorphisms to compare different computable presentations of a structure. (Recall that a structure is computable if its domain is a computable set and its operations and relations are uniformly computable.) This idea can be traced back to Mal’cev [34] and Rabin [39]. The study of the number of computable presentations of a given algebraic structure \(\mathcal {A}\) up to computable isomorphism, also known as the computable dimension of \(\mathcal {A}\), has been central to computable structure theory for many decades. It is known that in many standard classes a structure either has a unique computable presentation or has infinitely many computable presentations, up to computable isomorphism [21]. In the former case, the structure is called computably categorical or autostable. For further results about computable categoricity and its generalisations, see [2, 38]. The theory has accumulated many advanced techniques and deep results, such as examples of algebraic structures having exactly two computable presentations up to computable isomorphism [23,24,25, 31]. Such structures are said to have ‘computable dimension 2’; of course, structures of finite computable dimension \(n>2\) can also be constructed (folklore). For several more recent results in this direction, see [17, 42].

The situation becomes even more intricate when we forbid unbounded search. It is easy to see that the inverse of a primitive recursive bijection on \(\omega \) does not have to be primitive recursive. This observation has a profound effect on the respective notion of effective categoricity even among the standard basic examples. For instance, the natural presentation of the dense order of the rationals has the property that any other punctual presentation can be mapped onto it via a ‘quick’ isomorphism. In contrast, any punctual finitely generated structure has a natural presentation that can be mapped to any other presentation of it. In both cases one can show that the inverse isomorphism fails to be primitive recursive in general. These observations coming from natural examples lead to a whole zoo of categoricity notions [27, 28], depending on the choice of ‘quick’ isomorphism. Most of these notions that show up naturally tend to be non-equivalent. Arguably the most appealing and natural notion of categoricity is the strongest possible version, which says that any two punctual presentations are isomorphic via some isomorphism f so that both f and \(f^{-1}\) are primitive recursive. We call such isomorphisms punctual, and we call such structures punctually categorical. Punctual categoricity tends to imply computable categoricity in standard ‘tame’ algebraic classes [16, 27, 29]. However, there exist punctually categorical structures that are not computably categorical [29], and which are in fact not even \(\Delta ^1_1\)-categorical [15]. There also exist structures having exactly two punctual presentations up to punctual isomorphism [37], via a proof that is quite different from those in computable structure theory.

However, in several standard classes such as Boolean algebras, the number of punctual presentations is either 1 or \(\omega \), up to punctual isomorphism [18]. The classes studied in [18] were not computably universal. In particular the computable dimension of structures in these classes is also well-known to be either 1 or \(\omega \). We believe that it is more interesting and potentially more fruitful to explore punctual dimension in those classes which contain examples having finite computable dimension. For example, it is well-known that graphs and unary functional structures (that can imitate trees) can computably code families of sets, and thus can have computable dimension 2. Our first main result is as follows.

Theorem 1.1

In each of the following classes, if a structure in the class is not punctually categorical, then it has infinitely many punctually non-isomorphic punctual presentations.

  • Mono-unary structuresFootnote 1;

  • Undirected graphs.

Our theorem therefore extends the respective results from [15, 16]. We also cite the related paper of Blinov [12] where he investigated primitive recursive categoricity of unary structures.

There is another approach to comparing different punctual presentations of structures that was suggested in [28] and further investigated in [10, 22, 30, 36]. Recall that “\(\mathcal {A}\) is primitively recursively isomorphic to \(\mathcal {B}\)” is not a symmetric relation on punctual presentations. However, it is certainly transitive and reflexive and can be viewed as a reduction. Specifically, \(\mathcal {A}\) is punctually reducible to \(\mathcal {B}\), written \(\mathcal {A}\le _{pr} \mathcal {B}\), if there is a primitive recursive isomorphim from \(\mathcal {A}\) onto \(\mathcal {B}\). For a fixed algebraic structure \(\mathcal {A}\), the induced degree structure on all punctual presentations of \(\mathcal {A}\) is called the punctual degrees of \(\mathcal {A}\) and denoted \(PR(\mathcal {A})\). Given \(\mathcal {A}\), what kind of properties does \(PR(\mathcal {A})\) exhibit (as a partial ordering)? Conversely, given an order-theoretic property, can we find a structure whose punctual degrees have this property? The former question can be remarkably challenging even for some common ‘elementary’ structures such as, e.g., the random graph; see [36]. It is also known that for a finitely generated \(\mathcal {A}\), its degrees \(PR(\mathcal {A})\) are dense and is a distributive lattice, however, it is never a Boolean algebra [30]. On the other hand, \(PR(\mathcal {A})\) does not have to be dense in general; see [22]. Our contribution to this line of research is the following theorem, which is the second main result of the paper.

Theorem 1.2

The punctual degrees of the following structures are dense:

  1. (1)

    Any computably almost rigid structure.

  2. (2)

    The linear order \((\mathbb {Z},<)\).

In the theorem, we say that \(\mathcal {M}\) is computably almost rigid if any punctual presentation of the structure has an algorithm that decides whether two elements are in the same automorphism orbit, and if they are, outputs a computable index of the unique computable automorphism that does the job. We will further clarify this definition later. At this point note that the condition is computable, not primitive recursive, which is quite unusual. A straightforward example of a computably almost rigid structure is \((\mathbb {Z}, S)\), where \(S(x) = x+1\).

It may seem strange to the reader at first that the proof of the density of \(PR(\mathbb {Z},<)\) requires several pages. The reader experienced in dealing with computable structures should not rely on their intuition based on computable structure theory, as it sometimes can be misleading when it comes to primitive recursive structures.

Our third result is concerned with 1-decidable presentations and their punctual analogs. Recall that a computable structure is 1-decidable if there is an algorithm deciding whether a first-order \(\exists \)-formula \(\exists \bar{x} \phi (\bar{y},\bar{x})\) holds for a given tuple \(\bar{y}\) from the domain of the structure. These strong presentations have been studied thoroughly for the classes of Boolean algebras, linear orders, and abelian groups; we cite, e.g., [26, 32, 33, 40]. The punctual version of 1-decidable presentability is as follows. We say that a punctual structure \(\mathcal {A}\) is punctually 1-decidable if there is a primitive recursive procedure which, given an index of a first-order \(\exists \)-formula \(\exists \bar{x} \phi (\bar{y},\bar{x})\) and a tuple \(\bar{a}\) in \(\mathcal {A}\), outputs a tuple \(\bar{b}\) in \(\mathcal {A}\) such that \(A\models \phi (\bar{a},\bar{b})\) if such a tuple exists, and outputs \(-1\) otherwise. (We identify tuples and formulae with their Gödel numbers under some fixed primitive recursive Gödel numbering.) Punctually 1-decidable structures have been studied quite recently in [1, 4, 10, 29], but our understanding of such presentations is still very limited. Recall that Problem (b) was concerned with comparing different presentations of algebraic structure. Keeping with that theme, it is natural to ask when a 1-decidable structure admits a punctually 1-decidable presentation. Various examples and counterexamples can be found in the cited above papers. Positive results of this nature tend to be non-uniform (e.g., [29, 43]), and there is perhaps very little hope of getting any sound structured theory in general. We therefore ask when a given 1-decidable structure is computably isomorphic to a punctually 1-decidable structure. Our third main result below gives an unexpected complete description of such structures in the class of Boolean algebras.

Theorem 1.3

For a countable Boolean algebra \(\mathcal {B}\), the following are equivalent:

  1. (1)

    Every 1-decidable presentation \(\mathcal {A}\) of \(\mathcal {B}\) is computably isomorphic to some punctually 1-decidable \(\mathcal {P}\cong \mathcal {B}\).

  2. (2)

    \(\mathcal {B}\) splits into finitely many \(\mathcal {C}_0,...,\mathcal {C}_k\) such that each \(\mathcal {C}_i\) is either atomless, an atom, or a 1-atom.

Such algebras are exactly the relatively \(\Delta ^0_2\)-categorical Boolean algebras [35] which are exactly the \(\Delta ^0_2\)-categorical Boolean algebras by [7]. Also, these are exactly the Boolean algebras that are computably categorical relative to the 1-decidable presentations [40]. Since these notions of categoricity are not directly related to the material in the present article we omit their definitions that can be found in the cited papers. We also mention that Alaev [4] has recently discovered that punctual categoricity relative to punctually 1-decidable presentations is equivalent to the usual computable categoricity for Boolean algebras. A similar result holds for linear orders [11]. It seems that there could be some deeper and more general result that connects computable, 1-decidable, and punctual presentations. For instance, we leave open:

Question 1.4

Suppose \(\mathcal {A}\) is a punctually 1-decidable structure such that any two punctually 1-decidable presentations of it are punctually isomorphic (i.e., it is punctually categorical relative to such presentations). Is \(\mathcal {A}\) necessarily computably categorical?

In the rest of the paper we give the formal proofs of our results.

2 Graphs and unary structures

In this section we prove Theorem  1.1.

2.1 Unary structures

We begin with a sequence of technical lemmas about unary structures. We consider various properties that these structures may have and we prove that in these cases the structures possessing these properties will have infinitely many punctual degrees. As we move through the section we exclude the cases we have already dealt with. Note that the set up for the constructions for these lemmas work in a similar way.

Lemma 2.1

Suppose \(\mathcal {A}\) is an infinite structure with only one unary functional symbol f. If there is an \(x\in \mathcal {A}\) such that \(f^n(x)\ne f^m(x)\) for every \(n\ne m\), then \(\mathcal {A}\) has infinitely many punctual degrees.

Proof

Without loss of generality assume \(x=0\). Let \(p_{0}, p_{1},\ldots \) be an effective list of all primitive recursive functions. We build punctual copies \(\mathcal {B}_{0}, \mathcal {B}_{1},\ldots \) of \(\mathcal {A}\) and meet the following requirements:

$$\begin{aligned}R_{e,k,m}: ~p_{e}:\mathcal {B}_{k}\rightarrow \mathcal {B}_{m} \text { is not an isomorphism,} k<m.\end{aligned}$$

Then there are infinitely many punctual degrees of \(\mathcal {A}\).

At each stage s we work with a finite number of structures \(\mathcal {B}_{0},\ldots , \mathcal {B}_{s}\). Let \(\mathcal {B}_{i}[s]\) be a finite part of \(\mathcal {B}_{i}\) constructed by stage s, and \(\mathcal {B}_{s}[s]=\{0\}\). We also construct computable isomorphisms \(\psi _{i}: \mathcal {B}_{i}\rightarrow \mathcal {A}\). Let \(\psi _{i}[s](0)=0\).

We arrange R-requirements in some effective list. Unless the current stage is 0, assume that some R-requirement in this list was met at previous stage \(s-1\). Let \(R_{e,k,m}\) be the next requirement in our list. We use f, \(f_{k}\) and \(f_{m}\) for the function symbols in \(\mathcal {A}\), \(\mathcal {B}_{k}\) and \(\mathcal {B}_{m}\), respectively.

At stage s, \(\mathcal {B}_{k}\) and \(\mathcal {B}_{m}\) continue copying \(\mathcal {A}\), but in \(\mathcal {B}_{k}\) we also add an extra element y and initiate a chain

$$\begin{aligned}y, f_{k}(y), f^{2}_{k}(y), \ldots \end{aligned}$$

For every new element v in \(\mathcal {B}_{m}\), define \(\psi _{m}(v)=v\). We wait for \(p_{e}(0)\) and \(p_{e}(y)\) to be computed and added into \(\mathcal {B}_{m}\) at a later stage \(s'\). Let \(p_{e}(0)=a\), \(p_{e}(y)=b\) and \(a'=\psi _{m}[s'](a)\). Let n be the least such that \(f_{k}^{n}(y)\) has not been defined in \(\mathcal {B}_{k}\) by this stage. Stop growing \(\mathcal {B}_{k}\) until we either find some \(v< w\) such that \(f^{v}(a')=f^{w}(a')\), or find j such that \(f^{j}(a'), \ldots , f^{j+2n-1}(a') \not \in \mathcal {A}[s']\).

In the former case, continue growing the chain so that we have at least

$$\begin{aligned}y, f_{k}(y), f^{2}_{k}(y), \ldots , f^{w-v+1}(y)\end{aligned}$$

been enumerated in \(\mathcal {B}_{k}\). Let u be the least such that \(f_{k}^{u}(0)\) has not been enumerated in \(\mathcal {B}_{k}\). Define \(f_{k}^{u}(0)=y\).

In the latter case, if \(b=f_{m}^{l}(a)\) for some \( j \le l \le j+n-1\), we declare that \(f_{k}^{j+n}(0)=y\), otherwise, \(f_{k}^{j}(0)=y\). Then \(p_{e}\) is not isomorphism. We define \(\psi _{k}\) on new elements of \(\mathcal {B}_{k}\) taking into account all permutations that have been done during this stage.

The sequence \(f^{j}(a'), \ldots , f^{j+2n-1}(a') \) guarantees that we will able to build \(\mathcal {B}_{k}\) to be isomorphic to \(\mathcal {A}\). The delay in constructing of \(\mathcal {B}_{k}\) does not destroy the primitive recursiveness of \(f_{k}\) since it is bounded by the computation time of \(f^{2n|B_{k}[s']|}(a')\). \(\square \)

Lemma 2.2

Suppose \(\mathcal {A}\) is an infinite structure with only one unary functional symbol f. If there is an \(x\in \mathcal {A}\) for which there are infinitely many \(y\in A\) with \(f(y)=x\) and there are infinitely many \(y\in \mathcal {A}\) such that \(f(x)\ne y\), then \(\mathcal {A}\) has infinitely many punctual degrees.

Proof

Without loss of generality assume \(x=0\). Let \(p_{0}, p_{1},\ldots \) be an effective list of all primitive recursive functions. We build punctual copies \(\mathcal {B}_{0}, \mathcal {B}_{1},\ldots \) of \(\mathcal {A}\) and meet the following requirements:

$$\begin{aligned}R_{e,k,m}: ~p_{e}:\mathcal {B}_{k}\rightarrow \mathcal {B}_{m} \text { is not an isomorphism, } k<m.\end{aligned}$$

Then \(\mathcal {B}_{k}\nleq _{pr}\mathcal {B}_{m}\) for every \(k<m\), thus there are infinitely many punctual degrees of \(\mathcal {A}\).

At each stage s we work with a finite number of structures \(\mathcal {B}_{0},\ldots , \mathcal {B}_{s}\). Let \(\mathcal {B}_{i}[s]\) be a finite part of \(\mathcal {B}_{i}\) constructed by stage s, and \(\mathcal {B}_{s}[s]=\{0\}\). We also construct computable isomorphisms \(\psi _{i}: \mathcal {B}_{i}\rightarrow \mathcal {A}\). Let \(\psi _{i}[s](0)=0\).

We arrange R-requirements in some effective list. Unless the current stage is 0, assume that some R-requirement in this list was met at previous stage \(s-1\). Let \(R_{e,k,m}\) be the next requirement in our list. We use f, \(f_{k}\) and \(f_{m}\) for the function symbols in \(\mathcal {A}\), \(\mathcal {B}_{k}\) and \(\mathcal {B}_{m}\), respectively.

Stage s. Let \(\mathcal {B}_{k}\) continue copying \(\mathcal {A}\) and for every new element v in \(\mathcal {B}_{k}\), define \(\psi _{k}(v)=v\). Firstly, we want to close \(\mathcal {B}_{m}[s-1]\) under f. So we build a substructure generated by \(\mathcal {B}_{m}[s-1]\). Let \(D=f(\psi _{m}(\mathcal {B}_{m}[s-1]))\setminus \psi _{m}(\mathcal {B}_{m}[s-1])\) and n be the least such that \(\bigcup _{i\le n+1}f^{i}(D)=\bigcup _{i\le n} f^{i}(D)\). Such an n exists by the previous lemma. We add \(|\bigcup _{i\le n}f^{i}(D)\setminus D|\) new elements in \(\mathcal {B}_{m}\) and extend \(\psi _{m}[s-1]\) to \(\psi _{m}[s]\) via some bijection from these new elements to \(\bigcup _{i\le n}f^{i}(D)\backslash D\). We define \(f_{m}\) on new elements so that \(\psi _m\) is an isomorphism.

Stage \(s+1\). Let \(\mathcal {B}_{k}\) continue copying \(\mathcal {A}\). In \(\mathcal {B}_{m}\), for every new element v, we declare that \(f_{m}(v)=0\). We continue this process until \(|\mathcal {B}_{m}[s]|+1\) elements appear in \(\mathcal {B}_{k}\) such that \(f_{k}(w)\ne 0\), this will eventually happen since there are infinitely many such elements. We wait for \(p_{e}\) to be defined on these elements in \(\mathcal {B}_k\). Since there are more elements in \(\mathcal {B}_k\) that do not map to zero then there is at least one of these elements, w, such that \(f_{m}(p_{e}(w))= 0\); hence \(p_{e}\) is not an isomorphism. Now we add the elements from \(\mathcal {A}\) to \(\mathcal {B}_m\) that have not be copied and define \(\psi _m(v)=v\) for these elements. Note that \(\mathcal {B}_m\) will still have more elements, but this is ok because we know these will eventually be enumerated into \(\mathcal {A}\).

Every requirement \(R_{e,k,m}\) is met at some stage s. The structures \(\mathcal {B}_i\) are punctual by construction. Thus, \(\mathcal {A}\) has infinitely many punctual degrees. \(\square \)

Lemma 2.3

Suppose \(\mathcal {A}\) is an infinite structure with only one unary functional symbol f. If there is some n such that \(\mathcal {A}\) contains infinitely many loops of size n but \(\mathcal {A}\) is not almost equal to an infinite union of loops of size n, then \(\mathcal {A}\) has infinitely many punctual degrees.

Proof

Without loss of generality, fix some \(n>0\). Let \(p_{0}, p_{1},\ldots \) be an effective list of all primitive recursive functions. We build punctual copies \(\mathcal {B}_{0}, \mathcal {B}_{1},\ldots \) of \(\mathcal {A}\) and meet the following requirements:

$$\begin{aligned}R_{e,k,m}: ~p_{e}:\mathcal {B}_{k}\rightarrow \mathcal {B}_{m} \text { is not an isomorphism, } k<m.\end{aligned}$$

Then \(\mathcal {B}_{k}\nleq _{pr}\mathcal {B}_{m}\) for every \(k<m\), thus there are infinitely many punctual degrees of \(\mathcal {A}\).

At each stage s we work with a finite number of structures \(\mathcal {B}_{0},\ldots , \mathcal {B}_{s}\). Let \(\mathcal {B}_{i}[s]\) be a finite part of \(\mathcal {B}_{i}\) constructed by stage s, and \(\mathcal {B}_{s}[s]=\{0\}\). We also construct computable isomorphisms \(\psi _{i}: \mathcal {B}_{i}\rightarrow \mathcal {A}\). Let \(\psi _{i}[s](0)=0\).

We arrange R-requirements in some effective list. Unless the current stage is 0, assume that some R-requirement in this list was met at previous stage \(s-1\). Let \(R_{e,k,m}\) be the next requirement in our list. We use f, \(f_{k}\) and \(f_{m}\) for the function symbols in \(\mathcal {A}\), \(\mathcal {B}_{k}\) and \(\mathcal {B}_{m}\), respectively.

Stage s. Let \(\mathcal {B}_{k}\) continue copying \(\mathcal {A}\) and for every new element v in \(\mathcal {B}_{k}\), define \(\psi _{k}(v)=v\). In \(\mathcal {B}_{m}\), we build a substructure generated by \(\mathcal {B}_{m}[s-1]\) as in the previous lemma.

Stage \(s+1\). Let \(\mathcal {B}_{k}\) continue copying \(\mathcal {A}\). In \(\mathcal {B}_{m}\) we construct only loops of size n. We wait for \(v\in \mathcal {B}_k\) such that either there is some \(0<n^\prime <n\) such that \(f^{n^\prime }_k(v)=v\) or \(f^n_k(v)\ne v\). We will eventually find such a v since \(\mathcal {A}\) is not almost equal to an infinite union of loops of size n. Now we wait for \(p_e(v)\) to converge. If \(f_m^{n^\prime }(p_e(v))\ne p_e(v)\) for all \(n^\prime <n\) and \(f_m^n(p_e(v))=p_e(v)\) then we have successfully diagonalised. If not, then repeat this process. This process will end since while we look for this v only loops of size n are introduced into \(\mathcal {B}_m\).

Each requirement \(R_{e,k,m}\) is met at some stage s. The structures \(\mathcal {B}_i\) are punctual by construction. Therefore, \(\mathcal {A}\) has infinitely many punctual degrees. \(\square \)

Lemma 2.4

Suppose \(\mathcal {A}\) is an infinite structure with only one unary function symbol f, and \(\mathcal {A}\) is not almost equal to a union of infinitely many loops of a fixed size, but almost every element is a part of a loop. Then \(\mathcal {A}\) has infinitely many punctual degrees.

Proof

Let \(p_{0}, p_{1},\ldots \) be an effective list of all primitive recursive functions. We build punctual copies \(\mathcal {B}_{0}, \mathcal {B}_{1},\ldots \) of \(\mathcal {A}\) and meet the following requirements:

$$\begin{aligned}R_{e,k,m}: ~p_{e}:\mathcal {B}_{k}\rightarrow \mathcal {B}_{m} \text { is not an isomorphism, } k<m.\end{aligned}$$

Then \(\mathcal {B}_{k}\nleq _{pr}\mathcal {B}_{m}\) for every \(k<m\), thus there are infinitely many punctual degrees of \(\mathcal {A}\).

At each stage s we work with a finite number of structures \(\mathcal {B}_{0},\ldots , \mathcal {B}_{s}\). Let \(\mathcal {B}_{i}[s]\) be a finite part of \(\mathcal {B}_{i}\) constructed by stage s, and \(\mathcal {B}_{s}[s]=\{0\}\). We also construct computable isomorphisms \(\psi _{i}: \mathcal {B}_{i}\rightarrow \mathcal {A}\). We use f, \(f_{k}\) and \(f_{m}\) for the function symbols in \(\mathcal {A}\), \(\mathcal {B}_{k}\) and \(\mathcal {B}_{m}\), respectively.

For this constructions we also define a sequence \({\left\langle {m_i}\right\rangle }\) as follows: \(m_{0} = 0\), \(m_{s+1} = \max \{m_{s}, f(a): a \le m_{s}\} + 1\). Observe that \(s \mapsto m_{s}\) is primitive recursive. We may assume that \(m_{s}\) and f(a) have converged by stage s for \(a \le m_{s}\).

Consider the strategy for a fixed \(R_{e,k,m}\). We can assume that all elements that are not part of a loop are already enumerated in \(\mathcal {B}_{k}\) and \(\mathcal {B}_{m}\). We call a loop (chain) x-loop (x-chain) if x belongs to it. Let \(\mathcal {B}_{k}\) continue copying \(\mathcal {A}\), but in \(\mathcal {B}_{m}\), we only act at stages of the form \(s = t^{2}\), where t is an integer. Let \(s_0=t_0^2\) be the first stage we begin considering this requirement. First, in \(\mathcal {B}_{m}\), we build a substructure, generated by \(\mathcal {B}_{m}[s_0]\) as described in Lemma 2.1. Let \(s_1=t_1^2\) be the stage when this process is finished.

Beginning with stage \(s_{2}=(t_{1}+1)^{2}\), we build a chain y, \(f_{m}(y)\), \(f_{m}^{2}(y), \ldots \). While this is occurring, we do not extend \(\psi _{m}\). We continue this process until the stage \(s_{3}=t_{3}^{2}\) when the first a-loop appears in \([0, m_{s_{3}}]\backslash \psi _{m}(\mathcal {B}_{m}[s_{1}])\) for a enumerated in \(\mathcal {A}\) between stages \(s_{1}\) and \(s_{2}\). Note that the a-loop has a length bigger than the length of the y-chain, since we only act for \(\mathcal {B}_m\) at stages of the form \(s=t^2\).

If there is some b-loop in \([0, m_{s_{3}}]-\psi _{m}(B_{m}[s_{1}])\) with length n disjoint from a-loop, we grow y-loop so that \(\psi _{m}\) sends its elements to a-chain. Then we copy \(\mathcal {A}\) in \(\mathcal {B}_{m}\) omitting the b-loop until \(p_{e}\) proves to be not an isomorphism. It will happen no later than when all loops with the length n appear in \(\mathcal {B}_{k}\) and \(p_{e}\) converges on all elements of these loops.

If there is no other loop, we do not add elements in \(\mathcal {B}_{m}\) at the next stage \(s_{4}=(t_{3}+1)^{2}\). So \(\mathcal {B}_{s_{4}}=\mathcal {B}_{s_{3}}\), the y-chain does not grow and its length \(\le t_{3}\). Consider \(b=m_{s_{3}}+1\). By the stage \(s_{4}\) we have either a b-chain with a length \(>2t_{3}\) which is bigger than the length of y-chain, or a b-loop. In the first case, we omit the a-loop mapping y-chain to the b-chain. In the second case, we omit the b-loop and define \(\psi _{m}\) to send the y-chain to the a-loop.

Notice that we are able to meet each requirement one at a time. We arrange R-requirements in some effective list. At stage 1 we consider the first requirement on this list. Then begin the strategy as descibed above. Let s be the stage the strategy finishes and begin considering the next requirement at stage \(s+1\).

Note that for any mt if \(\mathcal {B}_{m}[t^{2}]=\mathcal {B}_{m}[(t+1)^{2}]\), then \(\mathcal {B}_{m}[(t+1)^{2}]\ne \mathcal {B}_{m}[(t+2)^{2}]\). In other words, at two consecutive stages of the form \(s=t^{2}\), we add at least one element in \(\mathcal {B}_{m}\). Consequently, we always have \([0, t/2)\subset \mathcal {B}[t^{2}]\). As \(t \mapsto (2t)^{2}\) is primitive recursive, \(\mathcal {B}_{m}\) is primitive recursive too. Therefore, by construction, \(\mathcal {B}_i\) are punctual and every requirement \(R_{e,k,m}\) is met; hence, \(\mathcal {A}\) has infinitely many punctual degrees. \(\square \)

Lemma 2.5

Suppose \(\mathcal {A}\) is an infinite structure with only one unary function symbol f. If there are infinitely many x such that there is no y with \(f(y)=x\) then \(\mathcal {A}\) has infinitely many punctual degrees.

Proof

Let \(p_{0}, p_{1},\ldots \) be an effective list of all primitive recursive functions. We build punctual copies \(\mathcal {B}_{0}, \mathcal {B}_{1},\ldots \) of \(\mathcal {A}\) and meet the following requirements:

$$\begin{aligned}R_{e,k,m}: ~p_{e}:\mathcal {B}_{k}\rightarrow \mathcal {B}_{m} \text { is not an isomorphism, } k<m.\end{aligned}$$

Then \(\mathcal {B}_{k}\nleq _{pr}\mathcal {B}_{m}\) for every \(k<m\), thus there are infinitely many punctual degrees of \(\mathcal {A}\).

At each stage s we work with a finite number of structures \(\mathcal {B}_{0},\ldots , \mathcal {B}_{s}\). Let \(\mathcal {B}_{i}[s]\) be a finite part of \(\mathcal {B}_{i}\) constructed by stage s. We also construct computable isomorphisms \(\psi _{i}: \mathcal {B}_{i}\rightarrow \mathcal {A}\). We use f, \(f_{k}\) and \(f_{m}\) for the function symbols in \(\mathcal {A}\), \(\mathcal {B}_{k}\) and \(\mathcal {B}_{m}\), respectively.

We arrange R-requirements in some effective list. Unless the current stage is 0, assume that some R-requirement in this list was met at previous stage \(s-1\). Let \(R_{e,k,m}\) be the next requirement in our list.

Stage s. Let \(\mathcal {B}_{k}\) continue copying \(\mathcal {A}\). In \(\mathcal {B}_{m}\), copy elements \(x\in \mathcal {A}[s]\) such that there is \(y\in \mathcal {A}[s]\) with \(f(y)=x\). The elements that do not yet have pre-images in \(\mathcal {A}[s]\) will be omitted until we meet the requirement. \(p_e\) must eventually show disagreement as there are infinitely many elements in \(\mathcal {A}\) with no pre-image. Once we see disagreement, enumerate all omitted elements to \(\mathcal {B}_m\) and move to the next stage.

For every element x omitted from \(\mathcal {B}_m\) we copy f(x) into \(\mathcal {B}_{m}\). Then there is primitive recursive delay in the enumeration of a new element in \(\mathcal {B}_m\); hence \(\mathcal {B}_m\) is punctual. \(\square \)

Theorem 2.6

Suppose \(\mathcal {A}\) is an infinite structure with only one unary function symbol f. If \(\mathcal {A}\) is not punctually categorical then \(\mathcal {A}\) has infinitely many punctual degrees.

Proof of Theorem 2.6

By Lemmas 2.1-2.5, we are left with the case that the following hold for \(\mathcal {A}\):

  1. (1)

    For every \(x\in \mathcal {A}\) there are \(n<m\) such that \(f^{n}(x)=f^{m}(x)\);

  2. (2)

    There is no \(x\in \mathcal {A}\) for which there are infinitely many \(y\in \mathcal {A}\) with \(f(y)=x\);

  3. (3)

    There is no n such that \(\mathcal {A}\) contains infinitely many loops of size n;

  4. (4)

    There are infinitely many elements which are not part of a loop;

  5. (5)

    For almost every \(x\in \mathcal {A}\) there is a y such that \(f(y)=x\).

By (5) there is an infinite backward chain \(z_{0}, z_{1}, \ldots \) such that \(f(z_{i+1})=z_{i}\). Now there is a u such that \(\forall x(\exists n (f^{n}(x)=z_{u}) \rightarrow \exists y (f(y)=x)).\) In other words, any element of the \(z_{u}\)-chain has a predecessor.

We build punctual copies \(\mathcal {B}_{i}\cong \mathcal {A}\) such that they satisfy the following requirements:

$$\begin{aligned}R_{e,k,m}: ~p_{e}:\mathcal {B}_{k}\rightarrow \mathcal {B}_{m} \text { is not an isomorphism, } k<m.\end{aligned}$$

Suppose we consider \(R_{e,k,m}\) at stage s. We may assume that \(z_{0}, z_{1}, \ldots , z_{u}\) are already enumerated in \(\mathcal {B}_{k}\) and \(\mathcal {B}_{m}\). \(\mathcal {B}_{k}\) continues copying \(\mathcal {A}\). At first, in \(\mathcal {B}_{m}\) we construct a substructure generated by \(\mathcal {B}_{m}[s]\) and then we only grow a forward chain \(x_{0}, x_{1}, \ldots \) with \(f_{m}(x_{i})=x_{i+1}\). We look for \(z\in \mathcal {B}_{k}\) such that \(p_{e}(z)\notin \mathcal {B}_{m}[s]\). We wait for \(p_{e}(z)\) to be enumerated in \(\mathcal {B}_{m}\) and evaluate \(f_{k}^{n}(z)\) until \(f_{k}^{n}(z)= f_{k}^{n'}(z)\) for some \(n<n'\). We grow the chain \(x_0, x_1, \dots \) so that \(f^{n}_{m}(p_{e}(z))\) is defined. Let \(x_{t}\) be the last element of the chain. Then we pick any element w of \(z_{u}\)-chain such that it does not have a predecessor yet and define \(f(x_{t})=w\). Note that \(f_{m}^{n}(p_{e}(z))\) will never be an element of any loop. Then, \(p_{e}\) is not an isomorphism. Since w belongs to some \(z_{u}\)-chain, then an element isomorphic to w in \(\mathcal {A}\) belongs to an infinite backward chain. So, we can keep \(\mathcal {B}_{m}\) isomorphic to \(\mathcal {A}\). \(\square \)

2.2 Graphs

Recall that we are working on the proof for Theorem 1.1. As with the previous section we begin with some technical lemmas for graphs.

Lemma 2.7

Suppose a graph G becomes locally finite after removing finitely many vertices but not almost anti-clique (i.e. there is no collection of finitely many vertices that can be removed to make G anti-clique). Then G has infinitely many punctual degrees.

Proof

Let \(\bar{a}=(a_{0},a_{1},\ldots , a_{n})\) be a tuple consisted of all exceptional nodes and \(G'=G\backslash \bar{a}\). Each \(x\in G'\) has an \(\bar{a}\)-colour, which is the configuration of the form

$$\begin{aligned}(x,a_{1})\in E(G), (x,a_{2})\not \in E(G),\ldots \end{aligned}$$

that is, the relation induced by the edge relation w.r.t. the fixed finite tuple. There must be some \(\bar{a}\)-colour such that infinitely many elements in G have such colour. Let S be the set of all nodes of this colour. We assume that there are infinitely many pairs of nodes (xy) such that there is a path between x and y. Otherwise, almost every component of G is singleton and G becomes anti-clique after removing finitely many vertices.

Let \(p_{0}, p_{1},\ldots \) be an effective list of all primitive recursive functions. We build punctual copies \(\mathcal {B}_{0}, \mathcal {B}_{1},\ldots \) of \(G'\) and isomorphisms \(\psi _{i}: G \rightarrow \mathcal {B}_{i}\). At each stage s we work with a finite number of structures \(\mathcal {B}_{0},\ldots , \mathcal {B}_{s}\). Let \(\mathcal {B}_{i}[s]\) be a finite part of \(\mathcal {B}_{i}\) constructed by stage s and \(\mathcal {B}_{s}[s]=\{\bar{a}\}\). We build \(\mathcal {B}_{i}\) so that \(\mathcal {B}_{i}[s]=\psi _{i}[s](G)\cup U_{i}[s]\), where \(U_{i}[s]=\{u_{i,n}, \ldots , u_{i,l}\}\), \(n\le l\), is a finite independent set of nodes that have the same \(\bar{a}\)-colour as elements from S and for every \(x\in {{\,\text {dom}\,}}(\psi _{i}[s])\), \(\psi _{i}(x)\) is not connected to any element from \(U_{i}[s]\).

Our construction meets the following requirements:

$$\begin{aligned}R_{e,k,m}&:&~p_{e}:\mathcal {B}_{k}\rightarrow \mathcal {B}_{m} \text { is not an isomorphism, } k<m;\\ Q_{i,n}&:&~ u_{i,n}\in {{\,\textrm{range}\,}}(\psi _{i})[s] \text { at some stage } s. \end{aligned}$$

We arrange R-requirements and Q-requirements in some effective list. Unless the current stage is 0, assume that some R or Q-requirement was met at previous stage \(s-1\).

The strategy for \(R_{e,k,m}\). Let \(\mathcal {B}_{k}\) continue copying G, meanwhile, in \(\mathcal {B}_{m}\), freeze the definition of \(\psi _{m}\) and add only new independent nodes

$$\begin{aligned}u_{m,n}, u_{m, n+1},\ldots \end{aligned}$$

in \(U_{m}\). Wait for some yz to appear in \(\mathcal {B}_{k}\) such that there is a path \(b_{0}=~y, b_{1},\ldots ,\) \(b_{t}=z\) between them and \(p_{e}(y)=u_{m, n'}\), \(p_{e}(z)=u_{m, l'}\) for some \(l'>n'\ge n\). It will eventually happen because there are infinitely many pairs of nodes connected with a path and \(G'\) is locally finite. Then wait for \(p_{e}\) to converge on all \(b_{i}\) and every \(p_{e}(b_{i})\) to appear in \(\mathcal {B}_{m}\). Since \(p_{e}(b_{t})=u_{m, l'}\) is not connected to \(p_{e}(b_{t-1})\), \(p_{e}\) cannot be an isomorphism. Proceed to the next requirement.

The strategy for \(Q_{i,n}\). Let (in) be the least such that \(Q_{i,n}\) has not been met yet.

  1. (1)

    Initiate the enumeration of fresh independent elements into \(U_{i}\).

  2. (2)

    Freeze the definition of \(\psi _{i}\).

  3. (3)

    Wait for \(x\in S\) such that the subgraph generated by \({{\,\textrm{dom}\,}}(\psi _{i}) \cup \{x\} \cong \mathcal {B}_{i}[s] \cup \{u_{i,n}\}\). Such an x will appear in G since \(G'\) is locally finite. Declare that \(\psi _{i}(x)=u_{i,n}\) and delete \(u_{i,n}\) from \(U_{i}\).

The \(Q_{i,n}\)-requirement is met. Proceed to the next requirement. \(\square \)

Claim

Every \(\mathcal {B}_{i}\) is punctual.

Proof

At every stage of the construction, beginning with a stage \(s=i\), a new element enters \(\mathcal {B}_{i}\). Therefore, without loss of generality, we can assume that the domain of \(\mathcal {B}_{i}\) is \(\omega \). At stage \(x+i\) we decide E(xy) for all \(y<x\); hence by construction there is no delay in definitions of \(\mathcal {B}_{i}\), so \(\mathcal {B}_{i}\) is punctual. \(\square \)

Claim

Every \(R_{e,k,m}\) is met.

Proof

By the assumption on the isomorphism type of the graph, there are infinitely many distinct pairs of vertices (xy), where \(x \ne y\) connected with a path. Thus, it follows from the description of the strategy for \(R_{e,k,m}\) that each \(R_{e,k,m}\) is met. \(\square \)

It is clear by construction that \(Q_{i,n}\) is met and every \(\psi _{i}\) is an isomorphism from G onto \(\mathcal {B}_{i}\). Therefore all requirements are met; hence G has infinitely many punctual degrees.

For the next Lemma, we consider the speed of growth of the size of the set of vertices connected to each vertex. We call this set the 1-neighbourhood (1-nbhd) of x, defined as \(N(x)=~\{z:(z,x)\in ~E(G)\}\cup \{x\}\).

Lemma 2.8

Suppose G is a punctual graph, and assume that \(\deg (x)=\infty \) for some \(x\in G\). If N(x) does not grow rapidly (i.e. there is no primitive recursive time-function f such that \(|N(x)[s]|<|N(x)[f(s)]|\) for every stage s of the construction), then G has infinitely many punctual degrees.

Proof

Without loss of generality we may assume that \(x=0\). We will build punctual copies \(\mathcal {B}_{0}, \mathcal {B}_{1}, \ldots \) of G such that they meet the following requirements:

$$\begin{aligned}R_{i,j,k,m}: (p_{i},p_{j}) \text { is not a punctual isomorphism between } \mathcal {B}_{k} \text { and } \mathcal {B}_{m} k<m\end{aligned}$$

At every stage s, we construct only finitely many structures \(\mathcal {B}_{0}, \mathcal {B}_{1}, \ldots , \mathcal {B}_{s}\). Let \(\mathcal {B}_{i}[s]\) be a finite part of \(\mathcal {B}_{i}\) constructed by stage s, and \(\mathcal {B}_{i}[s] =\emptyset \) for all \(i<s\), \(\mathcal {B}_{i}[s] = \{0, \ldots ,s\}\) for \(i \le s\). We also construct computable isomorphisms \(\psi _{i}: G \rightarrow \mathcal {B}_{i}\). Let \(\psi _{s}[s](0) = 0\).

Arrange all requirements in some effective list. We meet requirements one at a time, so at each stage we have only one requirement \(R_{i,j,k,m}\) that we are currently working on. When we have met the requirement we will move to the next requirement on this list. We have met the requirement once we see that \((p_i,p_j)\) is not a punctual isomorphism. Before we move to the next requirement we define \(\psi _k\) and \(\psi _m\) on any elements we have been keeping out of the structure so far.

We now describe the strategy to meet each requirement. First wait for \(p_{i}\) to converge on 0 and \(p_{i}(0)\) to appear in \(B_{m}\). Let \(y=\psi _{m}^{-1}(p_{i}(0))\). To diagonalise against \(R_{i,j,k,m}\) we try to keep \(|\psi _{k}(N(0))|\ne |\psi _{m}(N(y))|\). If \(|N(0)|=|N(y)|\), then wait for a stage s when a new element z is enumerated into either N(0) or N(y). If \(z\in N(0)\cap N(y)\), then keep this point out of the structure \(\mathcal {B}_{k}\).

Let \({\texttt {time}}(e,t)\) be the primitive recursive function which is equal to the number of steps which \(p_{e}\) takes to converge on \(\{n| ~ n\le t\}\). Now we have the following cases:

Case 1 If \(|\psi _{k}(N(0))| < |\psi _{m}(N(y))|\). Let \(s+1\) be the current stage. Initiate computing \(p_{j}\) on all elements from \(\mathcal {B}_{m}\). Meanwhile continue copying G into \(\mathcal {B}_{k}\) and \(\mathcal {B}_{m}\) and wait for a stage t when some element v appears in N(0) such that \(|N(0)[t]|=|N(y)[s]|\) (it may be the case that v is already defined at the previous stage s). Keep v out of the domain of \(\psi _{k}\) and wait for a stage r when another element u is enumerated in N(0). The vertices u and v must appear within \(\texttt {time}(j,s)\) steps, otherwise \(p_{j}\) is not an isomorphism. Define \(\psi _{k}\) on v, and also on u if only \(|N(0)[r]|\ne |N(y)[r]|\); otherwise keep u out of domain \(\psi _{k}\). Go to case 1 or 2 depending on whether \(|\psi _{k}(N(0))| < |\psi _{m}(N(y))|\) or \(|\psi _{k}(N(0))| > |\psi _{m}(N(y))|\).

Case 2 If \(|\psi _{k}(N(0))| > |\psi _{j}(N(y))|\). Do the same as in case 1 expect switch the roles of m and k, i and j as well as 0 and y.

Verification Now we prove that this strategy works. Suppose we do not meet requirement \(R_{i,j,k,m}\); then we never move on from this requirement. Let s be the stage we start considering requirement \(R_{i,j,k,m}\), and let \(t\ge s\). We have two cases:

Case 1 \(|\psi _{k}(N(0))[t]| < |\psi _{m}(N(y))[t]|\). Then by construction N(0) grows within \({\texttt {time}}(i,t)\) stages.

Case 2 \(|\psi _{k}(N(0))[t]| > |\psi _{m}(N(y))[t]|\). Then by constuction we grow |N(y)|, this process finishes within \({\texttt {time}}(j,t)\) stages. If N(0) has not grown during this process then we are now in case 1 and grow N(0) within \({\texttt {time}}(i,{\texttt {time}}(j,t))\) stages. So in either case N(0) grows within \({\texttt {time}}(i,{\texttt {time}}(j,t))\) stages.

Then this gives us a primitive recursive bound on the stages where |N(0)| grows. But this contradicts the assumption that |N(0)| does not grow rapidly. Thus, all requirements and met and so G has infinitely many punctual degrees. \(\square \)

Lemma 2.9

Let G be a punctual graph. If N(x) grows rapidly and \(\deg (x)=\infty \) for some \(x \in G\), but x is not connected to almost every vertex in G. Then G has infinitely many punctual degrees.

Proof

We can produce a punctual copy H of G via some primitive recursive \(\psi \), such that \(H\backslash N_{H}(\psi (x))\) grows slowly. Then by the previous lemma to graph-theoretic complement of H we can build infinitely many punctual copies of G. \(\square \)

Proposition 2.10

Let G be a punctual graph.

  • Suppose G has infinitely many vertices of infinite degree and each of them has a finite co-degree. Then for each \(n \in \omega \), there are only finitely many vertices of degree n;

  • Suppose G has infinitely many vertices of finite degree. Then for each \(n \in \omega \), there are only finitely many vertices of co-degree n.

Proof

For each \(n\in \omega \), fix any \(n + 1\) distinct vertices of infinite degree. Since the co-degree of these vertices are finite, almost every vertex in G is adjacent to all of them. Then almost every vertex in G has degree at least \(n + 1\), hence finitely many vertices have degree n.

The second statement follows from the first one. \(\square \)

Proposition 2.11

([16]) Let G be a punctual graph. Suppose N(x) grows rapidly and G has infinitely many vertices of infinite degree and infinitely many vertices of finite degree. For each \(v \in G\), consider the graph \((G-v)\) obtained by removing the vertex v from G. Then \(G \not \cong (G-v)\).

Theorem 2.1

Let G be an undirected infinite punctual graph. If it is not punctually categorical, then it has infinitely many punctual degrees.

Proof

Let G be a punctual graph. By Lemma 2.8 we only need to work on the case where the 1-nbhd of x grows rapidly. Similarly, by Lemma 2.7 we may assume that G has infinitely many vertices of infinite degree and by Lemma 2.9 every such vertex is connected to almost every vertex in G. It also follows from Lemmas 2.7 and 2.9 thatwe can assume that G has infinitely many vertices of finite degree. Indeed, suppose there are only finitely many vertices of finite degree. Then the graph-theoretic complement of G becomes a locally finite graph after removing a finite number of vertices and we can apply Lemma 2.7. Then Proposition 2.10 holds and for each \(n\in \omega \), there are only finitely many vertices of degree n and there are only finitely many vertices of co-degree n. With Proposition 2.11 we can diagonalise against \(p_{e}:\mathcal {B}_{k}\rightarrow \mathcal {B}_{m} \) by delaying the enumeration of some vertex v in \(\mathcal {B}_{m}\). By the stage when all vertices of the same degree or of the same co-degree appear in \(\mathcal {B}_{k}\) and \(p_{e}\) converges on all such elements and at this stage we will see a disagreement and we can enumerate v into \(\mathcal {B}_m\). This process is punctual and so we can successfully diagonalise; hence G has infinitely many punctual degrees. \(\square \)

3 The integers and almost rigid structures

In this section we prove Theorem 1.2

3.1 The order of the integers

Theorem 3.1

The punctual degrees of the order \((\mathbb {Z}, < )\) are dense.

First we show that the above theorem is meaningful by proving the following Lemma.

Lemma 3.2

There exist punctual copies \(\mathcal {A}\) and \(\mathcal {B}\) of structure \((\mathbb {Z},<)\) such that \(\mathcal {A}<_{pr}\mathcal {B}\).

Proof

We build \(\mathcal {A}\) and \(\mathcal {B}\) such that there is a primitive recursive isomorphism \(\varphi : \mathcal {A}\rightarrow \mathcal {B}\) but there is no primitive recursive isomorphism \(\psi : \mathcal {B}\rightarrow \mathcal {A}\). Our construction meets the following requirements:

$$\begin{aligned}R_{e}: p_{e}:\mathcal {B} \rightarrow \mathcal {A}\text { is not an isomorphism}.\end{aligned}$$

We meet requirements one at a time; hence we start with requirement \(R_0\) and move to the next requirement once we have met the current one. We now describe the strategy for each requirement.

The strategy for \(R_e\): Let \(\mathcal {A}\) and \(\mathcal {B}\) copy \((\mathbb {Z},<)\) as well as add a new large \(k>0\) into \(\mathcal {B}\). We declare that \(k>x\) for every \(x\in \mathcal {B}[s]\) as well as every x that is copied into \(\mathcal {B}\) while we are still working on this strategy. During this strategy define \(\varphi \) on elements in \(\mathcal {A}\) in the natural way, noting that \(\mathcal {B}\) currently has one extra element and so we will need to recover this later. Let \(m\in \mathcal {B}[s]\), \(m\ne k\). We wait for \(p_e(k)-p_e(m)\) elements to appear in \(\mathcal {B}\) between m and k. Once this happens we have met requirement \(R_e\). Before we move to the next requirement we enter a recovery stage. Let n be the biggest integer less than k introduced in \(\mathcal {B}\) so far, we declare that there is no \(x\in \mathcal {B}\) such that \(n<x<k\). Add one more positive element bigger than all elements enumerated into \(\mathcal {A}\) so far, call x, and define \(\varphi (x)=k\) and define \(\varphi \) to be isomorphic. Proceed to the next requirement.

By construction, \(\mathcal {A}\) and \(\mathcal {B}\) are a punctual copies of \((\mathbb {Z},<)\). When a < is defined for a new element in \(\mathcal {A}\) we immediately define \(\varphi \) on this element; hence \(\varphi \) is primitive recursive. Therefore \(\mathcal {A}<_{pr}\mathcal {B}\) as desired. \(\square \)

Proof of Theorem 3.1

Let \(\mathcal {A}\) and \(\mathcal {B}\) be any punctual copies of \((\mathbb {Z}, < )\) such that \(\mathcal {A}<_{pr}\mathcal {B}\). To show that punctual degrees of \((\mathbb {Z}, < )\) are dense we construct a punctual copy \(\mathcal {C}\) of \((\mathbb {Z}, < )\) such that there are primitive recursive \(\varphi : \mathcal {A}\rightarrow \mathcal {C}\) and \(\psi :\mathcal {C}\rightarrow \mathcal {B}\) and there are no primitive recursive isomorphisms from \(\mathcal {C}\) to \(\mathcal {A}\) and \(\mathcal {B}\) to \(\mathcal {C}\).

Let \(p_{0}, p_{1}, \ldots \) be some effective enumeration of all primitive recursive functions. Since \(\mathcal {A}<_{pr}\mathcal {B}\) there is a primitive recursive isomorphism \(f: \mathcal {A}\rightarrow \mathcal {B}\) and there is no primitive recursive isomorphism from \(\mathcal {B}\) to \(\mathcal {A}\).

Our construction meets the following requirements:

$$\begin{aligned}R_{e}: p_{e}:\mathcal {B} \rightarrow \mathcal {C}\text { is not an isomorphism}; \end{aligned}$$
$$\begin{aligned}Q_{e}: p_{e}:\mathcal {C} \rightarrow \mathcal {A}\text { is not an isomorphism.}\end{aligned}$$

Construction We arrange R-requirements and Q-requirements in some effective list. At the start of each stage, if there is a requirement that requires attention, attend to the least such requirement, otherwise begin consider the least requirement on the list that has not yet been considered.

For each element z in a punctual copy of \((\mathbb {Z},<)\) let \(z^+_s\) be the least element so that \(z<z^+\) at stage s. We remove the subscript when it is just the current stage.

The strategy for \(R_{e}\): Let s be the stage that we begin considering requirement \(R_e\). Let \(\mathcal {C}\) continue copying \(\mathcal {A}\). If there is \(b_{0}\in \mathcal {B}[s]\) such that \(\psi (p_{e}(b_{0}))= b_{0}\), then wait for some \(b_{1}\) to appear in \(\mathcal {B}\) such that \(\psi (p_{e}(b_{1}))\ne b_{1}\). Such an element must appear, otherwise there is some primitive recursive isomorphism from \(\mathcal {B}\) onto \(\mathcal {A}\). Once \(b_{1}\) appears, it immediately follows that \(p_{e}\) is not an isomorphism, \(R_e\) never requires attention after this stage.

If we have \(b_{0},b_{1} \in \mathcal {B}\) such that \(\psi (p_{e}(b_{0}))< b_{0}\) and \(\psi (p_{e}(b_{1}))> b_{1}\) then \(p_{e}\) cannot be an isomorphism, \(R_e\) never requires attention after this stage.

If neither of the previous cases hold, then without loss of generality we may assume that for every \(b\in \mathcal {B}\) \(b<\psi (p_{e}(b))\), as in Fig. 1. \(\square \)

Fig. 1
figure 1

\(p_e:\mathcal {B}\rightarrow \mathcal {C}\) and \(\psi :\mathcal {C}\rightarrow \mathcal {A}\) in the case that for all \(b\in \mathcal {B}\), \(b<\psi (p_e(b))\)

Fix some \(d\in \mathcal {B}[s]\) at stage s, recall that stage s is the first stage we begin considering requirement \(R_e\). Wait for a stage \(t_0\ge s\) such that there is \(b\ge d\) such that \(p_{e}(b)^{+}<p_{e}(b^{+})\), as in Fig. 2. At this stage we declare \(R_e\) to be temporarily diagonalised and move on to the next requirement. If there is no stage where \(p_e(b)^+\) is in the range of \(p_e\) then we are done because \(p_e\) is not surjective and hence not an isomorphism. In this case we will never return to \(R_e\). So consider the case where there is a stage eventually \(p_e(b)^+\) is in the range of \(p_e\). At this stage, \(R_e\) requires attention.

Fig. 2
figure 2

b and \(b^+\) with \(p_e(b)^+\)

Suppose it is the ith time we have attended to \(R_e\). If it is now the case that we have \(b_{0},b_{1} \in \mathcal {B}\) such that \(\psi (p_{e}(b_{0}))< b_{0}\) and \(\psi (p_{e}(b_{1}))> b_{1}\) then clearly \(p_{e}\) cannot be an isomorphism. Otherwise, wait for another stage \(t_i\ge t_{i-1}\) such that there is another \(b\ge d\) such that \(p_{e}(b)^{+}<p_{e}(b^{+})\), as in Fig. 2.

The strategy for \(Q_e\): Use the same strategy as for \(R_e\), switching the roles so that \(\mathcal {C}\) copies \(\mathcal {B}\) and we consider \(p_e(\varphi (a))\) with \(a\in \mathcal {A}\) instead of \(\psi (p_e(b))\) for \(b\in \mathcal {B}\). We will fix an element \(d\in \mathcal {C}[s]\) from when we first begin considering \(Q_e\) and wait for stages \(t_i\ge t_{i-1}\) where there is \(c\ge d\) such that \(p_{e}(c)^{+}<p_{e}(c^{+})\). At this stage we declare \(Q_e\) to be temporarily diagonalised.

Verification By construction \(\mathcal {C}\) is a punctual copy of \((\mathbb {Z},<)\) since we either copy \(\mathcal {A}\) or \(\mathcal {B}\). By construction it is also the case that \(\varphi \) and \(\psi \) are primitive recursive isomorphisms.

Lemma 3.3

If \(R_e\) (or \(Q_e\)) requires attention, then either the requirement never requires attention again or the requirement is eventually declared temporarily diagonalised. If we are in the case where we have for all \(b\in \mathcal {B}\) \(b<\psi (p_{e}(b))\), then the requirement is eventually labelled

Proof

We will consider the case where the requirement is an R-requirement, the Q-requirement case follows from this.

\(R_e\) requires attention, so it is the case that \(b\in \mathcal {B}\) \(b<\psi (p_{e}(b))\). If \(R_e\) is declared to never require attention again we are done. Now suppose \(R_e\) is never declared temporarily diagonalised, then there is no stage \(t\ge s\) such that there is \(b\ge d\) such that \(p_{e}(b)^{+}<p_{e}(b^{+})\). Then there is \(n_{0}\in \mathbb {Z}^{+}\) such that \(p_{e}(x)=\psi ^{-1}(x)+n_{0}\) for all \(x\ge d\).

Since \(\forall b\in \mathcal {B}\) \(\psi ^{-1}(b)<p_{e}(b)\), then there is some least z such that \(p_{e}(z)^{+}<p_{e}(z^{+})\). Then there is some \(n_{1}\in Z^{+}\) such that for every \(x\le z\) \(p_{e}(x)=\psi ^{-1}(x)+n_{1}\).

Now we show that \(\theta (x)=\psi ^{-1}(x)+n_{0}n_{1}\) is a punctual reduction from \(\mathcal {B}\) to \(\mathcal {C}\). It is certainly a bijective order preserving map. We have to check that it is punctual.

For all x sufficiently smaller than d, note that

$$\begin{aligned}p_{e}(\psi p_{e})^{k}(x)=\psi ^{-1}(x)+(k+1)n_{1}.\end{aligned}$$

So therefore,

$$\begin{aligned}\psi ^{-1}(x)+n_{0}n_{1}=p_{e}(\psi p_{e})^{n_{0}-1}(x).\end{aligned}$$

If x larger than d, then

$$\begin{aligned}\psi ^{-1}(x)+n_{0}n_{1}=p_{e}(\psi p_{e})^{n_{1}-1}(x).\end{aligned}$$

All other finitely many x in between map non-uniformly. So \(\psi ^{-1}(x)+n_{0}n_{1}\) is a punctual isomorphism from \(\mathcal {B}\) to \(\mathcal {C}\). Contradiction. \(\square \)

Lemma 3.4

For every requirement, there is a stage where it will never require attention after this stage.

Proof

Consider an R-requirement \(R_e\), it is clear that the proof for \(Q_e\) follows in the same way.

Let r be a stage where we attend to \(R_e\). Let \(t<r\) be the stage we last attended to \(R_e\). Let b and \(b^*\) be the adjacent elements found at stage t such that \(p_{e}(b)^{+}<p_{e}(b^{*})\). We are attending to \(R_e\) again because \(p_{e}(b)^{+}\) is now in the range of \(p_e\). Let \(b_0=d\) then let \(b_i=(b_{i-1})^+_t\) until we get to \(b_n=b\) and \(b_{n+1}=b^*\), see Fig. 3. \(\square \)

Fig. 3
figure 3

The sequence \(b_i\) with \(b_n=b\) and \(b_{n+1}=b^*\) for \(p_e(b)^+\)

Now since \(p_{e}(b)^{+}\) is in the range of \(p_e\) at stage r, a new element must have been enumerate into \(\mathcal {B}\) in between \(b_n\) and \(b_{n+1}\). Then since \(\mathcal {A}\) and \(\mathcal {B}\) are both punctual copies of \((\mathbb {Z},<)\), eventually this new element will also show up in \(\mathcal {A}\) and hence must eventually show up in \(\mathcal {C}\) since we are always either copying \(\mathcal {A}\) or \(\mathcal {B}\). So eventually there is a new element in \(\mathcal {C}\) between \(\psi ^{-1}(b_n)\) and \(\psi ^{-1}(b_{n+1})\) which corresponds to \(R_e\) requiring attention at stage r.

Now we show that there must be a new element in \(\mathcal {C}\) between \(\psi ^{-1}(d)\) and \(p_e(d)\) that corresponds to \(R_e\) requiring attention at stage r. Suppose not. Let i be least such that there is a new element c enumerated into \(\mathcal {C}\) between \(\psi ^{-1}(b_i)\) and \(\psi ^{-1}(b_{i+1})\). By assumption \(\psi ^{-1}(b_i)\ge p_e(d)\) and \(b_i\le b_n\). Since \(p_e(b_i)>\psi ^{-1}(b_i)\) and at stage t, \(\psi ^{-1}(b_i)\) and \(\psi ^{-1}(b_{i+1})\) were adjacent, then \(p_e(b_i)\ge \psi ^{-1}(b_{i+1})\). Therefore \(c<p_e(b_i)\), but then \(p_e^{-1}(c)\) must be between d and \(b_i\). This must be a new element in \(\mathcal {B}\). Then there must eventually be a new element in \(\mathcal {C}\) so that \(\psi (c^*)=p_e^{-1}(c)\) and this lies between \(\psi ^{-1}(d)\) and \(\psi ^{-1}(b_i)\), contradicting the minimality of i.

Hence we have shown that every time \(R_e\) requires attention, a new point must be enumerated between \(\psi ^{-1}(d)\) and \(p_e(d)\). Since \(\mathcal {C}\) is a copy of \((\mathbb {Z},<)\) this will only happen finitely many times. Therefore, \(R_e\) requires attention finitely often.

For every requirement there is a stage where it never requires attention again; hence for all requirement there is a stage where it is met. Therefore the punctual degrees of \((\mathbb {Z},<)\) are dense.

It is not hard to see that the punctual degrees of the structure \((\mathbb {Z},<)\) has no greatest and no least element. On the other hand \(PR(\mathbb {N},<)\) has the least but no greatest element, while \(PR(\mathbb {Q},<)\) has the greatest but no least element. We leave open the following question:

Question 3.5

Describe the linear orders \(\mathcal {L}\) such that \(PR(\mathcal {L})\) is dense. Describe the linear orders \(\mathcal {L}\) such that \(PR(\mathcal {L})\) has the greatest (or the least) element.

3.2 Almost rigid structures

Definition 3.6

Let \(\mathcal {M}\) be a structure such that there is a computable procedure that given any presentation \(\mathcal {A}\) of the structure \(\mathcal {M}\) and any pair of elements \(x,y\in \mathcal {A}\) it either returns a computable index of the unique automorphism of this presentation that maps x into y, or returns \(-1\) if there is no such an automorphism. Then we say that the structure \(\mathcal {M}\) is computably almost rigid.

Proposition 3.7

Let \(\mathcal {M}\) be a computably almost rigid structure with the domain \(\omega \). Then the punctual degrees of \(\mathcal {M}\) are dense.

Proof

Let \(\mathcal {A}\) and \(\mathcal {B}\) be any punctual copies of \(\mathcal {M}\) such that \(\mathcal {A}<_{pr}\mathcal {B}\). To show that punctual degrees of \(\mathcal {M}\) are dense we construct a punctual copy \(\mathcal {C}\) of \(\mathcal {M}\) such that there are primitive recursive isomorphisms \(\varphi : \mathcal {A}\rightarrow \mathcal {C}\) and \(\psi :\mathcal {C}\rightarrow \mathcal {B}\) and there are no primitive recursive isomorphisms from \(\mathcal {C}\) to \(\mathcal {A}\) and \(\mathcal {B}\) to \(\mathcal {C}\).

Let \(p_{0}, p_{1}, \ldots \) be some effective enumeration of all primitive recursive functions. Since \(\mathcal {A}<_{pr}\mathcal {B}\), there is a primitive recursive isomorphism from \(\mathcal {A}\) to \(\mathcal {B}\), call f and there is no primitive recursive isomorphism from \(\mathcal {B}\) to \(\mathcal {A}\).

Our construction aims to meet the following requirements:

$$\begin{aligned}R_{e}&:&p_{e}:\mathcal {B} \rightarrow \mathcal {C} \text { is not isomorphism;}\\ Q_{e}&:&p_{e}:\mathcal {C} \rightarrow \mathcal {A} \text { is not isomorphism;}\end{aligned}$$

while also defining primitive recursive isomorphisms \(\varphi : \mathcal {A}\rightarrow \mathcal {C}\) and \(\psi :\mathcal {C}\rightarrow \mathcal {B}\).

To meet \(R_{e}\) we find \(b\in \mathcal {B}\) such that either there is no automorphism q that maps b into \(\psi (p_{e}(b))\), or \(\psi (p_{e}(b))= q(b)\) and there exists \(b'\) such that \(\psi (p_{e}(b'))\ne q(b')\) for the unique automorphism q that maps b into \(\psi (p_{e}(b))\). Indeed, suppose that \(\psi :\mathcal {C}\rightarrow \mathcal {B}\) and \(p_{e}:\mathcal {B} \rightarrow \mathcal {C}\) are isomorphisms. Then \(\psi (p_{e})\) is an automorphism from \(\mathcal {B}\) onto \(\mathcal {B}\). So in the former case we get a contradiction to \(\psi (p_{i})\) being an automorphism, and the latter case contradicts to the uniqueness of q. Similarly we meet \(Q_{e}\) by finding \(c\in \mathcal {C}\) such that either there is no automorphism q that maps c into \(\varphi (p_{i}(c))\), or \(\varphi (p_{i}(c))= q(c)\) and there exists \(c'\) such that \(\varphi (p_{i}(c'))\ne q(c')\) for the unique automorphism q that maps c into \(\varphi (p_{i}(c))\).

Construction We arrange R-requirements and Q-requirements in some effective list. We meet requirements one at a time; hence we begin with the first requirement on our list and if the current requirement is met at stage s then we move to the next requirement on our list at the next stage. Apply the strategy of the current requirement we are working on.

The strategy for \(R_e\): For every element \(b\in \mathcal {B}[s]\), compute \(p_{e}(b)\). First compute the unique automorphism that maps b to \(\psi (p_e(b))\), if this does not exist then we are done, proceed to the next requirement. Otherwise let q be the unique automorphism. Wait for an element \(b'\in \mathcal {B}\) such that \(\psi (p_{e}(b'))\ne q(b')\). Meanwhile do the following: for every new element \(a\in \mathcal {A}[s]\), compute f(a). If there is \(c\in \mathcal {C}[s]\) such that \(\varphi ^{-1}(c)\) is undefined then do the following: if \(\psi (c)[s]=f(a)\) for some \(a\in \mathcal {A}[s]\) then define \(\varphi (a)=c\). Otherwise, take a new element \(c\in \mathcal {C}\) and define \(\varphi (a)=c\) and \(\psi (c)=f(a)\). Once \(p_{e}\) shows a disagreement, proceed to the next requirement. In Lemma 3.8 we show that this eventually must happen.

The strategy for \(Q_{e}\): For every element \(c\in \mathcal {C}[s]\), compute \(p_{e}(c)\). Compute the unique automorphism that maps c to \(\varphi (p_e(c))\), if this does not exist then we are done, proceed to the next requirement. Otherwise let q be the unique isomorphism. Wait for an element \(c'\in \mathcal {C}\) such that \(\varphi (p_{e}(c'))\ne q(c')\). Meanwhile do the following: If there are \(b\in \mathcal {B}[s]\) such that \(\psi ^{-1}(b)\) is undefined. Introduce a new element in \(\mathcal {C}\) for each of these and map each of these new c onto b. Compute f for every new element \(a \in \mathcal {A}[s]\). Define \(\varphi \) and \(\psi \) so that \(\varphi (a)=\psi ^{-1}(f(a))\). Once \(p_{e}\) shows a disagreement, proceed to the next requirement. \(\square \)

Lemma 3.8

For every \(e\in \omega \) the construction meets \(R_{e}\) and \(Q_{e}\).

Proof

Suppose that we proceed to the requirement \(R_{e}\) at stage s suppose that we never proceed to the next requirement.

Let \(b_{0}=\max \{b\in \mathcal {B}[s]\}\) and \(a_{0}=\max \{f^{-1}(b)|~ b\le b_{0}\}+1\). Note that \(\varphi (x)=x\) for all \(x\ge a_0\) because from this stage onwards we are always copying \(\mathcal {A}\).

Given \(b\in \mathcal {B}\) we compute \(p_e(b)\). If \(p_e(b)\ge \varphi (a_0)\) then output \(p_e(b)\). Otherwise, it must be that \(p_e(b)=c\) for some \(c\in \mathcal {C}[s]\). Then compute \(\varphi (a)\) for all \(a\in \mathcal {A}[s]\), there must exist an \(a^*\) such that \(\varphi (a^*)=p_e(b)\). Output \(a^*\).

This function is primitive recursive since there are only finitely many elements in \(\mathcal {A}[s]\) and \(\varphi \) is primitive recursive so we can compute \(\varphi (a)\) for every element in \(\mathcal {A}[s]\) in bounded time. There must exists \(a^*\) such that \(\varphi (a^*)=p_e(b)\) because \(p_e(b)<\varphi (a_0)\), and since \(\varphi (x)=x\) for all \(x\ge a_0\), and \(\varphi \) is total at every stage \(t\ge s\). Then there is a primitive recursive function from \(\mathcal {B}\) to \(\mathcal {A}\), this contradicts our assumption that \(\mathcal {A}<_{pr}\mathcal {B}\). Hence we must eventually proceed to the next requirement.

Suppose that we proceed to the requirement \(Q_{e}\) at some stage s and suppose we never proceed to the next requirement.

Let \(b_{0}=\max \{b\in \mathcal {B}[s]\}\). Note that \(\psi ^{-1}(b)=b\) for all \(b>b_0\) because from this stage onwards we are always copying \(\mathcal {B}\).

Now given \(b\in \mathcal {B}\), if \(b>b_0\) then \(\psi ^{-1}(b)=b\), so output \(p_e(b)\). Otherwise, we search for c such that \(\psi (c)=b\). It must be that \(\psi (c^*)=b\) for some \(c^*\in \mathcal {C}[s+1]\) since \(b\le b_0\). Output \(p_e(c^*)\).

This is a primitive recursive isomorphism from \(\mathcal {B}\) onto \(\mathcal {A}\), for similiar reasons as for the \(R_e\) case. This contradicts our assumption that \(\mathcal {A}<_{pr}\mathcal {B}\). Hence we must eventually proceed to the next requirement.

We move on from a requirement when we find an element that contradicts the uniqueness of q. Therefore for every requirement, there is a stage where it is met. \(\square \)

Clearly \(\varphi \) and \(\psi \) are primitive recursive isomorphisms by construction and all requirements are met; hence the punctual degrees of \(\mathcal {M}\) are dense.

4 Boolean algebras and 1-decidability

In this section we prove Theorem 1.3. Before we proceed, recall that 1-decidability of a Boolean algebra \(\mathcal {B}\) is equivalent to its computable presentability in the language of Boolean algebras augmented with the atom relation \({\texttt {Atom}}(x)\); we cite [40] for further details. The punctual version of this fact is also true; see [4] where it is carefully verified. Also recall that a computable presentation of a Boolean algebra \(\mathcal {B}\) can be computably presented as a subtree of the full binary tree, where the root represents the element 1 and the nodes of the tree generate the Boolean algebra \(\mathcal {B}\). In the tree representation an atom is represented as a node with no children. This fact is also true in the punctual case. Therefore we will use the tree representations of Boolean algebras for our proofs in this section. We will rely on the following well known result which was first proven by Vaught in his thesis for the atomic case and later extended to all countable Boolean algebras by Remmel [41].

Theorem 4.1

(Remmel-Vaught [41]) Suppose \(\mathcal {B}\) is a countable Boolean algebra with infinitely many atoms \(\{a_i:i\in \mathbb {N}\}\). Let \(\hat{\mathcal {B}}\) be a Boolean algebra obtained from \(\mathcal {B}\) by splitting each atom of \(\mathcal {B}\) a finite number of times, then \(\hat{\mathcal {B}}\) is isomorphic to \(\mathcal {B}\).

Also recall that the 1-atom is the Boolean algebra with elements as the finite and cofinite subsets of the natural numbers. As a tree this can be represented by the tree \(\{0^i1:i\in \mathbb {N}\}\cup \{0^i:i\in \mathbb {N}\}\) where the atoms are exactly the elements in \(\{0^n1;n\in \mathbb {N}\}\). This is just one possible tree representation as we know by Remmel-Vaught, but this is what we will refer to as the ‘nice’ copy. The atomless Boolean algebra is generated by the full binary tree where no element is an atom. The direct sum of a Boolean \(\mathcal {B}_0\oplus \mathcal {B}_1\) is a Boolean algebra which splits into two principal ideals \(I_0\) and \(I_1\) with \(I_0\cap I_1=\{0\}\) so that the former is isomorphic to \(\mathcal {B}_0\) and the latter to \(\mathcal {B}_1\) (where we view the greatest element of \(I_0\) as the identity and the same for \(I_1\)).

We begin to work towards proving Theorem 1.3 with a lemma.

Lemma 4.1

If \(\mathcal {B}\) is a 1-decidable Boolean algebra that is either a 1-atom, atomless or a finite Boolean algebra, then \(\mathcal {B}\) is computably isomorphic to a punctually 1-decidable Boolean algebra \(\mathcal {P}\).

Proof

We have the following 3 cases.

Case 1 \(\mathcal {B}\) is a 1-atom Let \(\mathcal {P}\) be the Boolean algebra the ‘nice’ copy of the 1-atom (as discussed above) with \({\texttt {Atom}}_{\mathcal {P}}(0^i1)=1\) for all \(i\in \mathbb {N}\) otherwise \({\texttt {Atom}}_{\mathcal {P}}(x)=0\). Now we construct the computable isomorphism as follows. Wait until there is an element x that is declared to be an atom in \(\mathcal {B}\) and define \(\psi (1)=x\) and \(\psi (0)=\lnot x\). Then wait for a stage such that another element \(y\in \mathcal {B}\) (\(y\ne x\)) is declared to be an atom. Since \(\mathcal {B}\) is a 1-atom it must be the case that \(y\vee \lnot y=\lnot x\). Now define \(\psi (01)=y\) and \(\psi (00)=\lnot y\). Continue this process. Then \(\psi \) is a computable isomorphism between \(\mathcal {B}\) and \(\mathcal {P}\).

Case 2 \(\mathcal {B}\) is atomless Let \(\mathcal {P}\) be the Boolean algebra generated by the full binary tree (the ‘nice’ copy of the atomless Boolean algebra) with \({\texttt {Atom}}_\mathcal {P}(x)=0\) for all x. Along side the computation of \(\mathcal {B}\) compute the tree that generates \(\mathcal {B}\). Then define \(\psi \) to be the identity on the full binary tree. This gives us an isomorphism between the trees that generate \(\mathcal {B}\) and \(\mathcal {P}\); hence a computable isomorphism between \(\mathcal {B}\) and \(\mathcal {P}\).

Case 3 \(\mathcal {B}\) is a finite Boolean algebra Let \(\mathcal {B}\) be the finite Boolean algebra with exactly n atoms. Then define \(\mathcal {P}\) to be a finite Boolean algebra with exactly n atoms. Let \(a_1,...,a_{n}\) be the atoms of P. Wait for the stage where an element in \(\mathcal {B}\) is declared to be an atom, call x. Define \(\psi (a_1)=x\) and \(\psi (\lnot a_1)=\lnot x\). Wait for another element in \(\mathcal {B}\) to be declared an atom, call y. Since \(\mathcal {B}\) is a finite Boolean algebra it must be the case that \(y\vee \lnot y=\lnot x\). Define \(\psi (a_2)=y\) and \(\psi (\lnot a_2)=\lnot y\). Continue this process. Since \(\mathcal {B}\) and \(\mathcal {P}\) both have exactly n atoms, \(\psi \) is a computable isomorphism between \(\mathcal {B}\) and \(\mathcal {P}\). \(\square \)

Theorem 4.2

If \(\mathcal {B}\) splits into finitely many \(\mathcal {C}_0,...,\mathcal {C}_k\) such that each \(\mathcal {C}_i\) is either atomless, an atom, or a 1-atom then every 1-decidable presentation \(\mathcal {A}\) of the Boolean algebra \(\mathcal {B}\) is computably isomorphic to some punctually 1-decidable Boolean algebra \(\mathcal {P}\).

Proof

Let \(k\in \mathbb {N}\) and consider the Boolean algebra \(\mathcal {A}_0\oplus ...\oplus \mathcal {A}_k\) where each \(\mathcal {A}_i\) is either atomless, an atom, or a 1-atom. Construct a punctually 1-decidable copy \(\mathcal {P}\) as a subtree of the full binary tree by constructing the ‘nice’ copy \(\mathcal {P}_i\) of each \(\mathcal {A}_i\) with \(i\le k\) below \(0^i1\). Copy the nice presentation of \(\mathcal {A}_k\) below \(0^k\). Then we show there exists a computable isomorphism between \(\mathcal {A}_0\oplus ...\oplus \mathcal {A}_k\) and our nice copy \(\mathcal {P}\).

Since each \(\mathcal {A}_i\) is either atomless, an atom, or a 1-atom, by Lemma 4.1 there is a computable isomorphism between \(\mathcal {P}_i\) and \(\mathcal {A}_i\) for each i, call \(\psi _i\). Then construct \(\varphi :\mathcal {A}\rightarrow \mathcal {A}_0\oplus ...\oplus \mathcal {A}_k\) by defining \(\varphi (\mathcal {P}_i)=\psi _i(\mathcal {P}_i)\) for each i.

Now \(\mathcal {B}\) splits into finitely many \(\mathcal {C}_0,...,\mathcal {C}_k\) such that each \(\mathcal {C}_i\) is either atomless, an atom, or a 1-atom, so by following this algorithm for this particular k, and \(\mathcal {A}_i=\mathcal {C}_i\) for each i, \(\varphi \) is a computable isomorphism to a punctually 1-deciable \(\mathcal {P}\). \(\square \)

Lemma 4.3

If \(\mathcal {B}\) does not split into finitely many \(\mathcal {C}_0,...,\mathcal {C}_k\) such that each \(\mathcal {C}_i\) is either atomless, an atom, or a 1-atom, then there are infinitely many \(x\in \mathcal {B}\) such that there are \(y,z\in \mathcal {B}\) where \(y\vee z=x\), \(y\wedge z=0\) and the following holds:

  • There are infinitely many elements below y

  • There are infinitely many elements below z

  • There is at least one atom below x

Proof

Using the tree-representation of \(\mathcal {B}\) we consider the following two cases.

Case 1: There are infinitely many 1-atoms. Then there is an infinite path l with infinitely many 1-atoms along it. Every element x along l has infinitely many 1-atoms below it and hence at least one atom below x. Below each element along l there is an element x such that there are \(y,z\in B\) with \(y\vee z=x\), \(y\wedge z=0\) and y is a 1-atom. Then below z there are infinitely many 1-atoms. Therefore such elements x witness the desired properties and there are infinitely many of these elements.

Case 2: There are finitely many 1-atoms. Then let \(\hat{\mathcal {B}}\) be the Boolean algebra by taking the complement of the join of these 1-atoms. Now \(\hat{\mathcal {B}}\) must still have infinitely many atoms, but \(\hat{\mathcal {B}}\) does not have 1-atoms. Then there is a limit point l of atoms that is not a 1-atom. Then it must be that along this path there are infinitely many infinite splits where both sides are infinite. Along l there are infinitely many atoms; hence there is at least one atom below every element along this path. \(\square \)

Theorem 4.4

If every 1-decidable presentation \(\mathcal {A}\) of a Boolean algebra \(\mathcal {B}\) is computably isomorphic to some punctually 1-deciable \(\mathcal {P}\) then \(\mathcal {B}\) splits into finitely many \(\mathcal {C}_0,...,\mathcal {C}_k\) such that each \(\mathcal {C}_i\) is either atomless, an atom, or a 1-atom.

Proof of Theorem 4.4

Suppose \(\mathcal {B}\) does not split into finitely many \(\mathcal {C}_0,...,\mathcal {C}_k\) such that each \(\mathcal {C}_i\) is either atomless, an atom, or a 1-atom. We will build a 1-decidable presentation \(\mathcal {A}\) of \(\mathcal {B}\) that is not computably isomorphic to any punctually 1-decidable \(\mathcal {P}\).

Let \(\langle \varphi _i\rangle _{i\in \mathbb {N}}\) be an effective listing of all partial computable functions. Let \(\langle \mathcal {P}_e,{\texttt {Atom}}_e,w_e\rangle _{e\in \mathbb {N}}\) be an effective listing of all punctual 1-decidable structures along with their primitive recursive atom relation and witness function.

We build \(\mathcal {A}\) so that \(\mathcal {A}\cong \mathcal {B}\), as well as meet the following requirements:

$$\begin{aligned}R_{e,i}: \varphi _i \text { is not an isomorphism between } \mathcal {A}\text { and } \mathcal {P}_e.\end{aligned}$$

To show \(\mathcal {A}\cong \mathcal {B}\) we build an ‘almost’ isomorphism \(\psi :\mathcal {A}\rightarrow \mathcal {B}\). Here an ‘almost’ isomorphism is a relaxation of the definition of isomorphism where we allow finite joins of elements in \(\mathcal {A}\) to be mapped to a single element of \(\mathcal {B}\).

Construction At stage s, if there is an e such that \(\mathcal {P}_{e}[s]\) does not obey of the Boolean algebra axioms then we are done with requirements \(R_{e,i}\) for all \(i\in \mathbb {N}\), declare such requirements inactive. If s is even then we enter an action stage, otherwise s is an extension stage.

Extension stage For all \(y \in \mathcal {B}[s]\) such that \(y\notin {{\,\textrm{range}\,}}(\psi )\). Let \(\hat{y}>y\) be longest such that \(\hat{y}\in {{\,\textrm{range}\,}}(\psi )\), let \(x=\psi ^{-1}(\hat{y})\) then enumerate \(x^{\hat{\,\,}}0\) and \(x^{\hat{\,\,}}1\) into \(\mathcal {A}[s+1]\) and define \(\psi (x^{\hat{\,\,}}0)=\hat{y}^{\hat{\,\,}}0\) and \(\psi (x^{\hat{\,\,}}1)=\hat{y}^{\hat{\,\,}}1\). Repeat this process until we have \(y\in {{\,\textrm{range}\,}}(\psi )\) for all \(y\in \mathcal {B}[s]\). For \(x\in \mathcal {A}[s+1]\) such that \({\texttt {Atom}}(x)[s]\uparrow \), if \({\texttt {Atom}}_{\mathcal {B}}(\psi (x))[s]\downarrow \) then define \({\texttt {Atom}}_{\mathcal {A}}(x)[s+1]={\texttt {Atom}}_{\mathcal {B}}(\psi (x))[s]\).

Action Stage For \(x\in \mathcal {A}[s]\) we say x looks like an infinite split if \({\texttt {Atom}}_{\mathcal {A}}(x)[s]=0\), \(x^{\hat{\,\,}}0, x^{\hat{\,\,}}1\in \mathcal {A}[s]\) and there is at least one descendant of x with \({\texttt {Atom}}_{\mathcal {A}}[s]\) undefined. For \(x\in \mathcal {A}[s]\), call x acceptable if \(x^-\) looks like an infinite split at stage s (where \(x^-\) is the immediate predecessor or x) and there is at least one atom below x in \(\mathcal {A}[s]\).

Now if x is unacceptable and x is a follower for some active requirement then cancel it. Let \(R_{e,i}\) be least such that it does not have a follower. Let x be the least acceptable element in \(\mathcal {A}[s]\) such that there are \(\langle e,i\rangle +1\) many \(y>x\) such that y looks like an infinite split. Define \(x_{e,i}[s+1]=x\) if such an element exists.

A requirement \(R_{e,i}\) requires attention at stage s if \(\varphi _{i}(x_{e,i})[s]\downarrow \) and \(R_{e,i}\) is active. Let \(R_{e,i}\) be the least requirement that requires attention. Halt and move to the next stage if there is no requirement requiring attention. Now we freeze the construction of \(\mathcal {A}\) for \(R_{e,i}\) and pause the enumeration of \(\mathcal {B}\). Cancel all followers below \(x_{e,i}[s]\). Run the enumeration of \(\mathcal {P}_{e}[s]\) until one of the following occurs:

  1. (1)

    All descendants below \(\varphi _{i}(x_{e,i})[s]\) are declared atoms in the enumeration of \(\mathcal {P}_e\).

  2. (2)

    There are strictly more descendants below \(\varphi _{i}(x_{e,i})[s]\) in the enumeration of \(\mathcal {P}_e\) than there are below \(x_{e,i}[s]\) in \(\mathcal {A}[s]\).

If there are the same number of descendants of \(x_{e,i}[s]\) as there are decendants of \(\varphi _{i}(x^{e,i})[s]\): take a descendant y of \(x_{e,i}[s]\) such that \({\texttt {Atom}}_{\mathcal {A}}(y)[s]\uparrow \) and define \({\texttt {Atom}}_{\mathcal {A}}(y)[s+1]=0\) and enumerate \(y^{\hat{\,\,}}0\) and \(y^{\hat{\,\,}}1\) into \(\mathcal {A}[s+1]\). Then in all cases declare all descendants of \(x_{e,i}[s]\) to be atoms.

Now define \(\psi (y)[s+1]=\psi (y)[s]\) if \(y\wedge x_{e,i}[s]=0\). Let \(z\in \mathcal {B}[s]\) be an atom below \(\psi ^{-1}(x_{e,i})[s]\). Then define \(\psi (x_{e,i})[s+1]=z\) and \(\psi (\lnot x_{e,i})[s+1]=z\wedge \psi ^{-1}(x^{e,i})[s]\). For all other \(y<\psi ^{-1}(x_{e,i})[s]\) in \(\mathcal {B}[s]\) define \(\psi (y)[s+1]\) so that \(\vee ,\wedge ,\lnot \) are preserved. Declare \(R_{e,i}\) inactive, unfreeze the construction, halt and move to the next stage. \(\square \)

Verification Now we show that all requirements are met.

Lemma 4.5

Suppose \(\mathcal {P}_e\) is a Boolean algebra then for all ei there is a stage s where \(R_{e,i}\) has a follower.

Proof

Suppose not. Let \(R_{e,i}\) be the least such requirement. Then for all stages t there is no element x such that x is acceptable and has \(\langle e,i\rangle +1\) many elements above it that looks like an infinite split. But this contradicts Lemma 4.3. \(\square \)

Lemma 4.6

If \(\mathcal {P}_e\) is a Boolean algebra then for all ei there is a stage t such that \(x_{e,i}[s]=x_{e,i}[t]\) for all \(s>t\).

Proof

Suppose not. Then let \(R_{e,i}\) be the least such requirement. By the previous lemma \(R_{e,i}\) eventually has a follower, then \(R_{e,i}\) must have its follower canceled infinitely often. A follower x is canceled if and only if it is no longer acceptable which happens only when \(x^-\) no longer looks like an infinite split. This means at least one side has become finite. The new follower for a requirement ei is appointed as the least acceptable element with \(\langle e,i\rangle +1\) many elements above it that looks like an infinite split. So if a follower for \(R_{e,i}\) is canceled infinitely often, there is no path with infinitely many splits that look like an infinite split. But this contradicts Lemma 4.3 and so for each requirement a follower is canceled only finitely many times. \(\square \)

Lemma 4.7

\(\mathcal {B}\cong \mathcal {A}\).

Proof

At extension stages we define \(\psi (x^{\hat{\,\,}}0)=\psi ^{-1}(x)^{\hat{\,\,}}0\) and \(\psi (x^{\hat{\,\,}}1)=\psi ^{-1}(x)^{\hat{\,\,}}1\), \(\psi \) is redefined only when a requirement acts to diagonalise. When this happens, \(\psi \) is only redefined below the follower of the requirement that has acted. There are only finitely many strings of length n and hence only finitely many followers of length n. Each requirement only diagonalises once. Therefore for each level, \(\psi \) eventually stabilises. At extension stages and when we redefine \(\psi \) we ensure that \(\wedge ,\vee ,\lnot , \texttt {Atom}\) are preserved. Therefore \(\psi :\mathcal {A}\rightarrow \mathcal {B}\) is an ‘almost’ isomorphism such that some atoms in \(\mathcal {B}\) are represented as the join of finitely many atoms in \(\mathcal {A}\); hence, by Remmel-Vaught \(\mathcal {B}\cong \mathcal {A}\). \(\square \)

Lemma 4.8

For all ei, \(R_{e,i}\) is met.

Proof

If \(\mathcal {P}_e\) is not a Boolean algebra we are done. So suppose \(\mathcal {P}_e\) is a Boolean algebra and let t be the stage by Lemma 4.6. Let \(x=x_{e,i}[t]\), then if \(\varphi _i(x)\uparrow \) we are done. Suppose \(\varphi _i(x)\downarrow \) and let s be the least stage where \(\varphi _{i,s}(x)\downarrow \). By induction, there is a stage where \(R_{e,i}\) is the least active requirement with this property. Then at this stage we freeze the construction for \(R_{e,i}\). Whenever a construction is frozen, it will eventually unfreeze as it must be the case that either:

  1. (1)

    All descendants below \(\varphi _{i}(x)[s]\) are declared atoms in the enumeration of \(\mathcal {P}_e\);

  2. (2)

    There are strictly more descendants below \(\varphi _{i}(x)[s]\) in the enumeration of \(\mathcal {P}_e\) than there are below x in \(\mathcal {A}[s]\).

In either case we ensure the number of atoms are below \(\varphi _{i}(x)[s]\) is different from the number of atoms below x, hence \(\varphi _i\) is not an isomorphism between \(\mathcal {A}\) and \(\mathcal {P}_e\). Therefore the requirement \(R_{e,i}\) is met. \(\square \)

All requirements are met and so we have shown that for any Boolean algebra \(\mathcal {B}\) that does not split into finitely many \(\mathcal {C}_0,...,\mathcal {C}_k\) such that each \(\mathcal {C}_i\) is either atomless, an atom, or a 1-atom, there is a 1-decidable presentation \(\mathcal {A}\) of \(\mathcal {B}\) that is not computably isomorphic to any punctually 1-decidable \(\mathcal {P}\).