The theory of hereditarily bounded sets