Stat.Minimax.Mixture.MomentMatched.MarkedPoisson
Total-variation bounds for mixtures of Poisson count experiments under priors built from a signed measure with vanishing low-order moments.
Certificate 10 core · 17 supporting This module realizes a normalized finite signed moment functional as an atomic signed measure. ★ orientedPrior_target_separation
Finite signed moment certificates
This module realizes a normalized finite signed moment functional as an atomic signed measure. It exposes its total variation, a measurable polar sign, and the normalized positive and negative Jordan priors, including an orientation that makes any chosen target separation nonnegative.
A normalized finite signed moment certificate on a finite node index set through a matching degree consists of distinct real nodes, signed weights of total absolute mass one, and vanishing algebraic moments through that degree.
A finite signed certificate induces the atomic signed measure that places each signed weight at its certificate node.
Definition (Lean source)
A finite signed certificate induces the atomic absolute-weight measure that places the absolute value of each weight at its certificate node.
Definition (Lean source)
The atomic polar sign of a finite signed certificate at an evaluation point equals the sign of the unique weight at a certificate node and is zero away from all nodes.
Definition (Lean source)
The normalized positive Jordan prior of a finite signed certificate is obtained by doubling the positive atomic weights.
Definition (Lean source)
The normalized negative Jordan prior of a finite signed certificate is obtained by doubling the magnitudes of the negative atomic weights.
Definition (Lean source)
The target-oriented null prior for a finite signed certificate and a target function chooses the Jordan prior that makes the alternative target mean at least as large as the null target mean.
Definition (Lean source)
The target-oriented alternative prior for a finite signed certificate and a target function chooses the opposite Jordan prior from the oriented null, swapping the pair exactly when the certificate evaluates the target negatively.
Definition (Lean source)
Orienting the Jordan priors of a finite signed certificate for a target function makes the alternative-minus-null expectation gap equal twice the absolute signed certificate evaluation.
Formal statement
Proof (Lean source)
A finite alternation moment dual for a target function on an interval with lower endpoint and upper endpoint supplies a normalized finite signed moment certificate by using its nodes, weights, normalization, and moment identities.
Definition (Lean source)
17 supporting declarations (lemmas, instances)
-
variation_eq_absoluteMeasuretheorem — The variation of the signed measure represented by a finite signed certificate equals its atomic absolute-weight measure.hypothesesconclusionC.signedMeasure.variation = C.absoluteMeasureProof (Lean source)
theorem variation_eq_absoluteMeasure (C : NormalizedFiniteSignedMomentCertificate ι L) : C.signedMeasure.variation = C.absoluteMeasure := by rw [signedMeasure_eq_absoluteMeasure_withDensity, Measure.variation_withDensityᵥ (integrable_atomicPolarSign_absoluteMeasure C)] calc C.absoluteMeasure.withDensity (fun x => ‖atomicPolarSign C x‖ₑ) = C.absoluteMeasure.withDensity 1 := by apply withDensity_congr_ae filter_upwards [abs_atomicPolarSign_ae_absoluteMeasure C] with x hx rw [← ofReal_norm, Real.norm_eq_abs, hx] simp _ = C.absoluteMeasure := withDensity_one -
signedMeasure_univ_eq_zerotheorem — The signed measure represented by a finite signed certificate has total mass zero, as required by its degree-zero moment constraint.hypothesesconclusionC.signedMeasure univ = 0Proof (Lean source)
theorem signedMeasure_univ_eq_zero (C : NormalizedFiniteSignedMomentCertificate ι L) : C.signedMeasure univ = 0 := by rw [signedMeasure] rw [finsetSum_signedMeasure_apply] simpa using C.moments_zero 0 (zero_le L) -
integral_pow_signedMeasure_eq_zerotheorem — Integrating the requested power against the atomic signed measure of a finite signed certificate gives zero whenever that degree is within the certificate's matching range.hypothesesconclusion∫ᵛ x, x ^ j ∂<•C.signedMeasure = 0Proof (Lean source)
theorem integral_pow_signedMeasure_eq_zero (C : NormalizedFiniteSignedMomentCertificate ι L) (j : ℕ) (hj : j ≤ L) : ∫ᵛ x, x ^ j ∂<•C.signedMeasure = 0 := by rw [signedMeasure] rw [VectorMeasure.integral_finsetSum_vectorMeasure (fun i _ => by change Integrable (fun x : ℝ => x ^ j) (VectorMeasure.dirac (C.node i) (C.weight i)).variation rw [VectorMeasure.variation_dirac] exact (integrable_dirac (by simp)).smul_measure (by simp))] simpa using C.moments_zero j hj -
variation_isProbabilityMeasureinstance — The variation measure of a normalized finite signed certificate is a probability measure, because its total absolute weight is one.parametersinstancegiven byby constructor rw [variation_eq_absoluteMeasure, absoluteMeasure] simp only [Measure.finsetSum_apply, Measure.smul_apply, Measure.dirac_apply_of_mem (Set.mem_univ _), smul_eq_mul, mul_one] rw [← ENNReal.ofReal_sum_of_nonneg (fun _ _ => abs_nonneg _), C.normalized] simp -
measurable_polarSigntheorem — The atomic polar sign of a finite signed certificate is Borel measurable.hypothesesconclusionMeasurable C.polarSignProof (Lean source)
theorem measurable_polarSign (C : NormalizedFiniteSignedMomentCertificate ι L) : Measurable C.polarSign := by exact measurable_atomicPolarSign C -
abs_polarSign_aetheorem — The atomic polar sign of a finite signed certificate has absolute value one almost everywhere under its variation measure.hypothesesconclusion∀ᵐ x ∂C.signedMeasure.variation, |C.polarSign x| = 1Proof (Lean source)
theorem abs_polarSign_ae (C : NormalizedFiniteSignedMomentCertificate ι L) : ∀ᵐ x ∂C.signedMeasure.variation, |C.polarSign x| = 1 := by rw [variation_eq_absoluteMeasure] exact abs_atomicPolarSign_ae_absoluteMeasure C -
integrable_polarSigntheorem — The atomic polar sign of a finite signed certificate is integrable against its variation measure.hypothesesconclusionIntegrable C.polarSign C.signedMeasure.variationProof (Lean source)
theorem integrable_polarSign (C : NormalizedFiniteSignedMomentCertificate ι L) : Integrable C.polarSign C.signedMeasure.variation := by rw [variation_eq_absoluteMeasure] exact integrable_atomicPolarSign_absoluteMeasure C -
signedMeasure_eq_withDensity_polarSigntheorem — The atomic signed measure of a finite signed certificate equals its variation measure weighted by its measurable polar sign.hypothesesconclusionC.signedMeasure = C.signedMeasure.variation.withDensityᵥ C.polarSignProof (Lean source)
theorem signedMeasure_eq_withDensity_polarSign (C : NormalizedFiniteSignedMomentCertificate ι L) : C.signedMeasure = C.signedMeasure.variation.withDensityᵥ C.polarSign := by rw [variation_eq_absoluteMeasure] exact signedMeasure_eq_absoluteMeasure_withDensity C -
positivePrior_isProbabilityMeasureinstance — The positive Jordan prior of a normalized finite signed certificate is a probability measure, because its doubled positive weights have total mass one.parametersinstancegiven byby constructor rw [positivePrior] simp only [Measure.finsetSum_apply, Measure.smul_apply, Measure.dirac_apply_of_mem (Set.mem_univ _), smul_eq_mul, mul_one] rw [← ENNReal.ofReal_sum_of_nonneg (fun _ _ => mul_nonneg (by norm_num) (le_max_right _ _))] rw [← Finset.mul_sum, sum_max_weight_eq_half C] norm_num -
negativePrior_isProbabilityMeasureinstance — The negative Jordan prior of a normalized finite signed certificate is a probability measure, because its doubled negative weights have total mass one.parametersinstancegiven byby constructor rw [negativePrior] simp only [Measure.finsetSum_apply, Measure.smul_apply, Measure.dirac_apply_of_mem (Set.mem_univ _), smul_eq_mul, mul_one] rw [← ENNReal.ofReal_sum_of_nonneg (fun _ _ => mul_nonneg (by norm_num) (le_max_right _ _))] rw [← Finset.mul_sum, sum_max_neg_weight_eq_half C] norm_num -
jordanDecomposition_posPart_eqtheorem — The positive part of the Jordan decomposition of a certificate's signed measure is one half of its normalized positive Jordan prior.hypothesesconclusionC.signedMeasure.toJordanDecomposition.posPart = (2 : ℝ≥0∞)⁻¹ • C.positivePriorProof (Lean source)
theorem jordanDecomposition_posPart_eq (C : NormalizedFiniteSignedMomentCertificate ι L) : C.signedMeasure.toJordanDecomposition.posPart = (2 : ℝ≥0∞)⁻¹ • C.positivePrior := by have hJ := SignedMeasure.toJordanDecomposition_eq_of_eq_add_withDensity (s := C.signedMeasure) (t := 0) (μ := C.absoluteMeasure) (measurable_atomicPolarSign C) (integrable_atomicPolarSign_absoluteMeasure C) VectorMeasure.MutuallySingular.zero_left (by simpa using signedMeasure_eq_absoluteMeasure_withDensity C) have hpos := congrArg JordanDecomposition.posPart hJ calc C.signedMeasure.toJordanDecomposition.posPart = C.absoluteMeasure.withDensity (fun x => ofReal (atomicPolarSign C x)) := by simpa [SignedMeasure.toJordanDecomposition_zero, JordanDecomposition.zero_posPart] using hpos _ = ∑ i, ofReal (max (C.weight i) 0) • Measure.dirac (C.node i) := absoluteMeasure_withDensity_pos C _ = (2 : ℝ≥0∞)⁻¹ • C.positivePrior := (half_positivePrior C).symm -
jordanDecomposition_negPart_eqtheorem — The negative part of the Jordan decomposition of a certificate's signed measure is one half of its normalized negative Jordan prior.hypothesesconclusionC.signedMeasure.toJordanDecomposition.negPart = (2 : ℝ≥0∞)⁻¹ • C.negativePriorProof (Lean source)
theorem jordanDecomposition_negPart_eq (C : NormalizedFiniteSignedMomentCertificate ι L) : C.signedMeasure.toJordanDecomposition.negPart = (2 : ℝ≥0∞)⁻¹ • C.negativePrior := by have hJ := SignedMeasure.toJordanDecomposition_eq_of_eq_add_withDensity (s := C.signedMeasure) (t := 0) (μ := C.absoluteMeasure) (measurable_atomicPolarSign C) (integrable_atomicPolarSign_absoluteMeasure C) VectorMeasure.MutuallySingular.zero_left (by simpa using signedMeasure_eq_absoluteMeasure_withDensity C) have hneg := congrArg JordanDecomposition.negPart hJ calc C.signedMeasure.toJordanDecomposition.negPart = C.absoluteMeasure.withDensity (fun x => ofReal (-atomicPolarSign C x)) := by simpa [SignedMeasure.toJordanDecomposition_zero, JordanDecomposition.zero_negPart] using hneg _ = ∑ i, ofReal (max (-C.weight i) 0) • Measure.dirac (C.node i) := absoluteMeasure_withDensity_neg C _ = (2 : ℝ≥0∞)⁻¹ • C.negativePrior := (half_negativePrior C).symm -
jordanPriors_moments_eqtheorem — The normalized Jordan priors of a finite signed certificate have equal moments at the requested degree whenever that degree does not exceed the matching degree.hypothesesconclusion∫ x, x ^ j ∂C.positivePrior = ∫ x, x ^ j ∂C.negativePriorProof (Lean source)
theorem jordanPriors_moments_eq (C : NormalizedFiniteSignedMomentCertificate ι L) (j : ℕ) (hj : j ≤ L) : ∫ x, x ^ j ∂C.positivePrior = ∫ x, x ^ j ∂C.negativePrior := by have h := prior_integral_sub C (fun x => x ^ j) rw [C.moments_zero j hj, mul_zero] at h linarith -
jordanPriors_ae_mem_rangetheorem — The positive and negative Jordan priors of a finite signed certificate are both concentrated on its finite set of nodes.hypothesesProof (Lean source)
theorem jordanPriors_ae_mem_range (C : NormalizedFiniteSignedMomentCertificate ι L) : (∀ᵐ x ∂C.positivePrior, x ∈ range C.node) ∧ ∀ᵐ x ∂C.negativePrior, x ∈ range C.node := by classical constructor · rw [positivePrior, ae_finsetSum_measure_iff] intro i hi apply Measure.ae_smul_measure exact (ae_dirac_iff (Set.finite_range C.node).measurableSet).2 ⟨i, rfl⟩ · rw [negativePrior, ae_finsetSum_measure_iff] intro i hi apply Measure.ae_smul_measure exact (ae_dirac_iff (Set.finite_range C.node).measurableSet).2 ⟨i, rfl⟩ -
orientedPrior0_isProbabilityMeasureinstance — The target-oriented null prior built from a finite signed certificate and a target function is a probability measure, because it selects one of the two Jordan probability measures. -
orientedPrior1_isProbabilityMeasureinstance — The target-oriented alternative prior built from a finite signed certificate and a target function is a probability measure, because it selects one of the two Jordan probability measures. -
orientedPriors_moments_eqtheorem — The priors obtained by orienting a finite signed certificate for a target function retain equal moments at the requested degree whenever that degree does not exceed the matching degree.hypothesesι :sharedType u_1L :sharedℕf :ℝ → ℝj :ℕhj :j ≤ Lconclusion∫ x, x ^ j ∂C.orientedPrior0 f = ∫ x, x ^ j ∂C.orientedPrior1 fProof (Lean source)
theorem orientedPriors_moments_eq (C : NormalizedFiniteSignedMomentCertificate ι L) (f : ℝ → ℝ) (j : ℕ) (hj : j ≤ L) : ∫ x, x ^ j ∂C.orientedPrior0 f = ∫ x, x ^ j ∂C.orientedPrior1 f := by by_cases h : 0 ≤ ∑ i, C.weight i * f (C.node i) · rw [orientedPrior0, if_pos h, orientedPrior1, if_pos h] exact (jordanPriors_moments_eq C j hj).symm · rw [orientedPrior0, if_neg h, orientedPrior1, if_neg h] exact jordanPriors_moments_eq C j hj
AggregatePoisson 8 core · 4 supporting This module isolates the analytic core needed by the marked experiment. ★ exists_geometric_aggregatePoisson_jordan_tv_bound
Aggregate affine-Poisson moment-matched mixtures
This module isolates the analytic core needed by the marked experiment. It
combines the treated counts before marking, leaving two independent Poisson
counts whose affine rates add to t * p. The resulting Jordan-prior mixture
is controlled by the standard exponential-Gram moment-matching bound.
An aggregate Poisson observation records the treated and control counts as a pair.
Definition (Lean source)
The aggregate treated rate at latent mass is the product of aggregate intensity, overlap fraction, and the mass plus shift, as given by the displayed formula.
Definition (Lean source)
The aggregate control rate at latent mass is aggregate intensity times the non-overlap mass after subtracting the contribution from overlap fraction and shift, as given by the displayed formula.
Definition (Lean source)
At latent mass, overlap fraction, shift, and aggregate intensity, the aggregate Poisson law is the product of independent Poisson laws with the aggregate treated and control rates.
Definition (Lean source)
A real-valued rate function determines a Poisson probability law for each latent mass, with negative rates truncated to zero. This kernel is the one-count building block for the aggregate Poisson experiment.
The aggregate affine-Poisson experiment sends latent mass to treated and control counts at overlap fraction, shift, and aggregate intensity, using the product of the corresponding one-count kernels.
Definition (Lean source)
Mixing a latent prior through the aggregate experiment with overlap fraction, shift, and aggregate intensity gives the prior-predictive treated/control count law, defined by the usual prior-predictive mixture.
Definition (Lean source)
If the overlap fraction is positive and below one half and the support ratio has the stated overlap-dependent value, there are positive constants and a decay factor strictly between zero and one that make the two aggregate Jordan-prior predictive laws geometrically close, whenever intensity times the support bound is sufficiently small relative to the matching degree.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
aggregatePoissonLaw_isProbabilityMeasureinstance — The aggregate two-count law at any overlap fraction, shift, aggregate intensity, and latent mass is a probability measure, because it is a product of Poisson probability measures.parametersε a t p :ℝinstanceaggregatePoissonLaw_isProbabilityMeasure ε a t p :IsProbabilityMeasure (aggregatePoissonLaw ε a t p)given byby unfold aggregatePoissonLaw infer_instance -
aggregatePoissonKernel_applytheorem — The fibre of the aggregate kernel at latent mass equals the explicit independent product-Poisson law for the same overlap fraction, shift, and aggregate intensity.Proof (Lean source)
theorem aggregatePoissonKernel_apply (ε a t p : ℝ) : aggregatePoissonKernel ε a t p = aggregatePoissonLaw ε a t p := by unfold aggregatePoissonKernel aggregatePoissonLaw rw [Kernel.prod_apply, aggregatePoissonKernelOfRealRate_apply _ (by change Measurable (fun p : ℝ => t * ε * (p + a)) fun_prop), aggregatePoissonKernelOfRealRate_apply _ (by change Measurable (fun p : ℝ => t * ((1 - ε) * p - ε * a)) fun_prop)] -
exists_geometric_sqrt_exponentialSeriesTail_boundtheorem — For any positive tail-scale constant, there are positive constants and a decay factor strictly between zero and one that uniformly bound the square root of the scaled exponential-series tail geometrically in the matching degree, whenever the argument is at most a sufficiently small multiple of that degree.hypothesesA :ℝhA :0 < Aconclusion∃ b D ρ : ℝ,Proof (Lean source)
theorem exists_geometric_sqrt_exponentialSeriesTail_bound (A : ℝ) (hA : 0 < A) : ∃ b D ρ : ℝ, 0 < b ∧ 0 < D ∧ ρ ∈ Ioo (0 : ℝ) 1 ∧ ∀ (L : ℕ) (x : ℝ), 0 ≤ x → x ≤ b * L → sqrt (exponentialSeriesTail L (A * x)) ≤ D * ρ ^ L := by refine ⟨1 / (16 * A * exp 1), 1, 1 / 2, by positivity, by norm_num, ⟨by norm_num, by norm_num⟩, ?_⟩ intro L x hx hband obtain rfl | hL := L.eq_zero_or_pos · have hxle : x ≤ 0 := by simpa using hband have hxeq : x = 0 := le_antisymm hxle hx subst x have htailzero : exponentialSeriesTail 0 0 = 0 := by unfold exponentialSeriesTail rw [show (fun n : ℕ => if 0 < n then (0 : ℝ) ^ n / (n.factorial : ℝ) else 0) = 0 by funext n split_ifs with hn · simp [zero_pow (Nat.ne_of_gt hn)] · rfl] exact tsum_zero simp only [mul_zero] rw [htailzero, Real.sqrt_zero, pow_zero] norm_num have hz : 0 ≤ A * x := mul_nonneg hA.le hx have hzL : A * x ≤ (L : ℝ) / (16 * exp 1) := by calc A * x ≤ A * ((1 / (16 * A * exp 1)) * (L : ℝ)) := mul_le_mul_of_nonneg_left hband hA.le _ = (L : ℝ) / (16 * exp 1) := by field_simp let f : ℕ → ℝ := fun n => if L < n then (A * x) ^ n / (n.factorial : ℝ) else 0 let g : ℕ → ℝ := fun n => if L < n then (1 / 4 : ℝ) ^ n else 0 have hq : Summable (fun n : ℕ => (1 / 4 : ℝ) ^ n) := summable_geometric_of_norm_lt_one (by norm_num) have hg : Summable g := by apply hq.of_nonneg_of_le · intro n dsimp [g] positivity · intro n dsimp [g] split_ifs · rfl · positivity have hf_nonneg : ∀ n, 0 ≤ f n := by intro n dsimp [f] positivity have hfg : ∀ n, f n ≤ g n := by intro n dsimp [f, g] split_ifs with hn · exact exponential_term_le_quarter_pow L n (A * x) hz hzL hn · rfl have hf : Summable f := hg.of_nonneg_of_le hf_nonneg hfg have htail : exponentialSeriesTail L (A * x) ≤ (1 / 4 : ℝ) ^ L := by unfold exponentialSeriesTail change (∑' n, f n) ≤ _ exact (hf.tsum_le_tsum hfg hg).trans (geometric_quarter_tail L) rw [one_mul, Real.sqrt_le_iff] refine ⟨by positivity, htail.trans_eq ?_⟩ rw [show (1 / 4 : ℝ) = (1 / 2) ^ 2 by norm_num, ← pow_mul, ← pow_mul] congr 1 omega -
exists_aggregatePoisson_jordan_sqrt_tail_boundtheorem — If the overlap fraction is positive and below one half and the support ratio has the stated overlap-dependent value, one positive constant uniformly makes the total-variation distance between the aggregate mixtures of the two Jordan priors no larger than a square-root exponential-series tail, with argument proportional to intensity times the support bound.hypothesesε κ :ℝhε :0 < εhεhalf :ε < 1 / 2hκ :κ = (1 - 2 * ε) / εconclusion∃ A : ℝ,0 < Aconclusion 1ι :Type*Fintype ιL :ℕa B t :ℝ0 < a0 < B0 < t(∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) B)tvDist (aggregatePoissonPredictive C.positivePrior ε a t) (aggregatePoissonPredictive C.negativePrior ε a t)≤ sqrt (exponentialSeriesTail L (A * (t * B)))Proof (Lean source)
theorem exists_aggregatePoisson_jordan_sqrt_tail_bound (ε κ : ℝ) (hε : 0 < ε) (hεhalf : ε < 1 / 2) (hκ : κ = (1 - 2 * ε) / ε) : ∃ A : ℝ, 0 < A ∧ ∀ {ι : Type*} [Fintype ι] {L : ℕ} (C : NormalizedFiniteSignedMomentCertificate ι L) (a B t : ℝ), 0 < a → 0 < B → 0 < t → (∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) B) → tvDist (aggregatePoissonPredictive C.positivePrior ε a t) (aggregatePoissonPredictive C.negativePrior ε a t) ≤ sqrt (exponentialSeriesTail L (A * (t * B))) := by have hden : 0 < 1 - 2 * ε := by nlinarith have hκpos : 0 < κ := by rw [hκ]; positivity let A : ℝ := 2 * ε + 2 * (1 - ε) ^ 2 / ε have hA : 0 < A := by dsimp [A] positivity refine ⟨A, hA, ?_⟩ intro ι _ L C a B t ha hB ht hsupp let l : ℝ := a / κ let c : ℝ := (l + B) / 2 let R : ℝ := (B - l) / 2 let qT : ℝ := t * ε * (c + a) let qC : ℝ := t * ((1 - ε) * c - ε * a) let sT : ℝ := t * ε let sC : ℝ := t * (1 - ε) let lambda : ℝ := sT ^ 2 / qT + sC ^ 2 / qC let πP : Measure ℝ := Measure.map (fun p : ℝ => p - c) C.positivePrior let πN : Measure ℝ := Measure.map (fun p : ℝ => p - c) C.negativePrior let Kc : Kernel ℝ AggregatePoissonObservation := (aggregatePoissonKernel ε a t).comap (fun θ : ℝ => θ + c) (by fun_prop) let Q : Measure AggregatePoissonObservation := (poissonMeasure (toNNReal qT)).prod (poissonMeasure (toNNReal qC)) let likelihood : ℝ → AggregatePoissonObservation → ℝ := aggregateCenteredLikelihood qT qC sT sC have hlB : l ≤ B := by rcases hsupp.exists with ⟨p, hp⟩ exact hp.1.trans hp.2 have hlpos : 0 < l := div_pos ha hκpos have ha_le : a ≤ κ * B := by simpa [mul_comm] using (div_le_iff₀ hκpos).mp (by simpa [l] using hlB) have hcontrol_l : 0 < (1 - ε) * l - ε * a := by have hinv : κ⁻¹ = ε / (1 - 2 * ε) := by rw [hκ, inv_div] have hden' : 1 - ε * 2 ≠ 0 := by nlinarith have hid : (1 - ε) * l - ε * a = a * ε ^ 2 / (1 - 2 * ε) := by dsimp [l] rw [div_eq_mul_inv, hinv] field_simp [hden'] ring rw [hid] positivity have hcontrol_B : ε * B ≤ (1 - ε) * B - ε * a := by have hκmul : ε * κ = 1 - 2 * ε := by rw [hκ] field_simp nlinarith [mul_le_mul_of_nonneg_left ha_le hε.le] have hc_ge_halfB : B / 2 ≤ c := by dsimp [c] nlinarith [hlpos.le] have hRnonneg : 0 ≤ R := by dsimp [R]; linarith have hRleB : R ≤ B := by dsimp [R]; nlinarith [hlpos.le] have hqT_lower : t * ε * (B / 2) ≤ qT := by dsimp [qT] apply mul_le_mul_of_nonneg_left _ (mul_nonneg ht.le hε.le) linarith [ha] have hqT : 0 < qT := lt_of_lt_of_le (by positivity) hqT_lower have hqC_lower : t * (ε * B / 2) ≤ qC := by dsimp [qC, c] have hcidentity : (1 - ε) * ((l + B) / 2) - ε * a = (((1 - ε) * l - ε * a) + ((1 - ε) * B - ε * a)) / 2 := by ring rw [hcidentity] have : ε * B / 2 ≤ (((1 - ε) * l - ε * a) + ((1 - ε) * B - ε * a)) / 2 := by nlinarith [hcontrol_l, hcontrol_B] exact mul_le_mul_of_nonneg_left this ht.le have hqC : 0 < qC := lt_of_lt_of_le (by positivity) hqC_lower have hlambda : 0 ≤ lambda := by dsimp [lambda] positivity have hcenter_mem (θ : ℝ) (hθ : |θ| ≤ R) : θ + c ∈ Icc l B := by rw [abs_le] at hθ constructor <;> dsimp [c, R] at * <;> linarith have hrates (θ : ℝ) (hθ : |θ| ≤ R) : 0 ≤ qT + sT * θ ∧ 0 ≤ qC + sC * θ := by have hp := hcenter_mem θ hθ constructor · have : 0 < θ + c + a := lt_of_lt_of_le (add_pos hlpos ha) (by linarith [hp.1]) dsimp [qT, sT] nlinarith [mul_pos (mul_pos ht hε) this] · have hc0 : 0 ≤ (1 - ε) * (θ + c) - ε * a := (le_of_lt hcontrol_l).trans (by have he1 : 0 ≤ 1 - ε := by nlinarith nlinarith [mul_le_mul_of_nonneg_left hp.1 he1]) dsimp [qC, sC] nlinarith [mul_nonneg ht.le hc0] have hparamT (θ : ℝ) : aggregateTreatedRate ε a t (θ + c) = qT + sT * θ := by dsimp [aggregateTreatedRate, qT, sT] ring have hparamC (θ : ℝ) : aggregateControlRate ε a t (θ + c) = qC + sC * θ := by dsimp [aggregateControlRate, qC, sC] ring haveI : IsProbabilityMeasure πP := by dsimp [πP] exact Measure.isProbabilityMeasure_map (by fun_prop) haveI : IsProbabilityMeasure πN := by dsimp [πN] exact Measure.isProbabilityMeasure_map (by fun_prop) haveI : IsProbabilityMeasure Q := by dsimp [Q] infer_instance have hKprob : ∀ θ, IsProbabilityMeasure (Kc θ) := by intro θ dsimp [Kc] rw [aggregatePoissonKernel_apply] infer_instance have hmeas : Measurable (fun z : ℝ × AggregatePoissonObservation => likelihood z.1 z.2) := by exact measurable_aggregateCenteredLikelihood qT qC sT sC have hnonneg : ∀ θ, |θ| ≤ R → ∀ z, 0 ≤ likelihood θ z := by intro θ hθ z exact aggregateCenteredLikelihood_nonnegative qT qC sT sC θ hqT hqC (hrates θ hθ).1 (hrates θ hθ).2 z have hdensity : ∀ θ, |θ| ≤ R → Kc θ = Q.withDensity fun z => ofReal (likelihood θ z) := by intro θ hθ dsimp [Kc, Q, likelihood] rw [aggregatePoissonKernel_apply] exact aggregatePoissonLaw_centered_eq_withDensity ε a t c θ qT qC sT sC hqT hqC (hrates θ hθ).1 (hrates θ hθ).2 (hparamT θ) (hparamC θ) have hinner : ∀ θ, |θ| ≤ R → ∀ θ', |θ'| ≤ R → ∫ z, likelihood θ z * likelihood θ' z ∂Q = exp (lambda * θ * θ') := by intro θ hθ θ' hθ' exact aggregateCenteredLikelihood_inner qT qC sT sC θ θ' hqT hqC rcases jordanPriors_ae_of_variation C hsupp with ⟨hsuppP, hsuppN⟩ have hsuppπP : πP {θ | |θ| ≤ R} = 1 := by exact centered_map_supported C.positivePrior l B c R rfl rfl hsuppP have hsuppπN : πN {θ | |θ| ≤ R} = 1 := by exact centered_map_supported C.negativePrior l B c R rfl rfl hsuppN have hmom : ∀ n ≤ L, ∫ θ, θ ^ n ∂πP = ∫ θ, θ ^ n ∂πN := by intro n hn exact centered_map_moments_eq C l B c hsupp n hn have hlambdaR : lambda * R ^ 2 ≤ A * (t * B) := by have hqTbound : sT ^ 2 / qT ≤ 2 * t * ε / B := by rw [div_le_iff₀ hqT] have := hqT_lower dsimp [sT] field_simp nlinarith have hqCbound : sC ^ 2 / qC ≤ 2 * t * (1 - ε) ^ 2 / (ε * B) := by rw [div_le_iff₀ hqC] have := hqC_lower dsimp [sC] field_simp nlinarith [sq_nonneg (1 - ε)] have hR2 : R ^ 2 ≤ B ^ 2 := by nlinarith [sq_nonneg R, sq_nonneg B] dsimp [lambda, A] calc (sT ^ 2 / qT + sC ^ 2 / qC) * R ^ 2 ≤ (2 * t * ε / B + 2 * t * (1 - ε) ^ 2 / (ε * B)) * R ^ 2 := by gcongr _ ≤ (2 * t * ε / B + 2 * t * (1 - ε) ^ 2 / (ε * B)) * B ^ 2 := by gcongr _ = (2 * ε + 2 * (1 - ε) ^ 2 / ε) * (t * B) := by field_simp have htv := momentMatchedMixture_tv_le_sqrt_tail_of_supported πP πN Kc Q likelihood hKprob lambda R L hlambda hRnonneg hmeas hnonneg hdensity hinner hsuppπP hsuppπN hmom rw [priorPredictive_centered_map C.positivePrior (aggregatePoissonKernel ε a t) c, priorPredictive_centered_map C.negativePrior (aggregatePoissonKernel ε a t) c] at htv exact htv.trans (Real.sqrt_le_sqrt (exponentialSeriesTail_mono L (mul_nonneg hlambda (sq_nonneg R)) hlambdaR))
PalmSplit 15 core · 15 supporting This module defines a paper-independent four-count experiment. ★ palmSplit_aggregatePoissonLaw_real_target
Label-gated marked-Poisson mixtures
This module defines a paper-independent four-count experiment. Its two labeled treated counts receive opposite homogeneous binary marks, while an auxiliary treated count and an aggregate control count do not depend on the branch. Moment cancellation yields a geometric prior-predictive TV bound.
The marked-Poisson observation is the four-count outcome consisting of labeled treated counts with marks one and zero, followed by auxiliary-treated and aggregate-control counts, and is given by the Cartesian product of four natural-number count spaces.
Definition (Lean source)
The treated mass at latent mass is the overlap fraction times the mass plus a shift, as given by the displayed formula.
Definition (Lean source)
The aggregate control mass subtracts treated mass from latent cell mass. It is evaluated at an overlap parameter, a shift, and a latent cell mass.
Definition (Lean source)
The signed branch mark equals the mark on the alternative branch and its negation on the null branch, for an outcome-mark branch and a mark value.
Definition (Lean source)
At latent mass, the marked-Poisson observation law for overlap fraction, shift, labeled intensity, auxiliary intensity, mark function, and branch is the product of four independent Poisson laws with the corresponding marked rates.
Definition (Lean source)
A real-valued rate function determines a Poisson probability law for each latent mass, with negative rates truncated to zero. This kernel is the one-count building block for the marked Poisson experiment.
The four-count marked-Poisson experiment sends latent mass to observations using overlap fraction, shift, labeled intensity, auxiliary intensity, a measurable mark function, and a branch, and is formed as the product of the four corresponding Poisson kernels.
Definition (Lean source)
A finite signed certificate, with node index set and matching degree, induces the one-coordinate marked-Poisson predictive law for overlap fraction, shift, labeled intensity, auxiliary intensity, and branch by mixing over its zero-inflated variation prior.
Definition (Lean source)
The zero-labeled-count event consists of observations in which neither outcome mark has a labeled treated count.
Definition (Lean source)
For an outcome-mark branch, an aggregate Poisson observation, and a splitting count, the Palm-split embedded observation records the marked observation obtained by assigning that count to the selected branch. It is the atomic outcome used to construct the Palm-split law.
Definition (Lean source)
For a binomial success probability, an outcome-mark branch, and an aggregate Poisson observation, the Palm-split submeasure distributes inverse-size-biased binomial mass over its marked split outcomes. It provides the non-null part of the Palm-split probability law.
Definition (Lean source)
For a binomial success probability, an outcome-mark branch, and an aggregate Poisson observation, the Palm-split probability measure completes the Palm-split submeasure by placing its remaining mass on the null observation. It is the probability law used to define the associated Markov kernel.
Definition (Lean source)
For a binomial success probability and an outcome-mark branch, the Palm-split kernel maps each aggregate Poisson observation to its Palm-split probability law. It transports aggregate predictive laws into the marked-observation experiment.
Definition (Lean source)
For an outcome-mark branch, a selected count, and the remaining treated and control counts, the Palm-split target observation places the selected count in the branch's labeled coordinate and retains the remaining counts. It names the singleton event evaluated in the Palm-split identities.
Definition (Lean source)
For an overlap fraction, positive shift, labeled and auxiliary treated intensities, and latent mass, if both intensities are nonnegative, their sum is positive, and the treated rate is nonnegative, then for a selected outcome branch and three count indices, the Palm-split aggregate Poisson law assigns the target singleton the displayed inverse-size-biased product of three Poisson masses.
Formal statement
Proof (Lean source)
15 supporting declarations (lemmas, instances)
-
markedPoissonLaw_isProbabilityMeasureinstance — The marked-Poisson law is a probability measure, because it is a product of four Poisson probability measures. The law is indexed by overlap, shift, labeled and auxiliary intensities, an outcome-mark function, a branch, and latent mass.parametersinstancemarkedPoissonLaw_isProbabilityMeasure ε a u v h branch p :IsProbabilityMeasure (markedPoissonLaw ε a u v h branch p)given byby unfold markedPoissonLaw infer_instance -
markedPoissonKernel_applytheorem — The fibre of the marked-Poisson kernel at latent mass equals the explicit four-count law for the same overlap fraction, shift, labeled intensity, auxiliary intensity, measurable mark function, and branch.hypothesesconclusionmarkedPoissonKernel ε a u v h hh branch p = markedPoissonLaw ε a u v h branch pProof (Lean source)
theorem markedPoissonKernel_apply (ε a u v : ℝ) (h : ℝ → ℝ) (hh : Measurable h) (branch : Bool) (p : ℝ) : markedPoissonKernel ε a u v h hh branch p = markedPoissonLaw ε a u v h branch p := by unfold markedPoissonKernel markedPoissonLaw rw [Kernel.prod_apply, Kernel.prod_apply, Kernel.prod_apply] rw [poissonKernelOfRealRate_apply _ (by cases branch <;> simp [treatedMass, branchMark] <;> fun_prop), poissonKernelOfRealRate_apply _ (by cases branch <;> simp [treatedMass, branchMark] <;> fun_prop), poissonKernelOfRealRate_apply _ (by simp [treatedMass] <;> fun_prop), poissonKernelOfRealRate_apply _ (by simp [controlMass, treatedMass] <;> fun_prop)] -
markedPoissonPredictive_isProbabilityMeasuretheorem — The one-coordinate marked-Poisson predictive law from a certificate with its node set and matching degree, at overlap, shift, intensities, support ratio, support bound, and branch, is a probability measure when the shift is positive, the support ratio is positive, and the certificate variation has the stated compact support.hypothesesι :Type*Fintype ιL :ℕε a u v κ B :ℝbranch :ha :0 < ahκ :0 < κhsupp :∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) BconclusionIsProbabilityMeasure (C.markedPoissonPredictive ε a u v branch)Proof (Lean source)
theorem markedPoissonPredictive_isProbabilityMeasure {ι : Type*} [Fintype ι] {L : ℕ} (C : NormalizedFiniteSignedMomentCertificate ι L) (ε a u v κ B : ℝ) (branch : Bool) (ha : 0 < a) (hκ : 0 < κ) (hsupp : ∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) B) : IsProbabilityMeasure (C.markedPoissonPredictive ε a u v branch) := by letI : IsProbabilityMeasure (C.zeroInflatedPrior a) := C.zeroInflatedPrior_isProbabilityMeasure a κ B ha hκ hsupp exact priorPredictive_isProbability (C.zeroInflatedPrior a) (markedPoissonKernel ε a u v C.polarSign C.measurable_polarSign branch) (fun p => by rw [markedPoissonKernel_apply] infer_instance) -
measurableSet_noLabeledTreatedtheorem — The event that no labeled treated observation occurs in either outcome mark is measurable.conclusionProof (Lean source)
theorem measurableSet_noLabeledTreated : MeasurableSet noLabeledTreated := by exact MeasurableSet.of_discrete -
restrict_markedPoissonPredictive_noLabeledTreated_eqtheorem — The two branch-specific predictive laws from a certificate with its node set and matching degree agree after restriction to the event with no labeled treated count, at every overlap, shift, and pair of intensities.hypothesesconclusionProof (Lean source)
theorem restrict_markedPoissonPredictive_noLabeledTreated_eq {ι : Type*} [Fintype ι] {L : ℕ} (C : NormalizedFiniteSignedMomentCertificate ι L) (ε a u v : ℝ) : (C.markedPoissonPredictive ε a u v false).restrict noLabeledTreated = (C.markedPoissonPredictive ε a u v true).restrict noLabeledTreated := by apply Measure.ext_of_singleton intro z rw [Measure.restrict_apply (measurableSet_singleton z), Measure.restrict_apply (measurableSet_singleton z)] by_cases hz : z ∈ noLabeledTreated · have hinter : {z} ∩ noLabeledTreated = {z} := Set.inter_eq_left.mpr (Set.singleton_subset_iff.mpr hz) rw [hinter] unfold markedPoissonPredictive rw [priorPredictive_apply _ _ (measurableSet_singleton z), priorPredictive_apply _ _ (measurableSet_singleton z)] apply lintegral_congr intro p rw [markedPoissonKernel_apply, markedPoissonKernel_apply] exact markedPoissonLaw_singleton_eq_of_noLabeledTreated ε a u v C.polarSign p z hz · have hinter : {z} ∩ noLabeledTreated = ∅ := Set.disjoint_iff_inter_eq_empty.mp (Set.disjoint_singleton_left.mpr hz) rw [hinter] simp -
measureReal_add_ennreal_smul_addtheorem — For an extended-nonnegative scaling coefficient that is finite, the real-valued mass of a measure plus that coefficient times the sum of two finite measures equals the corresponding sum of real-valued masses.hypothesesconclusion(μ + c • (ν + ξ)).real A = μ.real A + c.toReal * (ν.real A + ξ.real A)Proof (Lean source)
theorem measureReal_add_ennreal_smul_add {X : Type*} [MeasurableSpace X] (μ ν ξ : Measure X) [IsFiniteMeasure μ] [IsFiniteMeasure ν] [IsFiniteMeasure ξ] (c : ℝ≥0∞) (hc : c ≠ ∞) (A : Set X) : (μ + c • (ν + ξ)).real A = μ.real A + c.toReal * (ν.real A + ξ.real A) := by let _ : IsFiniteMeasure (c • (ν + ξ)) := Measure.smul_finite _ hc rw [MeasureTheory.measureReal_add_apply (μ₁ := μ) (μ₂ := c • (ν + ξ)), MeasureTheory.measureReal_ennreal_smul_apply, MeasureTheory.measureReal_add_apply (μ₁ := ν) (μ₂ := ξ)] -
palmSplitSubmeasure_univ_letheorem — The total mass of every Palm-split submeasure is at most one.hypothesesconclusionpalmSplitSubmeasure q first z univ ≤ 1Proof (Lean source)
theorem palmSplitSubmeasure_univ_le (q : unitInterval) (first : Bool) (z : AggregatePoissonObservation) : palmSplitSubmeasure q first z univ ≤ 1 := by rw [palmSplitSubmeasure, Measure.finsetSum_apply] simp only [Measure.smul_apply, Measure.dirac_apply_of_mem (Set.mem_univ _), smul_eq_mul, mul_one] calc ∑ k ∈ range (z.1 + 1), ofReal ((binomial z.1 q).real {k} * (1 / ((k : ℝ) + 1))) ≤ ∑ k ∈ range (z.1 + 1), (binomial z.1 q) {k} := by apply Finset.sum_le_sum intro k hk rw [← ENNReal.ofReal_toReal (measure_ne_top _ _), ← measureReal_def] apply ENNReal.ofReal_le_ofReal have hprob : 0 ≤ (binomial z.1 q).real {k} := measureReal_nonneg have hrecip : 1 / ((k : ℝ) + 1) ≤ 1 := (div_le_one (by positivity)).2 (by norm_num) nlinarith _ ≤ (binomial z.1 q) univ := by rw [sum_measure_singleton] exact measure_mono (Set.subset_univ _) _ = 1 := by simp -
palmSplitMeasure_isProbabilityMeasureinstance — For a splitting probability, a choice of labeled coordinate, and an aggregate Poisson observation, the corresponding Palm-split measure is a probability measure, because its total mass is one.parametersinstancegiven byby constructor rw [palmSplitMeasure, Measure.add_apply, Measure.smul_apply, Measure.dirac_apply_of_mem (Set.mem_univ _), smul_eq_mul, mul_one] exact add_tsub_cancel_of_le (palmSplitSubmeasure_univ_le q first z) -
palmSplitKernel_isMarkovKernelinstance — For a splitting probability and a choice of labeled coordinate, the Palm-split kernel is a Markov kernel, because every output Palm-split measure is a probability measure.parametersq :first :instancegiven byisProbabilityMeasure z := palmSplitMeasure_isProbabilityMeasure q first z -
palmSplit_bind_wrong_targettheorem — Applying the Palm-split kernel for the opposite labeled coordinate assigns zero real mass to the specified Palm-split target singleton.hypothesesq :first :k s t :ℕconclusionProof (Lean source)
theorem palmSplit_bind_wrong_target (q : unitInterval) (first : Bool) (ρ : Measure AggregatePoissonObservation) [IsProbabilityMeasure ρ] (k s t : ℕ) : (palmSplitKernel q (!first) ∘ₘ ρ).real {palmSplitTarget first k s t} = 0 := by rw [measureReal_def, Measure.bind_apply (measurableSet_singleton _) (by fun_prop)] simp_rw [show ∀ z, palmSplitKernel q (!first) z {palmSplitTarget first k s t} = 0 from fun z => palmSplitMeasure_wrong_target q first z k s t] simp -
palmSplit_bind_both_positivetheorem — A Palm-split kernel followed by any probability law assigns zero real mass to every singleton whose two labeled counts are both positive.hypothesesq :first :k l s t :ℕconclusion(palmSplitKernel q first ∘ₘ ρ).real {((k + 1, l + 1), (s, t))} = 0Proof (Lean source)
theorem palmSplit_bind_both_positive (q : unitInterval) (first : Bool) (ρ : Measure AggregatePoissonObservation) [IsProbabilityMeasure ρ] (k l s t : ℕ) : (palmSplitKernel q first ∘ₘ ρ).real {((k + 1, l + 1), (s, t))} = 0 := by rw [measureReal_def, Measure.bind_apply (measurableSet_singleton _) (by fun_prop)] simp_rw [show ∀ z, palmSplitKernel q first z {((k + 1, l + 1), (s, t))} = 0 from fun z => palmSplitMeasure_both_positive q first z k l s t] simp -
palmSplit_bind_no_labeled_eqtheorem — For a singleton with no labeled counts, the two Palm-split kernels followed by the same probability law assign equal real mass.hypothesesconclusionProof (Lean source)
theorem palmSplit_bind_no_labeled_eq (q : unitInterval) (ρ : Measure AggregatePoissonObservation) [IsProbabilityMeasure ρ] (s t : ℕ) : (palmSplitKernel q false ∘ₘ ρ).real {((0, 0), (s, t))} = (palmSplitKernel q true ∘ₘ ρ).real {((0, 0), (s, t))} := by rw [measureReal_def, measureReal_def, Measure.bind_apply (measurableSet_singleton _) (by fun_prop), Measure.bind_apply (measurableSet_singleton _) (by fun_prop)] apply congrArg toReal apply lintegral_congr intro z exact palmSplitMeasure_no_labeled_eq q z s t -
prod_real_singletontheorem — The real-valued mass that a product of two finite measures assigns to a singleton pair is the product of their respective singleton masses.hypothesesconclusion(μ.prod ν).real {(x, y)} = μ.real {x} * ν.real {y}Proof (Lean source)
theorem prod_real_singleton {X Y : Type*} [MeasurableSpace X] [MeasurableSpace Y] [MeasurableSingletonClass X] [MeasurableSingletonClass Y] (μ : Measure X) (ν : Measure Y) [IsFiniteMeasure μ] [IsFiniteMeasure ν] (x : X) (y : Y) : (μ.prod ν).real {(x, y)} = μ.real {x} * ν.real {y} := by rw [measureReal_def, ← Set.singleton_prod_singleton, Measure.prod_prod, ENNReal.toReal_mul, ← measureReal_def, ← measureReal_def] -
poisson_palmtheorem — If the Poisson rate is nonnegative and the shifted support point is positive, then the offset-weighted probability of count k+1 equals the stated size-biased multiple of the probability of count k.hypothesesε a u p :ℝhrate :0 ≤ u * (ε * (p + a))hpa :0 < p + ak :ℕconclusionProof (Lean source)
theorem poisson_palm (ε a u p : ℝ) (hrate : 0 ≤ u * (ε * (p + a))) (hpa : 0 < p + a) (k : ℕ) : a / (p + a) * (poissonMeasure (toNNReal (u * (ε * (p + a))))).real {k + 1} = (u * ε * a / ((k : ℝ) + 1)) * (poissonMeasure (toNNReal (u * (ε * (p + a))))).real {k} := by rw [poissonMeasure_real_singleton, poissonMeasure_real_singleton, Real.coe_toNNReal _ hrate, show k + 1 = succ k by omega, Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one, pow_succ] field_simp -
markedPoissonLaw_real_target_subtheorem — If the mark sign is either one or minus one, then the difference between the two branch-specific marked Poisson laws at a Palm-split target factors into the signed product of three Poisson singleton masses.hypothesesconclusion= (if first then -sign else sign) * (poissonMeasure (toNNReal (u * (ε * (p + a))))).real {k + 1} * (poissonMeasure (toNNReal (v * (ε * (p + a))))).real {s} * (poissonMeasure (toNNReal ((u + v) * controlMass ε a p))).real {t}Proof (Lean source)
theorem markedPoissonLaw_real_target_sub (ε a u v p sign : ℝ) (hsign : sign = 1 ∨ sign = -1) (first : Bool) (k s t : ℕ) : (markedPoissonLaw ε a u v (fun _ => sign) false p).real {palmSplitTarget first k s t} - (markedPoissonLaw ε a u v (fun _ => sign) true p).real {palmSplitTarget first k s t} = (if first then -sign else sign) * (poissonMeasure (toNNReal (u * (ε * (p + a))))).real {k + 1} * (poissonMeasure (toNNReal (v * (ε * (p + a))))).real {s} * (poissonMeasure (toNNReal ((u + v) * controlMass ε a p))).real {t} := by rcases hsign with rfl | rfl <;> cases first <;> simp [markedPoissonLaw, palmSplitTarget, branchMark, treatedMass, prod_real_singleton, poissonMeasure_real_singleton, zero_pow (by omega : 1 + k ≠ 0)] <;> ring
PredictiveIdentities 1 core · 2 supporting This module proves predictive identities for the four-count experiment defined in PalmSplit. ★ markedPredictive_real_target_sub
Predictive identities for label-gated marked-Poisson mixtures
This module proves predictive identities for the four-count experiment defined in
PalmSplit. It identifies the branch-sensitive singleton masses and relates the
marked predictive laws to aggregate Poisson mixtures.
For a finite latent index set, moment degree, and normalized moment-matching certificate, an overlap fraction, support ratio, positive shift, support bound, and labeled and auxiliary intensities, if the overlap fraction is positive and below one half, the support ratio has its required value, the shift is positive, both intensities are nonnegative with positive sum, and the signed prior is supported on the required interval, then for a selected branch and three count indices, the difference between the two marked prior-predictive singleton masses equals the signed Palm-split difference scaled by the labeled intensity, overlap, and shift.
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
markedPredictive_real_both_positive_sub_eq_zerotheorem — If the offset is positive, the scaling constant is positive, and the certificate's variation measure is supported on the stated interval, then the two marked predictive laws assign equal real mass to every singleton with both labeled counts positive.hypothesesProof (Lean source)
theorem markedPredictive_real_both_positive_sub_eq_zero {ι : Type*} [Fintype ι] {L : ℕ} (C : NormalizedFiniteSignedMomentCertificate ι L) (ε a u v κ B : ℝ) (ha : 0 < a) (hκ : 0 < κ) (hsupp : ∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) B) (k l s t : ℕ) : (C.markedPoissonPredictive ε a u v false).real {((k + 1, l + 1), (s, t))} - (C.markedPoissonPredictive ε a u v true).real {((k + 1, l + 1), (s, t))} = 0 := by rw [markedPredictive_real_singleton_sub C ε a u v κ B ha hκ hsupp] apply Finset.sum_eq_zero intro i hi by_cases hw : C.weight i = 0 · simp [hw] · have hsign : sign (C.weight i) = 1 ∨ sign (C.weight i) = -1 := (Real.sign_apply_eq_of_ne_zero _ hw).symm have hlaw (branch : Bool) : markedPoissonLaw ε a u v C.polarSign branch (C.node i) = markedPoissonLaw ε a u v (fun _ => sign (C.weight i)) branch (C.node i) := by unfold markedPoissonLaw rw [polarSign_node] rw [hlaw false, hlaw true] rcases hsign with hs | hs <;> rw [hs] <;> simp [markedPoissonLaw, branchMark, prod_real_singleton, poissonMeasure_real_singleton, zero_pow (by omega : k + 1 ≠ 0), zero_pow (by omega : l + 1 ≠ 0)] -
aggregatePoissonKernel_isMarkovKernelinstance — For a sampling scale, an offset, and an exposure, the aggregate Poisson kernel is a Markov kernel, because each of its output measures is a probability measure.parametersε a t :ℝinstancegiven byisProbabilityMeasure p := by rw [aggregatePoissonKernel_apply] infer_instance
Product 2 core · 2 supporting The one-coordinate experiment is tensorized over finitely many independent coordinates, and the reusable total-variation product inequality transfers the geometric one-coordinate estimate with the expected factor k. ★ markedPoissonProductPredictive_geometric_tv_le_of_one_coordinate_bound
Finite products of label-gated marked-Poisson mixtures
The one-coordinate experiment is tensorized over finitely many independent
coordinates, and the reusable total-variation product inequality transfers
the geometric one-coordinate estimate with the expected factor k.
The product marked-Poisson predictive measure takes the finite product of the one-coordinate predictive measure across the chosen coordinates. Its inputs are a finite signed certificate, the coordinate count, overlap, shift, labeled and auxiliary intensities, and an outcome-mark branch.
Definition (Lean source)
Given a finite signed certificate, a number of coordinates, an overlap parameter, a shift parameter, a labeled intensity, an auxiliary intensity, a support ratio, a support bound, a coefficient, and a power base, if the shift is positive, the support ratio is positive, the certificate variation has the stated support, and the one-coordinate geometric total-variation bound is assumed, then that assumed bound tensorizes over the coordinates with an extra factor k.
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
markedPoissonProductPredictive_isProbabilityMeasuretheorem — The independent product of the marked-Poisson predictive law is a probability measure, provided the scalar prior's support conditions hold: for a certificate, coordinate count, overlap, shift, intensities, support ratio, support bound and branch, if the shift is positive, the support ratio is positive, and the certificate's variation is almost surely supported in the interval from the shift-to-ratio quotient up to the bound, then the product law is a probability measure.hypothesesι :sharedType u_1L :sharedℕk :ℕε a u v κ B :ℝbranch :ha :0 < ahκ :0 < κhsupp :∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) BconclusionIsProbabilityMeasure (C.markedPoissonProductPredictive k ε a u v branch)Proof (Lean source)
theorem markedPoissonProductPredictive_isProbabilityMeasure (C : NormalizedFiniteSignedMomentCertificate ι L) (k : ℕ) (ε a u v κ B : ℝ) (branch : Bool) (ha : 0 < a) (hκ : 0 < κ) (hsupp : ∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) B) : IsProbabilityMeasure (C.markedPoissonProductPredictive k ε a u v branch) := by letI : IsProbabilityMeasure (C.markedPoissonPredictive ε a u v branch) := C.markedPoissonPredictive_isProbabilityMeasure ε a u v κ B branch ha hκ hsupp change IsProbabilityMeasure (Measure.pi fun _ : Fin k => C.markedPoissonPredictive ε a u v branch) exact inferInstance -
tvDist_markedPoissonProductPredictive_letheorem — A one-coordinate total-variation bound by a distance threshold tensorizes to the same bound times the number of independent coordinates for a certificate, coordinate count, and overlap, shift, intensity, and support parameters, provided the shift is positive, the support ratio is positive, and the certificate variation has the stated compact support.hypothesesι :sharedType u_1L :sharedℕk :ℕε a u v κ B δ :ℝha :0 < ahκ :0 < κhsupp :∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) BProof (Lean source)
theorem tvDist_markedPoissonProductPredictive_le (C : NormalizedFiniteSignedMomentCertificate ι L) (k : ℕ) (ε a u v κ B δ : ℝ) (ha : 0 < a) (hκ : 0 < κ) (hsupp : ∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) B) (hone : tvDist (C.markedPoissonPredictive ε a u v false) (C.markedPoissonPredictive ε a u v true) ≤ δ) : tvDist (C.markedPoissonProductPredictive k ε a u v false) (C.markedPoissonProductPredictive k ε a u v true) ≤ k * δ := by letI : IsProbabilityMeasure (C.markedPoissonPredictive ε a u v false) := C.markedPoissonPredictive_isProbabilityMeasure ε a u v κ B false ha hκ hsupp letI : IsProbabilityMeasure (C.markedPoissonPredictive ε a u v true) := C.markedPoissonPredictive_isProbabilityMeasure ε a u v κ B true ha hκ hsupp unfold markedPoissonProductPredictive calc tvDist (Measure.pi fun _ : Fin k => C.markedPoissonPredictive ε a u v false) (Measure.pi fun _ : Fin k => C.markedPoissonPredictive ε a u v true) ≤ k * tvDist (C.markedPoissonPredictive ε a u v false) (C.markedPoissonPredictive ε a u v true) := tvDist_pi_iid_le k _ _ _ ≤ k * δ := mul_le_mul_of_nonneg_left hone (Nat.cast_nonneg k)
TVBound 1 core · 1 supporting This module derives total-variation bounds for the four-count experiment defined in PalmSplit. ★ exists_geometric_markedPoisson_tv_bound
Total-variation bounds for label-gated marked-Poisson mixtures
This module derives total-variation bounds for the four-count experiment defined in
PalmSplit. It first reduces the marked-law discrepancy to an aggregate Poisson
mixture discrepancy, then combines that reduction with moment cancellation to obtain
a geometric prior-predictive bound.
If the overlap fraction is positive and below one half and the support ratio has the stated overlap-dependent value, there are positive constants and a decay factor strictly between zero and one that uniformly bound the one-coordinate marked-Poisson total-variation distance by a geometric term, whenever total intensity times the support bound is sufficiently small relative to the matching degree.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
tvDist_markedPoissonPredictive_le_palm_aggregatetheorem — For a finite signed certificate with its node set and matching degree, the total-variation discrepancy between the two marked predictive laws is at most the labeled Palm intensity times the discrepancy between the aggregate mixtures of its Jordan priors. This holds for overlap, support-ratio, shift, support-bound, and intensity parameters when overlap is positive, overlap is below one half, the support ratio has the stated value, the shift is positive, both intensities are nonnegative, their sum is positive, and the certificate variation has the stated support.hypothesesι :Type*Fintype ιL :ℕε κ a B u v :ℝhε :0 < εhεhalf :ε < 1 / 2hκ :κ = (1 - 2 * ε) / εha :0 < ahu :0 ≤ uhv :0 ≤ vht :0 < u + vhsupp :∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) Bconclusion≤ u * ε * a * tvDist (aggregatePoissonPredictive C.positivePrior ε a (u + v)) (aggregatePoissonPredictive C.negativePrior ε a (u + v))Proof (Lean source)
theorem tvDist_markedPoissonPredictive_le_palm_aggregate {ι : Type*} [Fintype ι] {L : ℕ} (C : NormalizedFiniteSignedMomentCertificate ι L) (ε κ a B u v : ℝ) (hε : 0 < ε) (hεhalf : ε < 1 / 2) (hκ : κ = (1 - 2 * ε) / ε) (ha : 0 < a) (hu : 0 ≤ u) (hv : 0 ≤ v) (ht : 0 < u + v) (hsupp : ∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) B) : tvDist (C.markedPoissonPredictive ε a u v false) (C.markedPoissonPredictive ε a u v true) ≤ u * ε * a * tvDist (aggregatePoissonPredictive C.positivePrior ε a (u + v)) (aggregatePoissonPredictive C.negativePrior ε a (u + v)) := by have hκpos : 0 < κ := by rw [hκ] apply div_pos · nlinarith · exact hε let q : unitInterval := ⟨u / (u + v), by constructor · positivity · rw [div_le_one ht] linarith⟩ let P := aggregatePoissonPredictive C.positivePrior ε a (u + v) let N := aggregatePoissonPredictive C.negativePrior ε a (u + v) let Kf := palmSplitKernel q true let Ks := palmSplitKernel q false let Mf := C.markedPoissonPredictive ε a u v false let Mt := C.markedPoissonPredictive ε a u v true let d : ℝ≥0∞ := ofReal (u * ε * a / 2) let _ : IsProbabilityMeasure P := priorPredictive_isProbability C.positivePrior (aggregatePoissonKernel ε a (u + v)) (fun p => by rw [aggregatePoissonKernel_apply]; infer_instance) let _ : IsProbabilityMeasure N := priorPredictive_isProbability C.negativePrior (aggregatePoissonKernel ε a (u + v)) (fun p => by rw [aggregatePoissonKernel_apply]; infer_instance) let _ : IsProbabilityMeasure Mf := C.markedPoissonPredictive_isProbabilityMeasure ε a u v κ B false ha hκpos hsupp let _ : IsProbabilityMeasure Mt := C.markedPoissonPredictive_isProbabilityMeasure ε a u v κ B true ha hκpos hsupp have hc : 0 ≤ u * ε * a := by positivity have hd : d.toReal = u * ε * a / 2 := by change (ofReal (u * ε * a / 2)).toReal = _ rw [ENNReal.toReal_ofReal] positivity let _ : IsFiniteMeasure (d • ((Kf ∘ₘ P) + (Ks ∘ₘ N))) := Measure.smul_finite _ (by simp [d]) let _ : IsFiniteMeasure (d • ((Kf ∘ₘ N) + (Ks ∘ₘ P))) := Measure.smul_finite _ (by simp [d]) let _ : IsFiniteMeasure (Mf + d • ((Kf ∘ₘ P) + (Ks ∘ₘ N))) := by infer_instance let _ : IsFiniteMeasure (Mt + d • ((Kf ∘ₘ N) + (Ks ∘ₘ P))) := by infer_instance have hbalance : Mf + d • ((Kf ∘ₘ P) + (Ks ∘ₘ N)) = Mt + d • ((Kf ∘ₘ N) + (Ks ∘ₘ P)) := by apply Measure.ext_of_measureReal_singleton rintro ⟨⟨x, y⟩, ⟨s, t⟩⟩ rw [measureReal_add_ennreal_smul_add Mf (Kf ∘ₘ P) (Ks ∘ₘ N) d (by simp [d]), measureReal_add_ennreal_smul_add Mt (Kf ∘ₘ N) (Ks ∘ₘ P) d (by simp [d])] rcases x with _ | k · rcases y with _ | l · have hm : Mf.real {((0, 0), (s, t))} = Mt.real {((0, 0), (s, t))} := by have hr := congrArg (fun μ : Measure MarkedPoissonObservation => μ.real {((0, 0), (s, t))}) (C.restrict_markedPoissonPredictive_noLabeledTreated_eq ε a u v) simpa [Mf, Mt, Measure.restrict_apply, noLabeledTreated] using hr have hp := palmSplit_bind_no_labeled_eq q P s t have hn := palmSplit_bind_no_labeled_eq q N s t change Mf.real {((0, 0), (s, t))} + d.toReal * ((Kf ∘ₘ P).real {((0, 0), (s, t))} + (Ks ∘ₘ N).real {((0, 0), (s, t))}) = Mt.real {((0, 0), (s, t))} + d.toReal * ((Kf ∘ₘ N).real {((0, 0), (s, t))} + (Ks ∘ₘ P).real {((0, 0), (s, t))}) change (palmSplitKernel q false ∘ₘ P).real {((0, 0), (s, t))} = (palmSplitKernel q true ∘ₘ P).real {((0, 0), (s, t))} at hp change (palmSplitKernel q false ∘ₘ N).real {((0, 0), (s, t))} = (palmSplitKernel q true ∘ₘ N).real {((0, 0), (s, t))} at hn rw [hm, ← hp, ← hn] ring · have hm := markedPredictive_real_target_sub C ε κ a B u v hε hεhalf hκ ha hu hv ht hsupp false l s t have hPf := palmSplit_bind_wrong_target q false P l s t have hNf := palmSplit_bind_wrong_target q false N l s t change Mf.real {palmSplitTarget false l s t} + d.toReal * ((Kf ∘ₘ P).real {palmSplitTarget false l s t} + (Ks ∘ₘ N).real {palmSplitTarget false l s t}) = Mt.real {palmSplitTarget false l s t} + d.toReal * ((Kf ∘ₘ N).real {palmSplitTarget false l s t} + (Ks ∘ₘ P).real {palmSplitTarget false l s t}) change Mf.real {palmSplitTarget false l s t} - Mt.real {palmSplitTarget false l s t} = _ at hm have hm' : Mf.real {palmSplitTarget false l s t} - Mt.real {palmSplitTarget false l s t} = (u * ε * a / 2) * ((Ks ∘ₘ P).real {palmSplitTarget false l s t} - (Ks ∘ₘ N).real {palmSplitTarget false l s t}) := by simpa [q, P, N, Ks, Mf, Mt] using hm change (Kf ∘ₘ P).real {palmSplitTarget false l s t} = 0 at hPf change (Kf ∘ₘ N).real {palmSplitTarget false l s t} = 0 at hNf rw [hPf, hNf, hd] nlinarith [hm'] · rcases y with _ | l · have hm := markedPredictive_real_target_sub C ε κ a B u v hε hεhalf hκ ha hu hv ht hsupp true k s t have hPs := palmSplit_bind_wrong_target q true P k s t have hNs := palmSplit_bind_wrong_target q true N k s t change Mf.real {palmSplitTarget true k s t} + d.toReal * ((Kf ∘ₘ P).real {palmSplitTarget true k s t} + (Ks ∘ₘ N).real {palmSplitTarget true k s t}) = Mt.real {palmSplitTarget true k s t} + d.toReal * ((Kf ∘ₘ N).real {palmSplitTarget true k s t} + (Ks ∘ₘ P).real {palmSplitTarget true k s t}) change Mf.real {palmSplitTarget true k s t} - Mt.real {palmSplitTarget true k s t} = _ at hm have hm' : Mf.real {palmSplitTarget true k s t} - Mt.real {palmSplitTarget true k s t} = -(u * ε * a / 2) * ((Kf ∘ₘ P).real {palmSplitTarget true k s t} - (Kf ∘ₘ N).real {palmSplitTarget true k s t}) := by simpa [q, P, N, Kf, Mf, Mt] using hm change (Ks ∘ₘ P).real {palmSplitTarget true k s t} = 0 at hPs change (Ks ∘ₘ N).real {palmSplitTarget true k s t} = 0 at hNs rw [hPs, hNs, hd] nlinarith [hm'] · have hm := markedPredictive_real_both_positive_sub_eq_zero C ε a u v κ B ha hκpos hsupp k l s t have hPf := palmSplit_bind_both_positive q true P k l s t have hNf := palmSplit_bind_both_positive q true N k l s t have hPs := palmSplit_bind_both_positive q false P k l s t have hNs := palmSplit_bind_both_positive q false N k l s t change Mf.real {((k + 1, l + 1), (s, t))} + d.toReal * ((Kf ∘ₘ P).real {((k + 1, l + 1), (s, t))} + (Ks ∘ₘ N).real {((k + 1, l + 1), (s, t))}) = Mt.real {((k + 1, l + 1), (s, t))} + d.toReal * ((Kf ∘ₘ N).real {((k + 1, l + 1), (s, t))} + (Ks ∘ₘ P).real {((k + 1, l + 1), (s, t))}) change Mf.real {((k + 1, l + 1), (s, t))} - Mt.real {((k + 1, l + 1), (s, t))} = 0 at hm change (Kf ∘ₘ P).real {((k + 1, l + 1), (s, t))} = 0 at hPf change (Kf ∘ₘ N).real {((k + 1, l + 1), (s, t))} = 0 at hNf change (Ks ∘ₘ P).real {((k + 1, l + 1), (s, t))} = 0 at hPs change (Ks ∘ₘ N).real {((k + 1, l + 1), (s, t))} = 0 at hNs rw [hPf, hNf, hPs, hNs] linarith change tvDist Mf Mt ≤ u * ε * a * tvDist P N unfold tvDist apply ciSup_le rintro ⟨A, hA⟩ have hb := congrArg (fun μ : Measure MarkedPoissonObservation => μ.real A) hbalance rw [measureReal_add_ennreal_smul_add Mf (Kf ∘ₘ P) (Ks ∘ₘ N) d (by simp [d]), measureReal_add_ennreal_smul_add Mt (Kf ∘ₘ N) (Ks ∘ₘ P) d (by simp [d])] at hb have hf : |(Kf ∘ₘ P).real A - (Kf ∘ₘ N).real A| ≤ tvDist P N := (abs_measureReal_sub_le_tvDist hA).trans (tvDist_bind_le P N Kf) have hs : |(Ks ∘ₘ P).real A - (Ks ∘ₘ N).real A| ≤ tvDist P N := (abs_measureReal_sub_le_tvDist hA).trans (tvDist_bind_le P N Ks) have hdnonneg : 0 ≤ d.toReal := ENNReal.toReal_nonneg rw [hd] at hb hdnonneg calc |Mf.real A - Mt.real A| = (u * ε * a / 2) * |((Ks ∘ₘ P).real A - (Ks ∘ₘ N).real A) - ((Kf ∘ₘ P).real A - (Kf ∘ₘ N).real A)| := by rw [← abs_of_nonneg (by positivity : 0 ≤ u * ε * a / 2), ← abs_mul] congr 1 linarith _ ≤ (u * ε * a / 2) * (|(Ks ∘ₘ P).real A - (Ks ∘ₘ N).real A| + |(Kf ∘ₘ P).real A - (Kf ∘ₘ N).real A|) := by gcongr exact abs_sub _ _ _ ≤ u * ε * a * tvDist P N := by nlinarith
ZeroInflated 5 core · 8 supporting The variation probability is tilted by a / (p + a) and the missing mass is placed at zero. ★ integral_id_zeroInflatedPrior★ integral_sq_zeroInflatedPrior_le★ variance_sum_zeroInflatedProductPrior
Zero-inflated priors from finite signed certificates
The variation probability is tilted by a / (p + a) and the missing mass is
placed at zero. This file records support, moment, and finite i.i.d.-product
identities used by rare-cell constructions.
The zero-inflated prior measure reweights a certificate's variation measure by the nonnegative part of the shift-to-shifted-mass ratio and places at zero the nonnegative part of one minus the integral of that ratio. It is defined from a finite signed certificate and a shift parameter.
Definition (Lean source)
For a finite signed moment certificate, a positive shift, a positive support ratio, a support upper bound, and variation supported on the corresponding compact interval, the zero-inflated prior's first moment equals the shift times the variation expectation of the tilted coordinate.
Formal statement
Proof (Lean source)
For a finite signed moment certificate, a positive shift, a positive support ratio, a support upper bound, and variation supported on the corresponding compact interval, the zero-inflated prior's second moment is at most the support upper bound times its first moment.
Formal statement
Proof (Lean source)
The finite-product zero-inflated prior measure takes the product of the scalar zero-inflated prior measures across the coordinates. It is built from a finite signed certificate, a shift parameter, and a coordinate count.
Definition (Lean source)
The sum over the finite product coordinates from a finite signed certificate has variance equal to the coordinate count times the scalar zero-inflated variance when the shift is positive, the support ratio is positive, and the variation measure has the stated support bound.
Formal statement
Proof (Lean source)
8 supporting declarations (lemmas, instances)
-
zeroInflatedPrior_isProbabilityMeasuretheorem — The zero-inflated prior from a finite signed certificate is a probability measure when the shift is positive, the support ratio is positive, and the certificate variation is supported between the resulting lower endpoint and the support bound.hypothesesι :sharedType u_1L :sharedℕa κ B :ℝha :0 < ahκ :0 < κhsupp :∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) BconclusionIsProbabilityMeasure (C.zeroInflatedPrior a)Proof (Lean source)
theorem zeroInflatedPrior_isProbabilityMeasure (C : NormalizedFiniteSignedMomentCertificate ι L) (a κ B : ℝ) (ha : 0 < a) (hκ : 0 < κ) (hsupp : ∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) B) : IsProbabilityMeasure (C.zeroInflatedPrior a) := by let q := ∫ p, a / (p + a) ∂C.signedMeasure.variation have hq0 : 0 ≤ q := integral_nonneg_of_ae (tilt_nonneg_ae C a κ B ha hκ hsupp) have hq1 : q ≤ 1 := by simpa [q] using integral_mono_ae (integrable_tilt C a κ B ha hκ hsupp) (integrable_const 1) (tilt_le_one_ae C a κ B ha hκ hsupp) constructor rw [zeroInflatedPrior, Measure.add_apply, withDensity_apply _ MeasurableSet.univ, Measure.smul_apply, Measure.dirac_apply_of_mem (Set.mem_univ 0), smul_eq_mul, mul_one, setLIntegral_univ, ← ofReal_integral_eq_lintegral_ofReal (integrable_tilt C a κ B ha hκ hsupp) (tilt_nonneg_ae C a κ B ha hκ hsupp)] change ofReal q + ofReal (1 - q) = 1 rw [← ENNReal.ofReal_add hq0 (sub_nonneg.mpr hq1)] simp -
zeroInflatedPrior_supporttheorem — The zero-inflated prior from a finite signed certificate is supported on zero together with the certificate's compact support interval for a shift and a support ratio, when the variation measure is supported in the stated interval.hypothesesι :sharedType u_1L :sharedℕa κ B :ℝhsupp :∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) Bconclusion∀ᵐ p ∂C.zeroInflatedPrior a, p = 0 ∨ p ∈ Icc (a / κ) BProof (Lean source)
theorem zeroInflatedPrior_support (C : NormalizedFiniteSignedMomentCertificate ι L) (a κ B : ℝ) (hsupp : ∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) B) : ∀ᵐ p ∂C.zeroInflatedPrior a, p = 0 ∨ p ∈ Icc (a / κ) B := by rw [zeroInflatedPrior, ae_add_measure_iff] constructor · exact (withDensity_absolutelyContinuous _ _).ae_le (hsupp.mono fun p hp => inr hp) · apply Measure.ae_smul_measure rw [ae_dirac_iff] · exact inl rfl · exact (measurableSet_singleton 0).union (measurableSet_Icc) -
zeroInflatedProductPrior_isProbabilityMeasuretheorem — The finite-coordinate product of the zero-inflated prior from a finite signed certificate is a probability measure when the shift is positive, the support ratio is positive, and the certificate variation has the stated support bound.hypothesesι :sharedType u_1L :sharedℕa κ B :ℝk :ℕha :0 < ahκ :0 < κhsupp :∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) BconclusionIsProbabilityMeasure (C.zeroInflatedProductPrior a k)Proof (Lean source)
theorem zeroInflatedProductPrior_isProbabilityMeasure (C : NormalizedFiniteSignedMomentCertificate ι L) (a κ B : ℝ) (k : ℕ) (ha : 0 < a) (hκ : 0 < κ) (hsupp : ∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) B) : IsProbabilityMeasure (C.zeroInflatedProductPrior a k) := by letI : IsProbabilityMeasure (C.zeroInflatedPrior a) := zeroInflatedPrior_isProbabilityMeasure C a κ B ha hκ hsupp change IsProbabilityMeasure (Measure.pi fun _ : Fin k => C.zeroInflatedPrior a) exact inferInstance -
zeroInflatedProductPrior_supporttheorem — Every coordinate in the finite product of the zero-inflated prior from a finite signed certificate lies almost surely at zero or in the certificate's compact support interval when the shift is positive, the support ratio is positive, and the variation measure has the stated support bound.hypothesesι :sharedType u_1L :sharedℕa κ B :ℝk :ℕha :0 < ahκ :0 < κhsupp :∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) Bconclusion∀ᵐ w ∂C.zeroInflatedProductPrior a k, ∀ i, w i = 0 ∨ w i ∈ Icc (a / κ) BProof (Lean source)
theorem zeroInflatedProductPrior_support (C : NormalizedFiniteSignedMomentCertificate ι L) (a κ B : ℝ) (k : ℕ) (ha : 0 < a) (hκ : 0 < κ) (hsupp : ∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) B) : ∀ᵐ w ∂C.zeroInflatedProductPrior a k, ∀ i, w i = 0 ∨ w i ∈ Icc (a / κ) B := by letI : IsProbabilityMeasure (C.zeroInflatedPrior a) := zeroInflatedPrior_isProbabilityMeasure C a κ B ha hκ hsupp rw [zeroInflatedProductPrior, ae_all_iff] intro i exact (Measure.tendsto_eval_ae_ae (μ := fun _ : Fin k => C.zeroInflatedPrior a)).eventually (zeroInflatedPrior_support C a κ B hsupp) -
integral_coordinate_zeroInflatedProductPriortheorem — A selected coordinate of the finite product from a finite signed certificate has the scalar zero-inflated first moment when the shift is positive, the support ratio is positive, and the variation measure has the stated support bound.hypothesesι :sharedType u_1L :sharedℕa κ B :ℝk :ℕi :Fin kha :0 < ahκ :0 < κhsupp :∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) Bconclusion∫ w, w i ∂C.zeroInflatedProductPrior a k = a * ∫ p, p / (p + a) ∂C.signedMeasure.variationProof (Lean source)
theorem integral_coordinate_zeroInflatedProductPrior (C : NormalizedFiniteSignedMomentCertificate ι L) (a κ B : ℝ) (k : ℕ) (i : Fin k) (ha : 0 < a) (hκ : 0 < κ) (hsupp : ∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) B) : ∫ w, w i ∂C.zeroInflatedProductPrior a k = a * ∫ p, p / (p + a) ∂C.signedMeasure.variation := by letI : IsProbabilityMeasure (C.zeroInflatedPrior a) := zeroInflatedPrior_isProbabilityMeasure C a κ B ha hκ hsupp rw [zeroInflatedProductPrior, integral_comp_eval (μ := fun _ : Fin k => C.zeroInflatedPrior a) (f := fun p : ℝ => p) measurable_id.aestronglyMeasurable] exact integral_id_zeroInflatedPrior C a κ B ha hκ hsupp -
integral_coordinate_sq_zeroInflatedProductPriortheorem — A selected coordinate of the finite product from a finite signed certificate has the scalar zero-inflated second moment when the shift is positive, the support ratio is positive, and the variation measure has the stated support bound.hypothesesι :sharedType u_1L :sharedℕa κ B :ℝk :ℕi :Fin kha :0 < ahκ :0 < κhsupp :∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) Bconclusion∫ w, (w i) ^ 2 ∂C.zeroInflatedProductPrior a k = ∫ p, p ^ 2 ∂C.zeroInflatedPrior aProof (Lean source)
theorem integral_coordinate_sq_zeroInflatedProductPrior (C : NormalizedFiniteSignedMomentCertificate ι L) (a κ B : ℝ) (k : ℕ) (i : Fin k) (ha : 0 < a) (hκ : 0 < κ) (hsupp : ∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) B) : ∫ w, (w i) ^ 2 ∂C.zeroInflatedProductPrior a k = ∫ p, p ^ 2 ∂C.zeroInflatedPrior a := by letI : IsProbabilityMeasure (C.zeroInflatedPrior a) := zeroInflatedPrior_isProbabilityMeasure C a κ B ha hκ hsupp rw [zeroInflatedProductPrior, integral_comp_eval (μ := fun _ : Fin k => C.zeroInflatedPrior a) (f := fun p : ℝ => p ^ 2) (measurable_id.pow_const 2).aestronglyMeasurable] -
variance_coordinate_zeroInflatedProductPriortheorem — A selected coordinate of the finite product from a finite signed certificate has the same variance as the scalar zero-inflated prior when the shift is positive, the support ratio is positive, and the variation measure has the stated support bound.hypothesesProof (Lean source)
theorem variance_coordinate_zeroInflatedProductPrior (C : NormalizedFiniteSignedMomentCertificate ι L) (a κ B : ℝ) (k : ℕ) (i : Fin k) (ha : 0 < a) (hκ : 0 < κ) (hsupp : ∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) B) : variance (fun w : Fin k → ℝ => w i) (C.zeroInflatedProductPrior a k) = variance id (C.zeroInflatedPrior a) := by letI : IsProbabilityMeasure (C.zeroInflatedPrior a) := zeroInflatedPrior_isProbabilityMeasure C a κ B ha hκ hsupp change variance (id ∘ Function.eval i) (Measure.pi fun _ : Fin k => C.zeroInflatedPrior a) = variance id (C.zeroInflatedPrior a) calc _ = variance id (Measure.map (Function.eval i) (Measure.pi fun _ : Fin k => C.zeroInflatedPrior a)) := (variance_map measurable_id.aemeasurable (measurable_pi_apply i).aemeasurable).symm _ = variance id (C.zeroInflatedPrior a) := by rw [(measurePreserving_eval (fun _ : Fin k => C.zeroInflatedPrior a) i).map_eq] -
integral_sum_zeroInflatedProductPriortheorem — The sum over the finite product coordinates from a finite signed certificate has expectation equal to the coordinate count times the scalar zero-inflated first moment when the shift is positive, the support ratio is positive, and the variation measure has the stated support bound.hypothesesι :sharedType u_1L :sharedℕa κ B :ℝk :ℕha :0 < ahκ :0 < κhsupp :∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) Bconclusion∫ w, ∑ i, w i ∂C.zeroInflatedProductPrior a k= k * (a * ∫ p, p / (p + a) ∂C.signedMeasure.variation)Proof (Lean source)
theorem integral_sum_zeroInflatedProductPrior (C : NormalizedFiniteSignedMomentCertificate ι L) (a κ B : ℝ) (k : ℕ) (ha : 0 < a) (hκ : 0 < κ) (hsupp : ∀ᵐ p ∂C.signedMeasure.variation, p ∈ Icc (a / κ) B) : ∫ w, ∑ i, w i ∂C.zeroInflatedProductPrior a k = k * (a * ∫ p, p / (p + a) ∂C.signedMeasure.variation) := by letI : IsProbabilityMeasure (C.zeroInflatedPrior a) := zeroInflatedPrior_isProbabilityMeasure C a κ B ha hκ hsupp rw [zeroInflatedProductPrior] calc (∫ w, ∑ i, w i ∂Measure.pi fun _ : Fin k => C.zeroInflatedPrior a) = ∑ i, ∫ w, w i ∂Measure.pi fun _ : Fin k => C.zeroInflatedPrior a := by simpa using (integral_finsetSum univ (μ := Measure.pi fun _ : Fin k => C.zeroInflatedPrior a) (f := fun (i : Fin k) (w : Fin k → ℝ) => w i) (fun i _ => integrable_comp_eval (μ := fun _ : Fin k => C.zeroInflatedPrior a) (integrable_id_zeroInflatedPrior C a κ B ha hκ hsupp))) _ = k * (a * ∫ p, p / (p + a) ∂C.signedMeasure.variation) := by simp_rw [integral_comp_eval (μ := fun _ : Fin k => C.zeroInflatedPrior a) (f := fun p : ℝ => p) measurable_id.aestronglyMeasurable, integral_id_zeroInflatedPrior C a κ B ha hκ hsupp, Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul]