1 Introduction

If \(\mathcal {A}\) and \(\mathcal {B}\) are two isomorphic algebraic structures then they have the same algebraic properties. However, the algorithmic properties of isomorphic algebraic structures can be strictly different. One of the first such examples was obtained by A. I. Mal’tsev [1]. These kinds of results led to lot of questions in modern computable structure theory. One of such questions can be stated as follows: what is the simplest possible presentation of a given structure \(\mathcal {A}\)?

For well-orders, there is a nice answer. In 1955, C. Spector [2] showed that every hyperarithmetic well-order is isomorphic to a computable one. In light of this result, a new question arises: how hard is it to compute an isomorphism between two computable well-orders or even between two computable algebraic structures? This leads to the concept of computable categoricity. A computable algebraic structure is called computably categorical if for any two computable representations of the structure there is a computable isomorphism between them. The investigation of effective categoricity of computable algebraic structures is one of the central questions in the field of computable models and structures.

In this paper, we study computable categoricity of countable scattered linear orders with constructive ranks. The definition of computable categoricity can be generalized to an arbitrary oracle.

Definition 1

A computable linear order is called \(\textbf{x}\)-categorical, if for any two computable representations of it there exists an \(\textbf{x}\)-computable isomorphism between them.

Similarly, a computable linear order is called \(\Delta ^0_\alpha \)-categorical, if for any two computable representations of it there exists a \(\Delta ^0_\alpha \)-isomorphism between them (\(\alpha \) can be a natural number as well as an infinite ordinal).

The least ordinal \(\alpha \) such that a linear order is \(\Delta ^0_\alpha \)-categorical is called its categoricity level.

Along with this definition, the notion of the relative categoricity is also considered.

Definition 2

A computable linear order is called relatively \(\Delta ^0_\alpha \)-categorical, if for any two \(\textbf{x}\)-computable representations of it there exists a \(\Delta ^0_\alpha (\textbf{x})\)-isomorphism between them.

A relatively \(\Delta ^0_1\)-categorical linear order is called relatively computably categorical.

Immediately from the definitions it follows that relatively \(\Delta ^0_\alpha \)-categoricity implies \(\Delta ^0_\alpha \)-categoricity. For arbitrary algebraic structures, the inverse implication is not true [3]. In the class of computable linear orders for \(n=0\) these two notions coincide. Namely, the following theorem holds.

Theorem 1

([4,5,6]) For a computable linear order, the notions of relative computable categoricity and computable categoricity coincide and are equivalent to the fact that the linear order contains only finitely many pairs of successors.

C. McCoy gave the following description of relatively \(\Delta ^0_2\)-categorical linear orders.

Theorem 2

([7]) A computable linear order \(\mathcal {L}\) is relatively \(\Delta ^0_2\)-categorical if and only if it is a finite sum of linear orders having one of the following order types \({\textbf {1}}\), \(\omega \), \(\omega ^*\) or \(n\cdot \eta \), where the infimum and the supremum of \(n\cdot \eta \) are contained in \(\mathcal {L}\) with the possible exception when \(n\cdot \eta \) is an initial or a final segment of \(\mathcal {L}\), correspondingly.

A bold face version of these results were also recently proved in Theorem 2.5 and Corollary 2.9 of [8].Footnote 1

In addition, in the same paper C. McCoy showed that if a linear order has a computable copy with computable successors, left and right limit points, then this linear order is \(\Delta ^0_2\)-categorical if and only if it is relatively \(\Delta ^0_2\)-categorical.

In general, the coincidence question of the classes of \(\Delta ^0_2\)-categorical and relatively \(\Delta ^0_2\)-categorical linear orders is still open. It should be noted that for some other structures such classes are different, for example, equivalence structures [9]. A. N. Frolov (to appear, see also [10]) pointed out that there exist a \(\Delta ^0_3\)-categorical linear order which is not relatively \(\Delta ^0_3\)-categorical. At the same time, the result [11, Theorem 2.1] demonstrates that the description of relatively \(\Delta ^0_3\)-categorical linear orders should be extremely difficult or even impossible.

This work is devoted to another approach to the study of the effective categoricity of algebraic structures, which consists of describing their levels of categoricity. The most general results here are C. Ash’s results [12], which gave the description of the categoricity levels for constructive ordinals. Later, N. Bazhenov [13] modified Ash’s methods and gave the description of the degrees of categoricity for constructive ordinals.

We briefly discuss our results. In Sect. 3 we provide the upper bound of the categoricity level for scattered linear orders of a constructive rank \(\alpha \). Note that this bounds are sharp (it is follows from Ash’s results for ordinals [5]). Namely, we prove that such linear orders are relatively \(\Delta ^0_{2\alpha }\)-categorical. To prove these result it is natural to introduce the notion of uniformly relatively \(\Delta ^0_{\alpha }\)-categoricity for classes of structures (see definition 7). The study of this concept could be independently interesting. For example, it is not konwn how it relates to the known concepts of categoricity (see, for example, [14, 15]) or whether there is a syntactic description of this concept. In particular, it is easy to see that if a structure \(\mathcal {A}\) belongs to a uniformly relatively \(\Delta ^0_\alpha \)-categorical class of structures then it is uniformly boldface \(\Delta ^0_\alpha \)-categorical (see [16]). For instance, the description of relative categoricity using Scott’s sentence [17] is well known [18, 19].

In Sect. 4 for every constructive ordinal \(\alpha >1\) and every \(\beta \) from the interval \([3,\,2\alpha ]\) excluding successors of limit ordinals we construct examples of computable relatively \(\Delta ^0_\beta \)-categorical scattered linear orders of rank \(\alpha \) which are not \(\Delta ^0_\gamma \)-categorical for any \(\gamma <\beta \). Thus, the categoricity level of a scattered linear order of rank \(\alpha \) can be anything from 3 to the upper bound, with the possible exception of successors of limit ordinals. Another interesting connection to [8] is Question 3.13; in particular, the successor of a limit case is also open in the boldface version of the question.Footnote 2 The constructed examples say that high rank scattered linear orders can have a fairly simple Scott’s sentence ([20], Proposition 27).

It follows from Theorem 1 that \(\Delta ^0_1\)-categorical scattered linear orders can be only finite orders. The authors suggest that the existence question of scattered linear orders whose categoricity level is the successor of a limit ordinal is as difficult as the existence question of a \(\Delta ^0_2 \)-categorical, but not relatively \(\Delta ^0_2\)-categorical computable linear order. These questions are both still open.

In contrast to these results, there is a strong connection between the complexity of embeddings between bi-embeddable linear orders and Hausdorff rank of linear orders at least at finite levels. Namely, in [21] it was shown that if \(\mathcal {L}\) is a computable linear order of Hausdorff rank n, then for every bi-embeddable copy of it there is an embedding computable in \((2n-1)\)-jumps from the atomic diagrams. Moreover, it has been shown that this is the best that can be done: let \(\mathcal {L}\) be a computable linear order of Hausdorff rank \(n\ge 1\), then \(0^{(2n-2)}\) does not compute embeddings between it and all of its computable bi-embeddable copies.

At the end of the introduction we list the open questions.

Questions

  1. 1.

    Let \(\alpha \) be a limit constructive ordinal, n be a finite ordinal such that \(\alpha +n>1\). Is there a computable scattered linear order with the constructive rank \(\alpha +n\) which is relatively \(\Delta ^0_\beta \)-categorical, but is not \(\Delta ^0_\gamma \)-categorical for every \(\gamma <\beta \), where \(\beta \) is the successor of a limit ordinal and \(3\le \beta \le \alpha +2n\)?

  2. 2.

    Is there a syntactic description of uniformly categorical classes of algebraic structures from Definition 7?

2 Preliminaries

We follow to [22] for the definitions and notation of the computability theory and to [23] for the linear orders definitions and notation. See survey [24] for foundations of computable linear orders.

A linear order \(\mathcal {L}\) is given by a pair \((L,\le _{\mathcal {L}})\), where L is a set and \(\le _{\mathcal {L}}\) is a binary relation on L satisfying the usual axioms of linear orders. All linear orders considered here are finite or countable. A linear order \(\mathcal {L}=(L,\le _{\mathcal {L}})\) is computable if L and \(\le _{\mathcal {L}}\) are computable. Unless otherwise specified we assume that \(L=\omega \) for infinite \(\mathcal {L}\). Given \(\mathcal {L}\), we let \(<_\mathcal {L}\) be the induced strict ordering, i.e., for all \(x,y\in L\), we have \(x<_\mathcal {L} y\) if and only if \(x\le _\mathcal {L} y\) and \(y\not \le _\mathcal {L} x\). We will also use interval notation: \([x,y]_\mathcal {L}=\{ z\mid x\le _\mathcal {L} z \le _\mathcal {L} y \}\); and we make use of the following additional relations on linear orders.

  • The successor relation \(S_\mathcal {L}\) is given by

    $$ \begin{aligned} S_\mathcal {L}(x,y) \ \Leftrightarrow \ (x<_\mathcal {L} y) \ \& \ \forall z (z\le _\mathcal {L} x \vee y\le _\mathcal {L} z). \end{aligned}$$
  • The block relation \(F_\mathcal {L}(x,y)\) is defined by

    $$\begin{aligned} F_\mathcal {L}(x,y) \ \Leftrightarrow \ {\left\{ \begin{array}{ll} \, [x,y]_\mathcal {L} \text { is finite} & \text { if }x\le _\mathcal {L} y; \\ \,[y,x]_\mathcal {L}\text { is finite}& \text { if }y\le _\mathcal {L} x.\end{array}\right. } \end{aligned}$$
  • The right limit point relation \(P^+_\mathcal {L}(x)\) is given by

    $$\begin{aligned}(\forall z >_\mathcal {L} x) (\exists y) [x<_\mathcal {L} y <_\mathcal {L} z]. \end{aligned}$$
  • The left limit point relation \(P_\mathcal {L}^-(x)\) is defined by

    $$\begin{aligned} (\forall z<_\mathcal {L} x) (\exists y) [z<_\mathcal {L} y <_\mathcal {L} x]. \end{aligned}$$

We will drop subscripts if the order is clear from context.

It is not hard to see that the block relation is an equivalence relation on \(\mathcal {L}\) which agrees with \(\le _\mathcal {L}\), and that it is definable by a computable \(\Sigma ^0_2\) formula in \(L_{\omega _1,\omega }\). We call its equivalence classes blocks and denote the block of \(x\in L\) as \([x]_\mathcal {L}\). Since the block relation agrees with the order, we can take the quotient structure and obtain the factor order or the condensation. It is denoted by \(\mathcal {L}/F_\mathcal {L}\) and defined as usual by \([x]_\mathcal {L} \le _{\mathcal {L}/F_\mathcal {L}} [y]_\mathcal {L} \Leftrightarrow x\le _\mathcal {L} y\).

Taking condensations can be iterated finitely often in the obvious way—by factoring through the block relation of the previous condensation. In order to obtain a notion of iterated condensation for all ordinals, we define the \(\alpha \)-block relation for all ordinals \(\alpha \).

Definition 3

Given a linear order \(\mathcal {L}\), the \(\alpha \)-block relation \(F_{\mathcal {L}}^\alpha \) and the \(F_{\mathcal {L}}^\alpha \)-equivalence class \([x]_\mathcal {L}^\alpha \) of \(x\in L\) are defined by induction as follows: for any \(x,y\in L\),

  1. 1.

    \(F^0_\mathcal {L}(x,y)\Leftrightarrow x=y\),

  2. 2.

    if \(\alpha =\beta +1\), then \(F^\alpha _\mathcal {L}(x,y)\Leftrightarrow F_{\mathcal {L}/F^\beta _\mathcal {L}}([x]^\beta _\mathcal {L}, [y]^\beta _\mathcal {L})\), and

  3. 3.

    if \(\alpha \) is a limit ordinal, then \(F^\alpha _\mathcal {L}(x,y)\Leftrightarrow (\exists \beta < \alpha ) F_{\mathcal {L}/F^\beta _\mathcal {L}}(x,y)\).

It is not hard to see that, for a finite \(\alpha \), \(\mathcal {L}/F^\alpha _\mathcal {L}\) agrees with taking condensations iteratively \(\alpha \) times, and that \(F^\alpha _\mathcal {L}\) is \(\Sigma ^0_{2\alpha }\)-definable. To simplify notation, we set \(\mathcal {L}^{(\alpha )}_F=\mathcal {L}/F^\alpha _\mathcal {L}\).

Definition 4

The Hausdorff rank of a linear order \(\mathcal {L}\) is the least \(\alpha \) such that \(\mathcal {L}^{(\alpha )}_F=\mathcal {L}^{(\alpha +1)}_F\).

As usual, we will identify \(\omega \) with the order type of the natural numbers, \(\zeta \) with the order type of the integers, and \(\eta \) with the order type of the rationals. The unique finite order type with precisely n elements is denoted by n. We let 0 stand for the empty order. Further, if \(\mathcal {L}\) is a linear order, then \(\mathcal {L}^*\) is its reverse order, i.e., \(x\le _{\mathcal {L}^*} y\Leftrightarrow y\le _\mathcal {L} x\).

Definition 5

A linear order is scattered if it has no suborder of type \(\eta \).

Definition 6

The class \(\textbf{VD}\) of linear orders is defined by

  1. 1.

    \(\textbf{VD}_0=\{0,\,1\}\),

  2. 2.

    \(\textbf{VD}_\alpha = \bigg \{ \sum \limits _{i\in \tau }\mathcal {L}_i \,\mid \mathcal {L}_i\in \bigcup \limits _{\beta <\alpha } \textbf{VD}_\beta ,\,\tau \in \{\omega ,\omega ^*,\zeta \} \bigg \}\), and

  3. 3.

    \(\textbf{VD}=\bigcup \limits _{\alpha }\textbf{VD}_\alpha \).

The \(\textbf{VD}\)-rank of a linear order \(\mathcal {L}\) is the least \(\alpha \) such that \(\mathcal {L}\in \textbf{VD}_\alpha \); and the \(\textbf{VD}^*\)-rank of \(\mathcal {L}\) is the least \(\alpha \) such that \(\mathcal {L}\) is a finite sum of linear orders in \(\textbf{VD}_\alpha \).

The following theorem due to Hausdorff is well-known.

Theorem 3

A countable linear order is scattered if and only if it has countable \(\textbf{VD}\)-rank. Furthermore, the \(\textbf{VD}\)-rank of a scattered linear order is equal to its Hausdorff rank.

For every \(\mathcal {L}^{(\alpha )}_F\), the successor relation \(S_{\mathcal {L}^{(\alpha )}_F}\) induces a relation on \(\mathcal {L}\) the following way \(S^{\alpha }_{\mathcal {L}}(x,y)\Leftrightarrow S_{\mathcal {L}^{(\alpha )}_F}([x]^\alpha _{\mathcal {L}},\,[y]^\alpha _{\mathcal {L}})\). By this definition, \(S^{0}_{\mathcal {L}}\) is the standard successor relation \(S_{\mathcal {L}}\). It is easy to see that \(S^\alpha _{\mathcal {L}}\in \Delta ^0_{2\alpha +2}(\mathcal {L})\). In the same way, we can define \(P^{+\alpha }_\mathcal {L}\), \(P^{-\alpha }_\mathcal {L}\).

Additionally, we use the following two partial functions:

\(S^+_\alpha (x)=y\), where \(y \in L\) is the least as natural number such that \(S^\alpha _\mathcal {L}(x,y)\), and

\(S^-_\alpha (x)=y\), where \(y \in L\) is the least as natural number such that \(S^\alpha _\mathcal {L}(y,x)\).

3 Upper bounds of the categoricity levels

In this section we give an upper bound on the categoricity levels for scattered linear orders of constructive ranks. To simplify the proofs we introduce the following definition.

Definition 7

A class of structures \(\mathcal {S}\) is called uniformly relatively \(\Delta ^0_\alpha \)-categorical, if there exists a Turing operator \(\Phi \) such that for every two isomorphic structures \(\mathfrak {B}_1,\,\mathfrak {B}_2\in \mathcal {S}\) the mapping \(\Phi ^{(\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\beta )}}:B_1\longrightarrow B_2\) is an isomorphism between them, where \(\beta = \alpha -1\), for a finite ordinal \(\alpha \), and \(\beta = \alpha \), for an infinite ordinal \(\alpha \).

Note that if a class \(\mathcal {S}\) consists exactly of all computable copies of a structure \(\mathcal {A}\), then the class \(\mathcal {S}\) is uniformly relatively \(\Delta ^0_1\)-categorical if and only if the structure \(\mathcal {A}\) is uniformly computably categorical. The definition of relatively computably categorical structures and other approaches to relatively categoricity can be founded in [14].

Theorem 4

Suppose that \(\mathfrak {B}_1\) and \(\mathfrak {B}_2\) are linear orders of \(\textbf{VD}\)-rank \(\gamma \). Then there exists Turing operators \(\Phi _0 = \Phi \), \(\Psi _0 = \Psi \), \(\Phi _1 = \Phi ^{\le }\), \(\Psi _1 = \Psi ^{\le }\), \(\Phi _2 = \Phi ^{\ge }\) and \(\Psi _2 = \Psi ^{\ge }\) such that if \(\mathcal {L}^0_i = [t_i]^{\alpha +m}_{\mathfrak {B}_i}\), \(\mathcal {L}_i^1 = [\le t_i]^{\alpha +m}_{\mathfrak {B}_i} = \{ y \le _{\mathfrak {B}_i} t_i \mid y\in [t_i]^{\alpha +m}_{\mathfrak {B}_i}\}\), \(\mathcal {L}_i^2 = [\ge t_i]^{\alpha +m}_{\mathfrak {B}_i} = \{ y \ge _{\mathfrak {B}_i} t_i \mid y\in [t_i]^{\alpha +m}_{\mathfrak {B}_i}\}\), where \(\alpha +m<\gamma \), \(\alpha \) is a limit ordinal, and m is a finite ordinal, then for every \(j \le 3\) the following conditions hold:

  1. (1)

    if \(\mathcal {L}_1^j\cong \mathcal {L}^j_2\) then \(\Phi _j^{X}(\gamma ,\alpha +m, t_1, t_2)=1\) and \(\Psi _j^{X}(\gamma ,\alpha +m, t_1, t_2,\,\cdot )\) is an isomorphism between \(\mathcal {L}^j_1\) and \(\mathcal {L}^j_2\),

  2. (2)

    if \(\mathcal {L}^j_1\ncong \mathcal {L}^j_2\) then \(\Phi _j^{X}(\gamma ,\alpha +m, t_1, t_2)=0\), where

    $$\begin{aligned} X={\left\{ \begin{array}{ll} (\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\alpha +2m+2)} \text{, } \text{ if } \alpha +m<\omega , \\ (\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\alpha +2m+3)} \text{, } \text{ if } \alpha +m\ge \omega . \end{array}\right. } \end{aligned}$$

Proof

Initially, remark that \(\mathcal {L}_i^1\) and \(\mathcal {L}_i^2\) have rank at most \((\alpha + m)\), since \(\mathcal {L}^0_1\), \(\mathcal {L}^0_2\) are maximal \((\alpha +m)\)-blocks. The proof is by the transfinite induction.

First we consider the case, where \(\alpha +m=1\). We fix \(j \le 2\) and, to simplify notation, denote \(\mathcal {L}^j_1\) and \(\mathcal {L}^j_2\) as \(\mathcal {L}_1\) and \(\mathcal {L}_2\), correspondingly. For the induction basis, we assume that they have rank 1. Then either \(\mathcal {L}_1\) and \(\mathcal {L}_2\) are finite, or they have one of the following order types: \(\omega \), \(\omega ^*\) or \(\zeta \). We can determine whether the two orders \(\mathcal {L}_1\) and \(\mathcal {L}_2\) are isomorphic and subsequently define an isomorphism between of them in a straightforward way using oracle \((\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(2\cdot 1+2)}\).

To do this, we check whether \(\mathcal {L}_i\) has a least or a greatest elements. If they are not consistent, for example, one of linear orders has the greatest element and another does not, then \(\mathcal {L}_1\) and \(\mathcal {L}_2\) are not isomorphic.

Now we assume that they are consistent. If \(\mathcal {L}_1\) and \(\mathcal {L}_2\) both have a greatest and a least element, then both 1-blocks are finite. We can find all of them. If the number of elements are different then \(\mathcal {L}_1\) and \(\mathcal {L}_2\) are not isomorphic. Otherwise, they are isomorphic and the construction of the isomorphism is obvious.

If the considered 1-blocks have no least elements, or no greatest elements, or neither, then \(\mathcal {L}_1\) and \(\mathcal {L}_2\) are isomorphic and have order type \(\omega ^*\), \(\omega \) or \(\zeta \), correspondingly. A construction of an isomorphism is also obvious. For example, suppose that \(x_1\) is the least element of \(\mathcal {L}_1\), \(x_2\) is the least element of \(\mathcal {L}_2\), and they have no greatest elements. Then \(\mathcal {L}_1\) and \(\mathcal {L}_2\) have order type \(\omega \) and an isomorphism can be defined as \(\varphi ((S^+_0)^m(x_1))=(S^+_0)^m(x_2)\) for every \(m\in \mathbb {N}\), where \((S^+_0)^m\) is a m-th iteration of the successor function, for example, \((S^+_0)^2(x) = S^+_0(S^+_0(x))\).

Using notion \((S^+_0)^m = (S^-_0)^{-m}\) for negative integer numbers m, the other cases are similar.

Assume that the theorem holds for every ordinal \(< \alpha + m\). Now we wish to argue that the theorem holds for \(\alpha + m\). Suppose that \(\alpha + m\) is a successor ordinal, i.e., \(\alpha + m = \alpha + k + 1\). We proceed similarly as in the proof for the basis of the induction with natural changes. Again, we fix j and denote \(\mathcal {L}_1=\mathcal {L}^j_1\) and \(\mathcal {L}_2=\mathcal {L}^j_2\). To be short, we denote the functionals \(\Phi _j\) and \(\Psi _j\) as \(\Phi \) and \(\Psi \), correspondingly.

\(\mathcal {L}^{\alpha +k}_{F,\ 1}\) and \(\mathcal {L}^{\alpha +k}_{F,\ 2}\) have \(\textbf{VD}\)-rank 1, and, consequently, as above, we can determine whether they are isomorphic. If \(\mathcal {L}^{\alpha +k}_{F,\ 1}\) and \(\mathcal {L}^{\alpha +k}_{F,\ 2}\) are not isomorphic then \(\mathcal {L}_1\) and \(\mathcal {L}_2\) are not isomorphic too. Note, for example for \(j=0\), to determine the existence of the greatest element of \(\mathcal {L}^{\alpha +k}_{F,\ i}\) we need to check the following formula \((\exists x \in L) (\forall y \in L) [x\ge _{\mathcal {L}}y\vee y\in [x]_\mathcal {L}^{\alpha +k}]\). If \(\alpha +k<\omega \) then this formula is computable relative to \((\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\alpha +2(k+1))}\), and if \(\alpha +k\ge \omega \) then it is computable relative to \((\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\alpha +2(k+1)+1)}\). In other words, this formula is \(X''\)-computable, where

$$\begin{aligned} X={\left\{ \begin{array}{ll} (\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\alpha +2k+2)} \text {, if }\alpha +k<\omega , \\ (\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\alpha +2k+3)} \text {, if } \alpha +k\ge \omega . \end{array}\right. } \end{aligned}$$

We can construct the functionals \(\Phi \) and \(\Psi \) in the same manner as before with natural minor changes. We show these changes in the most complex case when \(\mathcal {L}^{\alpha +m}_{F,\ 1}\) and \(\mathcal {L}^{\alpha +m}_{F,\ 2}\) have no least elements and no greatest elements, i.e., they both have order type \(\zeta \). Under such assumptions, \(\mathcal {L}_1\) and \(\mathcal {L}_2\) are isomorphic if and only if \((\exists t)(\forall s)[\mathcal {L}_{1,\,s}\cong \mathcal {L}_{2,\,s+t}]\). By the induction hypothesis, \(\Phi ^X(\gamma , \alpha +k, t_{1,s}, t_{2,s+t}) = 1\) if and only if \(\mathcal {L}_{1,\,s}\cong \mathcal {L}_{2,\,s+t}\), where \(t_{i,s} \in L_{i,\,s}\) can be found uniformly in \(t_i\) relative to the oracle X. Consequently, \(\Phi ^{X''}(\gamma , \alpha + k + 1, t_{1}, t_{2}) = 1\) if and only if \(\mathcal {L}_{1}\cong \mathcal {L}_{2}\).

Now we define the operator \(\Psi \). By the induction hypothesis, \(\Psi ^{X}(\gamma ,\,\alpha +k,t_{1,s}, t_{2,s+t},\,\cdot )\) is an isomorphism between \(\mathcal {L}_{1,\,s}\) and \(\mathcal {L}_{2,\,s+t}\). If x belongs in the same \((\alpha +k)\)-block as \(t_{1,\,s}\) then we define \(\Psi ^{X''}(\gamma ,\,\alpha +k+1,t_{1}, t_{2},\,x)=\Psi ^{X}(\gamma ,\,\alpha +k,t_{1,s}, t_{2,s+t},\,x)\). The oracle \(X''\) is enough to find \(t_{1,s}\) and \(t_{2,s+t}\), and to check \(x \in [t_{1,s}]^{\alpha +k}_{\mathfrak {B}_1}\).

Suppose that \(\alpha + m\) is a limit ordinal, i.e., \(m=0\). Then \(\mathcal {L}^j_i=\bigcup \limits _{k\in \omega }[t_i]^{\beta _k}_{\mathfrak {B}_i}\), where \(\beta _k\) is a computable strictly increasing sequence of ordinals converging to \(\alpha \).

Proofs for all cases \(j=0, j=1, j=2\) are the same. We consider the most complex case \(j=0\). It is easy to see that in the class of scattered linear orders we have \([t_{1}]^{\alpha }_{\mathfrak {B}_1}\cong [t_{2}]^{\alpha }_{\mathfrak {B}_2}\) if and only if \( (\exists x_1\in [t_{1}]^{\alpha }_{\mathfrak {B}_1}) (\exists x_2\in [t_{2}]^{\alpha }_{\mathfrak {B}_2}) (\forall s\in \omega ) \big ( [\le x_1]^{\beta _s}_{\mathfrak {B}_1} \cong [\le x_2]^{\beta _s}_{\mathfrak {B}_2} \, \& \, [\ge x_1]^{\beta _s}_{\mathfrak {B}_1} \cong [\ge x_2]^{\beta _s}_{\mathfrak {B}_2}\big )\).

By the induction hypothesis, in both cases \(\alpha =\omega \) and \(\alpha >\omega \) we have \(\mathcal {L}^0_{1}\cong \mathcal {L}^0_{2}\) if and only if

$$ \begin{aligned} & (\exists x_1\in [t_{1}]^{\alpha }_{\mathfrak {B}_1}) (\exists x_2\in [t_{2}]^{\alpha }_{\mathfrak {B}_2}) (\forall s\in \omega ) ( \Phi _1^{(\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\alpha )}}(\gamma ,\beta _s,x_1,x_2)=1 \, \& \,\\ & \& \Phi _2^{({\mathfrak {B}}_1\oplus {\mathfrak {B}}_2)^{(\alpha )}}(\gamma ,\beta _{s},x_1,x_2)=1 ). \end{aligned}$$

If such \(x_1\) and \(x_2\) exist, then it remains to “piecewise” define \(\Psi \), by choosing suitable isomorphisms in the following way:

Theorem 5

Suppose that \(\alpha \) is a limit and n is a finite ordinal. Then there exist Turing operators \(\Phi \) and \(\Psi \) such that

1) if \(\mathfrak {B}_1\) and \(\mathfrak {B}_2\) are linear orders of \(\textbf{VD}\)-rank \(\alpha +n\), then \(\Phi ^{X}(\alpha +n)=1\), if \(\mathfrak {B}_1\cong \mathfrak {B}_2\) and \(\Phi ^{X}(\alpha +n)=0\), otherwise, where

2) the class of scattered linear orders of \(\textbf{VD}\)-rank \(\alpha +n\) is uniformly relatively \(\Delta ^0_{\alpha +2n+1}\)-categorical via the operator \(\Psi \).

Proof

Case \(\alpha +n=1\).

During the proof, i is any element of \(\{1,2\}\). Suppose that \(\mathfrak {B}_i\) is a scattered linear order of \(\textbf{VD}\)-rank 1. It has one of the following order types: \(\omega \), \(\omega ^*\), \(\zeta \) or finite. We determine whether \(\mathfrak {B}_i\) has a least or a greatest elements; i.e., we determine whether the formulas \( (\exists x)(\forall y) [x\in \mathfrak {B}_i\, \& \,x\in \mathfrak {B}_i\, \& \,x\le _{\mathfrak {B}_i}y]\) and \( (\exists x) (\forall y) [x\in \mathfrak {B}_i\, \& \,y\in \mathfrak {B}_i\, \& \,x\ge _{\mathfrak {B}_i}y]\) are true. All of this can be done within the oracle \((\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(2)}\).

There are the following subcases.

1) Both linear orders have a least and a greatest elements. Then both are finite. We find the set of elements from \(\mathfrak {B}_i\) with the least number \(\langle x_{i,\,0},\,x_{i,\,1},\,x_{i,\,2},\,\ldots ,\, x_{i,\,m_i},\,x_{i,\,m_i+1}\rangle \) such that \(x_{i,\,0}<_{\mathfrak {B}_i}x_{i,\,1}<_{\mathfrak {B}_i}x_{i,\,2}<_{\mathfrak {B}_i}\cdots<_{\mathfrak {B}_i}x_{i,\,m_i}<_{\mathfrak {B}_i}x_{i,\,m_i+1}\), and \(x_{i, 0}\) is the least and \(x_{i, m_{i}+1}\) is the greatest elements of \(\mathfrak {B}_i\), and \(S^0_{i}(x_{i,\,j},x_{i,\,j+1})\) for \(0\le j\le m_i\). If \(m_1\ne m_2\) then \(\mathfrak {B}_1\) and \(\mathfrak {B}_2\) are not isomorphic. If \(m_1=m_2\) then we can define an isomorphism as \(\varphi (x_{1,\,j})=x_{2,\,j}\).

2) Both linear orders have a least element and no greatest element. Then they are isomorphic and have order type \(\omega \). Let \(x_i\) be the least element of \(\mathfrak {B}_i\). Define an isomorphism as \(\varphi ((S^+_0)^m(x_1))=(S^+_0)^m(x_2)\) for every \(m\ge 0\).

3) Both linear orders have no least element and have a greatest element. The linear orders have type \(\omega ^*\). This case is symmetrical to the previous one.

4) Both linear orders have no least element and have no greatest element. Then they are isomorphic and have order type \(\zeta \). Suppose that \(x_i\) is the least as a natural number element from \(\mathfrak {B}_i\). We define an isomorphism as \(\varphi ((S^+_0)^m(x_1))=(S^+_0)^m(x_2)\) for every \(m\in \mathbb {Z}\).

5) One of the linear orders has a least or a greatest element and the second one has no corresponding element. Then they are not isomorphic.

Note, all conditions from pp. 1. – 5. are \((\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(2)}\)-computable.

Case \(\alpha +n+1\).

Suppose that \(\mathfrak {B}_1\) and \(\mathfrak {B}_2\) are scattered linear orders of \(\textbf{VD}\)-rank \(\alpha +n+1\). Both factor orders \(\mathfrak {B}^{\alpha +n}_{F,\ i}\) have \(\textbf{VD}\)-rank 1, and consequently, they have one of the following order types: \(\omega \), \(\omega ^*\), \(\zeta \) or finite. We find one element \(x_{i,j}\in \mathcal {L}_i\) from each \(\alpha +n\)-block \(\mathcal {L}_{i,\,j}=[x_{1,j}]^{\alpha +n}_{\mathfrak {B}_i}\) of the initial linear orders. It is easy to see that in contrast to the previous theorem, to find these elements in the case of \(\alpha +n<\omega \) we need the oracle \((\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\alpha +2n)}\), and in the case of \(\alpha +n\ge \omega \) we need the oracle \((\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\alpha +2n+1)}\). Using Theorem 4, we finish the proof for this case.

Case \(\alpha +n>0, n=0\).

Suppose that \(\mathfrak {B}_1\) and \(\mathfrak {B}_2\) are scattered linear orders of \(\textbf{VD}\)-rank \(\alpha \). Both linear orders \(\mathfrak {B}_i\) can be represented as \(\bigcup \limits _{j\in \omega }[x_i]^{\beta _j}_{\mathfrak {B}_i}\), for every \(x_i\) from \(\mathfrak {B}_i\) and \(\beta _j\) is a computable sequence of ordinals less than and converging to \(\alpha \). We proceed similarly as in the proof of the previous theorem using Theorem 4 instead of the induction hypothesis. Namely, there are operators \(\Phi _1\), \(\Phi _2\) and \(\Psi _1\), \(\Psi _2\) such that: \([\le t_i]^{\beta _k}_{\mathfrak {B}_1}\cong [\le t_i]^{\beta _k}_{\mathfrak {B}_2}\) iff \(\Phi _1^{(\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\alpha )}}(\alpha ,\,\beta _k,\,t_1,\,t_2)=1\); \([\ge t_i]^{\beta _k}_{\mathfrak {B}_1}\cong [\ge t_i]^{\beta _k}_{\mathfrak {B}_2}\) iff \(\Phi _2^{(\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\alpha )}}(\alpha ,\,\beta _k,\,t_1,\,t_2)=1\); and \(\Psi _1\), \(\Psi _2\) are corresponding isomorphisms, when they are exit.

We have \(\mathfrak {B}_1\cong \mathfrak {B}_2\) if and only if

$$ \begin{aligned} & (\exists x_1\in {\mathfrak {B}_1}) (\exists x_2\in {\mathfrak {B}_2}) (\forall s\in \omega ) \big ( \Phi _1^{(\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\alpha )}}(\alpha ,\beta _s,x_1,x_2)=1 \, \& \,\\ & \quad \& \, \Phi _2^{(\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\alpha )}}(\alpha ,\beta _s,x_1,x_2)=1 \big ). \end{aligned}$$

If such \(x_1\) and \(x_2\) exist, then it remains to “piecewise” define \(\Psi \), similarly as in the proof of the p

Using this theorem, it is not hard to prove the same result for the class of scattered linear orders of given \(\textbf{VD}^*\)-rank.

Corollary 6

Suppose that \(\alpha \) is a limit ordinal and n is finite. Then there exist Turing operators \(\Phi \) and \(\Psi \) such that

1) if \(\mathfrak {B}_1\) and \(\mathfrak {B}_2\) are linear orders of \(\textbf{VD}^*\)-rank \(\alpha +n\), then \(\Phi ^{X}(\alpha +n)=1\), if \(\mathfrak {B}_1\cong \mathfrak {B}_2\) and \(\Phi ^{X}(\alpha +n)=0\), otherwise, where

$$\begin{aligned} X = {\left\{ \begin{array}{ll} (\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\alpha +2n+2)}, & \text { if } \alpha +m<\omega ; \\ (\mathfrak {B}_1\oplus \mathfrak {B}_2)^{(\alpha +2n+3)}, & \text { if } \alpha +m\ge \omega ;\end{array}\right. } \end{aligned}$$

2) the class of scattered linear orders of \(\textbf{VD}^*\)-rank \(\alpha +n\) is uniformly relatively \(\Delta ^0_{\alpha +2n+3}\)-categorical via the operator \(\Psi \).

Proof

It follows immediately from the theorem, since every linear order of \(\textbf{VD}^*\)-rank \(\alpha +n\) is a linear order of \(\textbf{VD}\)-rank less than or equal to \(\alpha +n+1\).

Theorem 7

Suppose that \(\mathcal {L}=\langle L;\,<_\mathcal {L}\rangle \) is a scattered linear order of \(\textbf{VD}^*\)-rank \(\alpha +n\). Then it is relatively \(\Delta ^0_{\alpha +2n}\)-categorical.

Proof

Suppose that \(\mathcal {L}_1\) and \(\mathcal {L}_2\) are two copies of the linear order \(\mathcal {L}\). Then they are finite sums \(\mathcal {L}_i=\mathcal {L}_{i,\,1}+\mathcal {L}_{i,\,2}+\cdots +\mathcal {L}_{i,\,m_i}\) (\(i=1,\,2\)), where every summand has \(\textbf{VD}\)-rank \(\alpha +n\). Furthermore, if \(j\ne j'\) and \(x\in L_{i,j},\, y\in L_{i,\,j'}\) then \(\lnot F_{i,\,\alpha +n}(x,y)\). Further we consider few cases. Our goal in each case is to prepare pairs \((x^i_t,\,y^i_t)\) from each block such that there is an isomorphism of the blocks sending \(x^i_t\) to \(y^i_t\).

Initially, we consider the case, when \(\alpha +n\) is a successor ordinal.

For any j, the factor orders \(\mathcal {L}^{\alpha +n}_{1,\ j}\) and \(\mathcal {L}^{\alpha +n}_{2,\ j}\) have the same one of the following order types: \(\omega \), \(\omega ^*\), \(\zeta \) or finite.

1. If \(\mathcal {L}^{\alpha +n}_{1,\ j}\) \((1 \le j \le m_1)\) has a finite order type \(k_j\), then we choose from every \((\alpha +n)\)-block the least as natural number element \(x_t\) \((1 \le t \le k_j)\). We have \(x^j_{1}<_{\mathcal {L}_1}\cdots <_{\mathcal {L}_1}x^j_{k_j}\) and suppose that \(y^j_{1}<_{\mathcal {L}_2}\cdots <_{\mathcal {L}_2}y^j_{k_j}\) is a set of elements such that there exists an isomorphism \(\varphi : \mathcal {L}_1\rightarrow \mathcal {L}_2\) with \(\varphi (x^j_{t})=y^j_{t}\).

2. If \(\mathcal {L}^{\alpha +n}_{1,\ j}\) has type \(\omega \) then we choose the least as natural number element \(x^j_{0}\) from the \((\alpha +n)\)-block which is the least element in \(\mathcal {L}^{\alpha +n}_{1,\ j}\). Suppose that \(y^j_{0}\) is an element such that there exists an isomorphism \(\varphi : \mathcal {L}_1\rightarrow \mathcal {L}_2\) with \(\varphi (x^j_{0})=y^j_{0}\). Define \(x^j_{t+1}=S^+_{\alpha +n+1}(x^j_{t})\) and \(y^j_{t+1}=S^+_{\alpha +n+1}(y^j_{t})\) for all \(t\ge 0\).

3. If \(\mathcal {L}^{\alpha +n}_{1,\ j}\) has order type \(\omega ^*\) then this case is symmetrical to the previous one.

4. If \(\mathcal {L}^{\alpha +n}_{1,\ j}\) has order type \(\zeta \) then we choose the least as natural number element \(x^j_{0}\in {\mathcal {L}_{1,\,j}}\). Suppose that \(y^j_{0}\) is an element such that there exists an isomorphism \(\varphi : \mathcal {L}_1\rightarrow \mathcal {L}_2\) with \(\varphi (x^j_{0})=y^j_{0}\). Define \(x^j_{t+1}=S^+_{\alpha +n+1}(x^j_{t})\) and \(y^j_{t+1}=S^+_{\alpha +n+1}(y^j_{t})\) for all \(t\ge 0\), \(x^j_{t-1}=S^-_{\alpha +n+1}(x^j_{t})\) and \(y^j_{t-1}=S^-_{\alpha +n+1}(y^j_{t})\) for all \(t \le 0\).

Define the following picewise operator

where the operator \(\Psi \) is from Theorem 4 and \(\beta = \alpha +2n-1\), if \(\alpha =0\), and \(\beta = \alpha +2n\), if \(\alpha >0\). It is easy to see that \(\hat{\Psi }^{(\mathcal {L}_1\oplus \mathcal {L}_2)^{(\alpha +2n-1)}}(\cdot )\) is an isomorphism between \(\mathcal {L}_1\) and \(\mathcal {L}_2\), since

$$\begin{aligned} \Psi ^{([x^j_{t}]^{(\alpha +n-1)}\oplus [y^j_{t}]^{(\alpha +n-1)})\oplus (\mathcal {L}_1\oplus \mathcal {L}_2)^{\beta }}(\alpha +n,\,\alpha +n+1,\, x^j_t,\, y^j_t,\,\cdot \,) \end{aligned}$$

is an isomorphism between \([x^j_{t}]^{(\alpha +n-1)}\) and \([y^j_{t}]^{(\alpha +n-1)}\).

Now we consider the case, when \(\alpha +n\) is a limit ordinal, i.e., \(n=0\). We choose elements \(x^j\) in every \(L_{1,j}\) and elements \(y^j\) in \(L_{2,j}\) such that there exists an isomorphism \(\varphi : \mathcal {L}_1\rightarrow \mathcal {L}_2\) with \(\varphi (x^j)=y^j\). Then \(\mathcal {L}_{1,j}=\bigcup \limits _{t\in \omega }[x^j]^{\beta _t}_{\mathcal {L}_1}\) and \(\mathcal {L}_{2,j}=\bigcup \limits _{t\in \omega }[y^j]^{\beta _t}_{\mathcal {L}_2}\), where \(\beta _t\) is a computable sequence of ordinals less than and converging to \(\alpha \). We proceed as in the case of the limit ordinal from the proof of Theorem 4.

4 Constructions of examples

In this section, we construct examples of linear orders with given constructive rank \(\alpha \) that realize the intermediate levels of categoricity between 3 and the upper bound given in the previous section. More precisely, we prove the following theorem.

Theorem 8

Suppose that \(\alpha \) is a limit constructive ordinal, and n is finite such that \(\alpha +n>1\). Then for every \(\beta \) such that \(3\le \beta \le \alpha +2n\), which is not the successor of a limit ordinal, there exists a computable scattered linear order with constructive rank \(\alpha +n\) which is relatively \(\Delta ^0_\beta \)-categorical, but is not \(\Delta ^0_\gamma \)-categorical for every \(\gamma <\beta \).

The rest of this section is a prf of the theorem. Constructions of orders are different for the cases when \(\beta \) is a limit ordinal, an even successor ordinal, and an odd successor ordinal.

4.1 Case of an odd successor ordinal

Our construction will take a few stages. Initially, we construct a \(\Delta ^0_3\)-categorical computable linear order, that is not \(\Delta ^0_2\)-categorical, which has rank 2. Further, we use this construction to build a \(\Delta ^0_3\)-categorical linear order, that is not \(\Delta ^0_2\)-categorical, which has an arbitrary given constructive rank. Finally, we construct a \(\Delta ^0_\beta \)-categorical linear order for every odd \(\beta \ge 3\) and every \(\alpha \) such that all of them satisfy the conditions of the theorem.

Assume that \(\nu :\mathbb {Z}\rightarrow \mathbb {Z}\setminus \{0\}\) is a computable strictly increasing function such that the module \(|\nu |:\mathbb {Z}\rightarrow \mathbb {N}\setminus \{0\}\) is an injective function with a computable range. Then for \(\alpha +n=2\) and \(\beta =3\), the linear order \(\mathcal {L}_{od}(\nu )= \sum \limits _{i\in \mathbb {Z}}(\zeta +|\nu (i)|)\) satisfies the theorem conditions. For example, suppose that \(\ldots , \nu (-2) = -7, \nu (-1) = -5, \nu (0) = -2, \nu (1) = -1, \nu (2) = 3, \ldots \), then

$$\begin{aligned} \mathcal {L}_{od}(\nu )= \cdots + \zeta + 7 + \zeta + 5 + \zeta + 2 + \zeta + 1 + \zeta + 3 + \cdots . \end{aligned}$$

Since \(\nu \) is computable, \(\mathcal {L}_{od}(\nu )\) is computably presentable. By Theorem 7, \(\mathcal {L}_{od}(\nu )\) is relatively \(\Delta ^0_4\)-categorical. But we prove below that it is even relatively \(\Delta ^0_3\)-categorical.

Lemma 9

The linear order \(\mathcal {L}_{od}(\nu )\) is relatively \(\Delta ^0_3\)-categorical.

Proof

Since \(|\nu |\) is an injective function, we can find any finite block in the both linear orders using a \(\Delta ^0_3\)-oracle. Then an isomorphism is uniquely defined at finite blocks. Every block of type \(\zeta \) belongs immediately between two finite blocks. Since the range of \(|\nu |\) is computable, and \(\nu \) is strictly increasing, we can find sizes of such blocks in the computable way. The \(\Delta ^0_2\)-construction of an isomorphism at blocks of type \(\zeta \) is straightforward.

It is easy to see that the linear order \(\mathcal {L}_{od}(\nu )\) has a “good” copy. More precisely, there exists a computable presentation \(\mathcal {L}_g\) of \(\mathcal {L}_{od}(\nu )\) such that the successor relation \(S_{\mathcal {L}_g}\), the block relation \(F_{\mathcal {L}_g}\), and the left and the right limit point relations \(P^-_{\mathcal {L}_g}\) and \(P^+_{\mathcal {L}_g}\) are computable. Moreover, for every \(x\in L\), we can effectively find the size of the block containing x, i.e., the function \(f_{\mathcal {L}_g}: L \rightarrow \mathbb {N}\cup \{\zeta \}\), defined by \(f(x) = |[x]_{\mathcal {L}_g}|\), is a computable function. Recall that \(S_{\mathcal {L}_g} = S^0_{\mathcal {L}_g}\), \(F_{\mathcal {L}_g} = F^1_{\mathcal {L}_g}\). For convenience, we introduce the notion \(Inf^\zeta _\mathcal {L}=\{x\in L\mid |[x]_{F}|\cong \zeta \}\).

Now we wish to argue that the constructed linear order is not \(\Delta ^0_2\)-categorical. To show this, we prove the following lemma.

Lemma 10

There is a computable copy \(\mathcal {L}\) of \(\mathcal {L}_g\) such that there is no \(\textbf{0}'\)-computable isomorphism between \(\mathcal {L}\) and \(\mathcal {L}_g\).

Proof

Without loss of generality, we can assume that

$$\begin{aligned} \mathcal {L}_g = (\sum \limits _{i\in \mathbb {N}} (2i+1 + \zeta ))^* + \sum \limits _{j\in \mathbb {N}\setminus \{0\}} (\zeta + 2j). \end{aligned}$$

Since all finite blocks have different sizes, it is enough to consider only one of these two “big” sums. In other words, suppose that \(\widehat{\mathcal {L}}_g = \zeta + 2 + \zeta + 4 + \zeta + \cdots \) is a good copy of \(\mathcal {L}_{od}\). We construct a computable linear order \(\widehat{\mathcal {L}} \cong \widehat{\mathcal {L}}_g\) such that there is no \(\textbf{0}'\)-computable isomorphism \(\varphi : \widehat{\mathcal {L}}_g \rightarrow \widehat{\mathcal {L}}\).

Suppose that \(\varphi ^{\textbf{0}'}_e(x)\) is an enumeration of all partial \(\textbf{0}'\)-computable functions. Let \(\{\sigma _i\}_{i\in \omega }\) be a true-stage enumeration of \(\emptyset '\). We will use requirements \(R_e\) to diagonalize against \(\varphi _e^{\sigma _s}\) being an isomorphism between \(\widehat{\mathcal {L}}\) and \(\widehat{\mathcal {L}}_b\).

We satisfy the following requirements:

\(R_e:\) \(\varphi ^{\lim _{s}\sigma _s}_e(x)\) is not an isomorphism between \(\widehat{\mathcal {L}}_b\) and \(\widehat{\mathcal {L}}\).

We build the linear order \(\mathcal {L}\) as the \(\omega \)-sum of intervals \(I_e\). Namely, \(\widehat{\mathcal {L}} =\omega ^*+ I_0 + I_1 + I_2 + \cdots \). At the end of the construction each \(I_e\) will have type \(\omega + 4e+2 + \zeta + 4e+4 + \omega ^*\) and hence \(\widehat{\mathcal {L}}\cong \widehat{\mathcal {L}}_g\). We use \(I_e\) to satisfy requirement \(R_e\). Now we turn to construct the interval \(I_e\).

We build \(I_e\) as \(A+B+C\). To build each of the subintervals, we use two strategies: the X- and the Y-strategies.

  • The X-strategy builds A as \(\omega \), B as \(4e+2+\omega ^*\), C as \(\omega + 4e+4 +\omega ^*\).

  • The Y-strategy builds A as \(\omega + 4e+2 +\zeta \), B as \(4e+4+\omega ^*\), C as k for some finite k.

Note that, for the both strategies, the type of \(A+B+C\) is \(\omega + 4e+2 + \zeta + 4e+4 + \omega ^*\).

The building for the X- and the Y-strategies is straightforward. To construct a \(\zeta \)-subinterval, we add a new element immediately to the left of old elements of this subinterval and a new element immediately to the right of old elements of this subinterval. To construct \(\omega \)- and \(\omega ^*\)-subintervals, we add new elements in the same natural way. In the construction, the following switching of strategies plays the key role.

The switching from X-strategy to Y-strategy

for A:

We have the \(\omega \)-subinterval, i.e., there are finitely many elements constructing the \(\omega \)-subinterval. We add to them immediately to the right \(4e+2\) new elements for the \((4e+2)\)-subinterval and some elements constructing a new \(\zeta \)-subinterval. So, we build A as \(\omega + 4e+2 +\zeta \).

for B:

We have the \((4e+2)\)-subinterval and the \(\omega ^*\)-subinterval. Now we extend the \((4e+2)\)- to the \((4e+4)\)-subinterval by adding 2 new elements immediately to the right of the \(4e+2\) old elements.

for C:

We have 3 subintervals: the \(\omega \)-, the \((4e+4)\)-, and the \(\omega ^*\)-subinterval. Now we “freeze” these subintervals into one finite subinterval. This means that we “save” the \(4e+4\) elements from the finite subinterval and we will not add new elements into C until it becomes “unfrozen”.

The switching from the Y-strategy to the X-strategy

for A:

We have 3 subintervals: the \(\omega \)-, the \((4e+2)\)-, and the \(\zeta \)-subinterval. Now we “kill” the \((4e+2)\)-subinterval and the \(\zeta \)-subinterval. This means that we build just \(\omega \) by adding new elements to the right. Note that we don’t save elements from the \((4e+2)\)-subinterval.

for B:

We have 2 subintervals: the \((4e+4)\)-, and the \(\omega ^*\)-subinterval. Now we “kill” the 2 right elements from the \((4e+4)\)-subinterval. This means that we add these elements to the \(\omega ^*\)-subinterval and continue to build the \(\omega ^*\) by adding new elements to the left of all of its elements, i.e., we build B as \(4e+2+\omega ^*\). Note that we don’t save the killed elements.

for C:

We have just the k-subinterval, but we remember the “saved” \(4e+4\) elements inside it. Now we just “unfreeze” the X-strategy.

The construction of \(I_e\)

At stage 0. We run the X-strategy. For A, start the building the \(\omega \)-subinterval. For B, put \(4e+2\) elements for the \((4e+2)\)-subinterval and start the building \(\omega ^*\) immediately to the right of them. For C, put \(4e+4\) elements for the \((4e+4)\)-subinterval, start the building the \(\omega \)-subinterval immediately to the left of them and start the building the \(\omega ^*\)-subinterval immediately to the right of them.

At stage \(s+1\). Let \(y_e\) be the first element of the block of size \(4e+4\) in \(\widehat{\mathcal {L}}_g\). If \(\varphi _e^{\sigma _s}(y_e)\) is the first element of the block of size \(4e+4\) in \(\widehat{\mathcal {L}}\), then we just switch the current strategy. If not, we continue to use the current strategy. This finishes the construction of \(I_e\).

Now we wish to argue that the construction works. Suppose \(\varphi _e^{\textbf{0}'}(y_e)\) is defined. Then there is \(s_0\) such that \(\varphi _e^{\textbf{0}'}(y_e) = \varphi _e^{\sigma _s}(y_e)\) for any \(s\ge s_0\). Hence, the construction does not switch the current strategy at any stage \(s>s_0\). And, therefore, \(\varphi _e\) is not an isomorphism. Note that if the construction uses only the X-strategy after stage \(s_0\) then A has type \(\omega \), B has type \(4e+2+\omega ^*\), and C has type \(\omega + 4e+4 +\omega ^*\) at the end of the construction; and if the construction use only the Y-strategy after stage \(s_0\) then A has type \(\omega + 4e+2 +\zeta \), B has type \(4e+4+\omega ^*\), and C has type k (for some finite k) at the end of the construction.

Suppose \(\varphi _e^{\textbf{0}'}(y_e)\) is undefined. Therefore, \(\varphi _e\) could not be an isomorphism. But possibly there are infinitely many stages s such that \(\varphi _e^{\sigma _s}(y_e)\) seems correct. This means that the construction switches strategies infinitely many times, i.e.,

for A:

We “killed” all \((4e+2)\)-subintervals and right \(\zeta \)-subintervals. Hence A has type \(\omega \) at the end of the construction.

for B:

We “killed” all 2 right elements from the \((4e+4)\)-subinterval. Hence B has type \(4e+2+\omega ^*\) at the end of the construction.

for C:

We “unfroze” the X-strategy infinitely many times. Hence C has type \(\omega + 4e+4+ \omega ^*\) at the end of the construction.

Hence, from Lemma 10 it follows that there is a \(\Delta _3^0\)-, but not \(\Delta _2^0\)-categorical scattered linear order of rank 2.

Now we consider the case of a finite rank \(n = m+2 \ge 2\) and \(\beta =2m+3 \ge 3\) (i.e., \(\alpha = 0\)). Then the desired example would be \(\zeta ^{m}\mathcal {L}_g\). By relativization of Lemma 10, we have that there exists a \(\textbf{0}^{2m}\)-computable copy \(\widetilde{\mathcal {L}}\) of the linear order \(\mathcal {L}_g\) such that there is no \(\textbf{0}^{2m+1}\)-computable isomorphism between them. Thus, we need the following well-known theorem due to Watnick:

Theorem 11

([25]) A linear order \(\mathcal {L}\) has a \(\textbf{0}''\)-computable copy if and only if \(\zeta \mathcal {L}\) has a computable copy.

Moreover, it follows from the proof of this theorem that there exists a \(\textbf{0}''\)-computable homomorphism from \(\zeta \mathcal {L}\) onto \(\mathcal {L}\). By the relativization, we have the following statement:

A linear order \(\mathcal {L}\) has an \(X''\)-computable copy if and only if \(\zeta \mathcal {L}\) has an X-computable copy, moreover, there exists an \(X''\)-computable homomorphism from \(\zeta \mathcal {L}\) onto \(\mathcal {L}\).

Applying this fact to \(\widetilde{\mathcal {L}}\), we can construct a sequence of linear orders \(\zeta \widetilde{\mathcal {L}}\), \(\zeta ^2\widetilde{\mathcal {L}}\),\(\ldots \)\(\zeta ^m\widetilde{\mathcal {L}}\) such that the \(\zeta ^i\widetilde{\mathcal {L}}\) are \(\textbf{0}^{2m-2i}\)-computable, and there exists a \(\textbf{0}^{2m-2i}\)-computable homomorphism from \(\zeta ^i\widetilde{\mathcal {L}}\) onto \(\zeta ^{i-1}\widetilde{\mathcal {L}}\). Then the composition of the homomorphisms is a \(\textbf{0}^{2m}\)-computable homomorphism from \(\zeta ^{m}\widetilde{\mathcal {L}}\) onto \(\widetilde{\mathcal {L}}\). Consequently, there is no \(\textbf{0}^{2m}\)-computable isomorphism between the “good” copy of \(\zeta ^{m}\mathcal {L}_g\) and the linear order \(\zeta ^{m}\widetilde{\mathcal {L}}\).

Now we turn to the consideration of the case \(\beta = 3\) and arbitrary \(\alpha + n\ge 2\). If \(\beta = 2\gamma +3\) (recall that \(\beta \ge 3\) and \(\beta \not = 2\gamma '+1\) for a limit \(\gamma '\), by the conditions of the theorem) and \(\alpha +n = \gamma +\delta \) then \(\gamma =0\) and \(2+\delta =\alpha +n\). To define \(\mathcal {L}_{\gamma ,\delta }(\nu ) = \mathcal {L}_{0,\delta }(\nu )\), we consider a computable function \(\nu :\mathbb {Z}^\delta \times \mathbb {Z}\rightarrow \mathbb {Z}{\setminus }\{0\}\) such that:

1) \(|\nu |:\mathbb {Z}^\delta \times \mathbb {Z}\rightarrow \mathbb {N}{\setminus }\{0\}\) is an injective function with a computable range;

2) for every \(i \in \mathbb {Z}^\delta \), we define \(\nu _i(\cdot ) = \nu (i,\cdot )\). Every \(\nu _i:\mathbb {Z}\rightarrow \mathbb {Z}\) is a computable strictly increasing function. Moreover, the module \(|\nu _i|:\mathbb {Z}\rightarrow \mathbb {N}\setminus \{0\}\) is an injective function with a computable range uniformly by i.

Define \(\mathcal {L}_{0,\delta }(\nu )=\sum \limits _{i\in \mathbb {Z}^\delta }\mathcal {L}_{od}(\nu _i)\). It is easy to see that statements similar to Lemma 10 hold for \(\mathcal {L}_{0,\delta }(\nu )\). Thus, the linear order \(\mathcal {L}_{0,\delta }(\nu )\) has rank \(\alpha + n\) and it is \(\Delta ^0_3\)-categorical, but it is not \(\Delta ^0_2\)-categorical.

Now we wish to argue the general case. Suppose that we have \(\gamma \) and \(\delta \) such that \(2\gamma +3=\beta \), \(\gamma +2+\delta =\alpha +n\). Such \(\gamma \) and \(\delta \) exist, since \(\beta \le \alpha +2n\).

We take the function \(\nu \) and the linear order \(\mathcal {L}_{0,\delta }(\nu )\) from the previous case. Then the required linear order has the form \(\mathcal {L}_{\gamma ,\delta }(\nu )=\zeta ^\gamma \mathcal {L}_{0,\delta }(\nu )\). Since \(\gamma \) can be a finite or an infinite ordinal, we need to use the following result of C. Ash, K. Jockusch and J. Knight [26] instead of Watnick’s theorem.

Theorem 12

Suppose that \(\alpha \) is an infinite computable ordinal, \(n\in \omega \) and \(\textbf{d}\) is a Turing degree. For every \(\textbf{d}^{\alpha +2n+1}\)-computable linear order \(\mathcal {L}\), there exists a \(\textbf{d}\)-computable linear order \(\zeta ^{\alpha +n}\mathcal {L}\).

As for Watnick’s theorem, it follows from the proof of Ash-Jockusch-Knight that there exists a \(\textbf{d}^{\alpha +2n+1}\)-computable homeomorphism from \(\zeta ^{\alpha +n}\mathcal {L}\) onto \(\mathcal {L}\).

4.2 Case of an even successor ordinal

The example construction scheme will be similar to the construction in the previous section.

Initially, we construct a linear order of rank 2 which is \(\Delta ^0_4\)-categorical, but is not \(\Delta ^0_3\)-categorical.

As before, \(\nu :\mathbb {Z}\rightarrow \mathbb {Z}\setminus \{0\}\) is a computable strictly increasing function such that \(|\nu |:\mathbb {Z}\rightarrow \mathbb {N}\setminus \{0\}\) is an injective function with a computable range.

The following linear order \(\mathcal {L}_{ev}(\nu )= \sum \limits _{i\in \mathbb {Z}}(\zeta +\omega \cdot |\nu (i)|)\) satisfies the theorem’s conditions. And note that \(\mathcal {L}_{ev}(\nu )\) is computably presentable, since \(\nu \) is computable.

Lemma 13

The linear order \(\mathcal {L}_{ev}(\nu )\) is relatively \(\Delta ^0_4\)-categorical.

Proof

Generally speaking, in this form the statement of the lemma follows from the upper bound on the level of categoricity for orders of rank 2 (Theorem 7). However, we give an alternative direct proof for the order \(\mathcal {L}_{ev}(\nu )\), which is easily translated to the case, where the level of categoricity is less than the upper bound.

Let \(\mathcal {L}\) and \(\mathcal {L}'\) be computable linear orders isomorphic to \(\mathcal {L}_{ev}\). For every \(i\in \mathbb {Z}\), we find sets \(w_1<v_1<\cdots<v_{|\nu (i)|}<u_1<\cdots<u_{|\nu (i+1)|}<w_2\) from \(\mathcal {L}\), and \(w'_1<v'_1<\cdots<v'_{|\nu (i)|}<u'_1<\cdots<u'_{|\nu (i+1)|}<w'_2\) from \(\mathcal {L}'\) such that

  1. 1)

    all points are the left limit points, i.e., \(P^-(w_p)\), \(P^-(v_l)\), \(P^-(u_k)\);

  2. 2)

    \(\lnot S_2(w_1,\,v_{1})\), \(S_2(v_l,\,v_{l+1})\), \(S_2(u_k,\,u_{k+1})\), \(\lnot S_2(u_{|\nu (i+1)|},\,w_{2})\);

  3. 3)

    \( \lnot (\exists z)[w_1<z<v_1\, \& \, P^-(z)]\), \( \lnot (\exists z)[u_{|\nu (i+1)}|<z<w_2\, \& \, P^-(z)]\).

The corresponding conditions hold for elements \(v_l', u_k'\) and \(w_1', w'_2\).

Define \(\varphi ((S^+_0)^m(v_l))=(S^+_0)^m(v'_l)\) and \(\varphi ((S^+_0)^m(u_k))=(S^+_0)^m(u'_k)\) for every \(m\in \mathbb {N}\), every l and k with \(1\le l \le |\nu (i)|\) and \(1\le k \le |\nu (i+1)|\). We find elements z and \(z'\) the least as natural numbers such that \(v_{|\nu (i)|}<z<u_{1}\), \(v'_{|\nu (i)|}<z'<u'_{1}\) and \(\lnot F(v_{|\nu (i)|},z)\), \(\lnot F(z,u_1)\), \(\lnot F(v'_{|\nu (i)|},z')\), \(\lnot F(z',u'_1)\). Now, we can define \(\varphi ((S^+_0)^m(z))=(S^+_0)^m(z')\) for every \(m\in \mathbb {Z}\). It is easy to see that \(\varphi \) is a \((\mathcal {L}_1\oplus \mathcal {L}_2)'''\)-computable isomorphism.

As in Sect. 4.1 above, the linear order \(\mathcal {L}_{ev}(\nu )\) has a “good” copy \(\mathcal {L}_g\). More precisely, there exists a computable presentation \(\mathcal {L}_g\) of \(\mathcal {L}_{ev}(\nu )\) such that relations \(S_{\mathcal {L}_g}\), \(S^1_{\mathcal {L}_g}\), \(F_{\mathcal {L}_g}\), \(P^-_{\mathcal {L}_g}\) and \(P^+_{\mathcal {L}_g}\) are computable. Now we wish to argue that the constructed linear order is not \(\Delta ^0_3\)-categorical. To show this, we prove the following two lemmas.

Lemma 14

There is a \(\textbf{0}''\)-computable structure

$$\begin{aligned} \mathcal {L}_2=\langle L_2; <_{\mathcal {L}_2}; S_{\mathcal {L}_2}, F_{\mathcal {L}_2},P^{-}_{\mathcal {L}_2}\rangle \end{aligned}$$

such that \(Inf^\zeta _{\mathcal {L}_2}\) is computable, \(\langle L_2; <_{\mathcal {L}_2}\rangle \cong \mathcal {L}_g\) and there is no \(\textbf{0}''\)-computable isomorphism between them.

Proof

Without lost of generality as in the proof of Lemma 10, let \(\widehat{\mathcal {L}}_g = \zeta + \omega \cdot 2 + \zeta + \omega \cdot 4 + \zeta + \cdots \) be a good copy of \(\mathcal {L}_{ev}\). We construct a \(\textbf{0}''\)-computable linear order \(\widehat{\mathcal {L}}_2 \cong \widehat{\mathcal {L}}_g\) such that \(S_{\widehat{\mathcal {L}}_2}\), \(F_{\widehat{\mathcal {L}}_2}\) and \(P^{-}_{\widehat{\mathcal {L}}_2}\) are \(\textbf{0}''\)-computable and there is no \(\textbf{0}''\)-computable isomorphism \(\varphi : \widehat{\mathcal {L}}_g \rightarrow \widehat{\mathcal {L}}_2\).

Initially, we put all even natural numbers as all the left limit points of the intervals \(\omega \cdot (2e)\). Also, we use all natural numbers of the form \(4k+1\) to build all intervals of type \(\zeta \). From each interval \(\omega \cdot (2e)\) we choose two witnesses \(x_e\) and \(y_e\) as the first and the last left limit points of \(\omega \cdot (2e)\).

Then at each stage s, firstly, we will extend the constructed order copying \(\widehat{\mathcal {L}}_g\) using natural numbers of the form \(4k+3\) (so, the universe of the constructed order will be \(\mathbb {N}\)), and, secondly, try to diagonalize \(\varphi ^{\textbf{0}''}_e\) as follows. Perhaps, after diagonalizations for the witnesses \(x_{e'}\) and \(y_{e'}\) for \(e' < e\), the witnesses \(x_{e}\) and \(y_{e}\) will belong to \(\omega \cdot (2e_s)\) such that \(e_s>e\).

If \(\varphi ^{\textbf{0}''}_e\) does not look like an isomorphism on the left limit points between \(x_e\) and \(y_e\), then we do nothing. Suppose that it does. Then, for each \(e''\ge e\), we add two new the left limit points between \(x_{e''}\) and \(y_{e''}\) such that the interval with them becomes \(\omega \cdot (2e''_s+2)\). This means that we extend all intervals \(\omega \cdot (2e_s'')\) to \(\omega \cdot (2e_s''+2)\) for \(e'' > e\). Finally, we add a new interval \(\omega \cdot (2e_s)+\zeta \) immediately to the left of \(x_e\).

It is easy to see that \(\widehat{\mathcal {L}}_2 \cong \widehat{\mathcal {L}}_g\) and \(\varphi ^{\textbf{0}''}_e\) is not an isomorphism between \(\widehat{\mathcal {L}}_2\) and \(\widehat{\mathcal {L}}_g\) for every e. Since the intervals of type \(\zeta \) were never changed, the set \(Inf^\zeta _{\mathcal {L}_2}=\{x\in L_2\mid [x]_{F}\cong \zeta \}\) is computable.

Lemma 15

Suppose that \(\mathcal {L}'=\langle L';\, <_{\mathcal {L}'},\, S_{\mathcal {L}'},\, F_{\mathcal {L}'},\,P^+_{\mathcal {L}'},\,P^-_{\mathcal {L}'}\rangle \) is a \(\textbf{0}''\)-computable structure such that \(\langle L';\, <_{\mathcal {L}'}\rangle \cong \mathcal {L}_{ev}\) and \(Inf^\zeta _{\mathcal {L}'}\in \Delta _2^0\) (moreover, it can be \(\textbf{0}''\)-computable). Then there exists a computable linear order which is \(\textbf{0}''\)-isomorphic to \(\mathcal {L}'\).

Proof

To prove the lemma, we use two steps. Firstly, by [27], there are a \(\textbf{0}'\)-computable structure \(\mathcal {L}''=\langle L'';\, <_{\mathcal {L}''},\, S_{\mathcal {L}''}\rangle \) and a \(\textbf{0}''\)-computable embedding function \(\psi _1:\mathcal {L}'\rightarrow \mathcal {L}''\) with some properties, in particular, such that if x and y are in the same block then \(\psi _1(x)\) and \(\psi _1(y)\) are in the same block. Moreover, blocks containing x and \(\psi _1(x)\) have the same type. Since \(Inf^\zeta _{\mathcal {L}'}\) is \(\textbf{0}''\)-computable, we can find a \(\textbf{0}''\)-computable set C containing exactly one element from each block of the linear order \(\mathcal {L}''\) such that if \(x\in C\) and belongs to a block of type \(\omega \), then x is the left limit point.

Then we define an isomorphism \(\varphi _1\) at points from C in the following way. If x belongs to a block of type \(\zeta \) then \(\varphi _1(x)=\psi _1(x)\). If x belongs to a block of type \(\omega \) then \(\varphi _1(x)=y\), where y is the left limit point from the block containing \(\psi _1(x)\). It easy to see that there is the unique extension of the mapping \(\varphi _1\) to an isomorphism between \(\mathcal {L}'\) and \(\mathcal {L}''\). This extension can be done using a \(\textbf{0}''\)-oracle. Therefore, \(\mathcal {L}''\cong _{\textbf{0}''}\mathcal {L}'\) and, moreover, \(Inf^\zeta _{\mathcal {L}''}\) is \(\textbf{0}''\)-computable.

Finally, by [28], there exist a computable linear order \(\mathcal {L}'''\) and a \(\textbf{0}'\)-computable embedding function \(\psi _2:\mathcal {L}''\rightarrow \mathcal {L}'''\) such that if x and y are in the same block then \(\psi _2(x)\) and \(\psi _2(y)\) are in the same block. By the same reason as above, \(\psi _2\) can be modified to a \(\textbf{0}''\)-computable isomorphism. So, \(\mathcal {L}'''\) is computable and \(\mathcal {L}'''\cong _{\textbf{0}''}\mathcal {L}''\cong _{\textbf{0}''}\mathcal {L}'\).

For other cases we proceed as before. Namely, suppose \(2\gamma +4=\beta \), \(\gamma +2+\delta =\alpha +n\) (remember that such \(\gamma \) and \(\delta \) exist, since \(\beta \le \alpha +2n\)) and \(\nu :\mathbb {Z}^\delta \times \mathbb {Z}\rightarrow \mathbb {Z}{\setminus }\{0\}\) is a computable function such that:

  1. 1)

    \(\nu (j,\cdot ):\mathbb {Z}\rightarrow \mathbb {Z}\setminus \{0\}\) is a computable strictly increasing function;

  2. 2)

    \(|\nu (j,\cdot )|:\mathbb {Z}\rightarrow \mathbb {N}\setminus \{0\}\) is an injective function with a uniformly by j computable range.

Define \(\mathcal {L}_{0,\delta }(\nu )=\sum \limits _{i\in \mathbb {Z}^\delta } \mathcal {L}_{ev}(\nu (i,\cdot ))\). It easy to see that we have the statement analogous to (relativized) Lemmas 14 and 15 for the linear order \(\mathcal {L}_{0,\delta }(\nu )\).

The required linear order has the form \(\mathcal {L}_{\gamma ,\delta }(\nu )=\zeta ^\gamma \mathcal {L}_{0,\delta }(\nu )\).

4.3 Case of a limit ordinal

Suppose \(\beta \) is a constructive limit ordinal and \(\beta _j\) is a computable sequence of (odd) ordinals such that \(\lim \limits _{j\in \omega }\beta _j=\beta \).

If the rank is a successor ordinal \(\alpha +n+1\) then let \(2\gamma _j+3=\beta _j\), \(\gamma _j+2+\delta _j=\alpha +n\). Otherwise, if the rank is a limit ordinal \(\alpha \), then we suppose that \(\alpha _j+n_j\) is a computable sequence of ordinals such that \(\lim \limits _{j\in \omega }(\alpha _j+n_j)=\alpha \), \(\beta _j\le \alpha _j+2n_j\) for all j, and \(2\gamma _j+3=\beta _j\), \(\gamma _j+2+\delta _j=\alpha _j+n_j\).

For both cases, we choose a uniformly computable sequence of functions \(\nu _j: \mathbb {Z}^{\delta _j}\times \mathbb {Z}\rightarrow \mathbb {Z}{\setminus }\{0\}\) such that

  1. 1)

    \(|\nu _j|:\mathbb {Z}^{\delta _j}\times \mathbb {Z}\rightarrow \mathbb {N}{\setminus }\{0\}\) is an injective function with a computable range uniformly in j;

  2. 2)

    for every \(i \in \mathbb {Z}^{\delta _j}\), the function \(\nu _j(i,\cdot ):\mathbb {Z}\rightarrow \mathbb {Z}\setminus \{0\}\) is a computable strictly increasing function. Moreover, the module \(|\nu _j(i,\cdot )|:\mathbb {Z}\rightarrow \mathbb {N}\setminus \{0\}\) is an injective function with a computable range uniformly by j and i;

  3. 3)

    \(rng (|\nu _{j_1}|)\cap rng (|\nu _{j_2}|)=\emptyset \) for \(j_1\not =j_2\);

  4. 4)

    \(\nu _j\) has only odd values for any j.

It easy to see that the linear order \(\sum \limits _{j\in \omega } (\mathcal {L}_{\gamma _j,\delta _j}(\nu _j)+2j)\) has the required properties.