Mathlib.Probability.FiniteMarkedPoissonPartition.Partition
Finite measurable partitions of a marked observation space: restriction maps, exact independent cell experiments, and marginal cell-count laws.
Basic 9 core · 8 supporting 9 to review This file represents a finite measurable partition by its measurable cell classifier. ★ measurable_restrictPartition
Finite measurable partitions and restriction maps
This file represents a finite measurable partition by its measurable cell classifier. It defines the cell sets, their normalized observation laws, and the measurable restriction maps that stably filter a finite marked sequence.
A finite measurable partition of the sample space X into cells indexed by ι, represented by a classifier assigning each observation to its cell — the cells are the fibres of this map — where that classifier is measurable.
Definition (Lean source)
A finite family of measurable, pairwise disjoint sets covering the whole space determines its unique measurable classifier partition.
Definition (Lean source)
The measurable set forming cell j of a classifier partition.
Definition (Lean source)
The probability mass of a cell, represented as a nonnegative real.
Definition (Lean source)
The within-cell observation law is the normalised restriction when the cell has positive mass and the ambient probability law when its mass is zero.
Definition (Lean source)
Indices of the marked observations belonging to cell j.
Definition (Lean source)
Restrict a finite marked sequence to one cell, preserving the original relative order of all points that lie in that cell.
Definition (Lean source)
Restrict a finite marked sequence simultaneously to every partition cell.
Definition (Lean source)
For a finite measurable partition p of the sample space into cells indexed by ι, the map sending a finite marked sequence to its family of restrictions to every cell simultaneously is measurable.
Formal statement
Proof (Lean source)
8 supporting declarations (lemmas, instances)
-
ofSets_cellSetlemma — The classifier constructed from a disjoint measurable cover has exactly the supplied sets as its fibres.hypothesesA :ι → Set XhA :∀ j, MeasurableSet (A j)hdis :Pairwise (fun i j => Disjoint (A i) (A j))hcover :⋃ j, A j = univj :ιProof (Lean source)
lemma ofSets_cellSet (A : ι → Set X) (hA : ∀ j, MeasurableSet (A j)) (hdis : Pairwise (fun i j => Disjoint (A i) (A j))) (hcover : ⋃ j, A j = univ) (j : ι) : (ofSets A hA hdis hcover).cell ⁻¹' {j} = A j := by classical unfold ofSets dsimp only ext x simp only [Set.mem_preimage, Set.mem_singleton_iff] constructor · intro hx rw [← hx] exact Classical.choose_spec (show ∃ k, x ∈ A k by have hx' : x ∈ ⋃ k, A k := by rw [hcover]; exact Set.mem_univ x simpa only [Set.mem_iUnion] using hx') · intro hx let hex : ∃ k, x ∈ A k := by have hx' : x ∈ ⋃ k, A k := by rw [hcover]; exact Set.mem_univ x simpa only [Set.mem_iUnion] using hx' by_contra hne exact Set.disjoint_left.1 (hdis hne) (Classical.choose_spec hex) hx -
measurableSet_cellSetlemma — Every classifier cell is measurable.Proof (Lean source)
lemma measurableSet_cellSet (p : FiniteMeasurablePartition X ι) (j : ι) : MeasurableSet (p.cellSet j) := by exact (measurableSet_singleton j).preimage p.measurable_cell -
disjoint_cellSetlemma — Distinct classifier cells are disjoint.hypothesesconclusionDisjoint (p.cellSet i) (p.cellSet j)Proof (Lean source)
lemma disjoint_cellSet (p : FiniteMeasurablePartition X ι) {i j : ι} (hij : i ≠ j) : Disjoint (p.cellSet i) (p.cellSet j) := by apply Set.disjoint_left.2 intro x hxi hxj exact hij (hxi.symm.trans hxj) -
iUnion_cellSetlemma — The union of all classifier cells is the whole observation space.Proof (Lean source)
lemma iUnion_cellSet (p : FiniteMeasurablePartition X ι) : ⋃ j : ι, p.cellSet j = univ := by ext x simp [cellSet] -
sum_cellMasslemma — Cell masses sum to one under a probability law.hypothesesp :P :conclusion∑ j, p.cellMass P j = 1Proof (Lean source)
lemma sum_cellMass (p : FiniteMeasurablePartition X ι) (P : Measure X) [IsProbabilityMeasure P] : ∑ j, p.cellMass P j = 1 := by apply ENNReal.coe_injective rw [ENNReal.coe_finset_sum] simp only [ENNReal.coe_one, cellMass] simp_rw [ENNReal.coe_toNNReal (measure_ne_top P _)] calc ∑ j, P (p.cellSet j) = P (⋃ j ∈ (Finset.univ : Finset ι), p.cellSet j) := by symm apply measure_biUnion_finset · intro i _ j _ hij exact p.disjoint_cellSet hij · intro j _ exact p.measurableSet_cellSet j _ = P (⋃ j, p.cellSet j) := by simp _ = 1 := by rw [p.iUnion_cellSet, measure_univ] -
cellObservationLaw_isProbabilityMeasureinstance — The within-cell observation law is a probability measure, including the zero-mass fallback branch.instance cellObservationLaw_isProbabilityMeasure (p : FiniteMeasurablePartition X ι) (P : Measure X) [IsProbabilityMeasure P] (j : ι) : IsProbabilityMeasure (p.cellObservationLaw P j) := by unfold cellObservationLaw split_ifs with h · infer_instance · constructor rw [Measure.smul_apply, Measure.restrict_apply MeasurableSet.univ] simpa using ENNReal.inv_mul_cancel h (measure_ne_top P _) -
cellObservationLaw_apply_cellSetlemma — A positive-mass within-cell law assigns probability one to its own cell.hypothesesp :P :j :ιhj :P (p.cellSet j) ≠ 0conclusionp.cellObservationLaw P j (p.cellSet j) = 1Proof (Lean source)
lemma cellObservationLaw_apply_cellSet (p : FiniteMeasurablePartition X ι) (P : Measure X) [IsProbabilityMeasure P] (j : ι) (hj : P (p.cellSet j) ≠ 0) : p.cellObservationLaw P j (p.cellSet j) = 1 := by rw [cellObservationLaw, dif_neg hj, Measure.smul_apply, Measure.restrict_apply (p.measurableSet_cellSet j)] simpa using ENNReal.inv_mul_cancel hj (measure_ne_top P _) -
measurable_restrictCelllemma — Restriction to one measurable cell is a measurable map on finite marked sequences.Proof (Lean source)
lemma measurable_restrictCell (p : FiniteMeasurablePartition X ι) (j : ι) : Measurable (p.restrictCell j) := by classical intro s hs rw [MeasurableSpace.measurableSet_iInf] at hs ⊢ intro n change MeasurableSet (fixedSizeEmbed n ⁻¹' (p.restrictCell j ⁻¹' s)) rw [show fixedSizeEmbed n ⁻¹' (p.restrictCell j ⁻¹' s) = ⋃ t : Finset (Fin n), {x : Fin n → X × ℝ | p.cellIndices j (fixedSizeEmbed n x) = t} ∩ (fun x : Fin n → X × ℝ => fun k => x (t.orderIsoOfFin rfl k)) ⁻¹' (fixedSizeEmbed t.card ⁻¹' s) by ext x simp only [mem_preimage, mem_iUnion, mem_inter_iff, mem_setOf_eq] constructor · intro hx let t := p.cellIndices j (fixedSizeEmbed n x) refine ⟨t, rfl, ?_⟩ exact hx · rintro ⟨t, ht, hx⟩ subst t exact hx] apply MeasurableSet.iUnion intro t apply MeasurableSet.inter · rw [show {x : Fin n → X × ℝ | p.cellIndices j (fixedSizeEmbed n x) = t} = ⋂ k : Fin n, if k ∈ t then {x : Fin n → X × ℝ | p.cell (x k).1 = j} else {x : Fin n → X × ℝ | p.cell (x k).1 = j}ᶜ by ext x simp only [Set.mem_setOf_eq, Set.mem_iInter] refine Iff.trans Finset.ext_iff ?_ simp only [cellIndices, FiniteSample.count, FiniteSample.points, fixedSizeEmbed, mem_filter, Finset.mem_univ, true_and] apply forall_congr' intro k by_cases hkt : k ∈ t · simp only [hkt, if_true, Set.mem_setOf_eq] constructor · intro h exact (Finset.mem_filter.1 (h.2 hkt)).2 · intro hk constructor · intro _ exact hkt · intro _ exact Finset.mem_filter.2 ⟨Finset.mem_univ _, hk⟩ · simp only [hkt, if_false, Set.mem_compl_iff, Set.mem_setOf_eq] constructor · intro h hk have hkf : k ∈ ({k | p.cell (x k).1 = j} : Finset (Fin n)) := Finset.mem_filter.2 ⟨Finset.mem_univ _, hk⟩ exact hkt (h.1 hkf) · intro hk constructor · intro hkf exact (hk (Finset.mem_filter.1 hkf).2).elim · intro hkt' exact (hkt hkt').elim] apply MeasurableSet.iInter intro k split_ifs · exact (p.measurable_cell.comp ((measurable_pi_apply k).fst)) (measurableSet_singleton j) · exact ((p.measurable_cell.comp ((measurable_pi_apply k).fst)) (measurableSet_singleton j)).compl · have hst : MeasurableSet (fixedSizeEmbed t.card ⁻¹' s) := hs t.card exact hst.preimage (by fun_prop)
CellLaws 1 core · 1 supporting 1 to review This file derives each cell's Poisson count law and its exact conditional marked sample law from the joint finite-partition splitting theorem. ★ map_restrictCell_count_finiteMarkedPoissonSampleLaw
Marginal laws for partition cells
This file derives each cell's Poisson count law and its exact conditional marked sample law from the joint finite-partition splitting theorem.
Cell counts are Poisson. Under the marked Poisson sample law with base probability measure P, mark distribution R, and nonnegative intensity lam, the number of marked observations landing in cell j of the finite measurable partition p, viewed as a random variable, is Poisson distributed with mean equal to lam times the P-mass of cell j.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
cellLaw_restrict_count_eqlemma — On its count-n fibre, the jth cell experiment is the Poisson mass at n times n independent draws from the normalised restriction and mark law.hypothesesp :P :R :lam :ℝ≥0j :ιn :ℕconclusion(finiteMarkedPoissonSampleLaw (p.cellObservationLaw P j) R (lam * p.cellMass P j)).restrict (FiniteSample.count ⁻¹' ({n} : Set ℕ))= (poissonMeasure (lam * p.cellMass P j)) ({n} : Set ℕ) • Measure.map (fixedSizeEmbed n) (Measure.pi (fun _ : Fin n => (p.cellObservationLaw P j).prod R))Proof (Lean source)
lemma cellLaw_restrict_count_eq (p : FiniteMeasurablePartition X ι) (P : Measure X) [IsProbabilityMeasure P] (R : Measure ℝ) [IsProbabilityMeasure R] (lam : ℝ≥0) (j : ι) (n : ℕ) : (finiteMarkedPoissonSampleLaw (p.cellObservationLaw P j) R (lam * p.cellMass P j)).restrict (FiniteSample.count ⁻¹' ({n} : Set ℕ)) = (poissonMeasure (lam * p.cellMass P j)) ({n} : Set ℕ) • Measure.map (fixedSizeEmbed n) (Measure.pi (fun _ : Fin n => (p.cellObservationLaw P j).prod R)) := by exact finiteMarkedPoissonSampleLaw_restrict_count_eq (p.cellObservationLaw P j) R (lam * p.cellMass P j) n
Splitting 1 core · 0 supporting 1 to review This file proves the exact joint law of the restrictions of a finite marked Poisson sample to the cells of a finite measurable partition. ★ map_restrictPartition_finiteMarkedPoissonSampleLaw
Poisson splitting across a finite partition
This file proves the exact joint law of the restrictions of a finite marked Poisson sample to the cells of a finite measurable partition. The proof tracks the complete vector of cell counts and combines the multinomial count allocation with the conditional product laws within cells.
Partition splitting. Under the marked Poisson sample law with base probability measure P, mark distribution R, and nonnegative intensity lam, restricting the sample to each cell of the finite measurable partition p yields, jointly across cells, the product of independent marked Poisson sample laws, one per cell j, each with base measure p.cellObservationLaw P j, mark distribution R, and intensity lam times the P-mass of cell j.