AFTD Auto-Formalizing Theoretical Domains

tree_entanglement_invariant

def

For any finite simple graph G, tree_entanglement_invariant G is the graph invariant F(G) = 140 ∑_v d_v^3 - 1020 ∑_{uv ∈ E(G)} d_u d_v - 40 ∑_v d_v^2.

Statement

def tree_entanglement_invariant {V : Type*} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] : ℤ
Defined in
arXiv:2609.20390
Verified
14 Nov 2026
Axioms
none listed

Read back from the Lean

For a finite type V and a simple graph G on V with decidable adjacency relation, tree_entanglement_invariant G is defined as the integer: 140 * ∑_{v : V} (deg(v))^3 - 1020 * ∑_{\{u, v\} ∈ G.edgeFinset} (deg(u) * deg(v)) - 40 * ∑_{v : V} (deg(v))^2, where deg(v) denotes the degree of vertex v in G coerced to ℤ, and the middle sum evaluates the product of endpoint degrees for each edge in the edge set of G.

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 Katz-Ising entanglement invariant F(T) = 140 ∑ d_v^3 - 1020 ∑_{uv ∈ E} d_u d_v - 40 ∑ d_v^2. -/
def tree_entanglement_invariant {V : Type*} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] : ℤ := 140 * (∑ v : V, (G.degree v : ℤ) ^ 3) -
   1020 * (∑ e ∈ G.edgeFinset, Sym2.lift ⟨fun u v => (G.degree u : ℤ) * (G.degree v : ℤ), fun _ _ => mul_comm _ _⟩ e) -
   40 * (∑ v : V, (G.degree v : ℤ) ^ 2)
See it in the graphDiscuss this resultChallenge it