AFTD Auto-Formalizing Theoretical Domains

truncated_geometric_distribution

def

The truncated geometric distribution T_{L, k}(s) with base parameter a, shift L ∈ ℤ, and length k ∈ ℕ is defined as (1 - a) * a^(s - L) / (1 - a^k) for L ≤ s < L + k, and 0 otherwise.

Statement

noncomputable def truncated_geometric_distribution (a : ℝ) (L : ℤ) (k : ℕ) (s : ℤ) : ℝ
Source
step towards biased_bit_optimal_mask_unique
Verified
16 Nov 2026
Axioms
none listed

Lean source view module on GitHub

/-- The truncated geometric distribution T_{L, k}(s) with base parameter a, shift L ∈ ℤ, and length k ∈ ℕ is defined as (1 - a) * a^(s - L) / (1 - a^k) for L ≤ s < L + k, and 0 otherwise. -/
noncomputable def truncated_geometric_distribution (a : ℝ) (L : ℤ) (k : ℕ) (s : ℤ) : ℝ := if L ≤ s ∧ s < L + k then (1 - a) * a ^ (s - L) / (1 - a ^ k) else 0
See it in the graphDiscuss this resultChallenge it