Samplinglib
Lean gate not recorded for this source state main · 9bb7a7394ab0

Bench / optimisation

sogb-002 · public-dev · editorial and formal status separate

PL descent: the sign of the contraction factor

Optimisation · natural-language: L3 / lean: L3 (author-assigned; calibration pending)

Why this difficulty?

Derive an actual-step recurrence and handle both signs before iterating; proof length is not the difficulty measure.

Editorial review and exact formal-coverage boundary

AI editorial review accepted. This is not canonical theorem publication, full Lean coverage or empirical difficulty calibration.

  • The target is the final objective-gap inequality. The reference Lean proof contains the sign split, but the target does not separately state the global-zero characterization for q<0 or the parameter interpretation of genuine geometric decay.
  • No iterate convergence, distance rate, uniqueness, derivation of the upper model from smoothness, or empirical difficulty assertion is certified.

Content-bound review status and evidence hashes · Independent reports and frozen inputs. Historical rejected wording is audit material, not training gold.

Assumptions and conventions

  • \(E\) is a complete real inner-product space, \(f:E\to\mathbb R\), and \(z\) is an attained global minimizer.
  • The real parameters \(\alpha,\beta,h\) satisfy \(h\ge0\) and \(\beta h\le1\). For all \(x,y\), the quadratic upper model holds: \[f(y)\le f(x)+\langle\nabla f(x),y-x\rangle+\tfrac\beta2\|y-x\|^2.\]
  • For every \(x\), \(2\alpha(f(x)-f(z))\le\|\nabla f(x)\|^2\). Here \(\nabla f\) is the representing vector of the derivative where \(f\) is Fréchet differentiable, and zero otherwise. The upper-model and PL inequalities are supplied assumptions; global differentiability is not inferred from the notation.

Natural-language question

For the actual iterates \(x_{n+1}=x_n-h\nabla f(x_n)\), prove \(f(x_N)-f(z)\le(1-\alpha h)^N(f(x_0)-f(z))\). Do not add convexity or assume \(1-\alpha h\ge0\). Explain separately what happens when this factor is negative, and when the bound describes genuine geometric decay.

Reference mathematical proof
  1. Substitute the actual gradient step into the quadratic model. Using \(h\ge0\) and \(\beta h\le1\) yields \[f(x-h\nabla f(x))\le f(x)-\tfrac h2\|\nabla f(x)\|^2.\]

  2. Multiply the PL bound by \(h/2\ge 0\). With \(g(x)=f(x)-f(z)\ge0\) and \(q=1-\alpha h\), obtain \(0\le g(x-h\nabla f(x))\le qg(x)\).

  3. If \(q\ge 0\), multiplication preserves order. Induction along the actual iterates gives \(g(x_N)\le q^N g(x_0)\), including \(N=0\).

  4. If \(q<0\), the same one-step inequality holds for every x and forces \(g(x)=0\): otherwise qg(x)<0 contradicts nonnegativity of the next gap. Hence every gap is zero and the displayed bound still holds. Nontrivial geometric decay requires \(0\le q<1\), rather than merely the existence of a real power \(q^N\).

How the Lean proof follows these steps

IsMinOn f univ z supplies nonnegative gaps. Function.iterate describes actual gradient iterates. The proof calls the existing gradient-step bound, combines it with hpl using nlinarith, and splits on the sign of q before invoking le_geom. Completeness is retained from the existing Lean API; it is not asserted to be a sharp mathematical hypothesis.

/- SamplingOptimisationGeometryBench public-dev reference.
   Reuses the existing project proof; retain LICENSE and NOTICE. -/
import AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentBasic
import Mathlib.Analysis.SpecificLimits.Basic

open Set
open scoped RealInnerProductSpace
open AutoSamplingTheory.TechnicalLemmas.Analysis
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E]

example {f : E → ℝ} {α β h : ℝ} {z : E}
    (hz : IsMinOn f univ z) (hh : 0 ≤ h) (hstep : β * h ≤ 1)
    (hu : ∀ x y, f y ≤ f x + inner ℝ (gradient f x) (y - x) + β / 2 * ‖y - x‖ ^ 2)
    (hpl : ∀ x, 2 * α * (f x - f z) ≤ ‖gradient f x‖ ^ 2)
    (x₀ : E) (N : ℕ) :
    f ((fun x => x - h • gradient f x)^[N] x₀) - f z ≤
      (1 - α * h) ^ N * (f x₀ - f z) := by
  let T : E → E := fun x => x - h • gradient f x
  let q : ℝ := 1 - α * h
  have hnonneg (x : E) : 0 ≤ f x - f z := sub_nonneg.mpr (hz (mem_univ x))
  have hrec (x : E) : f (T x) - f z ≤ q * (f x - f z) := by
    have hd := GradientDescentBasic.gradient_step_descent_of_quadratic_upper_bound hh hstep hu x
    have hp := mul_le_mul_of_nonneg_left (hpl x) (show 0 ≤ h / 2 by positivity)
    dsimp [T, q]
    nlinarith
  by_cases hq : 0 ≤ q
  · have hr := le_geom (u := fun n => f (T^[n] x₀) - f z) hq N (by
      intro k _
      rw [Function.iterate_succ_apply']
      exact hrec _)
    exact hr
  · have hzero (x : E) : f x - f z = 0 := by
      have hc : q * (f x - f z) ≥ 0 := (hnonneg (T x)).trans (hrec x)
      have hneg : q < 0 := lt_of_not_ge hq
      have hx := hnonneg x
      nlinarith
    change f (T^[N] x₀) - f z ≤ q ^ N * (f x₀ - f z)
    rw [hzero, hzero, mul_zero]

Download runnable reference

Assessment rubric · 4 points
  1. Derives the descent estimate from the actual update and the supplied quadratic model. (1 point)
  2. Uses nonnegative h/2 to combine PL with descent and obtains a nonnegative gap recurrence. (1 point)
  3. Proves the iteration bound for \(q\ge 0\) and handles \(q<0\) by showing every gap vanishes. (1 point)
  4. Does not add convexity or a hidden sign premise; distinguishes a bound from strict geometric decay. (1 point)

Lean question

Keep the target and context fixed; replace the comment slot with your proof. Ancestor libraries are allowed, but the target module is not imported directly.

Show fixed Lean task
/- SamplingOptimisationGeometryBench public-dev reference.
   Reuses the existing project proof; retain LICENSE and NOTICE. -/
import AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentBasic
import Mathlib.Analysis.SpecificLimits.Basic

open Set
open scoped RealInnerProductSpace
open AutoSamplingTheory.TechnicalLemmas.Analysis
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E]

example {f : E → ℝ} {α β h : ℝ} {z : E}
    (hz : IsMinOn f univ z) (hh : 0 ≤ h) (hstep : β * h ≤ 1)
    (hu : ∀ x y, f y ≤ f x + inner ℝ (gradient f x) (y - x) + β / 2 * ‖y - x‖ ^ 2)
    (hpl : ∀ x, 2 * α * (f x - f z) ≤ ‖gradient f x‖ ^ 2)
    (x₀ : E) (N : ℕ) :
    f ((fun x => x - h • gradient f x)^[N] x₀) - f z ≤
      (1 - α * h) ^ N * (f x₀ - f z) := by
  -- Replace this comment with your proof.

Download task template

Reference Lean and explanation

IsMinOn f univ z supplies nonnegative gaps. Function.iterate describes actual gradient iterates. The proof calls the existing gradient-step bound, combines it with hpl using nlinarith, and splits on the sign of q before invoking le_geom. Completeness is retained from the existing Lean API; it is not asserted to be a sharp mathematical hypothesis.

/- SamplingOptimisationGeometryBench public-dev reference.
   Reuses the existing project proof; retain LICENSE and NOTICE. -/
import AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentBasic
import Mathlib.Analysis.SpecificLimits.Basic

open Set
open scoped RealInnerProductSpace
open AutoSamplingTheory.TechnicalLemmas.Analysis
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E]

example {f : E → ℝ} {α β h : ℝ} {z : E}
    (hz : IsMinOn f univ z) (hh : 0 ≤ h) (hstep : β * h ≤ 1)
    (hu : ∀ x y, f y ≤ f x + inner ℝ (gradient f x) (y - x) + β / 2 * ‖y - x‖ ^ 2)
    (hpl : ∀ x, 2 * α * (f x - f z) ≤ ‖gradient f x‖ ^ 2)
    (x₀ : E) (N : ℕ) :
    f ((fun x => x - h • gradient f x)^[N] x₀) - f z ≤
      (1 - α * h) ^ N * (f x₀ - f z) := by
  let T : E → E := fun x => x - h • gradient f x
  let q : ℝ := 1 - α * h
  have hnonneg (x : E) : 0 ≤ f x - f z := sub_nonneg.mpr (hz (mem_univ x))
  have hrec (x : E) : f (T x) - f z ≤ q * (f x - f z) := by
    have hd := GradientDescentBasic.gradient_step_descent_of_quadratic_upper_bound hh hstep hu x
    have hp := mul_le_mul_of_nonneg_left (hpl x) (show 0 ≤ h / 2 by positivity)
    dsimp [T, q]
    nlinarith
  by_cases hq : 0 ≤ q
  · have hr := le_geom (u := fun n => f (T^[n] x₀) - f z) hq N (by
      intro k _
      rw [Function.iterate_succ_apply']
      exact hrec _)
    exact hr
  · have hzero (x : E) : f x - f z = 0 := by
      have hc : q * (f x - f z) ≥ 0 := (hnonneg (T x)).trans (hrec x)
      have hneg : q < 0 := lt_of_not_ge hq
      have hx := hnonneg x
      nlinarith
    change f (T^[N] x₀) - f z ≤ q ^ N * (f x₀ - f z)
    rw [hzero, hzero, mul_zero]

Download runnable reference

No current trusted-reference compiler receipt recorded in this build.

Structural questions about this proof context (not equivalent mathematical tasks): Read a local import edge · Find a shared implementation prerequisite · Ablate availability, not mathematical truth

What this does—and does not—verify

This exercises the supplied upper-model/PL formulation. It does not derive those hypotheses from smoothness or infer differentiability from a totalized gradient. The broader natural-language discussion is not an extra Lean theorem.

Existing library mathematics reused; no new mathematical leaf or paper-completion credit. The editorial panel records the exact current review scope and remaining unformalized explanation.

Sources, graph location and dependencies

Original exercise over Samplinglib's PL theorem. Its module cites Chewi, Lectures on Optimization, arXiv:2605.07006v1, Definition 2.5 and Theorem 3.6; the exercise explicitly retains the Lean upper-model formulation.

Exact local source and full context · Locate the existing Lean declaration

AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentPL.gradient_descent_pl_value_bound

ASTIS definitions / proof calls

  • AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentBasic.gradient_step_descent_of_quadratic_upper_bound

Mathlib facts / definitions

  • le_geom
  • Function.iterate_succ_apply'
  • mul_le_mul_of_nonneg_left

Binding SHA-256: f5d34b22cd89382ed252b2d1ed63a8b0763a005dbe5940fd24174b14710d19e8