Plain-English statement
- Actual gradient maps satisfy the endpoint spectral bound for nonnegative steps. The curvature moduli may be signed; all Hessians are derived from the C² objective.
Read the mathematics first, then descend into Lean
You do not need to know Lean before opening this panel. The page keeps the paper-level theorem, rigorous proof obligations, exact Lean declaration, and proof dependencies as separate layers so a first-time reader can move down one layer at a time.
Proof architecture
Start with the tree when learning: prerequisites sit below the theorem and downstream results sit above it. Switch to the network when you want to understand where this declaration lives in the local formal library. Every mapped node is clickable.
Graph rule: only dependencies found by the ASTIS source scan are drawn. Missing tactic indirection is treated as an under-approximation; the site never invents an edge just to make a prettier graph.
How to read the exact Lean declaration
Read a Lean theorem left-to-right exactly as you would unpack a mathematical sentence: name → ambient types → automatically inferred structures → explicit hypotheses → conclusion → proof. Then read the proof top-to-bottom as transformations of the current goal.
- NameWhat reusable mathematical fact is being created?
- ParametersWhich symbols are arbitrary, and which structures are inferred by typeclass search?
- PropositionAfter the colon, translate the Lean expression back into a paper statement.
- Proof actionsAfter
by, ask what each tactic does to the mathematical goal—not only what syntax it uses.
Syntax used on this page
This glossary is filtered to syntax that actually occurs in the declaration above. Open a symbol only when you meet it, rather than memorizing Lean grammar in advance.
Source voice and ASTIS voice stay separate
When Samplinglib shows a short quotation from Chewi, it is labeled as a source excerpt and linked to the canonical book page. Intuition, expanded proof steps, hidden regularity assumptions, and Lean explanations are ASTIS-authored commentary. A quotation never substitutes for a formal proof, and an ASTIS explanation is never attributed to the textbook author.
Lean statement
theorem gradient_step_endpoint_bound {f : E → ℝ} {α β h : ℝ}
(hf : ContDiff ℝ 2 f) (hsc : StrongConvexOn univ α f) (hh : 0 ≤ h)
(hu : ∀ x y, f y ≤ f x + inner ℝ (gradient f x) (y - x) + β / 2 * ‖y - x‖ ^ 2)
(x y : E) :
‖(y - h • gradient f y) - (x - h • gradient f x)‖ ≤
max |1 - h * α| |1 - h * β| * ‖y - x‖ := by
let M := max |1 - h * α| |1 - h * β|
have hM : 0 ≤ M := (abs_nonneg _).trans (le_max_left _ _)
have hlo := (ConvexityC2.gradient_mono_iff_fderiv2_lower hf).mp (fun a b =>
StrongConvexFirstOrder.gradient_inner_lower_bound_of_strongConvexOn hsc
(fun z _ => ((hf.of_le (by norm_num) : ContDiff ℝ 1 f).differentiable_one z).hasGradientAt)
(mem_univ a) (mem_univ b))
have hup := (SmoothnessEquivalences.upper_model_iff_fderiv2_upper hf).mp hu
let R : (E →L[ℝ] ℝ) →L[ℝ] E :=
{ toFun := (toDual ℝ E).symm
map_add' := (toDual ℝ E).symm.map_add
map_smul' := by intros; simp
cont := (toDual ℝ E).symm.continuous }
let H (z : E) : E →L[ℝ] E := R.comp (fderiv ℝ (fderiv ℝ f) z)
let A (z : E) : E →L[ℝ] E := ContinuousLinearMap.id ℝ E - h • H z
let T : E → E := fun z => z - h • gradient f z
have hfd : ContDiff ℝ 1 (fderiv ℝ f) := hf.fderiv_right (by norm_num)
have hgrad (z : E) : HasFDerivAt (gradient f) (H z) z :=
R.hasFDerivAt.comp z (hfd.differentiable_one z).hasFDerivAt
have hTd (z : E) : HasFDerivAt T (A z) z :=
(hasFDerivAt_id z).sub ((hgrad z).const_smul h)
have hT : ContDiff ℝ 1 T := contDiff_id.sub ((R.contDiff.comp hfd).const_smul h)
have hinner (z v w : E) : inner ℝ (H z v) w = (fderiv ℝ (fderiv ℝ f) z v) w :=
toDual_symm_apply
have hsym (z : E) : (A z).IsSymmetric := by
intro v w
change inner ℝ (v - h • H z v) w = inner ℝ v (w - h • H z w)
rw [inner_sub_left, inner_sub_right, real_inner_smul_left, inner_smul_right]
have hr : inner ℝ v (H z w) = (fderiv ℝ (fderiv ℝ f) z w) v :=
(real_inner_comm v (H z w)).symm.trans (hinner z w v)
rw [hinner, hr]
rw [hf.contDiffAt.isSymmSndFDerivAt (by norm_num) v w]
have hnorm (z : E) : ‖A z‖ ≤ M := by
rw [(A z).norm_eq_iSup_rayleighQuotient (hsym z)]
apply ciSup_le
intro v
change |inner ℝ (A z v) v / ‖v‖ ^ 2| ≤ M
by_cases hv : v = 0
· simp [hv]
exact hM
· simp only [abs_div, abs_pow, abs_norm]
apply (div_le_iff₀ (sq_pos_of_pos (norm_pos_iff.mpr hv))).mpr
change |inner ℝ (v - h • H z v) v| ≤ M * ‖v‖ ^ 2
rw [inner_sub_left, real_inner_smul_left, real_inner_self_eq_norm_sq, hinner]
have hl := mul_le_mul_of_nonneg_left (hlo z v) hh
have hu' := mul_le_mul_of_nonneg_left (hup z v) hh
have hleft : 1 - h * α ≤ M := (le_abs_self _).trans (le_max_left _ _)
have hright : -(1 - h * β) ≤ M := (neg_le_abs _).trans (le_max_right _ _)
have hleft' := mul_le_mul_of_nonneg_right hleft (sq_nonneg ‖v‖)
have hright' := mul_le_mul_of_nonneg_right hright (sq_nonneg ‖v‖)
exact abs_le.mpr ⟨by nlinarith, by nlinarith⟩
let v := y - x
have hpath (t : ℝ) : HasDerivAt (fun s : ℝ => T (x + s • v)) (A (x + t • v) v) t := by
convert (hTd (x + t • v)).comp_hasDerivAt t
(((hasDerivAt_id t).smul_const v).const_add x) using 1 <;> simp [Function.comp_def]
have hc : Continuous (fun t : ℝ => A (x + t • v) v) := by
have hA : A = fderiv ℝ T := funext (fun z => (hTd z).fderiv.symm)
rw [hA]
exact ((hT.continuous_fderiv (by norm_num)).comp
(continuous_const.add (continuous_id.smul continuous_const))).clm_apply continuous_const
have hFTC : (∫ t : ℝ in 0..1, A (x + t • v) v) = T y - T x := by
simpa [v] using intervalIntegral.integral_eq_sub_of_hasDerivAt
(fun t _ => hpath t) (hc.intervalIntegrable 0 1)
change ‖T y - T x‖ ≤ M * ‖v‖
rw [← hFTC]
simpa using intervalIntegral.norm_integral_le_of_norm_le_const (a := (0 : ℝ)) (b := 1)
(fun t _ => ((A (x + t • v)).le_opNorm v).trans
(mul_le_mul_of_nonneg_right (hnorm _) (norm_nonneg v)))
/-- The step `2/(α+β)` gives the sharp uniform curvature-envelope contraction.
Its factor minimizes the endpoint max-envelope over every real step.
The `α=0` boundary is nonexpansive, and `α=β` is retained. -/
Open AutoSamplingTheory/TechnicalLemmas/Analysis/GradientDescentOptimalStep.lean:25published source at 0e31a3cda412
Proof architecture
Actual-gradient endpoint curvature bound from C2 Hessian bounds, symmetry, Rayleigh norm and explicit segment FTC.
Lean proof walkthrough
- Read the quantified variables and typeclass brackets as part of the mathematical statement; inferred arguments are not missing assumptions.
- `intro` introduces quantified hypotheses into the local proof context.
- `have` creates a named intermediate mathematical fact.
- `rw` rewrites by an established identity.
- `simp` normalizes through registered definitional and theorem rewrites.
- `apply` reduces the goal to the hypotheses of a reusable theorem.
- `exact` closes the current goal with an already typed term.
- `simpa` closes the goal after a controlled simplification of a typed result.
Why the statement has this shape
The declaration is kept at the reusable level recorded by its Registry tags and direct consumers. Explicit measures, spaces, wrappers, and regularity hypotheses expose interfaces that paper notation often infers. A theorem card explains those interfaces but never widens the compiled statement.
Hidden assumptions and non-claims
- Integrability is an input or proved output; a displayed integral alone does not supply it.
- Totalized `fderiv` values must not be read as a differentiability theorem.
- Genuine differentiability is localized to the hypotheses shown in the Lean statement.