Thermodynamic Formalism: The Mathematical Structure of Equil