Counting Lemma for Graphons #
This file proves the counting lemma, which relates the difference in homomorphism densities to the cut norm of the difference between graphons.
Main results #
Graphon.homDensity_sub_le-|t(F, U) - t(F, W)| ≤ |E(F)| · ‖U - W‖_□
Implementation notes #
The counting lemma is one of the central results in graphon theory. It says that if two graphons are close in cut norm, then they have similar homomorphism densities for any fixed graph F.
The constant |E(F)| (number of edges in F) is optimal in general.
References #
- [L. Lovász, Large Networks and Graph Limits][lovasz2012], Chapter 10
Counting lemma #
Helper lemmas for product bounds #
Bound on absolute difference of products by sum of differences.
For values in [0,1], the difference of products is bounded by the sum of individual differences. This is used in the counting lemma proof.
Special case: Complete graph on 2 vertices (K₂) #
The counting lemma for K₂ can be proven directly since homDensity K₂ W equals the integral of W over μ.prod μ, which is rectIntegralDiff over univ × univ.
For the complete graph K₂, homDensity equals the integral over μ.prod μ.
This uses the equivalence between Measure.pi (Fin 2 → α) and μ.prod μ via
measurePreserving_finTwoArrow.
Counting lemma for K₂: the complete graph on 2 vertices.
This is a base case that can be proven directly without the full layer cake machinery, since K₂ has exactly one edge and the homDensity integral directly equals the rectIntegralDiff over univ × univ.
General counting lemma #
The counting lemma: homomorphism density difference is bounded by cut norm.
For any graph F and graphons U, W on the same probability space:
|t(F, U) - t(F, W)| ≤ |E(F)| · ‖U - W‖_□
This is the key result showing that cut norm controls homomorphism densities.
Corollary: graphs with small cut distance have similar homomorphism densities.
The proof uses that homDensity is preserved under pullbacks (homDensity_pullback_mp):
- For any φ, ψ measure-preserving: homDensity F (pullback U φ) = homDensity F U
- So |homDensity F U - homDensity F W| = |homDensity F (pullback U φ) - homDensity F (pullback W ψ)|
- By homDensity_sub_le: ≤ |E(F)| * cutNormDiff (pullback U φ) (pullback W ψ)
- Taking inf over φ, ψ gives the bound by cutDistance
If cut distance is zero, homomorphism densities are equal.
This is a key consequence: weakly isomorphic graphons have the same homomorphism densities for all graphs F.
Continuity properties #
Homomorphism density difference is bounded by edge count times cut norm difference.
This is the quantitative version of continuity with respect to cut norm.
Note: We use max 1 F.edgeFinset.card in the denominator to handle the empty graph case.
For empty graphs, both homomorphism densities equal 1, so the bound is trivially satisfied.