Rewritten the least Herbrand model function