right continuous continuous function is measurable Let $f: S \times [0, \infty)\rightarrow \mathbb{R}$ satisfy $f(x, t)$ is continuous in $x$ for each $t$ and right continuous in $t$ for each $x \in S$.  Here $S$ is a metric space.  Why is $f$ Borel measurable? (In the joint sense)  I am vaguely familiar with the idea of proof I did a long time ago for if $S$ is instead a Euclidean space, and we have full continuity instead of only right.  Then one interpolated.  But you can't do that here anyway, since $S$ is not Euclidean, and nevermind the fact that you only have right continuity anyway.  I also tried to write $f$ as a limit of joint measurable functions using the right continuity, but failed.
 A: For a separable metric space $S$, we can use the
Lemma:
Let $S$ be a separable metric space, $Y$ a topological space, and $f \colon S\times Y \to \mathbb{R}$ a function such that

*

*$s \mapsto f(s,y)$ is continuous for each $y \in Y$, and

*$y \mapsto f(s,y)$ is (Borel) measurable for each $s \in S$.

Then $f$ is measurable.
Proof:
Let $D = \{s_\nu\colon\nu\in\mathbb{N}\}$ be a countable dense subset of $S$.
For $n \geqslant 1$, let $\mathfrak{U}_n = \{B(\frac1n,\,s)\colon s \in D\}$. Since $D$ is dense, $\mathfrak{U}_n$ is an open covering of $S$. Metric spaces are paracompact, hence there is a subordinate partition of unity
$$\{\varphi_{n,\nu} \in \mathscr{C}(S,\mathbb{R}) \colon 0 \leqslant \varphi_{n,\nu}(s) \leqslant 1,\, \operatorname{supp} \varphi_{n,\nu} \subset B(\frac1n,\, s_\nu)\},\quad \sum_{\nu \in \mathbb{N}} \varphi_{n,\nu} \equiv 1,$$
with the family $\{\operatorname{supp}\varphi_{n,\nu}\colon \nu\in\mathbb{N}\}$ locally finite.
Let $g_{n,\nu}(s,y) = \varphi_{n,\nu}(s)\cdot f(s_\nu,\, y)$ and $g_n(s,\,y) = \sum\limits_{\nu \in\mathbb{N}} g_{n,\nu}(s,\,y)$.
$g_{n,\nu}$ is measurable (as the product of the measurable functions $\varphi_{n,\nu} \circ \pi_S$ and $f(s_\nu,\,\cdot) \circ \pi_Y$), and $g_n = \lim\limits_{k\to\infty} \sum\limits_{\nu = 0}^k g_{n,\nu}$ is the pointwise limit of measurable functions, hence measurable (since the family of supports is locally finite, the sum contains only finitely many non-zero terms at each point, so convergence is assured).
Now, $f = \lim\limits_{n\to\infty} g_n$ shows that $f$ is measurable.
To see the latter limit, fix $(s,\,y) \in S\times Y$, and $\varepsilon > 0$. Since $f(\cdot,\,y)$ is continuous, there is an $n \in \mathbb{Z}^+$ with $d(s,\,t) < \frac1n \Rightarrow \lvert f(t,\,y) - f(s,\,y)\rvert < \varepsilon$.
Then
$$\lvert g_n(s,\,y) - f(s,\,y)\rvert = \left\lvert\sum_{\nu \in \mathbb{N}} \varphi_{n,\nu}(s)\cdot\bigl(f(s_\nu,\,y) - f(s,\,y)\bigr) \right\rvert \leqslant \sum_{\nu \in \mathbb{N}} \varphi_{n,\nu}(s)\cdot \lvert f(s_\nu,\,y) - f(s,\,y)\bigr\rvert < \varepsilon$$
since whenever $\varphi_{n,\nu}(s) \neq 0$, we have $d(s,\,s_\nu) < \frac1n$ and hence $\lvert f(s_\nu,\,y) - f(s,\,y)\bigr\rvert < \varepsilon$.

With the above lemma, all that remains to be shown is that a right-continuous function $h \colon [0,\,\infty) \to \mathbb{R}$ is measurable.
Let $t_n(x) = (\lfloor 2^nx\rfloor + 1)/2^n$, and $h_n(x) = h(t_n(x))$. Then $t_n$ (and hence $h_n$) is constant on each interval $[m/2^n,\, (m+1)/2^n)$, and $t_n(x) \searrow x$ monotonically. Therefore $h_n$ is measurable, and the right-continuity of $h$ implies that $h_n \to h$ pointwise.

For the general case where $S$ is not assumed separable:

Lebesgue proved that every separately continuous function $f\colon \mathbb{R}\times\mathbb{R} \to \mathbb{R}$ is a pointwise limit of continuous functions. W. Rudin extended this by showing that if $X$ is a metric space, then for any topological space $Y$, every separately continuous function $f \colon X \times Y \to \mathbb{R}$ is a pointwise limit of continuous functions.

(From the abstract of Maxim R. Burke, Borel measurability of separately continuous functions, in "Topology and its Applications", 129, 1.)
I don't have a proof of Rudin's result handy, but, accepting that, we know that a separately continuous function $f \colon X \times Y \to \mathbb{R}$ is Borel measurable.
Now, don't equip the interval $[0,\,\infty)$ with the standard topology $\mathcal{T}_s$, instead use the topology $\mathcal{T}_h$ generated by the half-open intervals $[a,\,b)$.
Take that as the space $Y$. A function $g \colon \bigl([0,\,\infty),\, \mathcal{T}_h\bigr) \to \mathbb{R}$ is continuous if and only if $g \colon \bigl([0,\,\infty),\, \mathcal{T}_s\bigr) \to \mathbb{R}$ is right-continuous.
So by that result, your
$$f \colon S \times Y \to \mathbb{R}$$
is Borel-measurable.
But the Borel $\sigma$-algebra generated by $\mathcal{T}_h$ is the same as that generated by $\mathcal{T}_s$.
A: Edit: The stuff in quotes is not true. For example, there are bijections of reals whose graphs are non measurable. Thanks to Jeff for pointing this out.
"Suppose $S$ is separable locally compact metric space and $Y = [0, \infty)$ under right open topology. Let us show that if every vertical and horizontal section of $B \subseteq S \times Y$ is open then $B$ is Borel."
Fix $f: [0, \infty) \times S \rightarrow \mathbb{R}$. Define $f_n(x, t) = f(m/n, t)$ where $m, n \geq 1$ are such that $(m-1)/n \leq x < m/n$. Then $f_n$'s are all continuous. Now observe that for fixed $(x, t) \in [0, \infty) \times S$, as $n \rightarrow \infty$, $f_n(x, t) \rightarrow f(x, t)$.
