dynamics $T$ is in some sense hyperbolic (e.g., a shift) and the function $f$ is regular enough (e.g., Hölder) then subactions $h$ do exist. Results of this type are sometimes called *Mañé lemmas*; see [@CG; @Sav; @CLT; @Bousch_Walters; @Bousch_amphi] for various versions and approaches, and see [@Bochi_ICM Prop. 2.1] for a negative result. Important applications include [@Bousch_Mairesse; @Contreras]. The study of invariant measures that attain that supremum in is called *ergodic optimization*; we refer the reader to [@Jenkinson_survey; @Jenkinson_survey_new; @Garibaldi_book] for much more information. For a discussion of ergodic optimization in a more general context, including optimization of Lyapunov exponents, see [@Bochi_ICM].

When $\dim {\mathbb{E}}> 1$, commutativity is lost and much less is known. The most studied situation is the following one. Let $T \colon X \to X$ be the full shift on $N$ symbols, defined on the space $X \coloneqq \{0,1,\dots,N-1\}^{\mathbb{Z}}$. Given a $N$-tuple $(A_0,\dots,A_{N-1})$ of invertible $d \times d$ matrices, let $F \colon X \to {\mathit{GL}}(d,{\mathbb{R}})$ be given by $F(x) = A_{x_0}$. We say that $(T,F)$ is a *one-step cocycle*. Let $\Phi$ the associated automorphism . In that case, the quantity $e^{\beta(\Phi)}$ is known as the *joint spectral radius* of the set $\{A_0,\dots,A_{N-1}\}$.[^3] It was introduced by Rota 