On effective Birkhoff's ergodic theorem for computable actions of amenable groups

We introduce computable actions of computable groups and prove the following versions of effective Birkhoff's ergodic theorem. Let $\Gamma$ be a computable amenable group, then there always exists a canonically computable tempered two-sided F{\o}lner sequence $(F_n)_{n \geq 1}$ in $\Gamma$. For a computable, measure-preserving, ergodic action of $\Gamma$ on a Cantor space $\{0,1\}^{\mathbb N}$ endowed with a computable probability measure $\mu$, it is shown that for every bounded lower semicomputable function $f$ on $\{0,1\}^{\mathbb N}$ and for every Martin-L\"of random $\omega \in \{0,1\}^{\mathbb N}$ the equality \[ \lim\limits_{n \to \infty} \frac{1}{|F_n|} \sum\limits_{g \in F_n} f(g \cdot \omega) = \int\limits f d \mu \] holds, where the averages are taken with respect to a canonically computable tempered two-sided F{\o}lner sequence $(F_n)_{n \geq 1}$. We also prove the same identity for all lower semicomputable $f$'s in the special case when $\Gamma$ is a computable group of polynomial growth and $F_n:=\mathrm{B}(n)$ is the F{\o}lner sequence of balls around the neutral element of $\Gamma$.


Introduction
A classical ergodic theorem of Birkhoff asserts that, if ϕ : X → X is an ergodic measure-preserving transformation on a probability space (X, µ), then for every f ∈ L 1 (X) we have for µ-a.e. x ∈ X. We refer, e.g., to [EFHN15,Chapter 11] for the proof. A celebrated result of Lindenstrauss [Lin01] gives a generalization of Birkhoff's ergodic theorem for measure-preserving actions of amenable groups and ergodic averages, taken along tempered Følner sequences. One may also wonder if the averages in Equation (1.1) converge for every Martin-Löf random x and every computable f . An affirmative answer was given by V'yugin in [V'y97] for computable f 's. Later, it was proved in [BDHMS12] that the ergodic averages converge for all lower semi-computable f 's.
In so far, the effective ergodic theorems have only been proved for actions of Z, and it is a natural question if one can generalize effective Birkhoff's ergodic theorem for measure-preserving actions of more general groups (for instance, the groups Z d , groups of polynomial growth and so on). However, one must first define computable actions of groups appropriately. In this article we define computable actions of computable groups in a natural way in Section 2.5, which agrees with the 'classical' definition in the case of Z-actions, and obtain the following generalizations of the results from [BDHMS12]. First of all, we derive a generalization of Kučera's theorem in Section 3.1, which is the main technical tool of the article.  be the set of all points ω ∈ {0, 1} N whose orbit remains in U . Then U * is an effectively null set.
Using this generalization of Kučera's theorem and the results of Lindenstrauss, we derive the first main theorem in Section 3.2. To simplify the notation, we denote the averages by E g∈F := 1 |F | g∈F .
In a special case, when Γ is a computable group of polynomial growth, we are able to remove the boundedness assumption on f and prove the following version of effective Birkhoff's ergodic theorem.
Theorem. Let Γ be a computable group of polynomial growth with the Følner sequence of balls around e ∈ Γ given by F n := {g ∈ Γ : g ≤ n} for n ≥ 1.

Preliminaries
2.1. Computable Amenable Groups. In this section we will remind the reader of the classical notion of amenability and state some results from ergodic theory of amenable group actions. We stress that all the groups that we consider are discrete and countably infinite.
Let Γ be a group with the counting measure |·|. A sequence of finite subsets (F n ) n≥1 of Γ is called 1) a left Følner sequence (resp. right Følner sequence) if for every g ∈ Γ one has |F n △gF n | |F n | → 0 resp. |F n △F n g| |F n | → 0 ; 2) a (C-)tempered sequence if there is a constant C such that for every j one has A group is called amenable if it has a left Følner sequence. A sequence of finite subsets (F n ) n≥1 of Γ is called a two-sided Følner sequence if it is a left and a right Følner sequence simultaneously.
We refer the reader, e.g., to [SV03] for the standard notions of a computable function and a computable/enumerable set, which will appear in this article. A sequence of finite subsets (F n ) n≥1 of N is called canonically computable if there is an algorithm that, given n, prints the set F n and halts. Formally speaking, for a finite set A = {x 1 , x 2 , . . . , x k } ⊂ N, we call the number I(A) := k i=1 2 xi the canonical index of A. Hence a sequence (F n ) n≥1 of finite subsets of N is canonically computable if and only if the (total) function n → I(F n ) is computable.
A group Γ with the composition operation • is called a computable group if, as a set, Γ is a computable subset of N and the total function • : Γ × Γ → Γ is computable. It is easy to show that in a computable group Γ the inversion operation g → g −1 is a total computable function. We refer the reader to [Rab60] for more details.
Any discrete amenable group Γ admits a two-sided Følner sequence. Furthermore, if the group is computable, then there exists a canonically computable twosided Følner sequence. To prove that we will need the following result.
Lemma 2.1. Given a discrete amenable group Γ, for any finite symmetric set K ⊂ Γ such that e ∈ Γ and any ε > 0 there exists a finite subset F ⊂ Γ such that We refer the reader to [OW87, I. §1, Proposition 2] for the proof.
Lemma 2.2. Let Γ be a computable amenable group. Then there exists a canonically computable two-sided Følner sequence (F n ) n≥1 .
Proof. First of all, observe that given K ⊂ Γ, ε > 0 as in Lemma 2.1 and a finite set F ⊂ Γ satisfying Equation (2.1), we have for all g ∈ K. Let K n be the finite set of the first n elements of the computable group Γ. Then, for every n = 1, 2, . . . we apply Lemma 2.1 to the set K n ∪K −1 n ∪{e} and ε n := 1/n and find the finite set F n with the smallest canonical index I(F n ) satisfying Equation (2.1). It is easy to see that (F n ) n≥1 is indeed a two-sided Følner sequence.
Every Følner sequence has a tempered Følner subsequence. Furthermore, the construction of a tempered Følner subsequence from a given canonically computable Følner sequence is 'algorithmic'. The proof is essentially contained in [Lin01, Proposition 1.4], but we provide it for reader's convenience below.
Proposition 2.3. Let (F n ) n≥1 be a canonically computable Følner sequence in a computable group Γ. Then there is a computable function i → n i s.t. the subsequence (F ni ) i≥1 is a canonically computable tempered Følner subsequence.
Proof. We define n i inductively as follows. Let n 1 := 1. If n 1 , . . . , n i have been determined, we set F i := j≤i F nj . Take for n i+1 the first integer greater than i + 1 such that The function i → n i is total computable. It follows that hence the sequence (F ni ) i≥1 is 2-tempered. Since the Følner sequence (F n ) n≥1 is canonically computable and the function i → n i is computable, the Følner sequence (F ni ) i≥1 is canonically computable and tempered.
Let us state an immediate corollary.
Corollary 2.4. Let Γ be a computable amenable group. Then there exists a canonically computable, tempered two-sided Følner sequence (F n ) n≥1 in Γ.
The following result tells us that the lim sup of averages of bounded functions on an amenable group is translation-invariant.
Lemma 2.5 (Limsup invariance). Let Γ be an amenable group with a right Følner sequence (F n ) n≥1 and f ∈ ℓ ∞ (Γ, R) be a bounded function on Γ. Then Proof. A direct computation shows that for all n ≥ 1 and the statement of the lemma follows since (F n ) n≥1 is a right Følner sequence.
Remark 2.6. The statement of Lemma 2.5 does not hold for general amenable groups and unbounded nonnegative functions. As a counterexample, take Γ := Z with the tempered two-sided Følner sequence F n := [−2 n , . . . , 2 n ] for n ≥ 1 and define f : Γ → N to be zero everywhere, except for points of the form 2 k + 1, where we let f (2 k + 1) := 2 k for all k ≥ 0.
It is then easy to see that lim sup n→∞ E g∈Fn f (g) = lim sup n→∞ E g∈Fn f (g + 1).
We will resolve this issue in the class of groups of polynomial growth in Lemma 2.9 in Section 2.2.
2.2. Computable Groups of Polynomial Growth. Let Γ be a finitely generated discrete group and {γ 1 , . . . , γ k } be a fixed generating set. Each element γ ∈ Γ can be written as a product γ p1 i1 γ p2 i2 . . . γ p l i l for some indexes i 1 , i 2 , . . . , i l ∈ {1, . . . , k} and some integers p 1 , p 2 , . . . , p l ∈ Z. We define the norm of an element γ ∈ Γ by where the infinum is taken over all representations of γ as a product of the generating elements. The norm · on Γ can, in general, depend on the generating set, but it is easy to show [CSC10, Corollary 6.4.2] that two different generating sets produce equivalent norms. We will always say what generating set is used in the definition of a norm, but we will omit an explicit reference to the generating set later on. We say that the group Γ is of polynomial growth if there are constants C, d > 0 such that for all n ≥ 1 we have Example 2.7. Consider the group Z d for d ∈ N and let γ 1 , . . . , γ d ∈ Z d be the standard basis elements of Z d . That is, γ i is defined by for all i = 1, . . . , d. We consider the generating set given by elements k∈I (−1) ε k γ k for all subsets I ⊆ [1, d] and all functions ε · ∈ {0, 1} I . Then it is easy to see by induction on dimension that B(n) = [−n, . . . , n] d , hence |B(n)| = (2n + 1) d for all n ∈ N with respect to this generating set, i.e., Z d is a group of polynomial growth.
Let d ∈ Z ≥0 . We say that the group Γ has polynomial growth of degree d if there is a constant C > 0 such that It was shown in [Bas72] that, if Γ is a finitely generated nilpotent group, then Γ has polynomial growth of some degree d ∈ Z ≥0 . Furthermore, one can show [CSC10, Proposition 6.6.6] that if Γ is a group and Γ ′ ≤ Γ is a finite index, finitely generated nilpotent subgroup, having polynomial growth of degree d ∈ Z ≥0 , then the group Γ has polynomial growth of degree d. The converse is true as well: it was proved in [Gro81] that, if Γ is a group of polynomial growth, then there exists a finite index, finitely generated nilpotent subgroup Γ ′ ≤ Γ. It follows that if Γ is a group of polynomial growth with the growth function γ, then there is a constant C > 0 and an integer d ∈ Z ≥0 , called the degree of polynomial growth, such that An even stronger result was obtained in [Pan83], where it is shown that, if Γ is a group of polynomial growth of degree d ∈ Z ≥0 , then the limit Lemma 2.8. Let Γ be a group of polynomial growth. Then (B(n)) n≥1 is a tempered two-sided Følner sequence in Γ.
where we use the existence of the limit in Equation (2.2). Similarly, we use the relation B(n)g ⊆ B(n + m) to show that (B(n)) n≥1 is a right Følner sequence. The sequence (B(n)) n≥1 is tempered, since for all n ≥ 1.
As promised in Remark 2.6, we prove now that the lim sup of averages of arbitrary nonnegative functions on a group of polynomial growth Γ is translation invariant.
Lemma 2.9 (Limsup invariance). Let Γ be a group of polynomial growth and define the Følner sequence of balls around e ∈ Γ by F n := {g ∈ Γ : g ≤ n} for n ≥ 1.
Proof. Let S ⊂ Γ be the finite generating set, which is used in the definition of the norm · on Γ. Since the statement of the lemma is 'symmetric' and since the set S generates Γ, it suffices to prove that and the proof is complete.
A computable group Γ with a distinguished set of generators {γ 1 , . . . , γ k } will be called a computable group of polynomial growth if Γ is a group of polynomial growth. It will be essential further that the generating set is known and fixed. More precisely, we state the following lemma.
Lemma 2.10. Let Γ be a computable group of polynomial growth with a distinguished set of generators {γ 1 , . . . , γ k }. Then the following assertions hold: (a) The sequence of balls (B(n)) n≥1 is a canonically computable sequence of finite sets; (b) The growth function n → |B(n)| , Z ≥0 → N is a total computable function; (c) The norm · : Γ → Z ≥0 is a total computable function.
The proof of the lemma is straightforward.
A measure-preserving transformation ϕ : X → X is called an automorphism if there exists a measure-preserving transformation ψ : X → X such that We denote by Aut(X) the group of all automorphisms of the probability space X. Given a discrete group Γ, a measure-preserving Γ-system 1 is a probability space X = (X, B, µ), endowed with an action of Γ on X by automorphisms from Aut(X). We denote a measure-preserving Γ-system on a probability space (X, B, µ) by a triple (X, µ, Γ) and we write g · x, where g ∈ Γ, x ∈ X, to denote the corresponding action of Γ on elements of X.
Let X = (X, µ, Γ) be a measure-preserving Γ-system on a probability space (X, B, µ). We say that X is ergodic (or that the measure µ on X is ergodic) if, for all A ∈ B, the condition µ(γ −1 A△A) = 0 for all γ ∈ Γ implies that µ(A) = 0 or µ(A) = 1. That is, X is ergodic if only the trivial sets are essentially invariant under Γ.
The simplest ergodic theorem for amenable group actions is the mean ergodic theorem, which we state below. For the proof we refer the reader to [Gla03, Theorem 3.33].
Theorem 2.11. Let (X, µ, Γ) be a measure-preserving, ergodic Γ-system, where the group Γ is amenable and (F n ) n≥1 is a left Følner sequence. Then for every f ∈ L 2 (X) we have where the convergence is understood in L 2 (X)-sense.
Pointwise convergence of ergodic averages is much more tricky, in particular, pointwise ergodic averages do not necessarily converge, unless the Følner sequence satisfies some additional assumptions. The following important theorem was proved by E. Lindenstrauss in [Lin01] 2 .
Theorem 2.12. Let X = (X, µ, Γ) be an ergodic measure-preserving Γ-system, where the group Γ is amenable and (F n ) n≥1 is a tempered left Følner sequence.

Computability on Cantor Space and Martin-Löf Randomness.
In this section we remind the reader some standard notions of computability on Cantor space. All of these notions have analogs on computable metric spaces as well, and we refer to [HR09], [GHR10] for the details.
Throughout the article we fix some enumeration of Q = {q 1 , q 2 , q 2 , . . . }. We use the standard notions of a computable real number and of a lower/upper semicomputable real number. A sequence of real numbers (a n ) n≥1 is called computable uniformly in n if there exists an algorithm A : N × N → Q such that |A(n, i) − a n | < 2 −i for all n, i ≥ 1.
We fix some enumeration 2 In fact, a more general statement is proved there, but we only need the ergodic case in this work.
A sequence (U n ) n≥1 of sets is called a uniformly effectively open sequence of sets if there is a recursively enumerable set E ⊆ N × N such that is called lower semicomputable if the sequence of sets (f −1 ((q n , +∞))) n≥1 is uniformly effectively open. Let µ be a Borel probability measure on {0, 1} N . We say that µ is a computable is computable uniformly in i 1 , . . . , i k ≥ 1. Suppose that µ is a computable probability measure on {0, 1} N . A Martin-Löf µ-test is a uniformly effectively open sequence of sets (U n ) n≥1 such that µ(U n ) < 2 −n for all n ≥ 1.
Any subset of n≥1 U n is called an effectively µ-null set. A point ω ∈ {0, 1} N is called Martin-Löf random if it is not contained in any effectively µ-null set.
2.5. Computable Dynamical Systems. Now, let Γ ⊆ N be a computable group, which acts on {0, 1} N by homeomorphisms. We say that the action of Γ is computable if there is a recursively enumerable subset E ⊆ Γ × N × N such that In general, checking the computability of the action of a computable group Γ on {0, 1} N can be trickier than checking computability of a single transformation. Imagine a Z-action on {0, 1} N with the generating element ϕ ∈ Z. Can it happen that both ϕ and ϕ −1 are computable transformations of {0, 1} N , whilst the action of Z on {0, 1} N is not computable? Fortunately, the answer is 'no': the following lemma tells us that for an action of a computable finitely generated group it suffices to check computability of transformations in a finite symmetric generating set to guarantee the computability of the action. The lemma also shows that the terminology of computable group actions which we suggest in this article is compatible with the classical case, when there is only one computable transformation.
We will describe an algorithm, which enumerates the set E. At stage n, the algorithm first computes the finite set B(n) ⊂ Γ by computing all products of the elements of S of length at most n. For each word We compute the first n pairs (i, j 1 ) ∈ E i1 , for each of these pairs we compute the first n pairs (j 1 , j 2 ) ∈ E i2 and so on up to the first n pairs (j k−1 , j k ) ∈ E i k (where j k−1 comes from the one but the last step). The algorithm prints all resulting triples (γ, i, j k ), and proceeds to the next word (or the next stage, if all words at the current stage have been exhausted). Since, at each stage n, we look through all products of length at most n, it is easy to see that for all i ≥ 1, and, furthermore, the set E is recursively enumerable.
Remark 2.14. The notion of a computable action of a computable group which we suggest directly translates to arbitrary computable metric spaces. Furthermore, Lemma 2.13 remains valid in the more general setting.
3. Effective Birkhoff's Theorem 3.1. Kučera's Theorem. In this section we generalize Kučera's theorem for computable actions of amenable groups. In the proof we follow roughly the approach from [BDHMS12], although the technical details do differ.
Theorem 3.1. Let Γ be a computable amenable group and ({0, 1} N , µ, Γ) be a computable ergodic Γ-system. Let U ⊂ X be an effectively open subset such that µ(U ) < 1. Let be the set of all points ω ∈ {0, 1} N whose orbit remains in U . Then U * is an effectively null set.
Proof. Let (F n ) n≥1 be a canonically computable two-sided Følner sequence in Γ and µ(U ) < q < 1 be some fixed rational number. Let (I i ) i≥1 be the basis of cylinder sets in ({0, 1} N , µ). Let (3.1) (i, k) → n(i, k), N × N → N be some total computable function, which will be chosen later, and define a computable function m by m(i, k) := F n(i,k) for i, k ≥ 1.
Since U 0 := U is effectively open, there is a r.e. subset E 0 ⊆ N such that U 0 = i∈E0 I i is a union of disjoint cylinder sets. Since the action of Γ is computable and since (F n ) n≥1 is canonically computable, the sequence is a uniformly effectively open sequence of sets. Let then, clearly, U 1 ⊆ U 0 is an effectively open set and U * ⊆ U 1 . Since U 1 is an effectively open set, there is a r.e. subset E 1 ⊆ N such that U 1 = i∈E1 I i is a union of disjoint cylinder sets. Suppose that The cylinder sets (I i ) i∈E0 are pairwise disjoint, hence µ(U 1 ) ≤ qµ(U 0 ) + q. We want to apply the same procedure to U 1 and so on to obtain a sequence of uniformly open sets with almost exponentially decaying measure. So, in general, let k ≥ 1 and suppose that U k−1 = i∈E k−1 I i is a disjoint union of cylinder sets for an r.e. subset E k−1 . We let where g i,1 , g i,2 , . . . , g i,m(i,k) is the list of all distinct elements of F n(i,k) . The sequence of sets  is uniformly effectively open, so it follows that (U k ) k≥1 is uniformly effectively open. Clearly, U * ⊆ U k ⊆ U k−1 for every k ≥ 1. If we show that then µ(U k ) < qµ(U k−1 ) + q k for every k, and so µ(U k ) < (k + 1)q k , which would imply that U * is an effectively null set. Observe that If, for every i, k ≥ 1, we find effectively a number n(i, k) such that then, due to Cauchy-Schwarz inequality, the computation above implies that Mean ergodic theorem (Theorem 2.11) implies that a number n(i, k) satisfying Equation (3.4) always exists, since (F −1 n ) n≥1 is a left Følner sequence. To find the number n(i, k) effectively we argue as follows.
First, (gI i ) g∈Γ,i≥1 is a uniformly effectively open sequence of sets by definition of computability of the action of Γ on {0, 1} N , so let E ⊆ Γ × N × N be an r.e. subset such that g(I i ) = (g,i,j)∈E I j for all g ∈ Γ, i ≥ 1 We claim that there exists a uniformly effectively open sequence of sets (∆ k g,i ) g,i,k , where each ∆ k g,i is the union of the first ∆ k g,i intervals in gI i , such that the function (g, i, k) → ∆ k g,i is total computable and that (3.5) µ(gI i \ ∆ k g,i ) < q 2k · 2 −2i 64 for all g ∈ Γ and i, k ≥ 1.
To do so, we use computability of the measure µ to find (uniformly in i, k and effectively) a rational d k i such that The set ∆ k g,i is constructed as follows. Let ∆ k g,i = ∅. Take the first interval I j1 such that (g, i, j 1 ) ∈ E, add it to the collection ∆ k g,i and compute its measure m g,i with precision q 2k ·2 −2i 256 . If then we are done. Otherwise, we add the next interval I j2 such that (g, i, j 2 ) ∈ E to the collection ∆ k g,i , compute the measure m g,i of the union of intervals in ∆ k g,i with precision q 2k ·2 −2i 256 and check the condition (3.6) once again and so on. The algorithm eventually terminates, it is clear that it provides a uniformly effectively open sequence of sets (∆ k g,i ) g,i,k , and a direct computation shows that condition (3.5) is satisfied as well.
The number n(i, k) is defined as the smallest nonnegative integer such that where the L 2 -norm is computed, say, with a q 2k ·2 −2i 256 -precision. Such n(i, k) exists due to Mean Ergodic Theorem and our choice of the sets ∆ k g,i . Furthermore, it is computable, since the sequence of sets (∆ k g,i ) is uniformly effectively open, the measure µ is computable and (F n ) n≥1 is a computable Følner sequence.
3.2. Birkhoff 's Theorem. In this section we prove the main theorems of the article. Our main technical tools are the generalization of Kučera's theorem from the previous section, the result of Lindenstrauss about pointwise convergence of ergodic averages and Lemmas 2.5, 2.9 about the invariance of limsup of averages. First, we prove Birkhoff's effective ergodic theorem for indicator functions of effectively opens sets.
The function g → 1 U (g · ω) on Γ is bounded, thus we can use Lemma 2.5 to deduce that lim sup Since q > µ(U ) is an arbitrary rational, this implies that lim sup Secondly, if U = i∈E I i for an r.e. subset E ⊆ N, we let ∆ k ⊆ U be the union I i1 , . . . , I i k of the first k intervals in U for every k ≥ 1. Then ∆ k is a clopen subset, and its compliment ∆ c k is an effectively open set. The preceding argument, applied to ∆ c k , implies that lim sup n≥1 E g∈Fn 1 ∆ c k (g · ω) ≤ µ(∆ c k ) = 1 − µ( k j=1 I ij ).
Since k ≥ 1 is arbitrary, it follows easily that and the proof is complete.
We proceed to the main theorems of the article.
Proof. Firstly, the proof that lim sup n→∞ E g∈Fn f (g · ω) ≤ f dµ for every Martin-Löf random ω is completely analogous to the first part of the proof of Lemma 3.2 above. In particular, the argument about the translation-invariance of lim sup n≥1 E g∈Fn f (g · ω) remains valid, since f is a bounded function and we can once again use Lemma 2.5. Secondly, given an arbitrary ε > 0, let 0 ≤ h ≤ f be a finite linear combination of indicator functions of effectively open sets such that An application of Lemma 3.2 yields that which completes the proof, since ε > 0 is arbitrary.
Remark 3.4. Compared to [BDHMS12], we make an additional assumption in Theorem 3.3 that the observable is bounded. The reason for that is that the invariance of lim sup is only in general guaranteed by Lemma 2.5 for bounded functions.
In a special case, when Γ is a computable group of polynomial growth, we can remove the additional assumption about the boundedness of f . The theorem below is a generalization of [BDHMS12, Theorem 8].
Theorem 3.5. Let Γ be a computable group of polynomial growth with the Følner sequence of balls around e ∈ Γ given by F n := {g ∈ Γ : g ≤ n} for n ≥ 1.
Proof. The argument is identical to the reasoning in Theorem 3.3. We use Lemma 2.9 for the invariance of lim sup of averages, hence obtaining the proof for an arbitrary lower semicomputable f .