shifted_geometric_distribution_hasSum
lemmaverified
For any parameter 0 ≤ a < 1 and shift L ∈ ℤ, the shifted geometric distribution G_L has sum 1 over ℤ.
Statement
lemma shifted_geometric_distribution_hasSum {a : ℝ} (ha0 : 0 ≤ a) (ha1 : a < 1) (L : ℤ) :
HasSum (shifted_geometric_distribution a L) 1- Source
- arXiv:2611.16066, Theorem 5.1
- Verified
- 13 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 3
- shifted_geometric_distributionThe shifted geometric distribution G_L(s) with base parameter a supported on s ≥ L is equal to (1 - a) * a^(s - L) for s ≥ L and 0…
- LinearOrder.toTotalPreorderEvery
LinearOrderis aTotalPreorder. - TotalPreorderA total preorder: a preorder where
≤is total (complete). This is weaker thanLinearOrder— it does NOT require antisymmetry or…
Read back from the Lean
For every real number $a$ such that $0 \le a$ and $a < 1$, and for every integer $L$, the function shifted_geometric_distribution a L (viewed as a function $\mathbb{Z} \to \mathbb{R}$) is summable over $\mathbb{Z}$ with sum equal to $1$ (in the sense of Mathlib's HasSum).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- The shifted geometric distribution G_L has total probability mass 1 when 0 ≤ a < 1. -/ lemma shifted_geometric_distribution_hasSum {a : ℝ} (ha0 : 0 ≤ a) (ha1 : a < 1) (L : ℤ) : HasSum (shifted_geometric_distribution a L) 1 := by let f : ℤ → ℝ := shifted_geometric_distribution a L let e : ℕ ≃ {s : ℤ // L ≤ s} := { toFun := fun n => ⟨L + n, by omega⟩ invFun := fun s => (s.1 - L).toNat left_inv := by intro n show ((L + (n : ℤ) - L).toNat : ℕ) = n have h : L + (n : ℤ) - L = (n : ℤ) := by omega rw [h, Int.toNat_natCast] right_inv := by intro s apply Subtype.ext show L + ((s.1 - L).toNat : ℕ) = s.1 have h : 0 ≤ s.1 - L := sub_nonneg.mpr s.2 rw [Int.toNat_of_nonneg h] omega } have hsupp : Function.support f ⊆ Set.Ici L := by intro x hx by_contra hxL have hxL' : ¬ L ≤ x := by simpa using hxL exact hx (by simp [f, shifted_geometric_distribution, hxL']) have hcomp : (fun n : ℕ => (f ∘ Subtype.val) (e n)) = fun n : ℕ => (1 - a) * a ^ n := by funext n simp [f, shifted_geometric_distribution, e] have hgeom : HasSum (fun n : ℕ => (1 - a) * a ^ n) 1 := by have hgeom : HasSum (fun n : ℕ => a ^ n) (1 - a)⁻¹ := hasSum_geometric_of_lt_one ha0 ha1 have hne : (1 : ℝ) - a ≠ 0 := by linarith simpa [hne] using hgeom.mul_left (1 - a) have hcomp_sum : HasSum (fun n : ℕ => (f ∘ Subtype.val) (e n)) 1 := by rw [hcomp] exact hgeom have hsub : HasSum (f ∘ Subtype.val) 1 := (Equiv.hasSum_iff e).mp hcomp_sum have hmain : HasSum f 1 := (hasSum_subtype_iff_of_support_subset hsupp).mp hsub simpa [f] using hmain