Mathematical laws describe conditions under which physical self-organization leads to an increase in complexity