Exact Lean source
Nonadditivity.HaarPathScalarSummation
Download original .lean · View on GitHub · Jump to source
Direct imports
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
30 project constants, including generated, internal and private declarations.
30 declarations
Nonadditivity.HaarMomentConstants.encodingMajorant.eq_1internal/detail/privateNonadditivity.HaarMomentConstants.even_length_deficit_identityNonadditivity.HaarMomentConstants.even_length_deficit_identity._proof_1_1internal/detail/privateNonadditivity.HaarMomentConstants.graph_defect_eq_singletons_add_twice_deficitNonadditivity.HaarMomentConstants.graph_defect_eq_singletons_add_twice_deficit._proof_1_1internal/detail/privateNonadditivity.HaarMomentConstants.localEncodingAlphaNonadditivity.HaarMomentConstants.localEncodingAlpha._proof_1internal/detail/privateNonadditivity.HaarMomentConstants.localEncodingAlpha_leNonadditivity.HaarMomentConstants.localEncodingBetaNonadditivity.HaarMomentConstants.localEncodingBeta._proof_1internal/detail/privateNonadditivity.HaarMomentConstants.localEncodingBeta_leNonadditivity.HaarMomentConstants.norm_sum_classes_le_encodingMajorantNonadditivity.HaarMomentConstants.refinedClassCountMajorantNonadditivity.HaarMomentConstants.refinedClassCountMajorant._proof_1internal/detail/privateNonadditivity.HaarMomentConstants.refinedClassCountMajorant._proof_2internal/detail/privateNonadditivity.HaarMomentConstants.refinedClassCountMajorant_nonnegNonadditivity.HaarMomentConstants.refinedClassWeightMajorantNonadditivity.HaarMomentConstants.refinedClassWeightMajorant._proof_1internal/detail/privateNonadditivity.HaarMomentConstants.refinedClassWeightMajorant_nonnegNonadditivity.HaarMomentConstants.refinedClass_product_eqNonadditivity.HaarMomentConstants.refinedClass_product_eq._proof_1_1internal/detail/privateNonadditivity.HaarMomentConstants.refinedClass_product_eq._proof_1_2internal/detail/privateNonadditivity.HaarMomentConstants.refinedClass_product_eq._proof_1_3internal/detail/privateNonadditivity.HaarMomentConstants.refinedClass_product_leNonadditivity.HaarMomentConstants.sum_class_weights_le_encodingMajorantNonadditivity.HaarMomentConstants.sum_class_weights_le_encodingMajorant_mulNonadditivity.HaarMomentConstants.sum_refinedClass_products_leNonadditivity.HaarMomentConstants.sum_refinedClass_products_le._simp_1_2internal/detail/privateNonadditivity.HaarMomentConstants.sum_refinedClass_products_le._simp_1_3internal/detail/privateNonadditivity.HaarMomentConstants.vertex_dimension_cancellation
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarEncodingSlack78/-! # Scalar summation of the corrected two-generator path bounds910The input bounds retain their literal combinatorial factors: the coarse11class count, refinement count, coefficient cost, and Haar entry cost.12Their finite sum is bounded by the tracked prescribed-dimension majorant.13No path counting or operator estimate is postulated by this module.14-/15noncomputable section16namespace Nonadditivity.HaarMomentConstants17open scoped BigOperators1819/-- Coarse classes times refinements at singleton count `e` and vertex20deficit `r`; the graph defect is exactly `e + 2*r`. -/21def refinedClassCountMajorant (t : ℝ) (e r : ℕ) : ℝ :=22128^(e+2*r+2) * t^(3*(e+2*r)+6) * (4*t^2)^(3*(e+2*r)+4)2324/-- The normalized entry bound times the grouped coefficient bound after25the `N^v` vertex-label count cancels `N^(t/2)`. -/26def refinedClassWeightMajorant (p N t : ℝ) (e r : ℕ) : ℝ :=27(4/N^(r+1))*t^(e+2*r)*(t/N^(1/4:ℝ))^e * 2^e*p^(9*(e+2*r)+11)2829def localEncodingAlpha (p N t : ℝ) : ℝ :=3016384*t^11*p^9/N^(1/4:ℝ)3132def localEncodingBeta (p N t : ℝ) : ℝ :=3367108864*t^20*p^18/N3435theorem refinedClassCountMajorant_nonneg {t : ℝ} (ht : 0 ≤ t) (e r : ℕ) :360 ≤ refinedClassCountMajorant t e r := by37unfold refinedClassCountMajorant38positivity3940theorem refinedClassWeightMajorant_nonneg {p N t : ℝ}41(hp : 0 ≤ p) (hN : 0 ≤ N) (ht : 0 ≤ t) (e r : ℕ) :420 ≤ refinedClassWeightMajorant p N t e r := by43unfold refinedClassWeightMajorant44positivity4546/-- Exact collection of all constants and all powers, including the47corrected extra factor `128` per important event. -/48theorem refinedClass_product_eq (p N t : ℝ) (e r : ℕ) :49refinedClassCountMajorant t e r * refinedClassWeightMajorant p N t e r =50(4*16384*256*t^14*p^11/N) *51localEncodingAlpha p N t ^ e * localEncodingBeta p N t ^ r := by52unfold refinedClassCountMajorant refinedClassWeightMajorant53localEncodingAlpha localEncodingBeta54have h3 : 3*(e+2*r)+6=e*3+r*6+6 := by omega55have h4 : 3*(e+2*r)+4=e*3+r*6+4 := by omega56have h9 : 9*(e+2*r)+11=e*9+r*18+11 := by omega57rw [h3,h4,h9]58rw [show (16384:ℝ)=128*4^3*2 by norm_num,59show (67108864:ℝ)=128^2*4^6 by norm_num]60simp only [pow_add, pow_mul, mul_pow, div_pow, pow_succ]61ring6263theorem localEncodingAlpha_le {p N t : ℝ} (hp : 0 ≤ p)64(hN : 0 ≤ N) (ht0 : 0 ≤ t) (ht : t ≤ p) :65localEncodingAlpha p N t ≤ 128*alpha p N := by66have h := mul_le_mul_of_nonneg_left (local_alpha_le hp hN ht0 ht)67(by norm_num : (0:ℝ) ≤ 128)68unfold localEncodingAlpha69convert h using 1 <;> ring7071theorem localEncodingBeta_le {p N t : ℝ}72(hN : 0 ≤ N) (ht0 : 0 ≤ t) (ht : t ≤ p) :73localEncodingBeta p N t ≤ 16384*beta p N := by74have h := mul_le_mul_of_nonneg_left (local_beta_le hN ht0 ht)75(by norm_num : (0:ℝ) ≤ 16384)76unfold localEncodingBeta77convert h using 1 <;> ring7879/-- A single pair of graph statistics contributes one term of the two80finite geometric sums in the encoding majorant. -/81theorem refinedClass_product_le {p N t : ℝ}82(hp : 0 ≤ p) (hN : 0 < N) (ht1 : 1 ≤ t) (ht : t ≤ p) (e r : ℕ) :83refinedClassCountMajorant t e r * refinedClassWeightMajorant p N t e r ≤84(16384*t^3*((25/4)*(4*t^3)^4*p^11/N*85Real.exp (t^2/N^(1/4:ℝ)))) *86(128*alpha p N)^e*(16384*beta p N)^r := by87have ht0 : 0 ≤ t := by linarith88have ha0 : 0 ≤ localEncodingAlpha p N t := by89unfold localEncodingAlpha90positivity91have hb0 : 0 ≤ localEncodingBeta p N t := by92unfold localEncodingBeta93positivity94have ht14 : t^14 ≤ t^15 := pow_le_pow_right₀ ht1 (by norm_num)95have he : 1 ≤ Real.exp (t^2/N^(1/4:ℝ)) := Real.one_le_exp (by positivity)96have hbase : 4*16384*256*t^14*p^11/N ≤9716384*t^3*((25/4)*(4*t^3)^4*p^11/N*98Real.exp (t^2/N^(1/4:ℝ))) := by99calc100_ ≤ (25/4)*16384*256*t^15*p^11/N*Real.exp (t^2/N^(1/4:ℝ)) := by101calc102_ ≤ (25/4)*16384*256*t^15*p^11/N := by gcongr <;> norm_num103_ ≤ _ := le_mul_of_one_le_right (by positivity) he104_ = _ := by ring105rw [refinedClass_product_eq]106have ha' : 0 ≤ 128*alpha p N := by unfold alpha; positivity107exact mul_le_mul108(mul_le_mul hbase (pow_le_pow_left₀ ha0 (localEncodingAlpha_le hp hN.le ht0 ht) e)109(pow_nonneg ha0 e) (by positivity))110(pow_le_pow_left₀ hb0 (localEncodingBeta_le hN.le ht0 ht) r)111(pow_nonneg hb0 r) (by positivity)112113/-- Summing every admissible singleton/vertex-deficit pair yields exactly114the finite majorant required by the later error estimate. -/115theorem sum_refinedClass_products_le {p N t : ℝ}116(hp : 0 ≤ p) (hN : 0 < N) (ht1 : 1 ≤ t) (ht : t ≤ p) (a b : ℕ) :117(∑ e ∈ Finset.range a, ∑ r ∈ Finset.range b,118refinedClassCountMajorant t e r * refinedClassWeightMajorant p N t e r) ≤119encodingMajorant p N t a b := by120calc121_ ≤ ∑ e ∈ Finset.range a, ∑ r ∈ Finset.range b,122(16384*t^3*((25/4)*(4*t^3)^4*p^11/N*123Real.exp (t^2/N^(1/4:ℝ)))) *124(128*alpha p N)^e*(16384*beta p N)^r := by125exact Finset.sum_le_sum fun e _ => Finset.sum_le_sum fun r _ =>126refinedClass_product_le hp hN ht1 ht e r127_ = _ := by128simp only [encodingMajorant, ← Finset.mul_sum, ← Finset.sum_mul]129ring130131/-- Finite classes may be indexed by any concrete type. Their actual132singleton and vertex-deficit fibres supply the counting hypotheses. -/133theorem sum_class_weights_le_encodingMajorant {C : Type*} [DecidableEq C]134(s : Finset C) (singleton deficit : C → ℕ) (weight : C → ℝ)135{p N t : ℝ} (hp : 0 ≤ p) (hN : 0 < N) (ht1 : 1 ≤ t) (ht : t ≤ p)136(a b : ℕ)137(hstats : ∀ c ∈ s, singleton c < a ∧ deficit c < b)138(hcard : ∀ e ∈ Finset.range a, ∀ r ∈ Finset.range b,139((s.filter (fun c => singleton c=e ∧ deficit c=r)).card:ℝ) ≤140refinedClassCountMajorant t e r)141(hweight : ∀ c ∈ s, weight c ≤142refinedClassWeightMajorant p N t (singleton c) (deficit c)) :143(∑ c ∈ s, weight c) ≤ encodingMajorant p N t a b := by144classical145have hm : ∀ c ∈ s, (singleton c,deficit c) ∈146(Finset.range a).product (Finset.range b) := by147intro c hc148exact Finset.mem_product.mpr149⟨Finset.mem_range.mpr (hstats c hc).1, Finset.mem_range.mpr (hstats c hc).2⟩150calc151_ ≤ ∑ c ∈ s, refinedClassWeightMajorant p N t (singleton c) (deficit c) :=152Finset.sum_le_sum hweight153_ = ∑ e ∈ Finset.range a, ∑ r ∈ Finset.range b,154((s.filter (fun c => singleton c=e ∧ deficit c=r)).card:ℝ) *155refinedClassWeightMajorant p N t e r := by156have hh := Finset.sum_fiberwise_of_maps_to' hm157(fun q : ℕ × ℕ => refinedClassWeightMajorant p N t q.1 q.2)158rw [Finset.product_eq_sprod, Finset.sum_product] at hh159simpa only [Finset.sum_product, Prod.mk.injEq, Finset.sum_const,160nsmul_eq_mul] using hh.symm161_ ≤ ∑ e ∈ Finset.range a, ∑ r ∈ Finset.range b,162refinedClassCountMajorant t e r * refinedClassWeightMajorant p N t e r := by163apply Finset.sum_le_sum164intro e he165apply Finset.sum_le_sum166intro r hr167exact mul_le_mul_of_nonneg_right (hcard e he r hr)168(refinedClassWeightMajorant_nonneg hp hN.le (by linarith) e r)169_ ≤ _ := sum_refinedClass_products_le hp hN ht1 ht a b170171/-- The same finite class sum with the common polynomial norm factor. -/172theorem sum_class_weights_le_encodingMajorant_mul {C : Type*} [DecidableEq C]173(s : Finset C) (singleton deficit : C → ℕ) (weight : C → ℝ)174{p N t scale : ℝ} (hp : 0 ≤ p) (hN : 0 < N)175(ht1 : 1 ≤ t) (ht : t ≤ p) (hscale : 0 ≤ scale) (a b : ℕ)176(hstats : ∀ c ∈ s, singleton c < a ∧ deficit c < b)177(hcard : ∀ e ∈ Finset.range a, ∀ r ∈ Finset.range b,178((s.filter (fun c => singleton c=e ∧ deficit c=r)).card:ℝ) ≤179refinedClassCountMajorant t e r)180(hweight : ∀ c ∈ s, weight c ≤181refinedClassWeightMajorant p N t (singleton c) (deficit c)*scale) :182(∑ c ∈ s, weight c) ≤ encodingMajorant p N t a b*scale := by183calc184_ ≤ ∑ c ∈ s,185refinedClassWeightMajorant p N t (singleton c) (deficit c)*scale :=186Finset.sum_le_sum hweight187_ = (∑ c ∈ s, refinedClassWeightMajorant p N t (singleton c) (deficit c))*scale :=188(Finset.sum_mul ..).symm189_ ≤ _ := mul_le_mul_of_nonneg_right190(sum_class_weights_le_encodingMajorant s singleton deficit _ hp hN ht1 ht a b191hstats hcard (fun _ _ => le_rfl)) hscale192193/-- Operator-valued grouped class sums use exactly the same scalar bound. -/194theorem norm_sum_classes_le_encodingMajorant {C E : Type*} [DecidableEq C]195[NormedAddCommGroup E] (s : Finset C) (singleton deficit : C → ℕ) (term : C → E)196{p N t scale : ℝ} (hp : 0 ≤ p) (hN : 0 < N)197(ht1 : 1 ≤ t) (ht : t ≤ p) (hscale : 0 ≤ scale) (a b : ℕ)198(hstats : ∀ c ∈ s, singleton c < a ∧ deficit c < b)199(hcard : ∀ e ∈ Finset.range a, ∀ r ∈ Finset.range b,200((s.filter (fun c => singleton c=e ∧ deficit c=r)).card:ℝ) ≤201refinedClassCountMajorant t e r)202(hterm : ∀ c ∈ s, ‖term c‖ ≤203refinedClassWeightMajorant p N t (singleton c) (deficit c)*scale) :204‖∑ c ∈ s, term c‖ ≤ encodingMajorant p N t a b*scale := by205exact (norm_sum_le s term).trans206(sum_class_weights_le_encodingMajorant_mul s singleton deficit (fun c => ‖term c‖)207hp hN ht1 ht hscale a b hstats hcard hterm)208209/-- The trace normalization and vertex-label count leave precisely one210dimension denominator for each deficit and one for the normalized trace. -/211theorem vertex_dimension_cancellation {N : ℝ} (hN : N ≠ 0) (v r : ℕ) :212(N^v/N) * (4/N^(v+r)) = 4/N^(r+1) := by213rw [pow_add, pow_succ]214field_simp215216theorem graph_defect_eq_singletons_add_twice_deficit217{t v e r : ℕ} (hlen : t=2*(v+r)) :218t+e-2*v=e+2*r := by omega219220theorem even_length_deficit_identity {t v : ℕ} (ht : Even t) (hv : v ≤ t/2) :221t=2*(v+(t/2-v)) := by222obtain ⟨k,hk⟩ := ht223omega224225end Nonadditivity.HaarMomentConstants