1 Summary of results

Monounary algebras are the simplest types of algebraic structure which are not entirely trivial, and yet display some interesting structure and behaviours. In this paper we work with residual finiteness and the related properties of strong/weak subalgebra separability and complete separability. Throughout this paper we will use \({\mathbb {N}}\) to denote the set of non-negative integers, and \({\mathbb {N}}^+\) to denote the set of positive integers. For a monounary algebra \((A,f)\) we use, for \(x\in A\) and \(n\in {\mathbb {N}}\) the notion of preimage sets \(f^{-n}(x)\) (defined in Section 2) to give necessary and sufficient conditions for \(A\) to have these properties (Theorems 4.36.7, and 6.14). Specifically:

Residual finiteness. For all \(x,y\in A\) such that \(x\ne y\) and \(f(x)=f(y)\), there exists \(n\in {\mathbb {N}}\) such that either \(f^{-n}(x)=\varnothing \) or \(f^{-n}(y)=\varnothing \). Strong/weak subalgebra separability. For all \(x\in A\), either there exists \(n\in {\mathbb {N}}\) such that \(f^{-n}(x)=\varnothing \), or \(x\) is in a cycle. Complete separability. For all \(a\in A\) there exists \(n\in {\mathbb {N}}\) such that \(f^{-n}(a){\setminus }\bigcup _{i=0}^{n-1}f^{-i}(a)=\varnothing \).

We then consider direct products, and take into particular consideration algebras where for every \(x\in A\) there exists \(n\in {\mathbb {N}}\) such that \(f^{-n}(x)=\varnothing \), which we call backwards-bounded. We show in Theorems 5.66.10, and 6.17 that when it comes to direct products, all of these properties behave in the same way. More precisely, we show that a direct product has property \({\mathcal {P}}\) if and only if one of the following is true: both components have property \({\mathcal {P}}\), or at least one of them is backwards-bounded.

2 Basics of monounary algebras and residual finiteness

We will begin with an introduction to monounary algebras, and prove some results regarding their structure which are both useful in the overall context of this paper, but also are helpful for the reader to visualise these algebraic structures. A general overview of monounary algebras can be found in [1].

A unary operation is a function from a set to itself, and a monounary algebra is a set together with a single unary operation defined on it. Note that we will usually identify a monounary algebra with its underlying set, and as such will omit mentioning the function where it is not necessary. A monounary algebra \((A,f)\) can be visualised in a natural way, as a directed graph; the vertices are the elements of \(A\), and for all \(a\in A\) there is a directed edge from \(a\) to its image \(f(a)\). Note that there is exactly one out-edge at each vertex. We now define a few specific monounary algebras, which will be used in the paper:

Example 2.1

  1. (1)

    The \(n\)-line is the monounary algebra \(L_n=(\{\,0,1,\dots ,n-1\,\},x\mapsto \max \{\,0,x-1\,\})\).

  2. (2)

    The \(n\)-cycle is the monounary algebra \(C_n=(\{\,0,1,\dots ,n-1\,\},x\mapsto (x+1)\) mod \(n)\).

  3. (3)

    The \(n\)-trivial monounary algebra on \(n\) points is \(T_n=(\{\,0,1,\dots ,n-1\,\},x\mapsto x)\).

  4. (4)

    The bi-infinite path \(({\mathbb {Z}},x\mapsto x+1)\), hereafter referred to as \({\mathbb {Z}}\).

Note that \(L_n, C_n\) and \(T_n\) are defined for all \(n\in {\mathbb {N}}^+\).

Some specific instances of these algebras are depicted in Figure 1.

We will be using a number of results about the structure of these graphs, rephrased as results about monounary algebras. Many of these results can be found in [2] in more detail. Relevant graph theory definitions and results can be found in [3], and a discussion of the combinatorial aspects of monounary algebras can be found in [4].

One particular graph theoretic property we will deal with is connectedness. A monounary algebra is called connected if the corresponding undirected graph is connected. For the purposes of this paper, it will almost always be sufficient to prove results for connected monounary algebras.

As is the usual for algebraic structures, we have notions of subalgebras and homomorphisms. For a monounary algebra \((A,f)\) a subalgebra \((S,g)\) of \(A\) is a subset \(S\subseteq A\) such that \(f(S)\subseteq S\) with a unary operation \(g=f|_S\), the restriction of \(f\) to \(S\). A function \(\phi :A\rightarrow B\) between two monounary algebras \((A,f_1)\) and \((B,f_2)\) is a homomorphism if \(\phi (f_1(a))=f_2(\phi (a))\) for all \(a\in A\). An isomorphism is a homomorphism which is a bijection.

Lemma 2.2

Let \(A\) be a monounary algebra. Then:

  1. (1)

    If \(A\) is finite and non-empty, there is a subalgebra \(C\le A\) which is a cycle (i.e. \(C\cong C_k\) for some \(k\in {\mathbb {N}}^+\)).

  2. (2)

    If \(A\) is connected and there exists a subalgebra \(C\) isomorphic to a cycle, then it is the unique such subalgebra, and is contained in every non-empty subalgebra of \(A\).

We omit the proof of this Lemma, as it is sufficiently simple. The important observation to show uniqueness is that paths cannot come out of a cycle, they must go into cycles (see Figure 2).

Fig. 1
figure 1

The monounary algebras \(L_4\), \(C_4\), \(T_4\) and \({\mathbb {Z}}\)

Fig. 2
figure 2

There cannot be a path between two cycles

For a monounary algebra \((A,f)\), and a subset \(S\subseteq A\), we may want to consider the subalgebra generated by \(S\), denoted \(\langle S\rangle \). By this we mean the smallest subalgebra of \(A\) containing \(S\), which can be constructed as follows:

$$\begin{aligned} \langle S\rangle = \{\,f^n(s):n\in {\mathbb {N}}\text {, }s\in S\,\}. \end{aligned}$$

Residual finiteness is a property which has been studied in depth for a number of algebraic structures (groups in particular) for many decades. One can find discussions of residual finiteness in groups in [5, Chapter 9] as well as in [6, Chapter 2]. The notion has also been investigated in general algebraic structures, such as in [7], which looks at the relationship between residual finiteness and other algebraic properties. A recent work in this area is [8], which discusses residual finiteness of direct products in congruence modular varieties. It is with the goal of understanding how the property is reflected in general algebraic structures, that we investigate its nature in this specific type of structure.

We now define the property of residual finiteness for monounary algebras.

Definition 2.3

A monounary algebra \(A\) is residually finite if for all distinct \(x,y\in A\), there exists a finite monounary algebra \(F\) and a homomorphism \(\phi :A\rightarrow F\) such that \(\phi (x)\ne \phi (y)\).

We give the specific example of \({\mathbb {Z}}\), and show that it is residually finite. This will be used in the main classification theorem for residual finiteness in Section 4.

Lemma 2.4

The monounary algebra \({\mathbb {Z}}\) is residually finite.

Proof

Let \(a\),\(b\in {\mathbb {Z}}\) with \(a\ne b\), and set \(m=|b-a|+1\). Then we construct a map \(\phi :{\mathbb {Z}}\rightarrow C_m\) defined by \(\phi (n) = n\pmod {m}\). It is then easy to verify that this is a homomorphism, and that \(\phi (a)\ne \phi (b)\). An example is depicted in Figure 3. \(\square \)

Fig. 3
figure 3

The homomorphism \(\phi \) separates a and b in a finite algebra

One of the main motivations for this paper is to study how residual finiteness interacts with direct products. The following is well-known in universal algebra:

Lemma 2.5

Let \(A\) and \(B\) be residually finite algebras of the same type. Then the direct product \(A\times B\) is residually finite.

Proof

If two pairs \((a_1,b_1),(a_2,b_2)\in A\times B\) are not equal, then they differ in at least one component. Assume without loss of generality that \(a_1\ne a_2\). Then as \(A\) is residually finite there exists a homomorphism \(\phi :A\rightarrow F\) where \(F\) is finite and \(\phi (a_1)\ne \phi (a_2)\). Thus, letting \(\pi _1:A\times B\rightarrow A\) be the projection onto the first co-ordinate, we have that \(\theta =\pi _1\circ \phi :A\times B\rightarrow F\) is a homomorphism such that \(\theta (a_1)\ne \theta (a_2)\). \(\square \)

But the converse is more challenging. That is: if \(A\times B\) is residually finite, is it true that both \(A\) and \(B\) are residually finite? It was shown in [9] that this is true for many well-studied classes of algebras, via the following proposition.

Proposition 2.6

Let \(A\) and \(B\) be algebras, and suppose that \(A\) contains an idempotent. If \(A\times B\) is residually finite then \(B\) is residually finite.

Note: an idempotent is an element \(e\) such that \(f(e,e,\dots ,e)=e\) for every operation \(f\). Equivalently, it is an element such that \(\{\,e\,\}\) is a subalgebra.

From this proposition it follows that the condition is true for any class which always contains idempotents, such as: groups, rings, monoids, semilattices, loops, quasirings etc.

Less obviously, in [9] the analogous assertion was also shown for the variety of semigroups, which do not necessarily have idempotents. However it is not true in unary algebras. Specifically, [9] provided an example of a residually finite product of monounary algebras, one of which is not residually finite, as well as an example of two biunary algebras neither of which are residually finite, but whose product is. We will show in Section 5 that in monounary algebras, at least one component must be residually finite to obtain residual finiteness in the direct product.

3 Preliminaries on preimages

We now introduce some notation for a key concept featured in the major results in this paper, that of preimage sets.

Notation 3.1

Let \((A,f)\) be a monounary algebra, and \(a\in A\). Then for \(n\in {\mathbb {N}}\) we define

$$\begin{aligned} f^{-n}(a) = \{\,b\in A:f^n(b)=a\,\}. \end{aligned}$$

In graphical terms, this would be the set of points from which there is a walk of length \(n\) terminating at \(a\).

It turns out that this is the most important thing to consider when dealing residual finiteness of a monounary algebra, and so this chapter is dedicated to their properties, and some constructions we can use them for.

Definition 3.2

For a monounary algebra \(A\), we say a point \(a\in A\) is backwards eternal if \(f^{-n}(a)\ne \varnothing \) for all \(n\in {\mathbb {N}}\).

Backwards eternality is particularly useful, and so it is worth clarifying that it is not equivalent to a point being at the end of a path of infinite length, it can also be at the end of infinitely many finite paths with no upper bound on length, as in the following example.

Example 3.3

Let \(A={\mathbb {N}}\cup \{\,(a,b)\in {\mathbb {N}}^2:a\le b\,\}\), and define a unary operation by

$$\begin{aligned} f(x) = {\left\{ \begin{array}{ll} x+1 &{} \text {if }x\in {\mathbb {N}},\\ 0 &{} \text {if }x\in \{\,0\,\}\times {\mathbb {N}},\\ x-(1,0) &{}\text {otherwise}.\\ \end{array}\right. } \end{aligned}$$

This monounary algebra is depicted in Figure 4. Every point in \({\mathbb {N}}\) is backwards eternal.

Fig. 4
figure 4

A monounary algebra containing a backwards eternal point, but no backwards infinite paths

Note that, for simplicity, in the following lemma we identify \(f^n(a)\) with the set \(\{\,f^n(a)\,\}\) for \(n\in {\mathbb {N}}\).

Lemma 3.4

Let \((A,f)\) be a monounary algebra, and \(a,x\in A\). Then:

  1. (i)

    \(f^n(f^{-m}(a))\subseteq f^{n-m}(a)\) for all \(n\),\(m\in {\mathbb {N}}\);

  2. (ii)

    if there exists \(n\in {\mathbb {N}}\) such that \(f^{-n}(a)=\varnothing \), then \(f^{-m}(a)=\varnothing \) for all \(m\ge n\);

  3. (iii)

    if \(a\) is in a cycle then \(a\) is backwards eternal;

  4. (iv)

    if \(a\) is not in a cycle, then \(f^{-n}(a)\cap f^{-m}(a)=\varnothing \) for any distinct \(n\),\(m\in {\mathbb {N}}\);

  5. (v)

    \(f(x)\in f^{-n}(a)\) if and only if \(x\in f^{-(n+1)}(a)\).

Proof

(i) First note that \(f^m(f^{-m}(a))=a\) by definition, and so the result follows trivially for \(n\ge m\). For \(n<m\), note that for all \(b\in f^{-m}(a)\) we have that \(a=f^m(b)=f^{m-n}(f^n(b))\), so \(f^n(b)\in f^{n-m}(a)\).

(ii) Follows immediately from (i).

(iii) Let \(k\) be the length of the cycle containing \(a\). Then \(a\in f^{-mk}(a)\) for all \(m\in {\mathbb {N}}\). So by (ii) we have that \(f^{-n}(a)\ne \varnothing \) for all \(n\in {\mathbb {N}}\).

(iv) Assume not, and that \(n>m\). Then there exists \(b\in f^{-n}(a)\cap f^{-m}(a)\). So \(f^n(b)=f^m(b)=a\), and it follows that \(f^{n-m}(a)=a\), so \(a\) is in a cycle, a contradiction.

(v) Follows immediately from the definition. \(\square \)

These results are sufficiently intuitive that they will be used without explicit reference in later sections. The following is slightly more complicated, and deals with the interactions between pre-images of distinct points.

Lemma 3.5

Let \((A,f)\) be a connected monounary algebra, and let \(a,b\in A\) be two distinct elements. Then precisely one of the following is true:

  1. (1)

    There exists \(n\in {\mathbb {N}}\) such that \(f^n(a)=b\) or \(f^n(b)=a\);

  2. (2)

    \((\bigcup _{n\in {\mathbb {N}}}f^{-n}(a))\cap (\bigcup _{n\in {\mathbb {N}}}f^{-n}(b))=\varnothing \).

Additionally, in the case of (2), there exist \(n\),\(m\in {\mathbb {N}}\) such that \(f^n(a)=f^m(b)\).

Proof

It is clear that if (1) is true then (2) is false. It is then sufficient to show that if (1) is false, then (2) must be true.

We show the contrapositive. Assume (2) is false. It therefore follows that there exists \(x\in A\) such that \(x\in f^{-n}(a)\cap f^{-m}(b)\) for some \(n\),\(m\in {\mathbb {N}}\). We thus have that \(f^n(x)=a\) and \(f^m(x)=b\). Assuming without loss of generality that \(n<m\), we get that \(b=f^m(x)=f^{m-n}(f^n(x))=f^{m-n}(a)\), so (1) is true.

Finally, for the additional condition, when (2) is true, as \(A\) is connected there exists an (undirected) path \((a=a_0,a_1,\dots ,a_k=b)\). If this path were a directed path, then we would have (1), so this is not the case.

As an out-edge corresponds to the action of the function \(f\), there cannot be two out-edges at a vertex \(a_i\). Thus for a path to not be directed there must exist an \(a_i\) with two in-edges, or in other words, \(a_i=f(a_{i-1})=f(a_{i+1})\). Since \(f(a_{i-1}){=}a_i{\ne } a_{i-2}\) we have that \(f(a_{i-2}){=}a_{i-1}\), or in other words, the edge goes from \(a_{i-2}\) to \(a_{i-1}\). Repeating this process until we reach \(a\) gives us that \(f^i(a)=a_i\) and a similar process from \(a_{i+1}\) gives us that \(f^{k-i}(b)=a_i=f^i(a)\). \(\quad \square \)

Fig. 5
figure 5

The two possibilities as discussed in Lemma 3.5

The two possibilities are depicted in Figure 5.

We will now use preimage sets to construct some homomorphisms which will be used in later sections.

Lemma 3.6

Let \((A,f)\) be a connected monounary algebra containing a cycle of length \(k\). Then there exists a homomorphism \(\phi :A\rightarrow C_k\).

Proof

Fix a point \(a\in A\) contained in the cycle. Note that since \(A\) is connected, we have that for all \(y\in A{\setminus }\{\,a\,\}\) there exists \(n\in {\mathbb {N}}\) such that \(f^n(y)\) is in the cycle. Thus there exists a minimal \(n_y\in {\mathbb {N}}\) such that \(f^{n_y}(y)=a\). Then since the unary operation on \(C_k\) (which we will call \(f_{C_k}\)) is a bijection, \(f_{C_k}^{-n}\) is a well defined function for all \(n\in {\mathbb {N}}\). Thus we define a function \(\phi :A\rightarrow C_k\) as follows:

$$\begin{aligned} \phi (x) = {\left\{ \begin{array}{ll} 0 &{} \text {if }a=x,\\ f_{C_k}^{-n_x}(0) &{}\text {otherwise}. \end{array}\right. } \end{aligned}$$

We show this is a homomorphism. If \(n_x\ge 2\) then \(f^{n_x-1}(f(x))=a\) and so

$$\begin{aligned} \phi (f(x))=f_{C_k}^{-n_{f(x)}}(0)=f_{C_k}^{-n_x+1}(0)=f_{C_k}(f_{C_k}^{-n_x}(0))=f_{C_k}(\phi (x)). \end{aligned}$$

If \(n_x=1\) then

$$\begin{aligned} \phi (f(x))=\phi (a)=0=f_{C_k}(f_{C_k}^{-1}(0))=f_{C_k}(\phi (x)). \end{aligned}$$

If \(x=a\) then \(n_{f(x)}=k-1\), and so

$$\begin{aligned} \phi (f(x))=f_{C_k}^{-k+1}(0)=f_{C_k}^k(f_{C_k}^{-k+1}(0))=f_{C_k}(0)=f_{C_k}(\phi (x)).[-2.8pc] \end{aligned}$$

\(\square \)

Lemma 3.7

Let \(A\) be a monounary algebra. Suppose \(a\in A\) such that \(f^{-n}(a)=\varnothing \) for some \(n\in {\mathbb {N}}\). Define \(\lambda _a:A\rightarrow L_{n+1}\) by:

$$\begin{aligned} \lambda _a(x)= {\left\{ \begin{array}{ll} m+1 &{} \text {if }x\in f^{-m}(a),\\ 0 &{} \text {else}. \end{array}\right. } \end{aligned}$$

Then

  1. (i)

    \(\lambda _a\) is a homomorphism.

  2. (ii)

    \(\lambda _a(a)=\lambda _a(b)\) if and only if \(a=b\).

Proof

By Lemma 3.4, \(a\) is not in a cycle, thus the \(f^{-i}(a)\) are disjoint for all \(i<n\), so \(\lambda _a\) is a well-defined function. If \(x\in f^{-k}(a)\) for some \(k\ge 1\) then by Lemma 3.4, we have \(\lambda _a(f(x))=\lambda _a(x)-1=f_{L_{n+1}}(\lambda _a(x))\). If \(x=a\) then \(f(x)=f(a)\not \in f^{-k}(a)\) for any \(k\in {\mathbb {N}}\), so \(\lambda _a(f(x))=0=\lambda _a(x)-1=f_{L_{n+1}}(\lambda _a(x))\). Finally, if \(x\not \in f^{-k}(a)\) for all \(k\in {\mathbb {N}}\) then by Lemma 3.4, \(f(x)\not \in f^{-k}(a)\) for all \(k\in {\mathbb {N}}\). Hence \(\lambda _a(f(x))=0=f_{L_{n+1}}(\lambda _a(x))\). Thus \(\lambda _a\) is a homomorphism. Furthermore, \(\lambda _a^{-1}(\lambda _a(a))=\lambda _a^{-1}(1)=f^{-0}(a)=\{\,a\,\}\). \(\square \)

Notation 3.8

This type of homomorphism will make repeated appearances throughout the paper, as it allows us to separate \(a\) from all other elements of \(A\) in a finite homomorphic image. As such we will reserve the notation \(\lambda _a\) specifically for these homomorphisms.

4 A graphical characterisation of residual finiteness

This section provides a criterion for residual finiteness of monounary algebras. The proof of the criterion uses results from previous sections, in particular Lemmas 3.5 and 2.2. But first, we briefly discuss how connectedness can affect residual finiteness.

Lemma 4.1

Let \((A,f)\) be a monounary algebra, with connected components \(\{\,K_i:i\in {\mathcal {I}}\,\}\) (where \({\mathcal {I}}\) is an arbitrary index set). Then \(A\) is residually finite if and only if \(K_i\) is residually finite for all \(i\in {\mathcal {I}}\).

Proof

First assume each of the \(K_i\) is residually finite. Let \(x\),\(y\in A\), then there exist \(i_x\),\(i_y\in {\mathcal {I}}\) such that \(x\in K_{i_x}\) and \(y\in K_{i_y}\). Then if \(i_x\ne i_y\) we can construct a homomorphism \(\phi :A\rightarrow T_2\) as follows:

$$\begin{aligned} \phi (a)= {\left\{ \begin{array}{ll} 0 &{} \text {if }a\in K_{i_x},\\ 1 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

It is easily verifiable that \(\phi \) is a homomorphism, and \(\phi (x)\ne \phi (y)\). If \(i_x=i_y\) then since \(K_{i_x}\) is residually finite, there exists a homomorphism \(\phi :K_{i_x}\rightarrow F\), where \(F\) is finite, such that \(\phi (x)\ne \phi (y)\). Let \(F'=F\sqcup T_1\) be the disjoint union of \(F\) with \(T_1\). Then we extend \(\phi \) to a homomorphism \(\Phi :A\rightarrow F'\) by letting \(\Phi (A{\setminus } K_{i_x})= 0\) where \(0\) is the single point in \(T_1\). Thus \(A\) is residually finite.

For the converse, simply note that residual finiteness is preserved under taking subalgebras. \(\square \)

Lemma 4.2

Let \((A,f)\) be a monounary algebra, and \((B,g)\) a finite monounary algebra such that there is a homomorphism \(\phi :A\rightarrow B\). If \(x,y\in A\) are distinct backwards eternal elements such that \(f(x)=f(y)\), then \(\phi (x)=\phi (y)\).

Proof

As \(x,y\) are in the same connected component of \(A\), we can assume without loss of generality that \(A\) is connected. We may also assume without loss of generality that \(\phi \) is surjective, and thus that \(B\) is connected.

Since \(f^{-n}(x)\ne \varnothing \) for all \(n\in {\mathbb {N}}\), then there exists \(x_n\in A\) such that \(f^n(x_n)=x\). Applying \(\phi \), we get \(\phi (f^n(x_n))=g^n(\phi (x_n))=\phi (x)\). Thus \(g^{-n}(\phi (x))\ne \varnothing \) for all \(n\in {\mathbb {N}}\). However, since \(B\) is finite, there must be elements which lie in the intersection of two preimage sets of \(\phi (x)\), and so it follows from Lemma 3.4 (iv) that \(\phi (x)\) is in the unique cycle in \(B\). However, we can apply the same logic to \(y\) to see that \(\phi (y)\) is also in the cycle. But \(g(\phi (x))=\phi (f(x))=\phi (f(y))=g(\phi (y))\), and since \(g\) is a bijection when restricted to the cycle, it follows that \(\phi (x)=\phi (y)\) (Figures 6, 7). \(\square \)

Fig. 6
figure 6

Showing the results of attempting to get a finite homomorphic image of an algebra which fails the RF criterion

Fig. 7
figure 7

RF criterion fails due to x and y

Theorem 4.3

Let \((A,f)\) be a monounary algebra. Then the following are equivalent:

  1. (1)

    \(A\) is residually finite,

  2. (2)

    for all distinct \(x,y\in A\) such that \(f(x)=f(y)\), there exists \(n\in {\mathbb {N}}\) such that either \(f^{-n}(x)=\varnothing \) or \(f^{-n}(y)=\varnothing \).

Notation 4.4

As we will make repeated reference to it, for simplicity we will refer to the second condition as the RF criterion.

Proof

By Lemma 4.1, we may assume without loss of generality that \(A\) is connected.

(1)\(\Rightarrow \)(2) Follows immediately from Lemma 4.2.

(2)\(\Rightarrow \)(1) Next we show that if the RF criterion holds, then the algebra is residually finite. We shall do this by constructing homomorphisms. Let \(x,y\in A\). Note that via Lemma 3.5, we have that one of the following holds

  1. (1)

    There exists \(n\in {\mathbb {N}}\) such that \(f^n(x)=y\) or \(f^n(y)=x\).

  2. (2)

    \((\bigcup _{n\in {\mathbb {N}}}f^{-n}(x))\cap (\bigcup _{n\in {\mathbb {N}}}f^{-n}(y))=\varnothing \).

We shall first deal with case 2. By Lemma 3.5, we may find minimal \(i,j\in {\mathbb {N}}\) (with \(i,j\ge 1\) such that \(f^i(x)=f^j(y)\). Call this common point \(p\). It then follows that there exist \(x'=f^{i-1}(x)\ne f^{j-1}(y)=y'\) such that \(f(x')=f(y')=p\). It then follows by the RF criterion that, without loss of generality, there exists \(n'\in {\mathbb {N}}\) such that \(f^{-n'}(x')=\varnothing \) (and by Lemma 3.4, \(n'>i-1\)), and so setting \(n=n'-(i-1)\) we have \(f^{-n}(x)=\varnothing \). Then we can use \(\lambda _x\) from Lemma 3.7, which is a homomorphism to a finite algebra, and \(\lambda _x(x)\ne \lambda _x(y)\).

For case 1, note that if there exists a finite cycle \(C_k\subset A\) and a backwards eternal element \(a\in A{\setminus } C_k\), then the RF criterion does not hold. Thus if there exists a cycle, then for every point \(a\in A\) which is not in the cycle, there exists \(m\in {\mathbb {N}}\) such that \(f^{-m}(a)=\varnothing \). We can thus further separate case 1 into subcases:

  1. (a)

    both \(x\) and \(y\) are in the cycle \(C_k\);

  2. (b)

    there exists \(m\in {\mathbb {N}}\) such that \(f^{-m}(x)=\varnothing \) or \(f^{-m}(y)=\varnothing \);

  3. (c)

    there are no cycles in \(A\).

For subcase 1(a), note that as the algebra is connected and contains a cycle we can use the homomorphism \(\phi \) defined in Lemma 3.6. Then note that this homomorphism separates all elements of the cycle from each other, and so \(\phi (x)\ne \phi (y)\).

For subcase 1(b), we can again use \(\lambda _x\) or \(\lambda _y\).

For subcase 1(c), we note that if we are not also in subcase 1(b), we have that \(y\) is backwards eternal and \(f^i(y)\ne f^j(y)\) for all distinct \(i, j\in {\mathbb {N}}\). Let \(Z=\{\,f^i(y):i\in {\mathbb {N}}\,\}\cup (\bigcup _{n\in {\mathbb {N}}}f^{-n}(y))\). Let \(z\in A{\setminus } Z\), then by Lemma 3.5, there exist \(i\),\(j\in {\mathbb {N}}\) such that \(f^i(z)=f^j(y)\). Thus for each \(a\in A{\setminus } Z\) we associate the value \(p(z)=j-i\in {\mathbb {Z}}\). Then let \(P_k=\{\,z\in A{\setminus } Z:p(z)=k\,\}\). We thus have that \(A=Z\sqcup (\bigsqcup _{i\in {\mathbb {Z}}}P_i)\). We then define a function \(\theta :A\rightarrow {\mathbb {Z}}\) as follows:

$$\begin{aligned} \theta (a)= {\left\{ \begin{array}{ll} -k &{} \text {if }a\in f^{-k}(y)\cup P_{-k},\\ 0 &{} \text {if }a\in \{\,y\,\}\cup P_0,\\ k &{} \text {if }a\in \{\,f^k(y)\,\}\cup P_k. \end{array}\right. } \end{aligned}$$

We show that this is a homomorphism to the monounary algebra \({\mathbb {Z}}\) and that \(\theta (x)\ne \theta (y)\). If \(a\in f^{-k}(y)\) for some \(k\ge 1\) then \(f(a)\in f^{-k+1}(y)\), and so \(\theta (f(a))=-k+1=\theta (a)+1\). If \(a=y\) then \(\theta (f(a))=1=0+1=\theta (a)+1\). If \(a=f^k(y)\) for some \(k\ge 1\) then \(\theta (f(a))=\theta (f^{k+1}(y))=k+1=\theta (a)+1\). If \(a\in P_k\) for some \(k\in {\mathbb {Z}}\) and \(f(a)=f^{k+1}(y)\) then \(\theta (f(a))=k+1=\theta (a)+1\). If \(a\in P_k\) for some \(k\in {\mathbb {Z}}\) and \(f(a)\ne f^{k+1}(y)\) then \(f(a)\in P_{k+1}\) so \(\theta (f(a))=k+1=\theta (a)+1\). Thus \(\theta \) is a homomorphism. And since we have that \(f^n(x)=y\) or \(f^n(y)=x\) for some \(n\in {\mathbb {N}}\), it is clear that \(\theta (x)\ne \theta (y)\).

Then using Lemma 2.4, we can construct a homomorphism \(\sigma :{\mathbb {Z}}\rightarrow C_m\) for some \(m\in {\mathbb {N}}\) such that \(\sigma (\theta (x))\ne \sigma (\theta (y))\). Thus the composition \(\sigma \theta \) is a homomorphism into a finite algebra which separates \(x\) and \(y\) as required. \(\square \)

If we were to rephrase the RF criterion in graphical terms, it would be as follows:“For all distinct vertices \(x,y\), if there exists a vertex \(z\) such that \((x,z),(y,z)\) are edges, then at least one of \(x\) or \(y\) has a finite bound on the length of walks that terminate there.” We can also phrase it in terms of backwards eternality, and it would become: “For all \(a\in A\), at most one element of \(f^{-1}(a)\) is backwards eternal.”

5 Direct products

Our primary goal in this section is to use our criterion from Section 4 to obtain necessary and sufficient conditions on components of a direct product of monounary algebras for the direct product itself to be residually finite.

We first take note of a class of monounary algebras that seems to exhibit residual finiteness that is, in some sense, more powerful than usual. We shall give this particular type of monounary algebra a name, as they turn out to have some very strong separation properties, and behave in fundamentally different ways with respect to direct products.

Definition 5.1

A monounary algebra \(A\) is called backwards-bounded if for all \(a\in A\) there exists an \(n\in {\mathbb {N}}\) such that \(f^{-n}(a)=\varnothing \). Equivalently, it is a monounary algebra which contains no backwards eternal elements.

Note that it is possible for \(f^{-m}(a)\) to be an infinite set, as there could be infinitely many paths ending at \(a\), but with finite maximum length.

Rephrased in graphical terms, this becomes: “A monounary algebra \(A\) is backwards-bounded if for all vertices \(x\) there is a finite bound on the length of walks which terminate at \(x\).”

By definition such structures satisfy the RF criterion, and so;

Lemma 5.2

Backwards-bounded monounary algebras are residually finite.

In addition, for a direct product \((A\times B,f)\) of monounary algebras \((A,f_1),(B,f_2)\), we have \(f^n((a,b))=(f_1^n(a),f_2^n(b))\). From this we get the following lemma, which shows that the finite number of non-empty preimages is particularly powerful. From here on, we will drop the double brackets and write \(f(a,b)\) instead of \(f((a,b))\), and whenever we have a direct product, we will use \(f_i\) to refer to the operation on the \(i\)th component and \(f\) to refer to the operation on the product unless otherwise specified.

Lemma 5.3

For a direct product \(A\times B\) of monounary algebras \(A\) and \(B\), we have \(f^{-n}(x,y)=f_1^{-n}(x)\times f_2^{-n}(y)\).

Proof

$$\begin{aligned} (a,b)\in f^{-n}(x,y)&\Leftrightarrow f^n(a,b)=(x,y),\\&\Leftrightarrow f_1^n(a)=x, f_2^n(b)=y\\&\Leftrightarrow a\in f_1^{-n}(x) , b\in f_2^{-n}(y).[-2.8pc] \end{aligned}$$

\(\square \)

This yields the following two propositions about residual finiteness of certain direct products, which essentially show that backwards-boundedness forces direct products to be residually finite, and that it is the only class of monounary algebras that do so.

Proposition 5.4

Let \(A\) be a backwards-bounded monounary algebra. Then for any monounary algebra \(B\) we have that \(A\times B\) is backwards bounded, and hence residually finite.

Proof

Let \((a,b)\in A\times B\). Then there exists \(k_a\in {\mathbb {N}}\) such that \(f_1^{-k_a}(a)=\varnothing \). It then follows by Lemma 5.3 that \(f^{-k_a}(a,b)=\varnothing \). Thus we have that for every point \(x\in A\times B\), there exists an \(n\in {\mathbb {N}}\) such that \(f^{-n}(x)=\varnothing \), and so \(A\times B\) is backwards-bounded. Thus \(A\times B\) is residually finite. \(\square \)

Proposition 5.5

Let \(A\) be a non-residually finite monounary algebra, and \(B\) another monounary algebra. If \(A\times B\) is residually finite then \(B\) is backwards-bounded.

Proof

We show the contrapositive: assume \(B\) is not backwards-bounded, so there exists \(b\in B\) which is backwards eternal.

As \(A\) is not residually finite, the RF criterion does not hold, so there exist two distinct backwards eternal points \(x,y\in A\). Consider the points \((x,b),(y,b)\in A\times B\). These are distinct points and \(f(x,b)=(f_1(x),f_2(b))=(f_1(y),f_2(b))=f(y,b)\). Then since \(f_1^{-n}(x),f_1^{-n}(y),f_2^{-n}(b)\ne \varnothing \) for all \(n\in {\mathbb {N}}\), it follows by Lemma 5.3 that \(f^{-n}(x,b),f^{-n}(y,b)\ne \varnothing \) for all \(n\in {\mathbb {N}}\). Thus by Theorem 4.3, \(A\times B\) is not residually finite. \(\square \)

These propositions combine to give us the following theorem, which determines the residual finiteness of a direct product of monounary algebras from the properties of the components. In particular it shows there is only one way to get a residually finite product without both components being residually finite.

Theorem 5.6

A direct product of monounary algebras, \(A\times B\), is residually finite if and only if one of the following holds:

  1. (1)

    Both \(A\) and \(B\) are residually finite.

  2. (2)

    \(A\) is backwards-bounded.

  3. (3)

    \(B\) is backwards-bounded.

Proof

The reverse implication follows trivially for 1, and from Proposition 5.4 for 2 and 3. For the forward implication, let \(A\times B\) be residually finite. Then if 1 is not true, then at least one of \(A\) and \(B\) is not residually finite, so by Proposition 5.5, the other is backwards-bounded, giving 2 or 3. \(\square \)

We can easily extend this result to arbitrary products.

Theorem 5.7

For an arbitrary index set \({\mathcal {I}}\), a direct product of monounary algebras \(\prod _{i\in I}X_i\) is residually finite if and only if one of the following holds:

  1. (1)

    \(X_i\) is residually finite for all \(i\),

  2. (2)

    There exists an \(i\) such that \(X_i\) is backwards-bounded.

Proof

First note that it can be seen shortly from Lemma 5.3 that in fact a direct product is backwards bounded if and only if at least one of its component is backwards-bounded.

For the reverse direction, note we can show (1) implies the product is residually finite in exactly the same way as in the case for two factors. For (2), as at least one component is backwards-bounded, the product is backwards-bounded (and thus residually finite). For the forward implication, note that if at least one of the factors \(X_i\) is not residually finite and the rest are not backwards-bounded, then the remaining product \(\prod _{j\in {\mathcal {I}}{\setminus }\{\,i\,\}}X_j\) is not backwards bounded, and so the whole product is not residually finite. Thus if the product is residually finite, and at least one of the factors is not residually finite, then at least one factor must be backwards-bounded. \(\square \)

As a brief aside, we consider subdirect products, subalgebras of the direct product such that the projection maps are surjective. We show that the equivalence we obtained for direct products does not hold, by constructing an explicit example of a residually finite subdirect product of two monounary algebras, neither of which are residually finite.

Example 5.8

We define a monounary algebra \(A\) on the set \({\mathbb {Z}}\cup \{\,-{\overline{n}}:n\in {\mathbb {N}}^+\,\}\) by

$$\begin{aligned} f(x) = {\left\{ \begin{array}{ll} 0 &{} \text {if }x=-{\overline{1}},\\ -\overline{(n-1)} &{}\text {if }x=-{\overline{n}}, n>1,\\ x+1 &{}\text {otherwise}. \end{array}\right. } \end{aligned}$$

Note: What we are doing is attaching another disjoint copy of the negatives to the integers, and this is the same monounary algebra that is depicted in Figure 8.

We then consider the direct product of this algebra with

$$\begin{aligned} N=({\mathbb {N}},\max \{\,x-1,0\,\}). \end{aligned}$$

Both components fail the RF criterion (with the points \(-1\) and \(-{\overline{1}}\) for \(A\) and \(0\) and \(1\) for \(B\)) so by Theorem 5.6, \(A\times N\) is not residually finite. However, we can construct a subdirect product which is residually finite. Consider the subalgebra of the direct product \(A\times N\) generated by the set

$$\begin{aligned} G=\{\,(n,0):n\in {\mathbb {Z}}\,\}\cup \{\,(-{\overline{m}},2m):m\in {\mathbb {N}}^+\,\} \end{aligned}$$

(this is depicted in Figure 9). This is clearly a subdirect product, and satisfies our criterion from Theorem 4.3, as each element \(x\) other than those in \({\mathbb {Z}}\times \{\,0\,\}\) has the property that \(f^{-n}(x)=\varnothing \) for a large enough \(n\in {\mathbb {N}}\).

Fig. 8
figure 8

An example of a monounary algebra which is not residually finite

Fig. 9
figure 9

A residually finite subdirect product of not residually finite monounary algebras

It is worth noting however, that as backwards-boundedness is preserved under subalgebras, if either component is backwards-bounded, then any subdirect product is also backwards-bounded, and hence residually finite.

6 Further separability properties

In this section we discuss three notions related to residual finiteness: weak and strong subalgebra separability, and complete separability. While these properties have been studied for some time, such as in [10] and [11], the names used for them have not been consistent. The names we use are from [12], as these are designed to be more descriptive of the property. We provide characterisations for these properties, and show how they interact with direct products in a similar fashion to how we dealt with residual finiteness.

Definition 6.1

A monounary algebra \(A\) is strongly (weakly) subalgebra separable if for any \(a\in A\) and any (any finitely generated) subalgebra \(B\le A\) such that \(a\not \in B\), there exists a finite monounary algebra \(F\) and a homomorphism \(\phi :A\rightarrow F\) such that \(\phi (a)\not \in \phi (B)\).

To deal with these conditions we will introduce the notion of bi-eternal monounary algebras. We show in Theorem 6.7 that these algebras are the only ones which distinguish residual finiteness from strong and weak subalgebra separability.

Definition 6.2

A monounary algebra \(A\) is bi-eternal if there exists \(a\in A\) such that the following two conditions hold:

  1. (1)

    \(f^i(a)=f^j(a)\) if and only if \(i=j\),

  2. (2)

    \(a\) is backwards eternal.

Remark 6.3

From here on we shall refer to the first criterion from the above definition as the forward eternality.

Rephrased in graphical terms, the forward eternality condition becomes: “The unique infinite walk starting at \(a\) is an infinite path.”

Example 6.4

The monounary algebra \({\mathbb {Z}}\) is bi-eternal, as any point satisfies both eternality conditions.

Example 3.3 is an example of a bi-eternal monounary algebra which does not contain \({\mathbb {Z}}\) as a subalgebra.

It is useful to note that the forward eternality condition corresponds to not having a cycle (in the corresponding connected component) and the backwards eternality condition means we do not have backwards-boundedness. We can thus split connected monounary algebras into three distinct classes.

Lemma 6.5

Let \(A\) be a connected monounary algebra. Then exactly one of the following is true:

  1. (1)

    \(A\) contains a cycle,

  2. (2)

    \(A\) is bi-eternal,

  3. (3)

    \(A\) is backwards bounded.

Proof

Assume \(A\) is not bi-eternal. If there is a point for which the forward eternality condition fails, then there exists a cycle in \(A\), and since \(A\) is connected, every point therefore fails the forward eternality condition. Otherwise, the forward eternality condition holds for every point, thus no point is backwards eternal, and so \(A\) is backwards bounded. \(\square \)

Remark 6.6

Note that, in much the same way as residual finiteness, weak and strong subalgebra separability hold if and only if they hold for every connected component.

We now show that strong and weak subalgebra separability are equivalent and that bi-eternality is the only thing which separates them from residual finiteness.

Theorem 6.7

For a monounary algebra \(A\), the following are equivalent:

  1. (1)

    \(A\) is strongly subalgebra separable,

  2. (2)

    \(A\) is weakly subalgebra separable,

  3. (3)

    \(A\) is residually finite and not bi-eternal,

  4. (4)

    For all \(x\in A\) either \(x\) is contained in a cycle or there exists \(n\in {\mathbb {N}}\) such that \(f^{-n}(x)=\varnothing \).

Proof

Since bi-eternality is determined by the existence of a point with certain properties, a monounary algebra is bi-eternal if and only if at least one of its connected components is bi-eternal, and so we can assume without loss of generality that \(A\) is connected.

(1)\(\Rightarrow \)(2). This follows from the definitions.

(2)\(\Rightarrow \)(3) We show the contrapositive.

If \(A\) is not residually finite, then we can take the two points which fail the RF criterion, \(x\) and \(y\). Since they are distinct points with the same image under the unary operation, at most one of them can be in a cycle. Thus we must have at least one of \(x\not \in \langle y\rangle \) or \(y\not \in \langle x\rangle \). But as these two points are backwards eternal, by Lemma 4.2 they cannot be mapped to distinct points in a finite algebra , and so we must have that \(\phi (x)\in \langle \phi (y)\rangle \) and \(\phi (y)\in \langle \phi (x)\rangle \) for any \(\phi \) a homomorphism from \(A\) to a finite monounary algebra. Hence \(A\) is not weakly subalgebra separable.

If \(A\) is bi-eternal, then consider the element \(a\) for which the eternality conditions hold. The forward eternality condition shows that \(a\) is not in a cycle, and so \(a\not \in \langle f(a)\rangle \). Now if \(\phi \) is a homomorphism from \(A\) to a finite monounary algebra \((F,g)\), then \(\phi (\langle f(a)\rangle )\) is a non-empty subalgebra of \(F\) and so contains the cycle of \(F\). But as \(a\) is backwards eternal, for all \(n\in {\mathbb {N}}\) there exists \(a_n\in A\) such that \(g^n(\phi (a_n))=\phi (a)\). As \(F\) is finite, some of these must be the same, which forces \(\phi (a)\) to be in the cycle of \(F\), so \(\phi (a)\in \phi (\langle f(a)\rangle )\). Thus \(A\) is not weakly subalgebra separable.

(3)\(\Rightarrow \)(1) Since \(A\) is not bi-eternal, we can use Lemma 6.5 to split into cases:

  1. (1)

    \(A\) is backwards-bounded,

  2. (2)

    \(A\) contains a cycle (and is residually finite).

In case (1), for any \(a\in A\) and \(B\subset A\) such that \(a\not \in B\), we can use \(\lambda _a\) as defined in Lemma 3.7, as in this case \(\phi (a)\not \in \phi (A{\setminus }\{\,a\,\})\supseteq \phi (B)\).

In case (2), since the cycle is contained in every non-empty subalgebra, if \(a\in A\) is in the cycle of \(A\) then \(B=\varnothing \), and we are done. If \(a\in A\) is not in the cycle, then \(f^{-n}(a)=\varnothing \) for some \(n\in {\mathbb {N}}\). Thus we can once again use \(\lambda _a\).

Thus in either case \(A\) is strong subalgebra separable.

(3)\(\Rightarrow \)(4) Using Lemma 6.5 we can conclude that \(A\) is either backwards-bounded (in which case we are done), or contains a cycle and is residually finite. But since every element \(a\) of the cycle has \(f^{-n}(a)\ne \varnothing \) for all \(n\), in order to be residually finite, we must have that for every element \(x\) outside the cycle \(f^{-n}(x)=\varnothing \) for some \(n\in {\mathbb {N}}\).

(4)\(\Rightarrow \)(3) Now assume for every \(x\in A\) either \(x\) is contained in a cycle or there exists \(n\in {\mathbb {N}}\) such that \(f^{-n}(x)=\varnothing \). Thus the only backwards eternal elements are the cycle elements (if the cycle exists) and so the RF criterion is satisfied, and it is clear to see by the definition that \(A\) is not bi-eternal, as the forward eternality condition is not satisfied by any point. \(\square \)

Rephrasing the fourth condition in graphical term, it becomes: “For any vertex \(x\) which is not in a cycle, then there is a finite bound on the length of walks terminating at \(x\).” In terms of backwards eternality, it is: “Every backwards eternal element is contained in a cycle.”

For the rest of this document we shall refer to such algebras as subalgebra separable for simplicity.

Lemma 6.8

Let \(A\) be a bi-eternal monounary algebra. Then for \(B\) a monounary algebra , \(A\times B\) is bi-eternal if and only if \(B\) is not backwards-bounded.

Proof

The forward implication follows immediately from Proposition 5.4.

For the converse, note that if \(B\) is not backwards-bounded then it is either bi-eternal or contains a cycle. If \(x\in A\) satisfies the eternality conditions, then in both cases we identify a corresponding point in the direct product which satisfies the eternality condition. If \(B\) contains a cycle, let \(b\) be a point in the cycle. Then \((x,b)\) satisfies the eternality conditions: the first is inherited from \(x\), and the second follows from Lemma 5.3. If \(B\) is instead bi-eternal, then we can take a point \(y\in B\) which satisfies the eternality conditions, and \((x,y)\) also satisfies the eternality conditions by the same argument as for \((x,b)\). \(\square \)

Lemma 6.9

For monounary algebras \(A\) and \(B\), if \(A\times B\) is bi-eternal, then at least one of \(A\) and \(B\) is bi-eternal.

Proof

Since a monounary algebra is bi-eternal if at least one connected component is bi-eternal, we may assume without loss of generality that \(A\) and \(B\) are connected. Note that \(A\times B\) is backwards-bounded if and only if at least one of its components is backwards-bounded. Thus neither \(A\) nor \(B\) is backwards bounded and so by Lemma 6.5 each must be either bi-eternal or contain a cycle. Let us assume for a contradiction, that both contain a cycle. Then for every \((a,b)\in A\times B\), there exists \(n,m\in {\mathbb {N}}\) such that \(f_1^n(a)\) is in the cycle of \(A\) and \(f_2^m(b)\) is in the cycle of \(B\). Then, since a pair with both coordinates in the corresponding cycle of the component is in a cycle in the product, \(f^{n+m}(a,b)\) is in a cycle, and so \((a,b)\) does not satisfy the eternality condition. Since \((a,b)\) was arbitrary, \(A\times B\) is not bi-eternal, a contradiction. \(\square \)

Using these results, we obtain a result that mirrors Theorem 5.6. In particular, the conditions for a direct product of monounary algebras to be subalgebra separable are the same as those for being residually finite (replacing residually finite with subalgebra separable).

Theorem 6.10

Let \(A\) and \(B\) be monounary algebras. Then \(A\times B\) is subalgebra separable if and only if one of the following is true.

  1. (1)

    \(A\) and \(B\) are subalgebra separable,

  2. (2)

    \(A\) is backwards-bounded,

  3. (3)

    \(B\) is backwards-bounded.

Proof

Note that \(A\times B\) is the union of the direct products of each connected component of \(A\) with each connected component of \(B\). Then since a monounary algebra is subalgebra separable if and only if its connected components are subalgebra separable (and similarly for backwards-bounded), we may assume without loss of generality that \(A\) and \(B\) are connected.

For the converse, if one component is backwards-bounded, then by Proposition 5.4, \(A\times B\) is backwards-bounded, and thus subalgebra separable by Theorem 6.7, item (4). If both \(A\) and \(B\) are subalgebra separable, then they are both residually finite and not bi-eternal, and so by Theorem 5.6 and Lemma 6.9, the product is both residually finite and not bi-eternal, and thus is subalgebra separable.

For the forward implication, we show the contrapositive. Thus we assume one of \(A\) or \(B\) (say \(A\)) is not subalgebra separable (and so by Theorem 6.7, either is not residually finite or is bi-eternal), and that neither is backwards-bounded. In particular, as neither are backwards-bounded, Theorem 5.6 tells us that if \(A\) was not residually finite, the direct product is not residually finite, and thus not subalgebra separable by Theorem 6.7. If \(A\) was instead bi-eternal then, by Lemma 6.8 the direct product is bi-eternal and thus not subalgebra separable. \(\square \)

Having dealt with subalgebra separability, we now move on to the concept of complete separability.

Definition 6.11

A monounary algebra is completely separable if for every \(a\in A\) there exists a finite monounary algebra \(F\) and homomorphism \(\phi :A\rightarrow F\) such that \(\phi (a)\not \in \phi (A{\setminus }{a})\).

Lemma 6.12

Let \(A\) be a monounary algebra. If \(A\) is completely separable, then it is also subalgebra separable (and thus residually finite).

Proof

This is immediate from the definitions. \(\square \)

In fact, the converse of this lemma only fails in a specific scenario. The obstacle is cycles, which need not be considered for subalgebra separability as they are contained in every non-empty subalgebra. As such we will use the following definition to deal with complete separability.

Definition 6.13

Let \((A,f)\) be a monounary algebra. Then we define

$$\begin{aligned} B_n(a)=f^{-n}(a){\setminus }\bigcup _{i=0}^{n-1}f^{-i}(a) \end{aligned}$$

Theorem 6.14

A monounary algebra \((A,f)\) is completely separable if and only if for all \(a\in A\) there exists \(n\in {\mathbb {N}}\) such that \(B_n(a)=\varnothing \).

Proof

As per usual, we may assume without loss of generality that \(A\) is connected. First assume that \(A\) is completely separable. Let \(x\in A\) with corresponding finite algebra \((F,g)\) and homomorphism \(\phi :A\rightarrow F\). Consider \(\phi (x)\). If \(\phi (x)\) is not in the cycle of \(F\), then as \(F\) is finite there exists \(n\in {\mathbb {N}}\) such that \(g^{-n}(\phi (x))=\varnothing \). But since \(\phi \) is a homomorphism, if \(y\in f^{-n}(x)\) then \(\phi (y)\in g^{-n}(\phi (x))\). Thus \(f^{-n}(x)=\varnothing \) (and so \(B_n(x)=\varnothing \)). Now if \(\phi (x)\) is in the cycle of \(F\) then, denoting the cycle length by \(k\), we have \(\phi (f^k(x))=g^k(\phi (x))=\phi (x)\), and so by complete separability we have that \(f^k(x)=x\), and so \(x\) is in the cycle of \(A\). As \(F\) is finite, there exists \(n\in {\mathbb {N}}\) such that \(B_n(\phi (x))=\varnothing \). Thus if \(B_n(x)\ne \varnothing \), then \(\phi (B_n(x))\) is in the cycle. Let \(m\) be the least multiple of the cycle length greater than \(n\). Then if \(B_m(x)\ne \varnothing \), we have \(\phi (B_m(x))=\phi (x)\) a contradiction. Thus \(B_m(x)=\varnothing \).

Now assume that for all \(a\in A\) there exists \(n\in {\mathbb {N}}\) such that \(B_n(a)=\varnothing \). For \(x\in A\), if \(x\) is not in a cycle, then \(B_n(x)=f^{-n}(x)=\varnothing \) so we can use the standard homomorphism \(\lambda _x\) to separate \(x\). Now let \(x\in A\) be in the cycle, and say the cycle has length \(k\). As \(A\) is connected, the cycle is the minimal non-empty subalgebra, and so every element of \(A\) is in \(B_m(x)\) for precisely one \(m\). Let \(N\in {\mathbb {N}}\) be the minimal value such that \(B_N(x)=\varnothing \), then as \(f(B_n(a))\subseteq B_{n-1}(a)\), it follows that \(B_M(x)=\varnothing \) for all \(M\ge N\). Thus we construct a homomorphism to an algebra \(F=(\{\,0,\dots ,N-1\,\},g)\) where \(g\) is given by:

$$\begin{aligned} g(y) = {\left\{ \begin{array}{ll} k &{}\text {if }y=0,\\ y-1 &{}\text {otherwise}. \end{array}\right. } \end{aligned}$$

and the homomorphism \(\phi :A{\rightarrow } F\) is given by \(\phi (B_n(x)){=}n\). This is a homomorphism as \(f(B_n(x))\subseteq B_{n-1}(x)\) for \(n\ge 1\) and \(f(x)\in B_k(x)\). Addition-ally, \(\phi ^{-1}(0)=\{\,x\,\}\) and so \(x\) is completely separated by \(\phi \) as required. \(\square \)

Rephrasing the condition in graphical terms, it becomes: “For all vertices \(a\), there is a finite bound on the length of paths terminating at \(a\). Note that the use of \(B_n(a)\) rather than \(f^{-n}(a)\) corresponds to considering paths instead of walks.”

Example 6.15

Consider the monounary algebra formed by taking every \(n\)-line (as defined in Example 2.1) and identifying the zeros (depicted in Figure 10). This is subalgebra separable, but not completely separable.

Fig. 10
figure 10

A monounary algebra which is subalgebra separable, but not completely separable

Lemma 6.16

Let \(A,B\) be monounary algebras, and \((a,b)\in A\times B\). Then

$$\begin{aligned} B_n(a,b)=(B_n(a)\times f_2^{-n}(b))\cup (f_1^{-n}(a)\times B_n(b)). \end{aligned}$$

Proof

Note that, by the definition of \(B_n\), we have that \(f^{-n}(x) = B_n(0)\sqcup \dots \sqcup B_n(x)\). Using this together with the Lemma 5.3 shows that the pairs in \(B_n(a,b)\) are precisely those that contain either an element of \(B_n(a)\) or an element of \(B_n(b)\). \(\square \)

Now we get conditions for a direct product to be completely separable based on the properties of the components, and again, the conditions turn out to be the same as for residual finiteness and subalgebra separability.

Theorem 6.17

Let \(A\) and \(B\) be monounary algebras, then \(A\times B\) is completely separable if and only if one of the following is true:

  1. (1)

    \(A\) and \(B\) are completely separable,

  2. (2)

    \(A\) is backwards-bounded,

  3. (3)

    \(B\) is backwards-bounded.

Proof

For the converse, if either \(A\) or \(B\) is backwards-bounded then by Proposition 5.4, \(A\times B\) is backwards-bounded and so by Theorem 6.14, is completely separable. If both are completely separable then for all \((a,b)\in A\times B\) there exists an \(n\in {\mathbb {N}}\) such that \(B_n(a)=B_n(b)=\varnothing \), and so \(B_n(a,b)=\varnothing \times f_2^{-n}(b)\cup f_1^{-n}(a)\times \varnothing =\varnothing \) and so \(A\times B\) is completely separable.

For the forward implication, we show the contrapositive. Assume without loss of generality that \(A\) is not completely separable and \(B\) is not backwards bounded. Then there exists \(a\in A\) and \(b\in B\) such that for all \(n\in {\mathbb {N}}\) \(B_n(a)\ne \varnothing \) and \(f_2^{-n}(b)\ne \varnothing \), and so \(B_n(a,b)\supseteq B_n(a)\times f_2^{-n}(b)\ne \varnothing \). Thus \(A\times B\) is not completely separable. \(\square \)

7 Concluding remarks

One application of the results in this paper is to investigate separation properties within varieties of monounary algebra. In [13] a classification of all varieties of monounary algebras is given:

  • \(V_0\): The trivial variety, containing only the trivial monounary algebra \(T_1\), and the empty monounary algebra. This is defined by the equation \(x=y\) for all \(x,y\).

  • \(V_k\): for \(k\in {\mathbb {N}}^+\): This contains all connected monounary algebras containing a cycle of length 1, such that for all \(x\) not in a cycle, \(f^{-k}(x)=\varnothing \). This is defined by the equation \(f^k(x)=f^k(y)\).

  • \(V_{k,d}\): for \(k,d\in {\mathbb {N}}\), \(d\ge 1\): This contains monounary algebras where each connected component contains a cycle whose length divides \(d\), and for all elements \(x\) not in a cycle, \(f^{-k}(x)=\varnothing \). This is defined by the equation \(f^{k+d}(x)=f^k(x)\).

  • \(V_{0,0}\): The variety of all monounary algebras. This is defined be the equation \(x=x\).

We can note from these definitions that in any connected component of an algebra from \(V_{k,d}\) every vertex of the corresponding graph is either in a cycle of length at most \(d\), or is on a path of length at most \(k\) ending at such a cycle, and so \(B_{k+d+1}(x)=\varnothing \) for all \(x\), and thus the connected component is completely separable by Theorem 6.14. It can be similarly seen that any algebra in \(V_k\) is completely separable. Thus in every variety of monounary algebra other than the class of all monounary algebras, every algebra is completely separable (and thus both subalgebra separable and residually finite). It is then trivially true that in all but the full variety, we have \(A\times B\) is residually finite if and only if \(A\) and \(B\) are residually finite.

There are a few potential directions in which one could build on these results. Here we formulate a few questions of interest.

We saw in Example 5.8 that we can have a residually finite subdirect product of two monounary algebras which are not residually finite. So perhaps it is possible to find some conditions on the components of the product and/or the construction of the subdirect product which ensure residual finiteness. Obviously one can also extend this question to subalgebra separability and complete separability.

Question 7.1

What are necessary and sufficient conditions for a subdirect product of monounary algebras to be residually finite?

Unary algebras are significantly different to monounary algebras. There are no obvious generalisations of the results from this paper that one could apply. However, the potential use of unary algebras to apply to more complex structures like semigroups, makes it a very intriguing topic for research.

Question 7.2

Can we find a criterion for residual finiteness in the more general class of unary algebras?