Cayley spectral variable, Padé-Fourier approximant and parallel-plate spectral Green's function
DefinitionArxiv2111_09089_BasicObjects of Sections II and III-A-1 of Hadad (2021). Time dependence ; is the imaginary unit.
- Padé example (Section II-A). The Taylor polynomial of about is . The two Padé approximations are and .
- Tilted path (eq. 2). For , the normalised transverse wavenumber on the tilted path is . The map is defined for complex , so that it can be evaluated at .
- Cayley variable (eq. 3). .
- Annulus and Laurent coefficients (eq. 5). . The Laurent coefficients of on the unit circle are its Fourier coefficients there, .
- Padé-Fourier rational function (eq. 6). , and the approximant .
- Parallel-plate waveguide (eq. 9). Two PEC plates are a distance apart, filled with relative permittivity ; is the vacuum wavenumber and . With and ,
where , , and .
Formalization Note The paper does not define , and it writes in . Here , consistent with eq. (1) () and with the formula for , and . The square root is the principal branch . is an even function of , so the choice of branch does not change it. A quotient whose denominator vanishes takes the value in Lean; no statement depends on that value.
import Mathlib
/-!
Y. Hadad, *On the use of the Padé-Fourier approximation in fast evaluation of the Green's
function of layered media*, arXiv:2111.09089v1 (2021): the Padé example of Section II-A, the
tilted integration path of Section II-B (eq. (2)), the Cayley spectral variable, the Laurent
coefficients and the Padé-Fourier rational function of Section II-C (eqs. (3), (5), (6)), and the
spectral Green's function of the lossy parallel-plate waveguide of Section III-A-1 (eq. (9)).
-/
open Complex
noncomputable section
namespace Arxiv2111_09089
/-- Section II-A, p. 2: the Taylor polynomial `f_T(x) = 1 - x² + x⁴/2 - x⁶/6` of `e^{-x²}`
about `x₀ = 0`. -/
def gaussTaylor (x : ℝ) : ℝ := 1 - x ^ 2 + x ^ 4 / 2 - x ^ 6 / 6
/-- Section II-A, p. 2: the first Padé approximation of `e^{-x²}`,
`f_P1(x) = (1 - x²/3) / (1 + 2x²/3 + x⁴/6)`. -/
def padeP1 (x : ℝ) : ℝ := (1 - x ^ 2 / 3) / (1 + 2 * x ^ 2 / 3 + x ^ 4 / 6)
/-- Section II-A, p. 2: the second Padé approximation of `e^{-x²}`,
`f_P2(x) = 1 / (1 + x² + x⁴/2)`. -/
def padeP2 (x : ℝ) : ℝ := 1 / (1 + x ^ 2 + x ^ 4 / 2)
/-- Section II-B, eq. (2), p. 3: the tilted integration path `ξ = (1 + jα) μ`. The variable `μ`
is complex so that the map can be evaluated at the points `μ = ± j` of Section II-C. -/
def xiOfMu (α : ℝ) (μ : ℂ) : ℂ := (1 + α * I) * μ
/-- Section II-C, eq. (3), p. 3: the Cayley transform `μ = -j (1 + η) / (1 - η)`. -/
def cayley (η : ℂ) : ℂ := -I * (1 + η) / (1 - η)
/-- Section II-C, eq. (5), p. 3: the annulus `1 - δ < |η| < 1 + δ` around the unit circle. -/
def annulus (δ : ℝ) : Set ℂ := {η | 1 - δ < ‖η‖ ∧ ‖η‖ < 1 + δ}
/-- Section II-C, eq. (5) and the text after it, p. 3: the `n`-th Laurent coefficient `c_n` of
`g` on the unit circle, i.e. the `n`-th Fourier coefficient of `φ ↦ g(e^{jφ})` on `[0, 2π]`,
`c_n = (1/2π) ∫₀^{2π} g(e^{jφ}) e^{-jnφ} dφ`. -/
def laurentCoeff (g : ℂ → ℂ) (n : ℤ) : ℂ :=
fourierCoeffOn Real.two_pi_pos (fun φ : ℝ => g (exp (φ * I))) n
/-- Section II-C, eq. (6), p. 3: the Laurent polynomial `∑_{l=-L}^{L} a_l η^l`. -/
def laurentPoly (a : ℤ → ℂ) (L : ℕ) (η : ℂ) : ℂ :=
∑ l ∈ Finset.Icc (-(L : ℤ)) L, a l * η ^ l
/-- Section II-C, eq. (6), p. 3: the Padé-Fourier rational function
`P_L(η) / Q_M(η) = (∑_{l=-L}^{L} a_l η^l) / (∑_{m=-M}^{M} b_m η^m)`. -/
def padeFourier (a b : ℤ → ℂ) (L M : ℕ) (η : ℂ) : ℂ :=
laurentPoly a L η / laurentPoly b M η
/-- Section III-A-1, p. 4: the free-space impedance `Z₀ = 120π Ω`. -/
def freeSpaceImpedance : ℝ := 120 * Real.pi
/-- Section III-A-1, eq. (9), p. 4: the longitudinal wavenumber `k_z = k₀ √(ε_{r1} - ξ²)` in the
filling of relative permittivity `ε_{r1}`, with `ξ` normalised by the vacuum wavenumber `k₀`
(eq. (1)). The paper uses `k_z` without defining it. -/
def ppwKz (k0 : ℝ) (ε ξ : ℂ) : ℂ := k0 * (ε - ξ ^ 2) ^ (1 / 2 : ℂ)
/-- Section III-A-1, p. 4: the TM wave impedance `Z_TM = Z₀ √(ε_{r1} - ξ²) / ε_{r1}` (the paper
writes `ε` in the denominator; it is the filling's `ε_{r1}`). -/
def ppwZTM (ε ξ : ℂ) : ℂ := freeSpaceImpedance * (ε - ξ ^ 2) ^ (1 / 2 : ℂ) / ε
/-- Section III-A-1, eq. (9), p. 4: the 1D spectral Green's function of the `x`-component of the
TM field of an `x`-polarised dipole in a parallel-plate waveguide of PEC plates at distance `d`
filled with relative permittivity `ε_{r1}`, source at `z'`, observer at `z`:
`g = -(Z_TM/2) / (1 - e^{-2j k_z d}) (e^{-j k_z z₁} - e^{-j k_z z₂} - e^{-j k_z z₃} + e^{-j k_z z₄})`,
with `z₁ = |z - z'|`, `z₂ = z + z'`, `z₃ = 2d - (z + z')`, `z₄ = 2d - |z - z'|`. -/
def ppwGreen (k0 d : ℝ) (ε : ℂ) (z z' : ℝ) (ξ : ℂ) : ℂ :=
let kz := ppwKz k0 ε ξ;
-(ppwZTM ε ξ / 2) / (1 - exp (-2 * I * kz * d)) *
(exp (-I * kz * abs (z - z')) - exp (-I * kz * (z + z')) -
exp (-I * kz * (2 * d - (z + z'))) + exp (-I * kz * (2 * d - abs (z - z'))))
end Arxiv2111_09089
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Taylor polynomial (gaussTaylor). This is the real function defined for every real by
It carries no hypotheses and is defined on all of .
First rational function (padeP1). This is the real function defined for every real by
The denominator is at least for every real , so the division never falls back on the convention that dividing by gives .
Second rational function (padeP2). This is the real function defined for every real by
The denominator is at least for every real , so no division by zero occurs.
Tilted path map (xiOfMu). For a real parameter and a complex number , this is the complex number
where is the imaginary unit. There are no restrictions on , which may be any real number including and negative values. There are also no restrictions on , which ranges over all of .
Cayley-type map (cayley). For a complex number , this is the complex number
Division is total, with the convention that dividing by gives . Therefore at the single point the value is defined to be rather than being undefined or infinite.
Annulus (annulus). For a real number , this is the set of complex numbers
where is the complex modulus and both inequalities are strict. Nothing requires :
- If , the set is empty.
- If , it is a genuine open annulus around the unit circle.
- If , the lower bound is negative, so the set is the open disc , which includes .
Laurent coefficients (laurentCoeff). For an arbitrary function and an integer (any sign), this is the -th Fourier coefficient on the interval of the real-variable function :
Only the values of on the unit circle enter. No continuity, analyticity, measurability, or integrability is assumed of . If the integrand is not Lebesgue-integrable, the integral is assigned the junk value , so in that case for every .
Laurent polynomial (laurentPoly). Take a sequence of complex coefficients , , a natural number , and a complex number . This is the finite sum
where is the integer power. Only the coefficients are used, and gives the constant . At , negative powers are not undefined: they use the convention for (and ). Hence .
Rational function (padeFourier). Take two coefficient sequences , natural numbers , and a complex number . This is the quotient
with both sums as defined above, including the convention at . No condition relates , , , to any target function. Wherever the denominator vanishes, the quotient is defined to be ; for example, if , the quotient is for every .
Impedance constant (freeSpaceImpedance). This is the real number
It is a bare real number and carries no units.
Longitudinal wavenumber (ppwKz). For a real number and complex numbers and , this is the complex number
Here is the principal complex power , using the principal logarithm with argument in , and with the convention . Consequently:
- The result always has nonnegative real part.
- For a negative real number , the result is .
- There is a branch cut along the negative real axis of .
There are no restrictions on : it may be zero or negative. There are also no restrictions on or .
Wave impedance (ppwZTM). For complex numbers and , this is the complex number
with the same principal square root as above. If , the value is by the division-by-zero convention.
Green's function (ppwGreen). The inputs are real numbers and , a complex number , real numbers and , and a complex number . Write , using the principal square root as above, and . The definition is the complex number
None of the following is assumed:
- that ;
- that ;
- that or lie in ;
- any condition on or .
Whenever , the leading fraction is defined to be , and so identically. This happens in particular when , when , when , and more generally whenever . Likewise when , because then .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.