My book says that if two objects collide completely inelastically, the rest mass of the composite is greater than the sum. I assume this happens because the objects heat up and this is counted in their energy. However, in other problems the book assumes the rest mass of objects/particles is the same before and after collisions. Explanations are sparse. How do you know if the rest mass changes or not?