zzhisthebest/LeanBenchmark huggingface dataset:
import Mathlib
import Optlib


open Filter Topology Set InnerProductSpace Finset

open Finset

theorem extracted_formal_statement_50.{u_1} {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : 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)
  (heq :
    (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
      {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x})
  ⦃i : ℕ⦄ (left : i ≥ 0) (hi₂ : i ≤ k)
  (this :
    ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
          2 * subgradient_method.a f x₀ i *
            (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
        ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2 =
      ‖subgradient_method.x f x₀ i - xm‖ ^ 2 +
          -(2 * subgradient_method.a f x₀ i *
              (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) +
        ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (inq₁ :
    ‖subgradient_method.a f x₀ i‖ ^ 2 * ‖subgradient_method.g f x₀ i‖ ^ 2 ≤
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (hxm : f xm ≥ f (subgradient_method.x f x₀ i) + ⟪subgradient_method.g f x₀ i, xm - subgradient_method.x f x₀ i⟫_ℝ) :
  sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm =
    sInf (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) - f xm := sorry

Tactic state before:
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
heq :
  (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
    {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x}
i : ℕ
left✝ : i ≥ 0
hi₂ : i ≤ k
this :
  ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
        2 * subgradient_method.a f x₀ i *
          (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2 =
    ‖subgradient_method.x f x₀ i - xm‖ ^ 2 +
        -(2 * subgradient_method.a f x₀ i *
            (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) +
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
inq₁ :
  ‖subgradient_method.a f x₀ i‖ ^ 2 * ‖subgradient_method.g f x₀ i‖ ^ 2 ≤
    ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
hxm : f xm ≥ f (subgradient_method.x f x₀ i) + ⟪subgradient_method.g f x₀ i, xm - subgradient_method.x f x₀ i⟫_ℝ
⊢ sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm =
    sInf (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) - f xm

Tactic:
rw [← heq]

Tactic state after:
import Mathlib
import Optlib


open Filter Topology Set InnerProductSpace Finset

open Finset

theorem extracted_formal_statement_54.{u_1} {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : 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)
  (heq :
    (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
      {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x})
  ⦃i : ℕ⦄ (left : i ≥ 0) (hi₂ : i ≤ k)
  (this :
    ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
          2 * subgradient_method.a f x₀ i *
            (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
        ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2 =
      ‖subgradient_method.x f x₀ i - xm‖ ^ 2 +
          -(2 * subgradient_method.a f x₀ i *
              (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) +
        ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (inq₁ :
    ‖subgradient_method.a f x₀ i‖ ^ 2 * ‖subgradient_method.g f x₀ i‖ ^ 2 ≤
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (hxm : f xm ≥ f (subgradient_method.x f x₀ i) + ⟪subgradient_method.g f x₀ i, xm - subgradient_method.x f x₀ i⟫_ℝ) :
  k < k + 1 := sorry

Tactic state before:
case h.left
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
heq :
  (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
    {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x}
i : ℕ
left✝ : i ≥ 0
hi₂ : i ≤ k
this :
  ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
        2 * subgradient_method.a f x₀ i *
          (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2 =
    ‖subgradient_method.x f x₀ i - xm‖ ^ 2 +
        -(2 * subgradient_method.a f x₀ i *
            (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) +
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
inq₁ :
  ‖subgradient_method.a f x₀ i‖ ^ 2 * ‖subgradient_method.g f x₀ i‖ ^ 2 ≤
    ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
hxm : f xm ≥ f (subgradient_method.x f x₀ i) + ⟪subgradient_method.g f x₀ i, xm - subgradient_method.x f x₀ i⟫_ℝ
⊢ k < k + 1

Tactic:
apply (Nat.lt_succ_self k)

Tactic state after:
import Mathlib
import Optlib


open Filter Topology Set InnerProductSpace Finset

open Finset

theorem extracted_formal_statement_55.{u_1} {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : 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)
  (heq :
    (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
      {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x})
  ⦃i : ℕ⦄ (left : i ≥ 0) (hi₂ : i ≤ k)
  (this :
    ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
          2 * subgradient_method.a f x₀ i *
            (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
        ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2 =
      ‖subgradient_method.x f x₀ i - xm‖ ^ 2 +
          -(2 * subgradient_method.a f x₀ i *
              (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) +
        ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (inq₁ :
    ‖subgradient_method.a f x₀ i‖ ^ 2 * ‖subgradient_method.g f x₀ i‖ ^ 2 ≤
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (hxm : f xm ≥ f (subgradient_method.x f x₀ i) + ⟪subgradient_method.g f x₀ i, xm - subgradient_method.x f x₀ i⟫_ℝ) :
  f (subgradient_method.x f x₀ i) = f (subgradient_method.x f x₀ i) := sorry

Tactic state before:
case h.right
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
heq :
  (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
    {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x}
i : ℕ
left✝ : i ≥ 0
hi₂ : i ≤ k
this :
  ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
        2 * subgradient_method.a f x₀ i *
          (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2 =
    ‖subgradient_method.x f x₀ i - xm‖ ^ 2 +
        -(2 * subgradient_method.a f x₀ i *
            (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) +
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
inq₁ :
  ‖subgradient_method.a f x₀ i‖ ^ 2 * ‖subgradient_method.g f x₀ i‖ ^ 2 ≤
    ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
hxm : f xm ≥ f (subgradient_method.x f x₀ i) + ⟪subgradient_method.g f x₀ i, xm - subgradient_method.x f x₀ i⟫_ℝ
⊢ f (subgradient_method.x f x₀ i) = f (subgradient_method.x f x₀ i)

Tactic:
simp

Tactic state after:
import Mathlib
import Optlib


open Filter Topology Set InnerProductSpace Finset

open Finset

theorem extracted_formal_statement_57.{u_1} {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : 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)
  (heq :
    (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
      {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x})
  ⦃i : ℕ⦄ (left : i ≥ 0) (hi₂ : i ≤ k)
  (this_1 :
    ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
          2 * subgradient_method.a f x₀ i *
            (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
        ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2 =
      ‖subgradient_method.x f x₀ i - xm‖ ^ 2 +
          -(2 * subgradient_method.a f x₀ i *
              (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) +
        ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (inq₁ :
    ‖subgradient_method.a f x₀ i‖ ^ 2 * ‖subgradient_method.g f x₀ i‖ ^ 2 ≤
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (hxm : f xm ≥ f (subgradient_method.x f x₀ i) + ⟪subgradient_method.g f x₀ i, xm - subgradient_method.x f x₀ i⟫_ℝ)
  (this : f (subgradient_method.x f x₀ i) ∈ Set.range fun x => f (subgradient_method.x f x₀ ↑x)) :
  BddBelow (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) := sorry

Tactic state before:
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
heq :
  (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
    {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x}
i : ℕ
left✝ : i ≥ 0
hi₂ : i ≤ k
this✝ :
  ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
        2 * subgradient_method.a f x₀ i *
          (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2 =
    ‖subgradient_method.x f x₀ i - xm‖ ^ 2 +
        -(2 * subgradient_method.a f x₀ i *
            (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) +
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
inq₁ :
  ‖subgradient_method.a f x₀ i‖ ^ 2 * ‖subgradient_method.g f x₀ i‖ ^ 2 ≤
    ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
hxm : f xm ≥ f (subgradient_method.x f x₀ i) + ⟪subgradient_method.g f x₀ i, xm - subgradient_method.x f x₀ i⟫_ℝ
this : f (subgradient_method.x f x₀ i) ∈ Set.range fun x => f (subgradient_method.x f x₀ ↑x)
⊢ BddBelow (Set.range fun x => f (subgradient_method.x f x₀ ↑x))

Tactic:
apply Finite.bddBelow_range

Tactic state after:
import Mathlib
import Optlib


open Filter Topology Set InnerProductSpace Finset

open Finset

theorem extracted_formal_statement_61.{u_1} {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : 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)
  (heq :
    (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
      {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x})
  ⦃i : ℕ⦄ (left : i ≥ 0) (hi₂ : i ≤ k)
  (this :
    ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
          2 * subgradient_method.a f x₀ i *
            (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
        ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2 =
      ‖subgradient_method.x f x₀ i - xm‖ ^ 2 +
          -(2 * subgradient_method.a f x₀ i *
              (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) +
        ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (inq₁ :
    ‖subgradient_method.a f x₀ i‖ ^ 2 * ‖subgradient_method.g f x₀ i‖ ^ 2 ≤
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (hxm : f xm ≥ f (subgradient_method.x f x₀ i) + ⟪subgradient_method.g f x₀ i, xm - subgradient_method.x f x₀ i⟫_ℝ) :
  f (subgradient_method.x f x₀ i) + ⟪subgradient_method.g f x₀ i, xm - subgradient_method.x f x₀ i⟫_ℝ ≤ f xm := sorry

Tactic state before:
case a
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
heq :
  (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
    {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x}
i : ℕ
left✝ : i ≥ 0
hi₂ : i ≤ k
this :
  ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
        2 * subgradient_method.a f x₀ i *
          (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2 =
    ‖subgradient_method.x f x₀ i - xm‖ ^ 2 +
        -(2 * subgradient_method.a f x₀ i *
            (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) +
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
inq₁ :
  ‖subgradient_method.a f x₀ i‖ ^ 2 * ‖subgradient_method.g f x₀ i‖ ^ 2 ≤
    ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
hxm : f xm ≥ f (subgradient_method.x f x₀ i) + ⟪subgradient_method.g f x₀ i, xm - subgradient_method.x f x₀ i⟫_ℝ
⊢ f (subgradient_method.x f x₀ i) + ⟪subgradient_method.g f x₀ i, xm - subgradient_method.x f x₀ i⟫_ℝ ≤ f xm

Tactic:
apply hxm

Tactic state after:
import Mathlib
import Optlib


open Filter Topology Set InnerProductSpace Finset

open Finset

theorem extracted_formal_statement_68.{u_1} {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : 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)
  (heq :
    (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
      {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x})
  ⦃i : ℕ⦄ (left : i ≥ 0) (hi₂ : i ≤ k)
  (this :
    ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
          2 * subgradient_method.a f x₀ i *
            (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
        ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2 =
      ‖subgradient_method.x f x₀ i - xm‖ ^ 2 +
          -(2 * subgradient_method.a f x₀ i *
              (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) +
        ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (inq₁ :
    ‖subgradient_method.a f x₀ i‖ ^ 2 * ‖subgradient_method.g f x₀ i‖ ^ 2 ≤
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (inq₂ :
    2 * subgradient_method.a f x₀ i *
        (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) ≤
      2 * ⟪subgradient_method.x f x₀ i - xm, subgradient_method.a f x₀ i • subgradient_method.g f x₀ i⟫_ℝ) :
  ‖subgradient_method.a f x₀ i‖ ^ 2 * ‖subgradient_method.g f x₀ i‖ ^ 2 ≤
    ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2 := sorry

Tactic state before:
case bc.h₂
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
heq :
  (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
    {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x}
i : ℕ
left✝ : i ≥ 0
hi₂ : i ≤ k
this :
  ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
        2 * subgradient_method.a f x₀ i *
          (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2 =
    ‖subgradient_method.x f x₀ i - xm‖ ^ 2 +
        -(2 * subgradient_method.a f x₀ i *
            (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) +
      ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
inq₁ :
  ‖subgradient_method.a f x₀ i‖ ^ 2 * ‖subgradient_method.g f x₀ i‖ ^ 2 ≤
    ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
inq₂ :
  2 * subgradient_method.a f x₀ i *
      (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) ≤
    2 * ⟪subgradient_method.x f x₀ i - xm, subgradient_method.a f x₀ i • subgradient_method.g f x₀ i⟫_ℝ
⊢ ‖subgradient_method.a f x₀ i‖ ^ 2 * ‖subgradient_method.g f x₀ i‖ ^ 2 ≤
    ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2

Tactic:
apply inq₁

Tactic state after:
import Mathlib
import Optlib


open Filter Topology Set InnerProductSpace Finset

open Finset

theorem extracted_formal_statement_72.{u_1} {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : 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)
  (heq :
    (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
      {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x})
  (h₁ :
    ∀ ⦃i : ℕ⦄,
      i ≥ 0 ∧ i ≤ k →
        ‖subgradient_method.x f x₀ (i + 1) - xm‖ ^ 2 ≤
          ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
              2 * subgradient_method.a f x₀ i *
                (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
            ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (h₁' :
    ∀ ⦃i : ℕ⦄,
      i ≥ 0 ∧ i ≤ k →
        subgradient_method.a f x₀ i *
            (2 * (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) ≤
          ‖subgradient_method.x f x₀ i - xm‖ ^ 2 - ‖subgradient_method.x f x₀ (i + 1) - xm‖ ^ 2 +
            ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (i : ℕ) (hi : i ∈ Finset.range (k + 1)) : i ≥ 0 := sorry

Tactic state before:
case h.a.left
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
heq :
  (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
    {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x}
h₁ :
  ∀ ⦃i : ℕ⦄,
    i ≥ 0 ∧ i ≤ k →
      ‖subgradient_method.x f x₀ (i + 1) - xm‖ ^ 2 ≤
        ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
            2 * subgradient_method.a f x₀ i *
              (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
          ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
h₁' :
  ∀ ⦃i : ℕ⦄,
    i ≥ 0 ∧ i ≤ k →
      subgradient_method.a f x₀ i *
          (2 * (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) ≤
        ‖subgradient_method.x f x₀ i - xm‖ ^ 2 - ‖subgradient_method.x f x₀ (i + 1) - xm‖ ^ 2 +
          ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
i : ℕ
hi : i ∈ Finset.range (k + 1)
⊢ i ≥ 0

Tactic:
simp

Tactic state after:
import Mathlib
import Optlib


open Filter Topology Set InnerProductSpace Finset

open Finset

theorem extracted_formal_statement_74.{u_1} {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : 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)
  (heq :
    (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
      {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x})
  (h₁ :
    ∀ ⦃i : ℕ⦄,
      i ≥ 0 ∧ i ≤ k →
        ‖subgradient_method.x f x₀ (i + 1) - xm‖ ^ 2 ≤
          ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
              2 * subgradient_method.a f x₀ i *
                (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
            ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (h₁' :
    ∀ ⦃i : ℕ⦄,
      i ≥ 0 ∧ i ≤ k →
        subgradient_method.a f x₀ i *
            (2 * (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) ≤
          ‖subgradient_method.x f x₀ i - xm‖ ^ 2 - ‖subgradient_method.x f x₀ (i + 1) - xm‖ ^ 2 +
            ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2)
  (i : ℕ) (hi : i ∈ Finset.range (k + 1)) : i ∈ Finset.range (k + 1) := sorry

Tactic state before:
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
heq :
  (Set.range fun x => f (subgradient_method.x f x₀ ↑x)) =
    {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x}
h₁ :
  ∀ ⦃i : ℕ⦄,
    i ≥ 0 ∧ i ≤ k →
      ‖subgradient_method.x f x₀ (i + 1) - xm‖ ^ 2 ≤
        ‖subgradient_method.x f x₀ i - xm‖ ^ 2 -
            2 * subgradient_method.a f x₀ i *
              (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm) +
          ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
h₁' :
  ∀ ⦃i : ℕ⦄,
    i ≥ 0 ∧ i ≤ k →
      subgradient_method.a f x₀ i *
          (2 * (sInf {x | ∃ i ∈ Finset.range (k + 1), f (subgradient_method.x f x₀ i) = x} - f xm)) ≤
        ‖subgradient_method.x f x₀ i - xm‖ ^ 2 - ‖subgradient_method.x f x₀ (i + 1) - xm‖ ^ 2 +
          ↑(subgradient_method.G f x₀) ^ 2 * subgradient_method.a f x₀ i ^ 2
i : ℕ
hi : i ∈ Finset.range (k + 1)
⊢ i ∈ Finset.range (k + 1)

Tactic:
apply hi

Tactic state after: