A note on distributional semi-Riemannian geometry.
The entropy of an ideal gas, both in the case of classical and quantum particles, is maximised when the number particle density, linear momentum and energy are fixed. The dispersion law energy to momentum is chosen as linear or quadratic, corresponding to non-relativistic or relativistic behaviour.