Solution (source code)

= Solution
{c}

The coefficient signs alone do not imply the assertion as printed. Two interior nodes can have rows $L_h\psi_1=\psi_2-\psi_1$ and $L_h\psi_2=\psi_1-\psi_2$, with a separate boundary node. Taking interior values one and boundary value zero satisfies every stated coefficient inequality and $L_h\psi=0$, but its maximum is not on the boundary. Connectedness of the geometric domain does not ensure connectedness of this stencil graph.

The usual extra assumption is that every interior node has a path of positive stencil coefficients to a prescribed boundary node. Under this assumption let $M\geq0$ be the global maximum and suppose an interior node $p$ attains it. Then
$$
0\leq L_h\psi_p
=\sum_{r\ne p}c_{p,r}(\psi_r-M)
+\left(\sum_{r\ne p}c_{p,r}-c_{p,p}\right)M\leq0.
$$
All summands are nonpositive, so equality forces $\psi_r=M$ at every neighbor with $c_{p,r}>0$. Propagate along a path to the boundary to find a boundary node with value $M$. This proves \b[the <discrete maximum principle> under <boundary-reaching stencil connectivity>], and exhibits why the literal hypotheses need that qualification.