AFTD Auto-Formalizing Theoretical Domains

spectral_distance_l2_sq

def

The squared Euclidean spectral distance between two eigenvalue sequences of length m is the sum of the squared differences of their coordinates.

Statement

def spectral_distance_l2_sq {m : ℕ} (s₁ s₂ : Fin m → ℝ) : ℝ
Defined in
arXiv:2610.18636 Section 1, p. 3
Verified
20 Oct 2026
Axioms
none listed
Used by 3

Read back from the Lean

For a natural number $m$ and two functions $s_1, s_2 : \mathrm{Fin}\ m \to \mathbb{R}$, spectral_distance_l2_sq is defined as $\sum_{i : \mathrm{Fin}\ m} (s_1(i) - s_2(i))^2$, the squared $L^2$ distance between $s_1$ and $s_2$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- Squared Euclidean spectral distance between two eigenvalue sequences of length m. -/
def spectral_distance_l2_sq {m : ℕ} (s₁ s₂ : Fin m → ℝ) : ℝ := ∑ i : Fin m, (s₁ i - s₂ i) ^ 2
See it in the graphDiscuss this resultChallenge it