Rational sets in virtually abelian groups: languages and growth

In this paper we generalise and unify the results and methods used by Benson, Liardet, Evetts, and Evetts&Levine, to show that rational sets in a virtually abelian group G have rational (relative) growth series with respect to any generating set for G. We prove equivalences between the structures used in the literature, and establish the rationality of important classes of sets in G: definable sets, algebraic sets, conjugacy representatives and coset representatives (of any fixed subgroup), among others. Furthermore, we show that any rational set, when written as words over the generating set of G, has several EDT0L representations.


Introduction
For a group G with finite symmetric generating set S, a subset R ⊆ G is called rational if R is the natural image in G of some regular language L over S, where by 'regular language' we mean a set of words defined by some finite state automaton. Rational sets have played an important role in group theory since the 1990s (see [1]), especially in free and hyperbolic groups. The notions of 'regular' and 'rational' coincide in free (semi)groups, but are different for other groups: rational sets consist of group elements, while regular sets consist of words in the free monoid S * , and moreover, rational sets do not always have a regular language representation when writing the elements using a natural normal form. Nevertheless, being able to produce a set in a group via a finite state automaton is useful for the design of algorithms ( [12]), can help compute the growth (series) of the set, or establish the series' rationality. Here we focus on virtually abelian groups, and show that a multitude of sets in these groups turn out to be rational; as a result, these sets have a nice characterisation as formal languages in terms of both natural normal forms and geodesic representatives, and have rational growth series with respect to any generating set.
It is well known that the growth series of a regular language is a rational function. However, the rational sets studied in this paper are not expressible as regular languages when writing the elements in standard geodesic normal forms (see Section 6). Thus different approaches to growth are needed for virtually abelian groups; these go all the way to Benson ([2]), and the unpublished thesis of Liardet ([14]), where polyhedral and semilinear sets, respectively, are used to establish rationality. While Benson and Liardet's proofs have a common thread, the structures they rely on appear to be different. We show here that the types of sets used in [2] and [14] are in fact identical, and coincide with the coset-wise polyhedral sets in the work of the second author and Levine on algebraic sets in virtually abelian groups. Besides unifying the approaches of Benson [2], Liardet [14], Evetts [9], and Evetts & Levine [10] for studying the growth of sets in virtually abelian groups, we add to the list of rational sets further important classes: definable (by first-order theory) sets, algebraic sets (that is, solution sets to system of equations), conjugacy representatives, and coset representatives. The fact that definable sets are rational follows from the fact that they are Boolean combinations of cosets of definable subgroups of virtually abelian groups [13,Theorems 4.1 and 3.2]. Conjugacy and coset representatives were studied extensively in [9], where an approach to choosing one shortest element and an appropriate geodesic representative per conjugacy class or coset is given. Based on that work we are able to show here that a set of conjugacy representatives can be chosen to form a rational set, and similarly for a set of coset representatives for any fixed subgroup.
We summarise these results in Theorems 1.1 and 1.2.
(1) A rational set in a virtually abelian group G has rational (relative) growth series with respect to any set of generators of G. (2) The following types of sets are rational, and therefore have rational growth series with respect to any set of generators of G: (a) elements of any fixed subgroup, (b) coset representatives of a fixed subgroup, (c) algebraic sets, (d) definable sets, (e) conjugacy representatives (as in Theorem 6.12).
Theorem 1.1 follows largely from Theorem 1.2, which explains the connections between the types of sets studied in the literature in order to establish rationality (see Section 3 for the definitions of 'polyhedral', 'coset-wise polyhedra" and 'semilinear'). (1) The following implications hold for sets in Z n , n ≥ 1: polyhedral Proposition 3.11 ⇐= ======= =⇒ semilinear .
(2) The following implications hold for sets in virtually abelian groups: (i) coset-wise polyhedral Proposition 3.20 ⇐= ======= =⇒ rational [14,Thm. 4.1.5] ⇐========⇒ Z k -semilinear, The rationality of the growth series in Theorem 1.1 is remarkable because it holds for all generating sets, which is a rare behaviour for groups in general. The proofs showing rationality rely on the existence of geodesic representatives (with respect to any generating set) with rational growth series, which we establish in Section 6. Moreover, these representatives have a nice structure from a language theoretic point of view, as in Theorem 1.3. Here n-regular languages (Definition 2.1) are a 'higher-dimensional' version of standard regular languages; they exhibit a lot of the properties of standard regular languages, but not all (see Remark 2.3(2)). Most importantly for this paper, they can be easily viewed as EDT0L languages by converting tuples of words into words (as in Proposition 2.8). EDT0L languages (see Section 2.2.2) have proved to be a natural class of languages to represent, as words, important classes of sets in groups ( [4,5,7]), and we recommend [6] for background and motivation on these languages and their applications to group theory. Theorem 1.3 (Theorem 6.14). In any virtually abelian group G with respect to any set of generators X of G, each of the following can be described by a set of geodesic representatives that form an n-regular, and therefore EDT0L language: (1) rational sets, (2) subgroups, (3) coset representatives of a fixed subgroup, (4) algebraic sets, (5) definable sets, (6) conjugacy representatives.
However, the geodesic representatives above are complicated to describe and impractical, so the second theme of the paper is to consider the natural normal forms over standard generating sets: words of the form wt, where w represents an element in the finite index abelian subgroup, and t is one of finitely many coset representatives. We show that if we choose to work with the natural normal form (which might not be geodesic) of a virtually abelian group, then any set in Theorem 1.1 will have an EDT0L representation as words over the generating set. Theorem 1.4 (Theorem 5.2, Corollary 6.18). Let G be a virtually abelian group with set of generators X = Σ ∪ T , where Σ is a symmetric set of generators for a finite index free abelian subgroup of G, and T is a finite transversal set for this subgroup.
We note that Bishop ([3]) has investigated both the formal language properties and the growth series of the set of all geodesic words in a virtually abelian group, showing amongst other results that this set forms a blind multicounter language. Although it seems unlikely that the language is also EDT0L, it is not impossible, and we do not have enough evidence to put forward a conjecture in either direction.

Preliminaries
2.1. Growth of sets and groups. We will work with the basis {e 1 , . . . , e r } of Z r , where e i denotes the standard basis vector with 1 in the ith entry and zeroes elsewhere.
Let U ⊆ Z r be a set. Given some choice of weight function e i ∈ Z >0 (typically e i = 1 for all i) for the basis vectors {e i } r i=1 , we assign the ℓ 1 norm p = r i=1 a i e i to the element p = (a 1 , . . . , a r ) ∈ U . Define the spherical growth function counting elements of specified lengths as σ U (n) = #{p ∈ U | p = n}, and the resulting weighted growth series as More generally, suppose G is a group generated by a finite set X. If w ∈ X * is a word in the generators, we write w ∈ G for the group element that the word w represents, and let g X = min {|w| | w ∈ X * , w = g} be the word length of g with respect to X, where |w| is the length of w as a word over X. The growth function of any set U ⊆ G is σ U,X (n) = #{g ∈ U | ||g|| X = n}, and the (relative) growth series is given by We will frequently be interested in proving that the various growth series are rational. That is, there exist polynomials p, q ∈ Z[z] such that S(z) = p(z) q(z) .

2.2.
Preliminaries on formal languages. We start by introducing n-regular languages, n ≥ 1, which are a generalisation of standard regular languages; that is, for n = 1 we get exactly the regular languages defined by finite state automata (fsa).

n-regular languages.
Here we take the approach and terminology from [12, Section 2.10]. Let A be a set. We write A n for the cartesian product A × · · · × A of n copies of A, and write ε for the empty word. (1) Σ is a finite alphabet, (2) Γ is a finite directed graph with edges labelled by elements of (Σ ∪ ε) n which have at most one non-ε entry, (3) s 0 ∈ V (Γ) is a chosen start vertex/state, (4) F ⊆ V (Γ) is a set of accept or final vertices/states. An n-tuple w ∈ (Σ * ) n is accepted by A if there is a directed path in Γ from s 0 to s ∈ F such that w is obtained by reading the labels on the path, and deleting all occurrences of ε in each coordinate. A language accepted by an n-fsa will be called n-regular for short.  (1) Note that Definition 2.1 gives a non-deterministic fsa, in that (i) edges labelled by tuples consisting entirely of ǫ-coordinates are allowed, as are (ii) two edges with the same label starting at a single vertex. If we do not allow (i) and (ii) we have a deterministic n-fsa.  Since n-fsa are not as common as 1-fsa, we state and prove the following basic lemmas.
Lemma 2.4. The class of n-regular languages is closed under substitution and concatenation.
Proof. Suppose f : Σ → Σ * is a substitution and L is an n-regular language on alphabet Σ recognised by n-fsa A. To obtain an n-fsa for f (L) we replace each edge e (ε,...,x,...,ε) , where x ∈ Σ, by |f (x)| edges, each labelled with the appropriate letter from f (x) in the same coordinate as x in e (ε,...,x,...,ε) , while also inserting |f (x)| − 1 vertices/states connecting the new edges. It is immediate to see that this new fsa accepts f (L).
To obtain an fsa for the concatenation of two n-regular languages L 1 and L 2 recognised by A 1 and A 2 , respectively, we simply connect each accepting state in A 1 to the start state of A 2 by an edge with ε-coordinates only.
Proof. Suppose L 1 and L 2 are recognised by A 1 and A 2 , respectively, and n = n 1 > n 2 . Then we pad all edges in A 2 with ε to have n coordinates in both automata. We then add a new start state s n that connects to the start states of A 1 and A 2 via fully ε-edges with n coordinates, while also adding a new final state s f , to which all final states in A 1 and A 2 connect via fully ε-edges with n coordinates. This new automaton, with single start state s n and single final state s f , will accept L 1 ∪ L 2 ⊂ ((Σ 1 ∪ Σ 2 ) * ) n .

EDT0L languages.
We now introduce a class of languages that contains all the regular ones, is incomparable to the class of context-free languages, and contained in the class of indexed languages (see [6] for details).
(1) Σ is a finite alphabet, called the (terminal) alphabet; (2) C is a finite set containing Σ, called the extended alphabet of H; (3) w ∈ C * is called the start word; (4) R ⊂ End(C * ) is a regular language of endomorphisms of C * , called the rational control.
The language accepted by H is A language accepted by an EDT0L system is called an EDT0L language.
To prove (i) we construct an EDT0L system H that accepts θ(L) with terminal alphabet Σ, extended alphabet C = Σ ∪ {⊥ 1 , ⊥ 2 , . . . , ⊥ n }, and start word ⊥ 1 ⊥ 2 · · · ⊥ n . For each w = (w 1 , . . . , w n ) ∈ (Σ ∪ ε) n which is a label of an edge in Γ, define φ w ∈ End(C * ) by ⊥ i → w i ⊥ i for each i (and fixing all elements of Σ). Furthermore, define ϕ ∈ End(C * ) to be the map that sends each ⊥ i to the empty word and fixes each element of Σ.
Construct the rational control R of H from Γ as follows. Replace each edge label w with the endomorphism φ w . Add additional edges from F to a new vertex, each labelled by ϕ. This new vertex will be the unique accept state, and s 0 remains the start state. The language accepted by this new (1-variable) fsa is a regular language R ⊂ End(C * ).
For any element u ∈ L, the corresponding path in Γ is simulated in R by a sequence of φ w s which produce the components of the tuple u, followed by ϕ which removes the ⊥ i s, resulting in the element θ(u). Conversely, each element h of the language of H arises from θ −1 (h) in L. So θ(L) is the language of the EDT0L system H.
For (ii), to obtain θ # (L) instead of θ(L) we proceed as above, but apply the map ⊥ i → # for each i ∈ {1, . . . n − 1} in place of ϕ. Remark 2.9. By considering the case n = 1, it is clear that the converse of Proposition 2.8 does not hold (since there are EDT0L languages which are not regular), and so being n-regular is a strictly stronger property than being EDT0L.

Equivalences between types of sets in virtually abelian groups
In this section we recall several important types of sets in (virtually) abelian groups: polyhedral, coset-wise polyhedral, rational, and semilinear, and establish equivalences between them. In Proposition 3.14 we also prove the rationality of their growth series with respect to the natural basis (and ℓ 1 norm) of the ambient free abelian group.
It is a standard fact that we may assume that any finitely generated virtually abelian group is a finite extension of a finitely generated free abelian group. Throughout the section we let G be a finitely generated virtually abelian group with free abelian normal subgroup Z k of finite index, and use the short exact sequence for some finite group ∆.
3.1. Polyhedral sets. Polyhedral sets are subsets of free abelian groups of finite rank, and play an important role in virtually abelian groups.
Definition 3.1 (Polyhedral sets). Let r ∈ N, and let · denote the Euclidean scalar product.
(i) Any subset of Z r of the form (1), (2), and (3) respectively; (ii) any finite intersection of elementary sets will be called a basic polyhedral set; (iii) any finite union of basic polyhedral sets will be called a polyhedral set.
Proposition 3.2. [2, Proposition 13.1 and Remark 13.2] Let P, Q ⊆ Z r and R ⊆ Z s be polyhedral sets for some positive integers r and s. Then the following are also polyhedral:     (1) and (2) are cosets of the subgroups {z ∈ Z r | u · z = 0} and {z ∈ Z r | u · z ≡ 0 mod b} of Z r , respectively.
Definition 3.6. Let G be a finitely generated monoid or group, with finite generating set S. A subset R ⊂ G is called rational if there exists a regular language L ⊂ S * whose image in G is the set R.
The following theorem collects key results about semilinear subsets of commutative monoids. ( We will consider the commutative monoid Z k generated by {±e 1 , . . . , ±e k } where e i denotes the standard basis vector, and establish properties of semilinear sets in Z k . Lemma 3.9. The image of any semilinear set under an integer affine map Z k → Z k is semilinear.
Proof. It is enough to prove this for an arbitrary linear set L = a + {b 1 , b 2 , . . . , b r } * = a + Nb 1 + · · · + Nb r . Consider the integer affine map z → Cz + d where C is an integer-valued k × k matrix and d ∈ Z k . We have which is a linear set. Since a finite union of linear sets is sent by C to a finite union of images of those linear sets under C, we get that integer affine maps preserve semilinear sets.
We will need the following lemma. We can now show that semilinear sets are precisely the polyhedral sets of Definition 3.1. Proof. First, we show that every elementary region is semilinear. Since finite unions (by definition) and finite intersections (from Theorem 3.8 (2)) of semilinear sets are semilinear, it follows that polyhedral sets are semilinear.
Elementary regions of types (1) and (2) are cosets of subgroups of Z k (see Remark 3.5 (iii)). Therefore for any such elementary region E, there exists a constant c ∈ Z k and a finite set of (monoid) generators {b 1 , . . . , b s } ⊂ Z k (with s ≤ 2k) such that E = c + {b 1 , . . . , b s } * . Now suppose that E is an elementary region of type (3), that is, E = {z ∈ Z k | za ⊺ ≥ m} for some a ∈ Z k and m ∈ Z. Since translations of semilinear sets are semilinear, we assume without loss of generality that m = 0. It is standard linear algebra to find an injective linear map A : Q k → Q k such that A : a ⊺ → e ⊺ 1 . Let M ′ ∈ GL k (Q) be a matrix representation of A so that we have M ′ a ⊺ = e ⊺ 1 . If M ′ contains non-integer entries, choose a positive integer λ so that M := λM ′ has integer entries, and therefore defines an integer affine map from Z k to itself (where M acts on the left). Now we have M a ⊺ = λe ⊺ 1 (and det M = 0). Consider the half-space (NB: we are using M to define two different integer affine maps, via left action on column vectors, and right action on row vectors).
where P M is the preimage under M of the elements of the fundamental parallelepiped of the lattice defined by M . Since E 0 is semilinear, and P M is finite (because M is injective), Lemma 3.9 implies that E is also semilinear.
To show the converse, it is enough to prove that any linear set is polyhedral (since the class of polyhedral sets is closed under translation and finite union). By Lemma 3.10, and the same closure properties of polyhedral sets again, it is then enough to prove that D * is polyhedral, whenever the elements of D are linearly independent.
Linear independence implies that |D| ≤ 2k, and therefore we can find an integral affine map Z k → Z k which takes each of |D| standard basis vectors to a unique element of D. The preimage of D * under this affine map will be a union of orthants, which is clearly polyhedral, and since the image of a polyhedral set is polyhedral, so is D * .
i.e. the orthant including the positive e i axis for each i ∈ I. A subset of Z k is said to be monotone if it is contained entirely in a single orthant Q I .
Lemma 3.13. Each set P ⊆ Z k can be written as the disjoint union P = 2 k j=1 P j of monotone subsets P j . Moreover, if P is polyhedral then each P j is polyhedral. Equivalently, if P is semilinear then each P j is semilinear, and if P is rational then so is every P j .
Proof. We can decompose P as a disjoint union of 2 k monotone sets as follows. Let denote the non-negative orthant of Z k . Let Q 2 , . . . , Q 2 k denote the remaining orthants (in any order) obtained from Q 1 by (compositions of) reflections along hyperplanes perpendicular to the axes and passing through the origin. Let P 1 = P ∩ Q 1 and for each 2 ≤ j ≤ 2 k , inductively define Each P j is clearly monotone, and we have a disjoint union P = 2 k j=1 P j . By construction, each orthant Q j is polyhedral and therefore if P is polyhedral then every P j is also polyhedral by Proposition 3.2.
The statement about semilinearity follows from Proposition 3.11, and the statement about rationality from Theorem 3.8(1).
The following result is well known for polyhedral sets, but we provide here a much simpler proof than that of [2]. Our proof relies entirely on the basic structure of semilinear sets.

8])
A semilinear subset of Z k has rational growth series with respect to the ℓ 1 norm. Thus any polyhedral subset of Z k has rational growth series with respect to the ℓ 1 norm.
Proof. The strategy of the proof is to split our semilinear set into a disjoint union of monotone subsets of Z k (see Definition 3.12); these subsets will be regular languages over an alphabet consisting of (unit) basis vectors of Z k , and will therefore have rational growth.
Let P ⊆ Z k be semilinear. Write P as a disjoint union of monotone semilinear sets P i as in Lemma 3.13. Each monotone P i is in length-preserving bijection with a semilinear set X + i ⊂ N k . Now, any semilinear subset of N k = {e 1 , e 2 , . . . , e k } * is a regular language (of the form ab * 1 b * 2 · · · b * l where a, b 1 , . . . , b l are words in {e 1 , e 2 , . . . , e k } * ), and therefore has rational growth series (with respect to the alphabet {e 1 , e 2 , . . . , e k }) by a standard result. So the growth series of P is the sum of 2 k rational series, and is therefore itself rational.
By Proposition 3.11 the polyhedral and semilinear sets in Z k coincide, so polyhedral subsets of Z k have rational growth series.
In his thesis, Liardet defined semilinear sets within non-commutative monoids, provided these contain some abelian submonoid, as follows.

3.3.
Coset-wise polyhedral sets. The notion of a coset-wise polyhedral (CWP) set was introduced by the second author and Levine in [10] as the natural set up for understanding solutions sets of equations in virtually abelian groups. Let G be a finitely generated virtually abelian group with free abelian normal subgroup Z k of finite index, as in (1). Definition 3.17. Let T be a choice of transversal for the finite index normal subgroup Z k . A subset V ⊆ G will be called coset-wise polyhedral (CWP) if, for each t ∈ T , the set Remark 3.18. Note that being coset-polyhedral is independent of the choice of T . Indeed, suppose that we chose a different transversal T ′ so that for each t j ∈ T we have t ′ j ∈ T ′ with Z k t j = Z k t ′ j . Then there exists y j ∈ Z k with t j = y j t ′ j for each j, and so gt ′ j −1 = g j t −1 j y i for any g ∈ Z k t j = Z k t ′ j . So changing the transversal changes the set V t by adding a constant element y j , and so it remains polyhedral by Proposition 3.4.
It turns out that coset-wise polyhedral and rational sets coincide in virtually abelian groups, as Proposition 3.20 shows; this relies on the following result of Grunschlag, which relates the rational subsets of a finite index subgroup of a group G, to the rational subsets of G itself.

Lemma 3.19 ([11], Corollary 2.3.8).
Let G be a group with finite generating set S, and H be a finite index subgroup of G. Let Σ be a finite generating set for H, and T be a right transversal for H in G. For each rational subset U ⊆ G, such that U ⊆ Ht for some t ∈ T , there exists a (computable) rational subset V ⊆ H (with respect to Σ), such that U = V t. Proposition 3.20. Let U be a subset of a virtually abelian group G. Then U is a rational set if and only if it is coset-wise polyhedral.
Proof. As above, we work with the generating set {±e 1 , . . . , ±e k } ∪ T for G, where {±e 1 , . . . , ±e k } generates Z k . Firstly, suppose U is rational. Then Lemma 3.19 gives a finite set of rational subsets of Z k , say V 1 , . . . , V d , such that U = i V i t i . Since rational subsets of Z k are polyhedral, U is coset-wise polyhedral.
Conversely, suppose that U ⊂ G is coset-wise polyhedral. So for each t i ∈ T the set is polyhedral, and hence rational. So there exists a regular language L i ⊂ {±e 1 , . . . , ±e k } * which surjects to U i . Now the regular language L i t i ⊂ ({±e 1 , . . . , ±e k } ∪ T ) * surjects to U , which is therefore rational.
When dealing with sets of tuples of elements of a virtually abelian group G, we can think of them as subsets of the direct product of finitely many copies of G. The following Lemma shows that any results about subsets of G will also hold for sets of tuples.
Lemma 3.21. If G is virtually abelian, with index-d normal subgroup Z k and transversal T as usual, then the direct product G n is virtually Z kn , with transversal given by the set of products Proof. Any element of G n can be put into the following form: Since T n has at most dn elements (fewer if some pairs commute), we have [G n : Z kn ] ≤ dn.

Definable sets in virtually abelian groups
We give here an overview of definable sets in virtually abelian groups, and refer the reader to the books [17] and [19] for an in-depth account.
Let n be an integer with n ≥ 1 and let 1 ≤ i ≤ n. A subset S of a group G is ndefinable over G if there is a first-order formula Φ(x, y 1 , . . . , y n ) and an n-tuple of parameters m = (m 1 , . . . , m n ), m i ∈ G, such that where S |= Φ(g, m) expresses, as is standard, that S satisfies Φ(x, m), or equivalently, that Φ(g, m) is true for g ∈ S. We say that a set is 0-definable if there are no parameters m in the formula Φ, and say that it is definable if it is n-definable for some n ≥ 1 as above.
More generally, if the formula Φ is over a tuple x = (x 1 , . . . , x r ) of r variables (instead of a single one), that is, it has the form Φ(x, y 1 , . . . , y n ), then we consider definable sets S ⊆ G n consisting of tuples of elements in G.
Virtually abelian groups have been studied in model theory primarily in a module setup. Let G be a finitely generated virtually abelian group with free abelian normal subgroup A = Z k of finite index, as in (1), and finite quotient ∆ = G/A. Then from the sequence we can view A as a right Z[∆]-module, where the action of the group algebra Z[∆] on A extends the conjugation action of ∆ on A. That is, if a ∈ A and g ∈ G withḡ = gA ∈ ∆ representing the g-coset of A in ∆, thenḡ • a = g −1 ag. Then for a module, such as A, over a ring R (such as Z[∆]), every formula Φ(x, y 1 , . . . , y n ) is equivalent to a Boolean combination of positive primitive formulas (see [19,Theorem 3.3.5]), defined as follows. (1) An equation over z = (z 1 , . . . , z n ) in an R-module A is a formula Ψ(z) of the form (2) A positive primitive (pp) formula is of the form where all Ψ j (z) are equations over z = (x, y) (and so Ψ 1 (x, y) ∧ · · · ∧ Ψ k (x, y) is a system of equations).
That is, definable sets in (virtually) abelian groups are obtained from projecting solution sets of systems of equations onto their first coordinates (|x| -many coordinates according to our definition). It is easy to see that pp formulae define subgroups and cosets of subgroups of G n (see [19,Lemma 3.3.7]). In fact, all definable sets in virtually abelian groups have such a characterisation, by the work of Hrushovski and Pillay:  Given a virtually abelian group G, every definable set X ⊆ G n is a rational subset of G n , for any n ≥ 1.
Proof. We work within the direct product G n , which by Lemma 3.21 is also virtually abelian. Subgroups of finitely generated virtually abelian groups are finitely generated, and are therefore rational subsets. Furthermore, any coset of a finitely generated subgroup is rational since it is just a translation of a rational set. The result follows from Theorem 4.2 since rational sets are closed under Boolean combinations.

Natural normal forms
Write Σ = {a 1 , A 1 , . . . , a k , A k } for the set of positive and negative standard generators of Z k . For g ∈ Z k , set NF(g) to be the shortlex representative of g with respect to Σ with the order given above. The set of all such representatives is a regular language, denoted as follows: For a finitely generated virtually abelian group G, with finite index normal subgroup Z k , we use NF(Z k ), together with some choice of transversal T = {t 1 , . . . , t d } for the cosets of Z k : This will not be geodesic, in general.
Note that we can also see NF(Z k ) as a k-regular language by separating the powers of pairs (a i , A i ): We then have θ(NF k (Z k )) = NF(Z k ) where θ is the 'forgetful' morphism of Proposition 2.8. In this section we will study the formal language properties of NF(U ) = {w ∈ NF(G) | w ∈ U } when U is a rational subset of a virtually abelian group G. Firstly, we show that semilinear sets which are monotone (see Definition 3.12) have k-regular normal forms.
Proposition 5.1. If X ⊂ Z k is monotone and semilinear, then NF k (X) is k-regular.
Proof. By Lemma 2.5, we may assume without loss of generality that X is linear, say of the form c+{d 1 , d 2 , . . . , d r } * . So each element of X has the form cd m 1 1 d m 2 2 · · · d mr r for some m j ∈ N. For any b ∈ Z k , let b d denote a path of |b| ℓ 1 consecutive edges (with |b| ℓ 1 − 1 states), with each edge labelled by a k-tuple in ((a 1 | A 1 | ε), (a 2 | A 2 | ε), . . . , (a k | A k | ε)) with exactly one nonepsilon entry, so that the k-tuple obtained by reading along the path and deleting εs is equal to b.
By monotonicity, each d j lies in the same orthant, and therefore a concatenation of paths p d j p d i+j can never result in a subword a i A i or A i a i , and therefore produces an element of NF(G). The automaton given in Figure 2 then clearly produces the language NF k (X).
Theorem 5.2. Let U be a rational subset of a virtually abelian group. Then NF(U ) is an EDT0L language.
Proof. By Proposition 3.20, we have a disjoint union is a polyhedral subset. We now claim that polyhedral sets have k-regular normal forms. More precisely, NF k (P ) is k-regular whenever P ⊂ Z k is a polyhedral set. The result then follows from the fact that k-regular languages are EDT0L (Proposition 2.8), and that the class of EDT0L languages is closed under concatenation with a single letter t i , and under finite unions (Lemma 2.7).
To prove the claim, consider a polyhedral set P ⊂ Z k . We can decompose P as a disjoint union of 2 k monotone polyhedral sets as in Lemma 3.13. Then by Proposition 5.1, NF k (P ) is a finite union of k-regular languages, and is therefore itself k-regular. Corollary 5.3. Let G be a finitely generated virtually abelian group, and U ⊂ G n a definable set. Then NF(U ) ⊂ NF(G n ) is EDT0L.
Since NF(G) is not a geodesic normal form, it cannot be used to compute the growth series of U with respect to the word metric on the group. For that we will need a different normal form, which we study in the next section.

Geodesic normal forms
In [16], Neumann and Shapiro show that there is a virtually abelian group G with fixed generating set X such that no regular (i.e. 1-regular) language of geodesics can surject to the elements of G. So in particular, there are virtually abelian groups with generating sets for which no geodesic normal form is regular. This does not imply that there is a virtually abelian group G for which one cannot obtain regular geodesic normal forms irrespective of generating set: one can always get such a normal form after possibly enlarging the generating set that was given, as shown in a different paper by Neumann and Shapiro, ( [15]).
Here we complete the picture to show that for any generating set Σ of a virtually abelian group G there always exists some n-regular, geodesic normal form GF(G, Σ), for an appropriate value of n; we will use GF(G) instead of GF(G, Σ) in most cases since Σ should be clear from the context (see Notation 6.11).
Furthermore, we show that there is a subset of GF(G) consisting of geodesic representatives for the conjugacy classes of the group; moreover, for any subgroup, there is a subset of GF(G) consisting of geodesic representatives for the cosets. For any rational subset of the group, the normal form representatives (contained in GF(G)) also form an n-regular language. In particular, the GF(G)-representatives of definable sets form EDT0L languages; that is, the same result as for the normal form NF(G) in the previous section holds for GF(G).
Benson introduced a normal form for elements of virtually abelian groups in 1983 [2]. Unlike NF(G), it consists of geodesic representatives. However, the construction is much more involved. We give a brief overview below.
Let G be virtually abelian with index-d subgroup Z k , and choose a finite monoid generating set Σ. As in Section 2, for a word w ∈ Σ * , we will write w for the element it represents in G. Similarly, the image of a subset W ⊂ Σ * in G will be denoted W . A function · : Σ → N + will be called a weight function. We extend this to · : Σ * → N + , so that s 1 s 2 · · · s l = s 1 + s 2 + · · · + s l for any word s 1 s 2 · · · s l . Define the weight of a group element as If s = 1 for all s ∈ Σ, this gives the usual notion of word length.
Definition 6.1. With Σ and d as above, define an extended generating set The weight of a generator s 1 s 2 · · · s k ∈ S is defined with respect to our original weight function: Remark 6.2. The weight of an element with respect to the new weighted generating set S is equal to its weight with respect to Σ, and so the respective weighted growth series are equal. Moreover, any geodesic word (with respect to the standard word length) over S = S Σ is geodesic over the initial generating set Σ. The following result provides a set of geodesic representatives for the cosets of a fixed subgroup H by picking out the coset representatives belonging to each W π , when π is one of the finitely many patterns in P . Theorem 6.10 ([2], [9]). Let G be a virtually abelian group with generating set Σ and extended generating set S = S Σ . Let H be any subgroup of G. For each π ∈ P , there exists a set of words U π H ⊂ W π ⊂ S * , such that (1) the disjoint union π∈P U π H consists of exactly one geodesic representative for every coset in G/H, and (2) for each π, φ π (U π H ) ⊂ Z mπ is a polyhedral set. Notation 6.11.
(1) For the set of H-coset representatives in Theorem 6.10(1) we use the notation to capture the set of geodesic representatives for the cosets of H in G. When H = {1}, Theorem 6.10 gives a geodesic normal form for the elements of G with respect to the extended generating set S Σ (and therefore with respect to Σ, see Remark 6.2), so is the geodesic normal form mentioned at the beginning of the section, to be distinguished from the natural normal form NF(G) of the previous section.
(2) In general, if V ⊆ G is a subset of G or if V is a set of objects with representatives in G (such as cosets, or conjugacy classes), we denote by GF(V ) ⊆ GF(G) the set of geodesic representatives for elements in V , with one representative per element.
The following theorem about conjugacy representatives follows from [9] but isn't explicitly stated there. Note that in that paper, the sets U π c are called L π . Theorem 6.12 ([9]). Let C = C(G) be the set of conjugacy classes of G.
For each π ∈ P there exists a set of words U π c ⊂ W π such that (1) The disjoint union π∈P U π c consists of exactly one geodesic representative for every conjugacy class of G, that is, and for each π, φ π (U π c ) ⊂ Z mπ is a polyhedral set.
Lemma 6.13 translates (patterned) words over the extended generating set S of G into the corresponding tuples, and thus connects semilinear sets and n-regular sets. Lemma 6.13. If V ⊂ W π ⊂ S * is a set of π-patterned words, and φ π (V ) ⊂ N mπ is semilinear, then the set of tuples ψ π (V ) ⊂ (S * ) mπ +|π| corresponding to V is (m π + |π|)-regular. Proof. By hypothesis, φ π (V ) ⊂ N mπ is a union of linear subsets of N mπ . Since a union of nregular languages is n-regular (Lemma 2.5), it suffices to prove the Lemma for the case where φ π (V ) is linear, say of the form a + {b 1 , . . . , b k } * for a, b 1 , . . . , b k ∈ N mπ . We construct an (m π + |π|)-variable finite state automaton that accepts ψ π (V ).
Given a vector i = (i 1 , i 2 , . . . , i mπ ) ∈ N mπ , denote by p i a path of |i| ℓ 1 consecutive edges, each labelled by an (m π + |π|)-tuple with an element of S in one component and ε's elsewhere, such that the tuple obtained by reading along the path and then deleting ε's is equal to ( , . . . , x i kr+r r ), i.e. the tuple ψ π • φ −1 π (i) with the y i s removed. Our automaton has a single start state s i , a single accept state s a , and k marked states, labelled s 1 , . . . , s k . Between s i and s 1 , there is a path p(a) (with extra states added as necessary). For each i ∈ {1, . . . , k}, there is a path p(b i ) that starts and ends at state s k (with extra states added as necessary). Between s i and s i+1 (for each i ∈ {1, . . . , k − 1}), there is a single edge labelled with a vector of epsilons. Finally, from s k to s a there is a path p(π). See figure  3 for a schematic diagram. Now we can prove the existence of a geodesic normal form that is m-regular.
Theorem 6.14. The geodesic normal form GF(G) viewed as tuples, that is, the union of ψ π (GF(G)) over the finitely many patterns π, is an m-regular language (for some m depending on the generating set).
Furthermore, the geodesic normal form representatives for cosets of any subgroup, and for conjugacy classes, also form m-regular languages, when viewed as m-tuples.
Proof. From Theorem 6.10, the set GF(G) is a union of sets of the form U π , for some pattern π, each with the property that φ π (U π ) ⊂ Z mπ is polyhedral, and hence semilinear. Since each φ π (U π ) is contained in N mπ , Theorem 3.8 (3) implies that they are in fact semilinear subsets of N mπ . Lemmas 6.13 and 2.5 then finish the argument.
An analogous argument applies for the sets GF(G/H) and for GF(C), via Theorem 6.12.
It follows as a corollary of Theorems 6.10 and 6.12 that the standard, coset, and conjugacy growth series of G are rational functions. See [9] for full details. We now complete the picture by demonstrating that any rational subset of G also has rational growth series and is mregular. The following is a special case of Theorem 4.15 of [10]. We include the proof here for completeness. Theorem 6.15. If V ⊂ G is coset-wise polyhedral then it has rational (relative) growth series.
Proof. Fix a transversal T . For each t ∈ T , let P t ⊂ P denote the set of patterns π with π ∈ Z k t. The following subset of S * is a set of unique geodesics representatives for the elements of V .
Applying φ π to a component of this union yields a set φ π (U π ) ∩ A −1 π (V t ), which is polyhedral (since V t is polyhedral), and therefore has rational growth series. Since the bijection φ π is length-preserving (up to addition of a constant), each component of the union has rational growth series, and therefore so does V itself.
In light of Proposition 3.20, which establishes the equivalence of coset-wise polyhedral and rational sets, Theorem 6.15 gives the following. Corollary 6.16. Let G be a virtually abelian group. Rational subsets have rational (relative) growth series with respect to any generating set of G. The following types of sets are rational, and therefore have rational growth series with respect to any set of generators of G: (1) elements of any fixed subgroup, (2) coset representatives of a fixed subgroup, (3) algebraic sets, (4) definable sets, (5) conjugacy representatives.
We can easily generalise Theorem 6.14 and obtain geodesic normal form representatives for coset-wise polyhedral sets, and therefore rational sets in general.
Theorem 6.17. Let G be a virtually abelian group and V a coset-wise polyhedral subset of G. The geodesic normal form representatives given by GF(V ) form an m-regular language when viewed as tuples.
Proof. Let V be coset-wise polyhedral. As in the above proof, the Benson normal form (GF) representation of V is a finite union of sets of the form φ π (U π ) ∩ A −1 π (V t ), which are polyhedral and hence semilinear. The result then follows from Lemma 6.13 and Lemma 2.5.
Finally, Proposition 2.8 implies that any rational set has unique geodesic representatives that form an EDT0L language. Corollary 6.18. Let G be a virtually abelian group with generating set Σ, and let R ⊆ G a rational set. The geodesic normal form representatives GF(R) form an m-regular language as m-tuples, and hence an EDT0L language when viewed as a set of words over Σ.