-- File: optlib/Optlib/Algorithm/Nesterov/NesterovSmooth.lean
Theorem statement:
theorem extracted_formal_statement_1.{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 : Nesterov f f' γ x₀}
  (hfun : ConvexOn ℝ univ f) (hg : ∀ (k : ℕ+), γ k = 2 / (↑↑k + 1)) (k : ℕ+)
  (update2 :
    (1 / ↑(Nesterov.l f f' γ x₀)) • f' (Nesterov.y f f' γ x₀ k) = Nesterov.y f f' γ x₀ k - Nesterov.x f f' γ x₀ ↑k)
  (this : Nesterov.l f f' γ x₀ > 0)
  (h_original_goal :
    f' (Nesterov.y f f' γ x₀ k) = ↑(Nesterov.l f f' γ x₀) • (Nesterov.y f f' γ x₀ k - Nesterov.x f f' γ x₀ ↑k)) :
  f' (Nesterov.y f f' γ x₀ k) =
    (↑(Nesterov.l f f' γ x₀) * (1 / ↑(Nesterov.l f f' γ x₀))) • f' (Nesterov.y f f' γ x₀ k) := 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 : Nesterov f f' γ x₀
hfun : ConvexOn ℝ univ f
hg : ∀ (k : ℕ+), γ k = 2 / (↑↑k + 1)
k : ℕ+
x' : E
update2 : (1 / ↑(Nesterov.l f f' γ x₀)) • f' (Nesterov.y f f' γ x₀ k) = Nesterov.y f f' γ x₀ k - Nesterov.x f f' γ x₀ ↑k
this : Nesterov.l f f' γ x₀ > 0
⊢ f' (Nesterov.y f f' γ x₀ k) = ↑(Nesterov.l f f' γ x₀) • (Nesterov.y f f' γ x₀ k - Nesterov.x f f' γ x₀ ↑k)

Tactic: rw [← update2, smul_smul]

Tactic state after:
[E : Type u_1
 inst✝² : NormedAddCommGroup E
 inst✝¹ : InnerProductSpace ℝ E
 inst✝ : CompleteSpace E
 f : E → ℝ
 f' : E → E
 xm x₀ : E
 γ : ℕ+ → ℝ
 alg : Nesterov f f' γ x₀
 hfun : ConvexOn ℝ univ f
 hg : ∀ (k : ℕ+), γ k = 2 / (↑↑k + 1)
 k : ℕ+
 x' : E
 update2 :
   (1 / ↑(Nesterov.l f f' γ x₀)) • f' (Nesterov.y f f' γ x₀ k) = Nesterov.y f f' γ x₀ k - Nesterov.x f f' γ x₀ ↑k
 this : Nesterov.l f f' γ x₀ > 0
 ⊢ f' (Nesterov.y f f' γ x₀ k) =
     (↑(Nesterov.l f f' γ x₀) * (1 / ↑(Nesterov.l f f' γ x₀))) • f' (Nesterov.y f f' γ x₀ k)]

Premises used:
smul_smul : ∀ {M : Type u_1} {α : Type u_5} [inst : Monoid M] [inst_3 : MulAction M α] (a₁ a₂ : M) (b : α),
  a₁ • a₂ • b = (a₁ * a₂) • b