Exact Lean source
Nonadditivity.HaarEncodingSlack
Download original .lean · View on GitHub · Jump to source
Imported by project modules
3 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
14 project constants, including generated, internal and private declarations.
14 declarations
Nonadditivity.HaarMomentConstants.encodingMajorantNonadditivity.HaarMomentConstants.encodingMajorant._proof_1internal/detail/privateNonadditivity.HaarMomentConstants.encodingMajorant._proof_2internal/detail/privateNonadditivity.HaarMomentConstants.encodingMajorant._proof_3internal/detail/privateNonadditivity.HaarMomentConstants.encodingMajorant._proof_4internal/detail/privateNonadditivity.HaarMomentConstants.encodingMajorant_leNonadditivity.HaarMomentConstants.encoding_alpha_leNonadditivity.HaarMomentConstants.encoding_beta_leNonadditivity.HaarMomentConstants.encoding_final_error_leNonadditivity.HaarMomentConstants.prescribed_dimension_strongNonadditivity.HaarMomentConstants.strong_fourth_root_lowerNonadditivity.HaarMomentConstants.strong_implies_dimensionNonadditivity.HaarMomentConstants.strong_square_root_lowerNonadditivity.HaarMomentConstants.sum_encoding_errors_le
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarMomentSlack7import Nonadditivity.HaarTensorConstants89/-! # Explicit slack for corrected two-generator path encoding1011The actual prescribed moment order satisfies the stronger dimension condition12`2^80*p^80 ≤ N`. It absorbs a factor `128` per important event and the extra13three powers of path length from the corrected event count. The combinatorial14encoding itself remains a separate theorem.15-/16noncomputable section17namespace Nonadditivity.HaarMomentConstants18open scoped BigOperators1920theorem prescribed_dimension_strong {h n : ℝ}21(hh : (2:ℝ)/3 ≤ h) (hn : 2 ≤ n) :222^80 * (Quantitative.momentParameter h n:ℝ)^80 ≤23(Quantitative.dimensionChoice h n:ℝ) := by24obtain ⟨_,_,_,hp⟩ := Quantitative.moment_parameter_bounds hh hn25have hD : 0 < (Quantitative.dimensionChoice h n:ℝ) :=26(Real.exp_pos _).trans_le (Nat.le_ceil _)27have htwop : 2*(Quantitative.momentParameter h n:ℝ) ≤28Real.exp (Real.log (Quantitative.dimensionChoice h n:ℝ)/80) := by linarith29have he : (Real.exp (Real.log (Quantitative.dimensionChoice h n:ℝ)/80))^80 =30(Quantitative.dimensionChoice h n:ℝ) := by31rw [← Real.exp_nat_mul]32norm_num only [Nat.cast_ofNat]33rw [show (80:ℝ)*(Real.log (Quantitative.dimensionChoice h n:ℝ)/80) =34Real.log (Quantitative.dimensionChoice h n:ℝ) by ring, Real.exp_log hD]35rw [← mul_pow]36exact he ▸ pow_le_pow_left₀ (by positivity) htwop 803738theorem strong_implies_dimension {p N : ℝ} (hN : 2^80*p^80 ≤ N) :392^32*p^80 ≤ N := by40exact (mul_le_mul_of_nonneg_right (by norm_num : (2:ℝ)^32 ≤ 2^80)41(by positivity)).trans hN4243theorem strong_fourth_root_lower {p N : ℝ} (hp : 2 ≤ p) (hN : 2^80*p^80 ≤ N) :442^20*p^20 ≤ N^(1/4:ℝ) := by45have hN0 := (dimension_pos hp (strong_implies_dimension hN)).le46apply le_of_pow_le_pow_left₀ (n := 4) (by norm_num) (Real.rpow_nonneg hN0 _)47have he : (N^(1/4:ℝ))^4=N := by48simpa using Real.rpow_inv_natCast_pow hN0 (by norm_num : (4:ℕ) ≠ 0)49rw [he]50convert hN using 1; ring5152theorem strong_square_root_lower {p N : ℝ} (hp : 2 ≤ p) (hN : 2^80*p^80 ≤ N) :532^40*p^40 ≤ N^(1/2:ℝ) := by54have hN0 := (dimension_pos hp (strong_implies_dimension hN)).le55apply le_of_pow_le_pow_left₀ (n := 2) (by norm_num) (Real.rpow_nonneg hN0 _)56have he : (N^(1/2:ℝ))^2=N := by57simpa using Real.rpow_inv_natCast_pow hN0 (by norm_num : (2:ℕ) ≠ 0)58rw [he]59convert hN using 1; ring6061theorem encoding_alpha_le {p N : ℝ} (hp : 2 ≤ p) (hN : 2^80*p^80 ≤ N) :62128*alpha p N ≤ 1/2 := by63have hN0 := dimension_pos hp (strong_implies_dimension hN)64have hr := strong_fourth_root_lower hp hN65unfold alpha66rw [← mul_div_assoc]67apply (div_le_iff₀ (Real.rpow_pos_of_pos hN0 _)).mpr68norm_num at hr69nlinarith [show 0 ≤ p^20 by positivity]7071theorem encoding_beta_le {p N : ℝ} (hp : 2 ≤ p) (hN : 2^80*p^80 ≤ N) :7216384*beta p N ≤ 1/2 := by73have hN0 := dimension_pos hp (strong_implies_dimension hN)74have hpow : p^38 ≤ p^80 := pow_le_pow_right₀ (by linarith) (by norm_num)75unfold beta76rw [← mul_div_assoc]77apply (div_le_iff₀ hN0).mpr78norm_num at hN79nlinarith [show 0 ≤ p^80 by positivity]8081def encodingMajorant (p N t : ℝ) (a b : ℕ) : ℝ :=8216384*t^3 * ((25/4)*(4*t^3)^4*p^11/N * Real.exp (t^2/N^(1/4:ℝ)) *83(∑ i ∈ Finset.range a, (128*alpha p N)^i) *84(∑ i ∈ Finset.range b, (16384*beta p N)^i))8586theorem encodingMajorant_le {p N t : ℝ} (hp : 2 ≤ p) (hN : 2^80*p^80 ≤ N)87(ht0 : 0 ≤ t) (ht : t ≤ p) (a b : ℕ) :88encodingMajorant p N t a b ≤ 16384*6400*Real.exp 1*p^11/N*t^15 := by89have hNc := strong_implies_dimension hN90have hN0 := dimension_pos hp hNc91have ha0 := (alpha_bounds hp hNc).192have hb0 := (beta_bounds hp hNc).193have ha := geometric_sum_bound (show 0 ≤ 128*alpha p N by positivity)94(encoding_alpha_le hp hN) a95have hb := geometric_sum_bound (show 0 ≤ 16384*beta p N by positivity)96(encoding_beta_le hp hN) b97have he := exponential_bound hp hNc ht0 ht98unfold encodingMajorant99calc100_ ≤ 16384*t^3 * ((25/4)*(4*t^3)^4*p^11/N * Real.exp 1 * 2 * 2) := by gcongr101_ = _ := by ring102103theorem encoding_final_error_le {p N : ℝ} (hp : 2 ≤ p) (hN : 2^80*p^80 ≤ N) :10416384*6400*Real.exp 1*p^27/N ≤ N^(-(1/2:ℝ)) := by105have hN0 := dimension_pos hp (strong_implies_dimension hN)106have hs := strong_square_root_lower hp hN107have hpow : p^27 ≤ p^40 := pow_le_pow_right₀ (by linarith) (by norm_num)108have he := mul_le_mul_of_nonneg_right Real.exp_one_lt_three.le109(show 0 ≤ p^27 by positivity)110have hsmall : 16384*6400*Real.exp 1*p^27 ≤ N^(1/2:ℝ) := by111norm_num at hs112nlinarith [show 0 ≤ p^27 by positivity]113have hroot : N^(1/2:ℝ)*N^(1/2:ℝ)=N := by rw [← Real.rpow_add hN0]; norm_num114rw [Real.rpow_neg hN0.le, ← one_div]115apply (div_le_div_iff₀ hN0 (Real.rpow_pos_of_pos hN0 _)).mpr116nlinarith [mul_le_mul_of_nonneg_right hsmall (Real.rpow_nonneg hN0.le (1/2:ℝ))]117118119/-- Finite summation of corrected encoding contributions preserves the exact120one-pair target error. The path-length estimates remain explicit premises. -/121theorem sum_encoding_errors_le {p : ℕ} {N ρ : ℝ}122(hp : 2 ≤ p) (hN : 2^80*(p:ℝ)^80 ≤ N) (hρ : 0 ≤ ρ)123(D : ℕ → ℝ) (a b : ℕ → ℕ)124(hD : ∀ t ∈ Finset.Icc 1 p,125|D t| ≤ encodingMajorant p N t (a t) (b t) * ρ^p) :126|∑ t ∈ Finset.Icc 1 p, D t| ≤ N^(-(1/2:ℝ))*ρ^p := by127have hpr : (2:ℝ) ≤ p := by exact_mod_cast hp128have hN0 := dimension_pos hpr (strong_implies_dimension hN)129have hpoint : ∀ t ∈ Finset.Icc 1 p,130|D t| ≤ (16384*6400*Real.exp 1*(p:ℝ)^11/N*(t:ℝ)^15)*ρ^p := by131intro t ht132exact (hD t ht).trans (mul_le_mul_of_nonneg_right133(encodingMajorant_le hpr hN (by positivity)134(by exact_mod_cast (Finset.mem_Icc.mp ht).2) (a t) (b t)) (pow_nonneg hρ p))135calc136_ ≤ ∑ t ∈ Finset.Icc 1 p, |D t| := Finset.abs_sum_le_sum_abs _ _137_ ≤ ∑ t ∈ Finset.Icc 1 p,138(16384*6400*Real.exp 1*(p:ℝ)^11/N*(t:ℝ)^15)*ρ^p := Finset.sum_le_sum hpoint139_ = (16384*6400*Real.exp 1*(p:ℝ)^11/N*140(∑ t ∈ Finset.Icc 1 p, (t:ℝ)^15))*ρ^p := by141rw [← Finset.sum_mul, ← Finset.mul_sum]142_ ≤ (16384*6400*Real.exp 1*(p:ℝ)^11/N*(p:ℝ)^16)*ρ^p := by143gcongr144exact length_sum_bound_with_overhead p 3145_ = (16384*6400*Real.exp 1*(p:ℝ)^27/N)*ρ^p := by ring146_ ≤ _ := mul_le_mul_of_nonneg_right (encoding_final_error_le hpr hN) (pow_nonneg hρ p)147148end Nonadditivity.HaarMomentConstants