TITLE: Can the integration of integrable sections of a measurable function of two variables ever result in a non-measurable function?
QUESTION [10 upvotes]: I spent some time searching MathOverflow for a problem that would resemble the one given below, but it turned out to be a rather futile endeavor. I was led to this problem in my attempts to construct a counterexample refuting a result that had already been published in a peer-reviewed article.

Problem. Find measure spaces $ (X,\mathcal{S},\mu) $ and
    $ (Y,\mathcal{T},\nu) $, at least one of which is not $ \sigma $-finite, and
    an $ (\mathcal{S} \otimes \mathcal{T}) $-measurable function
    $ f: X \times Y \to \mathbb{R}_{\geq 0} $ with the following properties:

The function $ f(x,\bullet): Y \to \mathbb{R}_{\geq 0} $ belongs to
  $ {L^{1}}(Y,\mathcal{T},\nu) $ for every $ x \in X $.
The function
  $ \left\{ \begin{matrix}
    X & \to     & \mathbb{R}_{\geq 0} \\
    x & \mapsto & \displaystyle \int_{Y} f(x,\bullet) ~ \mathrm{d}{\nu}
    \end{matrix} \right\}
  $
  is not $ \mathcal{S} $-measurable.


Does anyone know if this problem can even be solved? Thank you very much for your time!

REPLY [4 votes]: Let $\mathcal{B}$ denote the class of Borel subsets of $[0,1]$ and let $A \subseteq [0, 1]$ be a non Borel set. Let $f$ be the characteristic function of the graph of a bijection from $A$ to $[0, 1]$. Then $f$ is $\mathcal{B} \otimes \mathcal{P}([0, 1])$-measurable (check) and the map $x \mapsto \int f(x, y) d\mu(y)$ is non-zero precisely on $A$ where $\mu$ is counting measure.
Edit: I was asked to provide more details so here they are.
Suppose $W \subseteq \mathbb{R}^2$ is such that every horizontal section $W^y = \{x : (x, y) \in W\}$ is closed. Then $W \in \mathcal{B} \otimes \mathcal{P}(\mathbb{R})$. To see this, define, for each interval $J$ with rational endpoints, $Y_J = \{y : W^y \cap J = \phi\}$. As each $W^y$ is closed, we have
$$
W = \mathbb{R}^2 \Big\backslash \bigcup \{J \times Y_J : J \text{ is an interval with rational endpoints}\} \in \mathcal{B} \otimes \mathcal{P}(\mathbb{R}).
$$
It follows that the graph of every partial bijection on $\mathbb{R}$ is in $\mathcal{B} \otimes \mathcal{P}(\mathbb{R})$.
Now choose any non Borel set $A \subseteq \mathbb{R}$ and an injection $i: A \to \mathbb{R}$. Define $f: \mathbb{R}^2 \to \mathbb{R}$ to be the characteristic function of the graph of $i$. Let $\mu$ be the counting measure on $\mathbb{R}$. The map $x \mapsto \int f(x, y) d\mu(y)$ is precisely the characteristic function of $A$ and hence is non-Borel.