[proofplan]
We first verify that the acceptance function and the transition formula define a genuine Markov kernel. The core of detailed balance is the pointwise identity saying that the accepted proposal mass from $x$ to $y$, after multiplication by the target density, is the minimum of the two directed proposal weights. We then integrate this identity over product-measurable sets to obtain symmetry of the accepted-move part, and handle the rejection term separately because it is concentrated on the diagonal. Finally, invariance follows by integrating the detailed balance identity over $E\times A$.
[/proofplan]
[step:Verify that the acceptance rule is measurable and bounded]
Define the [measurable functions](/page/Measurable%20Functions) $a,b:E\times E\to[0,\infty)$ by
\begin{align*}
a(x,y):=\gamma(x)q(x,y)
\end{align*}
and
\begin{align*}
b(x,y):=\gamma(y)q(y,x).
\end{align*}
The map $(x,y)\mapsto (y,x)$ is $\mathcal E\otimes\mathcal E$-measurable, so $b$ is measurable. On the measurable set $\{(x,y):a(x,y)>0\}$, the quotient $b/a$ is measurable, and therefore $\min\{1,b/a\}$ is measurable. On the complementary measurable set $\{a=0\}$, $\alpha=1$. Hence $\alpha:E\times E\to[0,1]$ is $\mathcal E\otimes\mathcal E$-measurable.
[guided]
The only subtlety in the definition of $\alpha$ is that it is defined by cases, and the quotient is used only where the denominator is positive. We encode the denominator and numerator as functions
\begin{align*}
a:E\times E\to[0,\infty), \qquad (x,y)\mapsto \gamma(x)q(x,y)
\end{align*}
and
\begin{align*}
b:E\times E\to[0,\infty), \qquad (x,y)\mapsto \gamma(y)q(y,x).
\end{align*}
The function $a$ is measurable because it is the product of the measurable function $(x,y)\mapsto \gamma(x)$ with the measurable proposal density $q$. The function $b$ is measurable because $(x,y)\mapsto (y,x)$ is measurable on $E\times E$, so $(x,y)\mapsto q(y,x)$ is measurable, and $(x,y)\mapsto \gamma(y)$ is measurable.
Now the set $\{a>0\}$ is measurable. On this set, the quotient $b/a$ is a measurable nonnegative function, and applying the continuous map $t\mapsto \min\{1,t\}$ preserves measurability. On $\{a=0\}$ the value is the constant $1$. Thus the piecewise definition gives a measurable function $\alpha:E\times E\to[0,1]$.
[/guided]
[/step]
[step:Show that the transition formula defines a Markov kernel]
For $x\in E$, define the rejection probability $r:E\to[0,1]$ by
\begin{align*}
r(x):=1-\int_E q(x,z)\alpha(x,z)\,d\lambda(z).
\end{align*}
Since $0\le \alpha\le 1$ and $\int_E q(x,z)\,d\lambda(z)=1$, we have
\begin{align*}
0\le \int_E q(x,z)\alpha(x,z)\,d\lambda(z)\le 1.
\end{align*}
Thus $0\le r(x)\le 1$.
For each fixed $x\in E$, define the accepted-proposal measure $Q_x$ on $(E,\mathcal E)$ by
\begin{align*}
Q_x(A):=\int_A q(x,y)\alpha(x,y)\,d\lambda(y), \qquad A\in\mathcal E.
\end{align*}
The measure $Q_x$ is finite and has total mass at most $1$. Let $\delta_x$ denote the Dirac probability measure at $x$, defined by $\delta_x(A):=\mathbb 1_A(x)$ for $A\in\mathcal E$. Then the map $A\mapsto \mathbb 1_A(x)r(x)$ is the finite measure $r(x)\delta_x$. Hence $A\mapsto P(x,A)$ is a probability measure because
\begin{align*}
P(x,E)=\int_E q(x,y)\alpha(x,y)\,d\lambda(y)+r(x)=1.
\end{align*}
For each $A\in\mathcal E$, the parameterized integral map
\begin{align*}
x\mapsto \int_A q(x,y)\alpha(x,y)\,d\lambda(y)
\end{align*}
is measurable by Tonelli's theorem and measurability of parameterized nonnegative integrals, using the $\sigma$-finiteness of $\lambda$. The same argument with $A=E$ shows that $r:E\to[0,1]$ is measurable. Since $\mathbb 1_A:E\to\{0,1\}$ is measurable, the map $x\mapsto \mathbb 1_A(x)r(x)$ is measurable. Therefore $x\mapsto P(x,A)$ is measurable, so $P$ is a Markov kernel.
[/step]
[step:Convert the acceptance rule into a symmetric pointwise identity]
For every $(x,y)\in E\times E$,
\begin{align*}
\gamma(x)q(x,y)\alpha(x,y)=\min\{\gamma(x)q(x,y),\gamma(y)q(y,x)\}.
\end{align*}
Indeed, if $\gamma(x)q(x,y)>0$, then multiplying the definition of $\alpha(x,y)$ by $\gamma(x)q(x,y)$ gives the displayed identity. If $\gamma(x)q(x,y)=0$, then the left-hand side is $0$, while the minimum is also $0$.
Interchanging $x$ and $y$ gives
\begin{align*}
\gamma(y)q(y,x)\alpha(y,x)=\min\{\gamma(y)q(y,x),\gamma(x)q(x,y)\}.
\end{align*}
The two minima are equal, hence
\begin{align*}
\gamma(x)q(x,y)\alpha(x,y)=\gamma(y)q(y,x)\alpha(y,x)
\end{align*}
for every $(x,y)\in E\times E$.
[guided]
This is the algebraic heart of the Metropolis-Hastings construction. We want to compare the target-weighted proposal density from $x$ to $y$ with the target-weighted proposal density from $y$ to $x$. The acceptance probability was chosen precisely so that both accepted masses become the smaller of the two directed proposal weights.
Fix $(x,y)\in E\times E$. Define
\begin{align*}
a:=\gamma(x)q(x,y)
\end{align*}
and
\begin{align*}
b:=\gamma(y)q(y,x).
\end{align*}
If $a>0$, then
\begin{align*}
\alpha(x,y)=\min\left\{1,\frac{b}{a}\right\}.
\end{align*}
Multiplying by $a$ gives
\begin{align*}
a\alpha(x,y)=a\min\left\{1,\frac{b}{a}\right\}=\min\{a,b\}.
\end{align*}
Returning to the definitions of $a$ and $b$, this says
\begin{align*}
\gamma(x)q(x,y)\alpha(x,y)=\min\{\gamma(x)q(x,y),\gamma(y)q(y,x)\}.
\end{align*}
If $a=0$, then $\gamma(x)q(x,y)=0$, so
\begin{align*}
\gamma(x)q(x,y)\alpha(x,y)=0.
\end{align*}
The minimum of $0$ and $b$ is also $0$, and therefore the same identity holds in the zero-denominator case:
\begin{align*}
\gamma(x)q(x,y)\alpha(x,y)=\min\{\gamma(x)q(x,y),\gamma(y)q(y,x)\}.
\end{align*}
Now repeat the identical computation with the ordered pair $(y,x)$ in place of $(x,y)$. This gives
\begin{align*}
\gamma(y)q(y,x)\alpha(y,x)=\min\{\gamma(y)q(y,x),\gamma(x)q(x,y)\}.
\end{align*}
The two displayed minima have the same two entries, so they are equal. Hence
\begin{align*}
\gamma(x)q(x,y)\alpha(x,y)=\gamma(y)q(y,x)\alpha(y,x).
\end{align*}
This identity is exactly detailed balance for accepted moves.
[/guided]
[/step]
[step:Integrate the pointwise identity to balance the accepted moves]
Define the accepted-move measure $M$ on $(E\times E,\mathcal E\otimes\mathcal E)$ by
\begin{align*}
M(B):=\frac{1}{Z}\int_E\int_E \mathbb 1_B(x,y)\gamma(x)q(x,y)\alpha(x,y)\,d\lambda(y)\,d\lambda(x).
\end{align*}
Define the coordinate-swap map $S:E\times E\to E\times E$ by $S(x,y)=(y,x)$. For $B\in\mathcal E\otimes\mathcal E$, Tonelli's theorem applies to the nonnegative measurable integrands, and the pointwise identity gives
\begin{align*}
M(B)=\frac{1}{Z}\int_E\int_E \mathbb 1_B(x,y)\gamma(y)q(y,x)\alpha(y,x)\,d\lambda(y)\,d\lambda(x).
\end{align*}
The product measure $\lambda\otimes\lambda$ is invariant under the coordinate-swap map $S$. Indeed, for measurable rectangles $C\times D$ with $C,D\in\mathcal E$, one has
\begin{align*}
(\lambda\otimes\lambda)(S^{-1}(C\times D))=(\lambda\otimes\lambda)(D\times C)=\lambda(D)\lambda(C)=\lambda(C)\lambda(D)=(\lambda\otimes\lambda)(C\times D),
\end{align*}
and the equality extends from rectangles to $\mathcal E\otimes\mathcal E$ by uniqueness of the product measure. Applying this invariance to the nonnegative measurable function $(x,y)\mapsto \mathbb 1_B(x,y)\gamma(y)q(y,x)\alpha(y,x)$ gives
\begin{align*}
M(B)=\frac{1}{Z}\int_E\int_E \mathbb 1_B(y,x)\gamma(x)q(x,y)\alpha(x,y)\,d\lambda(y)\,d\lambda(x).
\end{align*}
The last integral is $M(S^{-1}B)$, because $\mathbb 1_{S^{-1}B}(x,y)=\mathbb 1_B(y,x)$. Therefore $M(B)=M(S^{-1}B)$ for every $B\in\mathcal E\otimes\mathcal E$. This proves that the accepted-move part of $\pi(dx)P(x,dy)$ is invariant under swapping the two coordinates.
[/step]
[step:Show that the rejection mass is symmetric on the diagonal]
Define the diagonal map $\Delta:E\to E\times E$ by $\Delta(x)=(x,x)$. The map $\Delta$ is $(\mathcal E,\mathcal E\otimes\mathcal E)$-measurable because for measurable rectangles $C\times D$ with $C,D\in\mathcal E$ one has $\Delta^{-1}(C\times D)=C\cap D$, and the measurable rectangles generate $\mathcal E\otimes\mathcal E$. Define the rejection measure $R$ on $(E\times E,\mathcal E\otimes\mathcal E)$ by
\begin{align*}
R(B):=\frac{1}{Z}\int_E \mathbb 1_B(x,x)\gamma(x)r(x)\,d\lambda(x).
\end{align*}
Since $S(\Delta(x))=\Delta(x)$ for every $x\in E$, we have $\mathbb 1_{S^{-1}B}(x,x)=\mathbb 1_B(x,x)$. Hence
\begin{align*}
R(S^{-1}B)=\frac{1}{Z}\int_E \mathbb 1_{S^{-1}B}(x,x)\gamma(x)r(x)\,d\lambda(x)=\frac{1}{Z}\int_E \mathbb 1_B(x,x)\gamma(x)r(x)\,d\lambda(x)=R(B).
\end{align*}
Thus the rejection part is also invariant under swapping coordinates.
[/step]
[step:Combine the accepted and rejected parts to obtain reversibility]
For every $B\in\mathcal E\otimes\mathcal E$, the joint measure generated by $\pi(dx)P(x,dy)$ decomposes as
\begin{align*}
\int_E P(x,B_x)\,d\pi(x)=M(B)+R(B).
\end{align*}
The swapped joint measure is the value of the same measure on $S^{-1}B$, namely
\begin{align*}
\int_E P(y,B^y)\,d\pi(y)=M(S^{-1}B)+R(S^{-1}B).
\end{align*}
By the accepted-move symmetry and the diagonal rejection symmetry,
\begin{align*}
M(B)+R(B)=M(S^{-1}B)+R(S^{-1}B).
\end{align*}
Therefore
\begin{align*}
\int_E P(x,B_x)\,d\pi(x)=\int_E P(y,B^y)\,d\pi(y)
\end{align*}
for every $B\in\mathcal E\otimes\mathcal E$. This is reversibility of $P$ with respect to $\pi$.
[/step]
[step:Integrate detailed balance over one coordinate to prove invariance]
Let $A\in\mathcal E$, and define $B:=E\times A\in\mathcal E\otimes\mathcal E$. Then $B_x=A$ for every $x\in E$. Also, $B^y=E$ when $y\in A$, and $B^y=\varnothing$ when $y\notin A$. Using reversibility for this set $B$ gives
\begin{align*}
\int_E P(x,A)\,d\pi(x)=\int_E P(y,B^y)\,d\pi(y).
\end{align*}
Since $P(y,E)=1$ and $P(y,\varnothing)=0$ for every $y\in E$, the right-hand side is
\begin{align*}
\int_E \mathbb 1_A(y)\,d\pi(y)=\pi(A).
\end{align*}
Thus
\begin{align*}
\int_E P(x,A)\,d\pi(x)=\pi(A)
\end{align*}
for every $A\in\mathcal E$, so $\pi$ is invariant for $P$.
[/step]