Stat.Random­Graph

This topic supplies a reusable spanning-parent union bound for expected counts of finite connected components meeting a designated root set under finite product measures.

Path­Occupancy 31 core · 15 supporting · 14 submodules This topic gives finite-sample occupancy bounds for connected components of uniform fine-cell draws on a finite path with independent Bernoulli marks.
Rooted­Tree 7 core · 14 supporting This module encodes finite rooted spanning trees as parent functions and proves their product-measure event bound by successive leaf elimination. ★ pi_measure_rooted_tree_event_le

Finite rooted-tree events under product measures

This module encodes finite rooted spanning trees as parent functions and proves their product-measure event bound by successive leaf elimination. It is independent of a particular random-graph model: an injectively embedded finite tree, measurable root and edge events, and uniform child-coordinate section bounds are sufficient.

abbrev ParentEncoding reviewed
Causalean.Stat.RandomGraph

A vertex type and root determine the candidate parent encodings: one vertex-valued parent choice for each nonroot vertex.

Definition (Lean source)
V :
Type u
r :
V
ParentEncoding V r :
Type u
{v : V // v ≠ r} → V
Causalean.Stat.RandomGraph.ParentEncoding · Causalean/Stat/RandomGraph/RootedTree.lean:27
def Valid reviewed
Causalean.Stat.RandomGraph.ParentEncoding

A parent encoding is valid when a natural-number height is zero at the root and strictly decreases along every parent edge.

Definition (Lean source)
V :
Type u
V
shared
P :
Valid P :
Prop
∃ height : V → ℕ,
height r = 0
clause 1
v :
height (P v) < height v.val
Causalean.Stat.RandomGraph.ParentEncoding.Valid · Causalean/Stat/RandomGraph/RootedTree.lean:33 · uses ParentEncoding
def step reviewed
Causalean.Stat.RandomGraph.ParentEncoding

The parent step for an encoding fixes the root and sends every other vertex to its chosen parent.

Definition (Lean source)
V :
Type u
V
shared
P :
v :
V
step P v :
V
if h : v = r then r else P ⟨v, h⟩
Causalean.Stat.RandomGraph.ParentEncoding.step · Causalean/Stat/RandomGraph/RootedTree.lean:38 · uses ParentEncoding
def graph reviewed
Causalean.Stat.RandomGraph.ParentEncoding

The undirected graph of a parent encoding joins distinct vertices when one is the chosen parent of the other.

Definition (Lean source)
V :
Type u
V
shared
P :
graph P :
clause 1
Adj u v := u ≠ v ∧ ((∃ h : u ≠ r, P ⟨u, h⟩ = v) ∨ (∃ h : v ≠ r, P ⟨v, h⟩ = u))
clause 2
symm := by constructor intro u v h exact ⟨h.1.symm, h.2.symm⟩
clause 3
loopless := by constructor intro v h exact h.1 rfl
Causalean.Stat.RandomGraph.ParentEncoding.graph · Causalean/Stat/RandomGraph/RootedTree.lean:43 · uses ParentEncoding
def ParentClosed reviewed
Causalean.Stat.RandomGraph.ParentEncoding

An active set of nonroot vertices is parent closed for an encoding if every active vertex has its parent at the root or in the active set.

Definition (Lean source)
V :
Type u
V
shared
P :
A :
Finset {v : V // v ≠ r}
v ∈ A :
ParentClosed P A :
Prop
P v = r ∨ ∃ h : P v ≠ r, (⟨P v, h⟩ : {v : V // v ≠ r}) ∈ A
Causalean.Stat.RandomGraph.ParentEncoding.ParentClosed · Causalean/Stat/RandomGraph/RootedTree.lean:171 · uses ParentEncoding
def partialTreeEvent reviewed
Causalean.Stat.RandomGraph

The partial rooted-tree event for an embedded tree requires the root event and the edge events of the active nonroot vertices.

Definition (Lean source)
V :
Type u
shared
W :
Type v
shared
X :
V → Type w
shared
r :
W
e :
W ↪ V
P :
rootEvent :
Set (X (e r))
edgeEvent :
∀ i j, Set (X i × X j)
A :
Finset {v : W // v ≠ r}
partialTreeEvent e P rootEvent edgeEvent A :
Set (∀ i, X i)
{x | x (e r) ∈ rootEvent ∧ ∀ v ∈ A, (x (e v.val), x (e (P v))) ∈ edgeEvent (e v.val) (e (P v))}
Causalean.Stat.RandomGraph.partialTreeEvent · Causalean/Stat/RandomGraph/RootedTree.lean:263 · uses ParentEncoding
theorem pi_measure_rooted_tree_event_le reviewed
Causalean.Stat.RandomGraph

Under independent coordinate probability laws, take an embedded parent tree that is valid, a root event and edge events that are measurable, and two bounds α and β. If the root event has probability at most α and for any two distinct coordinates and any value of the second, the values of the first that satisfy their edge event have probability at most β, then the event that the root event and every edge event of the tree occur has probability at most α times β to the power p minus one, where p is the tree's vertex count.

Formal statement
V :
Type u
shared
W :
Type v
shared
X :
V → Type w
shared
μ :
∀ i, Measure (X i)
∀ i, IsProbabilityMeasure (μ i)
r :
W
e :
W ↪ V
P :
hP :
P.Valid
rootEvent :
Set (X (e r))
edgeEvent :
∀ i j, Set (X i × X j)
α β :
ℝ≥0∞
hroot :
MeasurableSet rootEvent
hedge :
∀ i j, MeasurableSet (edgeEvent i j)
hrootMass :
μ (e r) rootEvent ≤ α
hsection :
∀ (i j : V)
if
i ≠ j
then
∀ y : X j, μ i {z | (z, y) ∈ edgeEvent i j} ≤ β
Measure.pi μ (partialTreeEvent e P rootEvent edgeEvent univ)
≤ α * β ^ (card W - 1)
Proof (Lean source)
theorem pi_measure_rooted_tree_event_le [Fintype V] [Fintype W] [DecidableEq W] (μ : ∀ i, Measure (X i)) [∀ i, IsProbabilityMeasure (μ i)] {r : W} (e : W ↪ V) (P : ParentEncoding W r) (hP : P.Valid) (rootEvent : Set (X (e r))) (edgeEvent : ∀ i j, Set (X i × X j)) (α β : ℝ≥0∞) (hroot : MeasurableSet rootEvent) (hedge : ∀ i j, MeasurableSet (edgeEvent i j)) (hrootMass : μ (e r) rootEvent ≤ α) (hsection : ∀ (i j : V), i ≠ j → ∀ y : X j, μ i {z | (z, y) ∈ edgeEvent i j} ≤ β) : Measure.pi μ (partialTreeEvent e P rootEvent edgeEvent univ) ≤ α * β ^ (card W - 1) := by have hclosed : P.ParentClosed univ := by intro v hv by_cases h : P v = r · exact inl h · exact inr ⟨h, Finset.mem_univ _⟩ simpa using pi_measure_partial_tree_event_le μ e P hP rootEvent edgeEvent α β univ hclosed hroot hedge hrootMass hsection
Causalean.Stat.RandomGraph.pi_measure_rooted_tree_event_le · Causalean/Stat/RandomGraph/RootedTree.lean:411 · uses ParentEncoding , Valid , partialTreeEvent
14 supporting declarations (lemmas, instances)
  • card_parentEncoding theorem — The number of all candidate parent encodings on a finite vertex type is exactly the number of vertices raised to one less than that number, for a chosen root.
    V :
    shared
    r :
    V
    card (ParentEncoding V r) = card V ^ (card V - 1)
    Proof (Lean source)
    theorem card_parentEncoding [Fintype V] [DecidableEq V] (r : V) : card (ParentEncoding V r) = card V ^ (card V - 1) := by rw [Fintype.card_fun] congr 1 simp
    Causalean.Stat.RandomGraph.card_parentEncoding · Causalean/Stat/RandomGraph/RootedTree.lean:57
  • parent_ne theorem — In a valid parent encoding, no nonroot vertex is equal to its own chosen parent.
    V :
    Type u
    V
    shared
    P :
    hP :
    P.Valid
    v :
    {v : V // v ≠ r}
    P v ≠ v.val
    Proof (Lean source)
    theorem ParentEncoding.parent_ne (P : ParentEncoding V r) (hP : P.Valid) (v : {v : V // v ≠ r}) : P v ≠ v.val := by obtain ⟨height, _, hheight⟩ := hP intro h have := hheight v rw [h] at this exact (Nat.lt_irrefl _) this
    Causalean.Stat.RandomGraph.ParentEncoding.parent_ne · Causalean/Stat/RandomGraph/RootedTree.lean:65
  • iterate_eq_root theorem — Iterating the parent step in a valid encoding eventually reaches the root from any starting vertex.
    V :
    Type u
    V
    shared
    P :
    hP :
    P.Valid
    v :
    V
    ∃ k : ℕ, (P.step)^[k] v = r
    Proof (Lean source)
    theorem ParentEncoding.iterate_eq_root [DecidableEq V] (P : ParentEncoding V r) (hP : P.Valid) (v : V) : ∃ k : ℕ, (P.step)^[k] v = r := by obtain ⟨height, _, hheight⟩ := hP have arrival : ∀ n, ∀ w : V, height w = n → ∃ k : ℕ, (P.step)^[k] w = r := by intro n induction n using Nat.strong_induction_on with | h n ih => intro w hw by_cases hr : w = r · exact ⟨0, hr⟩ · obtain ⟨k, hk⟩ := ih (height (P ⟨w, hr⟩)) (hw ▸ hheight ⟨w, hr⟩) (P ⟨w, hr⟩) rfl refine ⟨k + 1, ?_⟩ simpa [Function.iterate_succ_apply, ParentEncoding.step, hr] using hk exact arrival (height v) v rfl
    Causalean.Stat.RandomGraph.ParentEncoding.iterate_eq_root · Causalean/Stat/RandomGraph/RootedTree.lean:75
  • isTree theorem — The graph of a valid parent encoding is a tree.
    V :
    Type u
    V
    shared
    P :
    hP :
    P.Valid
    P.graph.IsTree
    Proof (Lean source)
    theorem ParentEncoding.isTree (P : ParentEncoding V r) (hP : P.Valid) : P.graph.IsTree := by classical have stepReach (v : V) : P.graph.Reachable v (P.step v) := by by_cases hv : v = r · simp [ParentEncoding.step, hv] · have ha : P.graph.Adj v (P ⟨v, hv⟩) := ⟨(P.parent_ne hP ⟨v, hv⟩).symm, inl ⟨hv, rfl⟩⟩ simpa [ParentEncoding.step, hv] using ha.reachable have rootReach (v : V) : P.graph.Reachable v r := by obtain ⟨k, hk⟩ := P.iterate_eq_root hP v have reach : ∀ n : ℕ, ∀ w : V, P.graph.Reachable w ((P.step)^[n] w) := by intro n induction n with | zero => intro w; exact SimpleGraph.Reachable.refl w | succ n ih => intro w rw [Function.iterate_succ_apply] exact (stepReach w).trans (ih (P.step w)) simpa [hk] using reach k v refine ⟨?_, ?_⟩ · have : Nonempty V := ⟨r⟩ exact SimpleGraph.Connected.mk (fun u v => (rootReach u).trans (rootReach v).symm) · obtain ⟨height, _, hheight⟩ := hP intro v c hc obtain ⟨l, hl, hmax⟩ := c.support.toFinset.exists_max_image height ⟨v, by simp⟩ have hlc : l ∈ c.support := List.mem_toFinset.mp hl let q := c.rotate l hlc have hq : q.IsCycle := hc.rotate hlc have bound (w : V) (hw : w ∈ q.support) : height w ≤ height l := hmax w (List.mem_toFinset.mpr ((c.mem_support_rotate_iff l hlc).mp hw)) -- At a maximum-height vertex, every cycle neighbor must be its chosen parent. have parent (w : V) (ha : P.graph.Adj l w) (hw : height w ≤ height l) : ∃ h : l ≠ r, P ⟨l, h⟩ = w := by rcases ha.2 with h | ⟨h, he⟩ · exact h · have hlt := hheight ⟨w, h⟩ rw [he] at hlt exact False.elim ((not_lt_of_ge hw) hlt) obtain ⟨hs, hes⟩ := parent q.snd (q.adj_snd hq.not_nil) (bound q.snd (q.getVert_mem_support 1)) obtain ⟨hp, hep⟩ := parent q.penultimate (q.adj_penultimate hq.not_nil).symm (bound q.penultimate (q.getVert_mem_support (q.length - 1))) exact hq.snd_ne_penultimate (hes.symm.trans hep)
    Causalean.Stat.RandomGraph.ParentEncoding.isTree · Causalean/Stat/RandomGraph/RootedTree.lean:94
  • exists_parent_step_closer theorem — In a connected graph, every nonroot vertex has an adjacent vertex exactly one step closer to the root.
    V :
    Type u
    shared
    G :
    hG :
    G.Connected
    r :
    V
    v :
    {v : V // v ≠ r}
    ∃ w : V,
    conclusion 1
    G.Adj v.val w
    conclusion 2
    G.dist r w + 1 = G.dist r v.val
    Proof (Lean source)
    theorem exists_parent_step_closer (G : SimpleGraph V) (hG : G.Connected) (r : V) (v : {v : V // v ≠ r}) : ∃ w : V, G.Adj v.val w ∧ G.dist r w + 1 = G.dist r v.val := by obtain ⟨p, hp⟩ := hG.exists_walk_length_eq_dist v.val r have hn := p.not_nil_of_ne v.property refine ⟨p.snd, p.adj_snd hn, ?_⟩ have hlow := G.dist_le p.tail obtain ⟨s, hs⟩ := hG.exists_walk_length_eq_dist p.snd r have hupp := G.dist_le (s.cons (p.adj_snd hn)) have hlen := p.length_tail_add_one hn rw [G.dist_comm] at hp hlow rw [SimpleGraph.Walk.length_cons, hs, G.dist_comm (u := p.snd) (v := r), G.dist_comm (u := v.val) (v := r)] at hupp omega
    Causalean.Stat.RandomGraph.exists_parent_step_closer · Causalean/Stat/RandomGraph/RootedTree.lean:140
  • rooted_spanning_parent_cover theorem — A connected finite graph with a chosen root admits a valid parent encoding using its edges, with at most p to the power p minus one candidates, where p is the number of vertices.
    V :
    shared
    G :
    hG :
    G.Connected
    r :
    V
    ∃ P : ParentEncoding V r,
    P.Valid
    conclusion 1
    v :
    G.Adj v.val (P v)
    conclusion 2
    card (ParentEncoding V r) ≤ card V ^ (card V - 1)
    Proof (Lean source)
    theorem rooted_spanning_parent_cover [Fintype V] [DecidableEq V] (G : SimpleGraph V) (hG : G.Connected) (r : V) : ∃ P : ParentEncoding V r, P.Valid ∧ (∀ v, G.Adj v.val (P v)) ∧ card (ParentEncoding V r) ≤ card V ^ (card V - 1) := by classical choose P hadj hdist using (fun v => exists_parent_step_closer G hG r v) refine ⟨P, ⟨G.dist r, G.dist_self, ?_⟩, hadj, (card_parentEncoding r).le⟩ intro v rw [← hdist v] exact lt_succ_self _
    Causalean.Stat.RandomGraph.rooted_spanning_parent_cover · Causalean/Stat/RandomGraph/RootedTree.lean:157
  • exists_leaf theorem — In a valid parent encoding, every nonempty active set of nonroot vertices contains a vertex that is not the parent of any active vertex.
    V :
    Type u
    V
    shared
    P :
    hP :
    P.Valid
    A :
    Finset {v : V // v ≠ r}
    hA :
    A.Nonempty
    ∃ l ∈ A, ∀ v ∈ A, P v ≠ l.val
    Proof (Lean source)
    theorem ParentEncoding.exists_leaf (P : ParentEncoding V r) (hP : P.Valid) (A : Finset {v : V // v ≠ r}) (hA : A.Nonempty) : ∃ l ∈ A, ∀ v ∈ A, P v ≠ l.val := by obtain ⟨height, _, hheight⟩ := hP obtain ⟨l, hl, hmax⟩ := A.exists_max_image (fun v => height v.val) hA refine ⟨l, hl, ?_⟩ intro v hv heq have hlt := hheight v rw [heq] at hlt exact (not_lt_of_ge (hmax v hv)) hlt
    Causalean.Stat.RandomGraph.ParentEncoding.exists_leaf · Causalean/Stat/RandomGraph/RootedTree.lean:177
  • parentClosed_erase theorem — For a parent encoding, deleting from a parent-closed active set of nonroot vertices a vertex that is not the parent of any active vertex leaves a parent-closed set.
    V :
    Type u
    V
    shared
    P :
    A :
    Finset {v : V // v ≠ r}
    hA :
    P.ParentClosed A
    l :
    {v : V // v ≠ r}
    hl :
    ∀ v ∈ A, P v ≠ l.val
    P.ParentClosed (A.erase l)
    Proof (Lean source)
    theorem ParentEncoding.parentClosed_erase [DecidableEq V] (P : ParentEncoding V r) (A : Finset {v : V // v ≠ r}) (hA : P.ParentClosed A) (l : {v : V // v ≠ r}) (hl : ∀ v ∈ A, P v ≠ l.val) : P.ParentClosed (A.erase l) := by intro v hv rcases hA v (mem_of_mem_erase hv) with h | ⟨h, hm⟩ · exact inl h · exact inr ⟨h, Finset.mem_erase.mpr ⟨fun he => hl v (mem_of_mem_erase hv) (congrArg val he), hm⟩⟩
    Causalean.Stat.RandomGraph.ParentEncoding.parentClosed_erase · Causalean/Stat/RandomGraph/RootedTree.lean:190
  • pi_measure_intersection_le_of_section theorem — Under independent coordinate probability laws, the probability that two events both occur is at most the probability of the first event times β. Here the two events are measurable, the first event does not depend on a chosen coordinate, and β is a number such that, whatever the other coordinates are, the values of the chosen coordinate that put the outcome in the second event have probability at most β.
    V :
    Type u
    V → Type v
    shared
    μ :
    ∀ i, Measure (X i)
    ∀ i, IsProbabilityMeasure (μ i)
    i :
    V
    A B :
    Set (∀ i, X i)
    β :
    ℝ≥0∞
    hA :
    hB :
    hinvariant :
    ∀ (x : ∀ i, X i) (z : X i), update x i z ∈ A ↔ x ∈ A
    hsection :
    ∀ x : ∀ i, X i, μ i {z | update x i z ∈ B} ≤ β
    Measure.pi μ (A ∩ B) ≤ Measure.pi μ A * β
    Proof (Lean source)
    theorem pi_measure_intersection_le_of_section (μ : ∀ i, Measure (X i)) [∀ i, IsProbabilityMeasure (μ i)] (i : V) (A B : Set (∀ i, X i)) (β : ℝ≥0∞) (hA : MeasurableSet A) (hB : MeasurableSet B) (hinvariant : ∀ (x : ∀ i, X i) (z : X i), update x i z ∈ A ↔ x ∈ A) (hsection : ∀ x : ∀ i, X i, μ i {z | update x i z ∈ B} ≤ β) : Measure.pi μ (A ∩ B) ≤ Measure.pi μ A * β := by classical have hbound : (∫⁻ x, (A ∩ B).indicator (fun _ => (1 : ℝ≥0∞)) x ∂Measure.pi μ) ≤ ∫⁻ x, A.indicator (fun _ => β) x ∂Measure.pi μ := by apply lintegral_le_of_lmarginal_le {i} (measurable_const.indicator (hA.inter hB)) (measurable_const.indicator hA) rw [lmarginal_singleton, lmarginal_singleton] intro x dsimp only by_cases hx : x ∈ A · have hleft : (fun z => (A ∩ B).indicator (fun _ => (1 : ℝ≥0∞)) (update x i z)) = {z | update x i z ∈ B}.indicator (fun _ => (1 : ℝ≥0∞)) := by funext z simp [indicator, hinvariant x z, hx] have hright : (fun z => A.indicator (fun _ => β) (update x i z)) = (fun _ => β) := by funext z simp [indicator, hinvariant x z, hx] rw [hleft, hright] change (∫⁻ z, {z | update x i z ∈ B}.indicator (fun _ => (1 : ℝ≥0∞)) z ∂μ i) ≤ ∫⁻ (_ : X i), β ∂μ i have hmeas : MeasurableSet {z | update x i z ∈ B} := hB.preimage (measurable_update x (a := i)) rw [lintegral_indicator_const hmeas 1, lintegral_const] simpa using hsection x · have hleft : (fun z => (A ∩ B).indicator (fun _ => (1 : ℝ≥0∞)) (update x i z)) = (fun _ => 0) := by funext z simp [indicator, hinvariant x z, hx] have hright : (fun z => A.indicator (fun _ => β) (update x i z)) = (fun _ => 0) := by funext z simp [indicator, hinvariant x z, hx] rw [hleft, hright] simpa only [lintegral_indicator_const (hA.inter hB), one_mul, lintegral_indicator_const hA, mul_comm β] using hbound
    Causalean.Stat.RandomGraph.pi_measure_intersection_le_of_section · Causalean/Stat/RandomGraph/RootedTree.lean:206
  • measurableSet_partialTreeEvent theorem — For an embedded parent tree and an active set of nonroot vertices, a root event and edge events that are measurable give a measurable partial rooted-tree event.
    V :
    Type u
    shared
    W :
    Type v
    shared
    X :
    V → Type w
    shared
    r :
    W
    e :
    W ↪ V
    P :
    rootEvent :
    Set (X (e r))
    edgeEvent :
    ∀ i j, Set (X i × X j)
    A :
    Finset {v : W // v ≠ r}
    hroot :
    MeasurableSet rootEvent
    hedge :
    ∀ i j, MeasurableSet (edgeEvent i j)
    MeasurableSet (partialTreeEvent e P rootEvent edgeEvent A)
    Proof (Lean source)
    theorem measurableSet_partialTreeEvent {r : W} (e : W ↪ V) (P : ParentEncoding W r) (rootEvent : Set (X (e r))) (edgeEvent : ∀ i j, Set (X i × X j)) (A : Finset {v : W // v ≠ r}) (hroot : MeasurableSet rootEvent) (hedge : ∀ i j, MeasurableSet (edgeEvent i j)) : MeasurableSet (partialTreeEvent e P rootEvent edgeEvent A) := by classical change MeasurableSet ({x : ∀ i, X i | x (e r) ∈ rootEvent} ∩ {x : ∀ i, X i | ∀ v ∈ A, (x (e v.val), x (e (P v))) ∈ edgeEvent (e v.val) (e (P v))}) refine (hroot.preimage (measurable_pi_apply (e r))).inter ?_ have hset : {x : ∀ i, X i | ∀ v ∈ A, (x (e v.val), x (e (P v))) ∈ edgeEvent (e v.val) (e (P v))} = ⋂ v ∈ A, (fun x : ∀ i, X i => (x (e v.val), x (e (P v)))) ⁻¹' edgeEvent (e v.val) (e (P v)) := by ext x simp rw [hset] exact A.measurableSet_biInter (fun v hv => (hedge (e v.val) (e (P v))).preimage ((measurable_pi_apply (e v.val)).prodMk (measurable_pi_apply (e (P v)))))
    Causalean.Stat.RandomGraph.measurableSet_partialTreeEvent · Causalean/Stat/RandomGraph/RootedTree.lean:272
  • partialTreeEvent_erase_inter theorem — For any vertex in the active set, the partial tree event is exactly the partial tree event of the active set with that vertex removed, intersected with the edge event joining that vertex to its parent.
    V :
    Type u
    shared
    W :
    Type v
    shared
    X :
    V → Type w
    shared
    r :
    W
    e :
    W ↪ V
    P :
    rootEvent :
    Set (X (e r))
    edgeEvent :
    ∀ i j, Set (X i × X j)
    A :
    Finset {v : W // v ≠ r}
    l :
    {v : W // v ≠ r}
    hl :
    l ∈ A
    partialTreeEvent e P rootEvent edgeEvent A
    = partialTreeEvent e P rootEvent edgeEvent (A.erase l) ∩ {x | (x (e l.val), x (e (P l))) ∈ edgeEvent (e l.val) (e (P l))}
    Proof (Lean source)
    theorem partialTreeEvent_erase_inter [DecidableEq W] {r : W} (e : W ↪ V) (P : ParentEncoding W r) (rootEvent : Set (X (e r))) (edgeEvent : ∀ i j, Set (X i × X j)) (A : Finset {v : W // v ≠ r}) (l : {v : W // v ≠ r}) (hl : l ∈ A) : partialTreeEvent e P rootEvent edgeEvent A = partialTreeEvent e P rootEvent edgeEvent (A.erase l) ∩ {x | (x (e l.val), x (e (P l))) ∈ edgeEvent (e l.val) (e (P l))} := by ext x constructor · intro hx exact ⟨⟨hx.1, fun v hv => hx.2 v (mem_of_mem_erase hv)⟩, hx.2 l hl⟩ · rintro ⟨hx, hedge⟩ refine ⟨hx.1, fun v hv => ?_⟩ by_cases h : v = l · subst v exact hedge · exact hx.2 v (Finset.mem_erase.mpr ⟨h, hv⟩)
    Causalean.Stat.RandomGraph.partialTreeEvent_erase_inter · Causalean/Stat/RandomGraph/RootedTree.lean:297
  • partialTreeEvent_update_erase theorem — After deleting from the active set of an embedded partial tree a vertex that is not the parent of any active vertex, membership in the remaining partial tree event is unaffected by replacing the deleted vertex's coordinate, for every outcome and replacement value.
    V :
    Type u
    shared
    W :
    Type v
    shared
    X :
    V → Type w
    shared
    r :
    W
    e :
    W ↪ V
    P :
    rootEvent :
    Set (X (e r))
    edgeEvent :
    ∀ i j, Set (X i × X j)
    A :
    Finset {v : W // v ≠ r}
    l :
    {v : W // v ≠ r}
    hleaf :
    ∀ v ∈ A, P v ≠ l.val
    x :
    ∀ i, X i
    z :
    X (e l.val)
    update x (e l.val) z ∈ partialTreeEvent e P rootEvent edgeEvent (A.erase l)
    ↔ x ∈ partialTreeEvent e P rootEvent edgeEvent (A.erase l)
    Proof (Lean source)
    theorem partialTreeEvent_update_erase [DecidableEq V] [DecidableEq W] {r : W} (e : W ↪ V) (P : ParentEncoding W r) (rootEvent : Set (X (e r))) (edgeEvent : ∀ i j, Set (X i × X j)) (A : Finset {v : W // v ≠ r}) (l : {v : W // v ≠ r}) (hleaf : ∀ v ∈ A, P v ≠ l.val) (x : ∀ i, X i) (z : X (e l.val)) : update x (e l.val) z ∈ partialTreeEvent e P rootEvent edgeEvent (A.erase l) ↔ x ∈ partialTreeEvent e P rootEvent edgeEvent (A.erase l) := by have hr : e r ≠ e l.val := fun h => l.property (e.injective h).symm have hv : ∀ v ∈ A.erase l, e v.val ≠ e l.val := by intro v hv h exact (Finset.mem_erase.mp hv).1 (Subtype.ext (e.injective h)) have hp : ∀ v ∈ A.erase l, e (P v) ≠ e l.val := by intro v hv h exact hleaf v (mem_of_mem_erase hv) (e.injective h) simp only [partialTreeEvent, Set.mem_ofPred_eq, Function.update_of_ne hr] constructor <;> rintro ⟨hroot, hedge⟩ <;> refine ⟨hroot, fun v hmem => ?_⟩ · simpa only [Function.update_of_ne (hv v hmem), Function.update_of_ne (hp v hmem)] using hedge v hmem · simpa only [Function.update_of_ne (hv v hmem), Function.update_of_ne (hp v hmem)] using hedge v hmem
    Causalean.Stat.RandomGraph.partialTreeEvent_update_erase · Causalean/Stat/RandomGraph/RootedTree.lean:319
  • pi_measure_partialTreeEvent_empty theorem — Under coordinate probability laws, the partial tree with no active edges has exactly the mass of its measurable root event, for measurable root events.
    V :
    Type u
    shared
    W :
    Type v
    shared
    X :
    V → Type w
    shared
    μ :
    ∀ i, Measure (X i)
    ∀ i, IsProbabilityMeasure (μ i)
    r :
    W
    e :
    W ↪ V
    P :
    rootEvent :
    Set (X (e r))
    edgeEvent :
    ∀ i j, Set (X i × X j)
    hroot :
    MeasurableSet rootEvent
    Measure.pi μ (partialTreeEvent e P rootEvent edgeEvent ∅) = μ (e r) rootEvent
    Proof (Lean source)
    theorem pi_measure_partialTreeEvent_empty [Fintype V] (μ : ∀ i, Measure (X i)) [∀ i, IsProbabilityMeasure (μ i)] {r : W} (e : W ↪ V) (P : ParentEncoding W r) (rootEvent : Set (X (e r))) (edgeEvent : ∀ i j, Set (X i × X j)) (hroot : MeasurableSet rootEvent) : Measure.pi μ (partialTreeEvent e P rootEvent edgeEvent ∅) = μ (e r) rootEvent := by have hevent : partialTreeEvent e P rootEvent edgeEvent ∅ = Function.eval (e r) ⁻¹' rootEvent := by ext x simp [partialTreeEvent, Function.eval] rw [hevent] exact (measurePreserving_eval μ (e r)).measure_preimage hroot.nullMeasurableSet
    Causalean.Stat.RandomGraph.pi_measure_partialTreeEvent_empty · Causalean/Stat/RandomGraph/RootedTree.lean:344
  • pi_measure_partial_tree_event_le theorem — Under independent coordinate probability laws, take an embedded parent tree that is valid, a root event and edge events that are measurable, two bounds α and β, and an active set of nonroot vertices that is parent closed. If the root event has probability at most α and for any two distinct coordinates and any value of the second, the values of the first that satisfy their edge event have probability at most β, then the partial tree event has probability at most α times β raised to the number of active vertices.
    V :
    Type u
    shared
    W :
    Type v
    shared
    X :
    V → Type w
    shared
    μ :
    ∀ i, Measure (X i)
    ∀ i, IsProbabilityMeasure (μ i)
    r :
    W
    e :
    W ↪ V
    P :
    hP :
    P.Valid
    rootEvent :
    Set (X (e r))
    edgeEvent :
    ∀ i j, Set (X i × X j)
    α β :
    ℝ≥0∞
    A :
    Finset {v : W // v ≠ r}
    hA :
    P.ParentClosed A
    hroot :
    MeasurableSet rootEvent
    hedge :
    ∀ i j, MeasurableSet (edgeEvent i j)
    hrootMass :
    μ (e r) rootEvent ≤ α
    hsection :
    ∀ (i j : V)
    if
    i ≠ j
    then
    ∀ y : X j, μ i {z | (z, y) ∈ edgeEvent i j} ≤ β
    Measure.pi μ (partialTreeEvent e P rootEvent edgeEvent A) ≤ α * β ^ A.card
    Proof (Lean source)
    theorem pi_measure_partial_tree_event_le [Fintype V] (μ : ∀ i, Measure (X i)) [∀ i, IsProbabilityMeasure (μ i)] {r : W} (e : W ↪ V) (P : ParentEncoding W r) (hP : P.Valid) (rootEvent : Set (X (e r))) (edgeEvent : ∀ i j, Set (X i × X j)) (α β : ℝ≥0∞) (A : Finset {v : W // v ≠ r}) (hA : P.ParentClosed A) (hroot : MeasurableSet rootEvent) (hedge : ∀ i j, MeasurableSet (edgeEvent i j)) (hrootMass : μ (e r) rootEvent ≤ α) (hsection : ∀ (i j : V), i ≠ j → ∀ y : X j, μ i {z | (z, y) ∈ edgeEvent i j} ≤ β) : Measure.pi μ (partialTreeEvent e P rootEvent edgeEvent A) ≤ α * β ^ A.card := by classical induction A using Finset.strongInductionOn with | _ A ih => by_cases hempty : A = ∅ · subst A simpa only [pi_measure_partialTreeEvent_empty μ e P rootEvent edgeEvent hroot, Finset.card_empty, pow_zero, mul_one] using hrootMass · obtain ⟨l, hl, hleaf⟩ := P.exists_leaf hP A (Finset.nonempty_iff_ne_empty.mpr hempty) have hparent : e (P l) ≠ e l.val := fun h => P.parent_ne hP l (e.injective h) have hstep : Measure.pi μ (partialTreeEvent e P rootEvent edgeEvent A) ≤ Measure.pi μ (partialTreeEvent e P rootEvent edgeEvent (A.erase l)) * β := by rw [partialTreeEvent_erase_inter e P rootEvent edgeEvent A l hl] apply pi_measure_intersection_le_of_section μ (e l.val) (partialTreeEvent e P rootEvent edgeEvent (A.erase l)) {x | (x (e l.val), x (e (P l))) ∈ edgeEvent (e l.val) (e (P l))} β (measurableSet_partialTreeEvent e P rootEvent edgeEvent (A.erase l) hroot hedge) ((hedge (e l.val) (e (P l))).preimage ((measurable_pi_apply (e l.val)).prodMk (measurable_pi_apply (e (P l))))) (partialTreeEvent_update_erase e P rootEvent edgeEvent A l hleaf) intro x simpa only [Set.mem_ofPred_eq, Function.update_self, Function.update_of_ne hparent] using hsection (e l.val) (e (P l)) hparent.symm (x (e (P l))) calc Measure.pi μ (partialTreeEvent e P rootEvent edgeEvent A) ≤ Measure.pi μ (partialTreeEvent e P rootEvent edgeEvent (A.erase l)) * β := hstep _ ≤ (α * β ^ (A.erase l).card) * β := mul_le_mul_left (ih (A.erase l) (Finset.erase_ssubset hl) (P.parentClosed_erase A hA l hleaf)) β _ = α * β ^ A.card := by rw [← Finset.card_erase_add_one hl, pow_succ, mul_assoc]
    Causalean.Stat.RandomGraph.pi_measure_partial_tree_event_le · Causalean/Stat/RandomGraph/RootedTree.lean:361
Components 9 core · 7 supporting Coordinate-local, symmetric measurable edge events define a random simple graph. ★ labeledComponentCount_le_treeWitnessCount

Root-qualified component counts and their finite witness cover

Coordinate-local, symmetric measurable edge events define a random simple graph. Components are counted once by their vertex sets. A component qualifies only if it contains a distinguished root whose coordinate satisfies its root event. Its spanning-parent witnesses are enumerated by a root, an unordered selection of remaining vertices, and a candidate parent array.

This avoids assuming edge independence: edges sharing coordinates may be dependent. The parent witness count may overcount components and is used only as an upper bound.

structure CoordinateGraph reviewed
Causalean.Stat.RandomGraph

Coordinate spaces determine a measurable symmetric edge-event model, where an edge depends only on its two endpoint coordinates.

Definition (Lean source)
V :
Type u
shared
X :
V → Type v
∀ i, MeasurableSpace (X i)
The event for an oriented pair of endpoint coordinates.
edgeEvent :
∀ i j, Set (X i × X j)
Every pair event is measurable in the product endpoint space.
measurable_edgeEvent :
∀ i j, MeasurableSet (edgeEvent i j)
Reversing endpoints leaves the undirected edge event unchanged.
symmetric :
∀ i j (z : X i) (y : X j), (z, y) ∈ edgeEvent i j ↔ (y, z) ∈ edgeEvent j i
Causalean.Stat.RandomGraph.CoordinateGraph · Causalean/Stat/RandomGraph/Components.lean:31
def graph reviewed
Causalean.Stat.RandomGraph.CoordinateGraph

An edge-event model and coordinate outcome determine the simple graph of occurring edges.

Definition (Lean source)
V :
Type u
V → Type v
shared
x :
∀ i, X i
graph M x :
clause 1
Adj i j := i ≠ j ∧ (x i, x j) ∈ M.edgeEvent i j
clause 2
symm := ⟨fun i j h => ⟨h.1.symm, (M.symmetric i j (x i) (x j)).mp h.2⟩⟩
clause 3
loopless := ⟨fun _ h => h.1 rfl⟩
Causalean.Stat.RandomGraph.CoordinateGraph.graph · Causalean/Stat/RandomGraph/Components.lean:43 · uses CoordinateGraph
def IsComponent reviewed
Causalean.Stat.RandomGraph

A finite vertex set is a component of a graph when its induced graph is connected and all neighbors of its vertices stay in that set.

Definition (Lean source)
V :
Type u
shared
G :
S :
IsComponent G S :
Prop
clause 1
(G.induce (S : Set V)).Connected
clause 2
i ∈ S :
j :
G.Adj i j
j ∈ S
Causalean.Stat.RandomGraph.IsComponent · Causalean/Stat/RandomGraph/Components.lean:77
def selectedEmbedding reviewed
Causalean.Stat.RandomGraph

The inclusion embedding of a selected finite vertex set sends each selected vertex to the ambient population.

Definition (Lean source)
V :
Type u
shared
S :
selectedEmbedding S :
S ↪ V
⟨Subtype.val, Subtype.val_injective⟩
Causalean.Stat.RandomGraph.selectedEmbedding · Causalean/Stat/RandomGraph/Components.lean:114
def componentEvent reviewed
Causalean.Stat.RandomGraph

The qualified component event for an edge model, distinguished roots, coordinate root events, and vertex set is the set of coordinate outcomes at which that vertex set is a component of the outcome's graph and contains at least one distinguished root whose root event occurs.

Definition (Lean source)
V :
Type u
V → Type v
shared
R :
rootEvent :
∀ r, Set (X r)
S :
componentEvent M R rootEvent S :
Set (∀ i, X i)
{x | IsComponent (M.graph x) S ∧ ∃ r ∈ R, r ∈ S ∧ x r ∈ rootEvent r}
Causalean.Stat.RandomGraph.componentEvent · Causalean/Stat/RandomGraph/Components.lean:118 · uses CoordinateGraph
def labeledComponentCount reviewed
Causalean.Stat.RandomGraph

The labeled component count for an edge model, roots, root events, size, and outcome counts each qualifying size-p component of the outcome's graph once, irrespective of how many qualifying roots it contains.

Definition (Lean source)
V :
Type u
V → Type v
shared
R :
rootEvent :
∀ r, Set (X r)
p :
ℕ
x :
∀ i, X i
labeledComponentCount M R rootEvent p x :
ℝ
by classical exact ∑ S ∈ (Finset.univ : Finset V).powersetCard p, if x ∈ componentEvent M R rootEvent S then (1 : ℝ) else 0
Causalean.Stat.RandomGraph.labeledComponentCount · Causalean/Stat/RandomGraph/Components.lean:126 · uses CoordinateGraph
def rootTreeWitnessCount reviewed
Causalean.Stat.RandomGraph

The rooted witness count on a root and completion set, for an edge model, root events, and outcome, is the number of valid parent encodings of the root together with the completion set, rooted at that root, for which the root's event occurs at the outcome and so does the edge event joining every nonroot vertex to its chosen parent.

Definition (Lean source)
V :
Type u
V → Type v
shared
rootEvent :
∀ r, Set (X r)
r :
V
T :
x :
∀ i, X i
rootTreeWitnessCount M rootEvent r T x :
ℝ
by classical let s : Finset V := insert r T let root : s := ⟨r, Finset.mem_insert_self r T⟩ exact ∑ P : ParentEncoding s root, if P.Valid ∧
x ∈ partialTreeEvent (selectedEmbedding s) P (rootEvent r) M.edgeEvent univ then (1 : ℝ) else 0
Causalean.Stat.RandomGraph.rootTreeWitnessCount · Causalean/Stat/RandomGraph/Components.lean:135 · uses CoordinateGraph
def treeWitnessCount reviewed
Causalean.Stat.RandomGraph

The total witness count enumerates distinguished roots, unordered selections of p minus one other vertices, and parent arrays, for an edge model, root events, size, and outcome.

Definition (Lean source)
V :
Type u
V → Type v
shared
R :
rootEvent :
∀ r, Set (X r)
p :
ℕ
x :
∀ i, X i
treeWitnessCount M R rootEvent p x :
ℝ
∑ r ∈ R, ∑ T ∈ ((Finset.univ : Finset V).erase r).powersetCard (p - 1), rootTreeWitnessCount M rootEvent r T x
Causalean.Stat.RandomGraph.treeWitnessCount · Causalean/Stat/RandomGraph/Components.lean:149 · uses CoordinateGraph
theorem labeledComponentCount_le_treeWitnessCount reviewed
Causalean.Stat.RandomGraph

For an edge model, distinguished roots, root events, and a component size, the labeled component count is at most the total rooted witness count at every outcome.

Formal statement
V :
Type u
V → Type v
shared
R :
rootEvent :
∀ r, Set (X r)
p :
ℕ
x :
∀ i, X i
labeledComponentCount M R rootEvent p x ≤ treeWitnessCount M R rootEvent p x
Proof (Lean source)
theorem labeledComponentCount_le_treeWitnessCount [Fintype V] [DecidableEq V] (M : CoordinateGraph X) (R : Finset V) (rootEvent : ∀ r, Set (X r)) (p : ℕ) (x : ∀ i, X i) : labeledComponentCount M R rootEvent p x ≤ treeWitnessCount M R rootEvent p x := by classical -- Use the same equality decision procedure as the dependent witness-count definition. cases Subsingleton.elim (inferInstance : DecidableEq V) (Classical.decEq V) let source := ((Finset.univ : Finset V).powersetCard p).filter (fun S => x ∈ componentEvent M R rootEvent S) let A := {S : Finset V // S ∈ source} have hA (S : A) : S.val.card = p ∧ x ∈ componentEvent M R rootEvent S.val := by have h := Finset.mem_filter.mp S.property exact ⟨(Finset.mem_powersetCard.mp h.1).2, h.2⟩ let root (S : A) : V := (component_event_parent_cover M R rootEvent S.val x (hA S).2).choose have hroot (S : A) : root S ∈ R ∧ ∃ hr : root S ∈ S.val, ∃ P : ParentEncoding S.val (⟨root S, hr⟩ : S.val), P.Valid ∧ x ∈ partialTreeEvent (selectedEmbedding S.val) P (rootEvent (root S)) M.edgeEvent Finset.univ := (component_event_parent_cover M R rootEvent S.val x (hA S).2).choose_spec let slots := R.sigma (fun r => ((Finset.univ : Finset V).erase r).powersetCard (p - 1)) let e (S : A) : Σ _ : V, Finset V := ⟨root S, S.val.erase (root S)⟩ -- Reinsert the chosen root to recover the component, proving slot injectivity. have hrecover (S : A) : insert (root S) (S.val.erase (root S)) = S.val := Finset.insert_erase (hroot S).2.choose have hinj : Injective e := by intro S U h apply Subtype.ext calc S.val = insert (e S).1 (e S).2 := (hrecover S).symm _ = insert (e U).1 (e U).2 := congrArg (fun q => insert q.1 q.2) h _ = U.val := hrecover U have hslot (S : A) : e S ∈ slots := by refine Finset.mem_sigma.mpr ⟨(hroot S).1, Finset.mem_powersetCard.mpr ⟨?_, ?_⟩⟩ · intro v hv exact Finset.mem_erase.mpr ⟨(Finset.mem_erase.mp hv).1, Finset.mem_univ v⟩ · rw [Finset.card_erase_of_mem (hroot S).2.choose, (hA S).1] -- Every parent-array summand is nonnegative, and the selected witness contributes one. have hnonneg (r : V) (T : Finset V) : 0 ≤ rootTreeWitnessCount M rootEvent r T x := by unfold rootTreeWitnessCount exact Finset.sum_nonneg fun P _ => by split_ifs <;> norm_num have hone (S : A) : 1 ≤ rootTreeWitnessCount M rootEvent (root S) (S.val.erase (root S)) x := by -- Transport the witness before unfolding the sum over its dependent parent type. have hex (s : Finset V) (hs : s = S.val) : ∃ hr : root S ∈ s, ∃ P : ParentEncoding s (⟨root S, hr⟩ : s), P.Valid ∧ x ∈ partialTreeEvent (selectedEmbedding s) P (rootEvent (root S)) M.edgeEvent Finset.univ := by subst s exact (hroot S).2 obtain ⟨hr, P, hP⟩ := hex _ (hrecover S) unfold rootTreeWitnessCount dsimp only have hterm : (if P.Valid ∧ x ∈ partialTreeEvent (selectedEmbedding (insert (root S) (S.val.erase (root S)))) P (rootEvent (root S)) M.edgeEvent Finset.univ then (1 : ℝ) else 0) = 1 := if_pos hP conv_lhs => rw [← hterm] exact Finset.single_le_sum (f := fun Q : ParentEncoding ↥(insert (root S) (S.val.erase (root S))) ⟨root S, hr⟩ => if Q.Valid ∧ x ∈ partialTreeEvent (selectedEmbedding (insert (root S) (S.val.erase (root S)))) Q (rootEvent (root S)) M.edgeEvent Finset.univ then (1 : ℝ) else 0) (fun Q _ => by split_ifs <;> norm_num) (Finset.mem_univ P) have hcount : labeledComponentCount M R rootEvent p x = ∑ _S : A, (1 : ℝ) := by unfold labeledComponentCount rw [← Finset.sum_filter] exact Finset.sum_subtype source (fun _ => Iff.rfl) (fun _ => (1 : ℝ)) rw [hcount] change (∑ _S : A, (1 : ℝ)) ≤ ∑ r ∈ R, ∑ T ∈ ((Finset.univ : Finset V).erase r).powersetCard (p - 1), rootTreeWitnessCount M rootEvent r T x rw [Finset.sum_sigma'] let g (q : Σ _ : V, Finset V) : ℝ := rootTreeWitnessCount M rootEvent q.1 q.2 x calc (∑ _S : A, (1 : ℝ)) ≤ ∑ S : A, g (e S) := Finset.sum_le_sum (fun S _ => hone S) _ = ∑ q ∈ Finset.univ.image e, g q := (Finset.sum_image (fun _ _ _ _ h => hinj h)).symm _ ≤ ∑ q ∈ slots, g q := Finset.sum_le_sum_of_subset_of_nonneg (by intro q hq; obtain ⟨S, _, rfl⟩ := Finset.mem_image.mp hq; exact hslot S) (fun q _ _ => hnonneg q.1 q.2)
Causalean.Stat.RandomGraph.labeledComponentCount_le_treeWitnessCount · Causalean/Stat/RandomGraph/Components.lean:175 · uses CoordinateGraph , labeledComponentCount , treeWitnessCount
7 supporting declarations (lemmas, instances)
Expectation 1 core · 6 supporting The final estimate combines root choices, unordered completion choices, the parent-array envelope, and the fixed-tree probability bound. ★ expected_labeled_component_count_le

Expected numbers of root-qualified finite components

The final estimate combines root choices, unordered completion choices, the parent-array envelope, and the fixed-tree probability bound. The count includes only components containing a distinguished root satisfying its measurable root event. Constants are real and nonnegative; the underlying event estimates use extended nonnegative measures.

Reference grounding: the spanning-tree union-bound argument appears in Lemma 4.14 of the 2014 draft of Foundations of Data Science (Hopcroft, Kannan), https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/book-No-Solutions-Aug-21-2014.pdf . That reference concerns independent edges. Here the edge factors are instead justified by coordinate-section Tonelli elimination; no edge independence is assumed. We count all parent arrays rather than using Cayley's sharper enumeration. The primary PDF was fetched and the lemma and its proof on printed pages 116--117 were checked on 2026-10-01; the proof explicitly covers connectivity by the union of spanning-tree events. We discard its additional isolation factor, so it supplies context rather than a premise. Penrose's Random Geometric Graphs, Chapter 3, is the geometric context; its publisher-hosted chapter was not accessible.

theorem expected_labeled_component_count_le reviewed
Causalean.Stat.RandomGraph

For an edge model, distinguished roots, root events, a size p that is at least two, and constants α and β that are nonnegative, under independent coordinate probability laws with measurable root events, root-event probabilities at most α, and oriented child-section probabilities at most β for distinct coordinates, the expected number of size-p components containing a distinguished root satisfying its root event is at most n times choose(N minus one, p minus one) times p to the power p minus one times α times β to the power p minus one. Here n is the root-set size and N the population size.

Formal statement
V :
Type u
V → Type v
shared
μ :
∀ i, Measure (X i)
∀ i, IsProbabilityMeasure (μ i)
R :
rootEvent :
∀ r, Set (X r)
p :
ℕ
hp :
2 ≤ p
α β :
ℝ
hα :
0 ≤ α
hβ :
0 ≤ β
hroot :
∀ r, MeasurableSet (rootEvent r)
hrootMass :
∀ r ∈ R, μ r (rootEvent r) ≤ ofReal α
hsection :
∀ (i j : V)
if
i ≠ j
then
∀ y : X j, μ i {z | (z, y) ∈ M.edgeEvent i j} ≤ ofReal β
(∫ x, labeledComponentCount M R rootEvent p x ∂Measure.pi μ)
≤ (R.card : ℝ) * (choose (card V - 1) (p - 1) : ℝ) * (p : ℝ) ^ (p - 1) * α * β ^ (p - 1)
Proof (Lean source)
theorem expected_labeled_component_count_le (μ : ∀ i, Measure (X i)) [∀ i, IsProbabilityMeasure (μ i)] (M : CoordinateGraph X) (R : Finset V) (rootEvent : ∀ r, Set (X r)) (p : ℕ) (hp : 2 ≤ p) (α β : ℝ) (hα : 0 ≤ α) (hβ : 0 ≤ β) (hroot : ∀ r, MeasurableSet (rootEvent r)) (hrootMass : ∀ r ∈ R, μ r (rootEvent r) ≤ ofReal α) (hsection : ∀ (i j : V), i ≠ j → ∀ y : X j, μ i {z | (z, y) ∈ M.edgeEvent i j} ≤ ofReal β) : (∫ x, labeledComponentCount M R rootEvent p x ∂Measure.pi μ) ≤ (R.card : ℝ) * (choose (card V - 1) (p - 1) : ℝ) * (p : ℝ) ^ (p - 1) * α * β ^ (p - 1) := by classical have hp1 : 1 ≤ p := le_trans (by decide : 1 ≤ 2) hp exact (integral_mono (integrable_labeledComponentCount μ M R rootEvent p hroot) (integrable_treeWitnessCount μ M R rootEvent p hroot) (labeledComponentCount_le_treeWitnessCount M R rootEvent p)).trans (integral_treeWitnessCount_le μ M R rootEvent p hp1 α β hα hβ hroot hrootMass hsection)
Causalean.Stat.RandomGraph.expected_labeled_component_count_le · Causalean/Stat/RandomGraph/Expectation.lean:210 · uses CoordinateGraph , labeledComponentCount
6 supporting declarations (lemmas, instances)