I once saw a mathematical explanation of the second law of thermodynamics. The statement was something like this: there is a mapping $f$ from the set of thermodynamic states $S$ to itself, and a volume measure $v$ defined on $S$; if $f$ is a physically possible mapping that actually describes the evolution of the space in time, then for any set $A\subset S$, $$v(A)\lt v(f(A)).$$
I am remembering this wrong, but I hope it will be recognizable, because I'd like to read more about it, and I can't remember what it is called.