From a question in PDEs by Evans, if we have that $U$ is connected and $u\in W^{1,p}(U)$ satisfies $Du = 0$ almost everywhere in $U$, then $u$ is constant in $U$ almost everywhere. The proof I've beens shown is as follows:
*Take a compact set $K \in U$, then $u \in L^1(K)$.
Then the weak derivative $D(u \ast \eta_\epsilon)=Du \ast \eta_\epsilon = 0$. Since $U$ is connected and $u \ast \eta_\epsilon$ is smooth, then $u \ast \eta_\epsilon$ is equal to a constant $c_\epsilon$ which converges to $u$ in $L^1(K)$ as $\epsilon \rightarrow 0$. Then {$c_{1/n}$} forms a cauchy sequence
*since K has finite measure
that converges to a constant $c$. Therefore, $u = c$ almost everywhere in $K$.
*and hence in $U$. $\square$
My issues with the proof are everything I starred. Why does $u$ becomes $L^1$ on a compact set? Why does the fact that $K$ has finite measure matter (I see why it has finite measure though, it's compact so that is clear)? Why does $u=c$ in K imply that $u=c$ in $U$; if U was, say, an open ball I don't see how this could be the case.