Mathlib.Probability.Finite­Marked­Poisson­Partition.Superposition

Finite superposition of cell configurations, canonical ordering by independent real marks, and the retained-prefix product-law bridge.

Canonical 9 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 one finite sample of observation--real-mark pairs for every member of a finite index set, the superposed finite sample contains all of their pairs, enumerated through the disjoint union of their coordinate 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/FiniteMarkedPoissonPartition/Superposition/Canonical.lean:23 · uses FiniteSample
def pointsOfCount reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Given a nonnegative integer and a finite sample known to have exactly that many points, the points at the specified count are the resulting tuple of its nn points.

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/FiniteMarkedPoissonPartition/Superposition/Canonical.lean:54 · uses FiniteSample , count
def fixedCountSuperpose reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Given a nonnegative integer count for every member of a finite index set and a tuple of points of the specified count for each member, the fixed-count superposition is the finite sample obtained by concatenating all 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/FiniteMarkedPoissonPartition/Superposition/Canonical.lean:105 · uses FiniteSample
def fiberPoints reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Given a nonnegative integer count for every index and a family of finite samples whose member at each index has exactly the specified count, 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/FiniteMarkedPoissonPartition/Superposition/Canonical.lean:126 · uses FiniteSample
def markedKeys reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Given a finite sample of observation--real-mark pairs, the mark-ordering keys are the finite set of lexicographically ordered pairs consisting of each real mark and its original sample position; the position distinguishes pairs with equal marks.

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/FiniteMarkedPoissonPartition/Superposition/Canonical.lean:183 · uses FiniteSample , count
def orderByMarks reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Given a finite sample of observation--real-mark pairs, the mark-ordered sample contains the same pairs arranged in increasing order of their real marks, with equal marks ordered by original sample position.

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/FiniteMarkedPoissonPartition/Superposition/Canonical.lean:211 · uses FiniteSample
def canonicalMarkedPoissonSampleLaw reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Given a probability measure for observations, a probability measure for real-valued marks, and a nonnegative Poisson mean, the canonical marked Poisson sample law is the distribution obtained from the finite marked Poisson sample law by arranging each realized sample in increasing order of its marks, breaking ties by original position.

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/FiniteMarkedPoissonPartition/Superposition/Canonical.lean:308 · uses FiniteSample
def superposeByMarks reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Given one finite sample of observation--real-mark pairs for every member of a finite index set, the mark-ordered superposition is the superposition of those samples arranged in increasing order of real mark, with ties broken by original position.

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/FiniteMarkedPoissonPartition/Superposition/Canonical.lean:323 · uses FiniteSample
lemma map_superposeByMarks_canonicalCellLaws reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Superposition recovers the canonical global law. Under nonnegative intensity lam, and independently for each cell j of the finite measurable partition p, draw a canonical marked Poisson configuration with base measure p.cellObservationLaw P j, atomless mark distribution R (so marks are almost surely distinct), and intensity lam times the P-mass of cell j; merging these per-cell configurations by increasing mark (mark-ordered superposition) has exactly the law of the canonical marked Poisson configuration with base measure P, mark distribution R, and intensity lam.

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 1 to review 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 nonnegative integer prefix length, and a finite sample of value--mark pairs, the retained-observations vector consists of the values attached to the first nn sample points after ordering by their marks when the sample contains at least nn 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 (Fin.castLE h k))).1 else fun _ => x₀
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition.retainedObservations · Causalean/Mathlib/Probability/FiniteMarkedPoissonPartition/Superposition/Retention.lean:19 · uses FiniteSample
def prefixPointOr reviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

For a fallback sample value, a nonnegative integer prefix length, a position among the first nn positions, and a finite sample, the prefix point with fallback is the sample point at that position when the sample contains at least nn 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 (Fin.castLE h k) else y₀
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition.prefixPointOr · Causalean/Mathlib/Probability/FiniteMarkedPoissonPartition/Superposition/Retention.lean:30 · uses FiniteSample
lemma normalized_map_retainedObservations_restrict_count_ge unreviewed
Causalean.Mathlib.Probability.FiniteMarkedPoissonPartition

Conditioning on enough points gives i.i.d. draws. Fix a nonnegative intensity lam and suppose the Poisson(lam) probability of observing at least n points is nonzero. Under the marked Poisson sample law with base probability measure P, mark distribution R, and intensity lam, condition on the event that the sample count is at least n, retain the n mark-smallest points and forget their marks (x₀ is an irrelevant filler value used only outside this event); the resulting normalised law equals the product of n independent copies of P.

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/FiniteMarkedPoissonPartition/Superposition/Retention.lean:245 · uses FiniteSample , count , finiteMarkedPoissonSampleLaw , retainedObservations
3 supporting declarations (lemmas, instances)