Acoustic wave operator and monopole, dipole and homogeneous Green's functions of an inhomogeneous lossless medium
DefinitionArxiv2412_13833_BasicObjects of Appendix A of Wapenaar (2025), Multiple reflections on Huygens' principle.
-
Space and time. A point of space is , with horizontal coordinates ( in 2D, in 3D) and the depth , which points downward. Space-time points are . Test functions are the smooth, compactly supported real functions . Distributions are the continuous linear functionals on them, as in Mathlib.
-
Medium. An inhomogeneous lossless acoustic medium is given by a mass density and a propagation velocity . Both are smooth and independent of time.
-
Wave operator (A-2). . The operator is formally self-adjoint, so for a distribution the equation means for every test function .
-
Sources. These are the right-hand sides of (A-3), (A-5) and (A-12), as functionals of :
- acts as ;
- acts as ;
- acts as .
-
Causality (A-4). for : for every test function supported in .
-
Time reversal and time derivative. means , and .
-
Green's functions. All three are causal.
- solves (A-3): .
- The monopole Green's function solves (A-5): .
- The dipole Green's function solves (A-12): .
Each is a distribution in for a fixed source point .
Formalization Note The paper writes as a function. Here a time-reversed distribution is characterized by its action on test functions, and statements take it as a second distribution together with that characterization. Smooth coefficients are needed for to act on distributions; the paper does not state a regularity class.
import Mathlib
/-!
K. Wapenaar, *Multiple reflections on Huygens' principle*, arXiv:2412.13833v2 (2025):
the acoustic wave operator of an inhomogeneous lossless medium and the monopole, dipole and
homogeneous Green's functions of Appendix A (eqs. (A-1)-(A-14), PDF pp. 20-21).
A point of space is `x = (x_H, z)`, with `n` horizontal coordinates `x_H` (`n = 1` in 2D,
`n = 2` in 3D) and the depth `z` (pointing downward). Green's functions are distributions
(in Mathlib's sense) on space-time `(x, t)`.
-/
open TopologicalSpace
noncomputable section
namespace Arxiv2412_13833
/-- Appendix A: a point `x = (x_H, z)` of space, with `n` horizontal coordinates and the
depth `z`. -/
abbrev Space (n : ℕ) := EuclideanSpace ℝ (Fin n) × ℝ
/-- Appendix A: a point `(x, t)` of space-time. -/
abbrev SpaceTime (n : ℕ) := Space n × ℝ
/-- Real-valued smooth compactly supported test functions on space-time. -/
abbrev TestFn (n : ℕ) := TestFunction (⊤ : Opens (SpaceTime n)) ℝ (⊤ : ℕ∞)
/-- Real-valued distributions on space-time (continuous linear functionals on `TestFn n`). -/
abbrev Distrib (n : ℕ) := Distribution (⊤ : Opens (SpaceTime n)) ℝ (⊤ : ℕ∞)
/-- Appendix A-1: an inhomogeneous lossless acoustic medium, given by its mass density
`ρ(x) > 0` and propagation velocity `c(x) > 0`, both independent of time. The coefficients are
taken smooth so that the wave operator (A-2) acts on distributions. -/
structure Medium (n : ℕ) where
/-- Mass density `ρ(x)`. -/
rho : Space n → ℝ
/-- Propagation velocity `c(x)`. -/
c : Space n → ℝ
rho_pos : ∀ x, 0 < rho x
c_pos : ∀ x, 0 < c x
rho_smooth : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) rho
c_smooth : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) c
/-- The space-time direction of the `i`-th horizontal coordinate. -/
def hDir {n : ℕ} (i : Fin n) : SpaceTime n := ((EuclideanSpace.single i 1, 0), 0)
/-- The space-time direction of the depth coordinate `z` (pointing downward). -/
def zDir {n : ℕ} : SpaceTime n := ((0, 1), 0)
/-- The space-time direction of time `t`. -/
def tDir {n : ℕ} : SpaceTime n := (0, 1)
/-- The space direction of the depth coordinate `z`, used to move a source point vertically. -/
def zSpaceDir {n : ℕ} : Space n := (0, 1)
/-- Directional derivative `∂_v f` of a function on space-time. -/
def pderiv {n : ℕ} (v : SpaceTime n) (f : SpaceTime n → ℝ) : SpaceTime n → ℝ :=
fun p => fderiv ℝ f p v
/-- Eq. (A-2): the wave operator `L = ∇·(1/ρ)∇ - (1/(ρc²)) ∂_t²` applied to a function on
space-time. -/
def waveOp {n : ℕ} (M : Medium n) (f : SpaceTime n → ℝ) : SpaceTime n → ℝ :=
fun p =>
(∑ i, pderiv (hDir i) (fun q => (M.rho q.1)⁻¹ * pderiv (hDir i) f q) p) +
pderiv zDir (fun q => (M.rho q.1)⁻¹ * pderiv zDir f q) p -
(M.rho p.1 * M.c p.1 ^ 2)⁻¹ * pderiv tDir (pderiv tDir f) p
/-- Eq. (A-2) on distributions: `L u = f`, where `f` is a linear functional on test functions.
The operator `L` is formally self-adjoint, so `⟨L u, φ⟩ = ⟨u, L φ⟩`; the condition reads
`u(L φ) = f(φ)` for every test function `φ` (for a smooth medium, `L φ` is again a test
function). -/
def SolvesWave {n : ℕ} (M : Medium n) (u : Distrib n) (f : TestFn n → ℝ) : Prop :=
∀ φ ψ : TestFn n, (⇑ψ = waveOp M ⇑φ) → u ψ = f φ
/-- Eq. (A-3), right-hand side: the impulsive source `-δ(x - x') δ(t)`, i.e. `φ ↦ -φ(x', 0)`. -/
def impulseSource {n : ℕ} (x' : Space n) : TestFn n → ℝ :=
fun φ => -φ (x', 0)
/-- Eq. (A-5), right-hand side: the source `-δ(x - x') ∂_t δ(t)` of an impulsive
volume-injection rate, i.e. `φ ↦ ∂_t φ(x', 0)`. -/
def monopoleSource {n : ℕ} (x' : Space n) : TestFn n → ℝ :=
fun φ => pderiv tDir ⇑φ (x', 0)
/-- Eq. (A-12), right-hand side: the vertical dipole source `(1/ρ(x')) ∂_z δ(x - x') δ(t)`,
i.e. `φ ↦ -(1/ρ(x')) ∂_z φ(x', 0)`. -/
def dipoleSource {n : ℕ} (M : Medium n) (x' : Space n) : TestFn n → ℝ :=
fun φ => -((M.rho x')⁻¹ * pderiv zDir ⇑φ (x', 0))
/-- Eq. (A-4): causality, `u = 0` for `t < 0`, i.e. `u` vanishes on every test function
supported in `{t < 0}`. -/
def IsCausal {n : ℕ} (u : Distrib n) : Prop :=
∀ φ : TestFn n, (∀ p ∈ tsupport ⇑φ, p.2 < 0) → u φ = 0
/-- Appendix A-2: `v` is the time reversal of `u`, `v(x, t) = u(x, -t)`, i.e.
`v(φ) = u(φ(·, -·))` for every test function `φ`. -/
def IsTimeReversal {n : ℕ} (u v : Distrib n) : Prop :=
∀ φ ψ : TestFn n, (⇑ψ = fun p => φ (p.1, -p.2)) → v φ = u ψ
/-- The time derivative `∂_t u` of a distribution, `(∂_t u)(φ) = -u(∂_t φ)`. -/
def timeDeriv {n : ℕ} (u : Distrib n) : Distrib n :=
Distribution.lineDerivCLM (k := (⊤ : ℕ∞)) (n := (⊤ : ℕ∞)) tDir u
/-- Eqs. (A-3)-(A-4): `u` is the Green's function `𝒢(x, x', t)` with source point `x'`, the
causal solution of `L 𝒢 = -δ(x - x') δ(t)`. -/
def IsImpulseGreen {n : ℕ} (M : Medium n) (x' : Space n) (u : Distrib n) : Prop :=
SolvesWave M u (impulseSource x') ∧ IsCausal u
/-- Eq. (A-5): `u` is the monopole Green's function `G(x, x', t)` with source point `x'`, the
causal solution of `L G = -δ(x - x') ∂_t δ(t)`. -/
def IsMonopoleGreen {n : ℕ} (M : Medium n) (x' : Space n) (u : Distrib n) : Prop :=
SolvesWave M u (monopoleSource x') ∧ IsCausal u
/-- Eq. (A-12): `u` is the dipole Green's function `G_d(x, x', t)` with source point `x'`, the
causal solution of `L G_d = (1/ρ(x')) ∂_z δ(x - x') δ(t)`. -/
def IsDipoleGreen {n : ℕ} (M : Medium n) (x' : Space n) (u : Distrib n) : Prop :=
SolvesWave M u (dipoleSource M x') ∧ IsCausal u
end Arxiv2412_13833
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Space and space-time. For a natural number , a point of space is a pair , where (with the Euclidean structure) is the horizontal coordinate and is the depth. So space is . A point of space-time is a pair with in space and , so space-time is . Any is allowed. When there are no horizontal coordinates, and space is just the depth line .
Test functions. A test function is a real-valued function on all of space-time that is infinitely differentiable () and has compact support. The set of these is denoted .
Distributions. A distribution is a real-valued continuous linear functional , with continuity taken in Mathlib's standard topology on test functions. The set of these is denoted .
Medium. A medium on space consists of two functions , the density and the velocity. Both are required to satisfy:
- and for every point of space;
- and are .
Both functions depend only on the spatial point , not on time. No upper or lower bounds beyond strict positivity are imposed.
Coordinate directions. The following fixed vectors are defined, where is the -th standard basis vector of for :
- the horizontal direction in space-time;
- the depth direction in space-time;
- the time direction in space-time;
- the spatial depth direction in space.
The spatial depth direction is defined but not used by any other declaration in this file.
Directional derivative. For a vector in space-time and any function from space-time to , define
the Fréchet derivative of at applied to . If is not differentiable at , this value is by convention (a junk value), not undefined. The shorthands below are used throughout:
- ;
- ;
- .
Wave operator. For a medium and any function on space-time (no regularity is required), define at :
Here means the function . Every derivative is the directional derivative above, so it takes the junk value wherever the function being differentiated is not differentiable. When the sum is empty.
Solving the wave equation. For a medium , a distribution , and an arbitrary function , " solves the wave equation with right-hand side " means:
for all test functions such that pointwise on space-time, we have .
Equivalently, for every test function whose image is itself a test function. For any with not a test function, the condition imposes nothing. Note that:
- is not required to be linear or continuous;
- the operator applied to is itself, not a separately defined adjoint.
Impulse source. For a spatial point , define
Monopole source. For a spatial point , define
The sign is plus.
Dipole source. For a medium and a spatial point , define
Causality. A distribution is causal if
for every test function whose closed support satisfies
The condition holds trivially for , whose support is empty. Since supports are compact, any qualifying in fact vanishes for , for some depending on .
Time reversal. For distributions and , " is the time reversal of " means:
for all test functions with for every , we have .
Time derivative of a distribution. For a distribution , is Mathlib's distributional line derivative of in the direction , returned as a distribution. Under the standard convention it acts by
Impulse Green's function. For a medium , a spatial point , and a distribution , " is an impulse Green's function with source point " means both of the following hold:
- solves the wave equation with right-hand side , i.e. whenever is a test function;
- is causal.
This is a property of only. Neither existence nor uniqueness of such a is asserted.
Monopole Green's function. " is a monopole Green's function with source point " means both of the following hold:
- for every test function with a test function;
- is causal.
Neither existence nor uniqueness is asserted.
Dipole Green's function. " is a dipole Green's function with source point " means both of the following hold:
- for every test function with a test function;
- is causal.
The density in this condition is evaluated at the source point . Neither existence nor uniqueness is asserted.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.