Let $f:X\times Y \to \mathbb{R}$ be a continuous function, here $X$ and $Y$ are connected and simply connected separable metric spaces. Let $U\subseteq Y$ be non-empty and open. I want to show that the set $$ Z = \left\{ x \in X: \, (\exists y \in U)\, f(x,y) \geq 0 \right\}, $$ is Borel measurable but I'm totally stumped. I've tried to represent this as $$ Z = \bigcup_{y \in U} f^{-1}(\cdot,y)[[0,\infty)], $$ but the uncountable union of closed sets needs not be closed.... So I'm abit stumped.
I feel that since $U$ is open, and not closed, we can reduce the argument to a countable dense subset of $U$ (since the separability of $Y$), but I'm not sure how...
Let $P=f^{-1}[[0,\infty)]$ which is closed in $X \times Y$. Then $Z= \pi_X[P \cap (X \times U)]$ is an analytic set and as such Lebesgue measurable. I think it's safer to assume $X,Y$ are Polish spaces, instead of (irrelevant) connectedness assumptions.