Exact Lean source
Nonadditivity.WeightedParameters
Download original .lean · View on GitHub · Jump to source
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
6 project constants, including generated, internal and private declarations.
6 declarations
Nonadditivity.WeightedParameters.exists_amplification_budgetNonadditivity.WeightedParameters.exists_collinsYoun_budgetNonadditivity.WeightedParameters.exists_norm_budgetNonadditivity.WeightedParameters.exists_positive_small_of_tendstoNonadditivity.WeightedParameters.exists_small_perturbationNonadditivity.WeightedParameters.exists_small_perturbation._proof_1_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.WeightedBlock7import Nonadditivity.WeightedBellScalar89/-! A strict amplification budget leaves room for a nonzero perturbation of the10unitary probabilities before choosing the finite-moment damping order. -/11noncomputable section12namespace Nonadditivity.WeightedParameters13open BlockScalars Filter Topology14open scoped Matrix.Norms.L2Operator1516/-- A positive scalar gap absorbs the exact output-filter error `δ(2+δ)`. -/17theorem exists_norm_budget {a b c : ℝ} (hab : a<b) (hc : 0<c) :18∃ δ : ℝ, 0<δ ∧ δ≤1 ∧ a*c+δ*(2+δ)≤b*c := by19let d : ℝ := (b-a)*c20have hd : 0<d := mul_pos (sub_pos.mpr hab) hc21let δ : ℝ := min 1 (d/3)22have hδ : 0<δ := lt_min (by norm_num) (by positivity)23have hδone : δ≤1 := min_le_left _ _24have hδd : δ≤d/3 := min_le_right _ _25refine ⟨δ,hδ,hδone,?_⟩26have hsq : δ^2≤δ := by nlinarith27dsimp [d] at hδd28nlinarith2930/-- Spend half the entropy tolerance on uniform damping and retain a strictly31positive norm budget for nonuniform probabilities. -/32theorem exists_amplification_budget {c η : ℝ} (hc : 0<c) (hη : 0<η) :33∃ δ : ℝ, 0<δ ∧ δ≤1 ∧34amplification (η/2)*c+δ*(2+δ)≤amplification η*c := by35apply exists_norm_budget ?_ hc36unfold amplification37exact Real.exp_lt_exp.mpr (by linarith)3839theorem exists_collinsYoun_budget {K n : ℕ} {η : ℝ}40(hK : 2≤K) (hn : 1≤n) (hη : 0<η) :41∃ δ : ℝ, 0<δ ∧ δ≤1 ∧42amplification (η/2)*collinsYounConstant K n+δ*(2+δ) ≤43amplification η*collinsYounConstant K n :=44exists_amplification_budget (collinsYounConstant_pos hK hn) hη4546/-- A function vanishing at zero is small at some strictly positive parameter,47with any prescribed positive upper bound on that parameter. -/48theorem exists_positive_small_of_tendsto {f : ℝ → ℝ}49(hf : Tendsto f (𝓝 0) (𝓝 0)) {ε b : ℝ} (hε : 0<ε) (hb : 0<b) :50∃ t : ℝ, 0<t ∧ t<b ∧ f t<ε := by51have hevent : ∀ᶠ t in 𝓝 (0 : ℝ), f t<ε := hf.eventually (gt_mem_nhds hε)52obtain ⟨r,hr,hclose⟩ := Metric.eventually_nhds_iff.mp hevent53let t : ℝ := min (r/2) (b/2)54have ht : 0<t := lt_min (by positivity) (by positivity)55have htr : t<r := lt_of_le_of_lt (min_le_left _ _) (by linarith)56have htb : t<b := lt_of_le_of_lt (min_le_right _ _) (by linarith)57refine ⟨t,ht,htb,hclose ?_⟩58simpa only [Real.dist_eq,sub_zero,abs_of_pos ht] using htr5960/-- Choose genuine nonuniform probabilities as close as required to the uniform61output scaling, before any finite input dimension or moment order is chosen. -/62theorem exists_small_perturbation {K : ℕ} [NeZero K] (hK : 2≤K) (n : ℕ)63{δ : ℝ} (hδ : 0<δ) :64∃ t : ℝ, 0<t ∧ t<1/(K : ℝ) ∧65‖WeightedBlock.outputScale (WeightedBellScalar.perturbedWeights hK t) n-1‖≤δ := by66have hKpos : (0 : ℝ)<K := by exact_mod_cast (show 0<K by omega)67have hlim := WeightedBlock.outputScale_norm_sub_one_tendsto68(WeightedBellScalar.perturbedWeights hK)69(WeightedBellScalar.continuous_perturbedWeights_apply hK)70(WeightedBellScalar.perturbedWeights_zero hK) n71obtain ⟨t,ht,htK,hsmall⟩ := exists_positive_small_of_tendsto hlim hδ72(show 0<1/(K : ℝ) by positivity)73exact ⟨t,ht,htK,hsmall.le⟩7475end Nonadditivity.WeightedParameters