  We study the informational underpinnings of thermodynamics and statistical
mechanics, using an abstract framework, general probabilistic theories, capable
of describing arbitrary physical theories. This allows one to abstract the
informational content of a theory from the concrete details of its formalism.
In this framework, we extend the treatment of microcanonical thermodynamics,
namely the thermodynamics of systems with a well-defined energy, beyond the
known cases of classical and quantum theory, formulating two necessary
requirements for a well-defined thermodynamics. We adopt the recent approach of
resource theories, where one studies the transitions between states that can be
accomplished with a restricted set of physical operations. We formulate three
different resource theories, differing in the choice of the restricted set of
physical operations. To bridge the gap between the objective dynamics of
particles and the subjective world of probabilities, one of the core issues in
the foundations of statistical mechanics, we propose four information-theoretic
axioms. They are satisfied by quantum theory and more exotic alternatives,
including a suitable extension of classical theory where classical systems
interact with each other creating entangled states. The axioms identify a class
of theories where every mixed state can be modelled as the reduced state of a
pure entangled state. In these theories it is possible to introduce
well-behaved notions of majorisation, entropy, and Gibbs states, allowing for
an information-theoretic derivation of Landauer's principle. The three resource
theories define the same notion of resource if and only if, on top of the four
axioms, the dynamics of the underlying theory satisfy a condition called
"unrestricted reversibility". Under this condition we derive a duality between
microcanonical thermodynamics and pure bipartite entanglement.
