Samplinglib
Lean gate not recorded for this source state main · 0e31a3cda412
ASTIS mathematical exposition

Quadratics attain the constant-step worst-case distance bound

AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentSharpness.exists_quadratic_worst_case · theorem · Teaching coverage

Statement

For every 0<alpha<=beta and real fixed step h, there is one positive scalar curvature mu in {alpha,beta} whose actual quadratic belongs to the alpha-strongly convex, beta-smooth class and realizes the following bounds for every natural N.

\[f(x)=\tfrac\mu2x^2,\quad T_t(x)=x-t\nabla f(x),\quad \forall N\in\mathbb N:\quad \|T_h^N(1)\|=M_h^N\ge q^N,\qquad \|T_{h_\star}^N(1)\|=q^N.\]

All objects and hypotheses

  • Alpha,beta,h are real, 0<alpha<=beta. Define M_h=max{|1−h alpha|,|1−h beta|}, q=(beta−alpha)/(alpha+beta) and hstar=2/(alpha+beta). The denominator is positive.
  • The conclusion constructs mu∈{alpha,beta}, mu>0, and f:R→R, f(x)=mu x²/2. It certifies ContDiff R2 f, StrongConvexOn univ alpha f, the global beta quadratic upper model using the actual gradient, and IsMinOn f univ0.
  • T_t is the actual gradient update with real constant step t; T_t^0 is the identity. The initial point is1 and the certified minimizer is0. One mu works for all N, including zero.

Mathematical proof

1. Select an endpoint after fixing the step

Let M_h be the larger of the two endpoint magnitudes. Choose mu=alpha or beta attaining this maximum. Then alpha<=mu<=beta and mu>0. This choice does not depend on N.

\[M_h=\max\{|1-h\alpha|,|1-h\beta|\},\qquad \mu\in\{\alpha,\beta\},\quad |1-h\mu|=M_h.\]
Corresponding Lean step

Order comparison and max_eq_left/max_eq_right.

2. Verify the witness belongs to the function class

Set f(x)=mu x²/2. Differentiate to get the actual gradient mu x. Subtracting mu‖x‖²/2 leaves the zero convex function; lowering the strong-convexity modulus gives alpha. The exact quadratic remainder is mu(y−x)²/2, which is bounded above by beta(y−x)²/2. Positivity makes0 a global minimizer.

\[\nabla f(x)=\mu x,\qquad f(y)-f(x)-\nabla f(x)(y-x)=\tfrac\mu2(y-x)^2\le\tfrac\beta2(y-x)^2,\qquad f(0)=0\le f(x).\]
Corresponding Lean step

HasDerivAt.hasGradientAt; strongConvexOn_iff_convex; StrongConvexOn.mono; quadratic remainder algebra.

3. Reuse the exact quadratic trajectory and minimax envelope

Apply the compiled eigenmode identity to H=mu I and x0=1. Its norm is |1−hmu|^N=M_h^N. The compiled optimal-step theorem applied to this certified objective gives q<=M_h. Since q>=0, raising to N preserves the inequality.

\[\|T_h^N(1)\|=M_h^N\ge q^N,\qquad q=\frac{\beta-\alpha}{\alpha+\beta}.\]
Corresponding Lean step

QuadraticGradientDescent.quadratic_eigenmode; GradientDescentOptimalStep.optimal_gradient_step; pow_le_pow_left₀.

4. Attain the balanced factor on the same witness

At hstar=2/(alpha+beta), the two endpoint update scalars are q and−q. Either selected mu therefore gives absolute factor q, and the same exact trajectory yields q^N for every N. Together with the previously compiled uniform one-step upper bound, this witnesses its class-level sharpness.

\[h_\star=\frac2{\alpha+\beta},\qquad1-h_\star\alpha=q,\quad1-h_\star\beta=-q,\qquad\|T_{h_\star}^N(1)\|=q^N.\]
Corresponding Lean step

Endpoint field arithmetic, abs_of_nonneg, abs_neg, and the local specialization of quadratic_eigenmode.

Lean statement · exists_quadratic_worst_case

Positive class curvature bounds; every fixed real step admits one actual positive scalar quadratic, all class certificates, and exact/lower distance identities for all natural iterations.

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_quadratic_worst_case {α β : ℝ} (hα : 0 < α) (hαβ : α ≤ β) (h : ℝ) :
    ∃ μ : ℝ, (μ = α ∨ μ = β) ∧ 0 < μ ∧
      let f : ℝ → ℝ := fun x => μ * x ^ 2 / 2
      ContDiff ℝ 2 f ∧ StrongConvexOn univ α f ∧
      (∀ x y, f y ≤ f x + inner ℝ (gradient f x) (y - x) + β / 2 * ‖y - x‖ ^ 2) ∧
      IsMinOn f univ 0 ∧
      ∀ N : ℕ,
        ‖(fun x => x - h * gradient f x)^[N] 1‖ = (max |1 - h * α| |1 - h * β|) ^ N ∧
        ((β - α) / (α + β)) ^ N ≤ ‖(fun x => x - h * gradient f x)^[N] 1‖ ∧
        ‖(fun x => x - (2 / (α + β)) * gradient f x)^[N] 1‖ =
          ((β - α) / (α + β)) ^ N

Exact module and namespace context

Lean proof · exists_quadratic_worst_case

Let M_h be the larger of the two endpoint magnitudes. Choose mu=alpha or beta attaining this maximum. Then alpha<=mu<=beta and mu>0. This choice does not depend on N. Set f(x)=mu x²/2. Differentiate to get the actual gradient mu x. Subtracting mu‖x‖²/2 leaves the zero convex function; lowering the strong-convexity modulus gives alpha. The exact quadratic remainder is mu(y−x)²/2, which is bounded above by beta(y−x)²/2. Positivity makes0 a global minimizer. Apply the compiled eigenmode identity to H=mu I and x0=1. Its norm is |1−hmu|^N=M_h^N. The compiled optimal-step theorem applied to this certified objective gives q<=M_h. Since q>=0, raising to N preserves the inequality. At hstar=2/(alpha+beta), the two endpoint update scalars are q and−q. Either selected mu therefore gives absolute factor q, and the same exact trajectory yields q^N for every N. Together with the previously compiled uniform one-step upper bound, this witnesses its class-level sharpness.

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_quadratic_worst_case {α β : ℝ} (hα : 0 < α) (hαβ : α ≤ β) (h : ℝ) :
    ∃ μ : ℝ, (μ = α ∨ μ = β) ∧ 0 < μ ∧
      let f : ℝ → ℝ := fun x => μ * x ^ 2 / 2
      ContDiff ℝ 2 f ∧ StrongConvexOn univ α f ∧
      (∀ x y, f y ≤ f x + inner ℝ (gradient f x) (y - x) + β / 2 * ‖y - x‖ ^ 2) ∧
      IsMinOn f univ 0 ∧
      ∀ N : ℕ,
        ‖(fun x => x - h * gradient f x)^[N] 1‖ = (max |1 - h * α| |1 - h * β|) ^ N ∧
        ((β - α) / (α + β)) ^ N ≤ ‖(fun x => x - h * gradient f x)^[N] 1‖ ∧
        ‖(fun x => x - (2 / (α + β)) * gradient f x)^[N] 1‖ =
          ((β - α) / (α + β)) ^ N := by
  obtain ⟨μ, hm, he⟩ : ∃ μ : ℝ, (μ = α ∨ μ = β) ∧
      |1 - h * μ| = max |1 - h * α| |1 - h * β| := by
    by_cases hc : |1 - h * α| ≤ |1 - h * β|
    · exact ⟨β, Or.inr rfl, (max_eq_right hc).symm⟩
    · exact ⟨α, Or.inl rfl, (max_eq_left (le_of_not_ge hc)).symm⟩
  have ham : α ≤ μ := by rcases hm with rfl | rfl <;> order
  have hmb : μ ≤ β := by rcases hm with rfl | rfl <;> order
  have hmpos : 0 < μ := hα.trans_le ham
  let f : ℝ → ℝ := fun x => μ * x ^ 2 / 2
  have hf : ContDiff ℝ 2 f := (contDiff_const.mul (contDiff_id.pow 2)).div_const 2
  have hg (x : ℝ) : gradient f x = μ * x := by
    have hd : HasDerivAt f (μ * x) x := by
      convert (((hasDerivAt_id x).pow 2).const_mul μ).div_const (2 : ℝ) using 1 <;> first | rfl | (simp only [id_eq]; ring)
    exact hd.hasGradientAt.gradient
  have hc : StrongConvexOn univ α f := by
    apply StrongConvexOn.mono ham
    rw [strongConvexOn_iff_convex]
    have hz : (fun x : ℝ => f x - μ / 2 * ‖x‖ ^ 2) = fun _ => 0 := by
      funext x; simp [f, Real.norm_eq_abs, sq_abs]; ring
    rw [hz]; exact convexOn_const _ convex_univ
  have hu : ∀ x y, f y ≤ f x + inner ℝ (gradient f x) (y - x) + β / 2 * ‖y - x‖ ^ 2 := by
    intro x y
    rw [hg]; simp only [f, Real.inner_apply, Real.norm_eq_abs, sq_abs]
    nlinarith [mul_nonneg (sub_nonneg.mpr hmb) (sq_nonneg (y-x))]
  have hmin : IsMinOn f univ 0 := by
    intro x _
    change μ * (0 : ℝ) ^ 2 / 2 ≤ μ * x ^ 2 / 2
    simpa using div_nonneg (mul_nonneg hmpos.le (sq_nonneg x)) (by norm_num : (0 : ℝ) ≤ 2)
  have hn (t : ℝ) (N : ℕ) :
      ‖(fun x => x - t * gradient f x)^[N] 1‖ = |1 - t * μ| ^ N := by
    have hs : (μ • (1 : ℝ →L[ℝ] ℝ)).IsSymmetric := by
      intro x y; simp [mul_comm, mul_left_comm]
    have heig : (μ • (1 : ℝ →L[ℝ] ℝ)) 1 = μ • (1 : ℝ) := by simp
    have hr := (quadratic_eigenmode (μ • (1 : ℝ →L[ℝ] ℝ)) hs heig t N).2.1
    have heq : (fun z : ℝ => inner ℝ z ((μ • (1 : ℝ →L[ℝ] ℝ)) z) / 2) = f := by
      funext z; simp [f]; ring
    simpa only [heq, smul_eq_mul, norm_one, mul_one] using hr
  have hβ : 0 < β := hα.trans_le hαβ
  have hD : 0 < α + β := add_pos hα hβ
  have hq : 0 ≤ (β - α) / (α + β) := div_nonneg (sub_nonneg.mpr hαβ) hD.le
  have hlow := (optimal_gradient_step hf hc hα.le hβ hαβ hu 0 1).2 h
  have hbal : |1 - 2 / (α + β) * μ| = (β - α) / (α + β) := by
    rcases hm with hma | hmb
    · rw [hma]
      have ha : 1 - 2 / (α + β) * α = (β - α) / (α + β) := by field_simp; ring
      rw [ha, abs_of_nonneg hq]
    · rw [hmb]
      have hb : 1 - 2 / (α + β) * β = -((β - α) / (α + β)) := by field_simp; ring
      rw [hb, abs_neg, abs_of_nonneg hq]
  refine ⟨μ, hm, hmpos, hf, hc, hu, hmin, ?_⟩
  intro N
  rw [hn h N, hn (2 / (α + β)) N, he, hbal]
  exact ⟨rfl, pow_le_pow_left₀ hq hlow N, rfl⟩

end AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentSharpness

Exact module and namespace context

Scope and omitted-condition boundaries

  • This is class-level sharpness for constant-step distance contraction. Alpha and beta are valid curvature bounds; a scalar witness has tight constants mu,mu, so beta/alpha is not claimed to be its intrinsic condition number. A fixed two-dimensional quadratic with both exact endpoint eigenvalues is not constructed.
  • The scalar witness is chosen after the step h but before N, and is valid for every N. This does not cover varying or adaptive step sequences, general first-order algorithms, acceleration, oracle complexity lower bounds, or all Section3 estimates.
  • Positive alpha is retained to ensure the witness is positive definite. Equal bounds are included; q=0 then, and N=0 still has distance1 because 0^0=1. Negative and zero h are allowed for the obstruction; no convergence for those steps is claimed.
  • The statement constructs a C2 quadratic and its global minimizer0, and uses actual gradients. No gradient identity, trajectory formula, smoothness model or minimizer certificate is supplied as a hypothesis. The starting point1 has distance1 from0.

Source and reuse

ASTIS parents called

Mathlib API called (external library)

  • HasDerivAt.hasGradientAt
  • strongConvexOn_iff_convex
  • StrongConvexOn.mono
  • pow_le_pow_left₀

Mathematical sources

ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.