Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Helmholtz operator, FWI Lagrangian and point-source adjoint equation

Definition
Arxiv2507_15035_Basic

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

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

Objects of Section III of Zeng et al. (2025), OpenBreastUS, for the frequency-domain acoustic model of ultrasound computed tomography.

  1. Space and sound speed (Section III-A). Points are x∈Rnx\in\mathbb{R}^nx∈Rn. A sound-speed distribution is a measurable function c:Rn→Rc:\mathbb{R}^n\to\mathbb{R}c:Rn→R with c(x)≥mc(x)\ge mc(x)≥m for some constant m>0m>0m>0. Its variation is confined to a bounded region of interest ROI\mathrm{ROI}ROI, and outside it c(x)=c0c(x)=c_0c(x)=c0​ for a constant c0>0c_0>0c0​>0.
  2. Helmholtz operator (eqs. (1), (5)). At angular frequency ω\omegaω, for a complex field u:Rn→Cu:\mathbb{R}^n\to\mathbb{C}u:Rn→C,
Scu(x)=∇2u(x)+(ωc(x))2u(x).\mathcal S_c u(x)=\nabla^2u(x)+\Big(\frac{\omega}{c(x)}\Big)^2u(x).Sc​u(x)=∇2u(x)+(c(x)ω​)2u(x).
  1. Pairing (p. 4). ⟨f,g⟩=Re⁡∫Rnf(x)‾ g(x) dx\langle f,g\rangle=\operatorname{Re}\int_{\mathbb{R}^n}\overline{f(x)}\,g(x)\,dx⟨f,g⟩=Re∫Rn​f(x)​g(x)dx is the real part of the L2L^2L2 inner product.
  2. Misfit (eq. (3)). For transducer locations xf(1),…,xf(M)x_f^{(1)},\dots,x_f^{(M)}xf(1)​,…,xf(M)​ and measurements y∈CMy\in\mathbb{C}^My∈CM, the misfit is ∥y−u(xf)∥22=∑i=1M∣y(i)−u(xf(i))∣2\|y-u(x_f)\|_2^2=\sum_{i=1}^M|y^{(i)}-u(x_f^{(i)})|^2∥y−u(xf​)∥22​=∑i=1M​∣y(i)−u(xf(i)​)∣2.
  3. Lagrangian (eq. (4)). For a source sss and a multiplier λ\lambdaλ, one term of the Lagrangian is
L(c,u,λ)=∥y−u(xf)∥22−⟨λ,Scu+s⟩.\mathcal L(c,u,\lambda)=\|y-u(x_f)\|_2^2-\langle\lambda,\mathcal S_cu+s\rangle.L(c,u,λ)=∥y−u(xf​)∥22​−⟨λ,Sc​u+s⟩.

The paper's full Lagrangian is the sum of these terms over frequencies ωj\omega_jωj​ and sources sks_ksk​. 6. Test functions. A test function is a smooth function with compact support. Test functions serve as the directions of variation. 7. Adjoint equation with point sources (eq. (7)). A function λ\lambdaλ solves Scλ=∑iai δ(xf(i))\mathcal S_c\lambda=\sum_i a_i\,\delta(x_f^{(i)})Sc​λ=∑i​ai​δ(xf(i)​) in the sense of distributions if λ\lambdaλ is locally integrable and, for every complex test function φ\varphiφ,

∫λ Scφ dx=∑i=1Mai φ(xf(i)).\int\lambda\,\mathcal S_c\varphi\,dx=\sum_{i=1}^M a_i\,\varphi(x_f^{(i)}).∫λSc​φdx=i=1∑M​ai​φ(xf(i)​).

Formalization Note The Laplacian is Mathlib's Laplacian on Rn\mathbb{R}^nRn (the trace of the second derivative). The integrals are Lebesgue integrals over Rn\mathbb{R}^nRn. Statements 1–3 assume that λ‾ (Scu+s)\overline\lambda\,(\mathcal S_cu+s)λ(Sc​u+s) is integrable, so that the pairing is defined. The goal does not need this hypothesis: there the forward equation makes the integrand vanish almost everywhere. The paper gives no lower bound on ccc; the bound c≥m>0c\ge m>0c≥m>0 is added as the physical convention that makes (ω/c)2(\omega/c)^2(ω/c)2 locally bounded.

Definition code
import Mathlib

/-!
Zeng, Zheng, Hu, Dong, Zheng, Liu, Wang, Shi, Zhang, Li and Sun, *OpenBreastUS: Benchmarking
Neural Operators for Wave Imaging Using Breast Ultrasound Computed Tomography*,
arXiv:2507.15035v1 (2025): the Helmholtz forward model of Section III-A (eqs. (1)-(3)) and the
Lagrangian of the full-waveform-inversion problem of Section III-B (eqs. (4)-(5), (7)).
-/

open MeasureTheory

noncomputable section

namespace Arxiv2507_15035

/-- The physical space `ℝⁿ` (Section III-A, eq. (2), which is written in dimension `n`). -/
abbrev Pt (n : ℕ) := EuclideanSpace ℝ (Fin n)

/-- Section III-A, p. 3: `c` is a sound-speed distribution whose variation is confined to a
bounded region of interest `ROI`, outside of which it equals the constant `c0 > 0`. The sound
speed is measurable and bounded below by a positive constant (the physical convention implicit
in the division by `c(x)` in eq. (1)). -/
def IsSoundSpeed {n : ℕ} (c : Pt n → ℝ) (ROI : Set (Pt n)) (c0 : ℝ) : Prop :=
  Measurable c ∧ (∃ m : ℝ, 0 < m ∧ ∀ x, m ≤ c x) ∧ Bornology.IsBounded ROI ∧ 0 < c0 ∧
    ∀ x, x ∉ ROI → c x = c0

/-- Eq. (5) (and the left side of eq. (1)): the Helmholtz operator
`S_c u = ∇²u + (ω / c(x))² u` at angular frequency `ω`. -/
def helmholtzOp {n : ℕ} (ω : ℝ) (c : Pt n → ℝ) (u : Pt n → ℂ) (x : Pt n) : ℂ :=
  Laplacian.laplacian u x + (((ω / c x) ^ 2 : ℝ) : ℂ) * u x

/-- The pairing `⟨f, g⟩` of eq. (4), "the real part of the inner product of `f` and `g` in
`L²`" (p. 4): `Re ∫ conj(f x) g(x) dx`. -/
def realPairing {n : ℕ} (f g : Pt n → ℂ) : ℝ :=
  (∫ x, (starRingEnd ℂ) (f x) * g x).re

/-- Eq. (3): the data misfit `‖y - u(x_f)‖₂² = ∑ᵢ |yᵢ - u(x_f⁽ⁱ⁾)|²` of a field `u` against the
measurements `y` at the transducer locations `x_f⁽¹⁾, …, x_f⁽ᴹ⁾`. -/
def misfit {n M : ℕ} (xf : Fin M → Pt n) (y : Fin M → ℂ) (u : Pt n → ℂ) : ℝ :=
  ∑ i, ‖y i - u (xf i)‖ ^ 2

/-- Eq. (4): one term `L_k^j = ‖y_k^j - u_k^j(x_f)‖₂² - ⟨λ_k^j, S_c^j u_k^j + s_k⟩` of the
Lagrangian of the FWI problem, for frequency `ω = ω_j`, source `s = s_k`, measurements
`y = y_k^j`, field `u = u_k^j` and multiplier `lam = λ_k^j`. -/
def lagrangianTerm {n M : ℕ} (ω : ℝ) (c : Pt n → ℝ) (s : Pt n → ℂ) (xf : Fin M → Pt n)
    (y : Fin M → ℂ) (u lam : Pt n → ℂ) : ℝ :=
  misfit xf y u - realPairing lam (fun x => helmholtzOp ω c u x + s x)

/-- Test functions (directions of variation in eqs. (6)-(8)): smooth functions with compact
support. -/
def IsTestFn {n : ℕ} {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] (φ : Pt n → F) :
    Prop :=
  ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) φ ∧ HasCompactSupport φ

/-- Eq. (7), p. 4: `lam` solves `S_c lam = ∑ᵢ aᵢ δ(x_f⁽ⁱ⁾)` in the sense of distributions, with
`δ(x_f⁽ⁱ⁾)` the unit point source (Dirac mass) at the transducer `x_f⁽ⁱ⁾`: `lam` is locally
integrable and `∫ lam · S_c φ = ∑ᵢ aᵢ φ(x_f⁽ⁱ⁾)` for every test function `φ` (`S_c` has real
coefficients and is formally symmetric). -/
def IsWeakPointSourceSol {n M : ℕ} (ω : ℝ) (c : Pt n → ℝ) (lam : Pt n → ℂ)
    (xf : Fin M → Pt n) (a : Fin M → ℂ) : Prop :=
  LocallyIntegrable lam ∧
    ∀ φ : Pt n → ℂ, IsTestFn φ → ∫ x, lam x * helmholtzOp ω c φ x = ∑ i, a i * φ (xf i)

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

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

Ambient space. For a natural number nnn, the space PnP_nPn​ is Rn\mathbb{R}^nRn with its usual Euclidean structure. All integrals below are with respect to Lebesgue measure on Rn\mathbb{R}^nRn. nnn may be any natural number, including n=0n = 0n=0. In that case R0\mathbb{R}^0R0 is a single point, the "Lebesgue measure" is the unit mass at that point, and every integral reduces to evaluation at that point.


Sound speed (IsSoundSpeed). Given:

  • a real-valued function c:Rn→Rc : \mathbb{R}^n \to \mathbb{R}c:Rn→R,
  • a set ROI⊆Rn\mathrm{ROI} \subseteq \mathbb{R}^nROI⊆Rn,
  • a real number c0c_0c0​,

the predicate "ccc is a sound speed with region of interest ROI\mathrm{ROI}ROI and background value c0c_0c0​" holds exactly when all five of the following are true:

  1. ccc is (Borel) measurable;
  2. there exists a real m>0m > 0m>0 with c(x)≥mc(x) \ge mc(x)≥m for every x∈Rnx \in \mathbb{R}^nx∈Rn;
  3. ROI\mathrm{ROI}ROI is a bounded set;
  4. c0>0c_0 > 0c0​>0;
  5. c(x)=c0c(x) = c_0c(x)=c0​ for every x∉ROIx \notin \mathrm{ROI}x∈/ROI.

No upper bound on ccc is required, and no continuity or smoothness of ccc is required. ROI\mathrm{ROI}ROI is not required to be open, closed, measurable or nonempty. If ROI=∅\mathrm{ROI} = \emptysetROI=∅, condition 5 forces c≡c0c \equiv c_0c≡c0​. If ROI\mathrm{ROI}ROI is all of Rn\mathbb{R}^nRn, then condition 5 is vacuous and c0c_0c0​ is unconstrained except c0>0c_0 > 0c0​>0. This can happen only when n=0n = 0n=0, because Rn\mathbb{R}^nRn is unbounded for n≥1n \ge 1n≥1.


Helmholtz operator (helmholtzOp). Given:

  • a real number ω\omegaω (any real, including 000 or negative),
  • a function c:Rn→Rc : \mathbb{R}^n \to \mathbb{R}c:Rn→R (no assumptions),
  • a complex-valued function u:Rn→Cu : \mathbb{R}^n \to \mathbb{C}u:Rn→C,

the value of ScωuS_c^\omega uScω​u at a point xxx is

(Scωu)(x)  =  Δu(x)  +  (ωc(x))2u(x).(S_c^\omega u)(x) \;=\; \Delta u(x) \;+\; \left(\frac{\omega}{c(x)}\right)^{2} u(x).(Scω​u)(x)=Δu(x)+(c(x)ω​)2u(x).

Here:

  • Δu(x)\Delta u(x)Δu(x) is the Laplacian of uuu at xxx, that is, the sum of the pure second partial derivatives ∑i=1n∂i2u(x)\sum_{i=1}^n \partial_i^2 u(x)∑i=1n​∂i2​u(x). These derivatives are taken with respect to the real coordinates, applied to the complex values.
  • The Laplacian is built from iterated derivatives. Wherever uuu (or its first derivative) fails to be differentiable, the corresponding derivative is assigned the conventional value 000 rather than being undefined. For non-smooth uuu, Δu(x)\Delta u(x)Δu(x) is therefore a conventional value and not a genuine second derivative.
  • The coefficient (ω/c(x))2(\omega / c(x))^2(ω/c(x))2 is a real number embedded into C\mathbb{C}C. If c(x)=0c(x) = 0c(x)=0, the quotient ω/c(x)\omega / c(x)ω/c(x) is defined to be 000, so the coefficient is 000 at such points.

Real L2L^2L2 pairing (realPairing). For complex-valued functions f,gf, gf,g on Rn\mathbb{R}^nRn,

⟨f,g⟩  =  Re⁡∫Rnf(x)‾ g(x) dx.\langle f, g\rangle \;=\; \operatorname{Re} \int_{\mathbb{R}^n} \overline{f(x)}\, g(x)\, dx .⟨f,g⟩=Re∫Rn​f(x)​g(x)dx.

The integral is a Bochner integral. If x↦f(x)‾ g(x)x \mapsto \overline{f(x)}\,g(x)x↦f(x)​g(x) is not integrable, the integral is defined to be 000, so ⟨f,g⟩=0\langle f, g\rangle = 0⟨f,g⟩=0 in that case. No integrability or square-integrability of fff or ggg is assumed.


Data misfit (misfit). Given:

  • a natural number MMM,
  • points xf(1),…,xf(M)∈Rnx_f^{(1)}, \dots, x_f^{(M)} \in \mathbb{R}^nxf(1)​,…,xf(M)​∈Rn (not required to be distinct),
  • complex numbers y1,…,yMy_1, \dots, y_My1​,…,yM​,
  • a function u:Rn→Cu : \mathbb{R}^n \to \mathbb{C}u:Rn→C,

the misfit is

misfit(u)  =  ∑i=1M∣ yi−u(xf(i))∣2.\mathrm{misfit}(u) \;=\; \sum_{i=1}^{M} \bigl|\, y_i - u\bigl(x_f^{(i)}\bigr) \bigr|^{2}.misfit(u)=i=1∑M​​yi​−u(xf(i)​)​2.

It depends only on the values of uuu at the MMM given points. If M=0M = 0M=0, the sum is empty and the misfit is 000.


Lagrangian term (lagrangianTerm). Given:

  • ω∈R\omega \in \mathbb{R}ω∈R,
  • c:Rn→Rc : \mathbb{R}^n \to \mathbb{R}c:Rn→R (not assumed to be a sound speed in the sense above; arbitrary),
  • a source s:Rn→Cs : \mathbb{R}^n \to \mathbb{C}s:Rn→C,
  • points xf(1),…,xf(M)x_f^{(1)}, \dots, x_f^{(M)}xf(1)​,…,xf(M)​ and data y1,…,yM∈Cy_1, \dots, y_M \in \mathbb{C}y1​,…,yM​∈C,
  • a field u:Rn→Cu : \mathbb{R}^n \to \mathbb{C}u:Rn→C,
  • a multiplier λ:Rn→C\lambda : \mathbb{R}^n \to \mathbb{C}λ:Rn→C,

the Lagrangian term is the real number

L  =  ∑i=1M∣ yi−u(xf(i))∣2  −  Re⁡∫Rnλ(x)‾ (Δu(x)+(ωc(x))2u(x)+s(x)) dx.L \;=\; \sum_{i=1}^{M} \bigl|\, y_i - u\bigl(x_f^{(i)}\bigr) \bigr|^{2} \;-\; \operatorname{Re} \int_{\mathbb{R}^n} \overline{\lambda(x)}\, \Bigl( \Delta u(x) + \bigl(\tfrac{\omega}{c(x)}\bigr)^{2} u(x) + s(x) \Bigr)\, dx .L=i=1∑M​​yi​−u(xf(i)​)​2−Re∫Rn​λ(x)​(Δu(x)+(c(x)ω​)2u(x)+s(x))dx.

The pairing term is subtracted. It inherits every convention described above:

  • Δu\Delta uΔu is a conventional value where uuu is not twice differentiable;
  • (ω/c(x))2=0(\omega/c(x))^2 = 0(ω/c(x))2=0 where c(x)=0c(x) = 0c(x)=0;
  • the integral is 000 whenever its integrand is not integrable, in which case LLL equals the misfit alone.

Test functions (IsTestFn). For a function φ\varphiφ from Rn\mathbb{R}^nRn into any real normed vector space FFF, "φ\varphiφ is a test function" means both of the following:

  • φ\varphiφ is infinitely differentiable (C∞C^\inftyC∞) as a map of real variables;
  • φ\varphiφ has compact support, meaning the closure of {x:φ(x)≠0}\{x : \varphi(x) \ne 0\}{x:φ(x)=0} is compact.

Weak point-source solution (IsWeakPointSourceSol). Given:

  • ω∈R\omega \in \mathbb{R}ω∈R,
  • c:Rn→Rc : \mathbb{R}^n \to \mathbb{R}c:Rn→R (arbitrary; not assumed measurable, positive, or a sound speed),
  • λ:Rn→C\lambda : \mathbb{R}^n \to \mathbb{C}λ:Rn→C,
  • points xf(1),…,xf(M)∈Rnx_f^{(1)}, \dots, x_f^{(M)} \in \mathbb{R}^nxf(1)​,…,xf(M)​∈Rn,
  • complex weights a1,…,aMa_1, \dots, a_Ma1​,…,aM​,

the predicate holds exactly when:

  1. λ\lambdaλ is locally integrable, meaning it is integrable on a neighbourhood of every point;
  2. for every complex-valued C∞C^\inftyC∞ function φ:Rn→C\varphi : \mathbb{R}^n \to \mathbb{C}φ:Rn→C with compact support,
∫Rnλ(x) (Δφ(x)+(ωc(x))2φ(x)) dx  =  ∑i=1Mai φ(xf(i)).\int_{\mathbb{R}^n} \lambda(x)\, \Bigl( \Delta \varphi(x) + \bigl(\tfrac{\omega}{c(x)}\bigr)^{2} \varphi(x) \Bigr)\, dx \;=\; \sum_{i=1}^{M} a_i\, \varphi\bigl(x_f^{(i)}\bigr).∫Rn​λ(x)(Δφ(x)+(c(x)ω​)2φ(x))dx=i=1∑M​ai​φ(xf(i)​).

Notes on this definition:

  • No complex conjugation appears on λ\lambdaλ or on φ\varphiφ.
  • The operator is applied to the test function φ\varphiφ, not to λ\lambdaλ.
  • Since φ\varphiφ is smooth, Δφ\Delta\varphiΔφ is the genuine Laplacian.
  • (ω/c(x))2(\omega / c(x))^2(ω/c(x))2 is taken to be 000 wherever c(x)=0c(x) = 0c(x)=0.
  • The left side is a Bochner integral, which is defined to be 000 whenever the integrand λ⋅Scωφ\lambda \cdot S_c^\omega \varphiλ⋅Scω​φ is not integrable. Because nothing bounds (ω/c)2(\omega/c)^2(ω/c)2 or ensures its measurability, condition 2 can be satisfied for a given φ\varphiφ through this convention, when the integrand fails to be integrable and the right side is 000.
  • If M=0M = 0M=0, the right side is 000 for every φ\varphiφ.
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