Suppose $E$ is a subset of the unit square $[0,1] \times [0,1]$ such that each vertical line through the square intersects $E$ in a countable set and each horizontal line through the square intersects the complement of $E$ in a countable set. Prove that $E$ is not a Borel set.
This problem comes from a practice exam. I've been given the hint to use Fubini's theorem. I've thought that I should assume that $E$ is a Borel set and look at the characteristic function of $E$, but I don't know how t fill in the details.
Suppose $E$ were Borel. Then, the function $1_E$, the indicator function of $E$, should be Borel measurable, with respect to the product Borel measure $\mu$, and furthermore we should have $\int_{[0,1] \times [0,1]} 1_E d \mu = \mu(E) \leq 1$ by the fact that $E$ is a subset of the unit square.
Now, since the integral $\int_{[0,1] \times [0,1]} 1_E d \mu$ exists, we may use Fubini's theorem to conclude that $$\int_0^1 \int_0^1 1_E(x,y) dx dy = \int_0^1 \int_0^1 1_E(x,y) dy dx \tag{*}$$.
Fix $x \in [0,1]$. The function $f_x(y) = 1_E(x,y)$ defined on $[0,1]$ is zero except on a countable set, so it is zero almost everywhere. Since this applies for all $x$, we see that $\int_{0}^1 1_{E}(x,y) dy = 0$ for all $x$. Consequently, the right hand side of $(*)$ is zero.
Fix $y \in [0,1]$. The function $f_y(x) = 1_E(x,y)$ defined on $[0,1]$ is $1$, except on a countable set, so it is equal to $1$ almost everywhere. Since this applies for all $y$, we see that $\int_0^1 1_E(x,y) dx = 1$ for all $y$. Consequently, the left hand side of $(*)$ is $1$.
This contradicts $(*)$, and the only assumption made was that $E$ is Borel measurable.
You may want to see if you can find examples of such $E$, of course, otherwise this lemma may not seem very fruitful.