Let $\Omega\subset \mathbb{R}^n$ open and bounded. The Poincaré inequality $$\|u\|_p \le C \|\nabla u\|_p$$ ($\|\cdot\|_p$ denotes the usual $L^p(\Omega)$-norm; the Lebesgue measure shall be used here) is valid in the following cases:
- $u$ is zero on $\partial\Omega$ (in the $W^{1,p}$-sense)
- $u$ has an average value of zero
- $\mu := |\{u=0\}| > 0$ (Lebesgue measure), with a constant that blows up as $\mu\to 0$.
Of course the inequality cannot hold in general (take $u$ to be a constant function), but the only obstruction seems to be that $u$ can be far away from zero. Therefore it should be true that the inequality holds whenever $u$ is zero somewhere in $\Omega$ (in a suitable sense, for example, zero is contained in the essential range of $u$).
So the question is: Is there a version of the inequality for this case?