theorem extracted_formal_statement_5.{u_1} {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : InnerProductSpace ℝ E]
  {f : E → ℝ} (xm x₀ : E) {alg : subgradient_method f x₀}
  (h' : ∀ ⦃x g : E⦄, g ∈ SubderivAt f x → ‖g‖ ≤ ↑(subgradient_method.G f x₀))
  (hk₀ : f xm ≥ f (subgradient_method.x f x₀ 0) + ⟪subgradient_method.g f x₀ 0, xm - subgradient_method.x f x₀ 0⟫_ℝ)
  (h₀' : ‖subgradient_method.g f x₀ 0‖ ≤ ↑(subgradient_method.G f x₀))
  (h_original_goal :
    subgradient_method.a f x₀ 0 * (f (subgradient_method.x f x₀ 0) - f xm) ≤
      ‖x₀ - xm‖ * (↑(subgradient_method.G f x₀) * subgradient_method.a f x₀ 0)) :
  f (subgradient_method.x f x₀ 0) - f xm ≤ ‖x₀ - xm‖ * ↑(subgradient_method.G f x₀) := sorry

State before:
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
f : E → ℝ
xm x₀ : E
alg : subgradient_method f x₀
k : ℕ
h' : ∀ ⦃x g : E⦄, g ∈ SubderivAt f x → ‖g‖ ≤ ↑(subgradient_method.G f x₀)
k₀ : k = 0
hk₀ : f xm ≥ f (subgradient_method.x f x₀ 0) + ⟪subgradient_method.g f x₀ 0, xm - subgradient_method.x f x₀ 0⟫_ℝ
h₀' : ‖subgradient_method.g f x₀ 0‖ ≤ ↑(subgradient_method.G f x₀)
⊢ subgradient_method.a f x₀ 0 * (f (subgradient_method.x f x₀ 0) - f xm) ≤
    ‖x₀ - xm‖ * (↑(subgradient_method.G f x₀) * subgradient_method.a f x₀ 0)

Tactic: rw [mul_comm, ← mul_assoc]
    apply (mul_le_mul_right (alg.ha 0)).mpr
    have : f (alg.x 0) - f xm ≤ -inner (alg.g 0) (xm - alg.x 0) := by to_theorem simp [hk₀];rw [add_comm];apply hk₀

State after:
[E : Type u_1
 inst✝¹ : NormedAddCommGroup E
 inst✝ : InnerProductSpace ℝ E
 f : E → ℝ
 xm x₀ : E
 alg : subgradient_method f x₀
 k : ℕ
 h' : ∀ ⦃x g : E⦄, g ∈ SubderivAt f x → ‖g‖ ≤ ↑(subgradient_method.G f x₀)
 k₀ : k = 0
 hk₀ : f xm ≥ f (subgradient_method.x f x₀ 0) + ⟪subgradient_method.g f x₀ 0, xm - subgradient_method.x f x₀ 0⟫_ℝ
 h₀' : ‖subgradient_method.g f x₀ 0‖ ≤ ↑(subgradient_method.G f x₀)
 this : f (subgradient_method.x f x₀ 0) - f xm ≤ -⟪subgradient_method.g f x₀ 0, xm - subgradient_method.x f x₀ 0⟫_ℝ
 ⊢ f (subgradient_method.x f x₀ 0) - f xm ≤ ‖x₀ - xm‖ * ↑(subgradient_method.G f x₀)]

Relevant lemmas:
error