Email Record: Mathematical foundations of thermodynamics