Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Forward model, linear operator and Tikhonov estimate for ultrasound phase-aberration correction

Definition
Arxiv2401_10389_Basic

by Xeroth · Nov 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

inverse-problemsleast-squareslinearizationtikhonov-regularizationultrasound-imaging

Objects of Section II and Supplemental materials C of Xing, Malescot, Martineau, Rungta and Provost (2025), all at the central angular frequency ω0\omega_0ω0​.

  1. Probe and medium. A one-dimensional probe has NeN_eNe​ elements and the medium consists of NsN_sNs​ point scatterers. The transmission operator TTT and the reflection operator RRR are complex Ne×NsN_e\times N_sNe​×Ns​ matrices, and the backscattering matrix is the diagonal matrix Γ=diag⁡(γ)\Gamma=\operatorname{diag}(\gamma)Γ=diag(γ), γ∈CNs\gamma\in\mathbb{C}^{N_s}γ∈CNs​.
  2. Model signals (eqs. 2 and 5). Without aberration, element mmm receives M^m(Γ)=∑s∑nRm,sΓs,sTn,s\hat M_m(\Gamma)=\sum_{s}\sum_{n}R_{m,s}\Gamma_{s,s}T_{n,s}M^m​(Γ)=∑s​∑n​Rm,s​Γs,s​Tn,s​. With per-element aberration factors u∈CNeu\in\mathbb{C}^{N_e}u∈CNe​ acting identically on transmit and receive, it receives M^m(Γ,u)=∑s∑numRm,sΓs,sTn,sun\hat M_m(\Gamma,u)=\sum_s\sum_n u_mR_{m,s}\Gamma_{s,s}T_{n,s}u_nM^m​(Γ,u)=∑s​∑n​um​Rm,s​Γs,s​Tn,s​un​.
  3. Matrix form (eqs. 6, 7, 10). The transfer matrix is H=R Γ TTH=R\,\Gamma\,T^TH=RΓTT (plain transpose). The forward model is M^(Γ,u)=u∘Hu\hat M(\Gamma,u)=u\circ HuM^(Γ,u)=u∘Hu, with ∘\circ∘ the entrywise product. Its gradient matrix is ∇uM^(Γ,u)=diag⁡(Hu)+diag⁡(u)H\nabla_u\hat M(\Gamma,u)=\operatorname{diag}(Hu)+\operatorname{diag}(u)H∇u​M^(Γ,u)=diag(Hu)+diag(u)H.
  4. Linear operator (eq. 13). The augmented unknown is (u ∣ 1)T∈CNe+1(u\,|\,1)^T\in\mathbb{C}^{N_e+1}(u∣1)T∈CNe​+1. The Ne×(Ne+1)N_e\times(N_e+1)Ne​×(Ne​+1) operator is K(Γ,u0)=(∇uM^(Γ,u0) ∣ M^(Γ,u0)−∇uM^(Γ,u0)u0)K(\Gamma,u_0)=\big(\nabla_u\hat M(\Gamma,u_0)\ \big|\ \hat M(\Gamma,u_0)-\nabla_u\hat M(\Gamma,u_0)u_0\big)K(Γ,u0​)=(∇u​M^(Γ,u0​) ​ M^(Γ,u0​)−∇u​M^(Γ,u0​)u0​).
  5. Regularization (eqs. 14, 15, 35). ∥v∥2=∑i∣vi∣2\|v\|^2=\sum_i|v_i|^2∥v∥2=∑i​∣vi​∣2. For a forward operator KKK, a real matrix LLL, a parameter α\alphaα and a signal sss, the Tikhonov objective is ∥s−Kv∥2+α∥Lv∥2\|s-Kv\|^2+\alpha\|Lv\|^2∥s−Kv∥2+α∥Lv∥2. The normal matrix is K†K+αLTLK^\dagger K+\alpha L^TLK†K+αLTL, with K†K^\daggerK† the conjugate transpose, and the closed-form estimate is (K†K+αLTL)−1K†s(K^\dagger K+\alpha L^TL)^{-1}K^\dagger s(K†K+αLTL)−1K†s. D2D_2D2​ is the n×nn\times nn×n second-difference matrix with first row (−1,1,0,… )(-1,1,0,\dots)(−1,1,0,…), interior rows (…,1,−2,1,… )(\dots,1,-2,1,\dots)(…,1,−2,1,…) centred on the diagonal, and last row (…,0,−1,1)(\dots,0,-1,1)(…,0,−1,1).
  6. Multiple transmit angles (eqs. 16-18). For NθN_\thetaNθ​ angles with per-element transmit delays τn(θ)\tau_n(\theta)τn​(θ), (Tθ)n,s=Tn,seiω0τn(θ)(T_\theta)_{n,s}=T_{n,s}e^{i\omega_0\tau_n(\theta)}(Tθ​)n,s​=Tn,s​eiω0​τn​(θ). The vectorized multi-angle signal has entry (θ,m)(\theta,m)(θ,m) equal to M^(Γ,u)m\hat M(\Gamma,u)_mM^(Γ,u)m​ computed with TθT_\thetaTθ​, the aberration uuu being the same for all angles. Kθ(Γ,u0)K_\theta(\Gamma,u_0)Kθ​(Γ,u0​) stacks the operators K(Γ,u0)K(\Gamma,u_0)K(Γ,u0​) built with T1,…,TNθT_1,\dots,T_{N_\theta}T1​,…,TNθ​​.

Formalization Note Rows of the stacked operator are indexed by pairs (θ,m)(\theta,m)(θ,m) rather than by a single integer; the order of the stacking does not affect any statement. D2D_2D2​ is written for every nnn, and the printed pattern is consistent for n≥2n\ge2n≥2. The statements use n=Ne+1n=N_e+1n=Ne​+1, the length of the augmented unknown, with Ne≥1N_e\ge1Ne​≥1.

Definition code
import Mathlib

/-!
Xing, Malescot, Martineau, Rungta and Provost, *Inverse Problem Approach to Aberration Correction
for in vivo Transcranial Imaging Based on a Sparse Representation of Contrast-enhanced Ultrasound
Data*, arXiv:2401.10389v3 (2025): the single-frequency forward model of a probe with `Ne` elements
insonifying `Ns` point scatterers through a phase-screen aberrator (Sections II.A and II.B), its
gradient and first-order linearization (Section II.B), the Tikhonov-regularized least-squares
solution with the second-difference matrix (Section II.C and Supplemental materials C), and the
multi-angle operator (Section II.D). All operators are taken at the central frequency `ω₀`.
-/

open Matrix

noncomputable section

namespace Arxiv2401_10389

variable {Ne Ns : ℕ}

/-- Eq. (2), Section II.A, PDF p. 2: the model signal on receive element `m` without aberration,
`M̂_m(Γ) = ∑_s ∑_n R_{m,s} Γ_{s,s} T_{n,s}`. The reflection operator `R` and the transmission
operator `T` are `Ne × Ns` complex matrices, and the diagonal backscattering matrix is
`Γ = diag γ`. -/
def unaberratedSignal (R : Matrix (Fin Ne) (Fin Ns) ℂ) (γ : Fin Ns → ℂ)
    (T : Matrix (Fin Ne) (Fin Ns) ℂ) : Fin Ne → ℂ :=
  fun m => ∑ s, ∑ n, R m s * γ s * T n s

/-- Eq. (5), Section II.A, PDF p. 3: the model signal on receive element `m` with the same
aberration factors `u_n` on transmit and receive,
`M̂_m(Γ, u) = ∑_s ∑_n u_m R_{m,s} Γ_{s,s} T_{n,s} u_n`. -/
def aberratedSignal (R : Matrix (Fin Ne) (Fin Ns) ℂ) (γ : Fin Ns → ℂ)
    (T : Matrix (Fin Ne) (Fin Ns) ℂ) (u : Fin Ne → ℂ) : Fin Ne → ℂ :=
  fun m => ∑ s, ∑ n, u m * R m s * γ s * T n s * u n

/-- Eq. (7), Section II.B, PDF p. 3: the transfer matrix `H = R Γ Tᵀ` (plain transpose), an
`Ne × Ne` matrix that does not depend on the aberration. -/
def transferMatrix (R : Matrix (Fin Ne) (Fin Ns) ℂ) (γ : Fin Ns → ℂ)
    (T : Matrix (Fin Ne) (Fin Ns) ℂ) : Matrix (Fin Ne) (Fin Ne) ℂ :=
  R * diagonal γ * Tᵀ

/-- Eq. (6), Section II.B, PDF p. 3: the forward model in matrix form, `M̂(Γ, u) = u ∘ H u`,
with `∘` the Hadamard (entrywise) product. -/
def forwardModel (R : Matrix (Fin Ne) (Fin Ns) ℂ) (γ : Fin Ns → ℂ)
    (T : Matrix (Fin Ne) (Fin Ns) ℂ) (u : Fin Ne → ℂ) : Fin Ne → ℂ :=
  fun m => u m * (transferMatrix R γ T *ᵥ u) m

/-- Eq. (10), Section II.B, PDF p. 3: the gradient matrix
`∇_u M̂(Γ, u) = diag(H u) + diag(u) H`. -/
def forwardGradient (R : Matrix (Fin Ne) (Fin Ns) ℂ) (γ : Fin Ns → ℂ)
    (T : Matrix (Fin Ne) (Fin Ns) ℂ) (u : Fin Ne → ℂ) : Matrix (Fin Ne) (Fin Ne) ℂ :=
  diagonal (transferMatrix R γ T *ᵥ u) + diagonal u * transferMatrix R γ T

/-- Eq. (13b), Section II.B, PDF p. 4: the augmented unknown `(u | 1)ᵀ` of length `Ne + 1`,
whose last entry is `1`. -/
def augment (u : Fin Ne → ℂ) : Fin (Ne + 1) → ℂ :=
  fun j => if h : (j : ℕ) < Ne then u ⟨j, h⟩ else 1

/-- Eq. (13a), Section II.B, PDF p. 4: the `Ne × (Ne + 1)` forward operator
`K(Γ, u₀) = (∇_u M̂(Γ, u₀) | M̂(Γ, u₀) - ∇_u M̂(Γ, u₀) u₀)`: the first `Ne` columns are the
gradient at `u₀`, the last column is `M̂(Γ, u₀) - ∇_u M̂(Γ, u₀) u₀`. -/
def linearOperator (R : Matrix (Fin Ne) (Fin Ns) ℂ) (γ : Fin Ns → ℂ)
    (T : Matrix (Fin Ne) (Fin Ns) ℂ) (u₀ : Fin Ne → ℂ) : Matrix (Fin Ne) (Fin (Ne + 1)) ℂ :=
  fun m j => if h : (j : ℕ) < Ne then forwardGradient R γ T u₀ m ⟨j, h⟩
    else forwardModel R γ T u₀ m - (forwardGradient R γ T u₀ *ᵥ u₀) m

/-- Supplemental materials C, eq. (35), PDF p. 17: the `n × n` second-difference matrix `D₂`,
with first row `(-1, 1, 0, …)`, interior rows `(…, 1, -2, 1, …)` centred on the diagonal, and
last row `(…, 0, -1, 1)`. (The printed pattern is consistent for `n ≥ 2`; statements use
`n = Ne + 1` with `Ne ≥ 1`.) -/
def secondDiffMatrix (n : ℕ) : Matrix (Fin n) (Fin n) ℝ :=
  fun i j =>
    if (i : ℕ) = 0 then
      (if (j : ℕ) = 0 then -1 else if (j : ℕ) = 1 then 1 else 0)
    else if (i : ℕ) + 1 = n then
      (if (j : ℕ) + 2 = n then -1 else if (j : ℕ) + 1 = n then 1 else 0)
    else
      (if (j : ℕ) + 1 = (i : ℕ) then 1 else if (j : ℕ) = (i : ℕ) then -2
        else if (j : ℕ) = (i : ℕ) + 1 then 1 else 0)

/-- The squared Euclidean norm `‖v‖² = ∑_i |v_i|²` of a complex vector, used in eq. (14). -/
def sqNorm {ι : Type*} [Fintype ι] (v : ι → ℂ) : ℝ :=
  ∑ i, Complex.normSq (v i)

/-- Eq. (14), Section II.C, PDF p. 4: the Tikhonov-regularized least-squares objective
`‖s - K v‖² + α ‖L v‖²` for a forward operator `K`, a real regularization matrix `L`, a
regularization parameter `α` and a measured signal `s`. -/
def tikhonovObjective {ι : Type*} [Fintype ι] {p : ℕ} (K : Matrix ι (Fin p) ℂ)
    (L : Matrix (Fin p) (Fin p) ℝ) (α : ℝ) (s : ι → ℂ) (v : Fin p → ℂ) : ℝ :=
  sqNorm (s - K *ᵥ v) + α * sqNorm (L.map (fun x : ℝ => (x : ℂ)) *ᵥ v)

/-- Eq. (15), Section II.C, PDF p. 4: the normal matrix `K† K + α Lᵀ L`, with `K†` the
conjugate transpose. -/
def normalMatrix {ι : Type*} [Fintype ι] {p : ℕ} (K : Matrix ι (Fin p) ℂ)
    (L : Matrix (Fin p) (Fin p) ℝ) (α : ℝ) : Matrix (Fin p) (Fin p) ℂ :=
  Kᴴ * K + (α : ℂ) • ((L.map (fun x : ℝ => (x : ℂ)))ᵀ * L.map (fun x : ℝ => (x : ℂ)))

/-- Eq. (15), Section II.C, PDF p. 4: the closed-form estimate
`û = (K† K + α Lᵀ L)⁻¹ K† s`. -/
def tikhonovSolution {ι : Type*} [Fintype ι] {p : ℕ} (K : Matrix ι (Fin p) ℂ)
    (L : Matrix (Fin p) (Fin p) ℝ) (α : ℝ) (s : ι → ℂ) : Fin p → ℂ :=
  (normalMatrix K L α)⁻¹ *ᵥ (Kᴴ *ᵥ s)

variable {Nθ : ℕ}

/-- Eq. (16), Section II.D, PDF p. 4: the transmission operator for transmit angle `θ`,
`T_θ = T ∘ A(θ)`, with per-element transmit phase `A_n(ω₀, θ) = exp(i ω₀ τ_n(θ))`. -/
def angleTransmit (T : Matrix (Fin Ne) (Fin Ns) ℂ) (ω₀ : ℝ) (τ : Fin Nθ → Fin Ne → ℝ)
    (θ : Fin Nθ) : Matrix (Fin Ne) (Fin Ns) ℂ :=
  fun n s => T n s * Complex.exp (Complex.I * (ω₀ : ℂ) * (τ θ n : ℂ))

/-- Section II.D, PDF p. 4: the vectorized multi-angle model signal; its entry `(θ, m)` is the
forward model (6) for transmit operator `T_θ` and the angle-independent aberration `u`. -/
def multiAngleSignal (R : Matrix (Fin Ne) (Fin Ns) ℂ) (γ : Fin Ns → ℂ)
    (T : Matrix (Fin Ne) (Fin Ns) ℂ) (ω₀ : ℝ) (τ : Fin Nθ → Fin Ne → ℝ) (u : Fin Ne → ℂ) :
    Fin Nθ × Fin Ne → ℂ :=
  fun x => forwardModel R γ (angleTransmit T ω₀ τ x.1) u x.2

/-- Eq. (18), Section II.D, PDF p. 4: the stacked operator `K_θ(Γ, u₀)`, whose block for angle
`θ` is the operator (13a) built with `T_θ`. Rows are indexed by pairs `(θ, m)`. -/
def multiAngleOperator (R : Matrix (Fin Ne) (Fin Ns) ℂ) (γ : Fin Ns → ℂ)
    (T : Matrix (Fin Ne) (Fin Ns) ℂ) (ω₀ : ℝ) (τ : Fin Nθ → Fin Ne → ℝ) (u₀ : Fin Ne → ℂ) :
    Matrix (Fin Nθ × Fin Ne) (Fin (Ne + 1)) ℂ :=
  fun x j => linearOperator R γ (angleTransmit T ω₀ τ x.1) u₀ x.2 j

end Arxiv2401_10389
Source
Xing, Malescot, Martineau, Rungta and Provost, Inverse Problem Approach to Aberration Correction for in vivo Transcranial Imaging Based on a Sparse Representation of Contrast-enhanced Ultrasound Data, arXiv:2401.10389v3 (2025), Sections II.A-II.D (eqs. (2), (5)-(7), (10), (13)-(18)), Supplemental materials C (eq. (35)), PDF pp. 2-4, 17
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Unaberrated signal. Fix natural numbers NeN_eNe​ and NsN_sNs​, either of which may be 000. Take two complex Ne×NsN_e\times N_sNe​×Ns​ matrices RRR and TTT and a complex vector γ∈CNs\gamma\in\mathbb{C}^{N_s}γ∈CNs​. The definition produces a vector M^∈CNe\hat M\in\mathbb{C}^{N_e}M^∈CNe​ whose entry for each index m∈{0,…,Ne−1}m\in\{0,\dots,N_e-1\}m∈{0,…,Ne​−1} is

M^m(R,γ,T)=∑s=0Ns−1∑n=0Ne−1Rm,s γs Tn,s=∑sRm,s γs(∑nTn,s).\hat M_m(R,\gamma,T)=\sum_{s=0}^{N_s-1}\sum_{n=0}^{N_e-1} R_{m,s}\,\gamma_s\,T_{n,s}=\sum_{s} R_{m,s}\,\gamma_s\Big(\sum_{n}T_{n,s}\Big).M^m​(R,γ,T)=s=0∑Ns​−1​n=0∑Ne​−1​Rm,s​γs​Tn,s​=s∑​Rm,s​γs​(n∑​Tn,s​).

The inner sum over nnn runs over all rows of TTT and involves no weighting other than Tn,sT_{n,s}Tn,s​ itself. If Ns=0N_s=0Ns​=0, every entry is 000. If Ne=0N_e=0Ne​=0, the output is the empty vector.

Aberrated signal. Take the same data R,T∈CNe×NsR,T\in\mathbb{C}^{N_e\times N_s}R,T∈CNe​×Ns​ and γ∈CNs\gamma\in\mathbb{C}^{N_s}γ∈CNs​, together with a complex vector u∈CNeu\in\mathbb{C}^{N_e}u∈CNe​. The definition produces the vector in CNe\mathbb{C}^{N_e}CNe​ with entries

M^m(R,γ,T,u)=∑s=0Ns−1∑n=0Ne−1um Rm,s γs Tn,s un.\hat M_m(R,\gamma,T,u)=\sum_{s=0}^{N_s-1}\sum_{n=0}^{N_e-1} u_m\,R_{m,s}\,\gamma_s\,T_{n,s}\,u_n .M^m​(R,γ,T,u)=s=0∑Ns​−1​n=0∑Ne​−1​um​Rm,s​γs​Tn,s​un​.

The same vector uuu multiplies both the receive index mmm and the summed index nnn. No constraint is placed on uuu: for example, it need not have unit-modulus entries, and u=0u=0u=0 is allowed.

Transfer matrix. Given R,T∈CNe×NsR,T\in\mathbb{C}^{N_e\times N_s}R,T∈CNe​×Ns​ and γ∈CNs\gamma\in\mathbb{C}^{N_s}γ∈CNs​, the transfer matrix is the complex Ne×NeN_e\times N_eNe​×Ne​ matrix

H=R diag⁡(γ) TT,Hm,n=∑s=0Ns−1Rm,s γs Tn,s.H=R\,\operatorname{diag}(\gamma)\,T^{\mathsf T},\qquad H_{m,n}=\sum_{s=0}^{N_s-1}R_{m,s}\,\gamma_s\,T_{n,s}.H=Rdiag(γ)TT,Hm,n​=s=0∑Ns​−1​Rm,s​γs​Tn,s​.

Here TTT^{\mathsf T}TT is the plain transpose, with no complex conjugation. HHH does not involve any vector uuu. If Ns=0N_s=0Ns​=0, then HHH is the zero matrix.

Forward model. Given R,T∈CNe×NsR,T\in\mathbb{C}^{N_e\times N_s}R,T∈CNe​×Ns​, γ∈CNs\gamma\in\mathbb{C}^{N_s}γ∈CNs​ and u∈CNeu\in\mathbb{C}^{N_e}u∈CNe​, let HHH be the transfer matrix above. The forward model is the vector in CNe\mathbb{C}^{N_e}CNe​ with entries

F(u)m=um (Hu)m=um∑n=0Ne−1Hm,n un.F(u)_m=u_m\,(Hu)_m=u_m\sum_{n=0}^{N_e-1}H_{m,n}\,u_n .F(u)m​=um​(Hu)m​=um​n=0∑Ne​−1​Hm,n​un​.

In words, it is the entrywise (Hadamard) product u∘Huu\circ Huu∘Hu. Expanded, it coincides entry by entry with the aberrated-signal formula above. The file does not state this coincidence as a theorem.

Forward "gradient". Given R,T,γ,uR,T,\gamma,uR,T,γ,u as above and H=Rdiag⁡(γ)TTH=R\operatorname{diag}(\gamma)T^{\mathsf T}H=Rdiag(γ)TT, this is defined as the complex Ne×NeN_e\times N_eNe​×Ne​ matrix

G(u)=diag⁡(Hu)+diag⁡(u) H,G(u)i,j=δij (Hu)i+ui Hi,j.G(u)=\operatorname{diag}(Hu)+\operatorname{diag}(u)\,H,\qquad G(u)_{i,j}=\delta_{ij}\,(Hu)_i+u_i\,H_{i,j}.G(u)=diag(Hu)+diag(u)H,G(u)i,j​=δij​(Hu)i​+ui​Hi,j​.

This is a bare definition. Nothing in the code asserts that G(u)G(u)G(u) is a derivative, Jacobian or gradient of the forward model in any sense.

Augmentation. Given u∈CNeu\in\mathbb{C}^{N_e}u∈CNe​, its augmentation is the vector u~∈CNe+1\tilde u\in\mathbb{C}^{N_e+1}u~∈CNe​+1 given by

u~j={uj,j<Ne,1,j=Ne.\tilde u_j=\begin{cases}u_j,& j<N_e,\\ 1,& j=N_e.\end{cases}u~j​={uj​,1,​j<Ne​,j=Ne​.​

That is, u~=(u0,…,uNe−1,1)\tilde u=(u_0,\dots,u_{N_e-1},1)u~=(u0​,…,uNe​−1​,1). When Ne=0N_e=0Ne​=0, it is the one-entry vector (1)(1)(1).

Linearized operator. Given R,T∈CNe×NsR,T\in\mathbb{C}^{N_e\times N_s}R,T∈CNe​×Ns​, γ∈CNs\gamma\in\mathbb{C}^{N_s}γ∈CNs​ and a base point u0∈CNeu_0\in\mathbb{C}^{N_e}u0​∈CNe​, the linearized operator is the complex Ne×(Ne+1)N_e\times(N_e+1)Ne​×(Ne​+1) matrix K(u0)K(u_0)K(u0​). Here GGG and FFF are the "gradient" matrix and forward model defined above, both built from R,γ,TR,\gamma,TR,γ,T. Its entries are

K(u0)m,j={G(u0)m,j,j<Ne,F(u0)m−(G(u0) u0)m,j=Ne.K(u_0)_{m,j}=\begin{cases}G(u_0)_{m,j},& j<N_e,\\[2pt] F(u_0)_m-\big(G(u_0)\,u_0\big)_m,& j=N_e.\end{cases}K(u0​)m,j​={G(u0​)m,j​,F(u0​)m​−(G(u0​)u0​)m​,​j<Ne​,j=Ne​.​

So the first NeN_eNe​ columns are G(u0)G(u_0)G(u0​), and the last column is F(u0)−G(u0)u0F(u_0)-G(u_0)u_0F(u0​)−G(u0​)u0​. The code makes no statement relating K(u0)K(u_0)K(u0​) times the augmented vector u~\tilde uu~ to F(u)F(u)F(u), whether exact or approximate.

"Second-difference" matrix. For each natural number nnn (including 000 and 111), this is a real n×nn\times nn×n matrix DDD. Rows and columns are indexed 0,…,n−10,\dots,n-10,…,n−1, and the rules below are applied in this order.

  • Row 000: D0,0=−1D_{0,0}=-1D0,0​=−1, D0,1=1D_{0,1}=1D0,1​=1 (when column 111 exists), and all other entries are 000.
  • Last row: for a row i≠0i\neq 0i=0 with i=n−1i=n-1i=n−1, Di,n−2=−1D_{i,n-2}=-1Di,n−2​=−1, Di,n−1=1D_{i,n-1}=1Di,n−1​=1, and all other entries are 000.
  • Interior rows: for 0<i<n−10<i<n-10<i<n−1, Di,i−1=1D_{i,i-1}=1Di,i−1​=1, Di,i=−2D_{i,i}=-2Di,i​=−2, Di,i+1=1D_{i,i+1}=1Di,i+1​=1, and all other entries are 000.

So the first and last rows are first differences, (−1,1,0,… )(-1,1,0,\dots)(−1,1,0,…) and (…,0,−1,1)(\dots,0,-1,1)(…,0,−1,1), and the interior rows are (…,1,−2,1,… )(\dots,1,-2,1,\dots)(…,1,−2,1,…). The small cases are:

  • n=0n=0n=0 gives the empty matrix.
  • n=1n=1n=1 gives the 1×11\times11×1 matrix (−1)(-1)(−1), because row 000 takes precedence.
  • n=2n=2n=2 gives (−11−11)\begin{pmatrix}-1&1\\-1&1\end{pmatrix}(−1−1​11​), which has two identical rows.

For every n≥2n\ge2n≥2, each row sums to 000, so DDD sends the all-ones vector to 000.

Squared norm. For a vector vvv with complex entries indexed by any finite set ι\iotaι,

∥v∥2=∑i∈ι∣vi∣2,\|v\|^2=\sum_{i\in\iota}|v_i|^2 ,∥v∥2=i∈ι∑​∣vi​∣2,

a nonnegative real number. When ι\iotaι is empty, the value is 000.

Tikhonov objective. The inputs are:

  • a finite index set ι\iotaι and a natural number ppp;
  • a complex matrix KKK with rows indexed by ι\iotaι and ppp columns;
  • a real p×pp\times pp×p matrix LLL;
  • a real number α\alphaα, with no sign restriction, so α<0\alpha<0α<0 and α=0\alpha=0α=0 are allowed;
  • a complex vector sss indexed by ι\iotaι;
  • a complex vector v∈Cpv\in\mathbb{C}^pv∈Cp.

The objective is the real number

J(v)=∥s−Kv∥2+α ∥Lv∥2,J(v)=\|s-Kv\|^2+\alpha\,\|Lv\|^2,J(v)=∥s−Kv∥2+α∥Lv∥2,

where ∥⋅∥2\|\cdot\|^2∥⋅∥2 is the sum of squared moduli and LLL is applied to vvv after its real entries are viewed as complex numbers.

Normal matrix. Given KKK (complex, rows indexed by a finite set ι\iotaι, ppp columns), a real p×pp\times pp×p matrix LLL and a real number α\alphaα (any sign), the normal matrix is the complex p×pp\times pp×p matrix

N=KHK+α LTL.N=K^{\mathsf H}K+\alpha\,L^{\mathsf T}L .N=KHK+αLTL.

Here KHK^{\mathsf H}KH is the conjugate transpose of KKK, and LTLL^{\mathsf T}LLTL is computed after viewing LLL's real entries as complex numbers. Since LLL is real, conjugating it makes no difference. Nothing is asserted about the invertibility of NNN.

Tikhonov solution. Given KKK, LLL and α\alphaα as for the normal matrix, together with a complex vector sss indexed by ι\iotaι, the Tikhonov solution is the vector in Cp\mathbb{C}^pCp

v^=N−1KHs,N=KHK+αLTL.\hat v=N^{-1}K^{\mathsf H}s,\qquad N=K^{\mathsf H}K+\alpha L^{\mathsf T}L .v^=N−1KHs,N=KHK+αLTL.

The inverse is the total matrix inverse: if det⁡N=0\det N=0detN=0, then N−1N^{-1}N−1 is defined to be the zero matrix, and in that case v^=0\hat v=0v^=0. The code makes no claim that v^\hat vv^ minimizes, or is a critical point of, the Tikhonov objective.

Angle-dependent transmit operator. The inputs are:

  • natural numbers NeN_eNe​, NsN_sNs​ and NθN_\thetaNθ​, the last being the number of angles, possibly 000;
  • a complex matrix T∈CNe×NsT\in\mathbb{C}^{N_e\times N_s}T∈CNe​×Ns​;
  • a real number ω0\omega_0ω0​;
  • a real array τθ,n\tau_{\theta,n}τθ,n​ for θ∈{0,…,Nθ−1}\theta\in\{0,\dots,N_\theta-1\}θ∈{0,…,Nθ​−1} and n∈{0,…,Ne−1}n\in\{0,\dots,N_e-1\}n∈{0,…,Ne​−1};
  • an angle index θ\thetaθ.

The definition is the complex Ne×NsN_e\times N_sNe​×Ns​ matrix

(Tθ)n,s=Tn,s e i ω0 τθ,n.(T_\theta)_{n,s}=T_{n,s}\,e^{\,i\,\omega_0\,\tau_{\theta,n}} .(Tθ​)n,s​=Tn,s​eiω0​τθ,n​.

The phase factor depends only on the row nnn and the angle θ\thetaθ, not on sss. No relation between τ\tauτ and any geometric angle is imposed.

Multi-angle signal. Given R,T∈CNe×NsR,T\in\mathbb{C}^{N_e\times N_s}R,T∈CNe​×Ns​, γ∈CNs\gamma\in\mathbb{C}^{N_s}γ∈CNs​, ω0∈R\omega_0\in\mathbb{R}ω0​∈R, delays τθ,n∈R\tau_{\theta,n}\in\mathbb{R}τθ,n​∈R and a single vector u∈CNeu\in\mathbb{C}^{N_e}u∈CNe​ that is the same for all angles, this is the complex vector indexed by pairs (θ,m)(\theta,m)(θ,m), with θ<Nθ\theta<N_\thetaθ<Nθ​ and m<Nem<N_em<Ne​, given by

S(θ,m)=um∑n=0Ne−1Hm,nθ un,Hm,nθ=∑s=0Ns−1Rm,s γs Tn,s e iω0τθ,n.S_{(\theta,m)}=u_m\sum_{n=0}^{N_e-1}H^{\theta}_{m,n}\,u_n,\qquad H^{\theta}_{m,n}=\sum_{s=0}^{N_s-1}R_{m,s}\,\gamma_s\,T_{n,s}\,e^{\,i\omega_0\tau_{\theta,n}} .S(θ,m)​=um​n=0∑Ne​−1​Hm,nθ​un​,Hm,nθ​=s=0∑Ns​−1​Rm,s​γs​Tn,s​eiω0​τθ,n​.

In other words, it is the forward model built with the angle-dependent transmit matrix TθT_\thetaTθ​ in place of TTT. When Nθ=0N_\theta=0Nθ​=0, the vector is empty.

Multi-angle operator. Given R,T,γ,ω0,τR,T,\gamma,\omega_0,\tauR,T,γ,ω0​,τ as above and a base point u0∈CNeu_0\in\mathbb{C}^{N_e}u0​∈CNe​, this is the complex matrix with rows indexed by pairs (θ,m)(\theta,m)(θ,m) and Ne+1N_e+1Ne​+1 columns. Its ((θ,m),j)\big((\theta,m),j\big)((θ,m),j) entry is the (m,j)(m,j)(m,j) entry of the linearized operator K(u0)K(u_0)K(u0​) built from RRR, γ\gammaγ and the angle-dependent TθT_\thetaTθ​. Explicitly, with HθH^\thetaHθ as in the multi-angle signal and Gθ(u0)=diag⁡(Hθu0)+diag⁡(u0)HθG^\theta(u_0)=\operatorname{diag}(H^\theta u_0)+\operatorname{diag}(u_0)H^\thetaGθ(u0​)=diag(Hθu0​)+diag(u0​)Hθ,

K(θ,m),j={Gθ(u0)m,j,j<Ne,u0,m(Hθu0)m−(Gθ(u0)u0)m,j=Ne.\mathcal K_{(\theta,m),j}=\begin{cases}G^\theta(u_0)_{m,j},& j<N_e,\\[2pt] u_{0,m}(H^\theta u_0)_m-\big(G^\theta(u_0)u_0\big)_m,& j=N_e.\end{cases}K(θ,m),j​={Gθ(u0​)m,j​,u0,m​(Hθu0​)m​−(Gθ(u0​)u0​)m​,​j<Ne​,j=Ne​.​

The rows are indexed by the pair (θ,m)(\theta,m)(θ,m); the code fixes no particular linear ordering of the blocks. When Nθ=0N_\theta=0Nθ​=0, the matrix has no rows.

Human review
  • Endorsed by Shuze Chen · Nov 26, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 26, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me