AFTD Auto-Formalizing Theoretical Domains

adjacency_lambda2

def

For any finite vertex type V and any simple graph G on V, the eigenvalue at index 1 of the real adjacency matrix (G.isHermitian_adjMatrix ℝ).eigenvalues₀ when 2 ≤ Fintype.card V (which is the second largest eigenvalue λ₂ of the adjacency matrix, as Mathlib's Matrix.IsHermitian.eigenvalues₀ is antitone: index 0 is the largest and index 1 is the second largest), defaulting to 0 if Fintype.card V < 2.

Statement

noncomputable def adjacency_lambda2 {V : Type*} [Fintype V] (G : SimpleGraph V) : ℝ
Defined in
arXiv:2611.03879, Section 1
Verified
05 Nov 2026
Axioms
none listed
Used by 2

Read back from the Lean

For an arbitrary type V with a Fintype V instance (i.e., V is finite) and a simple graph G : SimpleGraph V, adjacency_lambda2 G is defined as a real number (ℝ): - If the number of vertices in V is at least 2 (h : 2 ≤ Fintype.card V), it evaluates to (G.isHermitian_adjMatrix ℝ).eigenvalues₀ ⟨1, h⟩, which is the eigenvalue at index 1 (the second element under 0-based indexing of Fin (Fintype.card V)) of the Hermitian real adjacency matrix of G. - Otherwise (if Fintype.card V < 2, i.e., V has 0 or 1 vertices), it evaluates to 0.

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

/-- The second largest eigenvalue of the real adjacency matrix of a finite simple graph. -/
noncomputable def adjacency_lambda2 {V : Type*} [Fintype V] (G : SimpleGraph V) : ℝ := open scoped Classical in
  if h : 2 ≤ Fintype.card V then
    (G.isHermitian_adjMatrix ℝ).eigenvalues₀ ⟨1, h⟩
  else 0
See it in the graphDiscuss this resultChallenge it