1 Introduction

The Garden of Eden theorem states that a cellular automaton, or CA for short, is surjective if and only if it is pre-injective. One direction of the Garden of Eden theorem for CA over integer grids was first proved by Moore in 1962 and the other direction by Myhill in 1963. It is known that there are groups that don’t satisfy the Garden of Eden theorem, specifically, the theorem is satisfied exactly when the group is amenable (Ceccherini-Silberstein and Coornaert 2010; Moore 1962; Myhill 1963).

Surjunctivity is a broader notion that was introduced by Gottschalk in 1973. A group is said to be surjunctive if all CA over the group have the property that they are surjective if they are injective. It is known that all sofic groups are surjunctive, but it remains an open problem whether all groups are surjunctive (Gottschalk 1973; Ceccherini-Silberstein and Coornaert 2010).

Finally, non-uniform cellular automata, or NUCA, are a generalization of regular CA which operate with different local rules in different cells. The local rules are given by a special configuration called a local rule distribution. It can easily be seen that the Garden of Eden theorem does not hold in general for non-uniform CA over integer grids. More recently, conditions for the surjunctivity of non-uniform CA have been researched (Sipper 1996; Dennunzio et al. 2012; Phung 2023).

In this work we show that if a NUCA is defined by a uniformly recurrent local distribution, it satisfies the Garden of Eden theorem. More specifically in the 1-dimensional case, we show that the theorem is satisfied if the distribution is recurrent. Conversely, we show that for any one-dimensional non-recurrent configuration, there is an assignment of local rules to symbols such that the obtained rule distribution defines a NUCA which does not satisfy the Moore direction of the Garden of Eden theorem. We also prove the analogous result for the Myhill direction. Finally we show that all distributions asymptotic to recurrent distributions are surjunctive, that is, they define NUCA which are surjective if they are injective.

2 General definitions

We define some general notation regarding configurations.

Definition 1

Let \(\Sigma\) be a finite set called a state set and its elements states. Let \(d\in \mathbb {Z}_+\). A configuration is a function \(c:\mathbb {Z}^d \rightarrow \Sigma\) and d is the dimension of the configuration. An element \(\bar{x} \in \mathbb {Z}^d\) is called a cell and \(c(\bar{x})\) is the state of cell \(\bar{x}\).

The space \(\Sigma ^{\mathbb {Z}^d}\) come equipped with Cantor’s topology, and is known to be compact.

Definition 2

Let \(\Sigma\) be a state-set and \(d \in \mathbb {Z}_+\). A finite set \(D \subseteq \mathbb {Z}^d\) is called a finite domain. A finite pattern of domain D is a function \(p:D\rightarrow \Sigma\).

Let \(c \in \Sigma ^{\mathbb {Z}^d}\). The pattern \(c_{|D}\in \Sigma ^D\) is the unique pattern for which it holds that \(c_{|D}(\bar{x}) = c(\bar{x})\) for all \(\bar{x} \in D\).

Definition 3

Let \(D \subseteq \mathbb {Z}^d\) be a finite domain, \(p_1 \in \Sigma ^D\) and \(\bar{r} \in \mathbb {Z}^d\). Let \(E = \{ \bar{x} + \bar{r} \, | \, \bar{x} \in D \}\) and \(p_2 \in \Sigma ^{E}\). The pattern \(p_2\) is a translated copy of \(p_1\) if \(p_1(\bar{x}) = p_2 (\bar{x} + \bar{r})\) for all \(\bar{x} \in D\).

Definition 4

For any \(x,y\in \mathbb {Z}\), we denote \([x,y] = \{ z \in \mathbb {Z} \, | \, x \le z \le y \}\). A hypercube \(C \subseteq \mathbb {Z}^d\) is a finite domain such that for some \(w \in \mathbb {Z}_+\) and cell \(\bar{x} \in \mathbb {Z}^d\),

$$\begin{aligned} C = \{ \bar{x} + (v_1,\ldots ,v_d) \, | \, \forall i\in [1,d]: 0 \le v_i < w \}. \end{aligned}$$

The constant w is called the width of C, and C is called w-wide.

Recurrence and uniform recurrence are general properties of a dynamical system. The definitions here are equivalent to the usual definitions for configurations under a shift dynamic.

Definition 5

A configuration \(c \in \Sigma ^{\mathbb {Z}^d}\) is recurrent if for all finite domains \(D \subseteq \mathbb {Z}^d\), there is \(E \subseteq \mathbb {Z}^d\) such that \(D\ne E\) and \(c_{|E}\) is a translated copy of \(c_{|D}\). In other words, a configuration is recurrent if every finite pattern that appears in the configuration, appears at least twice (and hence, appears infinitely many times).

The configuration c is uniformly recurrent if for every finite domain \(D \subseteq \mathbb {Z}^d\), there exists \(w \in \mathbb {Z}_+\) such that for any hypercube of width w, the hypercube contains a translated copy of \(c_{|D}\). In other words, a configuration is uniformly recurrent if every pattern that appears in it, appears in every hypercube of width w.

3 Non-uniform cellular automata

Non-uniform cellular automata are a generalization of cellular automata with the possibility of having multiple different local rules.

Definition 6

Let \(\Sigma\) be a state set, \(d \in \mathbb {Z}_+\) a dimension and \(N = (\bar{n}_1,\ldots ,\bar{n}_m)\) a tuple of vectors \(\bar{n}_i \in \mathbb {Z}^d\), \(1\le i \le m\) called a neighbourhood. A local rule is a function \(f:\Sigma ^m \rightarrow \Sigma\).

Notation 1

Let \(N = (\bar{n}_1,\bar{n}_2,\ldots ,\bar{n}_m)\) be a neighbourhood, \(\bar{x} \in \mathbb {Z}^d\) and \(D \subseteq \mathbb {Z}^d\). The neighbourhood of a cell is denoted as

$$\begin{aligned} N(\bar{x}) = \{ \bar{x} + \bar{n} \, | \, \bar{n} \in N \} \end{aligned}$$

and the neighbourhood of D is denoted as

$$\begin{aligned} N(D) = \{ \bar{x} + \bar{n} \, | \, \bar{x} \in D, \bar{n} \in N \}. \end{aligned}$$

Definition 7

(Dennunzio et al. 2013) Let N be a neighbourhood of \(m\in \mathbb {Z}_+\) cells and \(\mathcal {R}\) be a finite set of local rules \(\Sigma ^m \rightarrow \Sigma\). A configuration \(\theta \in \mathcal {R}^{\mathbb {Z}^d}\) is called a local rule distribution. A non-uniform cellular automaton or NUCA for short is the tuple \(A = (\Sigma , d, N, \mathcal {R}, \theta )\). Let \(A = (\Sigma , d, N, \mathcal {R}, \theta )\) be a NUCA where \(N =(\bar{n}_1, \ldots , \bar{n}_m)\).

The global update rule of A is the function \(H_\theta :\Sigma ^{\mathbb {Z}^d}\rightarrow \Sigma ^{\mathbb {Z}^d}\) that maps any configuration \(c \in \Sigma ^{\mathbb {Z}^d}\) to the configuration \(H_\theta (c)\) such that

$$\begin{aligned} H_\theta (c)(\bar{x}) = \theta (\bar{x})(\bar{x}+ \bar{n}_1, \ldots , \bar{x}+ \bar{n}_m) \end{aligned}$$

for all \(\bar{x} \in \mathbb {Z}^d\).

If the NUCA is clear from context, it is usually referred to by its global update rule \(H_\theta\). The global update rule of a NUCA is continuous under Cantor’s topolgy (Dennunzio et al. 2012).

Definition 8

Let \(A = (\Sigma , d, N, \mathcal {R}, \theta )\) be a NUCA where \(N =(\bar{n}_1, \ldots , \bar{n}_m)\). Let \(D\subset \mathbb {Z}^d\) be a finite domain. An update rule over domain D is the function \(H_{\theta |D}:\Sigma ^{|N(D)|}\rightarrow \Sigma ^D\) that maps any finite pattern \(p \in \Sigma ^{N(D)}\) to the pattern

$$\begin{aligned} H_{\theta |D}(p)(\bar{x}) = \theta (\bar{x})(p(\bar{x}+\bar{n}_1), \ldots p(\bar{x}+\bar{n}_m)) \end{aligned}$$

for all \(\bar{x} \in D\).

We introduce the concept of local rule templates to characterize rule distributions. A local rule distribution template is a configuration of symbols which function as templates for local rules. Each symbol can then be assigned a local rule, which yields a local rule distribution. This allows for making general statements about distributions which are obtained from different assignments to the same template.

Definition 9

Let \(\mathcal {R}\) be a finite set of local rules, \(d\in \mathbb {Z}_+\) a dimension and T a finite set whose elements are called rule templates. A configuration \(\tau \in T^{\mathbb {Z}^d}\) is called a local rule distribution template and a function \(\alpha :T\rightarrow \mathcal {R}\) is called an assignment of local rules. The rule distribution \(\tau _\alpha \in \mathcal {R}^{\mathbb {Z}^d}\) such that \(\tau _\alpha (x) = \alpha (\tau (x))\) is called \(\tau\) with assignment \(\alpha\).

A uniform rule distribution is a valid assignment of any rule template. A rule template is a limit on the non-uniformity of a distribution.

4 The Garden of Eden theorem

The Garden of Eden theorem, or GoE theorem for short, states that the global rule of a CA is surjective if and only if it is injective on finite configurations. This can be stated more generally by replacing the notion of injectivity on finite configurations with pre-injectivity.

Definition 10

Let \(c,e \in \Sigma ^{\mathbb {Z}^d}\). The difference set of c and e is the set

$$\begin{aligned} \textrm{diff}(c,e) = \{ \bar{x}\in \mathbb {Z}^d \, | \, c(\bar{x}) \ne e(\bar{x}) \}. \end{aligned}$$

If \(\textrm{diff}(c,e)\) is finite, c and e are called asymptotic.

Definition 11

Let \(H_\theta\) be the update rule of a NUCA. \(H_\theta\) is pre-injective if for all asymptotic configurations \(c,e \in \Sigma ^{\mathbb {Z}^d}\) such that \(c \ne e\), it holds that \(H_\theta (c) \ne H_\theta (e)\).

The GoE theorem is known to hold for regular CA (Moore 1962; Myhill 1963), but it is also easy to see that neither direction of the theorem holds for NUCA generally. In this section we show that the theorem holds for NUCA with uniformly recurrent distributions, and that in the 1-dimensional case, it holds if the distribution is recurrent. First we state an auxiliary lemma used in both proofs. It is a simple generalization of a lemma in Dennunzio et al. (2013).

Lemma 1

Let \(\theta \in \mathcal {R}^{\mathbb {Z}^d}\). The d-dimensional global update rule \(H_\theta\) is surjective if and only if the partial update rule \(H_{\theta |C}\) is surjective for all hypercubes \(C\subseteq \mathbb {Z}^d\)

Proof

Let N be the neighbourhood of \(H_\theta\). First assume \(H_\theta\) is surjective. Let \(C \subseteq \mathbb {Z}^d\) be a hypercube and \(p \in \Sigma ^C\). Clearly there is a configuration \(c \in \Sigma ^{\mathbb {Z}^d}\) such that \(c_{|C} = p\). Because \(H_\theta\) is surjective, there is a configuration \(e \in \Sigma ^{\mathbb {Z}^d}\) such that \(H_\theta (e) = c\). Then \(H_{\theta |C} (e_{|N(C)} ) = c_{|C} = p\) and therefore \(H_{\theta |C}\) is surjective.

Assume then that \(H_{\theta |C}\) is surjective for all hypercubes \(C \subseteq \mathbb {Z}^d\). Let \(C_i\) be a width i hypercube centered on the origin for all \(i \in \mathbb {Z}_+\). Let \(c \in \Sigma ^{\mathbb {Z}^d}\) and \((e_i)_{i=1}^\infty\) a sequence of configurations \(e_i \in \Sigma ^{\mathbb {Z}^d}\) such that \(H_{\theta |C_i}(e_{i|N(C_i )}) = c_{|C_i}\) for all \(i \in \mathbb {Z}_+\). Because \(H_{\theta |C_i}\) is surjective, such a sequence exists.

Let \(c_i = H_\theta (e_i)\). Clearly the sequence \((c_i)_{i=1}^\infty\) converges with limit \(\lim _{i \rightarrow \infty } c_i =c\). By compactness of the Cantor topology, the sequence \((e_i)_{i=1}^\infty\) has a converging subsequence \((e_{i_j})_{j=1}^\infty\). Let \(e = \lim _{j \rightarrow \infty } e_{i_j}\). Then by the continuity of NUCA,

$$\begin{aligned} c = \lim _{i\rightarrow \infty } c_i = \lim _{j \rightarrow \infty } c_{i_j} = \lim _{j \rightarrow \infty } H_\theta (e_{i_j}) = H_\theta (e). \end{aligned}$$

Therefore \(H_\theta\) is surjective. \(\square\)

Additionally, we define the support of a configuration.

Definition 12

Let \(q \in \Sigma\) be a state. The q-support of a configuration \(c \in \Sigma ^{\mathbb {Z}^d}\) is the set

$$\begin{aligned} \textrm{supp}_q(c) = \{ \bar{x} \in \mathbb {Z}^d \, | \, c(\bar{x}) \ne q \}. \end{aligned}$$

4.1 Uniformly recurrent distributions

All NUCA with uniformly recurrent distributions satisfy the GoE theorem. The proof is a modification of the original proof for regular CA found in Moore (1962); Myhill (1963).

Lemma 2

Let \(d,s,n,r \in \mathbb {Z}_+\). For all sufficiently large \(k \in \mathbb {Z}_+\), it holds that

$$\begin{aligned} (s^{n^d}-1)^{k^d} < s^{(kn-2r)^d}. \end{aligned}$$

Proof

A proof for this lemma is also found in Moore (1962). If \(s = 1\), the inequality obviously holds. Assume \(s>1\). We have

$$\begin{aligned} (s^{n^d}-1)^{k^d}&< s^{(kn-2r)^d} \\ \Leftrightarrow \log _s (s^{n^d}-1)^{k^d}&< \log _s s^{(kn-2r)^d}\\ \Leftrightarrow k^d \log _s (s^{n^d}-1)&< (kn-2r)^d\\ \Leftrightarrow \log _s (s^{n^d}-1)&< \left( \frac{kn-2r}{k} \right) ^d = \left( n - \frac{2r}{k} \right) ^d. \end{aligned}$$

Because \(\log _s (s^{n^d}-1)< \log _s s^{n^d} = n^d\), there is \(\varepsilon \in \mathbb {R}_+\), such that \(\log _s (s^{n^d}-1) = (n-\varepsilon )^d\). Then if \(k> \frac{2r}{\varepsilon }\), we have

$$\begin{aligned} \log _s (s^{n^d}-1) = (n-\varepsilon )^d < \left( n - \frac{2r}{k} \right) ^d. \end{aligned}$$

\(\square\)

Lemma 3

Let \(\theta \in \mathcal {R}^{\mathbb {Z}^d}\) be a uniformly recurrent rule distribution. If \(H_\theta\) is not surjective, then it is not pre-injective.

Proof

Let \(r \in \mathbb {Z}_+\) be large enough that \(H_\theta\) can be defined with radius-r local rules. Let \(s = |\Sigma |\). Suppose that \(H_\theta\) is not surjective. Then by Lemma 1 there’s a domain \(D \subseteq \mathbb {Z}^d\) such that \(H_{\theta |D}\) is not surjective. Because \(\theta\) is uniformly recurrent, there is \(n \in \mathbb {Z}_+\) such that any n-wide hypercube in \(\theta\) contains a translated copy of \(\theta _{|D}\).

Let \(q \in \Sigma\) and \(k\in \mathbb {Z}_+\). Let \(C\subseteq \mathbb {Z}^d\) be a hypercube of width kn and \(C'\) a hypercube of width \(kn-2r\) centred on C. Let

$$\begin{aligned} K = \{ c \in \Sigma ^{\mathbb {Z}^d} \, | \, \textrm{supp}_q (c) \subseteq C' \}. \end{aligned}$$

Now \(|K| = s^{|C'|} = s^{(kn-2r)^d}\).

Hypercube C can be partitioned into \(k^d\) hypercubes of width n, each of which must contain a copy of \(\theta _{|D}\) in \(\theta\). Consider then the set \(H_\theta (K)\). Because \(H_{\theta |D}\) is not surjective, there is a finite pattern \(p\in \Sigma ^D\) with no \(H_{\theta |D}\) pre-image. Then for each of the \(k^d\) hypercubes in C, there is at least one finite pattern with no pre-image. Because they are identical outside of C, there are at most \((s^{n^d}-1)^{k^d}\) configurations in \(H_\theta (K)\). Now by Lemma 2,

$$\begin{aligned} |H_\theta (K)| \le (s^{n^d}-1)^{k^d} < s^{(kn-2r)^d} = |K| \end{aligned}$$

for sufficiently large k. Therefore there must be configurations \(c_1,c_2 \in K\) such that \(c_1 \ne c_2\) and \(H_\theta (c_1) = H_\theta (c_2)\). Hence \(H_\theta\) is not pre-injective. \(\square\)

Definition 13

Let \(\bar{r} \in \mathbb {Z}^d\). The \(\bar{r}\)-shift \(\sigma _{\bar{r}}: \Sigma ^{\mathbb {Z}^d}\rightarrow \Sigma ^{\mathbb {Z}^d}\) is the function mapping \(c\in \Sigma ^{\mathbb {Z}^d}\) such that for all \(\bar{x} \in \mathbb {Z}^d\),

$$\begin{aligned} \sigma _{\bar{r}} (c)(\bar{x}) = c(\bar{x} - \bar{r}). \end{aligned}$$

Lemma 4

Let \(\theta \in \mathcal {R}^{\mathbb {Z}^d}\) be a uniformly recurrent rule distribution. If \(H_\theta\) is not pre-injective, then it is not surjective.

Proof

Let \(r\in 2\mathbb {Z}_+\) be large enough that \(H_\theta\) can be defined with radius-\(\frac{r}{2}\) local rules. Let \(s = |\Sigma |\). Suppose that \(H_\theta\) is not pre-injective. Let \(c_1,c_2 \in \Sigma ^{\mathbb {Z}^d}\) be asymptotic configurations such that \(c_1 \ne c_2\) and \(H_\theta (c_1) = H_\theta (c_2)\).

Because \(c_1\) and \(c_2\) are asymptotic, there is a hypercube \(D \subseteq \mathbb {Z}^d\) such that \(\textrm{diff}(c_1,c_2)\) is contained within a hypercube centered on D whose width is at least 2r less than the width of D. Let \(n\in \mathbb {Z}_+\) be large enough that every hypercube of width n in \(\theta\) must contain a translated copy of \(\theta _{|D}\).

Consider any hypercube \(E \subseteq \mathbb {Z}^d\) of width n. There is \(\bar{y} \in \mathbb {Z}^d\) such that \(D' = \{ \bar{x} + \bar{y} \, | \, \bar{x} \in D \} \subseteq E\) and \(\theta _{|D'}\) is a copy of \(\theta _{|D}\). Let \(p_1 = \sigma _{\bar{y}} (c_1)_{|D}\) and \(p_2 = \sigma _{\bar{y}} (c_2)_{|D}\). Let then \(e_1,e_2 \in \Sigma ^{\mathbb {Z}^d}\) be configurations such that \(e_{1|D} = p_1\), \(e_{2|D} = p_2\) and \(e_1(\bar{x}) = e_2(\bar{x})\) for any \(\bar{x} \in \mathbb {Z}^d \setminus D\). Consider any cell \(\bar{x} \in \mathbb {Z}^d\). If \(N(\bar{x}) \cap \textrm{diff}(e_1,e_2) = \emptyset\), then clearly \(H_\theta (e_1) (\bar{x}) = H_\theta (e_2) (\bar{x})\). If \(N(\bar{x}) \cap \textrm{diff}(e_1,e_2) \ne \emptyset\) then \(\bar{x}\) is within \(\frac{r}{2}\) cells from a differing cell, and

$$\begin{aligned} H_\theta (e_1)(\bar{x}) = H_\theta (c_1)(\bar{x} - \bar{y}) = H_\theta (c_2)(\bar{x} - \bar{y}) = H_\theta (e_2)(\bar{x}). \end{aligned}$$

Therefore \(H_\theta (e_1) = H_\theta (e_2)\), meaning that for any hypercube of width n, there are two patterns \(p_1\) and \(p_2\) which can be replaced with each other without affecting the image.

Let C be a hypercube of width kn for some \(k\in \mathbb {Z}_+\), and \(C'\) a hypercube of width \(kn-2r\) centred on C. If \(H_\theta\) is surjective, then \(H_{\theta |C'}\) is surjective, meaning every pattern in the domain \(C'\) has a pre-image in the domain C. There are \(s^{(kn-2r)^d}\) possible patterns in the domain \(C'\). The hypercube C can be partitioned into \(k^d\) hypercubes of width n, each of which must contain two patterns \(p_1\) and \(p_2\) such that \(p_1\) can be replaced by \(p_2\) without affecting the image of C. If for each of these hypercubes we fix one of these two patterns to be \(p_1\), then every pattern in the domain \(C'\) has a pre-image with no \(p_2\) pattern in any hypercube. There are at most \((s^{n^d}-1)^{k^d}\) such patterns.

By Lemma 2, for sufficiently large k, it holds that \((s^{n^d}-1)^{k^d}<s^{(kn-2r)^d}\) and therefore some pattern in the domain \(C'\) has no pre-image. Therefore \(H_{\theta |C'}\) is not surjective and hence \(H_\theta\) is not surjective. \(\square\)

Fig. 1
figure 1

The hypercube C defined in the proofs of Lemma 3 and Lemma 4, in dimension 2. Each of the smaller hypercubes it is partitioned into contains a copy of \(\theta _{|D}\)

Theorem 5

Let \(\theta \in \mathcal {R}^{\mathbb {Z}^d}\) be a uniformly recurrent rule distribution. The NUCA \(H_\theta\) is surjective if and only if it is pre-injective.

Proof

The statement follows from Lemmas 3 and 4. \(\square\)

4.2 The 1-dimensional case

In the 1-dimensional case, the distribution needs only be recurrent for the GoE theorem to hold. The proof is again a modification of the original proof for regular CA.

Lemma 6

Let \(s,n,r \in \mathbb {Z}_+\). For all sufficiently large \(m \in \mathbb {Z}_+\), it holds that

$$\begin{aligned} (s^n-1)^m s^{k-nm} < s^{k-2r}, \end{aligned}$$

for all \(k \in \mathbb {Z}_+\).

Proof

By Lemma 2, for all sufficiently large \(m \in \mathbb {Z}_+\) it holds that

$$\begin{aligned} (s^n -1)^m < s^{mn-2r}. \end{aligned}$$

Then for all \(k \in \mathbb {Z}_+\)

$$\begin{aligned} (s^n -1)^m s^{k-nm}&< s^{mn-2r} s^{k-nm} = s^{k-2r} \end{aligned}$$

\(\square\)

Lemma 7

Let \(\theta \in \mathcal {R}^\mathbb {Z}\) be a recurrent rule distribution. If \(H_\theta\) is not surjective, then it is not pre-injective.

Proof

Let \(r \in \mathbb {Z}_+\) be large enough that \(H_\theta\) can be defined with radius-r local rules. Let \(s = |\Sigma |\) be the size of the state set. Suppose that \(H_\theta\) is not surjective. Then by Lemma 1 there are \(i,j \in \mathbb {Z}\) such that \(H_{\theta |[i,j]}\) is not surjective. Let \(n = |j-i| +1\).

Let \(m \in \mathbb {Z}_+\) be large enough that \((s^n-1)^m s^{k-nm} < s^{k-2r}\) for all \(k \in \mathbb {Z}_+\). By Lemma 6, such a number m exists. Because \(\theta\) is recurrent, it has infinitely many copies of the pattern \(\theta _{|[i,j]}\). Let \(C \subseteq \mathbb {Z}^d\) be a segment such that \(\theta _{|C}\) contains m disjoint copies of \(\theta _{|[i,j]}\). Let k be the length of C, and let \(C'\) be a length \(k-2r\) segment centered on C. Finally, let \(q\in \Sigma\) and

$$\begin{aligned} K = \{ c \in \Sigma ^\mathbb {Z} \, | \, \textrm{supp}_q (c) \subseteq C' \}. \end{aligned}$$

Now \(|K| = s^{|C'|} = s^{k-2r}\). Clearly any pair of configurations from K is asymptotic. Consider the image \(H_\theta (K)\). Because \(H_{\theta |[i,j]}\) is not surjective, there is a finite pattern \(p \in \Sigma ^{[i,j]}\) with no \(H_{\theta |[i,j]}\) pre-image. Then no translated copy can appear in the same position as a copy of \(\theta _{|[i,j]}\) in any configuration in \(H_\theta (K)\). Then there are at most \((s^n-1)^ms^{k-nm}\) configurations in \(H_\theta (K)\).

Therefore, due to the selection of m

$$\begin{aligned} |H_\theta (K)| \le (s^n -1)^m s^{k-nm} < s^{k-2r} = |K|. \end{aligned}$$

Then there must be configurations \(c_1, c_2 \in K\) such that \(c_1 \ne c_2\) and \(H_\theta (c_1) = H_\theta (c_2)\). Hence \(H_\theta\) is not pre-injective. \(\square\)

Lemma 8

Let \(\theta \in \mathcal {R}^\mathbb {Z}\) be a recurrent rule distribution. If \(H_\theta\) is not pre-injective, then it is not surjective.

Proof

Let \(r \in 2\mathbb {Z}_+\) be large enough that \(H_\theta\) can be defined with radius-\(\frac{r}{2}\) local rules. Let \(s = |\Sigma |\). Suppose that \(H_\theta\) is not pre-injective. Let \(c_1,c_2 \in \Sigma ^\mathbb {Z}\) be asymptotic configurations such that \(c_1 \ne c_2\) and \(H_\theta (c_1) = H_\theta (c_2)\).

Because \(c_1\) and \(c_2\) are asymptotic, there is a segment \([i+r,j-r] \subseteq \mathbb {Z}\) such that \(\textrm{diff}(c_1,c_2) \subseteq [i+r, j-r]\). Let \(n = |i-j| +1\). Let \(p_1 = c_{1|[i,j]}\) and \(p_2 = c_{2|[i,j]}\).

Let \(e_1 \in \Sigma ^\mathbb {Z}\) be a configuration containing a copy of \(p_1\) in some segment \([i+y,j+y]\) where \(y\in \mathbb {Z}\) is such that \(\theta _{|[i+y,j+y]}\) is a copy of \(\theta _{|[i,j]}\). Let \(e_2 \in \Sigma ^\mathbb {Z}\) be the configuration obtained by replacing the translated copy of \(p_1\) in \(e_1\) with a translated copy of \(p_2\). Consider cell \(x \in \mathbb {Z}\). If \(N(x) \cap \textrm{diff}(e_1,e_2) = \emptyset\), then clearly \(H_\theta (e_1)(x) = H_\theta (e_2)(x)\). If \(N(x) \cap \textrm{diff}(e_1,e_2) \ne \emptyset\) then the distance of x from a differing cell is at most \(\frac{r}{2}\). Then \(x \in [i+y+\frac{r}{2},j+y-\frac{r}{2}]\), and

$$\begin{aligned} H_\theta (e_1)(x) = H_\theta (c_1)(x-y)= H_\theta (c_2)(x-y) = H_\theta (e_2)(x). \end{aligned}$$

Therefore \(H_\theta (e_1) = H_\theta (e_2)\), meaning a copy of \(p_1\) can be replaced with a copy of \(p_2\) without affecting the image of the configurations, provided that the copy of \(p_1\) lies in the same cells as a copy of \(\theta _{|[i,j]}\) in \(\theta\).

Let m be as in Lemma 6. Let C be a segment of such that \(\theta _C\) contains m disjoint copies of \(\theta _{[i,j]}\). Since \(\theta\) is recurrent, such a segment exists. Let \(k\in \mathbb {Z}_+\) be the length of C. Let \(C'\) be a segment of length \(kn-2r\) centered on C. If \(H_\theta\) is surjective, then \(H_{\theta |C'}\) is surjective, meaning every pattern in the domain \(C'\) has a pre-image in the domain C.

There are \(s^{k-2r}\) possible patterns in the domain \(C'\). On the other hand, because each copy of pattern \(p_1\) that shares its domain with one of the m disjoint copies of \(\theta _{|[i,j]}\) can be replaced with a copy of \(p_2\) without affecting the image, each pattern in \(C'\) has a pre-image with no copies of \(p_1\) on a copy of these m disjoint positions. There are \((s^n-1)^m s^{n(k-m)}\) such patterns. Because \((s^n-1)^m s^{k-nm} < s^{k-2r}\), there is some pattern in \(C'\) with no pre-image. Therefore \(H_{\theta |C'}\) is not surjective and hence \(H_\theta\) is not surjective. \(\square\)

Theorem 9

Let \(\theta \in \mathcal {R}^\mathbb {Z}\) be a recurrent rule distribution. The NUCA \(H_\theta\) is surjective if and only if it is pre-injective.

Proof

The statement follows from Lemmas 7 and 8. \(\square\)

5 Non-recurrent rule distributions

We now know that a 1-dimensional NUCA given by a recurrent rule distribution must satisfy the GoE theorem. Then, given a recurrent distribution template, any assignment to that template satisfies the theorem. In this section we show that these are in fact exactly the templates that always satisfy the theorem; for any non-recurrent template, there exists an assignment which is pre-injective, but not surjective, and an assignment which is surjective, but not pre-injective.

We begin by examining the special case of a distribution of two local rule templates, where one of the two templates can appears n times in a row at most once. We show that for such a template, for any \(n\ge 1\), and for both directions of the GoE theorem, there is an assignment that does not satisfy that direction of the theorem. Then, we reduce the general case of a non-recurrent template to this special case.

5.1 Moore’s theorem

In this section we present a construction for assignments to the aforementioned special case templates which give distributions whose associated global update rules are pre-injective, but not surjective. First we define some notation and terminology used in the following proofs.

Notation 2

Let \(n \ge 1\) and \(\Sigma = \mathbb {Z}_2\). The local rules \(f_n\) and \(g_n\) are ones with neighbourhood \(N =(-n,\ldots ,n)\) such that

$$\begin{aligned} f_n (a_{-n} ,\ldots , a_n)&= a_{-n} \oplus a_0, \\ g_n (a_{-n} ,\ldots , a_n)&= a_{-n+1} \oplus \ldots \oplus a_n. \end{aligned}$$

An illustration of these rules is in Fig. 2.

Let \(\theta \in \{f_n,g_n\}^\mathbb {Z}\). For each cell \(x \in \mathbb {Z}\), if \(\theta (x) = f_n\) we call x an f-cell and if \(\theta (x) = g_n\) we call it a g-cell. We say that cell x sees cell y if \(y \in N(x)\) and the state of y affects the computation of the local rule at cell x. In these terms, an f-cell x sees cells \(x-n\) and x, and a g-cell sees all cells in the range \(x-n+1,\ldots ,x+n\).

For the sake of clarity, we omit the states of dummy neighbours, and denote

$$\begin{aligned} f (a_{-n}, a_0)&= f_n(a_{-n} ,\ldots , a_n), \\ g (a_{-n+1} ,\ldots , a_n)&= g_n (a_{-n} ,\ldots , a_n), \end{aligned}$$

when n is fixed and clear from context.

Fig. 2
figure 2

The operation of rules \(f_n\) and \(g_n\), top to bottom respectively

Lemma 10

Let \(n \ge 1\) and \(\Sigma = \mathbb {Z}_2\). Let \(\mathcal {R} = \{f_n, g_n\}\) and \(\theta \in \mathcal {R}^\mathbb {Z}\) be a rule distribution with pattern \(g_n(f_n)^n\). Then there is a configuration \(c\in \Sigma ^\mathbb {Z}\) with no \(H_\theta\) -pre-image.

Proof

Assume the n-long block of f-cells is in the segment \([x+1,x+n]\), meaning \(\theta (x) = g_n\). Let \(c\in \Sigma ^\mathbb {Z}\) be a configuration with \(c(x) = 1\) and \(c(y) = 0\) for all \(y\in [x+1,x+n]\). This is illustrated in Fig. 3.

Fig. 3
figure 3

The rule distribution and configuration used in the argument for non-surjectivity of \(H_\theta\). Pictured is the range seen by the noted cells

Now suppose there is \(e \in \Sigma ^\mathbb {Z}\) such that \(H_\theta (e) = c\). Because \(c(x) = 1\), x sees an odd number of cells with state 1 in e. Therefore there are an odd number of cells with state 1 in e in the range \([x-n+1, x+n]\).

Then consider the f-cells. Each \(y \in [x+1,x+n]\) sees \(y-n\) and y. Then the f-cells in total see the cells in the ranges \([x-n+1,x-n]\) and \([x+1, x+n]\), covering the full range \([x-n+1, x+n]\) seen by x. Additionally, no two cells in \([x+1,x+n]\) see the same cell. Then because \(c(y) = 0\) for all \(y \in [x+1,x+n]\), each y sees an even number of cells with state 1. This then implies there are an even number of cells with state 1 in the range \([x-n+1,x-n]\), which is a contradiction. Hence c has no pre-image. \(\square\)

Lemma 11

Let \(n \ge 1\) and \(\Sigma = \mathbb {Z}_2\). Let \(\mathcal {R} = \{f_n, g_n\}\) and \(\theta \in \mathcal {R}^\mathbb {Z}\) be such that there is at most one length n block of adjacent cells with rule \(f_n\) (and hence all other blocks of adjacent rules \(f_n\) are at most \(n-1\) cells long). Then \(H_\theta\) is pre-injective.

Proof

Suppose \(c_1,c_2 \in \Sigma ^\mathbb {Z}\) are asymptotic and \(c_1 \ne c_2\). Let \(e \in \Sigma ^\mathbb {Z}\) be the configuration with \(e(x) = c_1(x) \oplus c_2(x)\). Then \(e(x) = 1\) if and only if \(c_1(x) \ne c_2(x)\). Assume that \(H_\theta (c_1) = H_\theta (c_2)\).

Notice that \(H_\theta (c_1)(x) = H_\theta (c_2)(x)\) if and only if the number of cells y seen by x such that \(c_1(y) \ne c_2 (y)\) is even. This is if and only if x sees an even number of cells y where \(e(y) = 1\), which in turn is if and only if \(H_\theta (e)(x) = 0\). Hence \(H_\theta (c_1) = H_\theta (c_2)\) if and only if \(H_\theta (e)(x) = 0\) for all \(x \in \mathbb {Z}\).

Let \(x\in \mathbb {Z}\) be the rightmost cell such that \(e(x) = 1\). Such a cell exists, because \(c_1\) and \(c_2\) are asymptotic, but not equal. Let us prove by induction for \(y=x+n-1\) down to \(y=x\) that \(\theta (y) = f_n\). If \(\theta (x+n-1) = g_n\), then \(H_\theta (e)(x+n-1) = g(1,0,\ldots ,0) = 1\), which is a contradiction. Therefore \(\theta (x+n-1) = f_n\).

Suppose for some \(y \in [x+1, x+n-1]\) and all \(z \in [y,x+n-1]\) it holds that \(\theta (z) = f_n\). Then also \(e(z-n) = 0\) for each z in the range, because if not, \(H_\theta (e)(z) = e(z) \oplus e(z-n) = 0 \oplus 1 = 1\). Now \(\theta (y-1) = f_n\); if \(\theta (y-1) = g_n\), then \(y-1\) would see exactly one cell with state 1, meaning \(H_\theta (e)(y-1) = 1\). Then by induction, for all \(y \in [x, x+n-1]\) it holds that \(\theta (y) = f_n\). Also then it holds that \(e(x-n) = 1\) and \(e(x-n+1) = \ldots = e(x-1) = 0\).

Note that there now is a length n block of f-cells in the range \([x, x+n-1]\), meaning that to the left of cell x there can only be at most length \(n-1\) blocks of f-cells. The obtained \(\theta\) and e are illustrated in Fig. 4.

Fig. 4
figure 4

The obtained \(\theta\) and e. Indices of the cells are annotated on the top row

Suppose then that somewhere in e there are two copies of the same n-long segment back to back. That is, somewhere in e there appears the pattern \(a_1 a_2 \ldots a_n a_1 a_2 \ldots a_n\). Let \(y \in \mathbb {Z}\) be the leftmost cell of this pattern. Suppose also that the n-block of f-cells is somewhere to the right of cell \(y+n-1\). We show that then \(e(y-1) = a_n\). Suppose \(e(y-1) = \bar{a}_n \ne a_n\). Now \(\theta (y+n-1) = g_n\); if \(\theta (y+n-1) = f_n\) then \(H_\theta (e)(y+n-1) = f(\bar{a}_n, a_n) = 1\), a contradiction.

Next we show that for all \(z \in [y-1, y+n-2]\), \(\theta (z) = f_n\). Let \(k\in [0,n-1]\), and assume that for all \(z \in [y+k, y+n-2]\) it holds that \(\theta (z) = f_n\). Then also it holds that for all such z, that \(e(z) = e(z-n)\). Therefore \(\theta (y+k-1) = f_n\), indeed if \(\theta (y+k-1) = g_n\), then

$$\begin{aligned} H_\theta (e) (y+k-1)&= g(a_{k+1},\ldots , a_{n-1}, \bar{a}_n, a_1, \ldots , a_{n-1}, a_n, a_1, \ldots , a_{k}) \\&= a_1\oplus \ldots \oplus a_{n-1} \oplus \bar{a}_n \oplus a_1 \oplus \ldots \oplus a_{n-1} \oplus a_n \\&= (a_1 \oplus a_1) \oplus \ldots \oplus (a_{n-1} \oplus a_{n-1}) \oplus (\bar{a}_n \oplus a_n) \\&= 0 \oplus \ldots \oplus 0 \oplus \ldots \oplus 0 \oplus 1 = 1. \end{aligned}$$

Now by induction, for any \(n\ge 2\) and all \(z \in [y-1, y+n-1]\), \(\theta (z) = f_n\). But this is a contradiction, because now we have a length n block of rules \(f_n\) to the left of cell \(y+n-1\) and hence \(e(y-1) = a_n\). This argument is illustrated in Fig. 5.

Fig. 5
figure 5

Illustration of the argument for why two repeated n-long patterns force a new repetition to their left. The position of cell y is annotated on the top row. The highlighted cells are seen by the highlighted rule \(g_n\)

Next, we inductively apply the previous argument to show that there is a copy of the pattern \(a_1\ldots a_n\) immediately to the left of the original pair of identical patterns. Suppose we know that immediately left of the cell y is the pattern \(a_i\ldots a_n\), where \(i \in [2,n]\). Then we have the pattern \(a_i\ldots a_n a_1 \ldots a_{i-1} a_i\ldots a_n a_1 \ldots a_{i-1}\) in e and the block of f-cells still to the right of its center, meaning by the previous, there is a cell with state \(a_{i-1}\) immediately to the left of this pattern. Then by induction, the statement follows.

Now by the preceding, there must be infinitely many copies of \(a_1\ldots a_n\) to the left in e. Then by the first part of the proof, there are infinitely many copies of the pattern \(1(0^{n-1})\) in e. This is a contradiction, because it would imply there are infinitely many cells z where \(c_1(z) \ne c_2(z)\), but \(c_1\) and \(c_2\) were assumed to be asymptotic. Hence \(H_\theta (c_1) \ne H_\theta (c_2)\) and \(H_\theta\) is pre-injective. \(\square\)

5.2 Myhill’s theorem

In this section we present a construction for assignments to the special case templates which give distributions whose associated global update rules are surjective, but not pre-injective. First we define some notation used in the following proofs.

Notation 3

For \(a,b \in \mathbb {Z}_2\), we denote \(a \oplus b = a + b \mod 2\). For \(a_1,\ldots ,a_n \in \mathbb {Z}_2\), we denote

$$\begin{aligned} \bigoplus _{i=1}^{n} a_i = a_1 \oplus \ldots \oplus a_n. \end{aligned}$$

Notation 4

Let \(n\ge 1\) and \(\Sigma = \mathbb {Z}_2 \times \mathbb {Z}_2\). For any \(a=(a_1,a_2) \in \Sigma\), we denote \(a^{(1)} = a_1\) and \(a^{(2)} = a_2\).

Definition 14

The local rules \(\gamma _n\) and \(\delta _n\) are ones with neighbourhood \((0,\ldots ,n+1)\) such that

$$\begin{aligned} \gamma _n (a_0, \ldots , a_{n+1})^{(1)}&= a_0^{(1)} \oplus a_{n+1}^{(1)} \oplus a_0^{(2)}, \\ \delta _n (a_0, \ldots , a_{n+1})^{(1)}&= \bigoplus _{i=1}^{n} a_i, \\ \gamma _n (a_0, \ldots , a_{n+1})^{(2)}&= \delta _n (a_0, \ldots , a_{n+1})^{(2)} = \bigoplus _{i=1}^{n+1} a_i, \end{aligned}$$

for all \(a_0,\ldots ,a_{n+1} \in \Sigma\). These rules are illustrated in Fig. 6. Like previously, if for \(x\in \mathbb {Z}\) it holds that \(\theta (x) = \gamma _n\), we call x a \(\gamma\)-cell and if \(\theta (x) = \delta _n\), we call x a \(\delta\)-cell.

Fig. 6
figure 6

Operation of rules \(\gamma _n\) and \(\delta _n\), top to bottom respectively. The cells marked (1) are added together on the first track and the ones marked (2) on the second track

Lemma 12

Let \(n\ge 1\) and \(\Sigma = \mathbb {Z}_2 \times \mathbb {Z}_2\). Let \(\mathcal {R} = \{\gamma _n, \delta _n \}\) and \(\theta \in \mathcal {R}^\mathbb {Z}\) a rule distribution with pattern \(\delta _n(\gamma _n)^n \delta _n\). Then there are asymptotic configurations \(c,e\in \Sigma ^\mathbb {Z}\) such that \(c \ne e\) and \(H_\theta (c) = H_\theta (e)\).

Proof

Assume the length n block of \(\gamma\)-cells is in segment \([x,x+n-1]\). Let \(c,e\in \Sigma ^\mathbb {Z}\) be such that \(c(y) = (0,0)\) for all \(y \in \mathbb {Z}\) and \(e(x+n) = (1,0)\), \(e(y') = (0,0)\) for all \(y'\in \mathbb {Z}\), \(y'\ne x+n\). Clearly c and e are asymptotic and \(c\ne e\), and because the local rules in \(\theta\) only add modulo 2, it holds that \(H_\theta (c) = c\).

Next we show that \(H_\theta (e) = c\). For any cell \(y \in \mathbb {Z}\) that doesn’t see cell \(x+n\), clearly \(H_\theta (e) (y) = (0,0)\). Consider then cells that see \(x+n\). Because both \(\gamma\)- and \(\delta\)-cells only see \(n+1\) cells to their right and none to their left, the only cells that can see \(x+n\) are in the segment \([x-1, x+n]\). For any \(y \in [x,x+n-1]\),

$$\begin{aligned} H_\theta (e)(y)^{(1)}&= e(y)^{(1)} \oplus e(y+n)^{(1)} \oplus e(y)^{(2)} \\&= 0 \oplus 0 \oplus 0 = 0, \\ H_\theta (e)(y)^{(2)}&= \bigoplus _{i=1}^{n+1} e(y+i)^{(2)} = 0 \oplus \ldots \oplus 0 = 0, \end{aligned}$$

Because none of the cells sees the first track component of \(x+n\). For cells \(x-1\) and \(x+n\), we have

$$\begin{aligned} H_\theta (e)(x-1)^{(1)}&= \bigoplus _{i=1}^{n} e(x-1+i)^{(1)} = 0 \oplus \ldots \oplus 0 = 0, \\ H_\theta (e)(x+n)^{(1)}&= \bigoplus _{i=1}^{n} e(x+n+i)^{(1)} = 0 \oplus \ldots \oplus 0 = 0,\\ H_\theta (e)(x-1)^{(2)}&= \bigoplus _{i=1}^{n+1} e(x-1+i)^{(2)} = 0 \oplus \ldots \oplus 0 = 0, \\ H_\theta (e)(x+n)^{(2)}&= \bigoplus _{i=1}^{n+1} e(x+n+i)^{(2)} = 0 \oplus \ldots \oplus 0 = 0, \end{aligned}$$

because neither sees the first track component of \(x+n\) either. Hence for all \(y\in [x-1, x+n]\), \(H_\theta (y) = (0,0).\) Therefore \(H_\theta (e) = c = H_\theta (c)\). This argument is illustrated in Fig. 7. \(\square\)

Fig. 7
figure 7

The cells seen by cells in the pattern \(\delta _n(\gamma _n)^n \delta _n\) in the case where \(n=3\). Cells seen by only \(\gamma\)-cells are highlighted in solid colour and cells seen by both \(\delta\)- and \(\gamma\)-cells are highlighted in striped colour

Lemma 13

Let \(n\ge 1\) and \(\Sigma = \mathbb {Z}_2 \times \mathbb {Z}_2\). Let \(\mathcal {R} = \{\gamma _n, \delta _n \}\) and \(\theta \in \mathcal {R}^\mathbb {Z}\) a rule distribution with at most one length n block of adjacent \(\gamma\)-cells. The global update rule \(H_\theta\) is surjective.

Proof

Let \(c \in \Sigma ^\mathbb {Z}\). We show that there is \(e\in \Sigma ^\mathbb {Z}\) such that \(H_\theta (e) = c\). Our local rules have the property that flipping the state of any one cell flips the state of every cell in the image that can see it. We use this fact to construct the pre-image e cell by cell. First we fix some initial cells to state 0. We then find cells x (on either track i) in an order where each cell sees exactly one cell \(e(y)^{(j)}\) where the pre-image has not been defined yet. Suppose the modulo 2 sum of the already defined cells seen by \(e(x)^{(i)}\) is a. We then "reserve" \(e(y)^{(j)}\) for \(c(x)^{(i)}\), by defining \(e(y)^{(j)} = a \oplus c(x)^{(i)}\). Then obviously \(H_\theta (e)(y)^{(j)} = a \oplus e(y)^{(j)} = c(x)^{(i)}\). We proceed by induction, and thus show that a pre-image can be defined for an arbitrary configuration c.

Let \(k\le n\) be the length of the longest block of \(\gamma\)-cells in \(\theta\). If there are no \(\gamma\)-cells, it is easy to see that \(H_\theta\) is surjective, so assume \(k \ge 1\). For the sake of clarity we assume a block of \(\gamma\)-cells is in the segment [1, k]. This does not effect the result because the defined configuration can be shifted to match the distribution. Then let

$$\begin{aligned} e(1)^{(1)}&= e(2)^{(1)} = \ldots = e(n-1)^{(1)} = e(n+1)^{(1)} \\&= e(2)^{(2)} = \ldots = e(n)^{(2)} = 0, \end{aligned}$$

and

$$\begin{aligned}&e(n)^{(1)} = c(0)^{(1)},\\&e(n+i+1)^{(1)} = c(i)^{(1)}, \text { when } i\in \{2,\ldots , k-1 \},\\&e(n+k+1)^{(1)} = e(k)^{(1)} \oplus c(k)^{(1)}\\&e(n+2)^{(1)} = {\left\{ \begin{array}{ll} & c(k+1)^{(1)} \oplus (\bigoplus _{j=n+3}^{n+k+1} e(j)^{(1)}), \text { if } k\le n-1 \\ & c(k+1)^{(1)} \oplus e(n)^{(1)} \oplus (\bigoplus _{j=n+3}^{n+k+1} e(j)^{(1)}),\text { otherwise,} \end{array}\right. }\\&e(1)^{(2)} = e(n+2)^{(1)} \oplus c(1)^{(1)}, \\&e(n+i+1)^{(2)} =\left(\bigoplus _{j=i+1}^{n+i} e(j)^{(2)}\right) \oplus c(i)^{(2)}, \text { when } i \in \{0, \ldots k+1\}. \end{aligned}$$

Now \(H_\theta (e) (x) = c(x)\) when \(x \in [0,k+1]\). For each cell \(x^{(i)}\) there’s a reserved fixing cell whose state is the sum of \(c(x)^{(i)}\) and the states of all the other cells seen by \(x^{(i)}\), modulo 2. Then because \(H_\theta (e)(x)^{(i)}\) is the modulo 2 sum of the cells seen by \(c(x)^{(i)}\), clearly \(H_\theta (e)(x)^{(i)} = c(x)^{(i)}\). \(\square\)

Fig. 8
figure 8

Beginning the construction of the pre-image when \(k < n\). The indices of cells are annotated above. Cells marked \(a_i\) and \(b_i\) are cells reserved for fixing the state of \(H_\theta (e)(i)\) on track 1 and 2 respectively, where \(i \in [0,k+1]\). The rules assigned to each cell are annotated on the bottom

Fig. 9
figure 9

Beginning the construction of the pre-image in the case that \(k=n\)

These states are also well defined, because their definitions only reference already defined states. For example, the track 1 cell 0 sees the cells \(0,\ldots ,n\) on track 1, and cells \(0,\ldots , n-1\) were fixed to be state 0, so we reserve the cell n in the pre-image for fixing the state of \(c(0)^{(1)}\). This construction is illustrated in Figs. 8 and 9. Next we inductively define the rest of configuration e.

Case 1

Suppose \(x> k+1\). Assume that \(e(x)^{(2)}, e(x+1)^{(2)}, \ldots , e(x+n)^{(2)}\) have already been defined. Then let

$$\begin{aligned} e(x+n+1)^{(2)}&= \left(\bigoplus _{j=1}^{n} e(x+j)^{(2)}\right) \oplus c(x)^{(2)}, \end{aligned}$$

meaning \(H_\theta (e)(x)^{(2)} = c(x)^{(2)}\). Now \(e(x)^{(2)}\) is inductively defined for all \(x> k+1\).

We define the cells on track 1 by blocks of \(\gamma\)-cells. Assume first that \(e(x)^{(1)},\) \(e(x+1)^{(1)},\) \(\ldots ,\) \(e(x+n-1)^{(1)}\) have already been defined. If \(\theta (x) = \delta _n\) and \(\theta (x-1) = \delta _n\), let

$$\begin{aligned} e(x+n)^{(1)}&= \left(\bigoplus _{j=1}^{n-1} e(x+j)^{(1)}\right) \oplus c(x)^{(1)}, \end{aligned}$$

meaning \(H_\theta (e)(x)^{(1)} = c(x)^{(1)}\). If \(\theta (x) = \gamma _n\) and \(\theta (x-1) = \delta _n\), then x is the leftmost cell in a length m block of \(\gamma\)-cells, where \(1\le m \le k\). Then let

$$\begin{aligned} e(x+i+n+1)^{(1)} = \,&e(x+i)^{(1)} \oplus e(x+i)^{(2)} \oplus c(x+i)^{(1)} \\&\text {when } i \in \{0,\ldots , m-1 \}, \\ e(x+n)^{(1)} = \,&\left(\bigoplus _{j=m+1}^{n-1} e(x+j)^{(1)}\right) \oplus \left(\bigoplus _{j=n+1}^{n+m} e(x+j)^{(1)}\right) \oplus c(x+m)^{(1)}. \end{aligned}$$

This is illustrated in Fig. 10. These states are indeed well defined. The states \(e(x), \ldots , e(x+m-1)\) are defined by assumption. Using this, states \(e(x+n+1), \ldots , e(x+n+m)\) can be defined inductively. Then every cell seen by \(x+m\) except the first track component of \(x+n\) has already been defined, because the furthest right cell \(x+m\) can see the first track component of is \(x+n+m\).

Now \(H_\theta (e) (x+i)^{(1)} = c(x+i)^{(1)}\) for all \(i \in \{0,\ldots , m \}\). Then by induction \(H_\theta (e)(x) = c(x)\) for all \(x>k+1\).

Fig. 10
figure 10

Construction of the pre-image going to the right. The relative indices of cells are annotated above. Cells marked \(a_i\) and \(b_i\) are cells reserved for fixing the state of \(H_\theta (e)(i)\) on track 1 and 2 respectively. Crossed out cells are cells whose state has already been defined in e

Case 2

Suppose \(x < 0\). First assume that \(e(x+2)^{(2)}, e(x+3)^{(2)}, \ldots , e(x+n+1)^{(2)}\) have already been defined. Let

$$\begin{aligned} e(x+1)^{(2)} = c(x)^{(2)} \oplus \left(\bigoplus _{j=2}^{n+1} e(x+j)^{(2)}\right), \end{aligned}$$

meaning \(H_\theta (e) (x)^{(2)} = c(x)^{(2)}\). Now \(e(x)^{(2)}\) is inductively defined for all \(x < 0\).

Again, we define the cells on track 1 by blocks of \(\gamma\)-cells. Assume then that \(e(x+2)^{(1)}, e(x+3)^{(1)}, \ldots , e(x+n+1)^{(1)}\) have been defined. If \(\theta (x) = \delta _n\) and \(\theta (x+1) = \delta _n\), let

$$\begin{aligned} e(x+1)^{(1)} = c(x)^{(1)} \oplus \left(\bigoplus _{j=2}^{n} e(x+j)^{(1)}\right), \end{aligned}$$

meaning \(H_\theta (e) (x)^{(1)} = c(x)^{(1)}\). If \(\theta (x) = \gamma _n\) and \(\theta (x+1) = \delta _n\), then x is the rightmost cell in a length m block of \(\gamma\)-cells, where \(1 \le m \le k\). Then let

$$\begin{aligned} e(x-i)^{(1)} =\,&c(x-i)^{(1)} \oplus e(x-i+n+1)^{(1)} \oplus e(x-i)^{(2)} \\&\text {when } i \in \{0, \ldots , m-1 \}, \\ e(x+1)^{(1)} =\,&\left(\bigoplus _{j=0}^{m-1} e(x-i)^{(1)}\right) \oplus \left(\bigoplus _{j=2}^{n-m} e(x+i)^{(1)}\right) \oplus c(x-m)^{(1)}. \end{aligned}$$

This is illustrated in Fig. 11. These states are well defined: for each \(i \in \{0, \ldots , m-1 \}\), \(e(x-i)^{(2)}\) was defined earlier and \(e(x-i+n+1)^{(1)}\) is defined by assumption since \(m<n\). Then every cell seen by \(x-m\) has been defined except for the first track component of \(x+1\).

Now \(H_\theta (e) (x-i)^{(1)} = c(x-i)^{(1)}\) for all \(i \in \{0, \ldots , m \}\). Then by induction \(H(e)(x) = c(x)\) for all \(x < 0\).

Fig. 11
figure 11

Construction of the pre-image going to the left

Now \(H_\theta (e)(x) = c(x)\) for all \(x \in \mathbb {Z}\), because for each \(x^{(i)}\), there is a reserved fixing cell, whose state is the modulo 2 sum of \(c(x)^{(i)}\) and all other states seen by \(x^{(i)}\). Hence every \(c \in \Sigma ^\mathbb {Z}\) has a pre-image, meaning \(H_\theta\) is surjective.

5.3 General non-recurrent templates

Next, we reduce the general case of a non-recurrent rule distribution template to the special case from Sects. 5.1 and 5.2.

Definition 15

Let T be a set of rule templates and \(\tau \in T^\mathbb {Z}\) be a non-recurrent rule distribution template. Let \(n\ge 1\) be such that there is a pattern \(t_1 \ldots t_n\) in \(\tau\) that appears only once. Let f and g be local rules with state set \(\Sigma\) and neighbourhood \(N=(-r,\ldots ,r)\) for some \(r \in \mathbb {Z}_+\), \(r\ge n\).

The rule set \(\mathcal {R}_{\tau ,f,g}\) is such that for each \(t\in T\) there is \(h_t\in \mathcal {R}_{\tau ,f,g}\) with state set \(\mathbb {Z}_n \times \Sigma\) and neighbourhood N which maps

$$\begin{aligned} ((m_{-r}, a_{-r}),\ldots , (m_{r},a_{r})) \mapsto (m_0,f(a_{-r},\ldots , a_{r})) \end{aligned}$$

if \(t=t_{m_0}\) and if in segment \((m_{-n},\ldots , m_n)\) there is a length \(n+2\) sub-segment \((a,1,\ldots ,n,b)\), where \(a\ne n\) and \(b\ne 1\). Otherwise \(h_t\) maps

$$\begin{aligned} ((m_{-r}, a_{-r}),\ldots , (m_{r},a_{r})) \mapsto (m_0,g(a_{-r},\ldots , a_{r})), \end{aligned}$$

for all \((m_i,a_i) \in \mathbb {Z}_n \times \Sigma\).

Let’s first clarify the function of the rule set \(\mathcal {R}_{\tau ,f,g}\). Configurations in \((\mathbb {Z}_n \times \Sigma )^\mathbb {Z}\) consist of two tracks, a static background track, and an action track that the local rules actually operate on. In the background track, the configuration contains a guess as to where in the word \(t_1\ldots t_n\) the template in its cell is. Each rule in our assignment knows which template it is assigned to, so it can check if the guessed template is correct. If it is not, the rule g is used on the action track.

If the guess is correct, the rule further checks if the guess m is part of the sub-string \(1\ldots n\) of a string \(a1 \ldots n b\) on the background track, where \(a\ne n\) and \(b \ne 1\). If it is, the rule f is used on the action track, and otherwise rule g is used. Note that the local rule does not know whether the other guesses in this string are correct, only the guess in its own cell. An example is illustrated in Fig. 12.

Fig. 12
figure 12

Example of the chosen rule set and assignment, where \(n=4\). Which rules are used on the binary track are annoted on the bottom row. The string of guesses \(1\ldots 4\) is highlighted. There are two correct guesses in this string and hence the rule f is used in two cells

Notation 5

Let \(\Sigma = A \times B\) for some state sets A and B. For any \(c \in \Sigma ^\mathbb {Z}\), \(c^{(1)} \in A^\mathbb {Z}\), \(c^{(2)} \in B^\mathbb {Z}\) are such that \(c(x) = (c^{(1)}(x),c^{(2)}(x) )\) for all \(x \in \mathbb {Z}\).

Lemma 14

Let \(\tau \in T^\mathbb {Z}\) be a non-recurrent rule distribution template and \(n\ge 1\) such that there is a length n pattern \(t_1 \ldots t_n\) in \(\tau\) that appears only once. Let be \(\mathcal {R}_1 = \{f,g \}\) be a set of local rules with alphabet \(\Sigma\). Let \(\mathcal {R}_2 = \mathcal {R}_{\tau ,f,g}\) and \(\alpha :T \rightarrow \mathcal {R}_2\) an assignment that maps \(\alpha (t) = h_t\) for all \(t \in T\).

Suppose that the update rule \(H_\theta\) is surjective (respectively pre-injective) for all \(\theta \in \mathcal {R}_1^\mathbb {Z}\) such that there is at most one length n block of adjacent rules f in \(\theta\). Then the update rule \(H_{\tau _\alpha }\) is surjective (respectively pre-injective).

Proof

Let \(B(c) = \{ e \in (\mathbb {Z}_n \times \Sigma )^\mathbb {Z} \, | \, e^{(1)} = c^{(1)} \}\) for any \(c\in (\mathbb {Z}_n \times \Sigma )^\mathbb {Z}\) be the set of configurations that share the background track of c. For all \(e \in B(c)\), rules f and g are used in the same cells, meaning there is a \(\theta \in \mathcal {R}_1^\mathbb {Z}\) such that \(H_{\tau _\alpha } (e)^{(2)} = H_\theta (e^{(2)})\) for all \(e \in B(c)\).

Furthermore, because pattern \(t_1 \ldots t_n\) appears in \(\tau\) only once, the pattern \(h_{t_1}\ldots h_{t_n}\) appears only once in \(\tau _\alpha\). Then for any \(e \in B(c)\), there is at most one length n block of cells where rule f is used, because there is at most one length n block of correct guesses for the templates in e that are also a part of the substring \(1\ldots n\) of \(a 1 \ldots n b\), where \(a \ne n\) and \(b \ne 1\), in the background track. Therefore \(\theta\) has at most one block of adjacent rules f.

Suppose then that for every such \(\theta\), \(H_\theta\) is surjective. Let \(c_1 \in (\mathbb {Z}_n \times \Sigma )^\mathbb {Z}\) and \(\theta \in \mathcal {R}_1^\mathbb {Z}\) such that \(H_{\tau _\alpha } (e)^{(2)} = H_\theta (e^{(2)})\) for all \(e \in B(c_1)\). Then because \(H_\theta\) is surjective, there is \(c_2 \in \Sigma ^\mathbb {Z}\) such that \(H_\theta (c_2) = c_1^{(2)}\). Let then \(c_3 \in (\mathbb {Z}_n \times \Sigma )^\mathbb {Z}\) such that \(c_3^{(1)} = c_1^{(1)}\) and \(c_3^{(2)} = c_2^{(2)}\). Then \(c_3 \in B(c_1)\) and hence \(H_{\tau _\alpha } (c_3) = c_1\). Therefore \(H_{\tau _\alpha }\) is surjective.

Suppose then that for every such \(\theta\), \(H_\theta\) is pre-injective. Let \(c_1,c_2 \in (\mathbb {Z}_n \times \Sigma )^\mathbb {Z}\) be asymptotic configurations with \(c_1 \ne c_2\). If \(c_1^{(1)} \ne c_2^{(1)}\) then clearly \(H_{\tau _\alpha } (c_1) \ne H_{\tau _\alpha } (c_2)\) because the background track is static. Assume then that \(c_1^{(1)} = c_2^{(1)}\), meaning \(c_1^{(2)} \ne c_2^{(2)}\). Then \(B(c_1) = B(c_2)\), meaning there is \(\theta \in \mathcal {R}_1^\mathbb {Z}\) such that \(H_{\tau _\alpha } (c_1)^{(2)} = H_\theta (c_1^{(2)})\) and \(H_{\tau _\alpha } (c_2)^{(2)} = H_\theta (c_2^{(2)})\). Now because \(H_\theta\) is pre-injective, \(H_{\tau _\alpha } (c_1)^{(2)} = H_\theta (c_1^{(2)}) \ne H_\theta (c_2^{(2)}) = H_{\tau _\alpha } (c_2)^{(2)}\) and hence \(H_{\tau _\alpha } (c_1) \ne H_{\tau _\alpha } (c_2)\). Therefore \(H_{\tau _\alpha }\) is pre-injective. \(\square\)

Theorem 15

Let T be a set of rule templates and \(\tau \in T^\mathbb {Z}\) be a non-recurrent rule distribution template. There exists a set of local rules \(\mathcal {R}\) and assignment \(\alpha : T \rightarrow \mathcal {R}\) such that \(H_{\tau _\alpha }\) is pre-injective, but not surjective.

Proof

Let \(n \ge 1\) be such that there is a length n pattern \(t_1\ldots t_n\) in \(\tau\) that only appears once. Let \(\mathcal {R}' = \{f_n, g_n\}\). By Lemma 11 we know that for all \(\theta \in \mathcal {R}'^\mathbb {Z}\) such that a length n block of rules \(f_n\) appears at most once, \(H_\theta\) is pre-injective. Let \(\mathcal {R} = \mathcal {R}_{\tau ,f_n,g_n}\) and \(\alpha :T\rightarrow \mathcal {R}\) such that \(\alpha (t) = h_t\) for all \(t \in T\). Then by Lemma 14, \(H_{\tau _\alpha }\) is pre-injective.

Next, assume the pattern \(t_1\ldots t_n\) is in the cells \([x+1,x+n]\), meaning \(\tau (x+i) = t_i\) when \(1\le i \le n\). Let then \(c \in (\mathbb {Z}_n \times \Sigma )^\mathbb {Z}\) be such that \(c(x+n+1)^{(1)} \ne 1, c(x)^{(1)} \ne n, c(x+i)^{(1)} = i\) when \(1 \le i \le n\), and \(c^{(2)}\) is a configuration with no pre-image as in the proof of Lemma 10, for a rule distribution where the n block of f-cells is in the range \([x+1,x+n]\). Now rule \(f_n\) is used in cells \(x+1,\ldots ,x+n\) and rule \(g_n\) is used in x. By Lemma 10, c then has no pre-image and therefore \(H_{\tau _\alpha }\) is not surjective. \(\square\)

Theorem 16

Let T be a set of rule templates and \(\tau \in T^\mathbb {Z}\) be a non-recurrent rule distribution template. There exists a set of local rules \(\mathcal {R}\) and assignment \(\alpha : T \rightarrow \mathcal {R}\) such that \(H_{\tau _\alpha }\) is surjective, but not pre-injective.

Proof

Let \(n \ge 1\) be such that there is a length n pattern \(t_1\ldots t_n\) in \(\tau\) that only appears once. Let \(\mathcal {R}' = \{\gamma _n, \delta _n\}\). By Lemma 13 we know that for all \(\theta \in \mathcal {R}'^\mathbb {Z}\) such that a length n block of rules \(\gamma _n\) appears at most once, \(H_\theta\) is surjective. Let \(\mathcal {R} = \mathcal {R}_{\tau ,\gamma _n,\delta _n}\) and \(\alpha :T\rightarrow \mathcal {R}\) such that \(\alpha (t) = h_t\) for all \(t \in T\). Then by Lemma 14, \(H_{\tau _\alpha }\) is surjective.

Next, assume the pattern \(t_1\ldots t_n\) is in the cells \([x+1,x+n]\), meaning \(\tau (x+i) = t_i\) when \(1\le i \le n\). Let \(c,e \in (\mathbb {Z}_n \times \Sigma )^\mathbb {Z}\) be such that \(c^{(1)} = e^{(1)}\), \(c(x+n+1)^{(1)} \ne 1, c(x)^{(1)} \ne n, c(x+i)^{(1)} = i\) when \(1 \le i \le n\) and \(c^{(2)},e^{(2)}\) are asymptotic but different configurations with the same image as in Lemma 12, when the n block of \(\gamma\)-cells is in the range \([x+1,x+n]\). Now rule \(\gamma _n\) is used in cells \(x+1,\ldots ,x+n\) and rule \(\delta _n\) is used in x and \(x+n+1\). Then by Lemma 12, c and e are asymptotic differing configurations with the same image, meaning \(H_{\tau _\alpha }\) is not pre-injective. \(\square\)

A similar reduction to the preceding can be achieved by using a technique found in Salo (2014). Using this method, the assignment can be defined with a fixed number of states, not depending on the number of templates.

6 Surjunctivity

Surjunctivity is the property of a cellular automaton that if its global update function is injective, then it is surjective. Surjunctivity is implied by the Garden of Eden theorem, so it is known to hold for regular CA over integer grids.

Furthermore, then we also know that surjunctivity holds for NUCA with a recurrent rule distribution. In this section we show a property of a rule distribution that implies surjunctivity, and show that every distribution asymptotic to a recurrent distribution has said property.

First we define NUCA over a finite space \(\mathbb {Z}_n\) for some \(n \in \mathbb {Z}_+\). The definition is analogous to a typical NUCA. Intuitively, if a normal NUCA is thought of as acting on a bi-infinite "tape", a NUCA over \(\mathbb {Z}_n\) acts on a finite, circular tape.

Definition 16

Let \(n \in \mathbb {Z}_+\), \(\mathcal {R}\) a rule set over state set \(\Sigma\) and with neighbourhood \(N = (n_1, \ldots , n_m)\), where \(n_1,\ldots ,n_m \in \mathbb {Z}_n\). Let \(\psi \in \mathcal {R}^{\mathbb {Z}_n}\) be a rule distribution over the finite set \(\mathbb {Z}_n\). The tuple \(A=(\Sigma ,\mathbb {Z}_n,N,\mathcal {R},\psi )\) is a non-uniform CA over finite space, and its global update function \(H_\psi : \Sigma ^{\mathbb {Z}_n} \rightarrow \Sigma ^{\mathbb {Z}_n}\) is the one that maps \(c \in \Sigma ^{\mathbb {Z}_m}\) such that

$$\begin{aligned} H_\psi (c) (x) = \psi (x) ((x+n_1\, \textrm{mod}\, n), \ldots , (x+n_m \, \textrm{mod}\, n) ), \end{aligned}$$

for all \(x \in \mathbb {Z}_n\). If A is clear from context, it’s usually referred to by its global update rule.

For any \(k \in \mathbb {Z}\), we denote \((\infty , k) = \{ x \in \mathbb {Z} \, | \, x < k \}\) and \((k, \infty ) = \{ x \in \mathbb {Z} \, | \, x> k \}\).

Lemma 17

Let \(\phi \in \mathcal {R}^\mathbb {Z}\) be a recurrent rule distribution. Let \(i,j \in \mathbb {Z}\), \(i \le j\), and \(u = \phi _{|(\infty ,i)}\), \(v = \phi _{|[i,j]}\), \(w= \phi _{|(j,\infty )}\). Either every finite suffix of u is a subword of w or every finite prefix of w is a subword of u.

Proof

Suppose x is a suffix of u and y is a prefix of w such that x is not a subword of w and y is not a subword of u. Then the word xvy cannot appear infinitely many times in \(\phi\); if it did, either x would be a subword of w or y a subword of u. Then \(\phi\) isn’t recurrent, which is a contradiction. Therefore either x must be a subword of w or y must be a subword of u. \(\square\)

We show that for any distribution \(\theta\) with the property shown for recurrent distributions in Lemma 17, the NUCA \(H_\theta\) will be surjunctive.

Lemma 18

Let \(\theta \in \mathcal {R}^\mathbb {Z}\) be a rule distribution. Let \(i,j\in \mathbb {Z}\) such that \(i,j \in \mathbb {Z}\), \(i \le j\), \(u = \theta _{|(\infty ,i)}\), \(w= \theta _{|(j,\infty )}\), and assume that either every finite suffix of u is a subword of w or every finite prefix of w is a subword of u. Then if \(H_\theta\) is injective, it is surjective.

Proof

Assume \(H_\theta\) is not surjective. Let \(\Sigma\) be the state set of rules in \(\mathcal {R}\) and assume that all rules are at most radius r. Assume that every suffix of u is a subword of w. The other case is identical.

For any \(n\in \mathbb {Z}_+\), let \(u_n = \theta _{|[i-n,i-1]}\) be the length n suffix of \(\theta _{|(\infty ,i)}\). Let \(m_n\) be the length of the segment from i to the rightmost cell of the leftmost copy of \(u_n\) to the right of j. Let then \(\psi _n \in \mathcal {R}^{\mathbb {Z}_{m_n}}\) be such that \(\psi _n (x \mod m_n) = \theta (x)\) for all \(x \in [i, i+m_n-1]\). We can think of \(\psi _n\) as the segment of \(\theta\) ranging from \(u_n\) to a copy of \(u_n\), wrapped around in a circle with the two copies overlapping each other. This is illustrated in Fig. 13.

Fig. 13
figure 13

The wrapping of \(\theta\) (above) to \(\psi _n\) (below). The arrows indicate the direction of the wrapping

Because \(H_\theta\) is not surjective, by Lemma 1, for large enough n the function \(H_{\psi _n}\) is not surjective. Since \(\Sigma ^{\mathbb {Z}_{m_n}}\) is finite, \(H_{\psi _n}\) is not injective. Let then \(c_n,e_n \in \Sigma ^{\mathbb {Z}_{m_n}}\) be configurations such that \(c_n \ne e_n\) and \(H_{\psi _n} (c_n) = H_{\psi _n} (e_n)\). Now there are two cases.

Case 1: For infinitely many n, the \(c_n\) and \(e_n\) differ within 2r of the segment [ij], that is, \(\textrm{diff}(c_n, e_n) \cap [i-2r,j+2r] \ne \emptyset\). Let then \(c_n', e_n' \in \Sigma ^\mathbb {Z}\) be configurations such that \(c_n' (x) = c_n(x \mod m_n)\) and \(e_n' (x) = e_n(x \mod m_n)\) for all \(x\in [i-n,i+m_n-1]\) and \(c_n'(y) = e_n'(y)\) for all \(y \notin [i-n,i+m_n-1]\) The configurations \(c_n'\) and \(e_n'\) can be thought of as \(c_n\) and \(e_n\) "unwrapped" and "embedded" into some configuration over \(\mathbb {Z}\).

Let then \((c_{n_k}',e_{n_k}')_k\) be a sequence of pairs of these unwrapped configurations, where the indices \(n_k\) are the ones where \(c_{n_k}\) and \(e_{n_k}\) differ within 2r of [ij]. By compactness, this sequence has a converging subsequence with a limit (ce). Now \(c \ne e\), because \(\textrm{diff}(c_{n_k}', e_{n_k}') \cap [i-2r,j+2r] \ne \emptyset\) for all k. In addition, because \(H_{\psi _{n_k}} (c_{n_k}) = H_{\psi _{n_k}} (e_{n_k})\) for all k, it holds that for any finite domain \(D \subset \mathbb {Z}\) there is \(m \in \mathbb {Z}_+\) such that \(H_\theta (c_{n_k}')(D)=H_\theta (e_{n_k}')(D)\) for all \(k \ge m\). Therefore \(H_\theta (c) = H_\theta (e)\), meaning \(H_\theta\) is not injective.

Case 2: For all large enough n, \(c_n\) and \(e_n\) are identical within 2r of [ij]. Let \(c,e\in \Sigma ^\mathbb {Z}\) such that for some such n, \(c(x) = c_n(x \mod m_n)\) and \(e(x) = e_n(x \mod m_n)\) for all \(x \in [j+1, i+m_n-1]\) and \(c(y) = e(y)\) for all \(y \notin [j+1, i+m_n-1]\). This is illustrated in Fig. 14.

Fig. 14
figure 14

The unwrapping of \(c_n\) and \(e_n\) into c and e in Case 2 of the proof of Lemma 13

Clearly \(c \ne e\), because \(c_n\) and \(e_n\) differ somewhere in the segment \([j+1, i+m_n-1]\). For any cell x that is at least r cells away from \(\textrm{diff}(c,e)\), the neighbourhood of x is identical in c and e, hence \(H_\theta (c)(x) = H_\theta (e)(x)\). For any cell y that is within r cells of \(\textrm{diff}(c,e)\), its neighbourhood is within 2r of \(\textrm{diff}(c,e)\). Because \(H_{\psi _n} (c_n) = H_{\psi _n} (e_n)\), then \(H_\theta (c)(y) = H_\theta (e)(y)\). Therefore \(H_\theta (c) = H_\theta (e)\), meaning \(H_\theta\) is not injective.

Hence in either case, \(H_\theta\) is not injective. Therefore if \(H_\theta\) is injective, it is surjective. \(\square\)

Theorem 19

Let \(\theta \in \mathcal {R}^\mathbb {Z}\) be asymptotic to a recurrent rule distribution \(\phi \in \mathcal {R}^\mathbb {Z}\). If \(H_\theta\) is injective, it is surjective.

Proof

Let \(i,j\in \mathbb {Z}\), \(i\le j\) be such that \(\textrm{diff}(\theta , \phi ) \subseteq [i,j]\) and let \(u = \phi _{|(\infty ,i)}\) and \(w= \phi _{|(j,\infty )}\). By Lemma 17, either every finite suffix of u is a subword of w or every finite prefix of w is a subword of u. Then because \(\phi\) and \(\theta\) are identical outside of [ij], by Lemma 13, if \(H_\theta\) is injective, it is surjective. \(\square\)

7 Conclusions

We find that the Garden of Eden theorem holds for NUCA if the local rule distribution is uniformly recurrent. In the 1-dimensional case we find that every assignment to a given rule template defines a NUCA that satisfies either direction of the Garden of Eden theorem, if and only if the template is recurrent. Finally we find that all rule distributions asymptotic to a recurrent distribution are surjunctive.

The Garden of Eden theorem for NUCA should still be examined in other groups. As for surjunctivity, we have shown a property of a template that guarantees surjunctivity, but know nothing about the converse. It may be useful to examine the complement of the underlying property which gives us surjunctivity, and see whether this guarantees the existence of non-surjunctive assignments.