Idempotent approach to level-2 variational principles in thermodynamical formalism | Synapse