Time-reversal mirror, transport equation and explicit moment coefficients (Garnier–Sølna)
DefinitionArxiv2201_05558_BasicObjects of Sections 3.1, 5.4, 5.6 and 5.7 of Garnier and Sølna (2022). Throughout, is the transverse plane with Euclidean norm , inner product and Lebesgue measure.
- Time-reversal mirror (Section 3.1). For a field on the mirror plane (a Green's function ), a Gaussian element of radius centred at gives (eqs. (3.1), (3.3)). The time-reversed field of a Gaussian mirror of radius is (eq. (3.2)), and (eq. (3.5)).
- Transport equation (Section 5.4). is the Fourier transform of the covariance function , and (eq. (5.13)). The right-hand side of (5.14) is
The function of eq. (5.27) is . 3. The functions (eqs. (5.43)-(5.46), (5.57)-(5.60)). With and a parameter ( in Proposition 5.4, in Proposition 5.7):
Here (eq. (5.61)). 4. Coefficients (eqs. (5.39)-(5.42)). For and : , , and . For , , as in the proof of Proposition 5.4. The function is eq. (5.38). 5. Equations of the proofs. The reduced moment equation of the proof of Proposition 5.4 is
on , with initial value as . The coefficient system (5.47)-(5.50) on is
Formalization Note The paper does not specify the branch of in . Here is the determination continuous in with , written as . This is the coefficient that solves (5.47) with . The principal logarithm would jump at , where . The formulas for are undefined at ; Lean assigns them junk values there, which no statement uses.
import Mathlib
/-!
J. Garnier and K. Sølna, *Speckle Memory Effect in the Frequency Domain and Stability in
Time-Reversal Experiments*, arXiv:2201.05558v1 (2022): the time-reversal mirror of Section 3.1,
the transport equation (5.13)-(5.14) of Section 5.4 and its zero-offset solution (5.27), the
explicit coefficient functions of Propositions 5.4 and 5.7 (Sections 5.6 and 5.7), and the
reduced moment equation and coefficient ODE system (5.47)-(5.50) used in their proofs.
-/
open MeasureTheory Filter Topology
noncomputable section
namespace Arxiv2201_05558
/-- The transverse plane `ℝ²` of the paper (Section 2), with its Euclidean norm, inner product
and Lebesgue measure. -/
abbrev Plane := EuclideanSpace ℝ (Fin 2)
/-! ### Section 3.1: the time-harmonic time-reversal mirror -/
/-- Eqs. (3.1) and (3.3): the field `G` (a Green's function `x' ↦ 𝒢(ω, L, ·, x')` on the mirror
plane) smoothed by a Gaussian mirror element of radius `ρ₀` centred at `x_m`:
`(2πρ₀²)⁻¹ ∫ G(x_m + x') exp(-|x'|²/(2ρ₀²)) dx'`. -/
def elemField (ρ0 : ℝ) (G : Plane → ℂ) (xm : Plane) : ℂ :=
(1 / (2 * Real.pi * ρ0 ^ 2) : ℂ) *
∫ x', G (xm + x') * (Real.exp (-‖x'‖ ^ 2 / (2 * ρ0 ^ 2)) : ℂ)
/-- Eq. (3.2): the time-reversed field `û_tr = ∫ û_em(x_m) exp(-|x_m|²/R_m²) conj(û_rec(x_m)) dx_m`
for a Gaussian mirror of radius `R_m`, where `û_em` is the element field (3.3) of the emitting
Green's function `G1` and `û_rec` the element field (3.1) of the recording Green's function `G2`. -/
def trField (Rm ρ0 : ℝ) (G1 G2 : Plane → ℂ) : ℂ :=
∫ xm, elemField ρ0 G1 xm * (Real.exp (-‖xm‖ ^ 2 / Rm ^ 2) : ℂ) *
starRingEnd ℂ (elemField ρ0 G2 xm)
/-- Eq. (3.5): the constant `K₀ = c_o²(r₀² - ρ₀²) / (16 π ω ω̃ ρ₀² r₀²)`. -/
def K0 (c0 ω ωt r0 ρ0 : ℝ) : ℝ :=
c0 ^ 2 * (r0 ^ 2 - ρ0 ^ 2) / (16 * Real.pi * ω * ωt * ρ0 ^ 2 * r0 ^ 2)
/-! ### Section 5.4: the transport equation -/
/-- The Fourier transform `Ĉ(k) = ∫ C(x) e^{-i k·x} dx` of the covariance function `C` of (2.8)
(Section 5.4; `C` is even, so the sign convention of the exponent does not matter). -/
def covFT (C : Plane → ℝ) (k : Plane) : ℂ :=
∫ x, (C x : ℂ) * Complex.exp (-(Complex.I * (inner ℝ k x : ℝ)))
/-- Eq. (5.13): `K(z) = (2π)⁴ exp(-ω₀² C(0) z / (4 c_o²))`. -/
def Kcoh (ω0 c0 : ℝ) (C : Plane → ℝ) (z : ℝ) : ℝ :=
(2 * Real.pi) ^ 4 * Real.exp (-(ω0 ^ 2 / (4 * c0 ^ 2)) * C 0 * z)
/-- Eq. (5.14): the right-hand side of the transport equation for `A(z, ξ, ζ, Ω)` (with `ζ` and
`Ω` frozen):
`(i c_o Ω/ω₀²)|ξ|² A + ω₀²/(4(2π)²c_o²) ∫ Ĉ(k)[A(ξ-k) e^{i c_o z k·ζ/ω₀} - A(ξ)] dk
+ ω₀²/(4(2π)²c_o²) K(z) Ĉ(ξ) e^{i c_o z ξ·ζ/ω₀}`. -/
def transportRHS (ω0 c0 : ℝ) (C : Plane → ℝ) (Ω : ℝ) (ζ : Plane) (A : ℝ → Plane → ℂ)
(z : ℝ) (ξ : Plane) : ℂ :=
Complex.I * (c0 * Ω / ω0 ^ 2 * ‖ξ‖ ^ 2 : ℝ) * A z ξ +
(ω0 ^ 2 / (4 * (2 * Real.pi) ^ 2 * c0 ^ 2) : ℝ) *
∫ k, covFT C k * (A z (ξ - k) *
Complex.exp (Complex.I * (c0 * z / ω0 * inner ℝ k ζ : ℝ)) - A z ξ) +
(ω0 ^ 2 / (4 * (2 * Real.pi) ^ 2 * c0 ^ 2) : ℝ) * (Kcoh ω0 c0 C z : ℂ) * covFT C ξ *
Complex.exp (Complex.I * (c0 * z / ω0 * inner ℝ ξ ζ : ℝ))
/-- Eq. (5.27): the explicit function
`A(z, ξ, ζ, 0) = K(z)/(2π)² ∫ [exp(ω₀²/(4c_o²) ∫₀^z C(x + c_o ζ z'/ω₀) dz') - 1] e^{-i ξ·x} dx`. -/
def transportZero (ω0 c0 : ℝ) (C : Plane → ℝ) (ζ : Plane) (z : ℝ) (ξ : Plane) : ℂ :=
(Kcoh ω0 c0 C z / (2 * Real.pi) ^ 2 : ℝ) *
∫ x, ((Real.exp (ω0 ^ 2 / (4 * c0 ^ 2) *
∫ z' in (0 : ℝ)..z, C (x + (c0 * z' / ω0) • ζ)) - 1 : ℝ) : ℂ) *
Complex.exp (-(Complex.I * (inner ℝ ξ x : ℝ)))
/-! ### Sections 5.6-5.7: the functions `Ψ_{a,b,c,d}` -/
/-- The complex number `e^{-iπ/4}`, which appears in (5.43)-(5.46) and (5.57)-(5.61). -/
def eMinusQuarter : ℂ := Complex.exp (-(((Real.pi / 4 : ℝ) : ℂ) * Complex.I))
/-- Eq. (5.57) (eq. (5.43) when `T = 0`): `Ψ_a(s) = ln[cosh(e^{-iπ/4}s) + T sinh(e^{-iπ/4}s)]`,
the logarithm being the determination continuous in `s ≥ 0` with `Ψ_a(0) = 0` (the paper's
`a_Ω` solves (5.47) with `a_Ω(0) = 0`), written as the integral of its `s`-derivative. -/
def psiA (T : ℂ) (s : ℝ) : ℂ :=
∫ t in (0 : ℝ)..s, eMinusQuarter *
((Complex.sinh (eMinusQuarter * t) + T * Complex.cosh (eMinusQuarter * t)) /
(Complex.cosh (eMinusQuarter * t) + T * Complex.sinh (eMinusQuarter * t)))
/-- Eq. (5.58) (eq. (5.44) when `T = 0`):
`Ψ_b(s) = (T + tanh(e^{-iπ/4}s)) / (e^{-iπ/4}s [1 + T tanh(e^{-iπ/4}s)])`. -/
def psiB (T : ℂ) (s : ℝ) : ℂ :=
(T + Complex.tanh (eMinusQuarter * s)) /
(eMinusQuarter * s * (1 + T * Complex.tanh (eMinusQuarter * s)))
/-- The numerator of (5.59) (of (5.45) when `T = 0`), also the integrand base of (5.60):
`e^{-iπ/4}s (T + tanh(e^{-iπ/4}s))/(1 + T tanh(e^{-iπ/4}s)) - 1
+ [cosh(e^{-iπ/4}s) + T sinh(e^{-iπ/4}s)]⁻¹`. -/
def psiNum (T : ℂ) (s : ℝ) : ℂ :=
eMinusQuarter * s * ((T + Complex.tanh (eMinusQuarter * s)) /
(1 + T * Complex.tanh (eMinusQuarter * s))) - 1 +
(Complex.cosh (eMinusQuarter * s) + T * Complex.sinh (eMinusQuarter * s))⁻¹
/-- Eq. (5.59) (eq. (5.45) when `T = 0`): `Ψ_c(s) = 2i · psiNum(s) / s²`. -/
def psiC (T : ℂ) (s : ℝ) : ℂ :=
2 * Complex.I * psiNum T s / (s : ℂ) ^ 2
/-- Eq. (5.60) (eq. (5.46) when `T = 0`): `Ψ_d(s) = 1 - (3i/s³) ∫₀^s psiNum(s')² ds'`. -/
def psiD (T : ℂ) (s : ℝ) : ℂ :=
1 - 3 * Complex.I / (s : ℂ) ^ 3 * ∫ t in (0 : ℝ)..s, psiNum T t ^ 2
/-- Eq. (5.61): `T₀ = 2 e^{-iπ/4} √(c_o³ Ω / D) / (ω₀² ρ₀²)` (for `Ω ≥ 0`). -/
def T0 (ω0 c0 D ρ0 Ω : ℝ) : ℂ :=
2 * eMinusQuarter / (ω0 ^ 2 * ρ0 ^ 2 : ℝ) * (Real.sqrt (c0 ^ 3 * Ω / D) : ℂ)
/-- The argument `s = √(DΩ/(4c_o)) z` of the `Ψ`-functions in (5.39)-(5.42) (for `Ω ≥ 0`). -/
def sArg (c0 D Ω z : ℝ) : ℝ := Real.sqrt (D * Ω / (4 * c0)) * z
/-! ### The coefficients `a_Ω, b_Ω, c_Ω, d_Ω` -/
/-- Eqs. (5.39)-(5.42) for `Ω ≥ 0`: the coefficient `a_Ω(z) = Ψ_a(s)`, the `Ψ`-functions having
parameter `T` (`T = 0` in Proposition 5.4, `T = T₀` in Proposition 5.7). -/
def aPos (c0 D : ℝ) (T : ℂ) (Ω z : ℝ) : ℂ := psiA T (sArg c0 D Ω z)
/-- Eq. (5.40) for `Ω ≥ 0`: `b_Ω(z) = (ω₀² D z / (16 c_o²)) Ψ_b(s)`. -/
def bPos (ω0 c0 D : ℝ) (T : ℂ) (Ω z : ℝ) : ℂ :=
(ω0 ^ 2 * D * z / (16 * c0 ^ 2) : ℝ) * psiB T (sArg c0 D Ω z)
/-- Eq. (5.41) for `Ω ≥ 0`: `c_Ω(z) = (ω₀ D z² / (16 c_o)) Ψ_c(s)`. -/
def cPos (ω0 c0 D : ℝ) (T : ℂ) (Ω z : ℝ) : ℂ :=
(ω0 * D * z ^ 2 / (16 * c0) : ℝ) * psiC T (sArg c0 D Ω z)
/-- Eq. (5.42) for `Ω ≥ 0`: `d_Ω(z) = (D z³ / 48) Ψ_d(s)`. -/
def dPos (c0 D : ℝ) (T : ℂ) (Ω z : ℝ) : ℂ :=
(D * z ^ 3 / 48 : ℝ) * psiD T (sArg c0 D Ω z)
/-- `a_Ω(z)` for every real `Ω`: (5.39) for `Ω ≥ 0`, and `a_Ω = conj(a_{-Ω})` for `Ω < 0` (proof of
Proposition 5.4, p. 21). `T Ω` is the parameter of the `Ψ`-functions at offset `Ω ≥ 0`. -/
def aOm (c0 D : ℝ) (T : ℝ → ℂ) (Ω z : ℝ) : ℂ :=
if 0 ≤ Ω then aPos c0 D (T Ω) Ω z else starRingEnd ℂ (aPos c0 D (T (-Ω)) (-Ω) z)
/-- `b_Ω(z)` for every real `Ω`: (5.40) for `Ω ≥ 0`, `b_Ω = conj(b_{-Ω})` for `Ω < 0`. -/
def bOm (ω0 c0 D : ℝ) (T : ℝ → ℂ) (Ω z : ℝ) : ℂ :=
if 0 ≤ Ω then bPos ω0 c0 D (T Ω) Ω z else starRingEnd ℂ (bPos ω0 c0 D (T (-Ω)) (-Ω) z)
/-- `c_Ω(z)` for every real `Ω`: (5.41) for `Ω ≥ 0`, `c_Ω = conj(c_{-Ω})` for `Ω < 0`. -/
def cOm (ω0 c0 D : ℝ) (T : ℝ → ℂ) (Ω z : ℝ) : ℂ :=
if 0 ≤ Ω then cPos ω0 c0 D (T Ω) Ω z else starRingEnd ℂ (cPos ω0 c0 D (T (-Ω)) (-Ω) z)
/-- `d_Ω(z)` for every real `Ω`: (5.42) for `Ω ≥ 0`, `d_Ω = conj(d_{-Ω})` for `Ω < 0`. -/
def dOm (c0 D : ℝ) (T : ℝ → ℂ) (Ω z : ℝ) : ℂ :=
if 0 ≤ Ω then dPos c0 D (T Ω) Ω z else starRingEnd ℂ (dPos c0 D (T (-Ω)) (-Ω) z)
/-- Eq. (5.38): the complex Gaussian
`(2π)² exp[-a - b|x|² - c x·ζ - d|ζ|²]`. -/
def gaussForm (a b c d : ℂ) (x ζ : Plane) : ℂ :=
(2 * Real.pi : ℂ) ^ 2 *
Complex.exp (-a - b * (‖x‖ ^ 2 : ℝ) - c * (inner ℝ x ζ : ℝ) - d * (‖ζ‖ ^ 2 : ℝ))
/-- Eq. (5.38) with the coefficients (5.39)-(5.42): the function
`Â_s(z, x, ζ, Ω) = (2π)² exp[-a_Ω(z) - b_Ω(z)|x|² - c_Ω(z) x·ζ - d_Ω(z)|ζ|²]`, the `Ψ`-functions
having parameter `T Ω`. -/
def hatAs (ω0 c0 D : ℝ) (T : ℝ → ℂ) (Ω : ℝ) (ζ : Plane) (z : ℝ) (x : Plane) : ℂ :=
gaussForm (aOm c0 D T Ω z) (bOm ω0 c0 D T Ω z) (cOm ω0 c0 D T Ω z) (dOm c0 D T Ω z) x ζ
/-! ### The equations used in the proofs of Propositions 5.4 and 5.7 -/
/-- Proof of Proposition 5.4 (p. 21): the right-hand side of the equation for `Â_s`,
`-(i c_o Ω/ω₀²) Δ_x  - (ω₀² D/(16 c_o²)) [|x|² + z² c_o² |ζ|²/ω₀² + 2 z c_o ζ·x/ω₀] Â`. -/
def momentRHS (ω0 c0 D Ω : ℝ) (ζ : Plane) (F : ℝ → Plane → ℂ) (z : ℝ) (x : Plane) : ℂ :=
-(Complex.I * (c0 * Ω / ω0 ^ 2 : ℝ)) * Laplacian.laplacian (F z) x -
(ω0 ^ 2 * D / (16 * c0 ^ 2) *
(‖x‖ ^ 2 + z ^ 2 * c0 ^ 2 / ω0 ^ 2 * ‖ζ‖ ^ 2 + 2 * z * c0 / ω0 * inner ℝ ζ x) : ℝ) * F z x
/-- Proof of Proposition 5.4 (p. 21): `F` solves the equation for `Â_s` on `z > 0`, with
`F(z, x) → F₀(x)` as `z → 0⁺` for every `x` (the initial condition). -/
def SolvesMomentEq (ω0 c0 D Ω : ℝ) (ζ : Plane) (F : ℝ → Plane → ℂ) (F0 : Plane → ℂ) : Prop :=
(∀ x, Tendsto (fun z => F z x) (𝓝[>] 0) (𝓝 (F0 x))) ∧
∀ z : ℝ, 0 < z → ∀ x, HasDerivAt (fun z' => F z' x) (momentRHS ω0 c0 D Ω ζ F z x) z
/-- Eqs. (5.47)-(5.50): on `z > 0`,
`a' = -i(4c_oΩ/ω₀²) b`, `b' = ω₀²D/(16c_o²) + i(4c_oΩ/ω₀²) b²`,
`c' = ω₀Dz/(8c_o) + i(4c_oΩ/ω₀²) b c`, `d' = Dz²/16 + i(c_oΩ/ω₀²) c²`. -/
def SolvesCoefODE (ω0 c0 D Ω : ℝ) (a b c d : ℝ → ℂ) : Prop :=
∀ z : ℝ, 0 < z →
HasDerivAt a (-(Complex.I * (4 * c0 * Ω / ω0 ^ 2 : ℝ)) * b z) z ∧
HasDerivAt b ((ω0 ^ 2 * D / (16 * c0 ^ 2) : ℝ) +
Complex.I * (4 * c0 * Ω / ω0 ^ 2 : ℝ) * b z ^ 2) z ∧
HasDerivAt c ((ω0 * D * z / (8 * c0) : ℝ) +
Complex.I * (4 * c0 * Ω / ω0 ^ 2 : ℝ) * b z * c z) z ∧
HasDerivAt d ((D * z ^ 2 / 16 : ℝ) + Complex.I * (c0 * Ω / ω0 ^ 2 : ℝ) * c z ^ 2) z
end Arxiv2201_05558
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting (). Throughout, the plane is with its Euclidean norm , its inner product , and Lebesgue measure . The following conventions apply to every definition below:
- An integral over is a Lebesgue integral of a complex-valued function. If the integrand is not integrable, the integral is .
- An integral is oriented, so when . It also equals when its integrand is not integrable on the interval.
- Division by zero, and the inverse of zero, return .
- The real square root of a negative number is .
- No positivity, integrability, evenness or smoothness assumptions are made on any parameter or function unless stated.
. Inputs: a real number , a function , and a point . The value is
- The sign of is irrelevant, since only enters.
- If , the prefactor is , so the value is for every .
- If times the Gaussian is not integrable, the value is .
. Inputs: real numbers and two functions . Write as defined above. The value is
- If , the weight is everywhere.
- If the integrand is not integrable, the value is .
. For real numbers :
This is a real number. It equals whenever any of is .
. For a real-valued function and :
- is not assumed to be even, integrable, or a covariance.
- If is not integrable, then for all .
(Kcoh). For real numbers and :
This is a real number defined for every real , including . If , the coefficient is and .
. Inputs:
- real numbers ;
- ;
- ;
- a function .
Write , and use and as defined above. The value is
- The middle integral is taken of the whole bracketed expression times . If that combined integrand is not integrable, the middle term is .
- If , then , , and .
- If , then .
. Inputs: real numbers , , and . The value is
where is as above.
- The inner integral is oriented, so for it is . It is if is not integrable on the interval.
- The outer integral is if its integrand is not integrable.
- If , the shift is .
(eMinusQuarter). This is the constant .
(psiA). For a complex parameter and a real , with :
- The definition is this integral itself. No logarithm appears in it.
- may be negative, in which case the integral is oriented.
- At any where the denominator vanishes, the integrand is taken to be .
- If the integrand is not integrable on the interval, .
- .
(psiB). For , , with :
- At the denominator is , so . This is the value, not a limit.
- The value is also whenever .
(psiNum). For , , with :
- The fraction is when .
- The last term is when .
(psiC). For , , with as above:
At the value is , not a limit.
(psiD). For , , with as above:
- The integral is oriented, and equals if not integrable.
- At the factor is , so .
. For real numbers , with :
The square root is the real one. It equals whenever or . The prefactor is whenever . No sign condition on is imposed.
(sArg). For real numbers :
The real square root is when or . In that case for all . The sign of follows the sign of .
(aPos, bPos, cPos, dPos). Inputs: real numbers and a complex . Let as above. Then
Here are the functions defined above, including their conventions at and at vanishing denominators. No restriction or is imposed in these formulas.
(aOm, bOm, cOm, dOm). Inputs: real numbers and an arbitrary function . Each coefficient is defined by cases, using from above:
and identically for , each using its own formula and the parameters as needed. The function is unconstrained; it need not equal or .
. For complex numbers and points :
(hatAs). Inputs: real numbers , a function , and points . With as above (built from that ):
for every real , including .
. Inputs: real numbers , a point , a function , and . The value is
- is the Laplacian in , the sum of the two pure second partial derivatives.
- It is computed with the convention that derivatives which do not exist are taken to be . No twice-differentiability of is assumed.
- Coefficients with or in a denominator become .
. Inputs: real numbers , a point , and functions and . This is the proposition that both of the following hold:
- Initial condition. For every , as with . This is pointwise in , with no uniformity.
- Equation. For every and every , the map is differentiable at , and
with as defined above, including its zero-convention for the Laplacian.
Values of for are otherwise unconstrained.
. Inputs: real numbers and four functions . This is the proposition that for every all four functions are differentiable at with
- No initial or boundary conditions are imposed.
- No condition is imposed for .
- Coefficients with a zero denominator become .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.