AFTD Auto-Formalizing Theoretical Domains

graphon_hom_density

def

The homomorphism density t(H, W) of a finite simple graph H in a graphon W is the integral over [0, 1]^(V(H)) of the product of W(x_u, x_v) over all edges uv of H.

Statement

noncomputable def graphon_hom_density {V : Type*} [Fintype V] [DecidableEq V]
    (H : SimpleGraph V) [Fintype H.edgeSet] (W : ℝ → ℝ → ℝ) : ℝ
Defined in
arXiv:2611.17885 Section 1
Verified
16 Nov 2026
Axioms
none listed

Read back from the Lean

graphon_hom_density is a definition that takes: - a type V with [Fintype V] and [DecidableEq V], - a simple graph H : SimpleGraph V with [Fintype H.edgeSet], and - a function W : ℝ → ℝ → ℝ, and returns the real number given by the Bochner integral (with respect to the standard volume measure on V → ℝ) over the product set $\{x : V \to ℝ \mid \forall v : V, x(v) \in [0, 1]\}$ of the product over all edges e ∈ H.edgeFinset of W (x u) (x v), where (u, v) = Quot.out e is an arbitrarily chosen ordered pair representing the undirected edge e.

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 homomorphism density t(H, W) of a finite simple graph H in a graphon W. -/
noncomputable def graphon_hom_density {V : Type*} [Fintype V] [DecidableEq V]
    (H : SimpleGraph V) [Fintype H.edgeSet] (W : ℝ → ℝ → ℝ) : ℝ := ∫ x in Set.pi Set.univ (fun _ : V => Set.Icc (0 : ℝ) 1),
    ∏ e ∈ H.edgeFinset, W (x (Quot.out e).1) (x (Quot.out e).2)
See it in the graphDiscuss this resultChallenge it