Solution (source code)

= Solution

Orient each <edge> both ways. A <unit flow> $j$ from $x$ to $y$ is antisymmetric, $j(u,v)=-j(v,u)$, with <divergence of a flow> equal to $+1$ at $x$, $-1$ at $y$ and zero elsewhere. Its energy is
$$
\mathcal E_r(j)=\sum_{e\in E}r_ej(e)^2,
$$
where each unoriented <edge> is counted once. Put $c_e=1/r_e$. The electrical unit current is $i(u,v)=c_{uv}(V(u)-V(v))$, where the potential $V$ solves the <Kirchhoff node law> with those source and sink divergences. Because $G$ is a <connected graph>, this potential is unique up to an additive constant. The <effective resistance> is the <electric potential difference> needed for unit current,
$$
R(x,y)=V(x)-V(y).
$$
Discrete summation by parts gives $\mathcal E_r(i)=\sum_uV(u)\operatorname{div}i(u)=R(x,y)$.

The <Thomson principle> says that this current minimizes energy among all <unit flows>. Indeed write any other <unit flow> as $j=i+k$, where $\operatorname{div}k=0$. Then
$$
\sum_er_ei(e)k(e)=\sum_{e=(u,v)}(V(u)-V(v))k(u,v)=\sum_uV(u)\operatorname{div}k(u)=0.
$$
Consequently
$$
\mathcal E_r(j)=R(x,y)+\mathcal E_r(k)\ge R(x,y),\qquad
\boxed{R(x,y)=\min_{j\text{ unit flow }x\to y}\mathcal E_r(j).}
$$
This also proves uniqueness of the minimizing current.

If $r'_e\ge r_e$ for every <edge>, then $\mathcal E_{r'}(j)\ge\mathcal E_r(j)$ for every admissible <flow>. The admissible set is unchanged, so taking its minimum proves the <Rayleigh monotonicity principle>:
$$
\boxed{R_{r'}(x,y)\ge R_r(x,y).}
$$
Deletion is the limiting operation $r_e\to\infty$: finite-energy <flows> must then carry zero current on that <edge>. If the terminals become disconnected, the <effective resistance> is infinite.