Here is the question I am trying to solve:
Here is a solution given to me:
I have the following questions:
1- Why specifically we defined $g$ like this? what is the intuition behind this definition?
2- Why we needed the closure of $\Omega$? i.e. $\bar{\Omega}$? I also can not see why from this construction we guarantee that $\lim sup_{n \to \infty}|g(z_n)| \leq |g(\bar{z})|$?
3- What is the main idea of this solution?
4- Is there a more succinct and elegant solution than this?
Could anyone help me answer these questions please?




Assume by contradiction that $|f(z_0)|=M+\varepsilon, $ for $\varepsilon >0.$ Let $\Omega_0$ denote the connected component of $\Omega$ such that $z_0\in \Omega_0.$ There is $n_0$ satisfying $0<{1\over n_0}<{\rm dist}(z_0,\partial \Omega_0).$ Let $$\Omega_n =\left\{z\in \Omega_0\,:\, {\rm dist}(z,\partial \Omega_0)>{1\over n} \right\}$$ Every set $\Omega_n$ is open and $z_0\in \Omega_n$ for $n\ge n_0.$ Moreover $$\partial\Omega_n =\left\{z\in \Omega_0\,:\, {\rm dist}(z,\partial \Omega_0)={1\over n} \right\}$$ By the maximum modulus principle (see related statement) there exists $z_n\in \partial \Omega_n,$ i.e. $$ {\rm dist}(z_n,\partial \Omega_0)={1\over n} $$ such that $|f(z_n)|\ge M+\varepsilon.$ By compactness of $\bar{\Omega}_0$ there is a convergent subsequence $z_{n_k},$ say to $z.$ Then $$|f(z_{n_k})|\ge M+\varepsilon,\quad z_{n_k}\to z\in \partial \Omega_0\subset \partial \Omega $$ hence $$\limsup |f(z_{n_k})|\ge M+\varepsilon >M$$ which gives a contradiction.