Exact Lean source
Nonadditivity.StructuredReductionCosts
Download original .lean · View on GitHub · Jump to source
Direct imports
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
15 project constants, including generated, internal and private declarations.
15 declarations
Nonadditivity.StructuredCostBounds.tensorSupportBound.eq_1internal/detail/privateNonadditivity.StructuredReductionCosts.actual_coefficient_boundNonadditivity.StructuredReductionCosts.actual_coefficient_bound._proof_1_1internal/detail/privateNonadditivity.StructuredReductionCosts.actual_error_boundNonadditivity.StructuredReductionCosts.dimensionCosts_leNonadditivity.StructuredReductionCosts.errorCosts_leNonadditivity.StructuredReductionCosts.initial_factor_leNonadditivity.StructuredReductionCosts.initial_factor_le._proof_1_1internal/detail/privateNonadditivity.StructuredReductionCosts.prescribed_lower_bound_invNonadditivity.StructuredReductionCosts.prescribed_lower_bound_inv._proof_1_1internal/detail/privateNonadditivity.StructuredReductionCosts.tensor_dimensionCost_leNonadditivity.StructuredReductionCosts.tensor_errorCost_leNonadditivity.StructuredReductionCosts.word_dimensionCost_leNonadditivity.StructuredReductionCosts.word_errorCost_leNonadditivity.TensorPartitionReduction.width.eq_1internal/detail/private
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.StructuredCostBounds7import Nonadditivity.TensorPartitionReduction8import Nonadditivity.WordBallReduction910/-! The literal products of the constructed structured reductions satisfy the11manuscript's numerical budgets. -/1213namespace Nonadditivity.StructuredReductionCosts1415noncomputable section16open scoped BigOperators17open StructuredCostBounds18set_option maxHeartbeats 80000019set_option linter.unusedSectionVars false2021variable {α : Type} [DecidableEq α] {K n : ℕ} [NeZero K]2223theorem tensor_dimensionCost_le (v : Fin n → Fin K → FreeGroup α) :24(TensorPartitionReduction.dimensionCost v (tensorSteps n) : ℝ) ≤25∏ j ∈ Finset.range (tensorSteps n), 2 * (tensorSupportBound K n (j + 1) : ℝ) := by26have h := TensorPartitionReduction.dimensionCost_le_prod v (tensorSteps n)27have he : (∏ j ∈ Finset.range (tensorSteps n), 2 * tensorSupportBound K n (j + 1)) =28∏ j ∈ Finset.range (tensorSteps n), 2 * (1 + 2 ^ (j + 2) * K ^ TensorPartitionReduction.width n (j + 1)) := by29simp only [tensorSupportBound, dyadicCeil_eq_div, TensorPartitionReduction.width, Nat.add_assoc]30rw [← he] at h31exact_mod_cast h3233theorem tensor_errorCost_le (v : Fin n → Fin K → FreeGroup α) :34(TensorPartitionReduction.errorCost v (tensorSteps n) : ℝ) ≤35∏ j ∈ Finset.range (tensorSteps n), 6 * (tensorSupportBound K n (j + 1) : ℝ) := by36have h := TensorPartitionReduction.errorCost_le_prod v (tensorSteps n)37have he : (∏ j ∈ Finset.range (tensorSteps n), 6 * tensorSupportBound K n (j + 1)) =38∏ j ∈ Finset.range (tensorSteps n), 6 * (1 + 2 ^ (j + 2) * K ^ TensorPartitionReduction.width n (j + 1)) := by39simp only [tensorSupportBound, dyadicCeil_eq_div, TensorPartitionReduction.width, Nat.add_assoc]40rw [← he] at h41exact_mod_cast h4243theorem word_dimensionCost_le (hn : 1 ≤ n) :44(WordBallReduction.dimensionCost n (wordLength K) (wordSteps K) : ℝ) ≤45∏ i ∈ Finset.range (wordSteps K), 2 * (wordSupportBound K n (i + 1) : ℝ) := by46have h := WordBallReduction.dimensionCost_le n (wordLength K) (wordSteps K) hn47have he : (∏ i ∈ Finset.range (wordSteps K), 2 * wordSupportBound K n (i + 1)) =48∏ i ∈ Finset.range (wordSteps K), 4 * n * 3 ^ WordBallReduction.radius (wordLength K) (i + 1) := by49apply Finset.prod_congr rfl50intro i _51simp only [wordSupportBound, dyadicCeil_eq_div, WordBallReduction.radius, Nat.ceilDiv_eq_add_pred_div]52ring53rw [← he] at h54exact_mod_cast h5556theorem word_errorCost_le (hn : 1 ≤ n) :57(WordBallReduction.errorCost n (wordLength K) (wordSteps K) : ℝ) ≤58∏ i ∈ Finset.range (wordSteps K), 6 * (wordSupportBound K n (i + 1) : ℝ) := by59have h := WordBallReduction.errorCost_le n (wordLength K) (wordSteps K) hn60have he : (∏ i ∈ Finset.range (wordSteps K), 6 * wordSupportBound K n (i + 1)) =61∏ i ∈ Finset.range (wordSteps K), 12 * n * 3 ^ WordBallReduction.radius (wordLength K) (i + 1) := by62apply Finset.prod_congr rfl63intro i _64simp only [wordSupportBound, dyadicCeil_eq_div, WordBallReduction.radius, Nat.ceilDiv_eq_add_pred_div]65ring66rw [← he] at h67exact_mod_cast h6869theorem dimensionCosts_le (v : Fin n → Fin K → FreeGroup α) (hn : 1 ≤ n) :70(TensorPartitionReduction.dimensionCost v (tensorSteps n) : ℝ) *71WordBallReduction.dimensionCost n (wordLength K) (wordSteps K) ≤ supportProduct K n 2 := by72exact mul_le_mul (tensor_dimensionCost_le v) (word_dimensionCost_le hn)73(by positivity) (by positivity)7475theorem errorCosts_le (v : Fin n → Fin K → FreeGroup α) (hn : 1 ≤ n) :76(TensorPartitionReduction.errorCost v (tensorSteps n) : ℝ) *77WordBallReduction.errorCost n (wordLength K) (wordSteps K) ≤ supportProduct K n 6 := by78exact mul_le_mul (tensor_errorCost_le v) (word_errorCost_le hn)79(by positivity) (by positivity)8081theorem prescribed_lower_bound_inv {K n : ℕ} (hK : 2 ≤ K) :82(Real.sqrt 2 * (K : ℝ) ^ (-((n : ℝ) + 1) / 2))⁻¹ =83Real.exp (((n : ℝ) + 1) * Real.log K / 2) / Real.sqrt 2 := by84have hKr : (0 : ℝ) < K := by exact_mod_cast (by omega : 0 < K)85rw [Real.rpow_def_of_pos hKr]86have he : Real.log (K : ℝ) * (-((n : ℝ) + 1) / 2) =87-(((n : ℝ) + 1) * Real.log K / 2) := by ring88rw [he, Real.exp_neg, mul_inv_rev, inv_inv]89rfl9091theorem initial_factor_le {K n : ℕ} {ρ : ℝ} (hK : 2 ≤ K)92(hρ : Real.sqrt 2 * (K : ℝ) ^ (-((n : ℝ) + 1) / 2) ≤ ρ) :933 * (1 + ρ⁻¹) ≤ initialFactor K n := by94have hKr : (0 : ℝ) < K := by exact_mod_cast (by omega : 0 < K)95have hp : 0 < Real.sqrt 2 * (K : ℝ) ^ (-((n : ℝ) + 1) / 2) := by positivity96have hi := one_div_le_one_div_of_le hp hρ97rw [one_div, one_div, prescribed_lower_bound_inv hK] at hi98dsimp [initialFactor]99linarith100101/-- The error factor of the actual tensor and word chains obeys the full102manuscript budget as soon as the original polynomial contains the prescribed103test. No cardinality or summed-log premise is left. -/104theorem actual_error_bound (v : Fin n → Fin K → FreeGroup α) {ρ : ℝ}105(hK : 2 ≤ K) (hn : Quantitative.n₀ K ≤ n)106(hρ : Real.sqrt 2 * (K : ℝ) ^ (-((n : ℝ) + 1) / 2) ≤ ρ) :1073 * (1 + ρ⁻¹) *108((TensorPartitionReduction.errorCost v (tensorSteps n) : ℝ) *109WordBallReduction.errorCost n (wordLength K) (wordSteps K)) ≤110Real.exp (Quantitative.gamma (Real.log K) * n) := by111obtain ⟨_, hn64, _, _⟩ := Quantitative.threshold_consequences hK hn112have hn1 : 1 ≤ n := by exact_mod_cast (show (1 : ℝ) ≤ n by linarith)113exact (mul_le_mul (initial_factor_le hK hρ) (errorCosts_le v hn1)114(by positivity) (initialFactor_pos K n).le).trans (errorProduct_bound hK hn)115116/-- The final doubled coefficient size, when the initial Gram space has at117most `J K^n` coordinates, satisfies the manuscript's logarithmic budget. -/118theorem actual_coefficient_bound (v : Fin n → Fin K → FreeGroup α) {d₀ : ℕ}119(hK : 2 ≤ K) (hn : Quantitative.n₀ K ≤ n)120(hd : d₀ ≤ netCardBound K n * K ^ n) (hdpos : 0 < d₀) :121Real.log (2 * (2 * d₀ * TensorPartitionReduction.dimensionCost v (tensorSteps n) *122WordBallReduction.dimensionCost n (wordLength K) (wordSteps K) : ℕ)) ≤1232 * (K : ℝ) ^ (2 * n) * Real.log (1 + 2 * (n : ℝ)) := by124obtain ⟨_, hn64, _, _⟩ := Quantitative.threshold_consequences hK hn125have hn1 : 1 ≤ n := by exact_mod_cast (show (1 : ℝ) ≤ n by linarith)126have hdreal : (d₀ : ℝ) ≤ (netCardBound K n : ℝ) * (K : ℝ)^n := by exact_mod_cast hd127have hp := dimensionCosts_le v hn1128have hm := mul_le_mul hdreal hp (by positivity)129(by positivity : 0 ≤ (netCardBound K n : ℝ) * (K : ℝ)^n)130have hsize : (2 * d₀ * TensorPartitionReduction.dimensionCost v (tensorSteps n) *131WordBallReduction.dimensionCost n (wordLength K) (wordSteps K) : ℕ) ≤132coefficientBound K n := by133dsimp [coefficientBound]134push_cast135nlinarith136have hpos : (0 : ℝ) < (2 * d₀ * TensorPartitionReduction.dimensionCost v (tensorSteps n) *137WordBallReduction.dimensionCost n (wordLength K) (wordSteps K) : ℕ) := by138exact_mod_cast Nat.mul_pos (Nat.mul_pos (Nat.mul_pos (by omega) hdpos)139(TensorPartitionReduction.dimensionCost_pos v _)) (WordBallReduction.dimensionCost_pos _ _ _)140exact (Real.log_le_log (mul_pos (by norm_num : (0 : ℝ) < 2) hpos)141(mul_le_mul_of_nonneg_left hsize (by norm_num : (0 : ℝ) ≤ 2))).trans142(coefficientBound_log_bound hK hn)143144end145end Nonadditivity.StructuredReductionCosts