-- File: optlib/Optlib/Algorithm/GD/GradientDescent.lean
Theorem statement:
theorem extracted_formal_statement_31.{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) :
  ⟪x - xm, Gradient_Descent_fix_stepsize.a f f' x₀ • f' x⟫_ℝ * 2 =
    Gradient_Descent_fix_stepsize.a f f' x₀ * ⟪f' x, x - xm⟫_ℝ * 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
⊢ ⟪x - xm, Gradient_Descent_fix_stepsize.a f f' x₀ • f' x⟫_ℝ * 2 =
    Gradient_Descent_fix_stepsize.a f f' x₀ * ⟪f' x, x - xm⟫_ℝ * 2

Tactic: rw [real_inner_smul_right, real_inner_comm]

Tactic state after:

Premises used:
real_inner_comm : ∀ {F : Type u_3} [inst : SeminormedAddCommGroup F] [inst_3 : InnerProductSpace ℝ F] (x y : F),
  ⟪y, x⟫_ℝ = ⟪x, y⟫_ℝ
real_inner_smul_right : ∀ {F : Type u_3} [inst : SeminormedAddCommGroup F] [inst_3 : InnerProductSpace ℝ F] (x y : F)
  (r : ℝ), ⟪x, r • y⟫_ℝ = r * ⟪x, y⟫_ℝ