Documentation

Graphon.HomDensity

Homomorphism Densities #

This file defines homomorphism densities for graphons, which measure how frequently a fixed graph pattern appears in a graphon.

Main definitions #

Main results #

Implementation notes #

The homomorphism density t(F, W) for a graph F on vertex set V and graphon W is defined as the integral over all maps x : V → [0,1] of the product of W(x(u), x(v)) over all edges {u, v} of F.

Technical note on a.e. bounds #

The integrand bounds (nonneg, ≤ 1, integrability) require lifting the graphon's a.e. bound from μ × μ to Measure.pi (fun _ => μ). The key fact is that for probability measures with independent coordinates, the pair projection x ↦ (x v₁, x v₂) maps Measure.pi to μ × μ when v₁ ≠ v₂. This is implicit in measurePreserving_piFinTwo and related results.

References #

noncomputable def Graphon.homDensity {α : Type u_1} [MeasurableSpace α] {μ : MeasureTheory.Measure α} {V : Type u_2} [Fintype V] (F : SimpleGraph V) [DecidableRel F.Adj] (W : Graphon α μ) :

The homomorphism density t(F, W) of a simple graph F in a graphon W.

This measures the probability that a random map from the vertices of F to the probability space preserves adjacency (in expectation). Formally:

t(F, W) = ∫_{x : V → α} ∏_{e ∈ E(F)} W(x(u_e), x(v_e)) dμ^V

The product uses Quot.out to extract a canonical representative pair from each edge in edgeFinset. Since W is symmetric a.e. and the integral marginalizes over all vertex mappings, the choice of representative does not affect the result.

For a finite graph G on n vertices, t(F, W_G) = hom(F, G) / n^|V(F)| where hom(F, G) is the number of graph homomorphisms from F to G.

Equations
Instances For
    noncomputable def Graphon.homDensityIntegrand {α : Type u_1} [MeasurableSpace α] {μ : MeasureTheory.Measure α} {V : Type u_2} [Fintype V] (F : SimpleGraph V) [DecidableRel F.Adj] (W : Graphon α μ) (x : Vα) :

    The integrand in the homomorphism density formula.

    Equations
    Instances For
      theorem Graphon.homDensity_congr_decRel {α : Type u_1} [MeasurableSpace α] {μ : MeasureTheory.Measure α} [MeasureTheory.IsProbabilityMeasure μ] {V : Type u_2} [Fintype V] [DecidableEq V] (F : SimpleGraph V) (inst₁ inst₂ : DecidableRel F.Adj) (W : Graphon α μ) :

      homDensity is independent of the DecidableRel instance used.

      Since edgeFinset is determined by edgeSet (a propositional Set), different DecidableRel instances for the same adjacency relation yield the same homDensity.

      The homomorphism density of the empty graph is 1.

      An empty graph has no edges, so the integrand is a product over an empty set, which equals 1. The integral of 1 over a probability space is 1.

      theorem Graphon.edge_out_ne {V : Type u_2} [Fintype V] [DecidableEq V] {F : SimpleGraph V} [DecidableRel F.Adj] {e : Sym2 V} (he : e F.edgeSet) :
      (Quot.out e).1 (Quot.out e).2

      Helper: for edges in simple graphs, the two vertices are distinct.

      theorem Graphon.graphonEval_mem_Icc_ae {α : Type u_1} [MeasurableSpace α] {μ : MeasureTheory.Measure α} [MeasureTheory.IsProbabilityMeasure μ] {V : Type u_2} [Fintype V] [DecidableEq V] (W : Graphon α μ) {v₁ v₂ : V} (hne : v₁ v₂) :
      ∀ᵐ (x : Vα) MeasureTheory.Measure.pi fun (x : V) => μ, W.toAEEqFun (x v₁, x v₂) Set.Icc 0 1

      For probability measures, the graphon value at a pair projection is in [0,1] a.e.

      This key technical lemma shows that for distinct indices v₁ ≠ v₂ : V, the composition x ↦ W(x v₁, x v₂) takes values in [0,1] for a.e. x : V → α under Measure.pi.

      The proof uses that for distinct coordinates, eval v₁ and eval v₂ are independent under Measure.pi. By measurePreserving_eval, the marginal distributions equal μ, and by independence, the pair (x v₁, x v₂) has distribution μ × μ. Since the graphon's a.e. bound holds on μ × μ, it lifts to Measure.pi.

      The integrand in the homomorphism density is nonnegative a.e.

      This follows because each factor W(x(u), x(v)) is nonnegative a.e. (W takes values in [0,1] a.e.) and a product of nonnegative terms is nonnegative.

      theorem Graphon.homDensityIntegrand_le_one_ae {α : Type u_1} [MeasurableSpace α] {μ : MeasureTheory.Measure α} [MeasureTheory.IsProbabilityMeasure μ] {V : Type u_2} [Fintype V] [DecidableEq V] (F : SimpleGraph V) [DecidableRel F.Adj] (W : Graphon α μ) :
      (fun (x : Vα) => homDensityIntegrand F W x) ≤ᵐ[MeasureTheory.Measure.pi fun (x : V) => μ] fun (x : Vα) => 1

      The integrand in the homomorphism density is at most 1 a.e.

      This follows because each factor W(x(u), x(v)) is at most 1 a.e. (W takes values in [0,1] a.e.) and a product of terms in [0,1] is in [0,1].

      The homomorphism density integrand takes values in [0, 1] a.e.

      This combines the nonnegativity and upper bound.

      The homomorphism density integrand is ae-measurable.

      Technical note: The proof requires showing that the composition x ↦ W(x v₁, x v₂) is ae-measurable on Measure.pi. The graphon is ae-strongly-measurable on μ × μ, and we need to lift this to the pushforward measure Measure.map (x ↦ (x v₁, x v₂)) (Measure.pi _). For probability measures with independent coordinates, this pushforward equals μ × μ when v₁ ≠ v₂ (which holds for simple graph edges).

      The homomorphism density integrand is integrable over the product measure.

      Homomorphism density is nonnegative.

      This is the integral of an a.e. nonnegative function over a measure space.

      Homomorphism density is at most 1.

      This follows because the integrand is bounded by 1 a.e. and we integrate over a probability space (so the integral of the constant 1 is 1).

      Homomorphism density is in [0, 1].

      Mapping a graph along an embedding preserves homomorphism density.

      If σ : V ↪ W' is an embedding and F : SimpleGraph V, then homDensity (F.map σ) G = homDensity F G for any graphon G.

      Proof sketch: The integrand of homDensity (F.map σ) G is ∏_{e' ∈ (F.map σ).edgeFinset} G(y(e'.1), y(e'.2)). Since (F.map σ).edgeFinset = F.edgeFinset.map σ.sym2Map, this equals ∏_{e ∈ F.edgeFinset} G(y(σ(e.1)), y(σ(e.2))). The integrand depends on y : W' → α only through y ∘ σ : V → α. By splitting the product measure μ^W' via piEquivPiSubtypeProd into μ^(range σ) × μ^(range σ)ᶜ and using that the integrand is independent of the complement coordinates, the integral over the complement gives μ(univ)^|W' \ range σ| = 1 (since μ is a probability measure), leaving ∫_{x : V → α} ∏_{e ∈ F.edgeFinset} G(x(e.1), x(e.2)) dμ^V = homDensity F G.

      The proof uses map_precomp_pi_eq: the pushforward of μ^W' under (· ∘ f) equals μ^V.