## 4 Lateral Constraint Inversion Theory
### Global Inversion Equations and Termination Conditions  
The iterative form for correcting the model parameter \(\Delta\mathbf{m}\) can be derived based on the minimum principle of the objective function (5).  
\[\Delta\mathbf{m}_{k}=\left(\mathbf{G}{}^{\text{T}}\mathbf{W}\mathbf{G}{}^{\text{T}}+\lambda \mathbf{R}_{mz}^{\text{T}}\mathbf{R}_{mz}\right)^{-1}\left(\mathbf{G}\mathbf{W}\right){}^{ \text{T}}\mathbf{W}\Delta d_{k} \tag{18}\]  
where \(\mathbf{G}\), \(\Delta d_{k}\) are as follows:  
\[\mathbf{G}=\begin{bmatrix}J_{z}&&&0\\ &\mathbf{R}_{\text{Is}}&&\\ &&\mathbf{R}_{\text{vs}}&\\ 0&&&\mathbf{R}_{\text{m}x}\end{bmatrix},\Delta d_{k}=\begin{bmatrix}\Delta d_{ \text{obs}}\\ -\mathbf{R}_{\text{vs}}\mathbf{m}\\ -\mathbf{R}_{\text{vs}}\mathbf{m}\end{bmatrix} \tag{19}\]  
With  
\[J_{z}=\begin{bmatrix}J_{1}&&&0\\ &J_{2}&&\\ &&\cdots&\\ 0&&&J_{\text{Ns}}\end{bmatrix} \tag{20}\]  
\(\Delta\mathbf{m}_{k}\) represents the model variation in the \(k\)th inversion iteration \(\Delta d_{k}\) denotes the disparity between the model response in the \(k\)th iteration and the observed data. \(J_{z}\) is a diagonal matrix comprised of Jacobian matrices from \(N_{s}\) measurement points.  
By substituting Equations (16) and (19) into Equation (18), we derive the specific iteration form as follows:  
\[\mathbf{m}_{k+1}=\mathbf{m}_{k}+\left(\begin{array}{c}\mathbf{J}_{i}^{\text{T}}\mathbf{ W}_{\text{obs}}\mathbf{J}_{z}+\lambda_{k}\mathbf{R}_{mz}{}^{\text{T}}\mathbf{R}_{mz} {}^{+}\\ \mathbf{R}_{\text{Is}}^{\text{T}}\mathbf{W}_{\text{Is}}\mathbf{R}_{\text{Is}}+\mathbf{ R}_{\text{vs}}^{\text{T}}\mathbf{W}_{\text{vs}}\mathbf{R}_{\text{vs}}\end{array}\right)^{-1} \times\left\{\begin{array}{c}\mathbf{J}_{i}^{\text{T}}\mathbf{W}_{\text{obs}}[ \mathbf{d}_{\text{obs}}-\text{F}(\mathbf{m}_{k})]+\mathbf{R}_{\text{vs}}^{ \text{T}}\times\\ \mathbf{W}_{\text{Is}}(-\mathbf{R}_{\text{Is}}\mathbf{m}_{k})+\mathbf{R}_{ \text{vs}}^{\text{T}}\mathbf{W}_{\text{vs}}(-\mathbf{R}_{\text{vs}}\mathbf{m}_{k} )\end{array}\right\} \tag{21}\]  
The relative fitting difference in the inversion process is shown in the following formula:  
\[eps_{i}=\left\|\left(d^{\text{obs}}-d_{i}^{\text{fwd}}\right)/d^{\text{obs}} \right\|^{2} \tag{22}\]  
where \(eps_{i}\) represents the fitting error of the \(i\)th iteration, \(d^{\text{obs}}\) is the measured data value, and \(d_{i}^{\text{fwd}}\) is the theoretical response value of the inversion model at the \(i\)th iteration. If \(eps_{i}\) meets a predefined threshold, the inversion iteration is concluded, or if the maximum number of iterations is reached, the inversion process is terminated, resulting in the derivation of a locally optimal inversion model.  
Following the OCCAM inversion theory, the resistivity of individual layers is inverted under constraints of fixed layer number and thickness, with an initial resistivity model set at 100 \(\Omega\cdot\)m. In real-world scenarios, where underground media typically exhibit resistivityvalues ranging between 0.1 and 10,000 \(\Omega\)-m, the resistivity of each layer is constrained within this interval. To mitigate rapid convergence to local minimum during inversion, the correction applied in each iteration of the model is limited to below 30 \(\Omega\)-m in this study.