Exact Lean source
Nonadditivity.HaarSharpConstants
Download original .lean · View on GitHub · Jump to source
Direct imports
Nonadditivity.HaarMomentConstantsMathlib.Tactic.IntervalCasesdependency
Imported by project modules
2 direct reverse imports
Relationships above come from literal import commands. The declarations below link to types and references extracted from Lean’s environment. Source text is complete and unchanged.
Declarations in this module
3 project constants, including generated, internal and private declarations.
3 declarations
Nonadditivity.HaarSharpConstants.polynomial_prefactor_boundNonadditivity.HaarSharpConstants.polynomial_prefactor_bound._proof_1_1internal/detail/privateNonadditivity.HaarSharpConstants.sharp_final_error_bound
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarMomentConstants7import Mathlib.Tactic.IntervalCases89/-! # The sharp scalar budget at the original Haar dimension threshold1011The polynomial prefactor is bounded uniformly for every integer moment12order at least two. Together with the original square-root dimension13budget this yields the final inverse-square-root error without increasing14the prescribed constant `2^32`.15-/1617noncomputable section18namespace Nonadditivity.HaarSharpConstants1920set_option maxHeartbeats 0 in21/-- A uniform bound on the moment-order prefactor. The finite initial range22is checked by exact rational arithmetic; the tail uses `exp 1 < 3`. -/23theorem polynomial_prefactor_bound (p : ℕ) (hp : 2 ≤ p) :24(1 + 64 / (p : ℝ)) ^ p ≤ 16 * (p : ℝ) ^ 14 := by25by_cases hlarge : 128 ≤ p26· have hp0 : (0 : ℝ) < p := by exact_mod_cast (lt_of_lt_of_le (by norm_num : 0 < 2) hp)27have hbase : 1 + 64 / (p : ℝ) ≤ Real.exp (64 / (p : ℝ)) := by28simpa only [add_comm] using Real.add_one_le_exp (64 / (p : ℝ))29have hpow := pow_le_pow_left₀ (show 0 ≤ 1 + 64 / (p : ℝ) by positivity) hbase p30have hexp : (Real.exp (64 / (p : ℝ))) ^ p = Real.exp 64 := by31rw [← Real.exp_nat_mul]32congr 133field_simp34have he64 : Real.exp (64 : ℝ) ≤ (3 : ℝ) ^ 64 := by35calc36Real.exp (64 : ℝ) = (Real.exp 1) ^ (64 : ℕ) := by37rw [← Real.exp_nat_mul]38norm_num39_ ≤ (3 : ℝ) ^ 64 := pow_le_pow_left₀ (Real.exp_nonneg 1) Real.exp_one_lt_three.le _40have hfinite : (3 : ℝ) ^ 64 ≤ 16 * (128 : ℝ) ^ 14 := by norm_num41have hp128 : (128 : ℝ) ≤ p := by exact_mod_cast hlarge42exact (hpow.trans_eq hexp).trans (he64.trans (hfinite.trans43(mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (by norm_num) hp128 14) (by norm_num))))44· have hsmall : p ≤ 127 := by omega45interval_cases p <;> norm_num4647/-- The corrected full prefactor fits the original prescribed dimension48bound, with no enlargement of its numerical constant. -/49theorem sharp_final_error_bound {p : ℕ} {N : ℝ} (hp : 2 ≤ p)50(hN : 2 ^ 32 * (p : ℝ) ^ 80 ≤ N) :514096 * (p : ℝ) ^ 26 / N * (1 + 64 / (p : ℝ)) ^ p ≤52N ^ (-(1 / 2 : ℝ)) := by53have hpr : (2 : ℝ) ≤ p := by exact_mod_cast hp54have hN0 := HaarMomentConstants.dimension_pos hpr hN55have hs := HaarMomentConstants.square_root_lower hpr hN56have hsmall : 4096 * (p : ℝ) ^ 26 * (1 + 64 / (p : ℝ)) ^ p ≤57N ^ (1 / 2 : ℝ) := by58calc59_ ≤ 4096 * (p : ℝ) ^ 26 * (16 * (p : ℝ) ^ 14) :=60mul_le_mul_of_nonneg_left (polynomial_prefactor_bound p hp) (by positivity)61_ = 65536 * (p : ℝ) ^ 40 := by ring62_ ≤ _ := hs63have hroot : N ^ (1 / 2 : ℝ) * N ^ (1 / 2 : ℝ) = N := by64rw [← Real.rpow_add hN0]65norm_num66have hrewrite : 4096 * (p : ℝ) ^ 26 / N * (1 + 64 / (p : ℝ)) ^ p =67(4096 * (p : ℝ) ^ 26 * (1 + 64 / (p : ℝ)) ^ p) / N := by ring68rw [hrewrite, Real.rpow_neg hN0.le, ← one_div]69apply (div_le_div_iff₀ hN0 (Real.rpow_pos_of_pos hN0 _)).mpr70simpa only [one_mul] using71(mul_le_mul_of_nonneg_right hsmall (Real.rpow_nonneg hN0.le (1 / 2 : ℝ))).trans_eq hroot7273end Nonadditivity.HaarSharpConstants