math / data /lean /OAI /Combinatorics /ExpectationThreshold /SelectorEntropyDyadic.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
1.15 kB
import Mathlib.Basic.Real.Basic
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.Ring
namespace OAI
/-!
# Finite dyadic mass for the selector entropy estimate
The positive dyadic levels have total mass at most one, including when there
are no levels.
-/
open scoped BigOperators
namespace TalagrandThreshold
private lemma selector_dyadic_range_sum (s : β„•) :
(βˆ‘ i ∈ Finset.range s, (1 / 2 : ℝ) ^ (i + 1)) = 1 - (1 / 2 : ℝ) ^ s := by
induction s with
| zero => simp
| succ s ih =>
rw [Finset.sum_range_succ, ih]
simp only [pow_succ]
ring
/-- The dyadic weights of all positive selector levels sum to at most one. -/
theorem selector_dyadic_sum_le_one (s : β„•) :
(βˆ‘ i : Fin s, (1 / 2 : ℝ) ^ (i.val + 1)) ≀ 1 := by
calc
(βˆ‘ i : Fin s, (1 / 2 : ℝ) ^ (i.val + 1)) =
βˆ‘ i ∈ Finset.range s, (1 / 2 : ℝ) ^ (i + 1) :=
Fin.sum_univ_eq_sum_range (fun i : β„• => (1 / 2 : ℝ) ^ (i + 1)) s
_ = 1 - (1 / 2 : ℝ) ^ s := selector_dyadic_range_sum s
_ ≀ 1 := sub_le_self _ (pow_nonneg (by norm_num) s)
end TalagrandThreshold
end OAI