-- File: optlib/Optlib/Algorithm/GD/GradientDescent.lean
Theorem statement:
theorem extracted_formal_statement_39.{u_1} {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : InnerProductSpace ℝ E]
  [inst_2 : CompleteSpace E] {f : E → ℝ} {f' : E → E} {xm x₀ : E} {alg : Gradient_Descent_fix_stepsize f f' x₀}
  (hfun : ConvexOn ℝ univ f)
  (step₂_1 : Gradient_Descent_fix_stepsize.a f f' x₀ ≤ 1 / ↑(Gradient_Descent_fix_stepsize.l f f' x₀))
  (step₂ : ↑(Gradient_Descent_fix_stepsize.l f f' x₀) ≤ 1 / Gradient_Descent_fix_stepsize.a f f' x₀)
  (this_1 : LipschitzWith (Gradient_Descent_fix_stepsize.l f f' x₀) f')
  (this : Gradient_Descent_fix_stepsize.l f f' x₀ > 0) (x : E)
  (t1 : 1 / (2 * Gradient_Descent_fix_stepsize.a f f' x₀) * (2 * Gradient_Descent_fix_stepsize.a f f' x₀) = 1)
  (t2 :
    ⟪f' x, x - xm⟫_ℝ - Gradient_Descent_fix_stepsize.a f f' x₀ / 2 * ‖f' x‖ ^ 2 =
      1 / (2 * Gradient_Descent_fix_stepsize.a f f' x₀) *
        (‖x - xm‖ ^ 2 - ‖x - Gradient_Descent_fix_stepsize.a f f' x₀ • f' x - xm‖ ^ 2)) :
  f (x - Gradient_Descent_fix_stepsize.a f f' x₀ • f' x) ≤
    f x - Gradient_Descent_fix_stepsize.a f f' x₀ / 2 * ‖f' x‖ ^ 2 := sorry

Tactic state before:
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : CompleteSpace E
f : E → ℝ
f' : E → E
xm x₀ : E
alg : Gradient_Descent_fix_stepsize f f' x₀
hfun : ConvexOn ℝ univ f
step₂✝ : Gradient_Descent_fix_stepsize.a f f' x₀ ≤ 1 / ↑(Gradient_Descent_fix_stepsize.l f f' x₀)
step₂ : ↑(Gradient_Descent_fix_stepsize.l f f' x₀) ≤ 1 / Gradient_Descent_fix_stepsize.a f f' x₀
k : ℕ
this✝ : LipschitzWith (Gradient_Descent_fix_stepsize.l f f' x₀) f'
this : Gradient_Descent_fix_stepsize.l f f' x₀ > 0
x : E
t1 : 1 / (2 * Gradient_Descent_fix_stepsize.a f f' x₀) * (2 * Gradient_Descent_fix_stepsize.a f f' x₀) = 1
t2 :
  ⟪f' x, x - xm⟫_ℝ - Gradient_Descent_fix_stepsize.a f f' x₀ / 2 * ‖f' x‖ ^ 2 =
    1 / (2 * Gradient_Descent_fix_stepsize.a f f' x₀) *
      (‖x - xm‖ ^ 2 - ‖x - Gradient_Descent_fix_stepsize.a f f' x₀ • f' x - xm‖ ^ 2)
⊢ f (x - Gradient_Descent_fix_stepsize.a f f' x₀ • f' x) ≤
    f x - Gradient_Descent_fix_stepsize.a f f' x₀ / 2 * ‖f' x‖ ^ 2

Tactic: exact convex_lipschitz alg.diff this step₂ alg.step₁ alg.smooth x

Tactic state after:

Premises used:
convex_lipschitz : ∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_3 : InnerProductSpace ℝ E]
  [inst_4 : CompleteSpace E] {f : E → ℝ} {f' : E → E} {l : NNReal} {a : ℝ},
  (∀ (x₁ : E), HasGradientAt f (f' x₁) x₁) →
    ↑l > 0 → ↑l ≤ 1 / a → a > 0 → LipschitzWith l f' → ∀ (x : E), f (x - a • f' x) ≤ f x - a / 2 * ‖f' x‖ ^ 2