Universal gates with wires in a row

We give some optimal size generating sets for the group generated by shifts and local permutations on the binary full shift. We show that a single generator, namely the fully asynchronous application of the elementary cellular automaton 57 (or, by symmetry, ECA 99), suffices in addition to the shift. In the terminology of logical gates, we have a single reversible gate whose shifts generate all (finitary) reversible gates on infinitely many binary-valued wires that lie in a row and cannot (a priori) be rearranged. We classify pairs of words $u, v$ such that the gate swapping these two words, together with the shift and the bit flip, generates all local permutations. As a corollary, we obtain analogous results in the case where the wires are arranged on a cycle, confirming a conjecture of Macauley-McCammond-Mortveit and Vielhaber.


Introduction
In this paper, we study the subgroup G of the self-homeomorphism group of {0, 1} Z generated by shifts and local permutations (or reversible finitary logical gates) on the set of all bi-infinite binary sequences, studied previously in [2] under the name OB(2, 1) (as a subgroup of the larger group RTM(2, 1)).
We prove a result about generators for the group G: In Section 7 we characterize those pairs of words u, v such that the homeomorphism swapping u and v at the origin, together with the shift and the bit flip, generates all of G. In the process we identify some natural subgroups of G in Section 5, with constraints related to linearity, and to (group-)geometric phenomena such as one-sided information flow.
We say a set of local permutations is a universal gate set if it, together with the shift, generates G. As an application of the result about word swaps, we prove that ECA 57 is a singleton universal gate set by showing that it generates both a universal word swap and the bit flip. In particular, it follows that G is 2-generated.
In [9,13], it is asked whether asynchronous ECA 57 is universal in the case when wires are arranged on a cycle Z/nZ. We solve this question by showing that universality on Z implies universality on Z/nZ for all large enough n in Section 4. Impatient readers can find copy-pasteable implementations 1 of standard gates in terms of shifts of asynchronous ECA 57 in the appendices.
We find the group G interesting for several reasons: From the perspective of computation and logical gates, G is precisely the computation you can do with reversible gates if your infinitely many wires are arranged in a row. It differs from the groupoid [7] and clone formalisms [3] most concretely in the aspect that the model has infinitely many borrowed bits (in the sense of [15]) which arise naturally from the infiniteness of Z. Reordering of the wires is not built into the formalism, which strengthens the notion of universality.
The group G seems like a natural simplest group that can be used for the geometric group theory of reversible logic gates.
The author finds G and its variants useful in the context of symbolic dynamics, and has applied G and its local embeddings (in the LEF sense [5]) in several works on automorphism groups, see e.g. [11,10].

Definitions
We assume 0 ∈ N and in f • g = f g, g is applied first. All intervals [ We consider X = {0, 1} Z with the product topology arising from the discrete topology of {0, 1}. The shift is σ : X → X defined by σ(x) i = x i+1 . A power σ n is also informally referred to as a shift, which should not cause confusion. For n ≥ 1, the n-periodic points are the points x ∈ X satisfying σ n (x) = x. The set of n-periodic points is denoted by X n . The shifts of a function are its conjugates by shifts σ n .
There is an obvious way to see X as a vector space over the two-element field, and addition and terms such as linear and affine for maps on X are interpreted with respect to this structure. The subset X 0 = {x ∈ X | ∃R : ∀|i| ≥ R : x i = 0} is a subspace. An affine translation refers to a function t : X → X of the form We use the F 1 , ..., F n notation to denote the smallest subgroup of a group G (deduced from the context) containing the elements equal to F i (when F i ∈ G) or found in F i (when F i is a set).
3 G Definition 1. The group G is defined as the subgroup of the self-homeomorphism group of X generated by the shift σ and homeomorphisms f : X → X satisfying We make some basic observations about the structure of this group G (see also [2,11]).
We call self-homeomorphisms f of X satisfying ∃r : For an inert element f ∈ G, the finite set of coordinates that may change under the application of f is called its support. Of more importance than the support and the number r is the R in the following lemma, which states that if f is inert in G, then not only does it change only finitely many symbols in a given point of X, but it also looks at only finitely many coordinates. Lemma 1. An element f ∈ G is inert if and only if there exists a strong radius R and a local rulef : Proof. Clearly any R andf define an inert element of G.
Suppose then f ∈ G is inert, and let r be as in the definition. Since f is Since f is a homeomorphism, it is in particular a bijection, sof is also a bijection.
Define the strong support of inert f as the set of coordinates that can be changed by f , and whose change may affect another coordinate, which is finite by the previous lemma.
The number R can be arbitrarily larger than r, even if r = 0.
Remark 1. We note that (by easy counterexamples) the inert elements of G are not the same thing as self-homeomorphisms of X which have clopen support in the usual sense of homeomorphisms (where the support of a homeomorphism is the closure of the complement of its set of fixed points). Neither are they the same thing as self-homeomorphisms of X which always modify only finitely many coordinates, or ones that always modify only a bounded number of coordinates. By the discussion above, they are precisely the self-homeomorphisms of X which always modify a bounded set of coordinates.
Lemma 2. Elements of G can be written in a unique way as σ n • f with f inert. There is a unique homomorphism α : G → Z satisfying α(σ) = 1. The kernel of α consists of the inert elements. The group G is (locally finite)-by-Z, more precisely a semidirect product of Z acting on the locally finite group of inert elements.
The inert map g in f = σ n • g is called the inert part of f .
Proof. Since the local permutations form a group themselves, and this group is normalized by σ (i.e. conjugation of an inert element by σ gives an inert element), it follows that every element of G is of the form σ n • f where f is inert, and clearly n is uniquely determined, after which f is clearly uniquely determined. Any homomorphism to Z maps any inert f to 0 (since inert elements are of finite order), so by the normal form, σ → 1 uniquely determines the homomorphism. It follows from this that ker α consists of precisely the inert elements, and inert elements clearly form a locally finite group, since the support of the composition of two inert element is at most the union of the support of the generators. This gives G the structure of a (locally finite)-by-Z group, and since the homomorphism α is split, G is in fact a semidirect product of Z acting on the locally finite group of inert elements.
We end this section with some general discussion. The inert elements can be naturally considered reversible gates by Lemma 1, as they perform an operation on finitely many wires of the input independently of the other wires. From this perspective, the shift should be seen as either a technical tool or as an internal symmetry of the group -shifts are not necessarily computationally meaningful, but conjugation by a shift is very meaningful, as it simply means applying a gate to another contiguous set of wires, and this is precisely what it means to say that G is a semidirect product of Z acting on the inert elements.
Though we do not do so here, from this point of view of logical gates it would be natural to see G not just as a group but as a group where the shifts are part of the structure. A group H with a fixed epimorphism π : H → Z is often called (Z-)indicable, so one could sensibly call a group with a fixed split epimorphism π : H → Z strongly Z-indicable, with the understanding that π and the right inverse can be taken to be part of the structure, if needed. In particular if the Z-embedding giving the right inverse is taken part of the structure, then substructures of G always contain the shifts.
We mention some standard notions in category theory with are related: One can see a group H with a preferred Z-subgroup as a pair (H, ψ) where ψ : Z → H is a homomorphism (that is part of the structure). Such pairs form the under category, also known as the coslice category, Z ↓ Grp. This does not enforce the semidirect product structure in the sense that the Z picked out by ψ can behave very badly in other objects of this category, but this does enforce the property that subobjects of G automatically contain the shifts (note that monomorphisms in Grp are the injections). Dually, one can see G as an indicable group with a fixed π : G → Z, i.e. an element of the slice category Grp ↓ Z, but this does not force subobjects of G to contain the shifts.
The notation is meant to imply that G n can be seen as a modulo n variant of G. In this section, we develop an explicit algebraic connection.
For inert f , the strong shift-invariant radius of f is the minimal R among strong radii of conjugates σ m • f • σ −m , and for general f ∈ G the strong shift-invariant radius is the strong shift-invariant radius of the inert part. The importance of the strong shift-invariant radius is the following.
In particular, σ n (aw) = wa for a ∈ {0, 1}, w ∈ {0, 1} n−1 . Since n > 2R+1, the limit is well-defined as the maps σ −in •g •σ in commute pairwise (for distinct values of i) and every j ∈ Z is in the support of only finitely many of them (in fact only one of them). Observe thatf n commutes with σ n , and thus preserves the set of n-periodic points. The action off n on the nperiodic points of {0, 1} Z fully determines the action of f n on {0, 1} n , and vice versa.
Remark 2. For completeness, we give a formula for f n . Let f ∈ G \ {id} be inert, let the strong shift-invariant radius of f be R, and let m be minimal such that σ m • f • σ −m has strong radius R, and letf : Note that if m, R,f are as above, then f applies its local rulef "at m", i.e. in the coordinates [m − R, m + R].
Proof. Consider first inert g with strong shift-invariant radius R. Since n > 2R + 1, by the formulas of Remark 2, g n permutes only the contents of some 2R + 1 coordinates of [0, n − 1], so in fact g n performs 2 n−(2R+1) "copies" of the same permutation depending on the values of the other n − 2R − 1 coordinates, thus it is a composition of an even number of permutations with disjoint supports, all having the same parity, thus g n ∈ G n .
The shift σ n is a permutation of the n coordinates of a given word, so it can be written as a product of swaps of adjacent coordinates. When n ≥ 3, coordinate swaps are even by the argument of the above paragraph, and thus σ n is even as a composition of even permutations. Thus for f = σ k • g with g inert, we have f n = σ k n • g n ∈ G n .
The proof shows that σ n ∈ G n whenever n ≥ 3. We mention a combinatorial consequence of this: The parity of a permutation on a set X is the parity of |X| − c where c is the number of cycles in the cycle decomposition. Thus the sign of σ n is 2 n − p n where p n is the number of orbits of words of length n under the cyclic shift. The sequence p n is well-known, it is sequence A000031 in the OEIS, and a standard formula for it is p n = 1 n d|n φ(d)2 n/d (where φ is the Euler totient function). We are stating precisely that p n is even for all n ≥ 3. Since p 1 = 2 and p 2 = 3, p 2 is the only odd value in the sequence p 1 , p 2 , p 3 , ....

Lemma 4.
Let g be inert with strong shift-invariant radius R, and suppose n > 2R + 1.
Proof. We prove instead the equivalent equalityḡ n •σ m n =σ m n • (σ −m • g • σ m ) n for the actions on n-periodic points. Letting x ∈ X n , we havē where σ m waddles over the finite expressions by using abelianity of Z and by conjugating gs, and the result stays correct in the limit since σ is continuous.
The map f → f n does not give a homomorphism from G to G n (it is not even well-defined for all elements of G), and even if we induce a mapping from G to G n using a finite generating set of G, it will typically not give a homomorphism (the group G is not residually finite).
However, this mapping does give us local homomorphisms in the sense of LEF groups [5]: as long as information is "not passed around the cycle", we see the same relations in both G and G n . The following lemma is a weak version of this fact: In particular this lemma shows that G is indeed a LEF group.
Proof. First, we reduce to the inert case.
Observe that by iterating Lemma 4 the RHS of the equality is In particular, the h i are inert with strong shift-invariant radius R i . The LHS on the other hand is We may thus assume ℓ i = 0 for all i, by replacing each holds), and by cancelling the common part σ j ℓj n . We have then reduced the problem to the case where the Let us now prove the equivalent equality For this, observe that the action of the maps f i on the interval [h, h + n − 1] is precisely the same as the action of the mapsf i n , and the action of thê f i n on any contiguous sequence of n integers determines the action. Thus the map f i →f i n even induces a homomorphism from f 1 , ..., f k to f 1 n , ...,f k n , in particular we have (f 1 • · · · • f k ) n = f 1 n • · · · • f k n as desired.

How not to generate G (subgroups)
We now define some important self-homeomorphisms of X (not all in G) and make simple observations about subgroups they generate. For the purpose of universality, the importance of understanding subgroups is of course that if a set The map c 0 inverts the symbol at the origin, and is usually called the NOT gate in the theory of logical gates. We also refer to it as the flip. The map c 1 is linear, and is called the CNOT or controlled NOT. It is useful to keep in mind the identity which states the swap in terms of CNOTs. The gate c 2 is called the Toffoli gate.
We make some observations about subgroups generated by these elements. Write Sym <∞ (Z) for the group of finite-support permutations on Z.
Proof sketch. In each case, it is straightforward to show that the generators are contained in the RHS, and that the RHS is a group. To see that all of the group is generated, for the first equality we need that every permutation can be decomposed into swaps. The second is clear, and this is a standard realization of the lamplighter group Z 2 ≀ Z. The third follows from (1) and the fact elementary matrices generate matrix groups. The RHS of the fourth equality is equivalent to f being the sum of a linear map and a constant in X 0 , and the subgroup c 0 , σ allows addition of arbitrary constants.
The first group is a standard example of a finitely-generated LEF group that is not residually finite [5] (G itself is also such an example).
The following subgroups are important in the classification of universal word swap gates, and we include a more complete treatment.
where the g i are functions whose type is unambiguous from context. Define Informally, G V is the subgroup of G for which the cosets of V are a system of blocks of imprimitivity, and these cosets are permuted by an affine translation. The interpretation of G R is that information can only travel to the right, though literally this only holds in the inert part.
Example 1: For all k we have c k ∈ G L and Rc k R ∈ G R . We have c 0 ∈ G V for any V , and if π is the permutation (00 11)(01)(10) of {0, 1} 2 , in cycle notation, then the map . This map f ∈ G v (which is f 00,11 in the notation of Section 7), is not linear, but is affine. The map that performs the permutation (000 111) is in G V ′ for a proper subspace V ′ < X 0 , but is not even affine.
Suppose then f, g ∈ G V , and let the offset vectors be u, v, and shifts m, n, respectively.
Next, we show G R is a subgroup. Let us call the sequence (g i ) i∈Z appearing in the definition the rule sequence. Let σ n • f ∈ G R with rule sequence (g i ) i∈Z . Then as above, it has inverse σ −n • (σ n • f −1 • σ −n ) and we only need to find a rule sequence for σ n • f −1 • σ −n .
First, we show that f −1 has a rule sequence. Observe that necessarily g i (y) = y i for all but finitely many i (since f is inert). Observe then that we have g i (ya) = g i (yb) for all y ∈ {0, 1} (−∞,i−1] , a = b. There are several ways to see this: it follows from the fact that f m = id for some m (since f is inert), or from a direct counting argument using the fact g i (y) = y i for large |i|. Now, where we shift the domain of h i+n to h i+n : {0, 1} (−∞,i] → {0, 1} with the obvious interpretation. Thus, (h i+n ) i∈Z is a rule sequence for σ n • f −1 • σ −n . Suppose then that σ n •f, σ m •f ′ ∈ G V with f, f ′ inert. The above paragraph shows that the set of inert elements having a rule sequence is closed under conjugation by the shift, so by σ m f ′ σ n f = σ m+n (σ −n f ′ σ n )f we only need to show that if f ′ and f have rule sequences, then so does f ′ • f . This follows from where y j = g j (x (−∞,j] ) for j ≤ i. This expression only looks at the values of x in x (−∞,i] , thus defines a rule sequence. To see that G R is a proper subgroup, observe that the swap s / ∈ G R . The proof for G L is symmetric.

How to generate G and G n
The following is essentially folklore in the theory of reversible circuits.
we have G n = S, c 0 n , c 2 n . In particular, Proof. The maximal minimal strong shift-invariant radius among gates in S ∪ {c 0 , c 2 } is 1 (for c 2 ), so the expressions are well-defined and we have S ∪ {c 0 n , c 2 n } ⊂ G n by Lemma 3. It is known that every even permutation on {0, 1} n can be written as a finite composition of applications of the NOT gate and Toffoli gate when we are allowed to apply these gates to arbitrary 3-tuples of wires (this is the folklore part, see e.g. [4,15]). The swaps in S allow arbitrary permutations of the coordinates, so we can conjugate any 3-tuple of coordinates to the support {0, 1, 2} of the Toffoli gate c 2 n , and similarly we can apply the NOT gate in any coordinate.
For the second claim, observe that the gates in S are conjugate to s n by powers of σ n .
Proof. It is enough to show that the local permutations are generated, and by conjugating with powers of σ (which is in both claimed generating sets), it is enough to show that those with strong support contained in [0, n − 1] are generated, for arbitrarily large n. By the previous lemma, the leftmost generating set can perform every even permutation of the word on the interval [0, n − 1] for n ≥ 4: none of the generators of G n in the first generating set in the Lemma 8 send information over the borders of the interval [0, n − 1], so the action of the subgroup generated by precisely simulates the action of G n of the corresponding generators in the lemma.
As in Lemma 3, we see that every permutation of {0, 1} n is even when seen as a permutation of {0, 1} n+1 where the rightmost bit is never changed or looked at (i.e. it is a borrowed bit in the terminology of [15]), so the leftmost generating set indeed generates all of G.
The second equality follows from (1).
In logical gates contexts where wire swaps are available for free, a commonly used gate set is {c 0 , c 1 , c 2 }, known as the NCT library (NOT, Controlled NOT, Toffoli gate), and corresponds to the rightmost generating set c 2 , c 1 , Rc 1 R, c 0 , σ above (though we need two versions of c 1 ). The gate c 1 is usually included as it is cheaper than c 2 in physical implementations, but for the purpose of theory it can simply be expressed in terms of c 0 and c 2 , and thus need not be included when s is included, giving the leftmost generating set c 2 , s, c 0 , σ.
When the wires are organized into a finite cycle, any universal set of gates for G gives one for the alternating group G n . Theorem 1. Let F ⊂ G be any finite generating set. Then for large enough n, Proof. It is enough to show that {f n | f ∈ F } generates some generating set of G n . By Lemma 8, it is enough to generate all of S and the gates c 0 n , c 2 n . Thus it is enough to generate the standard generating set {s n , c 0 n , c 2 n , σ n }. The gate s can be written as a finite composition of elements in F , i.e. s = f 1 • · · · • f k for some f 1 , ..., f k ∈ F . By Lemma 5, for n large enough we then have s n = f 1 n • · · · • f k n . The same argument applies to the gates in {c 0 , c 2 , σ}, so for large enough n we indeed have concluding the proof.
The crucial point in the proof was that G n has essentially a single finite generating set that does not depend on n, so it is enough to write the formulas generating this generating set, and these formulas then work for large n.
We do not know whether the converse of Theorem 1, e.g., whether the fact {f n | f ∈ F } and the shift together generate G n for all large enough n implies that F and σ generate G. It could be the case that some set F is only able to generate the standard generating set for all n by sending information around the cycle.

Generating G by word-swapping
. For example the Toffoli gate is c 2 = f 011,111 . We give a classification of the pairs of words u, v such that f u,v is a universal gate together with the shift and the flip, i.e. f u,v , σ, c 0 = G. The characterization is that the words differ in exactly one place, which is not at the border.
Proof. For sufficiency, suppose the RHS holds. Since c 0 , σ ∈ G ′ , we can conjugate u ′ to u = 0 n and v ′ to v = D(u ′ , v ′ ). By applying the gate f 0 n ,v , flipping the ith bit on the tape, applying the gate again, and again flipping the ith bit, we effectively eliminate one of the bits that f 0 n ,v looks at. In symbols, By the assumption, v contains the subwords 01 and 10, so c 1 and Rc 1 R are in G ′ by applying the formulas of the previous paragraph, eliminating all but the subword 01 (resp. 10) of v. Then by (1), also s ∈ G ′ . Now, use the same trick to eliminate all but the subword 010 from v to obtain f 000,010 ∈ G ′ . This can be conjugated to the Toffoli gate c 2 by applying suitable shifts of the swap and the flip. It then follows from Lemma 9 that G ′ = G.
As for necessity, if If D(u ′ , v ′ ) contains more than one 1, then consider w = ω 0.D(u ′ , v ′ )0 ω as a vector in X 0 . Together with its shifts, it generates a shift-invariant vector space V ≤ X 0 . It does not generate all of X 0 : one way to see this is that the support of a sum of distinct shifts of w has cardinality at least 2, since the leftmost coordinate of the leftmost summand and the rightmost coordinate of the rightmost summand are not cancelled. It is straightforward to show that In particular the previous theorem shows that c 0 , c 2 , σ do not generate G, since the Toffoli gate f 011,111 satisfies D(011, 111) = 100 / ∈ 0 * 0100 * (and the reason for this is that c 2 ∈ G L ).
One cannot omit c 0 from the theorem, since we can never have G = f u,v , σ for the simple reason that either 0 Z or 1 Z is a fixed point for both generators when D(u, v) ∈ 0 * 0100 * , and when D(u, v) / ∈ 0 * 0100 * , even {f u,v , c 0 , σ} does not generate G by the theorem.

Asynchronous application of elementary CA
We can now find a single inert element that generates G together with the shift, i.e a singleton universal gate set. This is an optimal way to generate G in several ways: we need only one gate, which only modifies one cell at a time, and which has strong radius r = 1. This radius is optimal since all permutations of two or fewer bits are affine.
We recall the Wolfram number [14] of an elementary cellular automaton. Enumerate words {0, 1} 3 in reverse lexicographic order as w 0 = 111, w 1 = 110, w 2 = 101, .... To each b ∈ {0, 1} 8 , we associate a self-homeomorphism 1] , and e b (x) i = x i for i = 0. This number b is then written in decimal. We show that the singleton universal gate sets among e n are precisely e 57 = e 001110012 and e 99 = e 011000112 .
Usually, a cellular automaton applies the local rule to all cells of Z at once. The definition here is the definition of (fully) asynchronous application of the cellular automaton, as studied in [9,13].
The map e 99 is its mirror image. In particular, G = e 57 , σ = e 99 , σ is 2-generated.
Proof. Consider general e n , n ∈ {0, 1, ..., 255}. For e n to be in G, the binary representation of n must be of the form If d = 1, then 0 Z is fixed, and similarly we must have a = 0, so for universality we must have n = (0b1(1 − b)c0(1 − c)1) 2 , so the choices are among 00110011, 00111001, 01100011, 01101001. These are e 51 , e 57 , e 99 , e 105 respectively. We have e 51 = c 0 , so it is not a singleton universal gate set by Lemma 6. The gate e 105 sums the bits at x −1 , x 1 to the bit at x 0 , and then flips the value at x 0 . This gate is thus affine, thus cannot be universal. We are left with only the choices e 57 and e 99 .
Let us show that e 57 is universal, i.e. e 57 , σ = G. By Theorem 2, it is enough to show that e 57 and σ generate c 0 , as then and Theorem 2 shows that G is generated by {c 0 , f 001,011 , σ}.
Python code for checking the above identity is included, see Appendix C.
We have e 99 = Re 57 R, so e 99 is also universal since R σ R = σ and RGR = G).
Translating the proof to concrete expressions for the standard gates leads to rather long compositions of shifts of e 57 . A straight-line (context-free) grammar for generating such expression is given in Appendix A, and we provide the strings themselves in Appendix B.
Note that though one gate can be universal, one element of G cannot generate it, since G is not abelian, thus not cyclic.
The minimal number 3 of shift-conjugates that needed to be considered was checked by GAP, and the expression itself was found by a naive Python search, by computing the ball of radius 25 and finding g, h such that gh is the flip (according to my program, 49 generators do not suffice).
Corollary 1. For all n ≥ 4, G n = e 57 n , σ n = e 99 n , σ n . Proof. This is known for ring sizes up to 8 [9] (and checked up to 10 in [13]). Theorem 1 (more precisely its proof) kicks in at ring size 5.
As stated, the concrete implementations we give in the appendix work starting only from n = 8 -but actually the formulas happen to work already for n = 4.

Questions and future work
We do not know what the general conditions are under which a single gate, together with the shift, is universal, but this is semidecidable by Lemma 9 and Theorem 3. More generally, the set of finite sets of gates which are universal for G is a Σ 0 1 set. We do not know whether non-universality is semidecidable, and do not know whether the problem is Σ 0 1 -complete. Given a finite set of gates F , it is not clear whether it is semidecidable in either direction whether F n together with the shift σ n generates G n for all large enough n. Without some additional argument, universal gate sets only form a Σ 0 2 set in this context. Note also that e 57 is the composition of a word swap and the flip. We do not have a characterization of word swaps whose composition with the flip is a singleton universal gate set. A related question is whether a random inert gate in Sym({0, 1} n ), together with the shift, generates G with high probability (as n → ∞).
We asked a related question also in [10], namely whether such a gate is even (almost always) universal as a gate on [0, n − 1], when we are not allowed to apply it over the borders. We do not know any gates that are universal in this stronger sense; that gate e 57 is not universal in this sense.
We do not know whether G is finitely presented. A presentation for the groupoid of reversible gates is also not known [12].
In [1] the analog of Post's lattice for all reversible bit operations is fully described. Since they allow ancilla bits (bits containing some prescribed value, and which need not return to their initial value in the end), it is not immediately clear that this classification implies something in our framework. A full description of the lattice of subgroups of G containing the shift and the swap would amount to classifying the lattice of reversible transformations implementable using borrowed bits, in the terminology of [15]; we do not know if there is a known classification. We have not checked whether the variated Toffoli gate of [15] is a universal singleton gate set in our sense.
We note that, unlike the lattice of [1] and Post's lattice, the lattice of subgroups of G containing the shift (but not necessarily the swap) is uncountable -it is easy to embed, for example, the infinite direct sum n∈N Z 2 , which has uncountably many subgroups.
There are obvious generalizations of G which seem interesting. It is a standard direction of generalization in the theory of reversible gates to change the binary alphabet to a higher-arity one, and sometimes the qualitative properties change, e.g. the parity of the finitely-generated part of the group of reversible gates depends on the parity of the alphabet [3,12,4]. Here, the fact we have a geometry for the arrangement of the wires allows us to do much more: we can change the geometry to an arbitrary group, and instead of just increasing the size of the alphabet, we can replace the set of legal configurations by a subshift.
Finite generating sets for the analog of G on any full shift follow from results about reversible gates (see [4] for the general case) as in Lemma 9. We leave open whether a universal gate exists on every alphabet, and more generally whether one exists on every mixing SFT [8], when using the obvious generalizations.
If Z is replaced by a group G, then the corresponding G = G G is a (locally finite)-by-G group, and thus inherits many properties of G. It is finitely generated if and only if G is, essentially by Lemma 9. If G = Z d , then since Z d is an abelian epimorphic image of rank d of G Z d , at least d generators are needed. Is G Z d generated by d elements, or at least d + 1 elements, for d > 1? Is there always a universal inert gate? Again, one can also ask such questions for larger alphabets and other subshifts.

A Straight-line grammar for the standard generators
We give a context-free grammar, obtained directly from the proof, that describes the standard generators for the swap s, the flip c 0 , the CNOTs c 1 , Rc 1 R, and the Toffoli gate c 2 , more precisely the grammar generates a single string over the alphabet {1, 2, ..., 6} whose letters indicate the cell of [0, n] (n ≥ 7) where the e 57 gate should be applied. The grammar generates the standard gates in cell 4 ∈ [0, n] cell when the start symbol is varied. In the grammar we use an extension of the NCT naming scheme: N i applies and R contains the following rewrite rules: