-- File: optlib/Optlib/Algorithm/SubgradientMethod.lean
Theorem statement:
theorem extracted_formal_statement_26.{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 :
    2 * subgradient_method.a f x₀ 0 * (f (subgradient_method.x f x₀ 0) - f xm) ≤
      ‖x₀ - xm‖ ^ 2 + (↑(subgradient_method.G f x₀) * subgradient_method.a f x₀ 0) ^ 2) :
  2 * subgradient_method.a f x₀ 0 * (f (subgradient_method.x f x₀ 0) - f xm) ≤
    2 * ‖x₀ - xm‖ * (↑(subgradient_method.G f x₀) * subgradient_method.a f x₀ 0) := sorry

Tactic state before:
case pos
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₀)
⊢ 2 * subgradient_method.a f x₀ 0 * (f (subgradient_method.x f x₀ 0) - f xm) ≤
    ‖x₀ - xm‖ ^ 2 + (↑(subgradient_method.G f x₀) * subgradient_method.a f x₀ 0) ^ 2

Tactic: apply le_trans _ (two_mul_le_add_sq _ _)

Tactic 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₀)
 ⊢ 2 * subgradient_method.a f x₀ 0 * (f (subgradient_method.x f x₀ 0) - f xm) ≤
     2 * ‖x₀ - xm‖ * (↑(subgradient_method.G f x₀) * subgradient_method.a f x₀ 0)]

Premises used:
two_mul_le_add_sq : ∀ {α : Type u} [inst : CommSemiring α] [inst_2 : LinearOrder α] [inst_3 : ExistsAddOfLE α]
  [inst_4 : MulPosStrictMono α] [inst_5 : AddLeftReflectLE α] [inst_6 : AddLeftMono α] (a b : α),
  2 * a * b ≤ a ^ 2 + b ^ 2
le_trans : ∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, a ≤ b → b ≤ c → a ≤ c