This question comes from Theorem 19.B in page 81 of Halmos' "Measure Theory", as the image below shows.

In this theorem, we are given a function $\phi$ which is a Borel measurable function on the extended real line $\mathbb R^*$. But I can't figure out what the associated Borel set is with regard to which $\phi$ becomes a Borel measurable function. Related definitions of this book are as follows:

1)measurable space and measurable set (page 73):

That is, we must make sure two conditions are met: a)**S** is a sigma-ring, b)$\bigcup{\bf S}=X$

2)measurable function (page 76-77):

This definition shows that a measurable function must be defined on a measurable space, that is, a whole space *X* together with a sigma-ring **S**, otherwise we cannot check if $N(f)\cap f^{-1}(M)$ is measurable or not.

3)Borel measurable function (page 77-78):

In 3), Borel measurable function is defined only for the real line $\mathbb R$, but in Theorem 19.B, $\phi$ is a Borel measurable function on the extended real line $\mathbb R^\ast$. What is the sigma-ring of the measurable space involved in the above definitions? If it is just the real Borel set $\bf B$, we do not have $\bigcup\bf B=\mathbb R^*$, which violates the definition of measurable space in 1). If it is $\bf B$ along with $\{+\infty\}$ and $\{-\infty\}$, that is, ${\bf B'=B}\cup \{\{+\infty\}\}\cup\{\{-\infty\}\}$, ${\bf B'}$ is not a sigma-ring since, e.g. $[a,+\infty]=[a,+\infty)\cup\{+\infty\}$ is not in ${\bf B'}$. How to solve this problem? Thanks!