show a function is Borel measurable Prove the continuous function $g: \mathbb{R}^n \rightarrow \mathbb{R}$ is Borel measurable in the following two steps:
First let $G = \{U \subset \mathbb{R} \vert g^{-1}(U) \text{is Borel} \}$
(a) show all open sets are in $G$.
(b) show $G$ is a $\sigma$-algebra.
So for (a) at least, take an arbitrary open set in $\mathbb{R}$ call it $V$, then $V$ can be written as a countable union of standard basis elements, that is,
$V = \bigcup_{j=1}^\infty (a_j,b_j)$ where $a_j \leq b_j$ are real numbers. Then by continuity of $g$, we have that the pullback $g^{-1}(V)$ is open in $\mathbb{R}{^n}$. Then this pullback is the union of open balls in $n$ dimension. How do I show something is a Borel set? I know my set can be generated by open sets and I know Borel sets are elements of the Borel $\sigma$-algebra which is sort of like a topological space (in that it has an axiomatic definition of certain closures of its elements) except that now the entire space need be in the collection of subsets, together with countable unions and intersections, and complements. Where do I go from here? So for (b) and I supposed to show these axioms hold for members of $G$?
 A: The question asks to prove the continuous function $g: \mathbb{R}^n \rightarrow \mathbb{R}$ is Borel measurable in the following two steps:
First let $G = \{U \subset \mathbb{R} \:\vert\: g^{-1}(U) \text{ is Borel } \}$
(a) show all open sets are in $G$.
(b) show $G$ is a $\sigma$-algebra.
Proof: Let us prove (a).
Since $g: \mathbb{R}^n \rightarrow \mathbb{R}$ is continuous, we have that, for all $A$ open subset of $\mathbb{R}$, $g^{-1}(A)$ is an open subset  of $\mathbb{R}$. So, in particular  $g^{-1}(A)$ is Borel. In other words, all open sets are in $G$.
Let us prove (b).
(b.1) Since $g^{-1}(\emptyset)=\emptyset$  and $\emptyset$ is Borel, we have that $g^{-1}(\emptyset)$ is Borel. So $\emptyset \in G$.
(b.2) Suppose that $E \in G$. Then $g^{-1}(E)$ is Borel. So $g^{-1}(E)^c$ is Borel. Since
$$ g^{-1}(E^c)= g^{-1}(\mathbb{R} \setminus E) = g^{-1}(\mathbb{R}) \setminus g^{-1}(E)= \mathbb{R}^n \setminus g^{-1}(E) = g^{-1}(E)^c$$
we have that $g^{-1}(E^c)$ is Borel. So, $E^c \in G$.
(b.3) Let $\{E_j\}_j$ be a sequence of sets in $G$. Then, for all $j$, $g^{-1}(E_j)$ is Borel. So $\bigcup_j g^{-1} (  E_j  )  $ is Borel. Since
$$ g^{-1} \left ( \bigcup_j E_j  \right)= \bigcup_j g^{-1} (  E_j  )  $$
we have that $g^{-1} \left ( \bigcup_j E_j  \right)$ is Borel. So $ \bigcup_j E_j  \in G$.
So $G$ is a $\sigma$-algebra.
