cycle_weighted_adjacency_matrix_diag
For any type α with AddZeroClass, any natural number n, any function t : Fin n → α, and any vertex i : Fin n, the diagonal entry cycle_weighted_adjacency_matrix n t i i equals 0.
Statement
theorem cycle_weighted_adjacency_matrix_diag {α : Type*} [AddZeroClass α] (n : ℕ) (t : Fin n → α) (i : Fin n) : cycle_weighted_adjacency_matrix n t i i = 0
- Source
- folklore
- Verified
- 09 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- cycle_weighted_adjacency_matrixFor a type α equipped with AddZeroClass, a natural number n, and a function t : Fin n → α, cycle_weighted_adjacency_matrix n t is the Fin…
Read back from the Lean
For any type α with addition and zero ([AddZeroClass α]), any natural number n, any function t : Fin n → α, and any index i : Fin n, the (i, i)-th (diagonal) entry of cycle_weighted_adjacency_matrix n t is equal to 0.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
The proof unfolds the definition of the cycle weighted adjacency matrix and simplifies. Since simple graphs contain no self-loops by irreflexivity (`SimpleGraph.irrefl`), the adjacency condition in the diagonal entry evaluates to false, leaving 0.
The diagonal entry of the cycle weighted adjacency matrix at (i, i) is 0
By definition, the (i, i) entry of the cycle weighted adjacency matrix is `if (SimpleGraph.cycleGraph n).Adj i i then t i + t i else 0`. Because simple graphs have no self-loops (`SimpleGraph.irrefl`), the adjacency condition is false, so the expression simplifies directly to 0.
uses
SimpleGraph.irreflsimp [cycle_weighted_adjacency_matrix, SimpleGraph.irrefl]
SimpleGraph.irrefl- in any simple graph, no vertex is adjacent to itself
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- The diagonal entries of the cycle weighted adjacency matrix are zero. -/theorem cycle_weighted_adjacency_matrix_diag {α : Type*} [AddZeroClass α] (n : ℕ) (t : Fin n → α) (i : Fin n) : cycle_weighted_adjacency_matrix n t i i = 0 := by simp [cycle_weighted_adjacency_matrix, SimpleGraph.irrefl]