Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eqs. (6)-(8) (as proved): the KKT multiplier is twice the adjoint field and the gradient is 4ω2 Re(λ⋆u)/c34\omega^2\,\mathrm{Re}(\lambda^\star u)/c^34ω2Re(λ⋆u)/c3

Proved
Arxiv2507_15035.adjoint_state_gradient

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

adjoint-state-methodcalculus-of-variationsfull-waveform-inversionhelmholtz-equation

Let ω>0\omega>0ω>0. Let ccc be a sound speed: measurable, with c≥m>0c\ge m>0c≥m>0, and equal to c0>0c_0>0c0​>0 outside a bounded region of interest. Let xf(1),…,xf(M)∈Rnx_f^{(1)},\dots,x_f^{(M)}\in\mathbb{R}^nxf(1)​,…,xf(M)​∈Rn be the transducer locations and y∈CMy\in\mathbb{C}^My∈CM the measurements. Let L\mathcal LL be the Lagrangian term of eq. (4) with source sss. Let u∈C2(Rn;C)u\in C^2(\mathbb{R}^n;\mathbb{C})u∈C2(Rn;C) solve the forward equation (6), Scu=−s\mathcal S_cu=-sSc​u=−s almost everywhere. Let λ\lambdaλ solve the adjoint equation (7) as printed, in the sense of distributions:

Scλ=∑i=1M[u(xf(i))−y(i)] δ(xf(i)).\mathcal S_c\lambda=\sum_{i=1}^M\big[u(x_f^{(i)})-y^{(i)}\big]\,\delta(x_f^{(i)}).Sc​λ=i=1∑M​[u(xf(i)​)−y(i)]δ(xf(i)​).

Then, with the multiplier 2λ2\lambda2λ:

  1. L(c,u,⋅)\mathcal L(c,u,\cdot)L(c,u,⋅) is stationary at 2λ2\lambda2λ: ddt∣t=0L(c,u,2λ+tφ)=0\frac{d}{dt}\big|_{t=0}\mathcal L(c,u,2\lambda+t\varphi)=0dtd​​t=0​L(c,u,2λ+tφ)=0 for every complex test function φ\varphiφ;
  2. L(c,⋅,2λ)\mathcal L(c,\cdot,2\lambda)L(c,⋅,2λ) is stationary at uuu: ddt∣t=0L(c,u+tφ,2λ)=0\frac{d}{dt}\big|_{t=0}\mathcal L(c,u+t\varphi,2\lambda)=0dtd​​t=0​L(c,u+tφ,2λ)=0 for every complex test function φ\varphiφ;
  3. for every real test function hhh,
ddt∣t=0L(c+th,u,2λ)=∫Rn4ω2 Re⁡(λ(x)‾ u(x))c(x)3 h(x) dx.\frac{d}{dt}\Big|_{t=0}\mathcal L(c+th,u,2\lambda)=\int_{\mathbb{R}^n}\frac{4\omega^2\,\operatorname{Re}\big(\overline{\lambda(x)}\,u(x)\big)}{c(x)^3}\,h(x)\,dx.dtd​​t=0​L(c+th,u,2λ)=∫Rn​c(x)34ω2Re(λ(x)​u(x))​h(x)dx.

So a forward solve and an adjoint solve give the gradient of the Lagrangian with respect to the sound speed, with density 4ω2Re⁡(λ⋆u)/c34\omega^2\operatorname{Re}(\lambda^\star u)/c^34ω2Re(λ⋆u)/c3. This is the adjoint-state computation that the paper's neural surrogates accelerate.

Formalization Note The paper's eq. (8) prints the gradient as −2ω2λ⋆u/c3-2\omega^2\lambda^\star u/c^3−2ω2λ⋆u/c3, with λ\lambdaλ the field of eq. (7). The derivation from eqs. (4), (5) and (7) gives +4ω2Re⁡(λ⋆u)/c3+4\omega^2\operatorname{Re}(\lambda^\star u)/c^3+4ω2Re(λ⋆u)/c3. The printed formula differs by a factor −2-2−2 and omits the real part. The statement is the formula the derivation establishes ("as proved"). Stationarity and partial derivatives are written as directional derivatives along smooth compactly supported directions.

Preamble
import Mathlib
import Definitions.Def_Arxiv2507_15035_Basic

open MeasureTheory
Formal statement
namespace Arxiv2507_15035

theorem adjoint_state_gradient {n M : ℕ} (ω : ℝ) (hω : 0 < ω)
    (c : Pt n → ℝ) (ROI : Set (Pt n)) (c0 : ℝ) (hc : IsSoundSpeed c ROI c0)
    (s : Pt n → ℂ) (xf : Fin M → Pt n) (y : Fin M → ℂ)
    (u : Pt n → ℂ) (hu : ContDiff ℝ 2 u) (hfwd : ∀ᵐ x, helmholtzOp ω c u x = -s x)
    (lam : Pt n → ℂ) (hadj : IsWeakPointSourceSol ω c lam xf (fun i => u (xf i) - y i)) :
    (∀ φ : Pt n → ℂ, IsTestFn φ →
      HasDerivAt (fun t : ℝ => lagrangianTerm ω c s xf y u (fun x => 2 * lam x + t • φ x)) 0 0) ∧
    (∀ φ : Pt n → ℂ, IsTestFn φ →
      HasDerivAt (fun t : ℝ =>
        lagrangianTerm ω c s xf y (fun x => u x + t • φ x) (fun x => 2 * lam x)) 0 0) ∧
    (∀ h : Pt n → ℝ, IsTestFn h →
      HasDerivAt (fun t : ℝ =>
        lagrangianTerm ω (fun x => c x + t * h x) s xf y u (fun x => 2 * lam x))
        (∫ x, 4 * ω ^ 2 * ((starRingEnd ℂ) (lam x) * u x).re / c x ^ 3 * h x) 0) := by sorry

end Arxiv2507_15035
Source
Zeng et al., OpenBreastUS: Benchmarking Neural Operators for Wave Imaging Using Breast Ultrasound Computed Tomography, arXiv:2507.15035v1 (2025), claim c022; Section III-B, eqs. (4)-(8), PDF p. 4
Read-back

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

Fix natural numbers nnn (the dimension) and MMM (the number of measurement points). Both may be 000. Lebesgue measure on Rn\mathbb{R}^nRn is written dxdxdx. For n=0n=0n=0 the space R0\mathbb{R}^0R0 is a single point of measure 111.

Data and hypotheses. The statement takes the following data, with these assumptions:

  • Frequency. A real number ω\omegaω with ω>0\omega > 0ω>0.

  • Sound speed. A function c:Rn→Rc:\mathbb{R}^n\to\mathbb{R}c:Rn→R, a set ROI⊆Rn\mathrm{ROI}\subseteq\mathbb{R}^nROI⊆Rn and a real number c0c_0c0​. Together they satisfy all of the following:

    • ccc is measurable.
    • There is m>0m>0m>0 with c(x)≥mc(x)\ge mc(x)≥m for every xxx.
    • ROI\mathrm{ROI}ROI is a bounded set.
    • c0>0c_0>0c0​>0.
    • c(x)=c0c(x)=c_0c(x)=c0​ for every x∉ROIx\notin\mathrm{ROI}x∈/ROI.

    No continuity, differentiability or upper bound is assumed for ccc. The objects ROI\mathrm{ROI}ROI and c0c_0c0​ appear nowhere else.

  • Source and measurements. A complex function s:Rn→Cs:\mathbb{R}^n\to\mathbb{C}s:Rn→C (no assumptions). Points xf(1),…,xf(M)∈Rnx_f^{(1)},\dots,x_f^{(M)}\in\mathbb{R}^nxf(1)​,…,xf(M)​∈Rn and complex numbers y1,…,yMy_1,\dots,y_My1​,…,yM​ (no assumptions).

  • Forward field. A function u:Rn→Cu:\mathbb{R}^n\to\mathbb{C}u:Rn→C that is C2C^2C2 as a map of real variables. It satisfies

Scu(x)=−s(x)for Lebesgue-almost every x.S_c u(x) = -s(x)\quad\text{for Lebesgue-almost every } x.Sc​u(x)=−s(x)for Lebesgue-almost every x.

Here, for any ccc and any v:Rn→Cv:\mathbb{R}^n\to\mathbb{C}v:Rn→C,

Scv(x):=Δv(x)+(ωc(x))2v(x),S_c v(x) := \Delta v(x) + \Big(\frac{\omega}{c(x)}\Big)^2 v(x),Sc​v(x):=Δv(x)+(c(x)ω​)2v(x),

with Δ\DeltaΔ the Laplacian (sum of pure second partial derivatives).

  • Adjoint field. A function λ:Rn→C\lambda:\mathbb{R}^n\to\mathbb{C}λ:Rn→C that is locally integrable. For every test function φ\varphiφ it satisfies
∫Rnλ(x) Scφ(x) dx=∑i=1M(u(xf(i))−yi) φ(xf(i)).\int_{\mathbb{R}^n} \lambda(x)\, S_c\varphi(x)\,dx = \sum_{i=1}^M \big(u(x_f^{(i)}) - y_i\big)\,\varphi(x_f^{(i)}).∫Rn​λ(x)Sc​φ(x)dx=i=1∑M​(u(xf(i)​)−yi​)φ(xf(i)​).
  • A test function is a C∞C^\inftyC∞ compactly supported function. It is complex-valued here and real-valued in the third conclusion.
  • There is no complex conjugate on λ\lambdaλ in this identity.

The Lagrangian. For a sound speed c~\tilde cc~ and fields v,μ:Rn→Cv,\mu:\mathbb{R}^n\to\mathbb{C}v,μ:Rn→C, define

L(c~;v,μ):=∑i=1M∣yi−v(xf(i))∣2  −  Re⁡∫Rnμ(x)‾ (Sc~v(x)+s(x)) dx.\mathcal{L}(\tilde c; v, \mu) := \sum_{i=1}^M \big|y_i - v(x_f^{(i)})\big|^2 \;-\; \operatorname{Re}\int_{\mathbb{R}^n} \overline{\mu(x)}\,\big(S_{\tilde c} v(x) + s(x)\big)\,dx .L(c~;v,μ):=i=1∑M​​yi​−v(xf(i)​)​2−Re∫Rn​μ(x)​(Sc~​v(x)+s(x))dx.

The frequency ω\omegaω, source sss, points xf(i)x_f^{(i)}xf(i)​ and data yiy_iyi​ are fixed throughout. The following conventions apply:

  • All integrals here are Bochner integrals. They take the value 000 whenever the integrand is not integrable.
  • A division by 000 in ω/c~(x)\omega/\tilde c(x)ω/c~(x) evaluates to 000.
  • If vvv is not twice differentiable at a point, the Laplacian there takes a default value rather than being undefined.
  • For M=0M=0M=0 the misfit sum is 000, and the right-hand side of the adjoint identity is 000.

Conclusions. All three of the following hold. Each derivative is the ordinary derivative of a real-valued function of a real variable ttt, taken at t=0t=0t=0.

  1. Variation in the multiplier. For every complex test function φ\varphiφ,
ddt∣t=0 L(c;  u,  2λ+tφ)=0.\frac{d}{dt}\Big|_{t=0}\, \mathcal{L}\big(c;\; u,\; 2\lambda + t\varphi\big) = 0.dtd​​t=0​L(c;u,2λ+tφ)=0.
  1. Variation in the field. For every complex test function φ\varphiφ,
ddt∣t=0 L(c;  u+tφ,  2λ)=0.\frac{d}{dt}\Big|_{t=0}\, \mathcal{L}\big(c;\; u + t\varphi,\; 2\lambda\big) = 0.dtd​​t=0​L(c;u+tφ,2λ)=0.
  1. Variation in the sound speed. For every real-valued test function hhh,
ddt∣t=0 L(c+th;  u,  2λ)=∫Rn4 ω2 Re⁡ ⁣(λ(x)‾ u(x))c(x)3 h(x) dx.\frac{d}{dt}\Big|_{t=0}\, \mathcal{L}\big(c + t h;\; u,\; 2\lambda\big) = \int_{\mathbb{R}^n} \frac{4\,\omega^2\,\operatorname{Re}\!\big(\overline{\lambda(x)}\,u(x)\big)}{c(x)^3}\, h(x)\,dx .dtd​​t=0​L(c+th;u,2λ)=∫Rn​c(x)34ω2Re(λ(x)​u(x))​h(x)dx.

In each case the assertion is that the derivative exists and equals the stated value. In every conclusion the multiplier slot of L\mathcal{L}L is filled by 2λ2\lambda2λ, not by λ\lambdaλ.

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

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 25, 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