zzhisthebest/LeanBenchmark huggingface dataset:
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_69 {n m : ℕ+} {b : Fin ↑m → ℝ} {A : Matrix (Fin ↑m) (Fin ↑n) ℝ}
  (x : EuclideanSpace ℝ (Fin ↑n)) :
  let f := fun x => 1 / 2 * A *ᵥ x ⬝ᵥ A *ᵥ x;
  let f' := fun x => Aᵀ *ᵥ A *ᵥ x;
  HasGradientAt f (f' x) x →
    let h := fun x => b ⬝ᵥ A *ᵥ x;
    let h' := fun x => Aᵀ *ᵥ b;
    HasGradientAt h (h' x) x →
      let φ := fun x => 1 / 2 * ‖A *ᵥ x - b‖ ^ 2;
      let φ' := fun x => Aᵀ *ᵥ (A *ᵥ x - b);
      (φ = fun x => f x - h x + 1 / 2 * b ⬝ᵥ b) →
        (φ' = fun x => f' x - h' x) →
          HasGradientAt (fun x => f x - h x + 1 / 2 * b ⬝ᵥ b) ((fun x => f' x - h' x) x) x →
            HasGradientAt (fun x => f x - h x) ((fun x => f' x - h' x) x) x := sorry

Tactic state before:
n m : ℕ+
b : Fin ↑m → ℝ
A : Matrix (Fin ↑m) (Fin ↑n) ℝ
x : EuclideanSpace ℝ (Fin ↑n)
f : EuclideanSpace ℝ (Fin ↑n) → ℝ := fun x => 1 / 2 * A *ᵥ x ⬝ᵥ A *ᵥ x
f' : EuclideanSpace ℝ (Fin ↑n) → Fin ↑n → ℝ := fun x => Aᵀ *ᵥ A *ᵥ x
fgradient : HasGradientAt f (f' x) x
h : EuclideanSpace ℝ (Fin ↑n) → ℝ := fun x => b ⬝ᵥ A *ᵥ x
h' : EuclideanSpace ℝ (Fin ↑n) → Fin ↑n → ℝ := fun x => Aᵀ *ᵥ b
hgradient : HasGradientAt h (h' x) x
φ : EuclideanSpace ℝ (Fin ↑n) → ℝ := fun x => 1 / 2 * ‖A *ᵥ x - b‖ ^ 2
φ' : EuclideanSpace ℝ (Fin ↑n) → Fin ↑n → ℝ := fun x => Aᵀ *ᵥ (A *ᵥ x - b)
φeq : φ = fun x => f x - h x + 1 / 2 * b ⬝ᵥ b
φ'eq : φ' = fun x => f' x - h' x
⊢ HasGradientAt (fun x => f x - h x + 1 / 2 * b ⬝ᵥ b) ((fun x => f' x - h' x) x) x

Tactic:
apply HasGradientAt.add_const

Tactic state after:
[case hf
 n m : ℕ+
 b : Fin ↑m → ℝ
 A : Matrix (Fin ↑m) (Fin ↑n) ℝ
 x : EuclideanSpace ℝ (Fin ↑n)
 f : EuclideanSpace ℝ (Fin ↑n) → ℝ := fun x => 1 / 2 * A *ᵥ x ⬝ᵥ A *ᵥ x
 f' : EuclideanSpace ℝ (Fin ↑n) → Fin ↑n → ℝ := fun x => Aᵀ *ᵥ A *ᵥ x
 fgradient : HasGradientAt f (f' x) x
 h : EuclideanSpace ℝ (Fin ↑n) → ℝ := fun x => b ⬝ᵥ A *ᵥ x
 h' : EuclideanSpace ℝ (Fin ↑n) → Fin ↑n → ℝ := fun x => Aᵀ *ᵥ b
 hgradient : HasGradientAt h (h' x) x
 φ : EuclideanSpace ℝ (Fin ↑n) → ℝ := fun x => 1 / 2 * ‖A *ᵥ x - b‖ ^ 2
 φ' : EuclideanSpace ℝ (Fin ↑n) → Fin ↑n → ℝ := fun x => Aᵀ *ᵥ (A *ᵥ x - b)
 φeq : φ = fun x => f x - h x + 1 / 2 * b ⬝ᵥ b
 φ'eq : φ' = fun x => f' x - h' x
 ⊢ HasGradientAt (fun x => f x - h x) ((fun x => f' x - h' x) x) x]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_70 {n m : ℕ+} {b : Fin ↑m → ℝ} {A : Matrix (Fin ↑m) (Fin ↑n) ℝ}
  (x : EuclideanSpace ℝ (Fin ↑n)) :
  let f := fun x => 1 / 2 * A *ᵥ x ⬝ᵥ A *ᵥ x;
  let f' := fun x => Aᵀ *ᵥ A *ᵥ x;
  HasGradientAt f (f' x) x →
    let h := fun x => b ⬝ᵥ A *ᵥ x;
    let h' := fun x => Aᵀ *ᵥ b;
    HasGradientAt h (h' x) x →
      let φ := fun x => 1 / 2 * ‖A *ᵥ x - b‖ ^ 2;
      let φ' := fun x => Aᵀ *ᵥ (A *ᵥ x - b);
      (φ = fun x => f x - h x + 1 / 2 * b ⬝ᵥ b) →
        (φ' = fun x => f' x - h' x) → HasGradientAt (fun x => f x - h x) ((fun x => f' x - h' x) x) x := sorry

Tactic state before:
case hf
n m : ℕ+
b : Fin ↑m → ℝ
A : Matrix (Fin ↑m) (Fin ↑n) ℝ
x : EuclideanSpace ℝ (Fin ↑n)
f : EuclideanSpace ℝ (Fin ↑n) → ℝ := fun x => 1 / 2 * A *ᵥ x ⬝ᵥ A *ᵥ x
f' : EuclideanSpace ℝ (Fin ↑n) → Fin ↑n → ℝ := fun x => Aᵀ *ᵥ A *ᵥ x
fgradient : HasGradientAt f (f' x) x
h : EuclideanSpace ℝ (Fin ↑n) → ℝ := fun x => b ⬝ᵥ A *ᵥ x
h' : EuclideanSpace ℝ (Fin ↑n) → Fin ↑n → ℝ := fun x => Aᵀ *ᵥ b
hgradient : HasGradientAt h (h' x) x
φ : EuclideanSpace ℝ (Fin ↑n) → ℝ := fun x => 1 / 2 * ‖A *ᵥ x - b‖ ^ 2
φ' : EuclideanSpace ℝ (Fin ↑n) → Fin ↑n → ℝ := fun x => Aᵀ *ᵥ (A *ᵥ x - b)
φeq : φ = fun x => f x - h x + 1 / 2 * b ⬝ᵥ b
φ'eq : φ' = fun x => f' x - h' x
⊢ HasGradientAt (fun x => f x - h x) ((fun x => f' x - h' x) x) x

Tactic:
apply HasGradientAt.sub fgradient hgradient

Tactic state after:
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_71 {n m : ℕ+} {b : Fin ↑m → ℝ} {A : Matrix (Fin ↑m) (Fin ↑n) ℝ}
  (h_original_goal : ConvexOn ℝ Set.univ fun x => 1 / 2 * ‖A *ᵥ x - b‖ ^ 2) : Convex ℝ Set.univ := sorry

Tactic state before:
n m : ℕ+
b : Fin ↑m → ℝ
A : Matrix (Fin ↑m) (Fin ↑n) ℝ
⊢ ConvexOn ℝ Set.univ fun x => 1 / 2 * ‖A *ᵥ x - b‖ ^ 2

Tactic:
apply monotone_gradient_convex'

Tactic state after:
[case h₁
 n m : ℕ+
 b : Fin ↑m → ℝ
 A : Matrix (Fin ↑m) (Fin ↑n) ℝ
 ⊢ Convex ℝ Set.univ,
 case hf
 n m : ℕ+
 b : Fin ↑m → ℝ
 A : Matrix (Fin ↑m) (Fin ↑n) ℝ
 ⊢ ∀ x ∈ Set.univ, HasGradientAt (fun x => 1 / 2 * ‖A *ᵥ x - b‖ ^ 2) (?f' x) x,
 case mono
 n m : ℕ+
 b : Fin ↑m → ℝ
 A : Matrix (Fin ↑m) (Fin ↑n) ℝ
 ⊢ ∀ x ∈ Set.univ, ∀ y ∈ Set.univ, inner (?f' x - ?f' y) (x - y) ≥ 0,
 case f'
 n m : ℕ+
 b : Fin ↑m → ℝ
 A : Matrix (Fin ↑m) (Fin ↑n) ℝ
 ⊢ EuclideanSpace ℝ (Fin ↑n) → EuclideanSpace ℝ (Fin ↑n)]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_72 {n m : ℕ+} {b : Fin ↑m → ℝ} {A : Matrix (Fin ↑m) (Fin ↑n) ℝ}
  (x : EuclideanSpace ℝ (Fin ↑n)) (a : x ∈ Set.univ) (y : EuclideanSpace ℝ (Fin ↑n)) (a_1 : y ∈ Set.univ)
  (h_original_goal : inner (Aᵀ *ᵥ (A *ᵥ x - b) - Aᵀ *ᵥ (A *ᵥ y - b)) (x - y) ≥ 0) :
  Aᵀ *ᵥ (A *ᵥ x - A *ᵥ y) ⬝ᵥ (x - y) ≥ 0 := sorry

Tactic state before:
case mono
n m : ℕ+
b : Fin ↑m → ℝ
A : Matrix (Fin ↑m) (Fin ↑n) ℝ
x : EuclideanSpace ℝ (Fin ↑n)
a✝¹ : x ∈ Set.univ
y : EuclideanSpace ℝ (Fin ↑n)
a✝ : y ∈ Set.univ
⊢ inner (Aᵀ *ᵥ (A *ᵥ x - b) - Aᵀ *ᵥ (A *ᵥ y - b)) (x - y) ≥ 0

Tactic:
rw [Matrix.mulVec_sub, Matrix.mulVec_sub, ← sub_add, sub_add_eq_add_sub, sub_add_cancel, ←
  Matrix.mulVec_sub, real_inner_eq_dot]

Tactic state after:
[case mono
 n m : ℕ+
 b : Fin ↑m → ℝ
 A : Matrix (Fin ↑m) (Fin ↑n) ℝ
 x : EuclideanSpace ℝ (Fin ↑n)
 a✝¹ : x ∈ Set.univ
 y : EuclideanSpace ℝ (Fin ↑n)
 a✝ : y ∈ Set.univ
 ⊢ Aᵀ *ᵥ (A *ᵥ x - A *ᵥ y) ⬝ᵥ (x - y) ≥ 0]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_73 {n m : ℕ+} {b : Fin ↑m → ℝ} {A : Matrix (Fin ↑m) (Fin ↑n) ℝ}
  (x : EuclideanSpace ℝ (Fin ↑n)) (a : x ∈ Set.univ) (y : EuclideanSpace ℝ (Fin ↑n)) (a_1 : y ∈ Set.univ)
  (h_original_goal : Aᵀ *ᵥ (A *ᵥ x - A *ᵥ y) ⬝ᵥ (x - y) ≥ 0) : ‖A *ᵥ (x - y)‖ ^ 2 ≥ 0 := sorry

Tactic state before:
case mono
n m : ℕ+
b : Fin ↑m → ℝ
A : Matrix (Fin ↑m) (Fin ↑n) ℝ
x : EuclideanSpace ℝ (Fin ↑n)
a✝¹ : x ∈ Set.univ
y : EuclideanSpace ℝ (Fin ↑n)
a✝ : y ∈ Set.univ
⊢ Aᵀ *ᵥ (A *ᵥ x - A *ᵥ y) ⬝ᵥ (x - y) ≥ 0

Tactic:
rw [← dot_mul_eq_transpose_mul_dot, ← Matrix.mulVec_sub, ← norm2eq_dot]

Tactic state after:
[case mono
 n m : ℕ+
 b : Fin ↑m → ℝ
 A : Matrix (Fin ↑m) (Fin ↑n) ℝ
 x : EuclideanSpace ℝ (Fin ↑n)
 a✝¹ : x ∈ Set.univ
 y : EuclideanSpace ℝ (Fin ↑n)
 a✝ : y ∈ Set.univ
 ⊢ ‖A *ᵥ (x - y)‖ ^ 2 ≥ 0]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_74 {n m : ℕ+} {b : Fin ↑m → ℝ} {A : Matrix (Fin ↑m) (Fin ↑n) ℝ}
  (x : EuclideanSpace ℝ (Fin ↑n)) (a : x ∈ Set.univ) (y : EuclideanSpace ℝ (Fin ↑n)) (a_1 : y ∈ Set.univ) :
  ‖A *ᵥ (x - y)‖ ^ 2 ≥ 0 := sorry

Tactic state before:
case mono
n m : ℕ+
b : Fin ↑m → ℝ
A : Matrix (Fin ↑m) (Fin ↑n) ℝ
x : EuclideanSpace ℝ (Fin ↑n)
a✝¹ : x ∈ Set.univ
y : EuclideanSpace ℝ (Fin ↑n)
a✝ : y ∈ Set.univ
⊢ ‖A *ᵥ (x - y)‖ ^ 2 ≥ 0

Tactic:
apply sq_nonneg

Tactic state after:
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_75 {n : ℕ+} (h_original_goal : ConvexOn ℝ Set.univ fun x => ∑ i, ‖x i‖) :
  Convex ℝ Set.univ ∧
    ∀ ⦃x : EuclideanSpace ℝ (Fin ↑n)⦄,
      x ∈ Set.univ →
        ∀ ⦃y : EuclideanSpace ℝ (Fin ↑n)⦄,
          y ∈ Set.univ →
            ∀ ⦃a b : ℝ⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → ∑ i, ‖(a • x + b • y) i‖ ≤ a • ∑ i, ‖x i‖ + b • ∑ i, ‖y i‖ := sorry

Tactic state before:
n : ℕ+
⊢ ConvexOn ℝ Set.univ fun x => ∑ i, ‖x i‖

Tactic:
rw [ConvexOn]

Tactic state after:
[n : ℕ+
 ⊢ Convex ℝ Set.univ ∧
     ∀ ⦃x : EuclideanSpace ℝ (Fin ↑n)⦄,
       x ∈ Set.univ →
         ∀ ⦃y : EuclideanSpace ℝ (Fin ↑n)⦄,
           y ∈ Set.univ →
             ∀ ⦃a b : ℝ⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → ∑ i, ‖(a • x + b • y) i‖ ≤ a • ∑ i, ‖x i‖ + b • ∑ i, ‖y i‖]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_76 {n : ℕ+} ⦃x : EuclideanSpace ℝ (Fin ↑n)⦄ (a_1 : x ∈ Set.univ)
  ⦃y : EuclideanSpace ℝ (Fin ↑n)⦄ (a_2 : y ∈ Set.univ) ⦃a b : ℝ⦄ (anneg : 0 ≤ a) (bnneg : 0 ≤ b) (a_3 : a + b = 1)
  (h_original_goal : ∑ i, ‖(a • x + b • y) i‖ ≤ a • ∑ i, ‖x i‖ + b • ∑ i, ‖y i‖) :
  ∑ i, ‖(a • x + b • y) i‖ ≤ ∑ x_1, (a * ‖x x_1‖ + b * ‖y x_1‖) := sorry

Tactic state before:
case right
n : ℕ+
x : EuclideanSpace ℝ (Fin ↑n)
a✝² : x ∈ Set.univ
y : EuclideanSpace ℝ (Fin ↑n)
a✝¹ : y ∈ Set.univ
a b : ℝ
anneg : 0 ≤ a
bnneg : 0 ≤ b
a✝ : a + b = 1
⊢ ∑ i, ‖(a • x + b • y) i‖ ≤ a • ∑ i, ‖x i‖ + b • ∑ i, ‖y i‖

Tactic:
rw [smul_eq_mul, smul_eq_mul, mul_sum, mul_sum, ← sum_add_distrib]

Tactic state after:
[case right
 n : ℕ+
 x : EuclideanSpace ℝ (Fin ↑n)
 a✝² : x ∈ Set.univ
 y : EuclideanSpace ℝ (Fin ↑n)
 a✝¹ : y ∈ Set.univ
 a b : ℝ
 anneg : 0 ≤ a
 bnneg : 0 ≤ b
 a✝ : a + b = 1
 ⊢ ∑ i, ‖(a • x + b • y) i‖ ≤ ∑ x_1, (a * ‖x x_1‖ + b * ‖y x_1‖)]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_77 {n : ℕ+} ⦃x : EuclideanSpace ℝ (Fin ↑n)⦄ (a_1 : x ∈ Set.univ)
  ⦃y : EuclideanSpace ℝ (Fin ↑n)⦄ (a_2 : y ∈ Set.univ) ⦃a b : ℝ⦄ (anneg : 0 ≤ a) (bnneg : 0 ≤ b) (a_3 : a + b = 1)
  (h_original_goal : ∑ i, ‖(a • x + b • y) i‖ ≤ ∑ x_1, (a * ‖x x_1‖ + b * ‖y x_1‖)) (i : Fin ↑n) :
  i ∈ Finset.univ → ‖(a • x + b • y) i‖ ≤ a * ‖x i‖ + b * ‖y i‖ := sorry

Tactic state before:
case right
n : ℕ+
x : EuclideanSpace ℝ (Fin ↑n)
a✝² : x ∈ Set.univ
y : EuclideanSpace ℝ (Fin ↑n)
a✝¹ : y ∈ Set.univ
a b : ℝ
anneg : 0 ≤ a
bnneg : 0 ≤ b
a✝ : a + b = 1
⊢ ∑ i, ‖(a • x + b • y) i‖ ≤ ∑ x_1, (a * ‖x x_1‖ + b * ‖y x_1‖)

Tactic:
apply sum_le_sum

Tactic state after:
[case right.h
 n : ℕ+
 x : EuclideanSpace ℝ (Fin ↑n)
 a✝² : x ∈ Set.univ
 y : EuclideanSpace ℝ (Fin ↑n)
 a✝¹ : y ∈ Set.univ
 a b : ℝ
 anneg : 0 ≤ a
 bnneg : 0 ≤ b
 a✝ : a + b = 1
 ⊢ ∀ i ∈ Finset.univ, ‖(a • x + b • y) i‖ ≤ a * ‖x i‖ + b * ‖y i‖]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_78 {n : ℕ+} ⦃x : EuclideanSpace ℝ (Fin ↑n)⦄ (a_1 : x ∈ Set.univ)
  ⦃y : EuclideanSpace ℝ (Fin ↑n)⦄ (a_2 : y ∈ Set.univ) ⦃a b : ℝ⦄ (anneg : 0 ≤ a) (bnneg : 0 ≤ b) (a_3 : a + b = 1)
  (i : Fin ↑n) (a_4 : i ∈ Finset.univ) (h_original_goal : ‖(a • x + b • y) i‖ ≤ a * ‖x i‖ + b * ‖y i‖) :
  |a * x i + b * y i| ≤ a * |x i| + b * |y i| := sorry

Tactic state before:
case right.h
n : ℕ+
x : EuclideanSpace ℝ (Fin ↑n)
a✝³ : x ∈ Set.univ
y : EuclideanSpace ℝ (Fin ↑n)
a✝² : y ∈ Set.univ
a b : ℝ
anneg : 0 ≤ a
bnneg : 0 ≤ b
a✝¹ : a + b = 1
i : Fin ↑n
a✝ : i ∈ Finset.univ
⊢ ‖(a • x + b • y) i‖ ≤ a * ‖x i‖ + b * ‖y i‖

Tactic:
simp

Tactic state after:
[case right.h
 n : ℕ+
 x : EuclideanSpace ℝ (Fin ↑n)
 a✝³ : x ∈ Set.univ
 y : EuclideanSpace ℝ (Fin ↑n)
 a✝² : y ∈ Set.univ
 a b : ℝ
 anneg : 0 ≤ a
 bnneg : 0 ≤ b
 a✝¹ : a + b = 1
 i : Fin ↑n
 a✝ : i ∈ Finset.univ
 ⊢ |a * x i + b * y i| ≤ a * |x i| + b * |y i|]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_79 {n : ℕ+} ⦃x : EuclideanSpace ℝ (Fin ↑n)⦄ (a_1 : x ∈ Set.univ)
  ⦃y : EuclideanSpace ℝ (Fin ↑n)⦄ (a_2 : y ∈ Set.univ) ⦃a b : ℝ⦄ (anneg : 0 ≤ a) (bnneg : 0 ≤ b) (a_3 : a + b = 1)
  (i : Fin ↑n) (a_4 : i ∈ Finset.univ) : |a * x i + b * y i| ≤ |a * x i| + |b * y i| := sorry

Tactic state before:
n : ℕ+
x : EuclideanSpace ℝ (Fin ↑n)
a✝³ : x ∈ Set.univ
y : EuclideanSpace ℝ (Fin ↑n)
a✝² : y ∈ Set.univ
a b : ℝ
anneg : 0 ≤ a
bnneg : 0 ≤ b
a✝¹ : a + b = 1
i : Fin ↑n
a✝ : i ∈ Finset.univ
⊢ |a * x i + b * y i| ≤ |a * x i| + |b * y i|

Tactic:
apply abs_add

Tactic state after:
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_80 {n : ℕ+} ⦃x : EuclideanSpace ℝ (Fin ↑n)⦄ (a_1 : x ∈ Set.univ)
  ⦃y : EuclideanSpace ℝ (Fin ↑n)⦄ (a_2 : y ∈ Set.univ) ⦃a b : ℝ⦄ (anneg : 0 ≤ a) (bnneg : 0 ≤ b) (a_3 : a + b = 1)
  (i : Fin ↑n) (a_4 : i ∈ Finset.univ) : |a * x i| + |b * y i| = a * |x i| + b * |y i| := sorry

Tactic state before:
n : ℕ+
x : EuclideanSpace ℝ (Fin ↑n)
a✝³ : x ∈ Set.univ
y : EuclideanSpace ℝ (Fin ↑n)
a✝² : y ∈ Set.univ
a b : ℝ
anneg : 0 ≤ a
bnneg : 0 ≤ b
a✝¹ : a + b = 1
i : Fin ↑n
a✝ : i ∈ Finset.univ
⊢ |a * x i| + |b * y i| = a * |x i| + b * |y i|

Tactic:
rw [abs_mul, abs_mul, abs_of_nonneg anneg, abs_of_nonneg bnneg]

Tactic state after:
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_81 (x : ℝ) (xpos : 0 < x) (h_original_goal : x.sign * |x| = x) : 1 * |x| = x := sorry

Tactic state before:
case pos
x : ℝ
xpos : 0 < x
⊢ x.sign * |x| = x

Tactic:
rw [Real.sign_of_pos xpos]

Tactic state after:
[case pos
 x : ℝ
 xpos : 0 < x
 ⊢ 1 * |x| = x]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_82 (x : ℝ) (xpos : 0 < x) (h_original_goal : 1 * |x| = x) : 0 ≤ x := sorry

Tactic state before:
case pos
x : ℝ
xpos : 0 < x
⊢ 1 * |x| = x

Tactic:
simp

Tactic state after:
[case pos
 x : ℝ
 xpos : 0 < x
 ⊢ 0 ≤ x]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_83 : sign 0 * |0| = 0 := sorry

Tactic state before:
case pos
x : ℝ
xpos : x ≤ 0
xzero : x = 0
⊢ x.sign * |x| = x

Tactic:
rw [xzero]

Tactic state after:
[case pos
 x : ℝ
 xpos : x ≤ 0
 xzero : x = 0
 ⊢ sign 0 * |0| = 0]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_84 : sign 0 * |0| = 0 := sorry

Tactic state before:
case pos
x : ℝ
xpos : x ≤ 0
xzero : x = 0
⊢ sign 0 * |0| = 0

Tactic:
simp

Tactic state after:
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_85 (x : ℝ) (xpos : x ≤ 0) (xzero : x ≠ 0) (xneg : x < 0)
  (h_original_goal : x.sign * |x| = x) : -1 * |x| = x := sorry

Tactic state before:
case neg
x : ℝ
xpos : x ≤ 0
xzero : x ≠ 0
xneg : x < 0
⊢ x.sign * |x| = x

Tactic:
rw [Real.sign_of_neg xneg]

Tactic state after:
[case neg
 x : ℝ
 xpos : x ≤ 0
 xzero : x ≠ 0
 xneg : x < 0
 ⊢ -1 * |x| = x]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_86 (x : ℝ) (xpos : x ≤ 0) (xzero : x ≠ 0) (xneg : x < 0)
  (h_original_goal : -1 * |x| = x) : -|x| = x := sorry

Tactic state before:
case neg
x : ℝ
xpos : x ≤ 0
xzero : x ≠ 0
xneg : x < 0
⊢ -1 * |x| = x

Tactic:
simp

Tactic state after:
[case neg
 x : ℝ
 xpos : x ≤ 0
 xzero : x ≠ 0
 xneg : x < 0
 ⊢ -|x| = x]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_87 (x : ℝ) (xpos : x ≤ 0) (xzero : x ≠ 0) (xneg : x < 0) (h_original_goal : -|x| = x) :
  x ≤ 0 := sorry

Tactic state before:
case neg
x : ℝ
xpos : x ≤ 0
xzero : x ≠ 0
xneg : x < 0
⊢ -|x| = x

Tactic:
rw [neg_eq_iff_eq_neg, abs_eq_neg_self]

Tactic state after:
[case neg
 x : ℝ
 xpos : x ≤ 0
 xzero : x ≠ 0
 xneg : x < 0
 ⊢ x ≤ 0]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_88 {n : ℕ+} {t μ : ℝ} {h : EuclideanSpace ℝ (Fin ↑n) → ℝ}
  (lasso : h = fun y => μ • ∑ i, ‖y i‖) (x xm : EuclideanSpace ℝ (Fin ↑n)) (tpos : 0 < t) (μpos : 0 < μ)
  (minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)) :
  let g := (t * μ) • fun x => ∑ i, ‖x i‖;
  ∀ (z : EuclideanSpace ℝ (Fin ↑n)), g z = (t • h) z → g z = t • h z := sorry

Tactic state before:
case h
n : ℕ+
t μ : ℝ
h : EuclideanSpace ℝ (Fin ↑n) → ℝ
lasso : h = fun y => μ • ∑ i, ‖y i‖
x xm : EuclideanSpace ℝ (Fin ↑n)
tpos : 0 < t
μpos : 0 < μ
minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)
g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
z : EuclideanSpace ℝ (Fin ↑n)
⊢ g z = (t • h) z

Tactic:
rw [Pi.smul_apply]

Tactic state after:
[case h
 n : ℕ+
 t μ : ℝ
 h : EuclideanSpace ℝ (Fin ↑n) → ℝ
 lasso : h = fun y => μ • ∑ i, ‖y i‖
 x xm : EuclideanSpace ℝ (Fin ↑n)
 tpos : 0 < t
 μpos : 0 < μ
 minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)
 g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
 z : EuclideanSpace ℝ (Fin ↑n)
 ⊢ g z = t • h z]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_89 {n : ℕ+} {t μ : ℝ} {h : EuclideanSpace ℝ (Fin ↑n) → ℝ}
  (lasso : h = fun y => μ • ∑ i, ‖y i‖) (x xm : EuclideanSpace ℝ (Fin ↑n)) (tpos : 0 < t) (μpos : 0 < μ)
  (minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)) :
  let g := (t * μ) • fun x => ∑ i, ‖x i‖;
  ∀ (z : EuclideanSpace ℝ (Fin ↑n)), g z = t • h z → t * μ * ∑ x, |z x| = t * h z := sorry

Tactic state before:
case h
n : ℕ+
t μ : ℝ
h : EuclideanSpace ℝ (Fin ↑n) → ℝ
lasso : h = fun y => μ • ∑ i, ‖y i‖
x xm : EuclideanSpace ℝ (Fin ↑n)
tpos : 0 < t
μpos : 0 < μ
minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)
g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
z : EuclideanSpace ℝ (Fin ↑n)
⊢ g z = t • h z

Tactic:
simp [g]

Tactic state after:
[case h
 n : ℕ+
 t μ : ℝ
 h : EuclideanSpace ℝ (Fin ↑n) → ℝ
 lasso : h = fun y => μ • ∑ i, ‖y i‖
 x xm : EuclideanSpace ℝ (Fin ↑n)
 tpos : 0 < t
 μpos : 0 < μ
 minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)
 g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
 z : EuclideanSpace ℝ (Fin ↑n)
 ⊢ t * μ * ∑ x, |z x| = t * h z]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_90 {n : ℕ+} {t μ : ℝ} {h : EuclideanSpace ℝ (Fin ↑n) → ℝ}
  (lasso : h = fun y => μ • ∑ i, ‖y i‖) (x xm : EuclideanSpace ℝ (Fin ↑n)) (tpos : 0 < t) (μpos : 0 < μ)
  (minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)) (z : EuclideanSpace ℝ (Fin ↑n))
  (h_original_goal : t * μ * ∑ x, |z x| = t * h z) : t * μ * ∑ x, |z x| = t * (fun y => μ • ∑ i, ‖y i‖) z := sorry

Tactic state before:
case h
n : ℕ+
t μ : ℝ
h : EuclideanSpace ℝ (Fin ↑n) → ℝ
lasso : h = fun y => μ • ∑ i, ‖y i‖
x xm : EuclideanSpace ℝ (Fin ↑n)
tpos : 0 < t
μpos : 0 < μ
minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)
g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
z : EuclideanSpace ℝ (Fin ↑n)
⊢ t * μ * ∑ x, |z x| = t * h z

Tactic:
rw [lasso]

Tactic state after:
[case h
 n : ℕ+
 t μ : ℝ
 h : EuclideanSpace ℝ (Fin ↑n) → ℝ
 lasso : h = fun y => μ • ∑ i, ‖y i‖
 x xm : EuclideanSpace ℝ (Fin ↑n)
 tpos : 0 < t
 μpos : 0 < μ
 minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)
 g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
 z : EuclideanSpace ℝ (Fin ↑n)
 ⊢ t * μ * ∑ x, |z x| = t * (fun y => μ • ∑ i, ‖y i‖) z]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_91 {n : ℕ+} {t μ : ℝ} {h : EuclideanSpace ℝ (Fin ↑n) → ℝ}
  (lasso : h = fun y => μ • ∑ i, ‖y i‖) (x xm : EuclideanSpace ℝ (Fin ↑n)) (tpos : 0 < t) (μpos : 0 < μ)
  (minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)) (z : EuclideanSpace ℝ (Fin ↑n))
  (h_original_goal : t * μ * ∑ x, |z x| = t * (fun y => μ • ∑ i, ‖y i‖) z) :
  t * μ * ∑ x, |z x| = t * (μ * ∑ x, |z x|) := sorry

Tactic state before:
case h
n : ℕ+
t μ : ℝ
h : EuclideanSpace ℝ (Fin ↑n) → ℝ
lasso : h = fun y => μ • ∑ i, ‖y i‖
x xm : EuclideanSpace ℝ (Fin ↑n)
tpos : 0 < t
μpos : 0 < μ
minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)
g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
z : EuclideanSpace ℝ (Fin ↑n)
⊢ t * μ * ∑ x, |z x| = t * (fun y => μ • ∑ i, ‖y i‖) z

Tactic:
simp

Tactic state after:
[case h
 n : ℕ+
 t μ : ℝ
 h : EuclideanSpace ℝ (Fin ↑n) → ℝ
 lasso : h = fun y => μ • ∑ i, ‖y i‖
 x xm : EuclideanSpace ℝ (Fin ↑n)
 tpos : 0 < t
 μpos : 0 < μ
 minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)
 g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
 z : EuclideanSpace ℝ (Fin ↑n)
 ⊢ t * μ * ∑ x, |z x| = t * (μ * ∑ x, |z x|)]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_92 {n : ℕ+} {t μ : ℝ} {h : EuclideanSpace ℝ (Fin ↑n) → ℝ}
  (lasso : h = fun y => μ • ∑ i, ‖y i‖) (x xm : EuclideanSpace ℝ (Fin ↑n)) (tpos : 0 < t) (μpos : 0 < μ)
  (minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)) (z : EuclideanSpace ℝ (Fin ↑n)) :
  t * μ * ∑ x, |z x| = t * (μ * ∑ x, |z x|) := sorry

Tactic state before:
case h
n : ℕ+
t μ : ℝ
h : EuclideanSpace ℝ (Fin ↑n) → ℝ
lasso : h = fun y => μ • ∑ i, ‖y i‖
x xm : EuclideanSpace ℝ (Fin ↑n)
tpos : 0 < t
μpos : 0 < μ
minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)
g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
z : EuclideanSpace ℝ (Fin ↑n)
⊢ t * μ * ∑ x, |z x| = t * (μ * ∑ x, |z x|)

Tactic:
rw [mul_assoc]

Tactic state after:
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_93 {n : ℕ+} {t μ : ℝ} {h : EuclideanSpace ℝ (Fin ↑n) → ℝ}
  (lasso : h = fun y => μ • ∑ i, ‖y i‖) (x xm : EuclideanSpace ℝ (Fin ↑n)) (tpos : 0 < t) (μpos : 0 < μ)
  (minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)) :
  let g := (t * μ) • fun x => ∑ i, ‖x i‖;
  g = t • h → prox_prop (t • h) x xm → prox_prop g x xm := sorry

Tactic state before:
n : ℕ+
t μ : ℝ
h : EuclideanSpace ℝ (Fin ↑n) → ℝ
lasso : h = fun y => μ • ∑ i, ‖y i‖
x xm : EuclideanSpace ℝ (Fin ↑n)
tpos : 0 < t
μpos : 0 < μ
minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)
g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
geqth : g = t • h
⊢ prox_prop (t • h) x xm

Tactic:
rw [← geqth]

Tactic state after:
[n : ℕ+
 t μ : ℝ
 h : EuclideanSpace ℝ (Fin ↑n) → ℝ
 lasso : h = fun y => μ • ∑ i, ‖y i‖
 x xm : EuclideanSpace ℝ (Fin ↑n)
 tpos : 0 < t
 μpos : 0 < μ
 minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)
 g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
 geqth : g = t • h
 ⊢ prox_prop g x xm]
import Mathlib
import Optlib


open Set Real Matrix Finset

open Set Real Matrix Finset NNReal

theorem extracted_formal_statement_94 {n : ℕ+} {t μ : ℝ} {h : EuclideanSpace ℝ (Fin ↑n) → ℝ}
  (lasso : h = fun y => μ • ∑ i, ‖y i‖) (x xm : EuclideanSpace ℝ (Fin ↑n)) (tpos : 0 < t) (μpos : 0 < μ)
  (minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)) :
  let g := (t * μ) • fun x => ∑ i, ‖x i‖;
  g = t • h → 0 < t * μ → 0 < t := sorry

Tactic state before:
n : ℕ+
t μ : ℝ
h : EuclideanSpace ℝ (Fin ↑n) → ℝ
lasso : h = fun y => μ • ∑ i, ‖y i‖
x xm : EuclideanSpace ℝ (Fin ↑n)
tpos : 0 < t
μpos : 0 < μ
minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)
g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
geqth : g = t • h
⊢ 0 < t * μ

Tactic:
apply mul_pos

Tactic state after:
[case ha
 n : ℕ+
 t μ : ℝ
 h : EuclideanSpace ℝ (Fin ↑n) → ℝ
 lasso : h = fun y => μ • ∑ i, ‖y i‖
 x xm : EuclideanSpace ℝ (Fin ↑n)
 tpos : 0 < t
 μpos : 0 < μ
 minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)
 g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
 geqth : g = t • h
 ⊢ 0 < t,
 case hb
 n : ℕ+
 t μ : ℝ
 h : EuclideanSpace ℝ (Fin ↑n) → ℝ
 lasso : h = fun y => μ • ∑ i, ‖y i‖
 x xm : EuclideanSpace ℝ (Fin ↑n)
 tpos : 0 < t
 μpos : 0 < μ
 minpoint : ∀ (i : Fin ↑n), xm i = sign (x i) * ((|x i| - t * μ) ⊔ 0)
 g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
 geqth : g = t • h
 ⊢ 0 < μ]