# Poincare inequality on a domain for functions with mean value zero

Let $C=\Omega \times (0,\infty)$ for a bounded $C^1$ domain $\Omega$. Consider a function $u \in H^1(C)$. Write $u=u(x,y)$ where $x \in \Omega$ and $y \in (0,\infty).$

Is it true that if $u \in H^1(C)$ with $\int_\Omega u(x,y)dx =0$ for almost all $y$, then:

$$\int_0^\infty \int_\Omega |\nabla_x u|^2 + u_y^2 \geq C\lVert u \rVert_{H^1(C)}^2?$$ That is, Poincare inequality holds?

It seems to me the answer is trivially "yes". Since $u(\cdot,y)$ has mean value zero for a.a. $y$, we have $$\lVert{u(\cdot,y)}\rVert_{L^2(\Omega)} \leq C\lVert \nabla_x u(\cdot,y)\rVert_{L^2(\Omega)}$$ a.e. $y$ by the usual Poincare inequality on $\Omega$. Then we can just integrate since the integral ignores sets of measure zero.

My confusion is that I was told that we actually need $\int_\Omega u(x,y)dx = 0$ for all $y \in [0,\infty)$. Is there something I am missing with this? maybe some subtlety with the null sets?!