Entropy Formulas For Dynamical Systems With Mistakes

We study the recurrence to mistake dynamical balls, that is, dynamical balls that admit some errors and whose proportion of errors decrease tends to zero with the length of the dynamical ball. We prove, under mild assumptions, that the measure-theoretic entropy coincides with the exponential growth rate of return times to mistake dynamical balls and that minimal return times to mistake dynamical balls grow linearly with respect to its length.Moreover we obtain averaged recurrence formula for subshifts of finite type and suspension semiflows. Applications include $\beta$-transformations, Axiom A flows and suspension semiflows of maps with a mild specification property. In particular we extend some results from [4, 9, 17] for mistake dynamical balls.


Introduction.
Throughout this paper, (X, f ) denotes a topological dynamical systems (TDS for short) in the sense that f : X → X is a continuous transformation on the compact metric space X with the metric d. Invariant Borel probability measures are associated with (X, f ). The terms M(X, f ) and E(X, f ) represent the space of f -invariant Borel probability measures and the set of f -invariant ergodic Borel probability measures, respectively.
The well known notions of topological and measure-theoretic entropy constitute important invariants in the characterization of the complexity of a dynamical system. Just as an illustration let us mention that the measure-theoretic entropy turned out to be a surprisingly universal concept in ergodic theory since it appears in the study of different subjects as information theory. We refer the reader to [6] for a rather complete overview.
An important characteristic of invariant measures is recurrence. Poincaré recurrence theorem is one of the basic but fundamental results of the theory of dynamical systems and it essentially states that each dynamical system preserving a finite invariant measure exhibits a non-trivial recurrence to each set with positive measure. More precisely, it asserts that if A ⊂ X is a measurable subset of positive µ-measure, then Card{n : f n x ∈ A} = ∞ for µ-almost every point x ∈ A. Given a dynamical system (X, f ), a natural question is: which kind of further information can be obtained when the subset A is replaced by a decreasing sequence of sets U n ? There are some interesting results for this question. Ornstein  [11] proved that the entropy h µ (f, Q) of an ergodic measure µ with respect to a partition Q is given by the almost everywhere well-defined limit where R n (x, Q) = inf{k ≥ 1 : f k (x) ∈ Q n (x)} is the nth return time with respect to the partition Q, Q n = n−1 i=0 f −i Q is the refined partition and Q n (x) denotes the element of Q n which contains the point x. In consequence, the measure-theoretic entropy is the supremum of the exponential growth rates of Poincaré recurrences over all finite measurable partitions. Downarowicz and Weiss [5] proved that the measure-theoretic entropy is given by the exponential growth rate of return times to dynamical balls. More recently, in the study of the relation betweed entropy, dimension and Lyapunov exponents, the second author in [17] used combinatorial arguments to provide an alternative and more direct proof of this result. Namely, when µ is an f -invariant ergodic measure, the measure theoretical entropy can be computed for µ-almost every x ∈ X by the following limits: where R n (x, ε) = inf{k ≥ 1 : f k (x) ∈ B n (x, ε)} is the first return time to the dynamical ball B n (x, ε) = {y ∈ X : d(f i (x), f i (y)) < ε, 0 ≤ i ≤ n − 1}. In particular, return times to dynamical balls grow exponentially fast with respect to every ergodic measure with positive entropy. The same result is no longer true for minimal return times. Indeed, when f has the specification property, in [17] the second author obtained also that the minimal return times to dynamical balls defined by S n (x, ε) = inf{k ≥ 1 : f −k (B n (x, ε)) ∩ B n (x, ε) = ∅} grow linearly with n, that is, for any µ ∈ E(X, f ) satisfying h µ (f ) > 0. More recently, Marie and Rousseau [8] initiated the study of recurrence properties for random dynamical systems. The authors established relations between random recurrence rates and local dimensions of the stationary measure of the random dynamical systems under some natural assumptions. To the best of our knowledge, this is the first step in the study of recurrence behavior in random dynamical systems. We report some progress to obtain Ornstein-Weiss type of formulas in the random setting in [15].
An important contribution was given also by Maume-Deschamps, Schmitt, Urbanski and Zdunik in [9], where the authors explored the connection between recurrence and topological pressure of any Hölder continuous potential for subshifts of finite type. In fact, the authors studied return time with some weighted function, and they obtained some interesting relations between pressure and return times. Related results were obtained by Meson and Vericat in [10] for the more general setting of homeomorphisms with the specification property.
Here we will refer to return times to mistake dynamical balls, whose precise definition will be given later on. Roughly, when a physical process evolves it is natural that it may change or that some errors are committed in the evaluation of orbits. However, if the system is self adaptable the amount proportion of errors should decrease as the time evolves. This gives us the motivation to consider return times to mistake dynamical balls, whose formalization is also in connection with the almost specification property introduced by Pfister and Sullivan [12] and Thompon [16]. We refer the reader to the beginning of the next section for the precise definition of mistake dynamical balls. Since the proportion of admissible errors decreases as the time evolves we can prove that the measure-theoretic entropy is given by the exponential growth rate of return times to mistake dynamical balls, that the minimal return times to mistake dynamical balls grow linearly with respect to its length and obtain some formula connecting the topological pressure to weighted recurrence. Moreover, we also obtain a generalization of an entropy formula due to Chazottes [4] for suspension semiflows. Since our main results require a mild specification property we are able to give applications to the β-transformation and the corresponding suspension semiflow. Finally, we expect these results to have a wider range of applications and to open the way to the study of other properties as the relation between recurrence to balls (eventually for non-uniformly expanding maps) and pointwise dimension, as well as the multifractal formalism for this notion of mistake recurrence.
The remainder of this paper is organized as follows. In Section 2 we state our main results and give some applications to β-transformations and suspension semiflows. In Section 3 we recall some definitions and present some preliminary results. Finally, the proofs of the main results are given in Section 4.

Statement of the main results
In this section we give some definitions and set the context for our main results. First we recall the definitions of mistake function and mistake dynamical balls which are due to Thompson, Pfister and Sullivan [12,16].
For any subset of integers Λ ⊂ [0, N ], we will use the family of distances in the metric space X given by d Λ (x, y) = max{d(f i x, f i y) : i ∈ Λ} and consider the balls Definition 2.2. Let g be a mistake function, ε > 0 and n ≥ 1. The mistake dynamical ball B n (g; x, ε) of radius ε and length n associated to g is defined by For every mistake function g, we associate the first return time R n (g; x, ε) to the mistake dynamical ball B n (g; x, ε) by R n (g; x, ε) = inf{k ≥ 1 : f k (x) ∈ B n (g; x, ε)}. Our first result reflects a stability of the metric entropy even if a small amount of errors is commited when compared with the original orbits.
Theorem A. Let (X, f ) be a TDS and let g be any mistake function. For every µ ∈ E(X, f ) the limits exist for µ-almost every x and coincide with the measure-theoretic entropy h µ (f ).
Let us comment on the assumption of ergodicity in the above theorem. Given any µ ∈ M(X, f ) by ergodic decomposition theorem we know that µ can be decomposed as a convex combination of ergodic measures, i.e. µ = µ x dµ(x). Moreover, since h µ (f ) = h µx (f )dµ(x), then applying Theorem A to each ergodic component µ x and integrating with respect to µ we obtain the following consequence. Corollary 1. Let µ ∈ M(X, f ). Then the limits h g (f, x) and h g (f, x) defined above do exist for µ-almost every x . Moreover, the measure-theoretic entropy satisfies Given a continuous observable φ : X → R, the measure-theoretic pressure P µ (f, φ) = h µ (f ) + φ dµ of the invariant measure µ with respect to f and φ can also be written using weighted recurrence times. We refer the reader to [18] for more details on the measure-theoretic pressure for a large class of potentials.

Corollary 2.
Let (X, f ) be a TDS, µ ∈ E(X, f ), φ : X → R be a continuous potential. Then, for every mistake function g it holds log[e Snφ(Bn(g;x,ε)) R n (g; x, ε)] for µ-almost every x ∈ X, where S n φ(B n (g; x, ε)) = sup{ Proof. Let µ ∈ E(X, f ) and φ : X → R be a continuous function. Given any δ > 0, by the uniform continuity of φ, there exists ε δ > 0 such that |φ(x) − φ(y)| < δ whenever d(x, y) < ε for every 0 < ε < ε δ . For each y ∈ B n (g; x, ε), there exists Λ ⊂ I(g; n, ε) so that y ∈ B Λ (x, ε), therefore On the other hand, using Birkhoff's ergodic theorem and Theorem A, there exists a µ-full measure set R such that for every x ∈ R. Now, given x ∈ R, by (2.1) and the definition of mistake function, we have for every small ε > 0. Since δ was taken arbitrary, the result follows immediately.
We turn our attention to minimal return times. Namely, given a mistake function g we define the nth minimal return time S n (g; x, ε) to the mistake dynamical ball B n (g; x, ε) by Now we give an alternative definition of g-almost specification property of a TDS (X, f ), motivated by the results from Thompson's definition of almost specification property [16] and Pfister and Sullivan's definition of g-almost product property [12]. Definition 2.3. Let g be a mistake function. A TDS (X, f ) satisfies the g-almost specification property if there exists ε > 0 and a positive integer N (g, ε) such that for any x, y ∈ X and integers n, The previous notion is weaker than the one introduced in [16] since it deals with the case that any two pieces of approximate orbits are given to be approximated by a real orbit within the same scale ε. In opposition to [12] the unboundedness of the mistake function is not required. It is interesting to study the class of mistake functions g for which g-almost specification still holds, question which we discuss partially in Lemma 3.4 below. In what follows we prove that under some mild assumptions minimal return times grow linearly. More precisely, Theorem B. Let g be any mistake function. If (X, f ) is a TDS with g-almost specification property and µ ∈ E(X, f ) so that h µ (f ) > 0, then the limits exists and are equal to one for µ-almost every x.
Note that mistake dynamical balls coincide with the usual dynamical balls in the case that g ≡ 0. Therefore, this theorem improves the results by the second author in [17, Theorem B] since we require as an hypothesis a weaker specification property. We provide an interesting example that illustrates this fact.
Example 2.4. Consider the piecewise expanding maps of the interval [0, 1) given by T β (x) = βx( mod 1), where β > 1 is not integer. This family is known as beta transformations and it was introduced by Rényi in [13]. It was proved by Buzzi [3] that for all but countable many values of β the transformation T β do not satisfy the specification property. These do not satisfy the conditions of [17,Theorem B]. It follows from [12,16] that every β-map satisfies the almost specification property for every unbounded mistake function g. Then it follows from our results that given any unbounded mistake function g and every invariant measure µ with positive entropy one has lim ε→0 lim sup for µ-almost every x.
Remark 2.5. It is not hard to use the previous results to obtain formulas relating entropy and return times to partition elements instead of dynamical balls. In fact, let µ be an f -invariant ergodic measure. If Q is a partition of X and g = g(n, Q) is any function such that g(n, Q) ≤ g(n + 1, Q) and lim n→∞ g(n, Q)/n = 0, also denoted by mistake function, we can consider the mistake partition elements We derive from Theorems A and B that and, if f satisfies the g-almost specification property and µ has positive entropy then where R n (g, x, Q) and S n (g, x, Q) denote, respectively, the first and the minimal return times of the point x to the set Q . We now obtain that recurrence is strongly related with topological pressure. More precisely, despite the fact that we deal with recurrence to mistake dynamical balls the first claim of the next result can be understood as an extension of [9] .
Theorem C. Let (X, f ) be a subshift of finite type, φ : X → R be a Hölder continuous potential and µ = µ φ be the unique equilibrium state of f and φ. Let us denote by Q the partition of X into initial cylinders of length one. Then for every mistake function g, it holds for µ-a.e. x, where P top stands for the topological pressure of f with respect to φ.
An important remark is that in [10] the authors established a similar formula for expansive dynamical systems with the specification property, which contains the case of subshifts of finite type. Although we will not prove it here it seems possible that the theorem above may admit such a generalization for expansive dynamical systems with the g-almost specification property.
Our last result will concern return times for suspension semiflows (f t ) t over a base dynamical system σ : Σ → Σ with continuous height function ϕ : Σ → R + on a compact metric space Σ. More precisely, (f t ) t acts on the space where (x, ϕ(x)) and (σ(x), 0) are identified for every x ∈ Σ, as the "vertical flow" defined by f t (x, s) = (x, s + t). With the natural identification on Y we can write It is well known that if the roof function is bounded from away from zero and infinity then there is a natural identification between the space M of (f t ) t -invariant probability measures and the space M σ of σ-invariant probability measures. Namely, is a bijection, where m is the Lebesgue measure on R. In particular many ergodic properties for suspension semiflows can be reduced to the study of the Poincaré return map corresponding to the section Σ × {0}. The following is an extension of the results by Chazottes in [4]. First recall that the first return time for flows have the subtlety that the return time is considered after the escaping time (for results on return times for flow we can refer to the thesis of the first autor [14]). Indeed, given an open set A ⊂ Y and (x, t) ∈ A define the escaping time of a point We shall consider mainly sets of the form A = B n (g; x, ε) × [t − ε, t + ε] with respect to a mistake function g.
Theorem D. Let g 1 and g 2 be any mistake functions on Σ and let µ be an ergodic f -invariant probability measure. Assume that f satisfies the g 2 -almost specification property. If µ is an f -invariant, ergodic probability measure with positive entropy then for µ-almost every x ∈ Σ and every s ∈ R such that (x, s) ∈ Y , we have where µ is the (f t )-invariant measure given by (2.4) and R n (g 1 ; x, ε) stands for the first return time of the point x to the set B n (g 1 ; x, ε) by the base transformation σ.
Let us mention that an adapted version of the previous result also holds for nonergodic measures. In fact, if µ = L(µ) is any (f t )-invariant probability measure and µ = µ x dµ(x) is an ergodic decomposition for µ then it is clear that µ = L(µ x ) dµ(x) is an ergodic decomposition of µ. Hence, we can use Theorem D above in the formula h µ ((f t )) = h L(µx) ((f t )) dµ(x). Example 2.6. For every topological Axiom A flow, that is, suspension semiflows over subshifts of finite type, it is not hard to check in the proof of Theorem D that a particular easy application of Theorem C yields is the free energy defined in (3.2). However, since we found no particularly simple expression for the last term in the right hand-side. We shall not prove nor use this fact along the paper.
We give now an example of application of Theorem D to the suspension flow of β-transformations.
Example 2.7. Take the β-transformation given by T β (x) = βx( mod 1) in the interval [0, 1) with β > 1 not integer as discussed in Example 2.4 and consider any unbounded mistake function g and any mistake functiong. Let µ be any ergodic T β -invariant probability measure with positive entropy, (f t ) t be the suspension semiflow by a continuous roof function ϕ bounded away from zero. Then .
for µ-almost every x.
Further applications of our results exploring the relation between pointwise dimension, Lyapunov exponents and entropy of invariant measures as in [17] seems feasible and so we believe in an affirmative answer to the following question.
Question: Can one compute the pointwise dimension of an invariant measure using recurrence to mistake dynamical balls?

Preliminaries
In this section, we recall some preliminary results about entropy, free energy, mistake function and suspension semiflows.
3.1. Entropy. In this subsection, we first recall an equivalent description of the measure-theoretic entropy. Namely, using Katok's entropy formula [7] and Shannon-McMillan-Breiman's theorem, we have the following lemma.
Lemma 3.1. Let Q be a partition of X, c ∈ (0, 1) and µ ∈ E(X, f ). Then where N µ (n, ε, c) denotes the minimum number of n-cylinders of the partition Q (n) = n−1 i=0 f −i Q necessary to cover a set of µ-measure at least c. Now we turn our attention to the following covering lemma for mistake dynamical balls associated with points with slow recurrence to the boundary of a given partition.
Lemma 3.2. Let Q be a finite partition of X and consider ε > 0 arbitrary small. Let V ε denote the ε-neighborhood of the boundary ∂Q. For any α > 0, there exists γ > 0(depending only on α), such that for every x ∈ X satisfying n−1 j=0 χ Vε (f j x) < γn, the mistake dynamical ball B n (g; x, ε) can be covered by e αn cylinders of Q (n) for sufficiently large n.
Proof. Fix an arbitrary α > 0. Since B(z, ε) ⊂ Q(z) for each z / ∈ V ε , the itinerary of any point y ∈ B n (g; x, ε) for which n−1 j=0 χ Vε (f j x) < γn will differ from the one of x by at most [γn] + g(n, ε) choices of partition elements. Since there are at most n γn + g(n, ε) (#Q) γn+g(n,ε) such choices and lim n→∞ g(n,ε) n = 0, the previous upper can be made smaller than e αn provided that γ > 0 is small and n is sufficiently large. This completes the proof of the lemma.

Free energy.
In this subsection, we will define and collect some important characterizations for the free energy of subshifts of finite type. Given an observable φ : X → R the free energy is defined as This functional is very used in the physics and large deviations literature since its Legendre transform is an upper bound for the measure of deviation sets. Let us recall a very interesting formula for the free energy of subshifts of finite type. does exist and coincides with the free energy c φ,t . In particular, c φ,1 = P top (f, 2φ)− P top (f, φ) In this context the free energy is continuous and differentiable and it plays a key role in the theory of large deviations. Indeed, it follows from Ellis Large Deviation Theorem that for every Hölder continuous ψ whereÎ φ denotes the Legendre transform of the free energy function that is,Î φ (t) = sup s {st − C φ (s)}. Moreover,Î φ is differentiable and attains a minimumÎ φ (0) = 0. As a consequence of the variational relationship between C φ andÎ φ we have also C φ (t) = sup s {st +Î φ (s)}.

Mistake functions.
In this subsection we show that the almost specification property does not depend on the unbounded mistake function that we consider.
Lemma 3.4. Let g be a mistake function and ε > 0. If a TDS (X, f ) satisfies the g-almost specification property with scale ε then f satisfies theg-almost specification property for every mistake functiong satisfying Proof. Let the mistake function g and ε be fixed, and consider an arbitrary mistake functiong satisfying (3.3). Since f satisfies the g-almost specification property then there exists a positive integer N (g, ε) such that for every n 1 , n 2 ≥ N (g, ε) and x 1 , x 2 ∈ X. Our assumption yields that N (g, ε) = max {N (g, ε), inf{k ∈ N :g(ε, ℓ) ≥ g(ε, ℓ) for every ℓ ≥ k}} is well defined and finite. Moreover, it is clear that B ni (g; x i , ε) ⊂ B ni (g; x i , ε) for every x i ∈ X, every n i ≥ N (g, ε) and all i = 1, 2. In particular we deduce that for every n 1 , n 2 ≥ N (g, ε), which concludes the proof of the lemma.

Suspension semiflows.
In this subsection we recall the Abramov formula, that relates the entropy of a suspension semiflow with the entropy of invariant measures for the global Poincaré first return transformation, which will be of particular use in the proof of Theorem D.
Lemma 3.5. Let σ : Σ → Σ be a continuous transformation, µ be a σ-invariant probability measure and ϕ : Σ → R + be a strictly positive and µ-integrable roof function. Then the associated suspension semiflow (f t ) t satisfies where µ is the (f t )-invariant measure given by (2.4).

Proof of the main results
In this section, we will show our main results that relate entropy and topological pressure with the first and minimal return times to mistake dynamical balls.

Proof of Theorem A.
Proof. First we note that the limits in the statement of Theorem A are indeed well defined almost everywhere. Given n ≥ 1, ε > 0 and x ∈ X, we claim that which immediately implies the claim (4.1). Define h g (x, ε) = lim sup n→∞ 1 n log R n (g; x, ε) and h g (x, ε) = lim inf n→∞ 1 n log R n (g; x, ε).
It follows from (4.1) that h g (x, ε) ≥ h g (f (x), ε) and h g (x, ε) ≥ h g (f (x), ε). Since µ ∈ E(X, f ), these functions are almost everywhere constant and their value will be denoted by h g (ε) and h g (ε) respectively. Put such limits do exists by monotonicity of the functions h g (ε) and h g (ε). Hence, to prove the theorem, it suffices to prove the following inequalities It is easy to prove the left hand side inequality in (4.2). Since B n (x, ε) ⊂ B n (g; x, ε) implies that R n (x, ε) ≥ R n (g; x, ε). Then using the previous results in [5,17] we get We are left to prove the second inequality in (4.2). Despite the fact that some admissible mistakes can occur their effect is neglectable from the combinatorial point of view. We follow the strategy in [17] that we include here for completeness. Assume, by contradiction that h µ (f ) > h g (f ). We pick a finite partition Q of X such that µ(∂Q) = 0 and small such that Lemma 3.2 holds for α = (b − a)/2. Pick also a sufficiently small ε > 0 so that the ε-neighborhood V ε of the boundary ∂Q then µ(V ε ) < γ/2. By Birkhoff's ergodic theorem, there exists N 0 > 1 large such that the following set χ Vε (f j x) < γn, ∀n ≥ N 0    has µ-measure larger than 1 − γ. By Lemma 3.2 each mistake dynamical ball B l (g; z, ε) of length l ≥ N 0 centered at any point z ∈ A can be covered by e αl cylinders of Q (l) . Furthermore, provided that N 1 ≥ N 0 is large enough, the measure of the set B = {x ∈ X : ∃N 0 ≤ n ≤ N 1 s.t. R n (g; x, ε) ≤ e αn } is also larger than 1 − γ. For notational simplicity we shall omit the dependence of the sets A and B on the integers N 0 and N 1 . Using Birkhoff's ergodic theorem again, there exists N 2 > 1 large such that the set has µ-measure at least 1/2. We claim that there exists a positive constant C so that Γ is covered by Ce bk cylinders of Q (k) , for every large k. This will lead to the contradiction and so proving the theorem. In the following, we prove the previous claim. Fix x ∈ Γ and k ≫ N 2 . We proceed to divide the set {0, 1, · · · , k} into blocks according to the recurrence properties of the orbit of x. If x / ∈ A ∩ B then we consider the block [0]. Otherwise, we take the first integer N 0 ≤ m ≤ N 1 such that R m (g; x, ε) ≤ e am and consider the block [0, 1, · · · , m − 1]. We proceed recursively and, if {1, 2, · · · , k ′ } (where k ′ < k) is partitioned into blocks then the next block is This process will finish after a finite number of steps and partitions {0, 1, · · · , k} according to the recurrence properties of the iterates of x, except possibly the last block which has size at most N 1 . We write the list of sequence of block lengths determined above as ι(x) = [m 1 , m 2 , · · · , m i(x) ]. By construction there are at most 3γk blocks of size one. This enable us to give an upper bound on the number of k-cylinders Q (k) necessary to cover Γ. First, note that since each m i is either one or larger than N 0 , there are at most k/N 0 blocks of size larger than N 0 . Hence, there are at most possibilities to arrange the blocks of size one. Now, we give an estimate on the number of possible combinatorics for every prefixed configuration ι = [m 1 , m 2 , · · · , m l ] satisfying m j = k and #{j : m j = 1} < 3γk. This will be done fixing elements from the right to the left. Define M j = i≤j m i . If x ∈ Γ is such that ι(x) = l, there are at most #Q possibilities to choose a symbol for each block of size one. Moreover, if 1 ≤ s ≤ l is the first integer such that l i=s m i < N 1 +e aN1 then there are at most (#Q) N1+e aN 1 possibilities for choices of (m s + m s+1 + · · · + m l )-cylinders with combinatorics [m s , m s+1 , · · · , m l ]. Recall that R ms−1 (g; f Ms−2 (x), ε) ≤ e ams−1 ≤ e aN1 and, by Lemma 3.2, the mistake dynamical ball B ms−1 (g; f Ms−2 (x), ε) can be covered by at most e αms−1 cylinders in Q (ms−1) . Hence, the possible itineraries for the m s−1 iterates {f Ms−2 (x), · · · , f Ms−1 (x)} may be chosen among e αms−1 options corresponding to each of the e ams−1 previously possibly distinct and fixed blocks of size m s−1 in [m s , · · · , m l ]. This shows that there are at most e (a+α)ms−1 possible itineraries for the m s−1 iterations of f Ms−2 (x). Proceeding recursively for m s−2 , · · · , m 2 , m 1 we conclude, after some steps, that there exists C > 0(depending only on N 1 ) such that if γ was chosen small then Γ can be covered by 3γk k/N 0 + 3γk 3γk (#Q) N1+e aN 1 +3γk e (a+α)k ≤ Ce bk cylinders in Q (k) . This proves the claim and finishes the proof of the theorem.

Proof of Theorem B.
Proof. Given a mistake function g. First, we note that the g-almost specification property guarantees that for every small ε > 0 there exists an integer N (g, ε) such that for each x ∈ X and n ≥ N (g, ε) we have B n (g; x, ε) ∩ f −n (B n (g; x, ε)) = ∅. Therefore, we have lim sup n→∞ 1 n S n (g; x, ε) ≤ 1 for every small ε > 0. In particular S(x) ≤ 1 for each x ∈ X.
Next, we prove that S(x) ≥ 1 for µ-almost every x. We claim that, for any 0 < η < 1, there exists a measurable set E η with µ(E η ) > 1 − η and µ({x ∈ E η : S n (g; x, ε) ≤ ηn}) is summable for every small ε. Using Borel-Cantelli lemma it will follow that µalmost every x ∈ E η satisfies S n (g; x, ε) > ηn for all but finitely many values of n and every small ε. Then the desired result will follow from the arbitrariness of η.
We are only left to prove the claim above. Let η ∈ (0, 1) and fix a small 0 < α < 1 3 (1 − η)h µ (f ). Consider a finite partition Q of X with µ(∂Q) = 0 and 3α < (1 − η)h, where h = h µ (f, Q) > 0. If ε 0 is small enough then µ(V ε ) < γ/2 for every 0 < ε < ε 0 , where γ = γ(α) > 0 is given as in Lemma 3.2. Using Birkhoff's ergodic theorem together with the Shannon-McMillan-Breiman's theorem we deduce that for almost every x, there exists an integer N (x) ≥ 1 so that for every n ≥ N (x) where Q (n) (x) denotes the element of Q (n) which contains x. By Lemma 3.2, each mistake dynamical ball B n (g; x, ε) is covered by a collection Q (n) (g, x, ε) of e αn cylinders of the partition Q (n) . Pick N ≥ 1 large such that the following set has measure bigger than 1 − η. Since Q is finite, there exists K > 0 such that for every x ∈ E η and every n ≥ 1. We consider now the level sets E η (n, k) = {x ∈ E η : S n (g; x, ε) = k} and observe that B n (g; x, ε) ⊂ x ∈ E η (n, k), then the mistake dynamical ball B n (g; x, ε) is contained in the sub-collection of cylinders Q n ∈ Q (n) (g, x, ε) whose iteration by f k intersects any of the n-cylinders of Q (n) (x, ε). Any such cylinders Q n are naturally determined by their first k symbols and by the at most e αn possible strings following them. So, the number of those cylinders is bounded by e αn times the number of cylinders in Q (k) that intersect E η , that is, e αn Ke (h+α)k . Hence, if n ≥ N , we have This proves our claim and finishes the proof of theorem B.

4.3.
Proof of Theorem C. Here we prove the two inequalities of Theorem C independently. The first one, inspired by Lemma 2.1 in [9], does not depend on the TDS. Proof. The arguments used are modifications of the arguments in [9, Lemma 2.1] together with equations (2.2) and (2.3). We include the proof here for the reader's convenience. Let δ > 0 be small and fixed, and let N ≥ 1 be large enough so that the sets X 1 δ = {x ∈ X : log R n (g; x, Q) ≤ (h µ (f ) + δ)n, ∀n ≥ N } and X 2 δ = {x ∈ X : S n (g; x, Q) ≤ (1 + δ)n, ∀n ≥ N } have measure at least 1 − δ. Let a 1 (n) = e (hµ(f )+δ)n and a 2 (n) = (1 + δ)n, then one can use the Tchebychev's inequality and the invariance of the measure µ to deduce that the measure of the set is bounded from above by e Snφ(f j (x)) dµ ≤ e −δn e −c φ,1 n e Snφ dµ, which is summable by Lemma 3.3. Using Borel-Cantelli lemma it follows that µ-a.e.
The result follows from the arbitrariness of δ.
In the remaining of the proof assume that f : X → X is a unilateral subshift of finite type and Q is a finite Markov partition. The second lemma uses more specific characterization of free energy for equilibrium states associated to subshifts of finite type as described before in subsection 3.2.
Lemma 4.2. Assume that f : X → X is a subshift of finite type, µ = µ φ is the unique equilibrium state with respect to the Hölder continuous potential φ : X → R and Q is the partition of X into initial cylinders of length one. Then for every mistake function g, it follows that for µ-almost every x.
Proof. We assume without loss of generality that P top (φ) = 0 and φ < 0, otherwise just take ψ = φ−P top (φ) which has zero topological pressure and, since equilibrium states associated to subshifts of finite type have positive entropy then there exists some positive integer k such that S k ψ < 0. Recall that the unique equilibrium state µ is always ergodic. If φ is cohomologous to a constant, that is, φ = ϕ • f − ϕ + c for some Hölder continuous ϕ and c ∈ R then 0 = P So, it remains to consider only the case that φ is not cohomologous to a constant. Pick δ > 0 small. Since Q is a generating partition for f then one can pick N ≥ 1 large enough so that the sets X 1 δ = {x ∈ X : log R n (g; x, Q) ≥ (h µ (f ) − δ)n, ∀n ≥ N } and X 2 δ = {x ∈ X : S n (g; x, Q) ≥ (1 − δ)n, ∀n ≥ N } have measure larger than 1 − δ. Consider also a 1 (n) = e (hµ(f )−δ)n and a 2 (n) = (1 − δ)n. Since P top (φ) = 0 and µ is an equilibrium state then h µ (f ) = − φ dµ. In consequence, which, by ergodicity of µ, is larger than 1 2 a i (n)e −(hµ(f )−δ) n µ(B n (δ)) provided that n is large enough and where B n (δ) = x ∈ X : ∃y ∈ Q (n) (x) s.t. 1 n S n φ(y) − n φ dµ > δ .
The previous reasoning shows that for every i = 1, 2 and every x ∈ X i δ will satisfy lim inf It follows from the large deviations argument from [9, page 10] that the last summand is at least sup δ {δ −Î(δ)}, whereÎ(δ) = I(−h µ (f ) + δ) and I denotes the Legendre transform of the free energy at δ. Since the Legendre transform of I is the free energy c φ,µ one gets that (4.5) is bounded from below by c φ,µ (1) + h µ (f ). Then, using that (4.4) is equal to zero when i = 1 and is equal to −h µ (f ) when i = 2, the lemma follows from the choice of the sets X i δ and the arbitrariness of δ.
Finally, these lower and upper estimates together with (4.7) give that the term log Rn(g1;x,ε) τ f (Bn(g2;x,ε)×(s−ε,s+ε)) is bounded from below by n(1 − δ)h µ (f ) for every large n. The theorem is now obtained for µ-almost every x using Abramov formula (see Lemma 3.5), the arbitrariness of δ and η, taking the limit superior (respectively the limit inferior) when n tends to infinity in (4.10) and (4.11) and then the limit when ε → 0.