Solution (source code)

= Solution

The <strong maximum principle for subharmonic functions> is: on a connected open domain, the canonical <upper semicontinuous> representative of a subharmonic function cannot attain a finite global maximum at an interior point unless it is constant. A local maximum instead forces constancy on an appropriate neighbourhood; it alone does not assert constancy on the whole domain unless that value is a global maximum.

Suppose $u\leq M$ on $\Omega$ and $u(x_0)=M$. For every sufficiently small ball centred at $x_0$, the subharmonic mean inequality gives
$$
M=u(x_0)\leq\frac1{|B_r|}\int_{B_r(x_0)}u\leq M.
$$
The nonnegative function $M-u$ has integral zero, so $u=M$ almost everywhere on that ball. Its canonical representative is then $M$ at every point of the ball, by taking still smaller local averages.

The maximum set $E=\{x:u(x)=M\}$ is consequently open by the same argument at each of its points. It is closed relative to $\Omega$, because upper semicontinuity makes its complement $\{u<M\}$ open. It is nonempty, and <connectedness> gives $E=\Omega$. Therefore \b[$u\equiv M$]. This proves the principle, including its representative and <connectedness> hypotheses. Arbitrary representatives do not satisfy it: the function equal to zero almost everywhere but assigned value one at the origin has zero distributional Laplacian and an artificial pointwise maximum.