Helmholtz operator, FWI Lagrangian and point-source adjoint equation
DefinitionArxiv2507_15035_BasicObjects of Section III of Zeng et al. (2025), OpenBreastUS, for the frequency-domain acoustic model of ultrasound computed tomography.
- Space and sound speed (Section III-A). Points are . A sound-speed distribution is a measurable function with for some constant . Its variation is confined to a bounded region of interest , and outside it for a constant .
- Helmholtz operator (eqs. (1), (5)). At angular frequency , for a complex field ,
- Pairing (p. 4). is the real part of the inner product.
- Misfit (eq. (3)). For transducer locations and measurements , the misfit is .
- Lagrangian (eq. (4)). For a source and a multiplier , one term of the Lagrangian is
The paper's full Lagrangian is the sum of these terms over frequencies and sources . 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 solves in the sense of distributions if is locally integrable and, for every complex test function ,
Formalization Note The Laplacian is Mathlib's Laplacian on (the trace of the second derivative). The integrals are Lebesgue integrals over . Statements 1–3 assume that 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 ; the bound is added as the physical convention that makes locally bounded.
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
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Ambient space. For a natural number , the space is with its usual Euclidean structure. All integrals below are with respect to Lebesgue measure on . may be any natural number, including . In that case 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 ,
- a set ,
- a real number ,
the predicate " is a sound speed with region of interest and background value " holds exactly when all five of the following are true:
- is (Borel) measurable;
- there exists a real with for every ;
- is a bounded set;
- ;
- for every .
No upper bound on is required, and no continuity or smoothness of is required. is not required to be open, closed, measurable or nonempty. If , condition 5 forces . If is all of , then condition 5 is vacuous and is unconstrained except . This can happen only when , because is unbounded for .
Helmholtz operator (helmholtzOp). Given:
- a real number (any real, including or negative),
- a function (no assumptions),
- a complex-valued function ,
the value of at a point is
Here:
- is the Laplacian of at , that is, the sum of the pure second partial derivatives . These derivatives are taken with respect to the real coordinates, applied to the complex values.
- The Laplacian is built from iterated derivatives. Wherever (or its first derivative) fails to be differentiable, the corresponding derivative is assigned the conventional value rather than being undefined. For non-smooth , is therefore a conventional value and not a genuine second derivative.
- The coefficient is a real number embedded into . If , the quotient is defined to be , so the coefficient is at such points.
Real pairing (realPairing). For complex-valued functions on ,
The integral is a Bochner integral. If is not integrable, the integral is defined to be , so in that case. No integrability or square-integrability of or is assumed.
Data misfit (misfit). Given:
- a natural number ,
- points (not required to be distinct),
- complex numbers ,
- a function ,
the misfit is
It depends only on the values of at the given points. If , the sum is empty and the misfit is .
Lagrangian term (lagrangianTerm). Given:
- ,
- (not assumed to be a sound speed in the sense above; arbitrary),
- a source ,
- points and data ,
- a field ,
- a multiplier ,
the Lagrangian term is the real number
The pairing term is subtracted. It inherits every convention described above:
- is a conventional value where is not twice differentiable;
- where ;
- the integral is whenever its integrand is not integrable, in which case equals the misfit alone.
Test functions (IsTestFn). For a function from into any real normed vector space , " is a test function" means both of the following:
- is infinitely differentiable () as a map of real variables;
- has compact support, meaning the closure of is compact.
Weak point-source solution (IsWeakPointSourceSol). Given:
- ,
- (arbitrary; not assumed measurable, positive, or a sound speed),
- ,
- points ,
- complex weights ,
the predicate holds exactly when:
- is locally integrable, meaning it is integrable on a neighbourhood of every point;
- for every complex-valued function with compact support,
Notes on this definition:
- No complex conjugation appears on or on .
- The operator is applied to the test function , not to .
- Since is smooth, is the genuine Laplacian.
- is taken to be wherever .
- The left side is a Bochner integral, which is defined to be whenever the integrand is not integrable. Because nothing bounds or ensures its measurability, condition 2 can be satisfied for a given through this convention, when the integrand fails to be integrable and the right side is .
- If , the right side is for every .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.