Suppose $u\in W^{1,2}(\Omega)$, where $\Omega$ is a bounded domain in $\mathbb R^n$.
In the expression of weak maximum principle (for elliptic equations), $\sup _{\partial \Omega} u$ is defined to be $\inf \{ k\in \mathbb R : (u-k)^+ \in W^{1,2}_0(\Omega) \}$, where $W^{1,2}_0 (\Omega)$ is the closure of $C^1_c(\Omega)$ in $W^{1,2}(\Omega)$.
I cannot see why there always exists such a $k$. My question is how to see the existence of such a $k$. Thanks.