Reciprocal periodic slab media, TM/TE scalar reductions, weak quasi-periodic solutions with Rayleigh expansions (Eq. (4)) for incidence from above and below, and the amplitude ratio of Eq. (9)
DefinitionArxivphysics_0610143_BasicObjects of M. Iwanaga, A. S. Vengurlekar, T. Hatano and T. Ishihara, Reciprocal transmittances and reflectances: An elementary proof (arXiv:physics/0610143v4), Sections II–III, in the plane-wave limit of the paper's far-field dipole arrays. Points of the plane of incidence are ; the structure is uniform along .
-
Harmonics (Eq. (4)). For period , wavenumber and incident tangential wavenumber : (), and if , otherwise; . The up-going harmonic is and the down-going one ; closed channels decay away from the object.
-
Media (Sec. II, Figs. 3–4). Relative permittivity and permeability tensor fields (indices ), each satisfying:
- entries, and entries of the inverse of the block, are measurable and bounded; the block is invertible;
- symmetric, , with ( decoupled from the plane);
- periodic: ;
- vacuum outside the slab: for .
Complex entries (absorption) are allowed; the unit cell is otherwise arbitrary. The configuration without object is everywhere.
-
Scalar equations. With and the block of :
- TM polarization ( in the plane), field : with ;
- TE polarization (), field : the same with and replaced by .
-
Weak solution. and a weak gradient are in on every ball, and for every real-valued smooth compactly supported (by complex linearity, equivalently for complex ); the weak gradient satisfies for the same .
-
Quasi-periodicity. .
-
Incidence from above (coefficients , tangential wavenumber , amplitudes ): is a quasi-periodic weak solution with
- for ;
- for ;
the series converging (unconditionally) at every point.
-
Incidence from below: the same with up and down exchanged: for and for .
-
Eq. (9). , so that is the ratio of zeroth-order amplitudes with and without object.
Formalization Note The paper's sources are finite arrays of point dipoles whose far fields are 'to a good approximation' plane waves. The formalization works in the exact plane-wave limit that this approximation targets, which is also the setting of the paper's numerics (Sec. IV). The paper writes the fields in terms of . In vacuum the zeroth-order and amplitudes are proportional with the same factor with and without object, so the ratios of Eq. (9) agree for and . Symmetry of is not stated in the paper but is the hypothesis of the reciprocal theorem it cites (Landau–Lifshitz). Writing the radiated harmonics as corresponds to the time factor . Since range over all complex values, the statements cover either sign convention for absorption.
import Mathlib
/-!
M. Iwanaga, A. S. Vengurlekar, T. Hatano and T. Ishihara, *Reciprocal transmittances and reflectances: An elementary proof* (arXiv:physics/0610143v4),
Sections II–III: the reciprocal configurations of Fig. 1 for a one-dimensionally periodic object
(period `d` along `x`, finite thickness along `z`) in vacuum, illuminated by a plane wave of
wavenumber `k` in the `xz` plane, in the plane-wave limit of the paper's far-field dipole arrays.
Points of the plane of incidence are `(x, z) : ℝ × ℝ`. The structure is uniform along `y`.
The media are linear and local, `D_i = ∑_j ε_ij E_j`, `B_i = ∑_j μ_ij H_j` (Sec. II), with
relative tensors `ε μ : ℝ × ℝ → Matrix (Fin 3) (Fin 3) ℂ`, indices `0, 1, 2 = x, y, z`. They are
taken symmetric (the hypothesis of the reciprocal theorem in Landau–Lifshitz, Ref. 4) and with
`y` decoupled from the `xz` plane, so that TM (`E` in the `xz` plane) and TE (`E ∥ y`) fields
separate (Sec. III, polarization paragraph).
For TM polarization the field `u = H_y` satisfies `∇·(A∇u) + k² μ_yy u = 0` with
`A = Jᵀ ε_xz⁻¹ J`, where `ε_xz` is the `xz` block of `ε` and `J(a, b) = (-b, a)`
(from `curl H = iωε₀εE`, `curl E = -iωμ₀μH`); for TE polarization `u = E_y` satisfies the same
equation with `A = Jᵀ μ_xz⁻¹ J` and `μ_yy` replaced by `ε_yy`. In vacuum `A = 1` and the
equation is `Δu + k²u = 0`. The equation is taken in the weak sense, with `u ∈ H¹_loc`.
Outside the slab `|z| ≤ h` the field is the Rayleigh (Fourier-harmonic) expansion of Eq. (4),
`k_{x,m} = α + 2πm/d`, `k_{z,m} = ±β_m`, `β_m = √(k² − k_{x,m}²)` (with `β_m = i√(k_{x,m}² − k²)`
for closed channels, so that these harmonics decay away from the object).
-/
open MeasureTheory Matrix
noncomputable section
namespace Arxivphysics_0610143
/-- The coordinate directions `e_x = (1, 0)` and `e_z = (0, 1)` of the plane of incidence. -/
def coordDir : Fin 2 → ℝ × ℝ := ![(1, 0), (0, 1)]
/-- Eq. (4), PDF p. 2: `k_{x,m} = α + 2πm/d` for the incident tangential wavenumber `α`. -/
def kxm (d α : ℝ) (m : ℤ) : ℝ := α + 2 * Real.pi * m / d
/-- Eq. (4), PDF p. 2: `β = √(k² − a²)` if `a² ≤ k²` (open channel) and `β = i√(a² − k²)`
otherwise (closed channel), so that `k_z = ±β`. -/
def kzOf (k a : ℝ) : ℂ :=
if a ^ 2 ≤ k ^ 2 then (Real.sqrt (k ^ 2 - a ^ 2) : ℂ)
else Complex.I * (Real.sqrt (a ^ 2 - k ^ 2) : ℂ)
/-- Eq. (4): the harmonic `exp(i(k_{x,m} x + β_m z))`, travelling (or decaying) towards `+z`. -/
def upMode (d k α : ℝ) (m : ℤ) (p : ℝ × ℝ) : ℂ :=
Complex.exp (Complex.I * ((kxm d α m : ℂ) * p.1 + kzOf k (kxm d α m) * p.2))
/-- Eq. (4): the harmonic `exp(i(k_{x,m} x − β_m z))`, travelling (or decaying) towards `−z`. -/
def downMode (d k α : ℝ) (m : ℤ) (p : ℝ × ℝ) : ℂ :=
Complex.exp (Complex.I * ((kxm d α m : ℂ) * p.1 - kzOf k (kxm d α m) * p.2))
/-- The `xz` block `[[M_xx, M_xz], [M_zx, M_zz]]` of a `3 × 3` tensor (indices `0, 1, 2 = x, y, z`). -/
def xzBlock (M : Matrix (Fin 3) (Fin 3) ℂ) : Matrix (Fin 2) (Fin 2) ℂ :=
!![M 0 0, M 0 2; M 2 0, M 2 2]
/-- The rotation `J(a, b) = (-b, a)`, which maps `∇u = (∂ₓu, ∂_z u)` to the `xz` part of
`curl (u e_y) = (-∂_z u, ∂ₓu)`. -/
def rotJ : Matrix (Fin 2) (Fin 2) ℂ := !![0, -1; 1, 0]
/-- The coefficient `Jᵀ M⁻¹ J` of the scalar equation `∇·(A∇u) + k² s u = 0` obtained from
Maxwell's equations for a field `u e_y` when the other field lies in the `xz` plane and the
corresponding material tensor has `xz` block `M`. -/
def inPlaneCoeff (M : Matrix (Fin 2) (Fin 2) ℂ) : Matrix (Fin 2) (Fin 2) ℂ :=
rotJᵀ * M⁻¹ * rotJ
/-- TM polarization (Fig. 3, `E` in the `xz` plane), field `u = H_y`: coefficient
`A = Jᵀ ε_xz⁻¹ J`. -/
def tmCoeff (ε : ℝ × ℝ → Matrix (Fin 3) (Fin 3) ℂ) (p : ℝ × ℝ) : Matrix (Fin 2) (Fin 2) ℂ :=
inPlaneCoeff (xzBlock (ε p))
/-- TM polarization, field `u = H_y`: zeroth-order coefficient `μ_yy`. -/
def tmPot (μ : ℝ × ℝ → Matrix (Fin 3) (Fin 3) ℂ) (p : ℝ × ℝ) : ℂ := μ p 1 1
/-- TE polarization (`E ∥ y`), field `u = E_y`: coefficient `A = Jᵀ μ_xz⁻¹ J`. -/
def teCoeff (μ : ℝ × ℝ → Matrix (Fin 3) (Fin 3) ℂ) (p : ℝ × ℝ) : Matrix (Fin 2) (Fin 2) ℂ :=
inPlaneCoeff (xzBlock (μ p))
/-- TE polarization, field `u = E_y`: zeroth-order coefficient `ε_yy`. -/
def tePot (ε : ℝ × ℝ → Matrix (Fin 3) (Fin 3) ℂ) (p : ℝ × ℝ) : ℂ := ε p 1 1
/-- Sec. II and Figs. 3–4: `M` is the relative tensor field (permittivity or permeability) of a
linear, local, reciprocal medium containing a one-dimensionally periodic object of period `d`
along `x` inside the slab `|z| ≤ h`, with vacuum outside:
* the entries of `M` and of the inverse of its `xz` block are measurable and bounded, the `xz`
block is invertible;
* `M` is symmetric, `M_ij = M_ji` (reciprocal medium) and `y` is decoupled:
`M_xy = M_zy = 0`;
* `M(x + d, z) = M(x, z)`;
* `M = 1` for `|z| > h`.
Absorption (complex entries) is allowed, and the unit cell is arbitrary. -/
def IsPeriodicSlabTensor (d h : ℝ) (M : ℝ × ℝ → Matrix (Fin 3) (Fin 3) ℂ) : Prop :=
(∀ i j, Measurable fun p => M p i j) ∧
(∀ i j, Measurable fun p => (xzBlock (M p))⁻¹ i j) ∧
(∃ C : ℝ, ∀ p, (∀ i j, ‖M p i j‖ ≤ C) ∧ ∀ i j, ‖(xzBlock (M p))⁻¹ i j‖ ≤ C) ∧
(∀ p, IsUnit (xzBlock (M p)).det) ∧
(∀ p, (M p)ᵀ = M p) ∧
(∀ p, M p 0 1 = 0 ∧ M p 2 1 = 0) ∧
(∀ x z : ℝ, M (x + d, z) = M (x, z)) ∧
(∀ x z : ℝ, h < |z| → M (x, z) = 1)
/-- The medium of Figs. 3–4: permittivity `ε` and permeability `μ` both of the form
`IsPeriodicSlabTensor d h`. -/
def IsReciprocalGratingMedium (d h : ℝ) (ε μ : ℝ × ℝ → Matrix (Fin 3) (Fin 3) ℂ) : Prop :=
IsPeriodicSlabTensor d h ε ∧ IsPeriodicSlabTensor d h μ
/-- The configuration without object (Eq. (8)): vacuum everywhere, `ε = μ = 1`. -/
def vacuumTensor : ℝ × ℝ → Matrix (Fin 3) (Fin 3) ℂ := fun _ => 1
/-- `u ∈ H¹_loc(ℝ²)` is a weak solution of `∇·(A∇u) + k² s u = 0`: `u` and a weak gradient
`g = (∂ₓu, ∂_z u)` are locally square integrable, and for every smooth compactly supported test
function `φ`, `∫ (A g)·∇φ − k² s u φ = 0`. -/
def IsWeakSolution (A : ℝ × ℝ → Matrix (Fin 2) (Fin 2) ℂ) (s : ℝ × ℝ → ℂ) (k : ℝ)
(u : ℝ × ℝ → ℂ) : Prop :=
(∀ R : ℝ, MemLp u 2 (volume.restrict (Metric.closedBall (0 : ℝ × ℝ) R))) ∧
∃ g : ℝ × ℝ → Fin 2 → ℂ,
(∀ (i : Fin 2) (R : ℝ),
MemLp (fun p => g p i) 2 (volume.restrict (Metric.closedBall (0 : ℝ × ℝ) R))) ∧
(∀ (i : Fin 2) (φ : ℝ × ℝ → ℝ), ContDiff ℝ (⊤ : ℕ∞) φ → HasCompactSupport φ →
∫ p, u p * ((fderiv ℝ φ p (coordDir i) : ℝ) : ℂ) = -∫ p, g p i * ((φ p : ℝ) : ℂ)) ∧
(∀ φ : ℝ × ℝ → ℝ, ContDiff ℝ (⊤ : ℕ∞) φ → HasCompactSupport φ →
∫ p, ((∑ i : Fin 2, ∑ j : Fin 2,
A p i j * g p j * ((fderiv ℝ φ p (coordDir i) : ℝ) : ℂ)) -
(k : ℂ) ^ 2 * s p * u p * ((φ p : ℝ) : ℂ)) = 0)
/-- `u` is quasi-periodic with tangential wavenumber `α`: `u(x + d, z) = e^{iαd} u(x, z)`. -/
def IsQuasiPeriodic (d α : ℝ) (u : ℝ × ℝ → ℂ) : Prop :=
∀ x z : ℝ, u (x + d, z) = Complex.exp (Complex.I * α * d) * u (x, z)
/-- Fig. 1(a), Figs. 3–4, Eq. (4): `u` is a field of the grating problem with coefficients `A`, `s`
for the unit plane wave `exp(i(αx − β₀z))` incident from above (`z > h`): `u` is a weak
solution, `α`-quasi-periodic, and
* `u = exp(i(αx − β₀z)) + ∑_m r_m exp(i(k_{x,m}x + β_m z))` for `z > h`;
* `u = ∑_m t_m exp(i(k_{x,m}x − β_m z))` for `z < −h`.
`r m`, `t m` are the reflected and transmitted Fourier amplitudes of order `m`. -/
def IsDownScattering (d k h α : ℝ) (A : ℝ × ℝ → Matrix (Fin 2) (Fin 2) ℂ) (s : ℝ × ℝ → ℂ)
(u : ℝ × ℝ → ℂ) (r t : ℤ → ℂ) : Prop :=
IsWeakSolution A s k u ∧ IsQuasiPeriodic d α u ∧
(∀ x z : ℝ, h < z →
HasSum (fun m : ℤ => r m * upMode d k α m (x, z)) (u (x, z) - downMode d k α 0 (x, z))) ∧
(∀ x z : ℝ, z < -h → HasSum (fun m : ℤ => t m * downMode d k α m (x, z)) (u (x, z)))
/-- Fig. 1(b), Fig. 3, Eq. (4): `u` is a field of the grating problem with coefficients `A`, `s`
for the unit plane wave `exp(i(αx + β₀z))` incident from below (`z < −h`): `u` is a weak
solution, `α`-quasi-periodic, and
* `u = exp(i(αx + β₀z)) + ∑_m r_m exp(i(k_{x,m}x − β_m z))` for `z < −h`;
* `u = ∑_m t_m exp(i(k_{x,m}x + β_m z))` for `z > h`. -/
def IsUpScattering (d k h α : ℝ) (A : ℝ × ℝ → Matrix (Fin 2) (Fin 2) ℂ) (s : ℝ × ℝ → ℂ)
(u : ℝ × ℝ → ℂ) (r t : ℤ → ℂ) : Prop :=
IsWeakSolution A s k u ∧ IsQuasiPeriodic d α u ∧
(∀ x z : ℝ, z < -h →
HasSum (fun m : ℤ => r m * downMode d k α m (x, z)) (u (x, z) - upMode d k α 0 (x, z))) ∧
(∀ x z : ℝ, h < z → HasSum (fun m : ℤ => t m * upMode d k α m (x, z)) (u (x, z)))
/-- Eq. (9), PDF p. 2: `|a / b|²`, the transmittance `T = |E^{(0)} / E^{no,(0)}|²` (and the
reflectance) as the squared modulus of a zeroth-order amplitude relative to its value without
object. -/
def ampRatioSq (a b : ℂ) : ℝ := Complex.normSq (a / b)
end Arxivphysics_0610143
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
coordDir. This defines the two coordinate directions of the plane , whose points are written :
Index corresponds to and index to .
kxm. For real numbers (the period) and (the tangential wavenumber), and an integer , this defines
No condition is placed on . If , the quotient is taken to be , so for every . If , the formula is used as written.
kzOf. For real numbers and , this defines the complex number
In the first case the value is real and ; it equals when . In the second case it is purely imaginary with positive imaginary part. Only enters, so the sign of is irrelevant. The value is allowed.
upMode. For real , an integer , and a point , write . The "up" harmonic is
- When , it has modulus .
- Otherwise, , which decays as and grows as .
downMode. With the same notation, the "down" harmonic is
- When , it has modulus .
- Otherwise, , which decays as and grows as .
xzBlock. For a complex matrix with indices , this is the submatrix obtained by deleting the row and column:
rotJ. This is the complex matrix
It sends .
inPlaneCoeff. For a complex matrix , this defines
The inverse is the true inverse when . When , the inverse is taken to be the zero matrix, so . Entrywise, for any . Hence, for invertible , this works out to
tmCoeff. Given a field assigning a complex matrix to each point , this is the matrix field
The same zero-inverse convention applies at points where the block is singular.
tmPot. Given a matrix field , this is the scalar field .
teCoeff. Given a matrix field , this is
with the same convention at singular points.
tePot. Given a matrix field , this is the scalar field .
IsPeriodicSlabTensor. For real numbers and , with no sign or nonzero conditions, a field satisfies this property exactly when all of the following hold:
- Every one of the nine entry functions is Borel measurable.
- Every entry of is Borel measurable.
- There is a single real constant such that, for all and all indices, and .
- For every , .
- For every , is symmetric: . This is plain transpose, not conjugate transpose.
- For every , and . By symmetry, also .
- For all real , .
- For all real with , is the identity matrix.
Several things are not required:
- No positivity, ellipticity, or sign condition on real or imaginary parts is imposed.
- is unconstrained apart from boundedness; in particular it may vanish.
Some degenerate parameter values make conditions trivial or very strong:
- If , periodicity is trivial.
- If , condition 8 forces everywhere.
- If , condition 8 forces off the line .
IsReciprocalGratingMedium. For and two matrix fields , this holds exactly when both and satisfy the property above with the same and .
vacuumTensor. This is the constant field , the identity matrix at every point.
IsWeakSolution. The inputs are:
- a complex matrix field ;
- a complex scalar field ;
- a real number ;
- a function .
The property holds exactly when all three of the following are true.
First, for every real , is square-integrable with respect to Lebesgue measure on the closed ball of radius about the origin. In the product metric used on , this ball is the square , and it is empty for .
Second, there exists such that:
- each is square-integrable on every such ball;
- for each and every real-valued, infinitely differentiable, compactly supported ,
Third, for every such ,
Some features of this definition:
- No conjugation appears, and test functions are real-valued only.
- No measurability or boundedness of or is assumed here.
- Under the convention used, the integral of a non-integrable function is . So whenever the integrand in the last condition fails to be integrable, that condition holds automatically for that .
IsQuasiPeriodic. For real , a function is quasi-periodic exactly when, for all real ,
This is required at every point, not almost everywhere. If , it is trivially true.
IsDownScattering. The inputs are real , fields , a function , and sequences . The property holds exactly when:
- is a weak solution for as defined above.
- is quasi-periodic with .
- For every and every , the series over all converges unconditionally (equivalently, absolutely) with
- For every and every ,
again with unconditional convergence.
Here , since always. Some consequences of the conditions as stated:
- If , this subtracted term is , which grows as .
- If , both expansions are required simultaneously on the strip .
- No uniqueness of , or is asserted. The definition is a relation among them.
IsUpScattering. The inputs are the same as for IsDownScattering. The property holds exactly when:
- is a weak solution for .
- is quasi-periodic with .
- For every and every ,
- For every and every ,
Both series converge unconditionally. Here . The same remarks apply:
- If , grows as .
- If , both expansions are required simultaneously on the overlap strip.
- No uniqueness is asserted.
ampRatioSq. For complex , this is the real number
When , the quotient is taken to be , so the value is .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.