The categorical outcome and explicit sampler of a digraphon (#84, D3b steps 2–3 / #87) #
The reciprocal-edge outcome of a digraphon at a fixed pair is a single categorical draw over
the four states (G i j, G j i) ∈ {0,1}², carrying all four probabilities — not two
independent Bernoullis. This file builds that mechanism from the everywhere-valid simplexRep,
then the explicit finite and infinite digraph samplers on top of it:
Digraphon.pairPMF p— the four-state distribution atp, aPMF (Bool × Bool)with massENNReal.ofReal (simplexRep a b p)on(a, b);Digraphon.catOutcome p— the one-uniform categorical map: partition[0,1]by the four probabilities and read off the reciprocal-edge state from a single uniform;Digraphon.uniform01_map_catOutcome— the exact four-state law: the pushforward of the uniform measure undercatOutcome pis exactlypairPMF p;Digraphon.samplerSource μ— the sampler source: i.i.d. vertex positions (lawμ) and one[0,1]-uniform per off-diagonal unordered pair (OffDiagPairIndex ℕ), independent;Digraphon.sampleAdj— the sampler's adjacency bit at an ordered pair, in the natural-number order: the diagonal reads the loop coordinate; an off-diagonal pair reads one coordinate of the single categorical draw at the increasing-order positions from the one uniform of the unordered pair (sampleAdj_self/sampleAdj_of_lt/sampleAdj_of_gt);Digraphon.sampleInfinite/Digraphon.sampleFinite n— the explicit infinite sampler (intoInfiniteDigraph) and its restriction to the firstnvertices, both measurable in the sources.Digraphon.samplerSource_forall_sampleAdj— the exact finite-event product formula (steps 4–5), over an arbitrary injective labeling: one loop indicator per vertex and onesimplexRepmass per unordered pair, with a labeling-free right-hand side;Digraphon.sampleRelLaw/Digraphon.sampleDigraphLaw— the sampled exchangeable law (consistency from the labeling-free formula), andDigraphon.map_sampleInfinite/map_sampleInfinite_eq_equiv_law— the sampler realizes its infinite law, identified throughexchangeableDigraphLawEquiv(D2);Digraphon.map_sampleInfinite_relabel/Digraphon.map_sampleFinite_pair_disjoint— exchangeability and dissociation of the sampled law.
The generic i.i.d. sources (MeasureTheory.uniform01, iidVertexSource, iidUniformSource)
are reused from Graphon.SamplerSources. Next: D3c (ordinary-graphon / tournament /
asymmetric-kernel constructors).
The four-state distribution #
The four-state reciprocal-edge distribution at a pair p, as a PMF (Bool × Bool).
Equations
- W.pairPMF p = PMF.ofFintype (fun (ab : Bool × Bool) => ENNReal.ofReal (W.simplexRep ab.1 ab.2 p)) ⋯
Instances For
Distributional transpose equivariance: swapping the pair transposes the four-state
distribution. (Pointwise equivariance of catOutcome is neither true nor needed; this
distributional form — cashing out simplexRep_swap — is the statement that handles
orientation reversal under relabeling, or any alternate ordering of an unordered pair.)
The one-uniform categorical outcome #
The one-uniform categorical map: partition [0,1] into four sub-intervals of lengths
simplexRep (0,0), simplexRep (0,1), simplexRep (1,0), simplexRep (1,1) and read the
reciprocal-edge state off a single uniform value.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Joint measurability of the categorical outcome in both the pair and the uniform — the
form the sampler needs, since it evaluates catOutcome at p = (Uᵢ, Uⱼ) varying with the
sample. Each threshold is a simplexRep of the pair coordinate, compared with the uniform
coordinate.
Measurability of the categorical outcome at a fixed pair — a corollary of the joint version.
The exact four-state law #
The exact four-state law: the pushforward of the uniform measure under the one-uniform
categorical map is exactly the four-state distribution pairPMF p.
The exact single-event factor consumed by the product-law proof: the uniform mass of the
event that the categorical outcome equals ab is exactly simplexRep ab.
The sampler source #
The digraph sampler source: i.i.d. vertex positions with law μ and one [0,1]-uniform
per off-diagonal unordered pair, independent.
Equations
Instances For
The explicit sampler (D3b step 3) #
The sampler's adjacency bit at an ordered pair (i, j), in the natural-number order:
the diagonal reads the loop coordinate at the vertex position; an off-diagonal pair reads one
coordinate of the single categorical draw at the increasing-order positions — for i < j the
first coordinate of catOutcome (xᵢ, xⱼ), for j < i the second coordinate of
catOutcome (xⱼ, xᵢ) — from the one uniform attached to the unordered pair {i, j}.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The diagonal coordinate of the sampler: the loop bit at the vertex position.
The increasing-order coordinate of the sampler: for i < j, the first component of the
categorical draw at (xᵢ, xⱼ).
The decreasing-order coordinate of the sampler: for j < i, the second component of the
categorical draw at (xⱼ, xᵢ) — the same draw as the (j, i) coordinate, giving the
reciprocal-edge dependence.
The paired coordinates at an unordered pair are the single categorical draw: for
i < j, the reciprocal-edge pair (sampleAdj ω i j, sampleAdj ω j i) is exactly
catOutcome (xᵢ, xⱼ) at the pair's one uniform — the reciprocal dependence in one statement,
the form the exact-event product formula consumes.
Measurability of the adjacency bit in the sources, at each fixed ordered pair — via the
joint measurability of catOutcome, since the pair argument varies with the sample.
The explicit infinite digraph sampler: the relational structure whose ordered-pair coordinates are the sampler's adjacency bits.
Equations
- W.sampleInfinite ω c = W.sampleAdj ω (c.snd 0) (c.snd 1)
Instances For
The adjacency bit of the sampled infinite digraph, unfolded.
The infinite digraph sampler is measurable in the sources: each ordered-pair coordinate is a measurable adjacency bit.
The finite digraph sampler: the restriction of the infinite sampler to the first n
vertices.
Equations
- W.sampleFinite n ω = InfiniteDigraph.restrictFin n (W.sampleInfinite ω)
Instances For
The ordered-pair coordinate of the sampled finite digraph, unfolded.
The exact finite-event product formula (D3b step 4) #
The probability that the sampler realizes exactly a target finite digraph, stated over an
arbitrary injective labeling ι : Fin n → ℕ of the sampled vertices: the right-hand side
does not depend on ι (transpose flips are absorbed by simplexRep_swap), which is precisely
what makes restriction-consistency and exchangeability corollaries of this one computation.
The exact-event integrand: the conditional probability, given vertex positions y,
that the sampler realizes exactly the digraph D — one loop indicator per vertex and one
simplexRep mass per unordered pair (the single categorical draw carrying both directed
edges).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The exact finite-event product formula (D3b step 4), over an arbitrary injective
labeling ι of the sampled vertices: the probability that the sampler realizes exactly D
on the labels ι is the integral, over i.i.d. μ-positions, of the loop indicators times one
simplexRep mass per unordered pair. The right-hand side does not depend on ι — the source
of consistency and exchangeability.
The exact-event formula for the finite sampler: specialization of the product formula
to the identity labeling — the mass the sampled digraph law puts on a single target D.
The sampled exchangeable law and the infinite identification (D3b step 5) #
The ι-freedom of the product formula makes restriction-consistency immediate, so the finite
sampler laws assemble into a RelExchangeableLaw digraphSig; the infinite sampler then
realizes its (R2b) infinite law, by finite-restriction measure extensionality.
Restriction-consistency of the sampled finite laws: restricting the l-vertex sample
along any injection e : Fin k ↪ Fin l reproduces the k-vertex sample law — both sides have
the same exact-event masses by the labeling-free product formula.
The sampled relational law: the finite sampler laws, packaged as an exchangeable
relational law over digraphSig (consistency from the labeling-free product formula).
Equations
- W.sampleRelLaw = { marginal := fun (n : digraphSig.Srt → ℕ) => ⟨MeasureTheory.Measure.map (W.sampleFinite (n ())) (MeasureTheory.Digraphon.samplerSource μ), ⋯⟩, consistent := ⋯ }
Instances For
The sampled digraph law, in the user-facing PMF form of D2.
Equations
Instances For
The sampler realizes the infinite exchangeable law (D3b step 5): the pushforward of the sampler source under the infinite sampler is exactly the (R2b) infinite law of the sampled relational law — by finite-restriction measure extensionality, since the finite sampler is the restriction of the infinite sampler.
The headline identification: the sampler's infinite law is the image of the sampled
PMF-based digraph law under the directed finite/infinite equivalence
exchangeableDigraphLawEquiv (D2).
Exchangeability and dissociation (D3b step 5, corollaries) #
Exchangeability of the sampler's law: invariance under every relabeling of ℕ — free
from the identification with the infinite law, which is relabeling-invariant by R2c.
Independence over disjoint labels (dissociation, event form): the exact events of the sampler on two disjoint label sets are independent — conditionally on the positions the two events use disjoint uniform coordinates, and the position integral splits over the two blocks of the combined labeling.
Dissociation (distributional form): the restrictions of the (k + l)-vertex sample to
the first k and the last l vertices are independent, with the k- and l-vertex
sample laws as marginals — the sampled law is dissociated.