How do you prove the first law of thermodynamics?