Toward a formalization of demographic transition theory