Array-factor model of an RIS and the electromagnetic reciprocity integral
DefinitionArxiv2606_14486_BasicObjects of Sections II and III of Khankhoje and Kundu (2026).
- Steering vector (eq. 1). A linear array has elements spaced along . For wavenumber and an angle measured clockwise from , .
- Reflected wavefronts (eqs. 2, 3, 5). Element reflects with coefficient , and is the vector of these coefficients. The reflected wavefront is the element-wise product . The forward wavefront is and the reverse wavefront is .
- In phase. A wavefront is in phase (it interferes constructively in its direction) if there is a single with for every .
- Phase profiles (eqs. 4, 6). The forward phase step is . A linear profile is , and eq. (6) is .
- Array factor and discrete beamforming (eqs. 9-11). For weights , , so and both carry the exponent , as in eqs. (9) and (11). The weights solve eq. (10) if every lies in the finite set of diode-state reflection coefficients and at is maximal among all such weight vectors.
- Time-harmonic fields (Section III). Phasor fields use the time dependence . The curl is computed from Fréchet partial derivatives. A medium is reciprocal on a region if its permittivity and permeability tensors are symmetric there. The fields are source-free on the region if they are differentiable there and satisfy and .
- Reciprocity integral (eq. 12). For a box , over its boundary with the outward normal. The integral is written as the sum over the six faces, and the products carry no complex conjugation.
Formalization Note Elements are indexed from , so the paper's factor is the index itself. The flux through the box boundary uses the face parametrisation of Mathlib's divergence theorem.
import Mathlib
/-!
Khankhoje and Kundu, *Implications of the Reciprocity Theorem for Reconfigurable Intelligent
Surfaces*, arXiv:2606.14486v1 (2026): the array-factor model of Section II (steering vector,
reflected wavefronts, linear reflection-phase profiles, array factor and discrete beamforming
problem, eqs. (1)-(11)) and, for Section III, time-harmonic fields in a linear medium with
symmetric permittivity and permeability tensors and the reciprocity surface integral `Ψ` of
eq. (12) over a rectangular box.
Element indices: element `i : Fin n` is the paper's element `i + 1`, so the paper's factor
`(i - 1)` is `(i : ℕ)` here.
-/
open MeasureTheory
noncomputable section
namespace Arxiv2606_14486
/-- Section II, eq. (1): the array steering vector
`a(θ) = [1, e^{jkd sin θ}, …, e^{jk(n-1)d sin θ}]ᵀ` of `n` elements spaced `d` along `x`, for
wavenumber `k` and angle `θ` measured clockwise from `+z`. -/
def steering (n : ℕ) (k d θ : ℝ) : Fin n → ℂ :=
fun i => Complex.exp ((((i : ℕ) : ℝ) * k * d * Real.sin θ : ℝ) * Complex.I)
/-- Section II, after eq. (2): the vector `Ψ` of element-wise reflection coefficients
`R_i e^{jψ_i}`, with magnitudes `R_i` and reflection phases `ψ_i`. -/
def reflCoeffs {n : ℕ} (R ψ : Fin n → ℝ) : Fin n → ℂ :=
fun i => (R i : ℂ) * Complex.exp ((ψ i : ℂ) * Complex.I)
/-- Section II, eqs. (2) and (5): the reflected wavefront `a(α) · Ψ · a(β)` (element-wise
products). Eq. (2) is `y = a(θ₂) · Ψ · a(-θ₁)`, i.e. `wavefront n k d θ₂ (-θ₁) (reflCoeffs R ψ)`; eq. (5) is
`z = a(-θ₃) · Ψ' · a(θ₂)`, i.e. `wavefront n k d (-θ₃) θ₂ (reflCoeffs R' ψ')`. -/
def wavefront (n : ℕ) (k d α β : ℝ) (c : Fin n → ℂ) : Fin n → ℂ :=
fun i => steering n k d α i * c i * steering n k d β i
/-- Section II-A, before eq. (4): the entries of a wavefront are all in phase (constructive
interference in the corresponding direction): there is one phase `φ` with
`v_i = |v_i| e^{jφ}` for every element `i`. -/
def InPhase {n : ℕ} (v : Fin n → ℂ) : Prop :=
∃ φ : ℝ, ∀ i, v i = (‖v i‖ : ℂ) * Complex.exp ((φ : ℂ) * Complex.I)
/-- Section II-A, eq. (4): the inter-element phase step `Δψ = kd (sin θ₁ - sin θ₂)` for
beamforming from incidence angle `θ₁` to reflection angle `θ₂`. -/
def phaseStep (k d θ₁ θ₂ : ℝ) : ℝ := k * d * (Real.sin θ₁ - Real.sin θ₂)
/-- Section II-A, eqs. (4) and (6): a reflection-phase profile linear in the element index,
`ψ_i = c + (i - 1) Δ` (eq. (4) "up to a constant" `c`; eq. (6) is `c = 0`, `Δ = Δψ'`). -/
def linearPhases (n : ℕ) (c Δ : ℝ) : Fin n → ℝ := fun i => c + ((i : ℕ) : ℝ) * Δ
/-- Section II-B, eqs. (9) and (11): the array factor of weights `w`,
`∑_i w_i exp(j (i-1) kd [sin α + sin β])`. Eq. (9) is `G(-θ₁, θ₂)` with the forward weights
and eq. (11) is `G(θ₂, -θ₁)` with the reverse weights `τ`; both have the exponent
`(i-1) kd [sin θ₂ - sin θ₁]`, as printed. -/
def arrayFactor (n : ℕ) (k d α β : ℝ) (w : Fin n → ℂ) : ℂ :=
∑ i, w i * Complex.exp ((((i : ℕ) : ℝ) * k * d * (Real.sin α + Real.sin β) : ℝ) * Complex.I)
/-- Section II-B, eq. (10): `w` solves the discrete beamforming problem
`max_w |G(α, β)| subject to w ∈ 𝓑`, where every element's weight (field reflection
coefficient) lies in the finite set `𝓑` of diode-state coefficients. -/
def IsOptimalWeights (B : Finset ℂ) (n : ℕ) (k d α β : ℝ) (w : Fin n → ℂ) : Prop :=
(∀ i, w i ∈ B) ∧
∀ w' : Fin n → ℂ, (∀ i, w' i ∈ B) → ‖arrayFactor n k d α β w'‖ ≤ ‖arrayFactor n k d α β w‖
/-- Section III, eq. (12): the partial derivative `∂_j F` at `x` of a complex scalar field on
`ℝ³`, as the Fréchet derivative in the `j`-th coordinate direction. -/
def pderiv (F : (Fin 3 → ℝ) → ℂ) (j : Fin 3) (x : Fin 3 → ℝ) : ℂ :=
fderiv ℝ F x (Pi.single j 1)
/-- The curl `∇ × F` of a complex (phasor) vector field on `ℝ³`, used in the time-harmonic
Maxwell equations underlying eq. (12) (Harrington, Eq. 3-34, cited in Section III). -/
def curl (F : (Fin 3 → ℝ) → Fin 3 → ℂ) (x : Fin 3 → ℝ) : Fin 3 → ℂ :=
![pderiv (fun y => F y 2) 1 x - pderiv (fun y => F y 1) 2 x,
pderiv (fun y => F y 0) 2 x - pderiv (fun y => F y 2) 0 x,
pderiv (fun y => F y 1) 0 x - pderiv (fun y => F y 0) 1 x]
/-- Section I (citing Chew, Ch. 30) and Section III: on the region `V` the medium is linear and
reciprocal, i.e. described by permittivity and permeability tensors `ε(x)`, `μ(x)` (complex,
so lossy media are allowed) that are symmetric matrices. -/
def IsReciprocalMedium (eps mu : (Fin 3 → ℝ) → Matrix (Fin 3) (Fin 3) ℂ)
(V : Set (Fin 3 → ℝ)) : Prop :=
∀ x ∈ V, (eps x).transpose = eps x ∧ (mu x).transpose = mu x
/-- Section III, eq. (12): the phasor fields `(E, H)` (time dependence `e^{jωt}`, as in
Section II) satisfy the source-free time-harmonic Maxwell equations
`∇ × E = -jω μ H`, `∇ × H = jω ε E` at every point of `V`, where both fields are
differentiable ("a volume ... does not contain any impressed sources"). -/
def IsSourceFreeMaxwellOn (ω : ℝ) (eps mu : (Fin 3 → ℝ) → Matrix (Fin 3) (Fin 3) ℂ)
(V : Set (Fin 3 → ℝ)) (E H : (Fin 3 → ℝ) → Fin 3 → ℂ) : Prop :=
∀ x ∈ V, DifferentiableAt ℝ E x ∧ DifferentiableAt ℝ H x ∧
curl E x = (-(Complex.I * ω)) • (mu x).mulVec (H x) ∧
curl H x = (Complex.I * ω) • (eps x).mulVec (E x)
/-- Section III and Appendix A: the open rectangular box `∏_i (a_i, b_i)`; the paper's
surface `S` enclosing the RIS is the boundary of such a bounding box. -/
def boxInterior (a b : Fin 3 → ℝ) : Set (Fin 3 → ℝ) :=
Set.pi Set.univ fun i => Set.Ioo (a i) (b i)
/-- The outward flux `∮_S F · ds` of a complex vector field through the boundary `S` of the
box `[a, b] ⊂ ℝ³`: for each coordinate `i`, the integral of `F_i` over the face `x_i = b_i`
minus the integral over the face `x_i = a_i`, each face parametrised by the two remaining
coordinates (the face convention of Mathlib's divergence theorem). -/
def boxFlux (a b : Fin 3 → ℝ) (F : (Fin 3 → ℝ) → Fin 3 → ℂ) : ℂ :=
∑ i : Fin 3,
((∫ y in Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove), F (i.insertNth (b i) y) i) -
∫ y in Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove), F (i.insertNth (a i) y) i)
/-- Section III, eq. (12): the reciprocity integral
`Ψ = ∮_S (E₁ × H₂ - E₂ × H₁) · ds` over the boundary of the box `[a, b]`, where `(E₁, H₁)` are
the fields with the transmitter at `A` and `(E₂, H₂)` those with the transmitter at `B`
(products without complex conjugation). -/
def reciprocityIntegral (a b : Fin 3 → ℝ) (E₁ H₁ E₂ H₂ : (Fin 3 → ℝ) → Fin 3 → ℂ) : ℂ :=
boxFlux a b fun x => crossProduct (E₁ x) (H₂ x) - crossProduct (E₂ x) (H₁ x)
end Arxiv2606_14486
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
The code contains only definitions and no theorem, so nothing is asserted beyond what each definition introduces. Throughout, is a natural number, elements are indexed by , denotes the imaginary unit, and coordinates of are indexed .
steering (steering vector). Given and arbitrary reals , this is the complex vector with entries
The first entry () is . No sign, positivity, or range condition is placed on , , or . When the vector is empty.
reflCoeffs (reflection-coefficient vector). Given real vectors and , this is the complex vector with entries
The are arbitrary reals. They are not required to be non-negative or at most , so they may be zero or negative.
wavefront (reflected wavefront). Given , reals , and a complex vector , this is the vector obtained by entrywise multiplication
where is the steering vector above. The angles are arbitrary reals; any sign flips (such as ) must be supplied by the caller.
InPhase. A vector is "in phase" if there exists a single real such that for every
Edge cases:
- Zero entries satisfy this for every , so they impose no constraint.
- The all-zero vector is in phase.
- Every vector with is vacuously in phase.
phaseStep. For reals , this is the real number
linearPhases. For and reals , this is the real vector
so .
arrayFactor. For , reals , and weights , this is the complex number
The exponent contains the sum , and the expression is symmetric in and . For the sum is empty and .
IsOptimalWeights. For a finite set , , reals , and , this is the proposition that both of the following hold:
- every entry lies in ;
- for every whose entries all lie in ,
with the array factor above.
Optimality is only relative to -valued weight vectors, and uniqueness is not asserted.
Edge cases:
- If and , no satisfies this.
- If , the unique (empty) satisfies it for every , including .
pderiv (partial derivative). For , an index , and , this is the real Fréchet derivative of at (treating as a real vector space) applied to the -th standard basis vector :
If is not (real-)Fréchet differentiable at , the value is by convention. This holds even when the ordinary partial derivative in direction exists.
curl. For a complex vector field and , this is
with each the partial derivative defined above. Any component that is not Fréchet differentiable at contributes for its partials.
IsReciprocalMedium. For matrix-valued functions and a set , this is the proposition that for every
Here is the plain transpose, with no complex conjugation.
What is not required:
- invertibility, definiteness, regularity, or measurability of or ;
- any condition outside .
If , the condition is vacuous.
IsSourceFreeMaxwellOn. For a real , as above, a set , and fields , this is the proposition that at every :
- and are real-Fréchet differentiable at , as maps on all of ;
- the following two equations hold, where and are matrix–vector products:
What is not required:
- that be open, bounded, or nonempty;
- any sign condition on ;
- any symmetry of or ;
- any condition outside .
Degenerate cases:
- reduces the condition to both curls vanishing on .
- always satisfies it.
- makes it vacuous.
boxInterior. For , this is the open box
It is empty if for some .
boxFlux. For and , this is the complex number
The symbols mean:
- is the closed rectangle , with the two remaining coordinates taken in increasing index order.
- is the point of whose -th coordinate is and whose other two coordinates are , in order.
- Each integral is a Lebesgue (Bochner) integral with respect to 2-dimensional Lebesgue measure.
So for each coordinate , the term takes only the -th component of , integrated over the face minus the face .
Edge cases:
- Any face integral whose integrand is not integrable is by convention.
- If for some , then is empty and both integrals in the -th term are .
- No continuity or other condition is placed on .
reciprocityIntegral. For and four fields , this is the box flux defined above of the field
The cross product of is taken without complex conjugation:
No hypotheses are placed on the four fields. In particular they are not assumed to satisfy Maxwell's equations or to be related to any transmitter, and the non-integrable and empty-face conventions of the box flux apply.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.