theorem extracted_formal_statement_14.{u_1} {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : InnerProductSpace ℝ E]
  [inst_2 : CompleteSpace E] [inst_3 : ProperSpace E] {x₀ : E} {f : E → ℝ} {f' : E → E} {h : E → ℝ}
  {alg : proximal_gradient_method f h f' x₀} (th : ContinuousOn (proximal_gradient_method.t f h f' x₀ • h) univ)
  (th' : ConvexOn ℝ univ (proximal_gradient_method.t f h f' x₀ • h)) :
  let Gt := fun x =>
    (1 / proximal_gradient_method.t f h f' x₀) •
      (x -
        prox_point_c' (proximal_gradient_method.t f h f' x₀ • h) (x - proximal_gradient_method.t f h f' x₀ • f' x) th
          th');
  let φ := fun x => f x + h x;
  (∀ (z : E), Gt z - f' z ∈ SubderivAt h (z - proximal_gradient_method.t f h f' x₀ • Gt z)) →
    (∀ (x : E),
        f (x - proximal_gradient_method.t f h f' x₀ • Gt x) ≤
          f x - proximal_gradient_method.t f h f' x₀ * inner (f' x) (Gt x) +
            proximal_gradient_method.t f h f' x₀ ^ 2 * ↑(proximal_gradient_method.L f h f' x₀) / 2 * ‖Gt x‖ ^ 2) →
      (∀ (x : E),
          f (x - proximal_gradient_method.t f h f' x₀ • Gt x) ≤
            f x - proximal_gradient_method.t f h f' x₀ * inner (f' x) (Gt x) +
              proximal_gradient_method.t f h f' x₀ / 2 * ‖Gt x‖ ^ 2) →
        (∀ (x z : E), f x + inner (f' x) (z - x) ≤ f z) →
          (∀ (x z : E),
              h (x - proximal_gradient_method.t f h f' x₀ • Gt x) +
                  inner (Gt x - f' x) (z - x + proximal_gradient_method.t f h f' x₀ • Gt x) ≤
                h z) →
            (∀ (x z : E),
                h (x - proximal_gradient_method.t f h f' x₀ • Gt x) ≤
                  h z - inner (Gt x - f' x) (z - x + proximal_gradient_method.t f h f' x₀ • Gt x)) →
              ∀ (x z : E),
                f z - inner (f' x) (z - x) - proximal_gradient_method.t f h f' x₀ * inner (f' x) (Gt x) +
                        proximal_gradient_method.t f h f' x₀ / 2 * ‖Gt x‖ ^ 2 +
                      (h z - inner (Gt x - f' x) (z - x + proximal_gradient_method.t f h f' x₀ • Gt x)) =
                    φ z + inner (Gt x) (x - z) - proximal_gradient_method.t f h f' x₀ / 2 * ‖Gt x‖ ^ 2 →
                  h z - (inner (Gt x) (-(x - z)) + inner (Gt x) (proximal_gradient_method.t f h f' x₀ • Gt x)) + f z +
                      proximal_gradient_method.t f h f' x₀ / 2 * ‖Gt x‖ ^ 2 =
                    φ z + inner (Gt x) (x - z) - proximal_gradient_method.t f h f' x₀ / 2 * ‖Gt x‖ ^ 2 := sorry

State before:
E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace ℝ E
inst✝¹ : CompleteSpace E
inst✝ : ProperSpace E
x₀ : E
f : E → ℝ
f' : E → E
h : E → ℝ
alg : proximal_gradient_method f h f' x₀
k : ℕ+
th : ContinuousOn (proximal_gradient_method.t f h f' x₀ • h) univ
th' : ConvexOn ℝ univ (proximal_gradient_method.t f h f' x₀ • h)
Gt : E → E :=
  fun x =>
    (1 / proximal_gradient_method.t f h f' x₀) •
      (x -
        prox_point_c' (proximal_gradient_method.t f h f' x₀ • h) (x - proximal_gradient_method.t f h f' x₀ • f' x) th
          th')
φ : E → ℝ := fun x => f x + h x
hG : ∀ (z : E), Gt z - f' z ∈ SubderivAt h (z - proximal_gradient_method.t f h f' x₀ • Gt z)
fieq1 :
  ∀ (x : E),
    f (x - proximal_gradient_method.t f h f' x₀ • Gt x) ≤
      f x - proximal_gradient_method.t f h f' x₀ * inner (f' x) (Gt x) +
        proximal_gradient_method.t f h f' x₀ ^ 2 * ↑(proximal_gradient_method.L f h f' x₀) / 2 * ‖Gt x‖ ^ 2
fieq2 :
  ∀ (x : E),
    f (x - proximal_gradient_method.t f h f' x₀ • Gt x) ≤
      f x - proximal_gradient_method.t f h f' x₀ * inner (f' x) (Gt x) +
        proximal_gradient_method.t f h f' x₀ / 2 * ‖Gt x‖ ^ 2
fieq3 : ∀ (x z : E), f x + inner (f' x) (z - x) ≤ f z
hieq1 :
  ∀ (x z : E),
    h (x - proximal_gradient_method.t f h f' x₀ • Gt x) +
        inner (Gt x - f' x) (z - x + proximal_gradient_method.t f h f' x₀ • Gt x) ≤
      h z
hieq2 :
  ∀ (x z : E),
    h (x - proximal_gradient_method.t f h f' x₀ • Gt x) ≤
      h z - inner (Gt x - f' x) (z - x + proximal_gradient_method.t f h f' x₀ • Gt x)
x z : E
⊢ f z - inner (f' x) (z - x) - proximal_gradient_method.t f h f' x₀ * inner (f' x) (Gt x) +
        proximal_gradient_method.t f h f' x₀ / 2 * ‖Gt x‖ ^ 2 +
      (h z - inner (Gt x - f' x) (z - x + proximal_gradient_method.t f h f' x₀ • Gt x)) =
    φ z + inner (Gt x) (x - z) - proximal_gradient_method.t f h f' x₀ / 2 * ‖Gt x‖ ^ 2

Tactic: rw [← inner_smul_right, sub_sub, ← inner_add_right]
    rw [inner_sub_left, ← sub_add, add_rotate, ← add_comm_sub, ← add_sub]
    rw [← add_sub, sub_self, add_zero, add_rotate, inner_add_right, ← neg_sub x z]

State after:
[E : Type u_1
 inst✝³ : NormedAddCommGroup E
 inst✝² : InnerProductSpace ℝ E
 inst✝¹ : CompleteSpace E
 inst✝ : ProperSpace E
 x₀ : E
 f : E → ℝ
 f' : E → E
 h : E → ℝ
 alg : proximal_gradient_method f h f' x₀
 k : ℕ+
 th : ContinuousOn (proximal_gradient_method.t f h f' x₀ • h) univ
 th' : ConvexOn ℝ univ (proximal_gradient_method.t f h f' x₀ • h)
 Gt : E → E :=
   fun x =>
     (1 / proximal_gradient_method.t f h f' x₀) •
       (x -
         prox_point_c' (proximal_gradient_method.t f h f' x₀ • h) (x - proximal_gradient_method.t f h f' x₀ • f' x) th
           th')
 φ : E → ℝ := fun x => f x + h x
 hG : ∀ (z : E), Gt z - f' z ∈ SubderivAt h (z - proximal_gradient_method.t f h f' x₀ • Gt z)
 fieq1 :
   ∀ (x : E),
     f (x - proximal_gradient_method.t f h f' x₀ • Gt x) ≤
       f x - proximal_gradient_method.t f h f' x₀ * inner (f' x) (Gt x) +
         proximal_gradient_method.t f h f' x₀ ^ 2 * ↑(proximal_gradient_method.L f h f' x₀) / 2 * ‖Gt x‖ ^ 2
 fieq2 :
   ∀ (x : E),
     f (x - proximal_gradient_method.t f h f' x₀ • Gt x) ≤
       f x - proximal_gradient_method.t f h f' x₀ * inner (f' x) (Gt x) +
         proximal_gradient_method.t f h f' x₀ / 2 * ‖Gt x‖ ^ 2
 fieq3 : ∀ (x z : E), f x + inner (f' x) (z - x) ≤ f z
 hieq1 :
   ∀ (x z : E),
     h (x - proximal_gradient_method.t f h f' x₀ • Gt x) +
         inner (Gt x - f' x) (z - x + proximal_gradient_method.t f h f' x₀ • Gt x) ≤
       h z
 hieq2 :
   ∀ (x z : E),
     h (x - proximal_gradient_method.t f h f' x₀ • Gt x) ≤
       h z - inner (Gt x - f' x) (z - x + proximal_gradient_method.t f h f' x₀ • Gt x)
 x z : E
 ⊢ h z - (inner (Gt x) (-(x - z)) + inner (Gt x) (proximal_gradient_method.t f h f' x₀ • Gt x)) + f z +
       proximal_gradient_method.t f h f' x₀ / 2 * ‖Gt x‖ ^ 2 =
     φ z + inner (Gt x) (x - z) - proximal_gradient_method.t f h f' x₀ / 2 * ‖Gt x‖ ^ 2]

Relevant lemmas:
add_sub : ∀ {G : Type u_3} [inst : SubNegMonoid G] (a b c : G), a + (b - c) = a + b - c
sub_self : ∀ {G : Type u_1} [inst : AddGroup G] (a : G), a - a = 0
sub_add : ∀ {α : Type u_1} [inst : SubtractionCommMonoid α] (a b c : α), a - b + c = a - (b - c)
add_rotate : ∀ {G : Type u_3} [inst : AddCommSemigroup G] (a b c : G), a + b + c = b + c + a
sub_sub : ∀ {α : Type u_1} [inst : SubtractionCommMonoid α] (a b c : α), a - b - c = a - (b + c)
neg_sub : ∀ {α : Type u_1} [inst : SubtractionMonoid α] (a b : α), -(a - b) = b - a
inner_add_right : ∀ {𝕜 : Type u_1} {E : Type u_2} [inst : RCLike 𝕜] [inst_4 : SeminormedAddCommGroup E]
  [inst_5 : InnerProductSpace 𝕜 E] (x y z : E), inner x (y + z) = inner x y + inner x z
add_zero : ∀ {M : Type u} [inst : AddZeroClass M] (a : M), a + 0 = a
add_comm_sub : ∀ {α : Type u_1} [inst : SubtractionCommMonoid α] (a b c : α), a - b + c = a + (c - b)
inner_smul_right : ∀ {𝕜 : Type u_1} {E : Type u_2} [inst : RCLike 𝕜] [inst_4 : SeminormedAddCommGroup E]
  [inst_5 : InnerProductSpace 𝕜 E] (x y : E) (r : 𝕜), inner x (r • y) = r * inner x y
inner_sub_left : ∀ {𝕜 : Type u_1} {E : Type u_2} [inst : RCLike 𝕜] [inst_4 : SeminormedAddCommGroup E]
  [inst_5 : InnerProductSpace 𝕜 E] (x y z : E), inner (x - y) z = inner x z - inner y z