two_point_mask
def
Given 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.
Statement
def two_point_mask (c : ℝ) : ℤ → ℝ- Defined in
- arXiv:2611.16066, Theorem 5.5
- Verified
- 13 Nov 2026
- Axioms
- none listed
- Used by 3
- two_point_mask_vulnerabilityFor real numbers p and c satisfying 1 / 2 < p, p < 1, 0 ≤ c, and c ≤ 1 - p, biased_bit_vulnerability p (two_point_mask c) = 1 - p * c.
- 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…
- two_point_mask_momentFor any real number c satisfying 0 ≤ c and c ≤ 1, the sum ∑' s : ℤ, |(s : ℝ)| * two_point_mask c s equals c.
Read back from the Lean
Definition of two_point_mask: given a real number c, it defines a function from ℤ to ℝ that maps an integer s to 1 - c if s = 0, to c if s = 1, and to 0 otherwise.
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 two-point probability mass function from ℤ to ℝ assigning mass 1 - c to 0 and c to 1. -/ def two_point_mask (c : ℝ) : ℤ → ℝ := fun s => if s = 0 then 1 - c else if s = 1 then c else 0