Resolvent self-consistency defect (source code)

= Resolvent self-consistency defect
{title2=$\varepsilon_N(z)=g_N(z)+(z+g_N(z))^{-1}$}

For a zero-diagonal real <symmetric matrix>, put $q_i=x_i^T(X^{(i)}-zI)^{-1}x_i$ and $g_N=N^{-1}\operatorname{Tr}(X-zI)^{-1}$. The <Schur complement formula for a diagonal resolvent entry> gives $g_N=-N^{-1}\sum_i(z+q_i)^{-1}$. Subtracting the comparison value $-(z+g_N)^{-1}$ gives $\varepsilon_N=N^{-1}\sum_i(q_i-g_N)/[(z+g_N)(z+q_i)]$. Upper-half-plane positivity and the <principal minor resolvent trace bound> control this defect by the average of $|q_i-g_N^{(i)}|$ plus a trace correction.