Title: The foundations of mechanics and thermodynamics