The finite sample law of a graphon (S2) #
Bundles the sampled-graph masses sampleMass (Graphon/Sampling.lean) into a finite
probability law and develops its algebraic API (issues #20 and #22; route vetted
2026-07-10):
Graphon.upperSum/Graphon.upperSum_injective— the finite zeta/upper transform onSimpleGraph (Fin k)and its injectivity via Möbius inversion (IncidenceAlgebra.moebius_inversion_top). Together with the forward identityhomDensity_eq_sum_sampleMass, this is the engine for every consistency statement below: two mass functions agree as soon as their supergraph sums agree.SimpleGraph.relabelOrderIso— relabeling by a permutation as an order isomorphism.Graphon.sampleMass_map_perm— relabeling invariance of the sample mass, proved by the upper-sum route (the direct inclusion–exclusion proof hitsedgeFinsetdecidability-instance diamonds and is deliberately avoided).
This file deliberately lives above Graphon/Sampling.lean so that the incidence-algebra
and PMF imports stay out of the foundational sampling module.
SimpleGraph relabeling plumbing (Mathlib candidates) #
Relabeling the vertices of simple graphs by a permutation, as an order isomorphism of the subgraph lattice.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The upper transform and its injectivity #
The finite zeta/upper transform of a mass function on SimpleGraph (Fin k): the
total mass of the supergraphs of F. By homDensity_eq_sum_sampleMass, the upper
transform of sampleMass W is homDensity · W.
Equations
- Graphon.upperSum p F = ∑ G : SimpleGraph (Fin k), if F ≤ G then p G else 0
Instances For
Injectivity of the upper transform (Möbius inversion over the finite subgraph
lattice): a mass function on SimpleGraph (Fin k) is determined by its supergraph
sums.
Relabeling invariance of the sample mass #
The upper transform of the sample mass is the homomorphism density: the forward
Möbius identity, restated through upperSum. Accepts an ambient [DecidableRel F.Adj]
(bridged to the classical core by homDensity_congr_decRel).
Relabeling invariance of the sample mass: the law of the W-random graph is
invariant under vertex permutations. Proved by the upper-sum route: the upper transform
of the relabeled mass reindexes along SimpleGraph.relabelOrderIso σ to
homDensity (F.map σ) W, which is homDensity F W by homDensity_map_embedding;
upperSum_injective finishes.
Measurable-space plumbing for simple graphs (Mathlib candidates) #
The canonical measurable space on SimpleGraph V is discrete for countable V:
singletons are measurable. (Mathlib supplies the measurable space in
Mathlib.MeasureTheory.Constructions.SimpleGraph but not this instance.)
The bundled sample law #
The finite sample law of a graphon, as a PMF: the distribution of the W-random
graph G(k, W) on SimpleGraph (Fin k) (PMF.ofFintype over sampleMass; the masses
are nonnegative and sum to one). The PMF is the finite algebraic API; sampleLaw below
is its thin measurable wrapper.
Equations
- W.samplePMF k = PMF.ofFintype (fun (G : SimpleGraph (Fin k)) => ENNReal.ofReal (W.sampleMass G)) ⋯
Instances For
Point mass of the sample PMF as a real number. Composed with
sampleMass_eq_sum_homDensity (Graphon/Sampling.lean), this IS the reverse
Möbius/inclusion–exclusion identity at the PMF level — the intended API for expanding
PMF point masses into signed homomorphism densities (#22).
The finite sample law of a graphon, as a probability measure on the canonical
measurable space of SimpleGraph (Fin k).
Instances For
Relabeling and arbitrary-injection consistency of the sample law #
PMF extensionality through the upper transform: two PMFs on SimpleGraph (Fin k)
agree as soon as all their supergraph masses agree.
The upper mass of the sample PMF is the homomorphism density. Accepts an ambient
[DecidableRel F.Adj].
Arbitrary-injection consistency of the sample law: restricting the l-vertex
W-random graph along any injection Fin k ↪ Fin l yields the k-vertex W-random
graph. (Prefix restriction and relabeling-compatible restrictions are special cases.)
Proof: upper masses of both sides are homDensity F W, via the Galois connection
map_le_iff_le_comap and homDensity_map_embedding; upperSum_injective finishes.
Relabeling invariance of the sample law (PMF form).
Arbitrary-injection consistency, measure form.
Relabeling invariance, measure form.