Who discovered the link between mechanical work and the reduction of heat?