homomorphisms and entropy

One informal way to think of homomorphisms in math is that they are maps that do not "create information out of thin air". Isomorphisms further do not destroy information. The terminal object (e.g. the trivial group, the singleton topological space, or the trivial vector space) is the "highest-entropy state", where all distinctions disappear and reaching it is heat death.

(there is also an alternate, maybe dual/opposite analogy I can make based on presentations — here, the the highest-entropy state is the "free object" e.g. a discrete topological space or free group, and each constraint (e.g. a5 = 1) is information — morphisms are "observations". In this picture we see knowledge as encoded by identities rather than distinctions — we may express our knowledge as a presentation like: X1, …Xn ∣ X3 = 4, X2 − X1 = 2⟩, and morphisms cannot be concretely understood as functions on sets but rather show a tree of possible outcomes, like maybe you believe in Everett branches or whatever.)

In general if you postulate:

Then the second law is just a tautology. The second law we all know and love comes from taking the universe to be a symplectic manifold, and time-evolution as governed by symplectomorphisms. And the point of Liouville's theorem is really to clarify/physically motivate what the Jaynesian "uniform prior" should be. Here is some more stuff, from Yuxi Liu's statistical mechanics article:

In almost all cases, we use the uniform prior over phase space. This is how Gibbs did it, and he didn’t really justify it other than saying that it just works, and suggesting it has something to do with Liouville’s theorem. Now with a century of hindsight, we know that it works because of quantum mechanics: We should use the uniform prior over phase space, because phase space volume has a natural unit of measurement: hN, where h is Planck’s constant, and 2N is the dimension of phase space. As Planck’s constant is a universal constant, independent of where we are in phase space, we should weight all of the phase space equally, resulting in a uniform prior.