Homomorphism densities in a finite graph #
Two densities of a finite pattern graph F in a finite host graph G:
homDensityFin F G = |Hom(F, G)| / |V(G)| ^ |V(F)|— all homomorphisms;injHomDensity F G = |Inj(F, G)| / (|V(G)|)_{|V(F)|}— the injective ones, normalized by the falling factorial.
These are the finite-graph front of the sampling theory. Nothing here is about graphons, and nothing here samples: these are the estimators the later sampling laws are estimators of.
The falling factorial, not the binomial coefficient #
injHomDensity divides by (Fintype.card W).descFactorial (Fintype.card V), the number of
ordered injections of a |V(F)|-element set into V(G). Its numerator counts ordered injective
homomorphisms, so the two agree as conventions. Dividing instead by Nat.choose would count
unordered images against ordered maps and bias the sampling estimator by |V(F)|! — the later
unbiasedness identity would read k! · t(F, W) rather than t(F, W). The convention is fixed here
so that no downstream statement has to carry the correction.
One counting convention, not two #
injHomDensity_eq_labelledCopyCount_div rewrites the numerator of injHomDensity as Mathlib's
SimpleGraph.labelledCopyCount, through the counting bridge
SimpleGraph.card_injective_hom_eq_labelledCopyCount. Without it, injHomDensity would silently
establish a second counting convention alongside Mathlib's. Note that Mathlib puts the host
graph first, so the copy count of F inside G is G.labelledCopyCount F.
This settles the numerator. Mathlib has no hom-density primitive, so nothing here pins the
descFactorial denominator; that convention is chosen here and is pinned later by the unbiasedness
anchor integral_injHomDensity_sampleGraph.
Counting with Nat.card #
Both densities count with Nat.card, which is total: it returns 0 on an infinite type and needs
no Fintype instance or decidability on the hom type, on G, or on G.Adj. The counted types are
finite here, so no generality is lost — but the definitions can be stated and rewritten without
carrying decidability hypotheses that the analytic statements downstream would then inherit.
Main definitions #
TauCeti.DenseGraphLimits.homDensityFin— the homomorphism densityt(F, G).TauCeti.DenseGraphLimits.injHomDensity— the injective homomorphism densityt₀(F, G). Both density bodies stay unexposed;homDensityFin_defandinjHomDensity_defare the unfolding lemmas downstream modules should use.
Main results #
injHomDensity_eq_labelledCopyCount_div— the injective density in terms of Mathlib's counting primitive;homDensityFin_nonneg,homDensityFin_le_one,injHomDensity_nonneg,injHomDensity_le_one— both densities lie in[0, 1], unconditionally. The degenerate cases are included: when the host is empty and the pattern is not, numerator and denominator both vanish andx / 0 = 0gives0.
References #
- L. Lovász, Large Networks and Graph Limits, AMS Colloquium Publications 60 (2012), §5.2.
The homomorphism density t(F, G) = |Hom(F, G)| / |V(G)| ^ |V(F)| of a finite pattern
graph F in a finite host graph G.
Counted with Nat.card, so no Fintype or decidability instance on the hom type or on G is
required. Use homDensityFin_def to unfold.
Equations
- TauCeti.DenseGraphLimits.homDensityFin F G = ↑(Nat.card (F →g G)) / ↑(Fintype.card W) ^ Fintype.card V
Instances For
The injective homomorphism density t₀(F, G): ordered injective homomorphisms over the
falling factorial (|V(G)|)_{|V(F)|}.
The denominator counts ordered injections V ↪ W, matching the ordered numerator. Nat.choose
would not: it counts unordered images, and would bias the sampling estimator by |V(F)|!. Use
injHomDensity_def to unfold.
Equations
- TauCeti.DenseGraphLimits.injHomDensity F G = ↑(Nat.card { φ : F →g G // Function.Injective ⇑φ }) / ↑((Fintype.card W).descFactorial (Fintype.card V))
Instances For
The defining equation of homDensityFin. The definition's body is not exposed, so this is the
lemma downstream modules should rewrite with.
The defining equation of injHomDensity. The definition's body is not exposed, so this is the
lemma downstream modules should rewrite with.
The bridge to Mathlib's counting primitive #
The injective homomorphism density in terms of Mathlib's labelled copy count.
Both densities lie in [0, 1] #
The homomorphism density is nonnegative.
The homomorphism density is at most 1, since every homomorphism is in particular a function
V(F) → V(G).
No hypothesis is needed. When the host is empty and the pattern is not, numerator and denominator
both vanish and x / 0 = 0 gives 0.
The injective homomorphism density is nonnegative.
The injective homomorphism density is at most 1, since every injective homomorphism is in
particular an embedding V(F) ↪ V(G), and those are counted by the falling factorial.
No hypothesis is needed; the degenerate cases behave as for homDensityFin_le_one.