AFTD Auto-Formalizing Theoretical Domains

simple_graph_triangle_degree

def

The triangle-degree td_G(v): the number of triangles of G containing v, i.e. the number of 2-element subsets {u, w} of the neighbourhood N(v) with u adjacent to w.

Statement

def simple_graph_triangle_degree {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (v : V) : ℕ
Defined in
arXiv:2610.08478 (Regular K_3-Irregular Graphs of Every Regularity at Least Nine), Abstract and Sec. 1 (triangle-degree, the K_3-degree of a vertex).
Verified
11 Oct 2026
Axioms
none listed
Used by 15

Lean source view module on GitHub

/-- Triangle-degree of a vertex: the number of triangles of `G` through `v` (adjacent pairs inside the neighbourhood of `v`). -/
def simple_graph_triangle_degree {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (v : V) : ℕ :=
  (((G.neighborFinset v).powersetCard 2).filter (fun s => ∀ x ∈ s, ∀ y ∈ s, x ≠ y → G.Adj x y)).card
See it in the graphDiscuss this resultChallenge it