Samplinglib
Lean gate not recorded for this source state main · 0e31a3cda412
Optimisation · §2 · source p. 12

Gradient flow

Stable source-facing chapter environment inside the shared Samplinglib reader.

Partially formalizedsource mapFull source closure not claimed
Planned route

Source → theorem map → reusable Lean nodes

01

Source audit

Definitions, theorems, assumptions, proof route, and exact anchors.

02

Upstream alignment

Search Mathlib, Optlib, CvxLean, and shared Samplinglib interfaces; preserve the exact Chewi statement and use a small adapter when conventions differ.

03

Frontier Cells

Only genuinely missing mathematical edges become theorem-sized tasks.

04

Graph placement

Dependencies, consumers, cross-library bridges, and reusable shared interfaces.

Open exact Chewi source ↗

This page establishes a stable source route and truth boundary; it does not claim a completed formalization.

Exercise2.3 · PL inequality under nonlinear parametrization

Sinho Chewi, Lectures on Optimization. ASTIS-authored source restatement; no endorsement implied.

arXiv:2605.07006v1 · Exercise2.3, Definition2.5, Section2 attained-minimum and smoothness conventions · faithful paraphrase

Complete source statement (ASTIS restatement)

Exercise2.3 takes an alpha-strongly convex f:R^n→R with alpha>0 and a surjective g:R^d→R^n, d>=n. In the exercise Jacobian convention J is d-by-n and J-transpose J is bounded below by sigma times the identity everywhere. The exercise asks for the PL inequality for f composed with g at constant alpha*sigma, and notes that multiple minimizing preimages can occur. Section2 assumes a twice continuously differentiable objective and an attained minimum. Definition2.5 describes a continuously differentiable objective with a positive PL constant; the exercise does not explicitly state sigma>0 or continuity of the derivative of g.

  • Alpha>0; f is alpha-strongly convex on R^n, in the Section2 smooth attained-minimum setting.
  • g:R^d→R^n is surjective, d>=n, and has an everywhere Jacobian J in the stated d-by-n convention.
  • J-transpose J>=sigma I everywhere. The exercise does not explicitly state a sign condition on sigma or continuity of J.

Exercise numerical conclusion

\[\|\nabla(f\circ g)(x)\|^2\ge2\alpha\sigma\big((f\circ g)(x)-\min(f\circ g)\big).\]

Read the formalized proofs

Each statement and proof below has its own closed Lean disclosure. ASTIS parents, Mathlib calls and external mathematical sources are distinguished in each proof.

ASTIS mathematical exposition

A nonlinear parametrization preserves a numerical PL bound

AutoSamplingTheory.TechnicalLemmas.Analysis.StrongConvexPLPullback.exists_minimizer_and_pl · theorem · Teaching coverage

Statement

Let E and F be complete real inner-product spaces, f:F→R and g:E→F be everywhere Frechet differentiable, alpha>0 and sigma>=0. Assume f is globally alpha-strongly convex, z is its global minimizer, g is surjective, and the derivative satisfies the following quadratic-form bound at every x and every v in F. Then there is a minimizing preimage xstar and the actual composite gradient satisfies the stated numerical PL inequality.

\[\begin{gathered}A_x=Dg(x),\qquad\langle v,A_xA_x^*v\rangle\ge\sigma\|v\|^2\quad(\forall x\in E,\ v\in F),\\\exists x_\star\in E:\quad g(x_\star)=z,\quad x_\star\in\arg\min(f\circ g),\\2\alpha\sigma\big((f\circ g)(x)-(f\circ g)(x_\star)\big)\le\|\nabla(f\circ g)(x)\|^2\quad(\forall x\in E).\end{gathered}\]

All objects and hypotheses

  • E,F are real complete inner-product spaces. f:F→R and g:E→F are Frechet differentiable at every point; continuity of their derivatives is not assumed.
  • Alpha>0 and sigma>=0 are real constants. StrongConvexOn univ alpha f supplies the global strong convexity inequality.
  • A supplied z:F satisfies f(z)<=f(y) for all y:F. The map g is surjective.
  • For every x:E and v:F, sigma||v||²<=<v,Dg(x)(Dg(x)-adjoint v)>. This is a bound on the actual Frechet derivative, not on a supplied gradient of the composite.

Mathematical proof

1. Lift the attained minimum

Let z be the supplied global minimizer of f. Surjectivity gives xstar with g(xstar)=z. Every g(x) lies in the objective space, so f(g(xstar))=f(z)<=f(g(x)); thus the same xstar minimizes the composite.

\[g(x_\star)=z,\qquad (f\circ g)(x_\star)=f(z)\le f(g(x)).\]
Corresponding Lean step

Function.Surjective applied to z; IsMinOn transported pointwise.

2. Turn strong convexity into a gradient-gap bound

At y=g(x), the shared first-order strong-convexity bound at comparator z gives the gap at most <grad f(y),y-z> minus alpha times the squared distance divided by2. Cauchy-Schwarz bounds the inner product. The nonnegative square (norm grad f(y)−alpha norm(y−z))² yields the numerical PL bound for f.

\[\begin{gathered}f(y)-f(z)\le\langle\nabla f(y),y-z\rangle-\frac\alpha2\|y-z\|^2\\\le\|\nabla f(y)\|\|y-z\|-\frac\alpha2\|y-z\|^2,\\2\alpha(f(y)-f(z))\le\|\nabla f(y)\|^2.\end{gathered}\]
Corresponding Lean step

StrongConvexFirstOrder.firstOrder_lower_bound_of_strongConvexOn, real_inner_le_norm, sq_nonneg and positive alpha.

3. Identify the actual composite gradient

Put A_x=Dg(x). The Frechet chain rule gives D(f∘g)(x)[v]=<grad f(g(x)),A_x v>. The defining adjoint identity rewrites this as <A_x-adjoint grad f(g(x)),v>. Uniqueness of the Riesz representative identifies the actual composite gradient.

\[\nabla(f\circ g)(x)=A_x^*\nabla f(g(x)),\qquad A_x=Dg(x).\]
Corresponding Lean step

HasFDerivAt.comp; hasGradientAt_iff_hasFDerivAt; InnerProductSpace.toDual_apply_apply; ContinuousLinearMap.adjoint_inner_left; HasGradientAt.gradient.

4. Transport the coercivity constant

Apply the assumed operator lower bound to v=grad f(g(x)). Its quadratic form equals norm(A_x-adjoint v)² by the adjoint identity. Multiply the base gradient-gap bound by nonnegative sigma and combine. Finally use g(xstar)=z to express the same gap relative to the attained composite minimum.

\[\begin{aligned}\|\nabla(f\circ g)(x)\|^2&=\langle v,A_xA_x^*v\rangle\ge\sigma\|v\|^2\\&\ge2\alpha\sigma\big((f\circ g)(x)-(f\circ g)(x_\star)\big).\end{aligned}\]
Corresponding Lean step

ContinuousLinearMap.adjoint_inner_left; real_inner_self_eq_norm_sq; mul_le_mul_of_nonneg_left.

Lean statement · exists_minimizer_and_pl

Construct a preimage of the base minimizer and prove a global numerical gradient-gap inequality for the actual composition.

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_minimizer_and_pl {f : F → ℝ} {g : E → F} {α σ : ℝ} {z : F}
    (hα : 0 < α) (hσ : 0 ≤ σ) (hsc : StrongConvexOn univ α f)
    (hf : Differentiable ℝ f) (hg : Differentiable ℝ g)
    (hsurj : Function.Surjective g) (hz : IsMinOn f univ z)
    (hjac : ∀ x v, σ * ‖v‖ ^ 2 ≤
      inner ℝ v ((fderiv ℝ g x) ((fderiv ℝ g x).adjoint v))) :
    ∃ xstar, g xstar = z ∧ IsMinOn (f ∘ g) univ xstar ∧
      ∀ x, 2 * (α * σ) * ((f ∘ g) x - (f ∘ g) xstar) ≤
        ‖gradient (f ∘ g) x‖ ^ 2

Exact module and namespace context

Lean proof · exists_minimizer_and_pl

Let z be the supplied global minimizer of f. Surjectivity gives xstar with g(xstar)=z. Every g(x) lies in the objective space, so f(g(xstar))=f(z)<=f(g(x)); thus the same xstar minimizes the composite. At y=g(x), the shared first-order strong-convexity bound at comparator z gives the gap at most <grad f(y),y-z> minus alpha times the squared distance divided by2. Cauchy-Schwarz bounds the inner product. The nonnegative square (norm grad f(y)−alpha norm(y−z))² yields the numerical PL bound for f. Put A_x=Dg(x). The Frechet chain rule gives D(f∘g)(x)[v]=<grad f(g(x)),A_x v>. The defining adjoint identity rewrites this as <A_x-adjoint grad f(g(x)),v>. Uniqueness of the Riesz representative identifies the actual composite gradient. Apply the assumed operator lower bound to v=grad f(g(x)). Its quadratic form equals norm(A_x-adjoint v)² by the adjoint identity. Multiply the base gradient-gap bound by nonnegative sigma and combine. Finally use g(xstar)=z to express the same gap relative to the attained composite minimum.

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_minimizer_and_pl {f : F → ℝ} {g : E → F} {α σ : ℝ} {z : F}
    (hα : 0 < α) (hσ : 0 ≤ σ) (hsc : StrongConvexOn univ α f)
    (hf : Differentiable ℝ f) (hg : Differentiable ℝ g)
    (hsurj : Function.Surjective g) (hz : IsMinOn f univ z)
    (hjac : ∀ x v, σ * ‖v‖ ^ 2 ≤
      inner ℝ v ((fderiv ℝ g x) ((fderiv ℝ g x).adjoint v))) :
    ∃ xstar, g xstar = z ∧ IsMinOn (f ∘ g) univ xstar ∧
      ∀ x, 2 * (α * σ) * ((f ∘ g) x - (f ∘ g) xstar) ≤
        ‖gradient (f ∘ g) x‖ ^ 2 := by
  obtain ⟨xstar, hxstar⟩ := hsurj z
  refine ⟨xstar, hxstar, ?_, ?_⟩
  · intro x _
    simpa [Function.comp_def, hxstar] using hz (mem_univ (g x))
  · intro x
    have hfirst := StrongConvexFirstOrder.firstOrder_lower_bound_of_strongConvexOn
      hsc (fun y _ => (hf y).hasGradientAt) (mem_univ (g x)) (mem_univ z)
    have hcs := real_inner_le_norm (gradient f (g x)) (g x - z)
    have hbase : 2 * α * (f (g x) - f z) ≤ ‖gradient f (g x)‖ ^ 2 := by
      rw [← neg_sub (g x) z, inner_neg_right, norm_neg] at hfirst
      nlinarith [sq_nonneg (‖gradient f (g x)‖ - α * ‖g x - z‖)]
    have hchain : HasGradientAt (f ∘ g)
        ((fderiv ℝ g x).adjoint (gradient f (g x))) x := by
      apply hasGradientAt_iff_hasFDerivAt.mpr
      have hc := (hf (g x)).hasGradientAt.hasFDerivAt.comp x (hg x).hasFDerivAt
      have heq : (InnerProductSpace.toDual ℝ F (gradient f (g x))).comp (fderiv ℝ g x) =
          InnerProductSpace.toDual ℝ E ((fderiv ℝ g x).adjoint (gradient f (g x))) := by
        ext v
        simp [InnerProductSpace.toDual_apply_apply, ContinuousLinearMap.adjoint_inner_left]
      rw [heq] at hc
      exact hc
    have hcoerc := hjac x (gradient f (g x))
    rw [← ContinuousLinearMap.adjoint_inner_left, real_inner_self_eq_norm_sq] at hcoerc
    have hmul := mul_le_mul_of_nonneg_left hbase hσ
    rw [hchain.gradient]
    dsimp only [Function.comp_def]
    rw [hxstar]
    nlinarith

end AutoSamplingTheory.TechnicalLemmas.Analysis.StrongConvexPLPullback

Exact module and namespace context

Source assumptions versus formal assumptions

SourceActual LeanDifference kindWhy it matters
Finite Euclidean spaces with d>=n.Complete real Hilbert spaces E,F with a surjection and the stated adjoint coercivity.generalizationNo basis or dimension argument is needed. In Euclidean coordinates the source Jacobian is the adjoint derivative. Matrix-coordinate equivalence is explained, not a newly compiled theorem.
Section2 C2 f; g has an everywhere Jacobian.Both maps are everywhere Frechet differentiable; output is the numerical PL inequality only.generalizationThe proof uses pointwise derivatives and their chain rule. Continuity of Dg and the complete C1 definition package remain explicitly outside the proved component.
Exercise gives coefficient sigma without stating positivity; Definition2.5 requires positive PL constant.Sigma>=0; sigma0 gives a degenerate numerical inequality, not a positive PL constant.unresolvedThe sign/definition boundary is exposed rather than silently treating zero as a positive PL modulus. Positive sigma gives the positive numerical coefficient, but C1 remains separate.
Section2 attained minimum of f and surjectivity of g.Supply IsMinOn f univ z; construct xstar with g(xstar)=z and IsMinOn (f∘g) univ xstar.sameThis transports the source attained minimum; it does not assert new infinite-dimensional existence or uniqueness.

The conclusion is the numerical PL inequality and a lifted global minimizer. Definition2.5 additionally asks for a continuously differentiable objective and a positive PL constant. The exercise does not explicitly impose continuity of Dg or sigma>0. Neither is silently inferred here: sigma=0 is a degenerate inequality, and continuous differentiability of the composite remains a separate obligation. Real complete Hilbert spaces and everywhere Frechet differentiability generalize the source finite Euclidean spaces and Section2 C2 objective convention. Completeness provides Riesz gradients and adjoints. No infinite-dimensional minimizer-existence theorem is claimed: the source attained minimizer z of f is supplied and surjectivity constructs its preimage. The source uses a d-by-n Jacobian J, transposed relative to Dg:R^d to R^n. Here A=Dg and J corresponds to A-adjoint, so J-transpose J corresponds to A A-adjoint. The assumed operator quadratic form is exactly the adjoint norm square. It is not a lower bound on A on the parameter space. No compiled matrix-coordinate identification theorem is asserted. No convexity, uniqueness or multiplicity of composite minimizers, gradient Lipschitz upper bound, gradient-descent rate, Riemannian statement or companion-paper completion follows. The gradient of the composite and its minimum are conclusions, not supplied certificates.

Encoder–denoiser: accepted · source-underspecified

Detected semantic differences

  • domains: The Lean theorem is a Hilbert-space generalization, not a literal Euclidean-domain reproduction. — CompleteSpace E/F replaces finite Euclidean types and there is no d>=n parameter. The source case specializes to E=R^d,F=R^n; the same operator hypothesis is used.
  • assumptions: Sigma>=0 is an explicit restriction beyond the literal exercise wording; the negative-sigma numerical case is not covered by this declaration. — The source restatement omits the sign, while hσ is required and is consumed by mul_le_mul_of_nonneg_left. For sigma<0 the numerical conclusion would be immediate from a nonnegative objective gap, but that separate branch is not this theorem. Neither this observation nor the zero case resolves the positive-modulus definition obligation.
  • assumptions: Smoothness is reduced to Frechet differentiability; the Jacobian is interpreted as an actual total derivative. — hf and hg permit the chain rule and first-order support inequality. C2 of f is unnecessary for the selected numerical result. Merely existing coordinate partial derivatives would not justify the chain rule; the interpretation of Jacobian as a derivative is therefore material. No continuity of Dg or of the composite gradient is supplied.
  • assumptions: The base minimizer is supplied explicitly rather than proved to exist. — hz is IsMinOn f univ z, matching the Section 2 attained-minimum convention. Surjectivity alone lifts that supplied minimum to the composition.
  • scopes: The selected numeric component does not certify the complete Definition 2.5 PL package. — Alpha*sigma may vanish and no continuous differentiability conclusion occurs. The frozen publication keeps definition-regularity-positive-modulus as a separate obligation and the lesson labels the result numerical. This is a retained uncovered boundary, not a completed source repair.
  • conclusion: The source observation that overparametrization can allow multiple minimizers is not separately formalized. — The theorem constructs one minimizing preimage and makes no uniqueness or multiplicity assertion. This is consistent with, but does not prove an example of, the source observation.

A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

Scope and omitted-condition boundaries

  • The conclusion is the numerical PL inequality and a lifted global minimizer. Definition2.5 additionally asks for a continuously differentiable objective and a positive PL constant. The exercise does not explicitly impose continuity of Dg or sigma>0. Neither is silently inferred here: sigma=0 is a degenerate inequality, and continuous differentiability of the composite remains a separate obligation.
  • Real complete Hilbert spaces and everywhere Frechet differentiability generalize the source finite Euclidean spaces and Section2 C2 objective convention. Completeness provides Riesz gradients and adjoints. No infinite-dimensional minimizer-existence theorem is claimed: the source attained minimizer z of f is supplied and surjectivity constructs its preimage.
  • The source uses a d-by-n Jacobian J, transposed relative to Dg:R^d to R^n. Here A=Dg and J corresponds to A-adjoint, so J-transpose J corresponds to A A-adjoint. The assumed operator quadratic form is exactly the adjoint norm square. It is not a lower bound on A on the parameter space. No compiled matrix-coordinate identification theorem is asserted.
  • No convexity, uniqueness or multiplicity of composite minimizers, gradient Lipschitz upper bound, gradient-descent rate, Riemannian statement or companion-paper completion follows. The gradient of the composite and its minimum are conclusions, not supplied certificates.

Source and reuse

ASTIS parents called

Mathlib API called (external library)

  • HasFDerivAt.comp
  • hasGradientAt_iff_hasFDerivAt
  • ContinuousLinearMap.adjoint_inner_left
  • real_inner_le_norm
  • mul_le_mul_of_nonneg_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.

Which proof edges are actually covered?

  • Local proof component; source adapter/review separate Identify the actual composite gradient, lift the attained minimum, and prove the numerical PL inequality
  • TODO — not closed by these contributions Separate source Definition2.5 C1 and positive-modulus requirements; not inferred from the exercise wording or this numeric component

Lemma2.1 and Corollary2.6 · PL gradient-flow decay

Sinho Chewi, Lectures on Optimization. ASTIS-authored restatement; no endorsement implied.

arXiv:2605.07006v1 · Section2 GF and conventions; Lemma2.1; Definition2.5; Corollary2.6 · faithful paraphrase

Complete source statement (ASTIS restatement)

Section2 considers a supplied gradient flow X prime(t)=-gradient f(X(t)) at nonnegative times, assumes a twice continuously differentiable Euclidean objective with an attained minimum, and leaves well-posedness aside. Lemma2.1 derives d f(X(t))/dt=-norm gradient f(X(t)) squared by the chain rule. Definition2.5 uses a positive modulus alpha with 2 alpha(f(x)-f(z))<=norm gradient f(x) squared. Corollary2.6 then gives f(X(t))-f(z)<=(f(X(0))-f(z)) exp(-2 alpha t) for all t>=0.

  • Euclidean C2 objective in the Section2 setting; attained minimizer z.
  • A supplied gradient flow for nonnegative time.
  • Positive PL modulus alpha; global gradient-gap inequality.

Objective dissipation and PL value decay

\[\partial_t f(X(t))=-\|\nabla f(X(t))\|^2,\qquad f(X(t))-f(z)\le(f(X(0))-f(z))e^{-2\alpha t}.\]

Read the formalized proofs

Each statement and proof below has its own closed Lean disclosure. ASTIS parents, Mathlib calls and external mathematical sources are distinguished in each proof.

ASTIS mathematical exposition

PL gradient flows decrease the objective exponentially

AutoSamplingTheory.TechnicalLemmas.Analysis.GradientFlowPL.dissipation_and_decay · theorem · Teaching coverage

Statement

Let E be a complete real inner-product space, f:E→R be Frechet differentiable everywhere, z a global minimizer, alpha>0 and T>=0. Let X:R→E be continuous on [0,T] and have right derivative -gradient f(X(t)) for every t in [0,T). Assume the global numerical PL inequality below. Then the actual objective has the stated right derivative before T, and its nonnegative gap satisfies the exponential bound at every t in [0,T].

\[\begin{gathered}2\alpha(f(x)-f(z))\le\|\nabla f(x)\|^2\quad(\forall x\in E),\qquad X^{\prime+}(t)=-\nabla f(X(t)),\quad 0\le t<T,\\\partial_t^+f(X(t))=-\|\nabla f(X(t))\|^2\quad(0\le t<T),\\0\le f(X(t))-f(z)\le (f(X(0))-f(z))\exp(-2\alpha t)\quad(0\le t\le T).\end{gathered}\]

All objects and hypotheses

  • E is a complete real inner-product space; f is Frechet differentiable at every point.
  • Alpha>0 and T>=0; f(z)<=f(x) for every x:E.
  • X is continuous on [0,T]; for each t in [0,T), HasDerivWithinAt X (-gradient f(X(t))) (Ici t) t. No negative-time derivative is required.
  • For every x:E, 2 alpha (f(x)-f(z))<=norm gradient f(x) squared.

Mathematical proof

1. Differentiate the actual objective along the curve

Frechet differentiability represents Df(X(t)) by its Riesz gradient. Compose this derivative with the supplied right derivative X prime(t)=-gradient f(X(t)). The inner product of the gradient with its negative is minus its squared norm. This constructs the energy identity from the actual dynamics.

\[\partial_t^+ f(X(t))=Df(X(t))[X^{\prime+}(t)]=\langle\nabla f(X(t)),-\nabla f(X(t))\rangle=-\|\nabla f(X(t))\|^2.\]
Corresponding Lean step

DifferentiableAt.hasGradientAt, HasFDerivAt.comp_hasDerivWithinAt, InnerProductSpace.toDual_apply_apply, inner_neg_right, real_inner_self_eq_norm_sq.

2. Convert PL into a differential inequality

Let e(t)=f(X(t))-f(z). Subtracting the constant minimum preserves the derivative. PL gives 2 alpha e(t)<=norm gradient f(X(t)) squared, hence the actual right derivative satisfies e prime(t)<=-2 alpha e(t).

\[e(t)=f(X(t))-f(z),\qquad e^{\prime+}(t)=-\|\nabla f(X(t))\|^2\le-2\alpha e(t).\]
Corresponding Lean step

HasDerivWithinAt.sub_const and the supplied PL inequality, with rate exactly 2*alpha.

3. Apply the existing interval comparison and retain endpoints

Differentiability makes f continuous, so the supplied continuity of X makes e continuous on the closed interval. Each right derivative supplies the one-sided slope hypothesis for Mathlib Gronwall on [0,T]. With constant coefficient -2 alpha and zero forcing, its bound is e(0) exp(-2 alpha t), including the terminal endpoint. The global minimum gives e(t)>=0.

\[0\le e(t)\le e(0)\exp(-2\alpha t),\qquad 0\le t\le T.\]
Corresponding Lean step

Continuous.comp_continuousOn, HasDerivWithinAt.liminf_right_slope_le, le_gronwallBound_of_liminf_deriv_right_le, gronwallBound_ε0, IsMinOn.

Lean statement · dissipation_and_decay

Actual objective right derivative and nonnegative PL gap decay on a finite forward interval.

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 dissipation_and_decay {f : E → ℝ} {X : ℝ → E} {z : E} {α T : ℝ}
    (_hα : 0 < α) (_hT : 0 ≤ T) (hf : Differentiable ℝ f)
    (hX : ContinuousOn X (Icc 0 T))
    (hflow : ∀ t ∈ Ico 0 T,
      HasDerivWithinAt X (-gradient f (X t)) (Ici t) t)
    (hz : IsMinOn f univ z)
    (hpl : ∀ x, 2 * α * (f x - f z) ≤ ‖gradient f x‖ ^ 2) :
    (∀ t ∈ Ico 0 T, HasDerivWithinAt (f ∘ X)
      (-‖gradient f (X t)‖ ^ 2) (Ici t) t) ∧
    ∀ t ∈ Icc 0 T, 0 ≤ f (X t) - f z ∧
      f (X t) - f z ≤ (f (X 0) - f z) * Real.exp (-2 * α * t)

Exact module and namespace context

Lean proof · dissipation_and_decay

Frechet differentiability represents Df(X(t)) by its Riesz gradient. Compose this derivative with the supplied right derivative X prime(t)=-gradient f(X(t)). The inner product of the gradient with its negative is minus its squared norm. This constructs the energy identity from the actual dynamics. Let e(t)=f(X(t))-f(z). Subtracting the constant minimum preserves the derivative. PL gives 2 alpha e(t)<=norm gradient f(X(t)) squared, hence the actual right derivative satisfies e prime(t)<=-2 alpha e(t). Differentiability makes f continuous, so the supplied continuity of X makes e continuous on the closed interval. Each right derivative supplies the one-sided slope hypothesis for Mathlib Gronwall on [0,T]. With constant coefficient -2 alpha and zero forcing, its bound is e(0) exp(-2 alpha t), including the terminal endpoint. The global minimum gives e(t)>=0.

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 dissipation_and_decay {f : E → ℝ} {X : ℝ → E} {z : E} {α T : ℝ}
    (_hα : 0 < α) (_hT : 0 ≤ T) (hf : Differentiable ℝ f)
    (hX : ContinuousOn X (Icc 0 T))
    (hflow : ∀ t ∈ Ico 0 T,
      HasDerivWithinAt X (-gradient f (X t)) (Ici t) t)
    (hz : IsMinOn f univ z)
    (hpl : ∀ x, 2 * α * (f x - f z) ≤ ‖gradient f x‖ ^ 2) :
    (∀ t ∈ Ico 0 T, HasDerivWithinAt (f ∘ X)
      (-‖gradient f (X t)‖ ^ 2) (Ici t) t) ∧
    ∀ t ∈ Icc 0 T, 0 ≤ f (X t) - f z ∧
      f (X t) - f z ≤ (f (X 0) - f z) * Real.exp (-2 * α * t) := by
  have hd : ∀ t ∈ Ico 0 T, HasDerivWithinAt (f ∘ X)
      (-‖gradient f (X t)‖ ^ 2) (Ici t) t := by
    intro t ht
    have hgrad : HasFDerivAt f (InnerProductSpace.toDual ℝ E (gradient f (X t))) (X t) :=
      (hf (X t)).hasGradientAt
    have h := hgrad.comp_hasDerivWithinAt t (hflow t ht)
    simpa only [InnerProductSpace.toDual_apply_apply, inner_neg_right,
      real_inner_self_eq_norm_sq] using h
  refine ⟨hd, ?_⟩
  intro t ht
  refine ⟨sub_nonneg.mpr (hz (mem_univ (X t))), ?_⟩
  have hc : ContinuousOn (fun u => f (X u) - f z) (Icc 0 T) :=
    (hf.continuous.comp_continuousOn hX).sub continuousOn_const
  have hg := le_gronwallBound_of_liminf_deriv_right_le
    (f := fun u => f (X u) - f z) (f' := fun u => -‖gradient f (X u)‖ ^ 2)
    (δ := f (X 0) - f z) (K := -(2 * α)) (ε := 0) hc
    (fun u hu r hr => by
      simpa [Function.comp_def, slope] using
        ((hd u hu).sub_const (f z)).liminf_right_slope_le hr)
    le_rfl
    (fun u _ => by nlinarith [hpl (X u)]) t ht
  simpa [gronwallBound_ε0, sub_zero, neg_mul] using hg

end AutoSamplingTheory.TechnicalLemmas.Analysis.GradientFlowPL

Exact module and namespace context

Source assumptions versus formal assumptions

SourceActual LeanDifference kindWhy it matters
Section2 C2 objective on R^d (Definition2.5 requires C1).Everywhere Frechet differentiable objective on a complete real Hilbert space.generalizationThe actual chain rule needs differentiability; no derivative continuity or finite-dimensional argument is used.
Supplied gradient flow for t>=0, with well-posedness left aside.ContinuousOn X [0,T], T>=0, with right gradient derivative on [0,T).generalizationOrdinary flow derivatives imply the right derivatives. Every chosen finite horizon is covered, including terminal continuity. No negative-time/global existence assumption is introduced.
Positive alpha and attained minimum z.alpha>0 and IsMinOn f univ z; global numeric PL bound.sameThe minimum supplies nonnegative gap, and the comparison preserves the exact coefficient 2 alpha; no convexity is used.

The objective is generalized from the source finite Euclidean C2 setting to an everywhere Frechet differentiable function on a complete real Hilbert space. The proof requires the actual derivative, not a supplied scalar dissipation identity. It does not assert continuous differentiability of the gradient. A supplied continuous curve is considered on [0,T], T>=0. Its right gradient-flow derivative is assumed only for 0<=t<T. Terminal continuity is retained, but no derivative at T, negative-time dynamics, existence, uniqueness or extension of the flow is asserted. For T=0 the rate is equality and the derivative conclusion is vacuous. The source positive PL modulus and attained minimum are explicit. The minimum supplies nonnegative gap; positivity specifies the exponential-decay regime although the comparison algebra also works without that sign. No convexity, point-distance rate, gradient Lipschitzness, discretization, stochastic flow or companion-paper theorem is concluded.

Encoder–denoiser: accepted · domain-mismatch

Detected semantic differences

  • domains: The implementation generalizes the ambient Euclidean space to a complete real inner-product space, explicitly disclosed. — Finite-dimensional Euclidean space satisfies the typeclasses. The Hilbert-space generalization is explicitly disclosed in candidate_assumptions and lesson. A total-function encoding does not require negative-time dynamics.
  • assumptions: The implementation relaxes objective regularity and supplied dynamics to the stated Frechet/right-derivative interval assumptions, explicitly disclosed. — On the source Euclidean domain, C2 implies the required differentiability. Classical supplied dynamics imply right dynamics and interval continuity. The relaxation is accurately declared; no smoothness or scalar energy identity is hidden in the conclusion. Completeness supplies Riesz representation and holds automatically in the source domain.
  • scopes: Arbitrary finite supplied intervals encode forward-time conclusions; only the derivative conclusion excludes the terminal endpoint. — The module, blind reconstruction and lesson all use these exact scopes. The reference to Ici t is a local right-derivative filter; for t<T it does not impose remote post-T dynamics. T=0 leaves dissipation empty and gives the exact initial value bound. Arbitrary finite horizons recover each source observation time under a supplied global flow.

A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

Scope and omitted-condition boundaries

  • The objective is generalized from the source finite Euclidean C2 setting to an everywhere Frechet differentiable function on a complete real Hilbert space. The proof requires the actual derivative, not a supplied scalar dissipation identity. It does not assert continuous differentiability of the gradient.
  • A supplied continuous curve is considered on [0,T], T>=0. Its right gradient-flow derivative is assumed only for 0<=t<T. Terminal continuity is retained, but no derivative at T, negative-time dynamics, existence, uniqueness or extension of the flow is asserted. For T=0 the rate is equality and the derivative conclusion is vacuous.
  • The source positive PL modulus and attained minimum are explicit. The minimum supplies nonnegative gap; positivity specifies the exponential-decay regime although the comparison algebra also works without that sign. No convexity, point-distance rate, gradient Lipschitzness, discretization, stochastic flow or companion-paper theorem is concluded.

Source and reuse

ASTIS parents called

    Mathlib API called (external library)

    • HasFDerivAt.comp_hasDerivWithinAt
    • DifferentiableAt.hasGradientAt
    • HasDerivWithinAt.liminf_right_slope_le
    • le_gronwallBound_of_liminf_deriv_right_le
    • gronwallBound_ε0

    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.

    Which proof edges are actually covered?

    • Local proof component; source adapter/review separate Derive the objective derivative from the actual gradient ODE, then prove the PL value rate on every supplied finite forward interval

    Theorem2.2 · Contraction of two gradient flows

    Sinho Chewi, Lectures on Optimization. ASTIS-authored mathematical restatement; no endorsement implied.

    arXiv:2605.07006v1 · Definition1.5; Proposition1.6 (1.5); Section2 GF; Theorem2.2 and its proof · faithful paraphrase

    Complete source statement (ASTIS restatement)

    In the Section2 Euclidean C2 setting, let f be alpha-convex with alpha>=0 as in Definition1.5. Given two gradient flows X prime=-gradient f(X) and Y prime=-gradient f(Y) at nonnegative times, their distance at t is at most exp(-alpha*t) times their initial distance. The proof differentiates squared separation, applies the gradient monotonicity characterization (1.5), then Gronwall with coefficient -2 alpha. The section assumes an attained minimum generally, but this pairwise proof does not use it; well-posedness is left aside.

    • Euclidean C2 objective in the Section2 setting; alpha-convex with alpha>=0.
    • Two supplied gradient trajectories for t>=0.
    • Standing attained-minimum convention, unused in the pairwise estimate.

    Pairwise gradient-flow contraction

    \[\|Y(t)-X(t)\|\le e^{-\alpha t}\|Y(0)-X(0)\|,\quad t\ge0.\]

    Read the formalized proofs

    Each statement and proof below has its own closed Lean disclosure. ASTIS parents, Mathlib calls and external mathematical sources are distinguished in each proof.

    ASTIS mathematical exposition

    Two gradient flows contract under strong convexity

    AutoSamplingTheory.TechnicalLemmas.Analysis.GradientFlowContraction.norm_sub_le · theorem · Teaching coverage

    Statement

    Let E be a complete real inner-product space and f:E→R be Frechet differentiable everywhere. Let alpha>=0 and T>=0, and assume f is globally alpha-convex in the chord sense. Let X,Y:R→E be continuous on [0,T], with right derivatives -gradient f(X(t)) and -gradient f(Y(t)) for every 0<=t<T. Then the distance between the trajectories satisfies the following bound for every 0<=t<=T.

    \[\begin{gathered}f((1-\lambda)x+\lambda y)\le(1-\lambda)f(x)+\lambda f(y)-\tfrac\alpha2\lambda(1-\lambda)\|y-x\|^2\quad(x,y\in E,\ 0\le\lambda\le1),\\X^{\prime+}(t)=-\nabla f(X(t)),\qquad Y^{\prime+}(t)=-\nabla f(Y(t)),\quad 0\le t<T,\\\|Y(t)-X(t)\|\le e^{-\alpha t}\|Y(0)-X(0)\|,\qquad0\le t\le T.\end{gathered}\]

    All objects and hypotheses

    • Complete real inner-product space E; f is Frechet differentiable everywhere.
    • Alpha>=0, T>=0, and StrongConvexOn univ alpha f with the alpha/2 chord normalization.
    • X and Y are continuous on the closed interval [0,T]; their actual right ODE derivatives exist at every point of [0,T).

    Mathematical proof

    1. Differentiate squared separation

    Put D(t)=Y(t)-X(t). Subtract the two actual right ODE derivatives, then differentiate the smooth squared norm. This remains valid when the two points coincide, so no division by their distance is needed.

    \[\partial_t^+\|D(t)\|^2=2\langle D(t),Y^{\prime+}(t)-X^{\prime+}(t)\rangle=-2\langle\nabla f(Y(t))-\nabla f(X(t)),D(t)\rangle.\]
    Corresponding Lean step

    HasDerivWithinAt.sub and HasDerivWithinAt.norm_sq; inner_neg_right and real_inner_comm.

    2. Reuse the strong-convex gradient bound

    Differentiability identifies the actual gradient. The existing shared result derives gradient monotonicity from the global strong-convex chord inequality. Applied at X(t) and Y(t), it bounds the squared-separation derivative by -2 alpha times the squared separation.

    \[\langle\nabla f(Y(t))-\nabla f(X(t)),D(t)\rangle\ge\alpha\|D(t)\|^2,\qquad (\|D\|^2)^{\prime+}(t)\le-2\alpha\|D(t)\|^2.\]
    Corresponding Lean step

    StrongConvexFirstOrder.gradient_inner_lower_bound_of_strongConvexOn, with DifferentiableAt.hasGradientAt.

    3. Compare on the closed interval and take square roots

    Continuity of both curves gives continuity of the squared separation including endpoints. Right derivatives provide the one-sided slope hypothesis of the existing interval Gronwall bound. Zero forcing yields the squared-distance estimate. Both the norm and exponential multiple of the initial norm are nonnegative; comparing their squares gives the exact alpha rate.

    \[\|D(t)\|^2\le\|D(0)\|^2e^{-2\alpha t}=(e^{-\alpha t}\|D(0)\|)^2\quad\Longrightarrow\quad\|D(t)\|\le e^{-\alpha t}\|D(0)\|.\]
    Corresponding Lean step

    HasDerivWithinAt.liminf_right_slope_le, le_gronwallBound_of_liminf_deriv_right_le, gronwallBound_ε0, Real.exp_add and sq_le_sq₀.

    Lean statement · norm_sub_le

    Finite-interval pairwise norm contraction for actual gradient flows.

    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_sub_le {f : E → ℝ} {X Y : ℝ → E} {α T : ℝ}
        (_hα : 0 ≤ α) (_hT : 0 ≤ T) (hf : Differentiable ℝ f)
        (hsc : StrongConvexOn univ α f)
        (hX : ContinuousOn X (Icc 0 T)) (hY : ContinuousOn Y (Icc 0 T))
        (hx : ∀ t ∈ Ico 0 T, HasDerivWithinAt X (-gradient f (X t)) (Ici t) t)
        (hy : ∀ t ∈ Ico 0 T, HasDerivWithinAt Y (-gradient f (Y t)) (Ici t) t) :
        ∀ t ∈ Icc 0 T, ‖Y t - X t‖ ≤ Real.exp (-α * t) * ‖Y 0 - X 0‖

    Exact module and namespace context

    Lean proof · norm_sub_le

    Put D(t)=Y(t)-X(t). Subtract the two actual right ODE derivatives, then differentiate the smooth squared norm. This remains valid when the two points coincide, so no division by their distance is needed. Differentiability identifies the actual gradient. The existing shared result derives gradient monotonicity from the global strong-convex chord inequality. Applied at X(t) and Y(t), it bounds the squared-separation derivative by -2 alpha times the squared separation. Continuity of both curves gives continuity of the squared separation including endpoints. Right derivatives provide the one-sided slope hypothesis of the existing interval Gronwall bound. Zero forcing yields the squared-distance estimate. Both the norm and exponential multiple of the initial norm are nonnegative; comparing their squares gives the exact alpha rate.

    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_sub_le {f : E → ℝ} {X Y : ℝ → E} {α T : ℝ}
        (_hα : 0 ≤ α) (_hT : 0 ≤ T) (hf : Differentiable ℝ f)
        (hsc : StrongConvexOn univ α f)
        (hX : ContinuousOn X (Icc 0 T)) (hY : ContinuousOn Y (Icc 0 T))
        (hx : ∀ t ∈ Ico 0 T, HasDerivWithinAt X (-gradient f (X t)) (Ici t) t)
        (hy : ∀ t ∈ Ico 0 T, HasDerivWithinAt Y (-gradient f (Y t)) (Ici t) t) :
        ∀ t ∈ Icc 0 T, ‖Y t - X t‖ ≤ Real.exp (-α * t) * ‖Y 0 - X 0‖ := by
      have hd (t : ℝ) (ht : t ∈ Ico 0 T) :
          HasDerivWithinAt (fun u => ‖Y u - X u‖ ^ 2)
            (-2 * inner ℝ (gradient f (Y t) - gradient f (X t)) (Y t - X t))
            (Ici t) t := by
        have h := ((hy t ht).sub (hx t ht)).norm_sq
        simp only [Pi.sub_apply] at h
        rw [show -gradient f (Y t) - -gradient f (X t) =
          -(gradient f (Y t) - gradient f (X t)) by abel,
          inner_neg_right, real_inner_comm] at h
        convert h using 1; ring
      intro t ht
      have hg := le_gronwallBound_of_liminf_deriv_right_le
        (f := fun u => ‖Y u - X u‖ ^ 2)
        (f' := fun u => -2 * inner ℝ (gradient f (Y u) - gradient f (X u)) (Y u - X u))
        (δ := ‖Y 0 - X 0‖ ^ 2) (K := -(2 * α)) (ε := 0)
        ((hY.sub hX).norm.pow 2)
        (fun u hu r hr => by simpa [slope] using (hd u hu).liminf_right_slope_le hr)
        le_rfl (fun u _ => by
          have hm := StrongConvexFirstOrder.gradient_inner_lower_bound_of_strongConvexOn
            hsc (fun z _ => (hf z).hasGradientAt) (mem_univ (X u)) (mem_univ (Y u))
          nlinarith) t ht
      have hs : ‖Y t - X t‖ ^ 2 ≤ (Real.exp (-α * t) * ‖Y 0 - X 0‖) ^ 2 := by
        rw [mul_pow, show Real.exp (-α * t) ^ 2 = Real.exp (-(2 * α) * t) by
          rw [sq, ← Real.exp_add]; congr 1; ring, mul_comm]
        simpa only [gronwallBound_ε0, sub_zero] using hg
      exact (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (Real.exp_pos _).le (norm_nonneg _))).mp hs
    
    end AutoSamplingTheory.TechnicalLemmas.Analysis.GradientFlowContraction

    Exact module and namespace context

    Source assumptions versus formal assumptions

    SourceActual LeanDifference kindWhy it matters
    C2 objective on R^d.Everywhere Frechet differentiable f on a complete real Hilbert space.generalizationSquared-norm calculus and existing gradient monotonicity need differentiability; finite dimension and continuity of the Hessian are not used.
    Global alpha-convexity with alpha>=0 from Definition1.5.StrongConvexOn univ alpha f and alpha>=0.sameThe alpha/2 normalization and the zero-curvature case are preserved. The unused sign premise retains the source contraction regime.
    Two supplied gradient flows for all nonnegative time.Supplied X,Y continuous on [0,T], T>=0, with right gradient ODEs on [0,T).generalizationOrdinary source trajectories restrict to these interval hypotheses for every horizon; no negative-time or terminal derivative is required.
    General standing attained-minimum convention of Section2.No minimizer assumption.generalizationThe pairwise proof uses only the two trajectories and gradient monotonicity; it never compares to an optimum.

    The source C2 Euclidean objective is generalized to an everywhere Frechet differentiable objective on a complete real Hilbert space. StrongConvexOn univ alpha f is the global chord inequality with alpha/2 normalization. Alpha>=0 retains Definition1.5: positive alpha contracts exponentially and zero alpha is nonexpansive. The two curves are supplied and continuous on [0,T], T>=0, with actual right derivatives equal to the negative gradient on [0,T). Ordinary source flows restrict to these hypotheses. Terminal continuity is retained; no derivative at T or negative-time dynamics is assumed. T=0 gives equality. The source standing attained-minimum convention is unnecessary for this pairwise estimate and is omitted explicitly. There is no flow existence, extension, minimizer construction, discrete algorithm, stochastic coupling, Wasserstein or companion-paper result. No nonzero separation or gradient Lipschitz premise is used.

    Encoder–denoiser: accepted · domain-mismatch

    Detected semantic differences

    • domains: The formal result genuinely enlarges the Euclidean ambient domain to arbitrary real Hilbert spaces. It is an accepted generalization with the source recovered by specialization, not semantic equivalence of the full source and Lean statements. — Actual module scoped E has CompleteSpace and InnerProductSpace but no FiniteDimensional instance. Candidate assumptions explicitly contrast R^d with a complete Hilbert space, and the lesson states the wider domain.
    • assumptions: C2 regularity is relaxed to everywhere Frechet differentiability, and the standing attained-minimum convention is omitted. These weaken assumptions rather than elaborate equivalent assumptions. — hf and the absence of an attainment hypothesis in the complete module; the exact linked gradient monotonicity theorem requires only supplied gradients and chord convexity. The packet states the source convention is unused and displays the difference in candidate assumptions.
    • quantifiers: The theorem accepts finite-interval supplied dynamics for arbitrary T. The source's conclusion at any finite t is recovered by T=t; no global extension or existence claim is made. — T is universally quantified, with Icc 0 T in continuity and conclusion and Ico 0 T in the ODE hypotheses. The binding's actual-pair-contraction obligation explicitly asks for every supplied finite forward interval.
    • assumptions: Classical ODE regularity is replaced by explicit right derivatives before T and continuity including T. This is an accepted weaker trajectory contract and requires no derivative at the terminal endpoint. — hx/hy use HasDerivWithinAt on Ici t for t in Ico 0 T. The actual Gronwall call consumes right slopes and ContinuousOn squared separation, exactly as explained by the lesson.

    A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

    Scope and omitted-condition boundaries

    • The source C2 Euclidean objective is generalized to an everywhere Frechet differentiable objective on a complete real Hilbert space. StrongConvexOn univ alpha f is the global chord inequality with alpha/2 normalization. Alpha>=0 retains Definition1.5: positive alpha contracts exponentially and zero alpha is nonexpansive.
    • The two curves are supplied and continuous on [0,T], T>=0, with actual right derivatives equal to the negative gradient on [0,T). Ordinary source flows restrict to these hypotheses. Terminal continuity is retained; no derivative at T or negative-time dynamics is assumed. T=0 gives equality.
    • The source standing attained-minimum convention is unnecessary for this pairwise estimate and is omitted explicitly. There is no flow existence, extension, minimizer construction, discrete algorithm, stochastic coupling, Wasserstein or companion-paper result. No nonzero separation or gradient Lipschitz premise is used.

    Source and reuse

    ASTIS parents called

    Mathlib API called (external library)

    • HasDerivWithinAt.norm_sq
    • DifferentiableAt.hasGradientAt
    • HasDerivWithinAt.liminf_right_slope_le
    • le_gronwallBound_of_liminf_deriv_right_le
    • gronwallBound_ε0
    • sq_le_sq₀

    Mathematical sources

    • Chewi Theorem2.2 — Pairwise contraction from actual gradient dynamics; Definition1.5 nonnegative curvature convention.
    • Sharp quadratic trajectories and zero curvature — Proves the actual ODE and strong convexity for f(x)=x squared/2, with arbitrary initial positions, plus a zero-curvature constant-objective case.

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

    Which proof edges are actually covered?

    • Local proof component; source adapter/review separate Derive squared-distance dissipation from both actual ODEs and prove pairwise norm contraction on every supplied finite forward interval

    Theorem2.4 · Convex gradient-flow objective rate

    Sinho Chewi, Lectures on Optimization. ASTIS-authored mathematical restatement; no endorsement implied.

    arXiv:2605.07006v1 · Section2 GF and conventions; Lemma2.1; Theorem2.4 statement and proof; Proposition1.6 (1.4) · faithful paraphrase

    Complete source statement (ASTIS restatement)

    In the Section2 Euclidean C2 setting with a supplied gradient flow and attained minimizer z, Theorem2.4 assumes alpha-convexity with alpha>=0 and states for all t>=0 that f(X(t))-f(z)<=alpha norm(X(0)-z) squared/[2(exp(alpha*t)-1)]. For alpha=0 it explicitly instructs reading the coefficient as the limiting value 1/(2t). The proof uses squared-distance dissipation, Gronwall and objective descent. The printed all-nonnegative-time wording is preserved here: no finite real-valued coefficient is specified at t=0.

    • Euclidean C2 objective; global alpha-convexity with alpha>=0.
    • Supplied forward gradient flow and a global minimizer z.
    • Printed scope t>=0; alpha0 coefficient interpreted as 1/(2t).

    Printed source rate and its zero-curvature convention

    \[f(X(t))-f(z)\le\frac{\alpha\|X(0)-z\|^2}{2(e^{\alpha t}-1)},\quad\alpha>0;\qquad\frac{\|X(0)-z\|^2}{2t}\quad\text{when }\alpha=0.\]

    Read the formalized proofs

    Each statement and proof below has its own closed Lean disclosure. ASTIS parents, Mathlib calls and external mathematical sources are distinguished in each proof.

    ASTIS mathematical exposition

    Convex gradient flows have an explicit objective rate

    AutoSamplingTheory.TechnicalLemmas.Analysis.GradientFlowValue.value_le · theorem · Teaching coverage

    Statement

    Let E be a complete real inner-product space, f:E→R be Frechet differentiable everywhere and globally alpha-convex, with alpha>=0 in the alpha/2 chord convention. Let z be a global minimizer and T>=0. Supply X:R→E continuous on [0,T], satisfying the actual right gradient ODE at every s in [0,T). Then at each strictly positive observation time t<=T, its objective gap has the following bound, with a separate zero-curvature case.

    \[\begin{gathered}X^{\prime+}(s)=-\nabla f(X(s))\quad(0\le s<T),\qquad z\in\arg\min f,\quad\alpha\ge0,\\0\le f(X(t))-f(z)\le\begin{cases}\dfrac{\|X(0)-z\|^2}{2t},&\alpha=0,\\\dfrac{\alpha\|X(0)-z\|^2}{2(e^{\alpha t}-1)},&\alpha>0,\end{cases}\quad0<t\le T.\end{gathered}\]

    All objects and hypotheses

    • Complete real inner-product space E; f is Frechet differentiable everywhere.
    • Alpha>=0 and StrongConvexOn univ alpha f: f((1-lambda)x+lambda y)<=(1-lambda)f(x)+lambda f(y)-(alpha/2)lambda(1-lambda)norm(y-x) squared for all x,y and lambda in [0,1].
    • A supplied z satisfies f(z)<=f(x) for every x:E; T>=0.
    • X is continuous on [0,T]; for each s in [0,T), HasDerivWithinAt X (-gradient f(X(s))) (Ici s) s. The observation satisfies 0<t<=T.

    Mathematical proof

    1. Derive objective descent from the actual ODE

    Represent the derivative of f by its gradient, compose with the actual right derivative of X, and obtain minus the squared gradient norm. On each subinterval [a,b], scalar Gronwall with zero coefficient and zero forcing proves f(X(b))<=f(X(a)). This uses continuity at both endpoints and only right derivatives before b.

    \[\partial_t^+f(X(t))=-\|\nabla f(X(t))\|^2\le0,\qquad f(X(b))\le f(X(a))\quad(0\le a\le b\le T).\]
    Corresponding Lean step

    DifferentiableAt.hasGradientAt, HasFDerivAt.comp_hasDerivWithinAt and le_gronwallBound_of_liminf_deriv_right_le with K=epsilon=0.

    2. Obtain distance dissipation with the value gap

    Fix an observation time t and put r(s)=norm(X(s)-z) squared, e(s)=f(X(s))-f(z). Differentiate r using the actual ODE. The existing first-order strong-convexity inequality at X(s) with comparator z gives r prime<=-alpha r-2e(s). Descent implies e(s)>=e(t) for s<=t, so the forcing can be bounded by the fixed constant -2e(t).

    \[r^{\prime+}(s)=-2\langle\nabla f(X(s)),X(s)-z\rangle\le-\alpha r(s)-2e(s)\le-\alpha r(s)-2e(t)\quad(0\le s<t).\]
    Corresponding Lean step

    HasDerivWithinAt.norm_sq, StrongConvexFirstOrder.firstOrder_lower_bound_of_strongConvexOn, and the derived AntitoneOn objective.

    3. Compare with a constant-forcing scalar equation

    Apply existing scalar interval Gronwall to r on [0,t] with coefficient -alpha and forcing -2e(t). The scalar version permits negative forcing. Nonnegativity of r(t) gives the left side of each displayed bound. Alpha=0 is evaluated directly; no zero denominator is substituted into the other branch.

    \[\begin{aligned}\alpha=0:&\quad0\le r(t)\le r(0)-2t e(t),\\\alpha>0:&\quad0\le r(t)\le r(0)e^{-\alpha t}-\frac{2e(t)}\alpha(1-e^{-\alpha t}).\end{aligned}\]
    Corresponding Lean step

    le_gronwallBound_of_liminf_deriv_right_le, gronwallBound_K0 and gronwallBound_of_K_ne_0.

    4. Divide only by positive quantities

    For t>0, the zero branch divides by 2t. In the positive branch multiply by alpha exp(alpha t), use exp(-alpha t)exp(alpha t)=1, then divide by 2(exp(alpha t)-1)>0. The supplied global minimum gives a nonnegative objective gap.

    \[0\le e(t)\le\begin{cases}r(0)/(2t),&\alpha=0,\\\alpha r(0)/(2(e^{\alpha t}-1)),&\alpha>0,\end{cases}\qquad0<t\le T.\]
    Corresponding Lean step

    Real.exp_add, Real.one_lt_exp_iff, le_div_iff₀ and IsMinOn.

    Lean statement · value_le

    Positive-time objective gap bound with direct alpha=0 branch.

    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 value_le {f : E → ℝ} {X : ℝ → E} {z : E} {α T : ℝ}
        (hα : 0 ≤ α) (_hT : 0 ≤ T) (hf : Differentiable ℝ f)
        (hsc : StrongConvexOn univ α f) (hz : IsMinOn f univ z)
        (hX : ContinuousOn X (Icc 0 T))
        (hflow : ∀ t ∈ Ico 0 T, HasDerivWithinAt X (-gradient f (X t)) (Ici t) t) :
        ∀ t ∈ Ioc 0 T, 0 ≤ f (X t) - f z ∧
          f (X t) - f z ≤ if α = 0 then ‖X 0 - z‖ ^ 2 / (2 * t)
            else α / (2 * (Real.exp (α * t) - 1)) * ‖X 0 - z‖ ^ 2

    Exact module and namespace context

    Lean proof · value_le

    Represent the derivative of f by its gradient, compose with the actual right derivative of X, and obtain minus the squared gradient norm. On each subinterval [a,b], scalar Gronwall with zero coefficient and zero forcing proves f(X(b))<=f(X(a)). This uses continuity at both endpoints and only right derivatives before b. Fix an observation time t and put r(s)=norm(X(s)-z) squared, e(s)=f(X(s))-f(z). Differentiate r using the actual ODE. The existing first-order strong-convexity inequality at X(s) with comparator z gives r prime<=-alpha r-2e(s). Descent implies e(s)>=e(t) for s<=t, so the forcing can be bounded by the fixed constant -2e(t). Apply existing scalar interval Gronwall to r on [0,t] with coefficient -alpha and forcing -2e(t). The scalar version permits negative forcing. Nonnegativity of r(t) gives the left side of each displayed bound. Alpha=0 is evaluated directly; no zero denominator is substituted into the other branch. For t>0, the zero branch divides by 2t. In the positive branch multiply by alpha exp(alpha t), use exp(-alpha t)exp(alpha t)=1, then divide by 2(exp(alpha t)-1)>0. The supplied global minimum gives a nonnegative objective gap.

    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 value_le {f : E → ℝ} {X : ℝ → E} {z : E} {α T : ℝ}
        (hα : 0 ≤ α) (_hT : 0 ≤ T) (hf : Differentiable ℝ f)
        (hsc : StrongConvexOn univ α f) (hz : IsMinOn f univ z)
        (hX : ContinuousOn X (Icc 0 T))
        (hflow : ∀ t ∈ Ico 0 T, HasDerivWithinAt X (-gradient f (X t)) (Ici t) t) :
        ∀ t ∈ Ioc 0 T, 0 ≤ f (X t) - f z ∧
          f (X t) - f z ≤ if α = 0 then ‖X 0 - z‖ ^ 2 / (2 * t)
            else α / (2 * (Real.exp (α * t) - 1)) * ‖X 0 - z‖ ^ 2 := by
      have hd (u : ℝ) (hu : u ∈ Ico 0 T) :
          HasDerivWithinAt (fun s => f (X s)) (-‖gradient f (X u)‖ ^ 2) (Ici u) u := by
        have hgrad : HasFDerivAt f (InnerProductSpace.toDual ℝ E (gradient f (X u))) (X u) :=
          (hf (X u)).hasGradientAt
        simpa only [Function.comp_def, InnerProductSpace.toDual_apply_apply,
          inner_neg_right, real_inner_self_eq_norm_sq] using
          hgrad.comp_hasDerivWithinAt u (hflow u hu)
      have hmono : AntitoneOn (fun s => f (X s)) (Icc 0 T) := by
        intro a ha b hb hab
        have hc := (hf.continuous.comp_continuousOn hX).mono
          (show Icc a b ⊆ Icc 0 T from fun u hu => ⟨ha.1.trans hu.1, hu.2.trans hb.2⟩)
        have hg := le_gronwallBound_of_liminf_deriv_right_le
          (f' := fun u => -‖gradient f (X u)‖ ^ 2) (δ := f (X a)) (K := 0) (ε := 0) hc
          (fun u hu r hr => by
            simpa [slope] using (hd u ⟨ha.1.trans hu.1, hu.2.trans_le hb.2⟩).liminf_right_slope_le hr)
          le_rfl (fun u _ => by nlinarith [sq_nonneg ‖gradient f (X u)‖]) b ⟨hab, le_rfl⟩
        simpa [gronwallBound_K0] using hg
      have hdist (u : ℝ) (hu : u ∈ Ico 0 T) :
          HasDerivWithinAt (fun s => ‖X s - z‖ ^ 2)
            (-2 * inner ℝ (gradient f (X u)) (X u - z)) (Ici u) u := by
        have h := ((hflow u hu).sub_const z).norm_sq
        simp only [inner_neg_right, real_inner_comm] at h
        convert h using 1; ring
      intro t ht
      refine ⟨sub_nonneg.mpr (hz (mem_univ _)), ?_⟩
      have hbound := le_gronwallBound_of_liminf_deriv_right_le
        (f := fun s => ‖X s - z‖ ^ 2)
        (f' := fun u => -2 * inner ℝ (gradient f (X u)) (X u - z))
        (δ := ‖X 0 - z‖ ^ 2) (K := -α) (ε := -2 * (f (X t) - f z))
        (((hX.sub continuousOn_const).norm.pow 2).mono
          (show Icc 0 t ⊆ Icc 0 T from fun u hu => ⟨hu.1, hu.2.trans ht.2⟩))
        (fun u hu r hr => by
          simpa [slope] using (hdist u ⟨hu.1, hu.2.trans_le ht.2⟩).liminf_right_slope_le hr)
        le_rfl (fun u hu => by
          have hs := StrongConvexFirstOrder.firstOrder_lower_bound_of_strongConvexOn
            hsc (fun x _ => (hf x).hasGradientAt) (mem_univ (X u)) (mem_univ z)
          rw [show z - X u = -(X u - z) by abel, inner_neg_right, norm_neg] at hs
          have hm := hmono ⟨hu.1, hu.2.le.trans ht.2⟩ ⟨ht.1.le, ht.2⟩ hu.2.le
          nlinarith) t ⟨ht.1.le, le_rfl⟩
      have hn := (sq_nonneg ‖X t - z‖).trans hbound
      by_cases ha : α = 0
      · simp only [ha, neg_zero, gronwallBound_K0, sub_zero] at hn ⊢
        apply (le_div_iff₀ (mul_pos (by norm_num) ht.1)).mpr
        nlinarith
      · rw [if_neg ha]
        have hap : 0 < α := lt_of_le_of_ne hα (Ne.symm ha)
        rw [gronwallBound_of_K_ne_0 (neg_ne_zero.mpr ha), sub_zero] at hn
        have hmul := mul_nonneg hn hap.le
        have heq : (‖X 0 - z‖ ^ 2 * Real.exp (-α * t) +
            (-2 * (f (X t) - f z)) / -α * (Real.exp (-α * t) - 1)) * α =
            α * ‖X 0 - z‖ ^ 2 * Real.exp (-α * t) +
              2 * (f (X t) - f z) * (Real.exp (-α * t) - 1) := by
          field_simp
        rw [heq] at hmul
        have he : Real.exp (-α * t) * Real.exp (α * t) = 1 := by
          rw [← Real.exp_add, show -α * t + α * t = 0 by ring, Real.exp_zero]
        have hp := mul_nonneg hmul (Real.exp_pos (α * t)).le
        have hcancel : (α * ‖X 0 - z‖ ^ 2 * Real.exp (-α * t) +
            2 * (f (X t) - f z) * (Real.exp (-α * t) - 1)) * Real.exp (α * t) =
            α * ‖X 0 - z‖ ^ 2 - 2 * (f (X t) - f z) * (Real.exp (α * t) - 1) := by
          calc
            _ = α * ‖X 0 - z‖ ^ 2 * (Real.exp (-α * t) * Real.exp (α * t)) +
              2 * (f (X t) - f z) * (Real.exp (-α * t) * Real.exp (α * t)) -
              2 * (f (X t) - f z) * Real.exp (α * t) := by ring
            _ = _ := by rw [he]; ring
        rw [hcancel] at hp
        rw [div_mul_eq_mul_div]
        apply (le_div_iff₀ (mul_pos (by norm_num) (sub_pos.mpr (Real.one_lt_exp_iff.mpr
          (mul_pos hap ht.1))))).mpr
        nlinarith
    
    end AutoSamplingTheory.TechnicalLemmas.Analysis.GradientFlowValue

    Exact module and namespace context

    Source assumptions versus formal assumptions

    SourceActual LeanDifference kindWhy it matters
    C2 objective on R^d.Everywhere Frechet differentiable f on a complete real Hilbert space.generalizationThe actual chain rule, squared norm and first-order support require these weaker hypotheses; no Hessian or finite-dimensional compactness is used.
    Supplied forward gradient flow and attained minimum.IsMinOn f univ z; ContinuousOn X [0,T] and right gradient dynamics on [0,T).generalizationEvery source trajectory restricts to these interval hypotheses. The attained minimum is retained; no existence theorem is added.
    Alpha>=0; alpha0 coefficient interpreted as 1/(2t).Nonnegative alpha; explicit if alpha=0 branch.sameDirect K0 comparison proves the zero case; no analytic parameter-limit theorem is claimed.
    The printed statement says t>=0 although both coefficients divide by zero at t0.Observation time lies in Ioc 0 T: 0<t<=T.mathematically-necessaryPositive time makes the normalized real coefficient defined and positive. The quadratic trajectory with X0=1 has initial gap1/2, so Lean division by zero would make the claimed bound false. A separately reviewed domain clarification remains distinct from the original source.

    The finite real-valued quotient is asserted only for 0<t<=T. The printed source says t>=0, although its denominator vanishes at t=0. The original source statement is retained and a separately reviewed positive-time clarification is exposed. Lean total division at zero is not the source limiting or infinite convention. Alpha>=0 and the alpha/2 chord normalization are preserved. Alpha=0 is proved directly with coefficient 1/(2t); alpha>0 uses alpha/(2(exp(alpha*t)-1)). No analytic alpha-to-zero limit theorem or sharpness claim is made. The source C2 Euclidean objective is generalized to an everywhere Frechet differentiable objective on a complete real Hilbert space. A global minimizer z and an actual continuous trajectory on [0,T] are supplied. Right gradient dynamics are assumed only on [0,T); no terminal or negative-time derivative, ODE existence, minimum existence, discrete method, stochastic flow or companion-paper result is asserted.

    Encoder–denoiser: accepted · domain-mismatch

    Detected semantic differences

    • domains: The theorem expands R^d to arbitrary complete real inner-product spaces. This is a disclosed generalization, not a claim that the pinned source already quantifies over Hilbert spaces. — Production E typeclasses and lesson assumption 1; pinned source Euclidean setting.
    • assumptions: C2 is replaced by everywhere Frechet differentiability, and classical forward dynamics by continuous interval trajectories with right dynamics before the endpoint. The source class is covered at positive times, but the full assumptions differ. — Production hf,hX,hflow; candidate assumptions and the first lesson paragraph.
    • quantifiers: The printed nonnegative-time claim becomes a positive-time finite-interval claim. Finite-horizon quantification covers every positive time of a supplied global source flow; zero is omitted and remains a distinct source boundary. — Production conclusion Ioc 0 T; source-zero-time-convention obligation; both source denominators vanish at zero. This review does not accept or reject any separate repair proposal.
    • conclusion: The explicit lower bound 0<=f(X(t))-f(z) is a consequence of the supplied global minimizer and introduces no additional requirement. — The first conjunct is proved directly using hz (mem_univ _).
    • scopes: The proof replaces the source variable-forcing integral comparison with a fixed-observation constant forcing -2e(t), justified by objective descent. This preserves the positive-time estimate and is explained accurately in the lesson. — hmono precedes hbound; the latter sets epsilon=-2*(f(X t)-f z), uses the first-order strong-convexity inequality and hmono, then separates alpha=0 and alpha>0.

    Proposed source repair — not the original theorem

    Under the unchanged source Euclidean C2 alpha-convex setting with alpha>=0, supplied forward gradient flow X and a global minimizer z, for every t>0 one has f(X(t))-f(z)<=alpha*norm(X(0)-z)^2/[2*(exp(alpha*t)-1)] when alpha>0, and <=norm(X(0)-z)^2/(2*t) when alpha=0. No finite real-valued normalized bound at t=0 is asserted.

    Restrict the normalized finite real-valued observation-time inequality from the printed t>=0 to t>0, keeping both the source hypotheses and its explicit alpha=0 coefficient convention unchanged.

    Classification: mathematically-necessary · Status: accepted

    At t=0, exp(alpha*t)-1 and 2*t both vanish. The normalized expression has no finite real interpretation there without an additional convention; totalized Lean division instead returns zero and can make the claimed bound false. This domain clarification is separate from the Hilbert/differentiability/right-time generalization and does not alter the pinned original source.

    Minimality: Only the initial observation point is removed; no source spatial or trajectory hypothesis and no positive-time coefficient is changed. For t>0 and alpha>0, exp(alpha*t)-1>0; for alpha=0,2*t>0. An extended-real infinite bound or a division-free reformulation would be different representations, not this minimal real-quotient clarification.

    Evidence: Chewi2605.07006v1 Theorem2.4 states t>=0 and displays the singular quotient; source proof divides by the exponential integral. Take f(x)=x^2/2 on R, z=0, alpha=1, X(t)=exp(-t). It satisfies the C2 strong-convex source hypotheses and actual gradient ODE. At t=0 the gap is1/2, while Lean1/[2(exp0-1)]*norm(1-0)^2=0. Tests/Shared/GradientFlowValue.lean derives the actual gradient/convexity/minimum/trajectory and compiles the endpoint negated-inequality witness. This is a counterexample to the naive totalized formal reading, not to the source positive-time result.

    A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

    Scope and omitted-condition boundaries

    • The finite real-valued quotient is asserted only for 0<t<=T. The printed source says t>=0, although its denominator vanishes at t=0. The original source statement is retained and a separately reviewed positive-time clarification is exposed. Lean total division at zero is not the source limiting or infinite convention.
    • Alpha>=0 and the alpha/2 chord normalization are preserved. Alpha=0 is proved directly with coefficient 1/(2t); alpha>0 uses alpha/(2(exp(alpha*t)-1)). No analytic alpha-to-zero limit theorem or sharpness claim is made.
    • The source C2 Euclidean objective is generalized to an everywhere Frechet differentiable objective on a complete real Hilbert space. A global minimizer z and an actual continuous trajectory on [0,T] are supplied. Right gradient dynamics are assumed only on [0,T); no terminal or negative-time derivative, ODE existence, minimum existence, discrete method, stochastic flow or companion-paper result is asserted.

    Source and reuse

    ASTIS parents called

    Mathlib API called (external library)

    • HasFDerivAt.comp_hasDerivWithinAt
    • HasDerivWithinAt.norm_sq
    • HasDerivWithinAt.liminf_right_slope_le
    • le_gronwallBound_of_liminf_deriv_right_le
    • gronwallBound_K0
    • gronwallBound_of_K_ne_0

    Mathematical sources

    • Chewi Theorem2.4 — Exact rate for positive observation times; printed t0 wording is singular and retained as a source qualification.
    • Actual quadratic trajectory and endpoint witness — Nonstationary exp(-t) trajectory tests every curvature in [0,1], including both rate branches. A t0 test refutes interpreting the printed quotient through Lean total division.

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

    Which proof edges are actually covered?

    • Local proof component; source adapter/review separate Derive the actual convex-flow objective rate for 0<t<=T, with direct zero-curvature and positive-curvature branches
    • TODO — not closed by these contributions The printed t0 normalized coefficient is singular; original wording retained with separate reviewed domain clarification, not certified as a finite real t0 rate

    Corollary2.8 · Gradient-flow convergence in gradient norm

    Sinho Chewi, Lectures on Optimization. ASTIS-authored mathematical restatement; no endorsement implied.

    arXiv:2605.07006v1 · Section2 standing C2 and attained-minimum conventions; Lemma2.1; displayed integrated dissipation immediately before Corollary2.8; Corollary2.8 · faithful paraphrase

    Complete source statement (ASTIS restatement)

    In the standing Section2 setting, f is C2 on R^d, X is its supplied forward gradient flow and fstar=f(z) for an attained global minimizer z. Corollary2.8 bounds the minimum gradient norm over [0,t] by sqrt((f(X(0))-fstar)/t), without convexity. The preceding display bounds the time average of squared gradient norm by the same initial objective gap divided by t. The displayed finite quotient uses positive elapsed time; it gives a minimum over the interval rather than a final-time bound.

    • C2 Euclidean objective, supplied gradient flow and an attained global minimum, by Section2 conventions.
    • Positive elapsed time for the normalized 1/t bound; no convexity or PL assumption.

    Source gradient-norm bound

    \[\min_{s\in[0,t]}\|\nabla f(X(s))\|\le\sqrt{\frac{f(X(0))-f_\star}{t}}.\]

    Read the formalized proofs

    Each statement and proof below has its own closed Lean disclosure. ASTIS parents, Mathlib calls and external mathematical sources are distinguished in each proof.

    ASTIS mathematical exposition

    A gradient flow reaches a small gradient

    AutoSamplingTheory.TechnicalLemmas.Analysis.GradientFlowStationarity.exists_min_norm_le · theorem · Teaching coverage

    Statement

    Let E be a complete real inner-product space and f:E→R be C1. Supply a global minimizer z, a time T>0, and a curve X:R→E continuous on [0,T] whose right derivative equals minus the actual gradient of f at X(u), for each 0<=u<T. Then some s in [0,T] attains the smallest gradient norm on that entire interval and satisfies the displayed bound.

    \[\begin{gathered}X^{\prime+}(u)=-\nabla f(X(u))\quad(0\le u<T),\qquad z\in\arg\min f,\quad T>0,\\\exists s\in[0,T]:\quad\|\nabla f(X(s))\|=\min_{u\in[0,T]}\|\nabla f(X(u))\|\le\sqrt{\frac{f(X(0))-f(z)}{T}}.\end{gathered}\]

    All objects and hypotheses

    • Complete real inner-product space E; f is continuously Frechet differentiable (ContDiff R 1 f).
    • A supplied z satisfies f(z)<=f(x) for every x:E; elapsed time T is strictly positive.
    • X is continuous on [0,T]; for every u in [0,T), HasDerivWithinAt X (-gradient f(X(u))) (Ici u) u.

    Mathematical proof

    1. Attain the smallest gradient norm

    The C1 assumption makes the Frechet derivative continuous. The Riesz inverse is continuous, so the actual gradient, and hence its norm along X, is continuous. The nonempty compact time interval therefore contains a minimizing time s. Put m=norm(gradient f(X(s))).

    \[\exists s\in[0,T],\qquad 0\le m:=\|\nabla f(X(s))\|\le\|\nabla f(X(u))\|\quad(0\le u\le T).\]
    Corresponding Lean step

    ContDiff.continuous_fderiv, continuity of InnerProductSpace.toDual.symm, and IsCompact.exists_isMinOn.

    2. Derive the actual energy dissipation

    Compose the Frechet derivative of f with the supplied right derivative of X. The gradient ODE makes the resulting inner product minus the squared gradient norm. Minimality of m bounds that derivative above by -m squared.

    \[\partial_u^+f(X(u))=\langle\nabla f(X(u)),-\nabla f(X(u))\rangle=-\|\nabla f(X(u))\|^2\le-m^2\quad(0\le u<T).\]
    Corresponding Lean step

    DifferentiableAt.hasGradientAt and HasFDerivAt.comp_hasDerivWithinAt derive the identity; sq_le_sq₀ compares nonnegative norms.

    3. Use the available energy budget

    Integrating this constant derivative bound gives f(X(T))<=f(X(0))-T m squared. In Lean the existing scalar right-slope Gronwall theorem with coefficient zero and forcing -m squared performs this comparison. The supplied minimum gives f(z)<=f(X(T)), so T m squared cannot exceed the initial objective gap.

    \[Tm^2\le f(X(0))-f(X(T))\le f(X(0))-f(z).\]
    Corresponding Lean step

    le_gronwallBound_of_liminf_deriv_right_le with K=0, epsilon=-m²; gronwallBound_K0 and IsMinOn.

    4. Convert to the gradient-norm rate

    Divide by the strictly positive T, then take the nonnegative square root. Because s was chosen as a minimizer, this bounds the attained minimum over the whole time interval, not necessarily the gradient at its final time.

    \[\min_{0\le u\le T}\|\nabla f(X(u))\|=m\le\sqrt{\frac{f(X(0))-f(z)}{T}}.\]
    Corresponding Lean step

    le_div_iff₀ and Real.le_sqrt; the global minimum supplies nonnegativity of the initial gap.

    Lean statement · exists_min_norm_le

    An attained time-interval minimum of gradient norm with the exact square-root objective-gap rate.

    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_min_norm_le {f : E → ℝ} {X : ℝ → E} {z : E} {T : ℝ}
        (hT : 0 < T) (hf : ContDiff ℝ 1 f) (hz : IsMinOn f univ z)
        (hX : ContinuousOn X (Icc 0 T))
        (hflow : ∀ t ∈ Ico 0 T, HasDerivWithinAt X (-gradient f (X t)) (Ici t) t) :
        ∃ s ∈ Icc 0 T, IsMinOn (fun u => ‖gradient f (X u)‖) (Icc 0 T) s ∧
          ‖gradient f (X s)‖ ≤ Real.sqrt ((f (X 0) - f z) / T)

    Exact module and namespace context

    Lean proof · exists_min_norm_le

    The C1 assumption makes the Frechet derivative continuous. The Riesz inverse is continuous, so the actual gradient, and hence its norm along X, is continuous. The nonempty compact time interval therefore contains a minimizing time s. Put m=norm(gradient f(X(s))). Compose the Frechet derivative of f with the supplied right derivative of X. The gradient ODE makes the resulting inner product minus the squared gradient norm. Minimality of m bounds that derivative above by -m squared. Integrating this constant derivative bound gives f(X(T))<=f(X(0))-T m squared. In Lean the existing scalar right-slope Gronwall theorem with coefficient zero and forcing -m squared performs this comparison. The supplied minimum gives f(z)<=f(X(T)), so T m squared cannot exceed the initial objective gap. Divide by the strictly positive T, then take the nonnegative square root. Because s was chosen as a minimizer, this bounds the attained minimum over the whole time interval, not necessarily the gradient at its final time.

    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_min_norm_le {f : E → ℝ} {X : ℝ → E} {z : E} {T : ℝ}
        (hT : 0 < T) (hf : ContDiff ℝ 1 f) (hz : IsMinOn f univ z)
        (hX : ContinuousOn X (Icc 0 T))
        (hflow : ∀ t ∈ Ico 0 T, HasDerivWithinAt X (-gradient f (X t)) (Ici t) t) :
        ∃ s ∈ Icc 0 T, IsMinOn (fun u => ‖gradient f (X u)‖) (Icc 0 T) s ∧
          ‖gradient f (X s)‖ ≤ Real.sqrt ((f (X 0) - f z) / T) := by
      have hdf : Differentiable ℝ f := hf.differentiable (by norm_num)
      have hcg : Continuous (gradient f) :=
        (InnerProductSpace.toDual ℝ E).symm.continuous.comp (hf.continuous_fderiv (by norm_num))
      obtain ⟨s, hs, hmin⟩ := isCompact_Icc.exists_isMinOn
        (nonempty_Icc.mpr hT.le) (hcg.comp_continuousOn hX).norm
      refine ⟨s, hs, hmin, ?_⟩
      have hd (u : ℝ) (hu : u ∈ Ico 0 T) :
          HasDerivWithinAt (fun v => f (X v)) (-‖gradient f (X u)‖ ^ 2) (Ici u) u := by
        have hg : HasFDerivAt f (InnerProductSpace.toDual ℝ E (gradient f (X u))) (X u) :=
          (hdf (X u)).hasGradientAt
        simpa only [Function.comp_def, InnerProductSpace.toDual_apply_apply,
          inner_neg_right, real_inner_self_eq_norm_sq] using
          hg.comp_hasDerivWithinAt u (hflow u hu)
      have hb := le_gronwallBound_of_liminf_deriv_right_le
        (f' := fun u => -‖gradient f (X u)‖ ^ 2) (δ := f (X 0))
        (K := 0) (ε := -‖gradient f (X s)‖ ^ 2)
        (hf.continuous.comp_continuousOn hX)
        (fun u hu r hr => by simpa [slope] using (hd u hu).liminf_right_slope_le hr)
        le_rfl (fun u hu => by
          have hm := hmin (show u ∈ Icc 0 T from ⟨hu.1, hu.2.le⟩)
          have hsq := sq_le_sq₀ (norm_nonneg (gradient f (X s))) (norm_nonneg (gradient f (X u)))
          simpa using (neg_le_neg (hsq.mpr hm))) T ⟨hT.le, le_rfl⟩
      simp only [gronwallBound_K0, sub_zero] at hb
      apply (Real.le_sqrt (norm_nonneg _) (div_nonneg
        (sub_nonneg.mpr (hz (mem_univ _))) hT.le)).mpr
      apply (le_div_iff₀ hT).mpr
      have hzT : f z ≤ f (X T) := hz (mem_univ (X T))
      change f (X T) ≤ _ at hb
      nlinarith
    
    end AutoSamplingTheory.TechnicalLemmas.Analysis.GradientFlowStationarity

    Exact module and namespace context

    Source assumptions versus formal assumptions

    SourceActual LeanDifference kindWhy it matters
    C2 on R^d by the Section2 standing convention.ContDiff R 1 f on a complete real Hilbert space.generalizationOnly continuity of the gradient and first-order chain rule are needed. Compactness is of the scalar time interval, not the ambient space.
    Supplied forward gradient flow and attained global minimizer.IsMinOn f univ z, continuous X on [0,T], actual right gradient ODE on [0,T).generalizationThe minimizer premise is retained; a source trajectory restricts to this weaker interval interface without requiring terminal or negative-time derivatives.
    Finite normalized expression containing 1/t.T>0.source-implicitPositive elapsed time is the domain on which the printed real quotient is defined. No t0 coefficient or extended-real convention is introduced.
    Minimum over all s in [0,t].Existential witness s in [0,T] with IsMinOn gradient norm and the bound.sameContinuity and compactness prove attainment, so the witness expresses the actual finite minimum rather than a weaker infimum or arbitrary selected iterate.

    Only positive elapsed time T is used in the finite normalized bound. The source 1/t formula implicitly requires t>0; no finite t=0 coefficient is assigned. The source C2 Euclidean setting is generalized to C1 on a complete real Hilbert space. A global minimizer z is retained, rather than replaced by a terminal lower bound. The supplied continuous trajectory satisfies only right derivatives on [0,T); no derivative at the final endpoint or negative time is needed. No convexity, smoothness constant, PL inequality, flow or minimizer existence theorem, last-time gradient estimate, infinite-time subsequence or convergence of the trajectory is asserted. The conclusion explicitly supplies an attained minimum of the actual gradient norm.

    Encoder–denoiser: accepted · domain-mismatch

    Detected semantic differences

    • domains: Hilbert-space and local-horizon generalization. — This is a valid Hilbert-space and finite-horizon generalization, not literal domain equivalence. Only the time interval is required compact: the proof takes the minimum of a continuous real-valued function on [0,T], never assumes compact bounded subsets of E. Negative-time values and values beyond T are unused.
    • assumptions: C1 regularity suffices for this argument. — C1 replaces C2 and finite-horizon right-derivative data replace a full forward flow. These are mathematically sufficient: C1 gives continuous gradient, the chain rule gives right energy derivative minus gradient norm squared, and scalar right-slope comparison closes the estimate. Explicit continuity and global minimality do not add restrictions to the source setting. No flow existence or uniqueness is proved.
    • scopes: Positive time is explicit. — The pinned Corollary 2.8 does not state a separate explicit t>0 clause, while its denominator t rules out a finite real interpretation at zero. The packet correctly restricts its claimed finite quotient to positive time. This review does not certify the formula at t=0, nor propose any zero-time repair. No derivative at T is needed by the checked right-slope comparison.

    A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

    Scope and omitted-condition boundaries

    • Only positive elapsed time T is used in the finite normalized bound. The source 1/t formula implicitly requires t>0; no finite t=0 coefficient is assigned.
    • The source C2 Euclidean setting is generalized to C1 on a complete real Hilbert space. A global minimizer z is retained, rather than replaced by a terminal lower bound. The supplied continuous trajectory satisfies only right derivatives on [0,T); no derivative at the final endpoint or negative time is needed.
    • No convexity, smoothness constant, PL inequality, flow or minimizer existence theorem, last-time gradient estimate, infinite-time subsequence or convergence of the trajectory is asserted. The conclusion explicitly supplies an attained minimum of the actual gradient norm.

    Source and reuse

    ASTIS parents called

      Mathlib API called (external library)

      • ContDiff.continuous_fderiv
      • IsCompact.exists_isMinOn
      • HasFDerivAt.comp_hasDerivWithinAt
      • HasDerivWithinAt.liminf_right_slope_le
      • le_gronwallBound_of_liminf_deriv_right_le
      • gronwallBound_K0
      • Real.le_sqrt

      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.

      Which proof edges are actually covered?

      • Local proof component; source adapter/review separate An attained minimum of gradient norm on a positive time interval satisfies the exact square-root objective-gap bound

      Exercise2.1 · Convex flow Lyapunov and improved upper bounds

      Sinho Chewi, Lectures on Optimization. ASTIS-authored mathematical restatement; no endorsement implied.

      arXiv:2605.07006v1 · Section2 C2, actual gradient-flow and attained-minimum conventions; Exercise2.1 Lyapunov display, gradient inequality and (2.1) · faithful paraphrase

      Complete source statement (ASTIS restatement)

      In the standing Section2 C2 Euclidean setting with a supplied actual gradient flow and global minimizer z, Exercise2.1 assumes convexity. It asks to show that L(t)=t squared times gradient norm squared+2t times objective gap+squared distance to z has nonpositive derivative, and to deduce gradient norm squared<=squared initial distance/t squared. First-order support then yields the improved objective gap bound squared initial distance/(4t). The exercise also asks for a sharpness witness using a scaled positive-part function; that separate nonsmooth witness is not included in the current formalized upper-bound component.

      • C2 Euclidean convex objective; actual supplied gradient flow and global minimizer z.
      • Nonnegative flow times; positive time for finite normalized upper bounds.

      Source Lyapunov and upper rates

      \[L_t=t^2\|\nabla f(X_t)\|^2+2t(f(X_t)-f_\star)+\|X_t-z\|^2,\quad\dot L_t\le0;\qquad \|\nabla f(X_t)\|^2\le\frac{\|X_0-z\|^2}{t^2},\quad f(X_t)-f_\star\le\frac{\|X_0-z\|^2}{4t}.\]

      Read the formalized proofs

      Each statement and proof below has its own closed Lean disclosure. ASTIS parents, Mathlib calls and external mathematical sources are distinguished in each proof.

      ASTIS mathematical exposition

      A convex gradient flow has last-time gradient and value bounds

      AutoSamplingTheory.TechnicalLemmas.Analysis.GradientFlowLastIterate.lyapunov_and_rates · theorem · Teaching coverage

      Statement

      Let E be a complete real inner-product space, f:E→R be C2 and convex on E, z a supplied global minimizer, and T>=0. Supply X:R→E continuous on [0,T] with actual right derivative -gradient f(X(t)) for all t in [0,T). The following Lyapunov is antitone on [0,T]. At every 0<t<=T it gives both displayed last-time upper bounds.

      \[\begin{gathered}L(t)=t^2\|\nabla f(X(t))\|^2+2t(f(X(t))-f(z))+\|X(t)-z\|^2,\\L(b)\le L(a)\quad(0\le a\le b\le T),\\\|\nabla f(X(t))\|^2\le\frac{\|X(0)-z\|^2}{t^2},\qquad f(X(t))-f(z)\le\frac{\|X(0)-z\|^2}{4t}\quad(0<t\le T).\end{gathered}\]

      All objects and hypotheses

      • Complete real inner-product space E; f is C2 (ContDiff R 2 f) and ConvexOn R univ f.
      • A supplied z is a global minimizer; T>=0.
      • X is continuous on [0,T]; at every t in [0,T), HasDerivWithinAt X (-gradient f(X(t))) (Ici t) t. Normalized bounds use 0<t<=T.

      Mathematical proof

      1. Recover the genuine Hessian sign from convexity

      The existing first-order convexity theorem gives gradient monotonicity. The compiled gradient-Hessian equivalence turns it into nonnegativity of the true second Frechet derivative on every diagonal direction. Compose the derivative of Df with the inverse Riesz map to obtain the actual derivative H(x) of gradient f. Then inner(H(x)v,v)>=0. No Hessian sign or independent gradient field is supplied.

      \[\langle H(x)v,v\rangle=D^2f(x)[v,v]\ge0,\qquad D(\nabla f)(x)=H(x).\]
      Corresponding Lean step

      StrongConvexFirstOrder.gradient_inner_lower_bound_of_strongConvexOn, ConvexityC2.gradient_mono_iff_fderiv2_lower and toDual_symm_apply.

      2. Differentiate the three Lyapunov terms

      Write g(t)=gradient f(X(t)), e(t)=f(X(t))-f(z), r(t)=norm(X(t)-z) squared. The actual right gradient ODE gives the three identities below. They are derived by chain and product rules, including differentiation of the actual gradient via H.

      \[(\|g\|^2)^{\prime+}=-2\langle H(X)g,g\rangle,\qquad e^{\prime+}=-\|g\|^2,\qquad r^{\prime+}=-2\langle g,X-z\rangle.\]
      Corresponding Lean step

      HasFDerivAt.comp_hasDerivWithinAt, HasDerivWithinAt.norm_sq and product rules.

      3. Cancel the gradient-square terms

      Differentiate L(t)=t squared norm(g) squared+2t e+r. The two opposite 2t norm(g) squared terms cancel. The Hessian term is nonpositive; first-order support gives e<=inner(g,X-z). Therefore the actual right derivative of L is nonpositive. Scalar K0, zero-forcing Gronwall on every subinterval [a,b] proves L(b)<=L(a).

      \[L^{\prime+}(t)=-2t^2\langle H(X(t))g(t),g(t)\rangle+2e(t)-2\langle g(t),X(t)-z\rangle\le0.\]
      Corresponding Lean step

      StrongConvexFirstOrder.firstOrder_lower_bound_of_strongConvexOn; le_gronwallBound_of_liminf_deriv_right_le and gronwallBound_K0.

      4. Extract the last-time gradient bound

      For positive t, global minimality makes e(t) nonnegative, and r(t) is a squared norm. Drop these two nonnegative terms from L(t)<=L(0). Divide by t squared, which is strictly positive.

      \[t^2\|g(t)\|^2\le L(t)\le L(0)=\|X(0)-z\|^2,\qquad \|g(t)\|^2\le\frac{\|X(0)-z\|^2}{t^2}.\]
      Corresponding Lean step

      IsMinOn, sq_nonneg and le_div_iff₀.

      5. Extract the improved objective bound

      First-order support and Cauchy-Schwarz bound e by norm(g) norm(X-z). Young inequality, obtained by squaring t norm(g)-norm(X-z), then gives 2t e<=t squared norm(g) squared+r. Hence 4t e<=L(t)<=L(0). Division by 4t yields the exact improved upper coefficient.

      \[2t e(t)\le t^2\|g(t)\|^2+r(t),\qquad 4t e(t)\le L(t)\le\|X(0)-z\|^2,\qquad e(t)\le\frac{\|X(0)-z\|^2}{4t}.\]
      Corresponding Lean step

      real_inner_le_norm, sq_nonneg, mul_le_mul_of_nonneg_left and le_div_iff₀.

      Lean statement · lyapunov_and_rates

      Closed-interval Lyapunov antitonicity and both positive-time bounds.

      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 lyapunov_and_rates {f : E → ℝ} {X : ℝ → E} {z : E} {T : ℝ}
          (hT : 0 ≤ T) (hf : ContDiff ℝ 2 f) (hc : ConvexOn ℝ univ f)
          (hz : IsMinOn f univ z) (hX : ContinuousOn X (Icc 0 T))
          (hflow : ∀ t ∈ Ico 0 T, HasDerivWithinAt X (-gradient f (X t)) (Ici t) t) :
          AntitoneOn (fun t => t ^ 2 * ‖gradient f (X t)‖ ^ 2 +
            2 * t * (f (X t) - f z) + ‖X t - z‖ ^ 2) (Icc 0 T) ∧
          ∀ t ∈ Ioc 0 T, ‖gradient f (X t)‖ ^ 2 ≤ ‖X 0 - z‖ ^ 2 / t ^ 2 ∧
            f (X t) - f z ≤ ‖X 0 - z‖ ^ 2 / (4 * t)

      Exact module and namespace context

      Lean proof · lyapunov_and_rates

      The existing first-order convexity theorem gives gradient monotonicity. The compiled gradient-Hessian equivalence turns it into nonnegativity of the true second Frechet derivative on every diagonal direction. Compose the derivative of Df with the inverse Riesz map to obtain the actual derivative H(x) of gradient f. Then inner(H(x)v,v)>=0. No Hessian sign or independent gradient field is supplied. Write g(t)=gradient f(X(t)), e(t)=f(X(t))-f(z), r(t)=norm(X(t)-z) squared. The actual right gradient ODE gives the three identities below. They are derived by chain and product rules, including differentiation of the actual gradient via H. Differentiate L(t)=t squared norm(g) squared+2t e+r. The two opposite 2t norm(g) squared terms cancel. The Hessian term is nonpositive; first-order support gives e<=inner(g,X-z). Therefore the actual right derivative of L is nonpositive. Scalar K0, zero-forcing Gronwall on every subinterval [a,b] proves L(b)<=L(a). For positive t, global minimality makes e(t) nonnegative, and r(t) is a squared norm. Drop these two nonnegative terms from L(t)<=L(0). Divide by t squared, which is strictly positive. First-order support and Cauchy-Schwarz bound e by norm(g) norm(X-z). Young inequality, obtained by squaring t norm(g)-norm(X-z), then gives 2t e<=t squared norm(g) squared+r. Hence 4t e<=L(t)<=L(0). Division by 4t yields the exact improved upper coefficient.

      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 lyapunov_and_rates {f : E → ℝ} {X : ℝ → E} {z : E} {T : ℝ}
          (hT : 0 ≤ T) (hf : ContDiff ℝ 2 f) (hc : ConvexOn ℝ univ f)
          (hz : IsMinOn f univ z) (hX : ContinuousOn X (Icc 0 T))
          (hflow : ∀ t ∈ Ico 0 T, HasDerivWithinAt X (-gradient f (X t)) (Ici t) t) :
          AntitoneOn (fun t => t ^ 2 * ‖gradient f (X t)‖ ^ 2 +
            2 * t * (f (X t) - f z) + ‖X t - z‖ ^ 2) (Icc 0 T) ∧
          ∀ t ∈ Ioc 0 T, ‖gradient f (X t)‖ ^ 2 ≤ ‖X 0 - z‖ ^ 2 / t ^ 2 ∧
            f (X t) - f z ≤ ‖X 0 - z‖ ^ 2 / (4 * t) := by
        have hdf : Differentiable ℝ f := hf.differentiable (by norm_num)
        have hsc : StrongConvexOn univ 0 f := strongConvexOn_zero.mpr hc
        have hH := (ConvexityC2.gradient_mono_iff_fderiv2_lower hf).mp (fun x y =>
          StrongConvexFirstOrder.gradient_inner_lower_bound_of_strongConvexOn hsc
            (fun w _ => (hdf w).hasGradientAt) (mem_univ x) (mem_univ y))
        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 (x : E) : E →L[ℝ] E := R.comp (fderiv ℝ (fderiv ℝ f) x)
        have hfd : ContDiff ℝ 1 (fderiv ℝ f) := hf.fderiv_right (by norm_num)
        have hg (x : E) : HasFDerivAt (gradient f) (H x) x :=
          R.hasFDerivAt.comp x (hfd.differentiable_one x).hasFDerivAt
        have hpos (x v : E) : 0 ≤ inner ℝ (H x v) v := by
          have hi : inner ℝ (H x v) v = (fderiv ℝ (fderiv ℝ f) x v) v := toDual_symm_apply
          simpa only [hi, zero_mul] using hH x v
        have hsupp (x : E) : f x - f z ≤ inner ℝ (gradient f x) (x - z) := by
          have h := StrongConvexFirstOrder.firstOrder_lower_bound_of_strongConvexOn hsc
            (fun w _ => (hdf w).hasGradientAt) (mem_univ x) (mem_univ z)
          rw [show z - x = -(x - z) by abel, inner_neg_right] at h
          simp only [zero_div, zero_mul, add_zero] at h
          linarith
        let L : ℝ → ℝ := fun t => t ^ 2 * ‖gradient f (X t)‖ ^ 2 +
          2 * t * (f (X t) - f z) + ‖X t - z‖ ^ 2
        let D : ℝ → ℝ := fun t => -2 * t ^ 2 * inner ℝ (H (X t) (gradient f (X t)))
          (gradient f (X t)) + 2 * (f (X t) - f z) - 2 * inner ℝ (gradient f (X t)) (X t - z)
        have hcont : ContinuousOn L (Icc 0 T) :=
          ((continuousOn_id.pow 2).mul (((continuous_iff_continuousAt.mpr (fun x => (hg x).continuousAt)).comp_continuousOn hX).norm.pow 2)).add
            (((continuousOn_const.mul continuousOn_id).mul ((hf.continuous.comp_continuousOn hX).sub continuousOn_const))) |>.add
              ((hX.sub continuousOn_const).norm.pow 2)
        have hd (t : ℝ) (ht : t ∈ Ico 0 T) : HasDerivWithinAt L (D t) (Ici t) t := by
          have hn := ((hg (X t)).comp_hasDerivWithinAt t (hflow t ht)).norm_sq
          have he : HasDerivWithinAt (fun s => f (X s)) (-‖gradient f (X t)‖ ^ 2) (Ici t) t := by
            have h : HasFDerivAt f (toDual ℝ E (gradient f (X t))) (X t) := (hdf (X t)).hasGradientAt
            simpa only [Function.comp_def, toDual_apply_apply, inner_neg_right,
              real_inner_self_eq_norm_sq] using h.comp_hasDerivWithinAt t (hflow t ht)
          have hr := ((hflow t ht).sub_const z).norm_sq
          have hid := (hasDerivAt_id t).hasDerivWithinAt (s := Ici t)
          convert (((hid.pow 2).mul hn).add ((hid.const_mul 2).mul (he.sub_const (f z)))).add hr using 1 <;>
            first | rfl | (simp only [D, Function.comp_def, id_eq, Pi.pow_apply, Nat.cast_ofNat,
              show (2 : ℕ) - 1 = 1 by decide, pow_one, mul_one, ContinuousLinearMap.map_neg,
              inner_neg_right, real_inner_comm]; ring)
        have hneg (t : ℝ) : D t ≤ 0 := by
          have hh := mul_nonneg (sq_nonneg t) (hpos (X t) (gradient f (X t)))
          have hs := hsupp (X t)
          dsimp [D]
          nlinarith
        have hm : AntitoneOn L (Icc 0 T) := by
          intro a ha b hb hab
          have h := le_gronwallBound_of_liminf_deriv_right_le (f' := D)
            (δ := L a) (K := 0) (ε := 0)
            (hcont.mono (show Icc a b ⊆ Icc 0 T from fun u hu => ⟨ha.1.trans hu.1, hu.2.trans hb.2⟩))
            (fun u hu r hr => by simpa [slope] using
              (hd u ⟨ha.1.trans hu.1, hu.2.trans_le hb.2⟩).liminf_right_slope_le hr)
            le_rfl (fun u _ => by simpa using hneg u) b ⟨hab, le_rfl⟩
          simpa [gronwallBound_K0] using h
        refine ⟨hm, ?_⟩
        intro t ht
        have hL := hm ⟨le_rfl, hT⟩ ⟨ht.1.le, ht.2⟩ ht.1.le
        simp only [L, zero_pow (by decide : 2 ≠ 0), zero_mul, zero_add] at hL
        have he : 0 ≤ f (X t) - f z := sub_nonneg.mpr (hz (mem_univ _))
        have hte := mul_nonneg ht.1.le he
        refine ⟨(le_div_iff₀ (sq_pos_of_pos ht.1)).mpr (by nlinarith [sq_nonneg ‖X t - z‖]), ?_⟩
        have hs := hsupp (X t)
        have hcs := real_inner_le_norm (gradient f (X t)) (X t - z)
        have hts := mul_le_mul_of_nonneg_left (hs.trans hcs) ht.1.le
        have hy := sq_nonneg (t * ‖gradient f (X t)‖ - ‖X t - z‖)
        apply (le_div_iff₀ (mul_pos (by norm_num) ht.1)).mpr
        nlinarith
      
      end AutoSamplingTheory.TechnicalLemmas.Analysis.GradientFlowLastIterate

      Exact module and namespace context

      Source assumptions versus formal assumptions

      SourceActual LeanDifference kindWhy it matters
      C2 convex objective on R^d.C2 convex objective on a complete real Hilbert space.generalizationExisting genuine Hessian and gradient APIs work on Hilbert space; no finite-dimensional compactness is used. Convexity and C2 are retained.
      Supplied forward flow and attained global minimum.Continuous X on [0,T], actual right ODE on [0,T), global minimizer z.generalizationEvery source flow restricts to this interval interface; no terminal or negative-time derivative is required.
      Nonpositive derivative of L and normalized rate displays.Derived right derivative of L<=0 internally, AntitoneOn L [0,T], both rates on Ioc0T.source-implicitScalar comparison derives antitonicity from the actual derivative; normalized finite real quotients require t>0. Time0 remains in the unnormalized Lyapunov statement.
      Also requests a scaled positive-part sharpness example.Only Lyapunov and upper-rate component.unresolvedA separate unbound obligation preserves the nonsmooth sharpness target. This declaration does not claim full exercise closure.

      The Lyapunov is antitone on the closed interval [0,T], including T=0. Both normalized rates are asserted only for 0<t<=T; no finite t0 quotient is assigned. The source C2 Euclidean objective is generalized to a C2 objective on a complete real Hilbert space. Convexity and an attained global minimizer are retained. A continuous actual trajectory and its right ODE only on [0,T) are supplied; no final-endpoint or negative-time derivative is needed. The later max-function sharpness witness in Exercise2.1 is not globally C2 and is not proved here. Neither existence of a flow/minimizer, the positive-curvature Exercise2.2 rates, discrete-time convergence nor a stochastic transport follows from this declaration.

      Encoder–denoiser: accepted · implicit-assumption-exposed

      Detected semantic differences

      • domains: The formal domain is a Hilbert-space extension of the source Euclidean setting. — The typeclass context requires completeness and a real inner product but no finite-dimensionality. The proof differentiates the inverse-Riesz representation of Df and uses Hilbert Cauchy-Schwarz; it does not invoke Euclidean compactness or coordinates.
      • assumptions: Standing flow/minimum assumptions and one-sided finite-horizon regularity are explicit. — https://arxiv.org/html/2605.07006v1#S2, opening GF/C2/minimizer conventions; in the module hflow, hX and hz are hypotheses, whereas hpos, hd, hneg and hsupp are proved.
      • conclusion: Dissipation is established inside the proof; the exported conjunction gives antitonicity and rates. — The local hd and hneg terms derive D(t)=-2t^2<Hg,g>+2e-2<g,X-z><=0. The declaration conclusion itself exports hm and the two positive-time bounds.
      • scopes: The result covers only the upper-bound component, with no sharpness or normalized t=0 assertion. — Source Exercise 2.1 has a further positive-part example; binding.supports contains only lyapunov-and-upper-rates. Ioc 0 T prevents Lean totalized division at zero from being mistaken for the source rates.

      A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

      Scope and omitted-condition boundaries

      • The Lyapunov is antitone on the closed interval [0,T], including T=0. Both normalized rates are asserted only for 0<t<=T; no finite t0 quotient is assigned.
      • The source C2 Euclidean objective is generalized to a C2 objective on a complete real Hilbert space. Convexity and an attained global minimizer are retained. A continuous actual trajectory and its right ODE only on [0,T) are supplied; no final-endpoint or negative-time derivative is needed.
      • The later max-function sharpness witness in Exercise2.1 is not globally C2 and is not proved here. Neither existence of a flow/minimizer, the positive-curvature Exercise2.2 rates, discrete-time convergence nor a stochastic transport follows from this declaration.

      Source and reuse

      ASTIS parents called

      Mathlib API called (external library)

      • ContDiff.fderiv_right
      • InnerProductSpace.toDual_symm_apply
      • HasFDerivAt.comp_hasDerivWithinAt
      • HasDerivWithinAt.norm_sq
      • le_gronwallBound_of_liminf_deriv_right_le
      • gronwallBound_K0
      • real_inner_le_norm

      Mathematical sources

      • Chewi Exercise2.1 — Lyapunov and two upper-bound conclusions, excluding the later nonsmooth sharpness example.
      • Actual quadratic flow — Nonstationary exp(-t) trajectory invokes all three conclusions at arbitrary nonnegative horizon.

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

      Which proof edges are actually covered?

      • Local proof component; source adapter/review separate Derive actual Lyapunov dissipation, antitonicity, and both exact last-time upper bounds
      • TODO — not closed by these contributions The later positive-part objective requires a separately justified nonsmooth/local-flow sharpness witness; no global C2 sharpness claim here