two_point_mask_moment
For any real number c satisfying 0 ≤ c and c ≤ 1, the sum ∑' s : ℤ, |(s : ℝ)| * two_point_mask c s equals c.
Statement
theorem two_point_mask_moment (c : ℝ) (hc0 : 0 ≤ c) (hc1 : c ≤ 1) : (∑' s : ℤ, |(s : ℝ)| * two_point_mask c s) = c- Source
- arXiv:2611.16066, Theorem 5.5
- Verified
- 14 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- two_point_maskGiven a real parameter c, two_point_mask c is the function from ℤ to ℝ mapping 0 to 1 - c, 1 to c, and all other integers to 0.
- Used by 1
- biased_bit_cost_vulnerability_initial_segmentFor real numbers p and c satisfying 1 / 2 < p, p < 1, 0 ≤ c, and c ≤ 1 - p, the optimal vulnerability biased_bit_optimal_vulnerability p c…
Read back from the Lean
For every real number $c$, given hypotheses that $0 \le c$ and $c \le 1$, the infinite sum (tsum) over all integers $s \in \mathbb{Z}$ of $|(s : \mathbb{R})| \cdot \text{two\_point\_mask}(c)(s)$ equals $c$.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
The proof computes the absolute first moment of two_point_mask by showing that the summand vanishes for all integers outside {0, 1}. This allows the infinite series to be reduced via tsum_eq_sum to a two-term finite sum over {0, 1}. Evaluating the mask at 0 and 1 gives 0 * (1 - c) + 1 * c, which simplifies directly to c.
For any integer s ∉ {0, 1}, the term |(s : ℝ)| * two_point_mask c s equals 0.
Given an integer s outside {0, 1}, we simplify s ∉ {0, 1} to ¬(s = 0) ∧ ¬(s = 1) using Finset.mem_insert, Finset.mem_singleton, and not_or. Unfolding two_point_mask shows that it is defined piecewise as 1 - c at 0, c at 1, and 0 elsewhere. Since s is neither 0 nor 1, the mask evaluates to 0, so the product |s| * 0 vanishes.
uses
Finset.mem_insert,Finset.mem_singleton,not_orhave h : ∀ s ∉ ({0, 1} : Finset ℤ), |(s : ℝ)| * two_point_mask c s = 0 := by intro s hs simp only [Finset.mem_insert, Finset.mem_singleton, not_or] at hs unfold two_point_mask simp [hs.1, hs.2]
The infinite sum over ℤ equals the finite sum over {0, 1}.
Because all terms outside the finite set {0, 1} are zero by the previous step, tsum_eq_sum reduces the infinite series ∑' s : ℤ, |s| * two_point_mask c s to the finite sum ∑ b ∈ {0, 1}, |b| * two_point_mask c b.
uses
tsum_eq_sumrw [tsum_eq_sum h]The finite sum over {0, 1} simplifies to c.
Evaluating the finite sum: for s = 0, the term is |0| * (1 - c) = 0; for s = 1, the term is |1| * c = c. The sum 0 + c simplifies to c.
simp [two_point_mask]
tsum_eq_sum- If a function on a topological additive monoid is zero outside a finite set s, its infinite sum equals the finite sum over s.
Finset.mem_insert- An element a is in insert b s if and only if a = b or a ∈ s.
Finset.mem_singleton- An element b is in the singleton {a} if and only if b = a.
not_or- The negation of p ∨ q is logically equivalent to ¬p ∧ ¬q.
- The hypotheses 0 ≤ c (hc0) and c ≤ 1 (hc1) are not used in the proof; the identity holds algebraically for all real c.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- The absolute first moment of the two-point mask (1 - c) δ_0 + c δ_1 is c. -/theorem two_point_mask_moment (c : ℝ) (hc0 : 0 ≤ c) (hc1 : c ≤ 1) : (∑' s : ℤ, |(s : ℝ)| * two_point_mask c s) = c := by have h : ∀ s ∉ ({0, 1} : Finset ℤ), |(s : ℝ)| * two_point_mask c s = 0 := by intro s hs simp only [Finset.mem_insert, Finset.mem_singleton, not_or] at hs unfold two_point_mask simp [hs.1, hs.2] rw [tsum_eq_sum h] simp [two_point_mask]