Mathlib.Probability.Poisson.Finite­Partition.Superposition

Superposition and retention laws for marked Poisson samples on finite partitions.

Canonical 10 core · 15 supporting This file concatenates a finite family of cell configurations and sorts a marked configuration by its real marks, using the original index only to break null-event ties. ★ map_superposeByMarks_canonicalCellLaws

Finite superposition and canonical mark ordering

This file concatenates a finite family of cell configurations and sorts a marked configuration by its real marks, using the original index only to break null-event ties. It establishes the measurable canonical configuration law and its inverse-in-law relationship with partition restriction.

def superpose reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Given a finite indexed family of marked samples, the superposed sample contains all their pairs, enumerated through the disjoint union of their positions.

Definition (Lean source)
X :
Type u_1
shared
ι :
Type u_2
shared
q :
ι → FiniteSample (X × ℝ)
superpose q :
FiniteSample (X × ℝ)
by classical let S := Σ j : ι, Fin (q j).count let e : S ≃ Fin (card S) := Fintype.equivFin S exact ⟨Fintype.card S, fun k
=> let u := e.symm k (q u.1).points u.2⟩
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition.superpose · Causalean/Mathlib/Probability/Poisson/FinitePartition/Superposition/Canonical.lean:26 · uses FiniteSample
def countFiber reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

For a prescribed count profile, the count fibre is the event that every component sample has its specified count.

Definition (Lean source)
ι :
Type u_2
shared
Y :
c :
ι → ℕ
countFiber c :
Set (ι → FiniteSample Y)
{q | ∀ j, (q j).count = c j}
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition.countFiber · Causalean/Mathlib/Probability/Poisson/FinitePartition/Superposition/Canonical.lean:45 · uses FiniteSample
def pointsOfCount reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Given a sample size and a finite sample known to have that size, the points at the specified count form the resulting n-tuple.

Definition (Lean source)
Y :
n :
ℕ
s :
{s : FiniteSample Y // s.count = n}
pointsOfCount n s :
Fin n → Y
fun k => s.1.points (cast s.2.symm k)
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition.pointsOfCount · Causalean/Mathlib/Probability/Poisson/FinitePartition/Superposition/Canonical.lean:61 · uses FiniteSample , count
def fixedCountSuperpose reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Given a count for every component and a matching point tuple for each, the fixed-count superposition is the finite sample obtained by concatenating those tuples.

Definition (Lean source)
ι :
Type u_2
shared
Y :
c :
ι → ℕ
x :
∀ j
if
Fin (c j)
then
Y
fixedCountSuperpose c x :
by classical let S := Σ j : ι, Fin (c j) let e : S ≃ Fin (card S) := Fintype.equivFin S exact ⟨Fintype.card S, fun k
=> x (e.symm k).1 (e.symm k).2⟩
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition.fixedCountSuperpose · Causalean/Mathlib/Probability/Poisson/FinitePartition/Superposition/Canonical.lean:113 · uses FiniteSample
def fiberPoints reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Given a count for every component and samples having those counts, the fixed-count component points are the corresponding family of point tuples.

Definition (Lean source)
ι :
Type u_2
shared
Y :
c :
ι → ℕ
q :
countFiber (Y := Y) c
j :
fiberPoints c q j :
Fin (c j) → Y
fun j => pointsOfCount (c j) ⟨q.1 j, q.2 j⟩
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition.fiberPoints · Causalean/Mathlib/Probability/Poisson/FinitePartition/Superposition/Canonical.lean:135 · uses FiniteSample , countFiber
def markedKeys reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Given a finite marked sample, the mark-ordering keys pair every real mark with its original position and order those pairs lexicographically, using positions to break ties.

Definition (Lean source)
X :
Type u_1
shared
s :
FiniteSample (X × ℝ)
markedKeys s :
Finset (ℝ ×ₗ Fin s.count)
by classical exact Finset.univ.image (fun k => toLex ((s.points k).2, k))
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition.markedKeys · Causalean/Mathlib/Probability/Poisson/FinitePartition/Superposition/Canonical.lean:193 · uses FiniteSample , count
def orderByMarks reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Given a finite marked sample, the mark-ordered sample arranges the same pairs by increasing real mark, using original positions to break ties.

Definition (Lean source)
X :
Type u_1
shared
s :
FiniteSample (X × ℝ)
orderByMarks s :
FiniteSample (X × ℝ)
by classical let t := markedKeys s have hcard : t.card
= s.count := by simpa [t] using markedKeys_card s exact ⟨s.count, fun k => s.points (ofLex (t.orderIsoOfFin hcard k).1).2⟩
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition.orderByMarks · Causalean/Mathlib/Probability/Poisson/FinitePartition/Superposition/Canonical.lean:222 · uses FiniteSample
def canonicalMarkedPoissonSampleLaw reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Given an observation probability law, a real-valued mark law, and a nonnegative Poisson mean, the canonical marked Poisson sample law sorts each finite marked sample by its marks, using original positions to break ties.

Definition (Lean source)
X :
Type u_1
shared
lam :
ℝ≥0
canonicalMarkedPoissonSampleLaw P R lam :
Measure (FiniteSample (X × ℝ))
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition.canonicalMarkedPoissonSampleLaw · Causalean/Mathlib/Probability/Poisson/FinitePartition/Superposition/Canonical.lean:320 · uses FiniteSample
def superposeByMarks reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Given a finite indexed family of marked samples, the mark-ordered superposition combines their pairs and sorts them by increasing real mark, using original positions to break ties.

Definition (Lean source)
X :
Type u_1
shared
ι :
Type u_2
shared
q :
ι → FiniteSample (X × ℝ)
superposeByMarks q :
FiniteSample (X × ℝ)
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition.superposeByMarks · Causalean/Mathlib/Probability/Poisson/FinitePartition/Superposition/Canonical.lean:339 · uses FiniteSample
lemma map_superposeByMarks_canonicalCellLaws reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Superposition recovers the canonical global law. For a measurable classifier partition, an observation probability law, an atomless real-valued mark law, and a nonnegative intensity, independently sample each cell at its mass-scaled intensity. Their mark-ordered superposition recovers the canonical global law.

Formal statement
X :
Type u_1
shared
ι :
Type u_2
shared
lam :
ℝ≥0
Measure.map superposeByMarks (Measure.pi (fun j : ι => canonicalMarkedPoissonSampleLaw (p.cellObservationLaw P j) R (lam * p.cellMass P j)))
Proof (Lean source)
lemma map_superposeByMarks_canonicalCellLaws [StandardBorelSpace X] (p : FiniteMeasurablePartition X ι) (P : Measure X) [IsProbabilityMeasure P] (R : Measure ℝ) [IsProbabilityMeasure R] [NullSingletonClass R] (lam : ℝ≥0) : Measure.map superposeByMarks (Measure.pi (fun j : ι => canonicalMarkedPoissonSampleLaw (p.cellObservationLaw P j) R (lam * p.cellMass P j))) = canonicalMarkedPoissonSampleLaw P R lam := by rw [← map_restrictPartition_canonicalMarkedPoissonSampleLaw p P R lam] exact map_superposeByMarks_map_restrictPartition p P R lam
15 supporting declarations (lemmas, instances)
Retention 3 core · 3 supporting This file gives the measurable retained-prefix map for a finite marked Poisson sample and proves that, conditional on having enough points, forgetting the marks of the smallest-mark prefix has the exact independent produ ★ normalized_map_retainedObservations_restrict_count_ge

Retained mark-ordered prefixes

This file gives the measurable retained-prefix map for a finite marked Poisson sample and proves that, conditional on having enough points, forgetting the marks of the smallest-mark prefix has the exact independent product law.

def retainedObservations reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

For a fallback sample value, a prefix length, and a finite sample of value--mark pairs, the retained-observations vector consists of the values attached to the first n sample points after ordering by their marks when the sample contains at least n points, and otherwise consists entirely of the fallback value.

Definition (Lean source)
X :
Type u_1
shared
x₀ :
X
n :
ℕ
s :
FiniteSample (X × ℝ)
retainedObservations x₀ n s :
Fin n → X
if h : n
≤ s.count then fun k => ((orderByMarks s).points (cast (orderByMarks_count s).symm (castLE h k))).1 else fun _ => x₀
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition.retainedObservations · Causalean/Mathlib/Probability/Poisson/FinitePartition/Superposition/Retention.lean:22 · uses FiniteSample
def prefixPointOr reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

For a fallback sample value, a prefix length, a position in that prefix, and a finite sample, the prefix point with fallback is the point there when the sample contains at least n points, and is otherwise the fallback value.

Definition (Lean source)
Y :
y₀ :
Y
n :
ℕ
k :
Fin n
s :
prefixPointOr y₀ n k s :
Y
if h : n ≤ s.count then s.points (castLE h k) else y₀
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition.prefixPointOr · Causalean/Mathlib/Probability/Poisson/FinitePartition/Superposition/Retention.lean:33 · uses FiniteSample
lemma normalized_map_retainedObservations_restrict_count_ge reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Conditioning on enough points gives i.i.d. draws. For an observation probability law, an atomless real-valued mark law, a nonnegative intensity, a fallback observation, and a retained sample size, suppose the enough-points event has positive mass. The conditional retained-observation law is the corresponding product law.

Formal statement
X :
Type u_1
shared
lam :
ℝ≥0
x₀ :
X
n :
ℕ
hpos :
(poissonMeasure lam) (Ici n) ≠ 0
((poissonMeasure lam) (Ici n))⁻¹ • Measure.map (retainedObservations x₀ n) ((finiteMarkedPoissonSampleLaw P R lam).restrict (FiniteSample.count ⁻¹' Ici n))
= Measure.pi (fun _ : Fin n => P)
Proof (Lean source)
lemma normalized_map_retainedObservations_restrict_count_ge (P : Measure X) [IsProbabilityMeasure P] (R : Measure ℝ) [IsProbabilityMeasure R] [NullSingletonClass R] (lam : ℝ≥0) (x₀ : X) (n : ℕ) (hpos : (poissonMeasure lam) (Ici n) ≠ 0) : ((poissonMeasure lam) (Ici n))⁻¹ • Measure.map (retainedObservations x₀ n) ((finiteMarkedPoissonSampleLaw P R lam).restrict (FiniteSample.count ⁻¹' Ici n)) = Measure.pi (fun _ : Fin n => P) := by rw [map_retainedObservations_restrict_count_ge] rw [← mul_smul, ENNReal.inv_mul_cancel hpos (measure_ne_top _ _), one_smul]
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition.normalized_map_retainedObservations_restrict_count_ge · Causalean/Mathlib/Probability/Poisson/FinitePartition/Superposition/Retention.lean:251 · uses FiniteSample , count , finiteMarkedPoissonSampleLaw , retainedObservations
3 supporting declarations (lemmas, instances)