Causal Fourier transforms, Hilbert transform, admittance and apparent parameters (Bédard-Destexhe 2018)
DefinitionArxiv1801_00461_BasicObjects of Sections 2 and 3.1 of Bédard and Destexhe (2018). The position is fixed and omitted; all kernels are real-valued functions of time, and causality (a kernel vanishes for ) is built in by integrating over .
- One-sided Fourier transform. For a real kernel and a complex frequency , . The full-line transform of a field is .
- Permittivity (eqs. (10)-(11)). With the vacuum permittivity and the susceptibility kernel of : and .
- Conductivity (eqs. (21)-(24)). The kernel , the free-charge current , the deviation of a deviation kernel , and for a given frequency-domain asymptote .
- Admittance and apparent parameters (eqs. (27)-(28), (35)-(36)). , , ; and , with high-frequency values and .
- Hilbert transform (eq. (16)). For real and let . The statement means that for all small the function is integrable on and
also denotes this limit as a number. 6. Permittivity models (eqs. (38)-(42), (47), (50), (51)). and ; ; the truncated integral of eq. (42); of that integral (eq. (40)); (eq. (30b)); and for a constant .
Formalization Note The paper's Fig. 1 excises a half-circle of radius about and closes with a half-circle of radius , so the principal value is taken with the coupled truncation . The extra symmetric excision about does not change the value for functions that are locally integrable at . For the power-law models it is the excision the paper uses in eq. (42). Limits written in a definition are Lean's limUnder, and every statement that uses them also asserts that the limit exists. The asymptote is a free frequency-domain function, because the paper allows it to be the transform of a distribution, such as the constant of a resistive medium.
import Mathlib
/-!
Bédard and Destexhe, *Kramers-Kronig relations and the properties of conductivity and
permittivity in heterogeneous media*, arXiv:1801.00461v1 (2018): the one-sided Fourier transforms
of the causal permittivity and conductivity kernels (Sec. 2.2-2.3, eqs. (10)-(11), (21)-(25)),
the principal-value Hilbert transform of eqs. (16), (26), (30), the admittance and the apparent
conductivity and permittivity (Sec. 2.4, eqs. (27)-(28), (35)-(36)), and the permittivity models of
Sec. 3.1.2 (eqs. (38)-(40), (42), (47), (50), (51)).
The position `r` is fixed throughout and suppressed. Kernels are real-valued functions of time;
causality (a kernel vanishes for negative time) is built in by integrating over `t > 0` only.
-/
open MeasureTheory Filter Topology
noncomputable section
namespace Arxiv1801_00461
/-- Eqs. (10), (11), (24), (25): the one-sided Fourier transform
`∫_0^∞ g(τ) e^{-iωτ} dτ` of a causal real kernel `g`, at a complex frequency `ω = ω' + iω''`
(real frequencies are the case `ω'' = 0`). -/
def causalFT (g : ℝ → ℝ) (ω : ℂ) : ℂ :=
∫ τ in Set.Ioi (0 : ℝ), (g τ : ℂ) * Complex.exp (-(Complex.I * ω * τ))
/-- Sec. 2.3.3, Fourier transform over the whole time axis, `∫_{-∞}^{∞} f(t) e^{-iωt} dt`, used for
the electric field and the free-charge current in eq. (23). -/
def fourierFT (f : ℝ → ℝ) (ω : ℝ) : ℂ :=
∫ t, (f t : ℂ) * Complex.exp (-(Complex.I * ω * t))
/-- Eq. (10): the permittivity in frequency space,
`ε(ω) = ε_o [1 + ∫_0^∞ χ(τ) e^{-iωτ} dτ]`, where `χ` is the time-domain susceptibility of
eq. (7), `ε(t) = ε_o [δ(t) + χ(t)]`. -/
def permittivity (eps0 : ℝ) (chi : ℝ → ℝ) (ω : ℂ) : ℂ :=
eps0 * (1 + causalFT chi ω)
/-- Eq. (11): the deviation of the permittivity from that of vacuum,
`Δ̄ε(ω) = ∫_0^∞ ε_o χ(τ) e^{-iωτ} dτ`. -/
def permDev (eps0 : ℝ) (chi : ℝ → ℝ) (ω : ℂ) : ℂ :=
causalFT (fun τ => eps0 * chi τ) ω
/-- Eq. (21): the conductivity kernel `σ_e(t) = σ_∞(t) [1 + Δ̄_e(t)]`. -/
def condKernel (sigmaInf DeltaE : ℝ → ℝ) (t : ℝ) : ℝ :=
sigmaInf t * (1 + DeltaE t)
/-- Eq. (22): the free-charge current of a causal medium,
`j^free(t) = ∫_0^∞ σ_∞(τ) [1 + Δ̄_e(τ)] E(t - τ) dτ` (one Cartesian component). -/
def freeCurrent (sigmaInf DeltaE E : ℝ → ℝ) (t : ℝ) : ℝ :=
∫ τ in Set.Ioi (0 : ℝ), condKernel sigmaInf DeltaE τ * E (t - τ)
/-- Eqs. (24)-(25): the deviation `Δ̄σ_e(ω) = σ_e(ω) - σ_∞(ω)` of the conductivity from its
high-frequency asymptote, the Fourier transform `∫_0^∞ d(τ) e^{-iωτ} dτ` of the time-domain
deviation kernel `d(t) = σ_e(t) - σ_∞(t) = σ_∞(t) Δ̄_e(t)`. -/
def condDev (dsig : ℝ → ℝ) (ω : ℂ) : ℂ :=
causalFT dsig ω
/-- Eq. (24): the conductivity in frequency space, `σ_e(ω) = σ_∞(ω) + Δ̄σ_e(ω)`. The asymptote
`σ_∞(ω)` is a frequency-domain datum `sigInf`, because the paper allows it to be the transform of
a distribution (for a resistive asymptote, the constant `k` of Sec. 3.1.1). -/
def condFreq (sigInf : ℝ → ℂ) (dsig : ℝ → ℝ) (ω : ℝ) : ℂ :=
sigInf ω + condDev dsig ω
/-- Eq. (27): the admittance of the medium, `γ(ω) = σ_e(ω) + iω ε(ω)`. -/
def admittance (sigInf : ℝ → ℂ) (dsig : ℝ → ℝ) (eps0 : ℝ) (chi : ℝ → ℝ) (ω : ℝ) : ℂ :=
condFreq sigInf dsig ω + Complex.I * ω * permittivity eps0 chi ω
/-- Eq. (28): `γ_∞(ω) = σ(∞) + iω ε(∞)`, with `σ(∞) = σ_∞(ω)` and `ε(∞) = ε_o`. -/
def admittanceInf (sigInf : ℝ → ℂ) (eps0 : ℝ) (ω : ℝ) : ℂ :=
sigInf ω + Complex.I * ω * eps0
/-- Eq. (28): the admittance variation `Δ̄γ = γ(ω) - γ_∞(ω)`. -/
def admDev (sigInf : ℝ → ℂ) (dsig : ℝ → ℝ) (eps0 : ℝ) (chi : ℝ → ℝ) (ω : ℝ) : ℂ :=
admittance sigInf dsig eps0 chi ω - admittanceInf sigInf eps0 ω
/-- Eq. (35): the apparent conductivity `σ_A = γ' = σ_e' - ω ε''`. -/
def appCond (sigInf : ℝ → ℂ) (dsig : ℝ → ℝ) (eps0 : ℝ) (chi : ℝ → ℝ) (ω : ℝ) : ℝ :=
(admittance sigInf dsig eps0 chi ω).re
/-- Eq. (36): the apparent permittivity, `ω ε_A = γ'' = ω ε' + σ_e''`, i.e. `ε_A = γ''/ω`
(`ω ≠ 0`). -/
def appPerm (sigInf : ℝ → ℂ) (dsig : ℝ → ℝ) (eps0 : ℝ) (chi : ℝ → ℝ) (ω : ℝ) : ℝ :=
(admittance sigInf dsig eps0 chi ω).im / ω
/-- Eqs. (28), (35): the high-frequency value of the apparent conductivity, `Re γ_∞(ω)`. -/
def appCondInf (sigInf : ℝ → ℂ) (eps0 : ℝ) (ω : ℝ) : ℝ :=
(admittanceInf sigInf eps0 ω).re
/-- Eqs. (28), (36): the high-frequency value of the apparent permittivity, `Im γ_∞(ω) / ω`. -/
def appPermInf (sigInf : ℝ → ℂ) (eps0 : ℝ) (ω : ℝ) : ℝ :=
(admittanceInf sigInf eps0 ω).im / ω
/-- Fig. 1 and eqs. (15)-(16): the integration set of the principal value at the singular point
`ω_a = ω`, for the half-circles of radius `δ` about `ω` and `R = 1/δ` about the origin:
`{ω_a : δ < |ω_a - ω|, δ < |ω_a|, |ω_a| < 1/δ}`. The point `ω_a = 0` is also excised
symmetrically, as in eq. (42). -/
def pvRegion (ω δ : ℝ) : Set ℝ :=
{a | δ < |a - ω| ∧ δ < |a| ∧ |a| < 1 / δ}
/-- Eq. (16): the truncated Hilbert transform
`(1/π) ∫_{pvRegion ω δ} f(ω_a) / (ω_a - ω) dω_a`. -/
def hilbertTrunc (f : ℝ → ℝ) (ω δ : ℝ) : ℝ :=
1 / Real.pi * ∫ a in pvRegion ω δ, f a / (a - ω)
/-- Eq. (16): `H(f)(ω) = v`, i.e. the principal value
`(1/π) ⨍_{-∞}^{∞} f(ω_a) / (ω_a - ω) dω_a` exists and equals `v`: the truncated integrals are
(eventually) Lebesgue integrals and tend to `v` as `δ → 0⁺`. -/
def HasHilbert (f : ℝ → ℝ) (ω v : ℝ) : Prop :=
(∀ᶠ δ in nhdsWithin (0 : ℝ) (Set.Ioi 0),
IntegrableOn (fun a => f a / (a - ω)) (pvRegion ω δ)) ∧
Tendsto (hilbertTrunc f ω) (nhdsWithin (0 : ℝ) (Set.Ioi 0)) (nhds v)
/-- Eq. (16): the Hilbert transform `H(f)(ω)` as a number, the limit of the truncations as
`δ → 0⁺`. It is meaningful where `HasHilbert f ω v` holds for some `v`. -/
def hilbert (f : ℝ → ℝ) (ω : ℝ) : ℝ :=
limUnder (nhdsWithin (0 : ℝ) (Set.Ioi 0)) (hilbertTrunc f ω)
/-- Eq. (38): the apparent-permittivity model `ε_A(ω) = ε_o + κ / |ω|^{2+x}`. -/
def epsModel (eps0 kappa x : ℝ) (ω : ℝ) : ℝ :=
eps0 + kappa / |ω| ^ (2 + x)
/-- Sec. 3.1.2: `Δ̄(ω ε_A)(ω) = ω (ε_A(ω) - ε_o)` for the model (38), the deviation of `ω ε_A` from
its value `ω ε_o` at infinite frequency. -/
def omegaEpsDev (eps0 kappa x : ℝ) (ω : ℝ) : ℝ :=
ω * (epsModel eps0 kappa x ω - eps0)
/-- Eq. (42): the truncated principal-value integral (the bracket of eq. (42))
`∫_δ^{1-δ} dy / ((y²-1) y^x) + ∫_{1+δ}^{1/δ} dy / ((y²-1) y^x)`. -/
def kernelTrunc (x δ : ℝ) : ℝ :=
(∫ y in δ..(1 - δ), 1 / ((y ^ 2 - 1) * y ^ x)) +
∫ y in (1 + δ)..(1 / δ), 1 / ((y ^ 2 - 1) * y ^ x)
/-- Eqs. (40), (42): `κ_1 = (2κ/π) ⨍_0^∞ dy / ((y²-1) y^x)`, the principal value being the limit
of `kernelTrunc x δ` as `δ → 0⁺`. -/
def kappaOne (kappa x : ℝ) : ℝ :=
2 * kappa / Real.pi * limUnder (nhdsWithin (0 : ℝ) (Set.Ioi 0)) (kernelTrunc x)
/-- Eq. (30b) applied to the model (38), as in eq. (39):
`Δ̄σ_A(ω) = -H(Δ̄(ω ε_A))(ω)`. -/
def appCondDevModel (eps0 kappa x : ℝ) (ω : ℝ) : ℝ :=
-hilbert (omegaEpsDev eps0 kappa x) ω
/-- Eqs. (47), (50): the apparent admittance of the model (38),
`γ_A(ω) = σ_A(ω) + iω ε_A(ω)` with `σ_A(ω) = σ_A(∞) + Δ̄σ_A(ω)`, where `s = σ_A(∞)`. -/
def appAdmModel (s eps0 kappa x : ℝ) (ω : ℝ) : ℂ :=
((s + appCondDevModel eps0 kappa x ω : ℝ) : ℂ) + Complex.I * ω * epsModel eps0 kappa x ω
/-- Eqs. (47), (50): `γ_A(ω = ∞) = σ_A(∞) + iω ε_o`, the apparent admittance with the
high-frequency values of the apparent parameters (`s = σ_A(∞)`, `ε_A(∞) = ε_o`). -/
def appAdmModelInf (s eps0 : ℝ) (ω : ℝ) : ℂ :=
(s : ℂ) + Complex.I * ω * eps0
/-- Eq. (51): the apparent-permittivity model `ε_A(ω) = ε_o + Σ_{j=1}^N κ_j / |ω|^{2+x_j}`. -/
def epsMultiModel {N : ℕ} (eps0 : ℝ) (kappa x : Fin N → ℝ) (ω : ℝ) : ℝ :=
eps0 + ∑ j, kappa j / |ω| ^ (2 + x j)
end Arxiv1801_00461
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Bundle conventions. All functions below are ordinary real-valued functions of a real variable: kernels and fields . Integrals are Lebesgue (Bochner) integrals, not improper integrals. Whenever an integrand fails to be integrable on its domain, the integral is assigned the value . Division by zero is assigned the value . Powers with a real exponent are the real power function, which has the following conventions:
- for , and ;
- for , .
None of the parameters (, , , , …) is constrained in sign or size.
causalFT (one-sided transform). For a function and a complex number , define
- The values of for are never used.
- Writing , the factor equals , so it grows exponentially when .
- If is not integrable on , then .
fourierFT. For and real , define
It is if the integrand is not integrable over .
permittivity. For a real number , a function and complex , define
where is the one-sided transform above. In particular, whenever is not integrable on .
permDev. For the same data, define
which is the one-sided transform of the kernel .
condKernel. For and real , define
freeCurrent. For and real , define the real number
It is if the integrand is not integrable on .
condDev. For an arbitrary function and complex , this is simply , the one-sided transform of . Nothing ties to , , or any other kernel; is a free input.
condFreq. For an arbitrary function (a frequency-domain datum), a function , and real , define
where the real is fed into as a complex number with zero imaginary part. No relation is imposed between this and the time-domain function of the same name in condKernel.
admittance. For data , , , and real , define
admittanceInf. For real , define
admDev. Define
Algebraically this equals , because cancels.
appCond. Define
appPerm. Define
At this is , by the division-by-zero convention.
appCondInf. Define , which equals .
appPermInf. Define
- For , this equals .
- At , it is (not ).
pvRegion. For real and , define
- For , this is the interval with two closed intervals removed: and . The outer cutoff is symmetric about the origin, not about . A neighbourhood of is excised even when .
- For the set is empty, since fails.
- For the set is also empty, since (with ).
hilbertTrunc. Define
It is when the integrand is not integrable on , and in particular whenever the region is empty.
HasHilbert. For and real , the proposition " has Hilbert transform at " holds exactly when both of the following hold:
- there is such that for every , the function is integrable on ;
- as .
hilbert. Define as follows:
- if exists, is that limit;
- otherwise, is an unspecified real number.
No integrability is required. If the truncations are non-integrable for all small , they are all by convention, and then .
epsModel. For real , define
At the value is:
- if ;
- if .
When , the model is in fact the constant for every .
omegaEpsDev. Define
with value at .
kernelTrunc. For real , define
- These are oriented interval integrals: if a lower limit exceeds the upper one, the integral is the negative of the integral over the reversed interval.
- Each integral is if its integrand is not integrable on the interval.
- The integrand at , or at with , is by convention.
kappaOne. Define
where if this limit exists, and is an unspecified real number otherwise.
appCondDevModel. Define
using the limit-based above. It is therefore an unspecified number whenever the truncated transforms do not converge.
appAdmModel. For real , define the complex number
Its real part is and its imaginary part is .
appAdmModelInf. Define
epsMultiModel. For a natural number , real , families and of reals, and real , define
- For this is the constant .
- At , each term with contributes and each term with contributes .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.