question about the proof for the Key Lemma for Alexandroff maximum principle LEMMA Suppose $g \in L_{\text {loc }}^{1}\left(\mathbb{R}^{n}\right)$ is nonnegative. Then for any $u \in C(\bar{\Omega}) \cap$ $C^{2}(\Omega)$ there holds
$$
\int_{\tilde{M}_{(0)}} g \leq \int_{\Gamma^{+}} g(D u)\left|\operatorname{det} D^{2} u\right|
$$
where $\Gamma^{+}$is the upper contact set of $u$ ( that is $\Gamma^{+}=\{y \in \Omega: u(x) \leq u(y)+D u(y) \cdot(x-y) \text { for any } x \in \Omega\} \text {. }$) and $\tilde{M}=\left(\sup _{\Omega} u-\sup _{\partial \Omega} u^{+}\right) / d$ with $d=\operatorname{diam}(\Omega)$

PROOF OF LEMMA : Without loss of generality we assume $u \leq 0$ on $\partial \Omega$(this is because that the relation it's preserved by the translation.). Set $\Omega^{+}=\{u>0\}$. By the area formula for $D u$ in $\Gamma^{+} \cap \Omega^{+} \subset \Omega$, we have
$$
\int_{D u\left(\Gamma^{+} \cap \Omega^{+}\right)} g \leq \int_{\Gamma^{+} \cap \Omega^{+}} g(D u)\left|\operatorname{det}\left(D^{2} u\right)\right|, \tag{1}
$$
where $\left|\operatorname{det}\left(D^{2} u\right)\right|$ is the Jacobian of the map $D u: \Omega \rightarrow \mathbb{R}^{n}$. In fact, we may consider $\chi_{\varepsilon}=D u-\varepsilon$ Id $: \Omega \rightarrow \mathbb{R}^{n}$. Then $D \chi_{\varepsilon}=D^{2} u-\varepsilon I$, which is negative definite in $\Gamma^{+}$. Hence by the change-of-variable formula we have
$$
\int_{\chi_{\varepsilon}\left(\Gamma^{+} \cap \Omega^{+}\right)} g=\int_{\Gamma^{+} \cap \Omega^{+}} g\left(\chi_{\varepsilon}\right)\left|\operatorname{det}\left(D^{2} u-\varepsilon I\right)\right|, \tag{2}
$$
which implies (1) if we let $\varepsilon \rightarrow 0$. ...

I can't work out the proof of this lemma, there are two question:

*

*why the change of variable formula holds? I found a post here.However it's unclear $\Gamma^+ \cap \Omega^+$ is convex or not?

*why after taking the limit the equality (2) becomes inequality (1)?

 A: I'll try to speak to your stated questions 1 and 2, assuming you are okay with $D\chi_{\epsilon}$ being negative definite in $\Gamma^{+}$, I've also taken the liberty to include a calculation at the end of this answer trying to justify this.
$\textbf{For question 1}$:
I believe we can conclude $\chi_{\epsilon}$ is injective in our domain of interest as follows:
Suppose that $y_1,y_2 \in \Gamma^{+}$ are such that $\chi_{\epsilon}(y_1) = \chi_{\epsilon}(y_2)$, which is equivalent to saying that $Du \restriction_{y_1} - \epsilon y_1 = Du \restriction_{y_2} - \epsilon y_2$.
Now this implies $Du \restriction_{y_1} \cdot (y_2 - y_1) - \epsilon y_1 \cdot (y_2 - y_1) = Du \restriction_{y_2} \cdot (y_2 - y_1) - \epsilon y_2 \cdot (y_2-y_1)$, rearranging further this gives $Du \restriction_{y_1} \cdot(y_2 - y_1) + Du \restriction_{y_2} \cdot (y_1-y_2) = -\epsilon ||y_1 - y_2||^2$ .
The LHS of the last line in the above paragraph is $\geq u(y_2) - u(y_1) + u(y_1) - u(y_2) = 0$ by definition of $\Gamma^{+}$, but this implies that $-\epsilon ||y_1 - y_2||^2 \geq 0$ for $\epsilon > 0$, so $||y_1-y_2|| = 0$, i.e. $y_1 = y_2$.
Thus $\chi_{\epsilon}$ is a diffeomorphism onto its image which gives equality (2).
$\textbf{For question 2}$:
I believe the equality becomes the desired inequality by a direct application of Fatou's lemma, since everything is positive.
$\textbf{Calculation justifying negative definiteness}$
It is sufficient to show that $\Delta(h) = \frac{h^t D^2u \restriction_{y} h}{h^t h} < 0$ for all $h$ sufficiently small, and for any $y \in \Gamma^{+}$.
To this end, write $Du \restriction_{y+h} - Du \restriction_{y} = (D^2 u \restriction_{y})(h) + \underline{o}(||h||)$  (the underlined term is just supposed to indicate it is really a vector)
and $u(y+h) - u(y) - Du \restriction_{y+h} \cdot h = o(||h||^2)$ where the latter follows by a Taylor expansion and the former by definition of derivative.
Now substitute the expression for $Du \restriction_{y+h}$ obtained via a Taylor expansion into the first expression, and then apply the fact that $y \in \Gamma^{+}$ and the Cauchy-Schwarz inequality, to derive an inequality of the form $\Delta(h) \leq -\frac{o(||h||^2)}{||h||^2}$, which yields the result.
