I have seen a lot of questions trying to show that graphs are measurable. However, I'm asking for the other direction. This is the question:
Suppose $(X, \mathcal{S})$ is a measurable space and $f : X \to [ 0, \infty ] $ is a function. Let $\mathcal{B}$ denote the σ-algebra of Borel subsets of $( 0, \infty )$. Prove that $U_f \in S \otimes \mathcal{B}$ if and only if $f$ is an $\mathcal{S}$-measurable function.
Definition of $U_f$:
Suppose $X$ is a set and $f : X \to [ 0, ∞ ]$ is a function. Then the region under the graph of $f$ , denoted $U_f$ , is defined by $U_f = \{( x, t ) \in X \times ( 0, \infty ) : 0 < t < f ( x )\} $.
I'm only asking how to show the forward direction: if $U_f \in S \otimes \mathcal{B}$ then $f$ is an $\mathcal{S}$-measurable function.
Here $\mathcal{S} \otimes \mathcal{B}$ is defined as the smallest $\sigma$-algebra that contains $\{A \times B: A \in \mathcal{S}, B \in \mathcal{B} \}$.
I'm trying to show that $f^{-1}((a, \infty)) \in \mathcal{S}$, but I'm completely stuck. Can I get some help?