AFTD Auto-Formalizing Theoretical Domains

energy_filter_centered_binomial_weight

deforiginal

For a natural k and integer s, the centered binomial weight is the real ratio choose(2k,k+s)/choose(2k,k) when −k ≤ s ≤ k, and is zero outside that interval; the integer index k+s is converted to a natural only within the interval.

Statement

noncomputable def energy_filter_centered_binomial_weight (k : ℕ) (s : ℤ) : ℝ
Related work
Zero-extended centered binomial weights for OP-892; experiment 26245.
Verified
13 Nov 2026
Axioms
none listed
Used by 22

Read back from the Lean

The definition energy_filter_centered_binomial_weight takes a natural number k : ℕ and an integer s : ℤ, and returns a real number defined by cases: if -(k : ℤ) ≤ s and s ≤ (k : ℤ), it is the ratio of binomial coefficients ((2 * k).choose (k + s).toNat : ℝ) / ((2 * k).choose k : ℝ); otherwise, it is 0.

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

noncomputable def energy_filter_centered_binomial_weight (k : ℕ) (s : ℤ) : ℝ := if -(k : ℤ) ≤ s ∧ s ≤ (k : ℤ) then (Nat.choose (2 * k) ((k : ℤ) + s).toNat : ℝ) / (Nat.choose (2 * k) k : ℝ) else 0
See it in the graphDiscuss this resultChallenge it