-- File: optlib/Optlib/Algorithm/LASSO.lean
Theorem statement:
theorem extracted_formal_statement_99 {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 * μ →
      ∀ (y : EuclideanSpace ℝ (Fin ↑n)),
        ∑ x, |xm x| + ∑ x_1, (y x_1 - xm x_1) * (μ⁻¹ * t⁻¹ * (x x_1 - xm x_1)) ≤ ∑ x, |y x| →
          ∑ x_1, (|xm x_1| + (y x_1 - xm x_1) * (μ⁻¹ * t⁻¹ * (x x_1 - xm x_1))) ≤ ∑ x, |y x| := 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
tμpos : 0 < t * μ
y : EuclideanSpace ℝ (Fin ↑n)
⊢ ∑ x, |xm x| + ∑ x_1, (y x_1 - xm x_1) * (μ⁻¹ * t⁻¹ * (x x_1 - xm x_1)) ≤ ∑ x, |y x|

Tactic: rw [← sum_add_distrib]

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
 tμpos : 0 < t * μ
 y : EuclideanSpace ℝ (Fin ↑n)
 ⊢ ∑ x_1, (|xm x_1| + (y x_1 - xm x_1) * (μ⁻¹ * t⁻¹ * (x x_1 - xm x_1))) ≤ ∑ x, |y x|]

Premises used:
Finset.sum_add_distrib : ∀ {α : Type u_3} {β : Type u_4} {s : Finset α} {f g : α → β} [inst : AddCommMonoid β],
  ∑ x ∈ s, (f x + g x) = ∑ x ∈ s, f x + ∑ x ∈ s, g x