Exact Lean source
Nonadditivity.HaarMomentConstants
Download original .lean · View on GitHub · Jump to source
Direct imports
Nonadditivity.QuantitativeMathlib.Algebra.Order.BigOperators.Group.FinsetdependencyMathlib.Order.Interval.Finset.NatdependencyMathlib.Tactic.GCongrdependency
Imported by project modules
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
22 project constants, including generated, internal and private declarations.
22 declarations
Nonadditivity.HaarMomentConstants.alphaNonadditivity.HaarMomentConstants.alpha._proof_1internal/detail/privateNonadditivity.HaarMomentConstants.alpha._proof_2internal/detail/privateNonadditivity.HaarMomentConstants.alpha_boundsNonadditivity.HaarMomentConstants.betaNonadditivity.HaarMomentConstants.beta._proof_1internal/detail/privateNonadditivity.HaarMomentConstants.beta_boundsNonadditivity.HaarMomentConstants.dimension_posNonadditivity.HaarMomentConstants.entry_prefactor_boundNonadditivity.HaarMomentConstants.exponential_boundNonadditivity.HaarMomentConstants.final_error_boundNonadditivity.HaarMomentConstants.fourth_root_lowerNonadditivity.HaarMomentConstants.geometric_sum_boundNonadditivity.HaarMomentConstants.lengthMajorantNonadditivity.HaarMomentConstants.lengthMajorant._proof_1internal/detail/privateNonadditivity.HaarMomentConstants.lengthMajorant_leNonadditivity.HaarMomentConstants.length_sum_boundNonadditivity.HaarMomentConstants.local_alpha_leNonadditivity.HaarMomentConstants.local_beta_leNonadditivity.HaarMomentConstants.square_root_lowerNonadditivity.HaarMomentConstants.sum_length_errors_leNonadditivity.HaarMomentConstants.two_entry_prefactors_bound
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.Quantitative7import Mathlib.Algebra.Order.BigOperators.Group.Finset8import Mathlib.Order.Interval.Finset.Nat9import Mathlib.Tactic.GCongr1011/-! # The tracked scalar constants in the two-generator Haar moment estimate1213These are numerical inequalities and finite-sum consequences. No Haar14moment estimate is assumed or asserted here: the final assembly consumes15explicit bounds for each nonzero word-length contribution.16-/17noncomputable section18namespace Nonadditivity.HaarMomentConstants19open scoped BigOperators2021def alpha (p N : ℝ) : ℝ := 128 * p ^ 20 / N ^ (1 / 4 : ℝ)22def beta (p N : ℝ) : ℝ := 4096 * p ^ 38 / N2324/-- The prefactor in the unitary entry-moment estimate of BC Lemma 5.4. -/25theorem entry_prefactor_bound {r N : ℝ} (hN : 0 < N)26(hr : 2 * r ^ (7 / 2 : ℝ) ≤ N ^ 2) :271 + 3 * r ^ (7 / 2 : ℝ) / N ^ 2 ≤ 5 / 2 := by28have : 3 * r ^ (7 / 2 : ℝ) / N ^ 2 ≤ 3 / 2 := by29apply (div_le_iff₀ (pow_pos hN 2)).230linarith31linarith3233/-- Two independent Haar matrices give exactly the prefactor `25/4`;34adjoint entries remain in their original independent family. -/35theorem two_entry_prefactors_bound {x y : ℝ} (hx : x ≤ 5 / 2)36(hy0 : 0 ≤ y) (hy : y ≤ 5 / 2) : x * y ≤ 25 / 4 := by37calc38x * y ≤ (5 / 2) * y := mul_le_mul_of_nonneg_right hx hy039_ ≤ (5 / 2) * (5 / 2) := mul_le_mul_of_nonneg_left hy (by norm_num)40_ = _ := by norm_num4142theorem local_alpha_le {p N t : ℝ} (hp : 0 ≤ p) (hN : 0 ≤ N)43(ht0 : 0 ≤ t) (ht : t ≤ p) :44128 * t ^ 11 * p ^ 9 / N ^ (1 / 4 : ℝ) ≤ alpha p N := by45unfold alpha46calc47_ ≤ 128 * p ^ 11 * p ^ 9 / N ^ (1 / 4 : ℝ) := by gcongr48_ = _ := by ring4950theorem local_beta_le {p N t : ℝ} (hN : 0 ≤ N)51(ht0 : 0 ≤ t) (ht : t ≤ p) :524096 * t ^ 20 * p ^ 18 / N ≤ beta p N := by53unfold beta54calc55_ ≤ 4096 * p ^ 20 * p ^ 18 / N := by gcongr56_ = _ := by ring5758theorem dimension_pos {p N : ℝ} (hp : 2 ≤ p)59(hN : 2 ^ 32 * p ^ 80 ≤ N) : 0 < N := by60have : 0 < 2 ^ 32 * p ^ 80 := by positivity61linarith6263theorem fourth_root_lower {p N : ℝ} (hp : 2 ≤ p)64(hN : 2 ^ 32 * p ^ 80 ≤ N) :65256 * p ^ 20 ≤ N ^ (1 / 4 : ℝ) := by66have hN0 := (dimension_pos hp hN).le67apply le_of_pow_le_pow_left₀ (n := 4) (by norm_num)68(Real.rpow_nonneg hN0 _)69have he : (N ^ (1 / 4 : ℝ)) ^ 4 = N := by70simpa using Real.rpow_inv_natCast_pow hN0 (by norm_num : (4 : ℕ) ≠ 0)71rw [he]72convert hN using 173ring7475theorem square_root_lower {p N : ℝ} (hp : 2 ≤ p)76(hN : 2 ^ 32 * p ^ 80 ≤ N) :7765536 * p ^ 40 ≤ N ^ (1 / 2 : ℝ) := by78have hN0 := (dimension_pos hp hN).le79apply le_of_pow_le_pow_left₀ (n := 2) (by norm_num)80(Real.rpow_nonneg hN0 _)81have he : (N ^ (1 / 2 : ℝ)) ^ 2 = N := by82simpa using Real.rpow_inv_natCast_pow hN0 (by norm_num : (2 : ℕ) ≠ 0)83rw [he]84convert hN using 185ring8687theorem alpha_bounds {p N : ℝ} (hp : 2 ≤ p)88(hN : 2 ^ 32 * p ^ 80 ≤ N) : 0 ≤ alpha p N ∧ alpha p N ≤ 1 / 2 := by89have hN0 := dimension_pos hp hN90have hr := fourth_root_lower hp hN91unfold alpha92constructor93· positivity94· apply (div_le_iff₀ (Real.rpow_pos_of_pos hN0 _)).295linarith9697theorem beta_bounds {p N : ℝ} (hp : 2 ≤ p)98(hN : 2 ^ 32 * p ^ 80 ≤ N) : 0 ≤ beta p N ∧ beta p N ≤ 1 / 2 := by99have hN0 := dimension_pos hp hN100have hpow : p ^ 38 ≤ p ^ 80 := pow_le_pow_right₀ (by linarith) (by norm_num)101unfold beta102constructor103· positivity104· apply (div_le_iff₀ hN0).2105have hpow0 : 0 ≤ p ^ 80 := by positivity106norm_num at hN107nlinarith108109theorem exponential_bound {p N t : ℝ} (hp : 2 ≤ p)110(hN : 2 ^ 32 * p ^ 80 ≤ N) (ht0 : 0 ≤ t) (ht : t ≤ p) :111Real.exp (t ^ 2 / N ^ (1 / 4 : ℝ)) ≤ Real.exp 1 := by112have hN0 := dimension_pos hp hN113have hr := fourth_root_lower hp hN114have ht2 : t ^ 2 ≤ p ^ 2 := pow_le_pow_left₀ ht0 ht _115have hp2 : p ^ 2 ≤ p ^ 20 := pow_le_pow_right₀ (by linarith) (by norm_num)116apply Real.exp_le_exp.mpr117apply (div_le_iff₀ (Real.rpow_pos_of_pos hN0 _)).2118nlinarith [show 0 ≤ p ^ 20 by positivity]119120theorem geometric_sum_bound {q : ℝ} (hq0 : 0 ≤ q) (hq : q ≤ 1 / 2) (s : ℕ) :121(∑ i ∈ Finset.range s, q ^ i) ≤ 2 := by122have hs : ∀ s : ℕ, (∑ i ∈ Finset.range s, q ^ i) ≤ 2 * (1 - q ^ s) := by123intro s124induction s with125| zero => simp126| succ s ih =>127rw [Finset.sum_range_succ, pow_succ]128nlinarith [mul_le_mul_of_nonneg_left hq (pow_nonneg hq0 s)]129exact (hs s).trans (by nlinarith [pow_nonneg hq0 s])130131/-- The exact constant after the two geometric sums and the length sum. -/132theorem final_error_bound {p N : ℝ} (hp : 2 ≤ p)133(hN : 2 ^ 32 * p ^ 80 ≤ N) :1346400 * Real.exp 1 * p ^ 24 / N ≤ N ^ (-(1 / 2 : ℝ)) := by135have hN0 := dimension_pos hp hN136have hs := square_root_lower hp hN137have hpow : p ^ 24 ≤ p ^ 40 := pow_le_pow_right₀ (by linarith) (by norm_num)138have hsmall : 6400 * Real.exp 1 * p ^ 24 ≤ N ^ (1 / 2 : ℝ) := by139have he := Real.exp_one_lt_three140have hp0 : 0 ≤ p ^ 24 := by positivity141have hmul := mul_le_mul_of_nonneg_right he.le hp0142nlinarith143have hroot : N ^ (1 / 2 : ℝ) * N ^ (1 / 2 : ℝ) = N := by144rw [← Real.rpow_add hN0]145norm_num146rw [Real.rpow_neg hN0.le, ← one_div]147apply (div_le_div_iff₀ hN0 (Real.rpow_pos_of_pos hN0 _)).2148nlinarith [mul_le_mul_of_nonneg_right hsmall (Real.rpow_nonneg hN0.le (1 / 2 : ℝ))]149150/-- The literal scalar majorant in the proof of BC Theorem 5.1 at two151generators, with finite partial geometric sums. -/152def lengthMajorant (p N t : ℝ) (a b : ℕ) : ℝ :=153(25 / 4) * (4 * t ^ 3) ^ 4 * p ^ 11 / N *154Real.exp (t ^ 2 / N ^ (1 / 4 : ℝ)) *155(∑ i ∈ Finset.range a, (alpha p N) ^ i) *156(∑ i ∈ Finset.range b, (beta p N) ^ i)157158theorem lengthMajorant_le {p N t : ℝ} (hp : 2 ≤ p)159(hN : 2 ^ 32 * p ^ 80 ≤ N) (ht0 : 0 ≤ t) (ht : t ≤ p) (a b : ℕ) :160lengthMajorant p N t a b ≤ 6400 * Real.exp 1 * p ^ 11 / N * t ^ 12 := by161have hN0 := dimension_pos hp hN162obtain ⟨ha0, ha⟩ := alpha_bounds hp hN163obtain ⟨hb0, hb⟩ := beta_bounds hp hN164have hea := geometric_sum_bound ha0 ha a165have heb := geometric_sum_bound hb0 hb b166have he := exponential_bound hp hN ht0 ht167unfold lengthMajorant168calc169_ ≤ (25 / 4) * (4 * t ^ 3) ^ 4 * p ^ 11 / N * Real.exp 1 * 2 * 2 := by170gcongr171_ = _ := by ring172173theorem length_sum_bound (p : ℕ) :174(∑ t ∈ Finset.Icc 1 p, (t : ℝ) ^ 12) ≤ (p : ℝ) ^ 13 := by175calc176_ ≤ ∑ _t ∈ Finset.Icc 1 p, (p : ℝ) ^ 12 := by177apply Finset.sum_le_sum178intro t ht179apply pow_le_pow_left₀ (by positivity)180exact_mod_cast (Finset.mem_Icc.mp ht).2181_ = (p : ℝ) ^ 13 := by simp [pow_succ]; ring182183/-- Conditional assembly of the path-length estimates; the supplied premise184is precisely the separate analytic/combinatorial work, not the final claim. -/185theorem sum_length_errors_le {p : ℕ} {N ρ : ℝ} (hp : 2 ≤ p)186(hN : 2 ^ 32 * (p : ℝ) ^ 80 ≤ N) (hρ : 0 ≤ ρ)187(D : ℕ → ℝ) (a b : ℕ → ℕ)188(hD : ∀ t ∈ Finset.Icc 1 p,189|D t| ≤ lengthMajorant p N t (a t) (b t) * ρ ^ p) :190|∑ t ∈ Finset.Icc 1 p, D t| ≤ N ^ (-(1 / 2 : ℝ)) * ρ ^ p := by191have hpr : (2 : ℝ) ≤ p := by exact_mod_cast hp192have hN0 := dimension_pos hpr hN193have hpoint : ∀ t ∈ Finset.Icc 1 p,194|D t| ≤ (6400 * Real.exp 1 * (p : ℝ) ^ 11 / N * (t : ℝ) ^ 12) * ρ ^ p := by195intro t ht196exact (hD t ht).trans (mul_le_mul_of_nonneg_right197(lengthMajorant_le hpr hN (by positivity)198(by exact_mod_cast (Finset.mem_Icc.mp ht).2) (a t) (b t)) (pow_nonneg hρ p))199calc200_ ≤ ∑ t ∈ Finset.Icc 1 p, |D t| := Finset.abs_sum_le_sum_abs _ _201_ ≤ ∑ t ∈ Finset.Icc 1 p,202(6400 * Real.exp 1 * (p : ℝ) ^ 11 / N * (t : ℝ) ^ 12) * ρ ^ p :=203Finset.sum_le_sum hpoint204_ = (6400 * Real.exp 1 * (p : ℝ) ^ 11 / N *205(∑ t ∈ Finset.Icc 1 p, (t : ℝ) ^ 12)) * ρ ^ p := by206rw [← Finset.sum_mul, ← Finset.mul_sum]207_ ≤ (6400 * Real.exp 1 * (p : ℝ) ^ 11 / N * (p : ℝ) ^ 13) * ρ ^ p := by208gcongr209exact length_sum_bound p210_ = (6400 * Real.exp 1 * (p : ℝ) ^ 24 / N) * ρ ^ p := by ring211_ ≤ _ := mul_le_mul_of_nonneg_right (final_error_bound hpr hN) (pow_nonneg hρ p)212213end Nonadditivity.HaarMomentConstants