theorem extracted_formal_statement_1.{u_1} {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : InnerProductSpace ℝ E]
  [inst_2 : CompleteSpace E] {f : E → ℝ} {G : NNReal} (hf : ConvexOn ℝ Set.univ f) (hc : ContinuousOn f Set.univ)
  (h : ∀ ⦃x g : E⦄, g ∈ SubderivAt f x → ‖g‖ ≤ ↑G) (x y gx : E) (hx₁ : gx ∈ SubderivAt f x) (hx₃ : ‖gx‖ ≤ ↑G)
  (hx₂ : f y ≥ f x + ⟪gx, y - x⟫_ℝ) (hx₄ : f x - f y ≤ ⟪gx, x - y⟫_ℝ) (gy : E) (hy₁ : gy ∈ SubderivAt f y)
  (hy₃ : ‖gy‖ ≤ ↑G) (hy₂ : f x ≥ f y + ⟪gy, x - y⟫_ℝ) (hy₄ : f x - f y ≥ ⟪gy, x - y⟫_ℝ) (hG₁ : ↑G = ENNReal.ofReal ↑G)
  (hG₂ : ENNReal.ofReal (↑G * dist x y) = ENNReal.ofReal ↑G * ENNReal.ofReal (dist x y)) (hG₃ : 0 ≤ ↑G * dist x y)
  (h₁ : dist (f x) (f y) = |f x - f y|) : dist (f x) (f y) ≤ ↑G * dist x y := sorry

State before:
case intro.intro
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : CompleteSpace E
f : E → ℝ
G : NNReal
hf : ConvexOn ℝ Set.univ f
hc : ContinuousOn f Set.univ
h : ∀ ⦃x g : E⦄, g ∈ SubderivAt f x → ‖g‖ ≤ ↑G
x y gx : E
hx₁ : gx ∈ SubderivAt f x
hx₃ : ‖gx‖ ≤ ↑G
hx₂ : f y ≥ f x + ⟪gx, y - x⟫_ℝ
hx₄ : f x - f y ≤ ⟪gx, x - y⟫_ℝ
gy : E
hy₁ : gy ∈ SubderivAt f y
hy₃ : ‖gy‖ ≤ ↑G
hy₂ : f x ≥ f y + ⟪gy, x - y⟫_ℝ
hy₄ : f x - f y ≥ ⟪gy, x - y⟫_ℝ
hG₁ : ↑G = ENNReal.ofReal ↑G
hG₂ : ENNReal.ofReal (↑G * dist x y) = ENNReal.ofReal ↑G * ENNReal.ofReal (dist x y)
hG₃ : 0 ≤ ↑G * dist x y
h₁ : dist (f x) (f y) = |f x - f y|
⊢ dist (f x) (f y) ≤ ↑G * dist x y

Tactic: rw [h₁, dist_eq_norm x y]
    apply abs_le.mpr
    constructor
    ·
  calc
    f x - f y ≥ inner gy (x - y) := hy₄
    _ ≥ -(‖gy‖ * ‖x - y‖) := by
      apply neg_le_of_neg_le
      rw [← inner_neg_right, neg_sub, norm_sub_rev]
      apply real_inner_le_norm
    _ ≥ -(↑G * ‖x - y‖) := neg_le_neg (mul_le_mul_of_nonneg_right hy₃ (norm_nonneg _))
    ·
  calc
    f x - f y ≤ inner gx (x - y) := hx₄
    _ ≤ ‖gx‖ * ‖x - y‖ := (real_inner_le_norm _ _)
    _ ≤ ↑G * ‖x - y‖ := mul_le_mul_of_nonneg_right hx₃ (norm_nonneg _)

State after:

Relevant lemmas:
error