theorem extracted_formal_statement_56.{u_1} {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : InnerProductSpace ℝ E]
  [inst_2 : CompleteSpace E] {f : E → ℝ} {m : ℝ} {f' : E → E} {xm x₀ : E} {alg : Gradient_Descent_fix_stepsize f f' x₀}
  (hm : m > 0) (min : IsMinOn f univ xm)
  (step₂ : Gradient_Descent_fix_stepsize.a f f' x₀ ≤ 2 / (m + ↑(Gradient_Descent_fix_stepsize.l f f' x₀)))
  (hsc : StrongConvexOn univ m f) (this_1 : LipschitzWith (Gradient_Descent_fix_stepsize.l f f' x₀) f')
  (this : ↑(Gradient_Descent_fix_stepsize.l f f' x₀) > 0) (k : ℕ)
  (h_original_goal :
    ‖Gradient_Descent_fix_stepsize.x f f' x₀ k - xm -
            Gradient_Descent_fix_stepsize.a f f' x₀ • f' (Gradient_Descent_fix_stepsize.x f f' x₀ k)‖ ^
        2 =
      ‖Gradient_Descent_fix_stepsize.x f f' x₀ k - xm‖ ^ 2 -
          2 * Gradient_Descent_fix_stepsize.a f f' x₀ *
            inner (Gradient_Descent_fix_stepsize.x f f' x₀ k - xm) (f' (Gradient_Descent_fix_stepsize.x f f' x₀ k)) +
        Gradient_Descent_fix_stepsize.a f f' x₀ ^ 2 * ‖f' (Gradient_Descent_fix_stepsize.x f f' x₀ k)‖ ^ 2) :
  ‖Gradient_Descent_fix_stepsize.x f f' x₀ k - xm‖ ^ 2 -
        2 *
          (Gradient_Descent_fix_stepsize.a f f' x₀ *
            inner (Gradient_Descent_fix_stepsize.x f f' x₀ k - xm) (f' (Gradient_Descent_fix_stepsize.x f f' x₀ k))) +
      ‖Gradient_Descent_fix_stepsize.a f f' x₀ • f' (Gradient_Descent_fix_stepsize.x f f' x₀ k)‖ ^ 2 =
    ‖Gradient_Descent_fix_stepsize.x f f' x₀ k - xm‖ ^ 2 -
        2 * Gradient_Descent_fix_stepsize.a f f' x₀ *
          inner (Gradient_Descent_fix_stepsize.x f f' x₀ k - xm) (f' (Gradient_Descent_fix_stepsize.x f f' x₀ k)) +
      Gradient_Descent_fix_stepsize.a f f' x₀ ^ 2 * ‖f' (Gradient_Descent_fix_stepsize.x f f' x₀ k)‖ ^ 2 := sorry

State before:
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : CompleteSpace E
f : E → ℝ
m : ℝ
f' : E → E
xm x₀ : E
alg : Gradient_Descent_fix_stepsize f f' x₀
hm : m > 0
min : IsMinOn f univ xm
step₂ : Gradient_Descent_fix_stepsize.a f f' x₀ ≤ 2 / (m + ↑(Gradient_Descent_fix_stepsize.l f f' x₀))
hsc : StrongConvexOn univ m f
this✝ : LipschitzWith (Gradient_Descent_fix_stepsize.l f f' x₀) f'
this : ↑(Gradient_Descent_fix_stepsize.l f f' x₀) > 0
k : ℕ
⊢ ‖Gradient_Descent_fix_stepsize.x f f' x₀ k - xm -
          Gradient_Descent_fix_stepsize.a f f' x₀ • f' (Gradient_Descent_fix_stepsize.x f f' x₀ k)‖ ^
      2 =
    ‖Gradient_Descent_fix_stepsize.x f f' x₀ k - xm‖ ^ 2 -
        2 * Gradient_Descent_fix_stepsize.a f f' x₀ *
          inner (Gradient_Descent_fix_stepsize.x f f' x₀ k - xm) (f' (Gradient_Descent_fix_stepsize.x f f' x₀ k)) +
      Gradient_Descent_fix_stepsize.a f f' x₀ ^ 2 * ‖f' (Gradient_Descent_fix_stepsize.x f f' x₀ k)‖ ^ 2

Tactic: rw [norm_sub_sq_real, inner_smul_right]

State after:
[E : Type u_1
 inst✝² : NormedAddCommGroup E
 inst✝¹ : InnerProductSpace ℝ E
 inst✝ : CompleteSpace E
 f : E → ℝ
 m : ℝ
 f' : E → E
 xm x₀ : E
 alg : Gradient_Descent_fix_stepsize f f' x₀
 hm : m > 0
 min : IsMinOn f univ xm
 step₂ : Gradient_Descent_fix_stepsize.a f f' x₀ ≤ 2 / (m + ↑(Gradient_Descent_fix_stepsize.l f f' x₀))
 hsc : StrongConvexOn univ m f
 this✝ : LipschitzWith (Gradient_Descent_fix_stepsize.l f f' x₀) f'
 this : ↑(Gradient_Descent_fix_stepsize.l f f' x₀) > 0
 k : ℕ
 ⊢ ‖Gradient_Descent_fix_stepsize.x f f' x₀ k - xm‖ ^ 2 -
         2 *
           (Gradient_Descent_fix_stepsize.a f f' x₀ *
             inner (Gradient_Descent_fix_stepsize.x f f' x₀ k - xm) (f' (Gradient_Descent_fix_stepsize.x f f' x₀ k))) +
       ‖Gradient_Descent_fix_stepsize.a f f' x₀ • f' (Gradient_Descent_fix_stepsize.x f f' x₀ k)‖ ^ 2 =
     ‖Gradient_Descent_fix_stepsize.x f f' x₀ k - xm‖ ^ 2 -
         2 * Gradient_Descent_fix_stepsize.a f f' x₀ *
           inner (Gradient_Descent_fix_stepsize.x f f' x₀ k - xm) (f' (Gradient_Descent_fix_stepsize.x f f' x₀ k)) +
       Gradient_Descent_fix_stepsize.a f f' x₀ ^ 2 * ‖f' (Gradient_Descent_fix_stepsize.x f f' x₀ k)‖ ^ 2]

Relevant lemmas:
norm_sub_sq_real : ∀ {F : Type u_3} [inst : SeminormedAddCommGroup F] [inst_3 : InnerProductSpace ℝ F] (x y : F),
  ‖x - y‖ ^ 2 = ‖x‖ ^ 2 - 2 * inner x y + ‖y‖ ^ 2
inner_smul_right : ∀ {𝕜 : Type u_1} {E : Type u_2} [inst : RCLike 𝕜] [inst_3 : SeminormedAddCommGroup E]
  [inst_4 : InnerProductSpace 𝕜 E] (x y : E) (r : 𝕜), inner x (r • y) = r * inner x y