Source audit
Definitions, theorems, assumptions, proof route, and exact anchors.
Stable source-facing chapter environment inside the shared Samplinglib reader.
Definitions, theorems, assumptions, proof route, and exact anchors.
Search Mathlib, Optlib, CvxLean, and shared Samplinglib interfaces; preserve the exact Chewi statement and use a small adapter when conventions differ.
Only genuinely missing mathematical edges become theorem-sized tasks.
Dependencies, consumers, cross-library bridges, and reusable shared interfaces.
Hongjia Chen, Chenyi Li, Wanyi He, Zaiwen Wen, Optlib (Apache-2.0). Samplinglib native port and original exposition; not quoted textbook prose.
Optlib 5da27c5f95aa6a8a45b8c14b968ade4c13ff18c3 · Lipschitz_to_bounded_subgradient:80–118 · faithful paraphrase
For any globally G-Lipschitz real-valued function on a real inner-product space, every global supporting vector v at x satisfies ‖v‖≤G.
Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.
AutoSamplingTheory.TechnicalLemmas.Analysis.SubgradientMethod.norm_le_of_supportsAt · theorem · Teaching coverage
For any globally G-Lipschitz real-valued function on a real inner-product space, every global supporting vector v at x satisfies ‖v‖≤G.
A supplied global supporting vector of a globally G-Lipschitz objective has norm at most G.
Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.
theorem norm_le_of_supportsAt {f : E → ℝ} {G : ℝ≥0} {x g : E}
(hf : LipschitzWith G f) (hs : SupportsAt f x g) : ‖g‖ ≤ (G : ℝ)Evaluate the global supporting inequality at z=x+v. The pairing is exactly ‖v‖², with no derivative or inverse norm needed.
The function increment is at most its absolute value, and global Lipschitz continuity bounds that absolute value by G‖v‖.
If v=0 the result is nonnegativity of G. Otherwise ‖v‖>0, so the quadratic inequality implies ‖v‖≤G. This is the same bound as the upstream normalized-direction argument, with a division-free proof.
Evaluate the global supporting inequality at z=x+v. The pairing is exactly ‖v‖², with no derivative or inverse norm needed.
SupportsAt evaluated at x+g; real_inner_self_eq_norm_sq.
The function increment is at most its absolute value, and global Lipschitz continuity bounds that absolute value by G‖v‖.
LipschitzWith.dist_le_mul; Real.dist_eq; le_abs_self.
If v=0 the result is nonnegativity of G. Otherwise ‖v‖>0, so the quadratic inequality implies ‖v‖≤G. This is the same bound as the upstream normalized-direction argument, with a division-free proof.
norm_nonneg; zero/nonzero split; nlinarith.
The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.
Probe at x+v, compare the quadratic lower growth with Lipschitz upper growth, and separate the zero-norm case.
Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.
theorem norm_le_of_supportsAt {f : E → ℝ} {G : ℝ≥0} {x g : E}
(hf : LipschitzWith G f) (hs : SupportsAt f x g) : ‖g‖ ≤ (G : ℝ) := by
have hs' := hs (x + g)
change f x + inner ℝ g (x + g - x) ≤ f (x + g) at hs'
rw [add_sub_cancel_left, real_inner_self_eq_norm_sq] at hs'
have hl : f (x + g) - f x ≤ (G : ℝ) * ‖g‖ := by
calc
f (x + g) - f x ≤ |f (x + g) - f x| := le_abs_self _
_ ≤ (G : ℝ) * ‖g‖ := by
simpa [Real.dist_eq, dist_eq_norm] using hf.dist_le_mul (x + g) x
by_cases hg : ‖g‖ = 0
· simp [hg]
· have hp : 0 < ‖g‖ := lt_of_le_of_ne (norm_nonneg _) (Ne.symm hg)
nlinarith| Source | Actual Lean | Difference kind | Why it matters |
|---|---|---|---|
| Global real Hilbert supporting-vector inequality and NNReal Lipschitz constant. | Existing SupportsAt predicate is the same inequality; no differentiability, chosen global optimizer or norm-bound premise. | same | Upstream SubderivAt membership is unbundled into its literal supporting inequality. No theorem conclusion is moved into the inputs. |
| No completeness used in this upstream direction. | No completeness assumption, matching the upstream omit command. | same | Only the real inner-product carrier and global Lipschitz/support facts are used. |
No existence or measurable selection of supporting vectors is claimed. The theorem does not require convexity once a global supporting vector is supplied, just as the corresponding upstream direction. This is a native local port of the norm bound, not a bulk import of Optlib or a sampling convergence result.
Encoder–denoiser: accepted · equivalent-after-elaboration
A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.
Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.
Hongjia Chen, Chenyi Li, Wanyi He, Zaiwen Wen, Optlib (Apache-2.0). Samplinglib native port and original exposition; not quoted textbook prose.
Optlib 5da27c5f95aa6a8a45b8c14b968ade4c13ff18c3 · subgradient_method_converge one-step/telescope:137–232 · faithful paraphrase
Let f be globally G-Lipschitz. For sequences x_k,v_k and nonnegative real steps a_k, suppose v_k supports f at x_k and x_(k+1)=x_k−a_k v_k for every k. For every comparator z and every N≥0, the weighted objective gaps obey the displayed bound, including the terminal squared distance.
Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.
AutoSamplingTheory.TechnicalLemmas.Analysis.SubgradientMethod.sum_weighted_gap_le · theorem · Teaching coverage
Let f be globally G-Lipschitz. For sequences x_k,v_k and nonnegative real steps a_k, suppose v_k supports f at x_k and x_(k+1)=x_k−a_k v_k for every k. For every comparator z and every N≥0, the weighted objective gaps obey the displayed bound, including the terminal squared distance.
Finite weighted-gap telescope for actual Lipschitz subgradient updates with nonnegative steps.
Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.
theorem sum_weighted_gap_le {f : E → ℝ} {G : ℝ≥0} {x g : ℕ → E} {a : ℕ → ℝ}
(hf : LipschitzWith G f) (ha : ∀ k, 0 ≤ a k)
(hs : ∀ k, SupportsAt f (x k) (g k))
(hx : ∀ k, x (k + 1) = x k - a k • g k) (z : E) (N : ℕ) :
2 * (∑ k ∈ Finset.range N, a k * (f (x k) - f z)) ≤
‖x 0 - z‖ ^ 2 + (G : ℝ) ^ 2 * (∑ k ∈ Finset.range N, (a k) ^ 2) - ‖x N - z‖ ^ 2Use the supporting inequality at the comparator z and reverse the displacement. The norm bound is proved by the preceding theorem inside this proof; it is not a new hypothesis.
The squared-distance identity is exact for the supplied recurrence. Multiplying the gap estimate by 2a_k is legitimate because the step is nonnegative; the squared subgradient term is at most a_k²G².
Sum the one-step inequality for k=0,…,N−1. Interior squared distances cancel, leaving the initial and terminal terms. The Lean induction performs exactly this finite telescope; the empty sum is the N=0 base case.
Use the supporting inequality at the comparator z and reverse the displacement. The norm bound is proved by the preceding theorem inside this proof; it is not a new hypothesis.
SupportsAt evaluated at z; inner_sub_right; norm_le_of_supportsAt.
The squared-distance identity is exact for the supplied recurrence. Multiplying the gap estimate by 2a_k is legitimate because the step is nonnegative; the squared subgradient term is at most a_k²G².
norm_sub_sq_real; norm_smul; sq_abs; pow_le_pow_left₀; mul_le_mul_of_nonneg_left.
Sum the one-step inequality for k=0,…,N−1. Interior squared distances cancel, leaving the initial and terminal terms. The Lean induction performs exactly this finite telescope; the empty sum is the N=0 base case.
Finset.sum_range_succ; induction on N; nlinarith.
The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.
Prove the support gap and subgradient norm bounds, expand the actual squared-distance update, then telescope by induction.
Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.
theorem sum_weighted_gap_le {f : E → ℝ} {G : ℝ≥0} {x g : ℕ → E} {a : ℕ → ℝ}
(hf : LipschitzWith G f) (ha : ∀ k, 0 ≤ a k)
(hs : ∀ k, SupportsAt f (x k) (g k))
(hx : ∀ k, x (k + 1) = x k - a k • g k) (z : E) (N : ℕ) :
2 * (∑ k ∈ Finset.range N, a k * (f (x k) - f z)) ≤
‖x 0 - z‖ ^ 2 + (G : ℝ) ^ 2 * (∑ k ∈ Finset.range N, (a k) ^ 2) - ‖x N - z‖ ^ 2 := by
have hstep (k : ℕ) :
2 * a k * (f (x k) - f z) ≤
‖x k - z‖ ^ 2 - ‖x (k + 1) - z‖ ^ 2 + (G : ℝ) ^ 2 * (a k) ^ 2 := by
have hs' := hs k z
change f (x k) + inner ℝ (g k) (z - x k) ≤ f z at hs'
have hpair : f (x k) - f z ≤ inner ℝ (g k) (x k - z) := by
rw [inner_sub_right] at hs' ⊢
linarith
have hg := norm_le_of_supportsAt hf (hs k)
have hgsq : ‖g k‖ ^ 2 ≤ (G : ℝ) ^ 2 :=
pow_le_pow_left₀ (norm_nonneg _) hg 2
have hnorm : ‖x (k + 1) - z‖ ^ 2 =
‖x k - z‖ ^ 2 - 2 * a k * inner ℝ (g k) (x k - z) + (a k) ^ 2 * ‖g k‖ ^ 2 := by
rw [hx k, sub_right_comm, norm_sub_sq_real, inner_smul_right,
norm_smul, Real.norm_eq_abs, mul_pow, sq_abs, real_inner_comm (x k - z)]
ring
have hp := mul_le_mul_of_nonneg_left hpair (mul_nonneg (by norm_num : (0 : ℝ) ≤ 2) (ha k))
have hn := mul_le_mul_of_nonneg_left hgsq (sq_nonneg (a k))
nlinarith
induction N with
| zero => simp
| succ N ih =>
rw [Finset.sum_range_succ, Finset.sum_range_succ]
nlinarith [hstep N]| Source | Actual Lean | Difference kind | Why it matters |
|---|---|---|---|
| Global real Hilbert supporting-vector inequality and NNReal Lipschitz constant. | Existing SupportsAt predicate is the same inequality; no differentiability, chosen global optimizer or norm-bound premise. | same | Upstream SubderivAt membership is unbundled into its literal supporting inequality. No theorem conclusion is moved into the inputs. |
| Source algorithm positive steps; proof intermediate with a terminal distance. | Nonnegative steps and N=0 also permitted in a division-free weighted estimate. | generalization | Zero steps/empty sum are algebraic endpoint extensions; not normalized at zero. |
This exposes the stronger weighted intermediate estimate used by the upstream convergence proof. It does not assert monotonicity of function values or a last-iterate rate. The source uses positive steps; allowing zero steps and N=0 here is an explicit division-free generalization, not a repair. No stochastic oracle, kernel or expected sampling cost is constructed.
Encoder–denoiser: accepted · equivalent-after-elaboration
A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.
AutoSamplingTheory.TechnicalLemmas.Analysis.SubgradientMethod.norm_le_of_supportsAtAutoSamplingTheory.TechnicalLemmas.Analysis.ConvexSubgradient.SupportsAtSamplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.
Hongjia Chen, Chenyi Li, Wanyi He, Zaiwen Wen, Optlib (Apache-2.0). Samplinglib native port and original exposition; not quoted textbook prose.
Optlib 5da27c5f95aa6a8a45b8c14b968ade4c13ff18c3 · subgradient_method_converge:149–232 · faithful paraphrase
Under the same Lipschitz, support and exact-update assumptions, suppose every step is strictly positive and N>0. For any comparator z, some index i<N satisfies the displayed normalized best-iterate objective-gap bound.
Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.
AutoSamplingTheory.TechnicalLemmas.Analysis.SubgradientMethod.exists_gap_le · theorem · Teaching coverage
Under the same Lipschitz, support and exact-update assumptions, suppose every step is strictly positive and N>0. For any comparator z, some index i<N satisfies the displayed normalized best-iterate objective-gap bound.
A positive finite subgradient run has a best index with the normalized objective-gap guarantee.
Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.
theorem exists_gap_le {f : E → ℝ} {G : ℝ≥0} {x g : ℕ → E} {a : ℕ → ℝ}
(hf : LipschitzWith G f) (ha : ∀ k, 0 < a k)
(hs : ∀ k, SupportsAt f (x k) (g k))
(hx : ∀ k, x (k + 1) = x k - a k • g k) (z : E) {N : ℕ} (hN : 0 < N) :
∃ i < N, f (x i) - f z ≤
(‖x 0 - z‖ ^ 2 + (G : ℝ) ^ 2 * (∑ k ∈ Finset.range N, (a k) ^ 2)) /
(2 * ∑ k ∈ Finset.range N, a k)Choose i minimizing f(x_k) among k<N. This finite choice exists because N>0; it is not a default value of a totalized infimum.
Multiply each minimum inequality by a_k≥0 and sum. Apply the preceding actual-update telescope, then discard only the nonnegative terminal squared distance.
The sum of positive steps over a nonempty finite range is positive. Dividing by twice that sum preserves the inequality and produces the claimed witness.
Choose i minimizing f(x_k) among k<N. This finite choice exists because N>0; it is not a default value of a totalized infimum.
Finset.exists_min_image; range nonempty from 0<N.
Multiply each minimum inequality by a_k≥0 and sum. Apply the preceding actual-update telescope, then discard only the nonnegative terminal squared distance.
Finset.sum_le_sum; Finset.sum_mul; sum_weighted_gap_le; sq_nonneg.
The sum of positive steps over a nonempty finite range is positive. Dividing by twice that sum preserves the inequality and produces the claimed witness.
Finset.sum_pos; le_div_iff₀. No zero-step quotient is asserted.
The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.
Choose a minimizing finite index, bound its gap by the weighted gaps, use the actual-update telescope, and divide by the proved positive total step.
Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.
theorem exists_gap_le {f : E → ℝ} {G : ℝ≥0} {x g : ℕ → E} {a : ℕ → ℝ}
(hf : LipschitzWith G f) (ha : ∀ k, 0 < a k)
(hs : ∀ k, SupportsAt f (x k) (g k))
(hx : ∀ k, x (k + 1) = x k - a k • g k) (z : E) {N : ℕ} (hN : 0 < N) :
∃ i < N, f (x i) - f z ≤
(‖x 0 - z‖ ^ 2 + (G : ℝ) ^ 2 * (∑ k ∈ Finset.range N, (a k) ^ 2)) /
(2 * ∑ k ∈ Finset.range N, a k) := by
have hne : (Finset.range N).Nonempty := ⟨0, Finset.mem_range.mpr hN⟩
obtain ⟨i, hi, hmin⟩ := Finset.exists_min_image (Finset.range N) (fun k => f (x k)) hne
refine ⟨i, Finset.mem_range.mp hi, ?_⟩
have hsumpos : 0 < ∑ k ∈ Finset.range N, a k :=
Finset.sum_pos (fun k _ => ha k) hne
have hlower : (∑ k ∈ Finset.range N, a k) * (f (x i) - f z) ≤
∑ k ∈ Finset.range N, a k * (f (x k) - f z) := by
rw [Finset.sum_mul]
exact Finset.sum_le_sum fun k hk =>
mul_le_mul_of_nonneg_left (sub_le_sub_right (hmin k hk) _) (ha k).le
have he := sum_weighted_gap_le hf (fun k => (ha k).le) hs hx z N
apply (le_div_iff₀ (mul_pos (by norm_num : (0 : ℝ) < 2) hsumpos)).mpr
nlinarith [sq_nonneg ‖x N - z‖]
end AutoSamplingTheory.TechnicalLemmas.Analysis.SubgradientMethod| Source | Actual Lean | Difference kind | Why it matters |
|---|---|---|---|
| Global real Hilbert supporting-vector inequality and NNReal Lipschitz constant. | Existing SupportsAt predicate is the same inequality; no differentiability, chosen global optimizer or norm-bound premise. | same | Upstream SubderivAt membership is unbundled into its literal supporting inequality. No theorem conclusion is moved into the inputs. |
| Positive steps, k+1 iterates and real sInf of finitely many values. | N>0 and an actual finite minimizing index; denominator positivity is derived. | same | Finite attained minimum equals the real sInf; x₀ is represented literally by x 0. |
The upstream theorem writes the best finite value as a real sInf over k+1 iterates. An actual minimizing index is equivalent on this nonempty finite set; N>0 corresponds to its k+1 horizon. No claim is made about the last iterate, existence of subgradient selectors, asymptotic iterate convergence, stochastic selection, PBPS/SPHMC or sampling complexity. These are reusable Optlib-source components placed beside Optimisation Chapter6; the complete Chewi chapter statement/route is not silently declared finished.
Encoder–denoiser: accepted · equivalent-after-elaboration
A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.
Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.