# Thermodynamic Formalism in Neuronal Dynamics and Spike Train Statistics
## 2 Mathematical Setting of Thermodynamic Formalism
### General Properties  
In order to study a dynamical system from the perspective of the Thermodynamic Formalism, we need, first of all, to describe the set of elements that need to be either finite or countable. Thus, continuous particle characteristics such as position, speed, or momentum do not enter in the setting we analyse here, unless one \"coarse grain\" the phase space with a finite or countable partition. Discrete particle characteristics, like spin, or symbols attached to specific features of a dynamical system, constitute the set of symbols denoted by \(A\) also referred to as the _alphabet_. Let \(A^{M}\) be the set of blocks of \(M\) symbols of the alphabet, that is, sequences of the form \(x_{0}x_{1}\ldots x_{M-1}\), where \(x_{i}\in A\), \(i=0\ldots M-1\) and \(A^{\mathbb{N}}\), is the set of right-infinite sequences of the form \(x=x_{0}x_{1}\cdots\), with \(x_{i}\in A\) for all \(i\in\mathbb{N}\). One may also consider the bi-infinite sequences \(A^{\mathbb{Z}}\), but we will mostly stick to \(A^{\mathbb{N}}\) in the sequel. One can equip the space \(A^{\mathbb{N}}\) with a distance. We associate to \(\theta\in(0,1)\) the distance \(\mathrm{d}_{\theta}\) such that \(\mathrm{d}_{\theta}(x,y)=\theta^{m}\), where \(m\) is the largest non-negative integer, such that \(x_{i}=y_{i}\) for every \(0\leq i<m\)In particular, if \(x=y\) then \(m=\infty\) and \(\mathrm{d}_{\theta}(x,x)=0\), and, by convention, if \(x_{0}\
eq y_{0}\) then \(m=0\). When considering this distance, the metric space \((A^{\mathbb{N}},\mathrm{d}_{\theta})\) is compact [10]. In order to consider time order, we introduce the time evolution in the form of a left-shift, \(\sigma:A^{\mathbb{N}}\to A^{\mathbb{N}}\), defined by \((\sigma x)_{i}=x_{i+1}\), for all \(i\in\mathbb{N}\) and any \(x\in A^{\mathbb{N}}\), where the index \(i\) refers to time. That is, the \(i\)-th symbol of \(\sigma x\) (the image of \(x\) under \(\sigma\)), corresponds to the \((i+1)\)-th symbol of the original \(x\), for all \(i\). Let us define continuous functions \(f:A^{\mathbb{N}}\to\mathbb{R}\). We introduce the modulus of continuity of \(f\):  
\[\mathrm{var}_{k}(f):=\sup\{|f(x)-f(y)|\ :\ x_{i}=y_{i},\ \text{for}\ i=0,\ldots,k-1.\},\]  
characterising the maximal variation of \(f\) on the set of infinite sequences agreeing on their first \(k\) symbols. The function \(f\) is continuous if \(\mathrm{var}_{k}(f)\to 0\) when \(k\to\infty\), and the continuity is exponential if \(\mathrm{var}_{k}(f)\to 0\) exponentially fast. A function \(f:A^{\mathbb{N}}\to\mathbb{R}\) has range \(R\) if \(f(x)\equiv f(x_{0},\ldots,x_{R-1})\), i.e., \(f\) only depends on the first \(R\) coordinates \(x_{0},\ldots,x_{R-1}\). Functions with finite range are obviously continuous. The notion of continuity, and, especially, exponential continuity is essential when studying the Thermodynamic Formalism of functions with infinite range. A useful concept for this formalism is that of the Markov partitions. Let \(\Omega\) be a general (continuous) state space and a general dynamics (a flow or a discrete time mapping) \(\mathcal{G}\) on \(\Omega\). Consider a finite covering of \(\Omega\), made by sets called rectangles, \(\mathcal{R}=\{R_{1},\ldots,R_{l}\}\) with the property that, for every pair \(i\
eq j\), \(\mathrm{int}(R_{i})\cap\mathrm{int}(R_{j})=\emptyset\), and such that the closure of the image set \(\mathcal{G}(R_{i})\) equals a union of closures of sets in \(\mathcal{R}\). There is a specific construction for different dynamical systems (for details we refer the reader to [10]). This construction allows one to make a natural coding for the state space, where the trajectories of the dynamical systems correspond to the sequences of symbols of the labels identifying the sets \(R_{i}\). Rectangles allow for us to partition a continuous phase space into a discrete finite partition. For hyperbolic dynamical systems, each point in the phase space admits local stable or unstable manifolds with a non zero diameter.