# Thermodynamic Formalism in Neuronal Dynamics and Spike Train Statistics
## 2 Mathematical Setting of Thermodynamic Formalism
### General Properties
#### 2.1.1 Gibbs Measures  
We now define the measurable sets on \(A^{\mathbb{N}}\). Let us denote the sequence \(x_{0}\ldots,x_{n-1}\) by \(x_{0,n-1}\). The set \([x_{0,n-1}]:=\{y\in A^{\mathbb{N}}:\ y_{0}=x_{0},\ldots,y_{n-1}=x_{n-1}\}\) is called a cylinder. Cylinders define a Borel sigma algebra \(\mathcal{B}\) on \(A^{\mathbb{N}}\) (see, for instance, Chapter 1, in [80]). We are interested in probability distributions on \((A^{\mathbb{N}},\mathcal{B})\) also referred as (macro) states in physics. In the sequel we will skip the prefix \"macro\" and deal with \"states\" as probability measures on \((A^{\mathbb{N}},\mathcal{B})\). There is a special class of states \(\
u\), such that, for any measurable set \(B\subset A^{\mathbb{N}}\), \(\
u(\sigma^{-1}(B))=\
u(B)\), where \(\sigma^{-1}(B)\) stands for the set of all the pre-images of \(\sigma\) of elements of \(B\). These distributions are the set of shift-invariant probability measures denoted by \(\mathcal{M}_{\sigma}(A^{\mathbb{N}})\). In general, it is possible to consider systems where there exists some forbidden transitions between symbols. In that case, we need to consider a subset of \(A\) invariant under the dynamics, i.e., \(X\subset A^{\mathbb{N}}\), such that \(\sigma(X)=X\).  
The analogy with the spin systems in statistical mechanics at the root of the terminology \"Thermodynamic Formalism\", goes, as follows. Let \(\phi:A^{\mathbb{N}}\to\mathbb{R}\) be a continuous function, also called \"energy\" or \"potential\". Two important examples are finite range potentials, where \(\phi(x)\equiv\phi(x_{0,R-1})\), or exponentially continuous potentials with infinite range. Subsequently, the \"energy\" of a configuration of \(n\) sites based on the sequence \(x\in X\), is given by the \"Birkhoff sums\":  
\[S_{n}\phi(x):=\sum_{i=0}^{n-1}\phi\circ(\sigma x)_{i}.\]We define the measures that assign probability to the cylinder sets based on the potential function, with the so called \"Gibbs property\". There exist constants \(C>1\) and \(F(\phi)\), such that, for all \(x\in X\) and for all \(n\geq 1\):  
\[C^{-1}\leq\frac{\mu_{\phi}([x_{0,n-1}])}{\exp(\sum_{i=0}^{n-1}\phi\circ(\sigma x )_{i}-nF(\phi))}\leq C. \tag{1}\]  
The measures satisfying the condition (1) are called \"Gibbs measures\". The quantity:  
\[F(\phi)=\lim_{n\to\infty}\frac{1}{n}\log\sum_{x_{0}\cdots x_{n-1}}e^{S_{n}\phi (y)}, \tag{2}\]  
for all \(y\in[x_{0,n-1}]\)[10], is called the \"pressure\" (or free energy) of the potential \(\phi\). Observe that it does not depend on the measure \(\mu_{\phi}\) itself, only on the potential. Thus, two Gibbs measures that are associated with the same potential have the same pressure.  
Given a continuous potential \(\phi\), such that \(\operatorname{var}_{k}(\phi)\leq b\,\theta^{k}\) for some constants \(0<\theta<1\) and, \(b>0\), there is a unique shift-invariant probability measure satisfying the Gibbs property (1), [10]. Furthermore, under the same assumption for the potential, the associated Gibbs measure is mixing i.e., \(\lim_{n\to\infty}\mu\left(A\cap\sigma^{-n}B\right)=\mu(A)\mu(B)\), for any measurable set \(A,B\) and thus ergodic (A measure \(\mu\) is said to be ergodic for the dynamics \(\mathcal{G}\) if for any measurable \(\mathcal{G}\)-invariant set \(A\), \((\mathcal{G}^{-1}(A)=A)\), its measure is either \(\mu(A)=0\) or \(\mu(A)=1\). See, for instance, Chapter 3 of [79] for a detailed introduction.) (see [10; 80] for definitions and details). Moreover, two continuous potentials \(\phi\) and \(\psi\) are called cohomologous with respect to the shift \(\sigma\) (and denoted by \(\phi\sim\psi\)), if there is a continuous function \(u\) and a constant \(K\), such that:  
\[\phi=\psi+u-u\circ\sigma-K.\]  
Cohomologous potentials have the same Gibbs measure, \(\mu_{\phi}=\mu_{\psi}\).