-- File: optlib/Optlib/Algorithm/LASSO.lean
Theorem statement:
theorem extracted_formal_statement_119 {n : ℕ+} {t μ : ℝ} {h : EuclideanSpace ℝ (Fin ↑n) → ℝ}
  (lasso : h = fun y => μ • ∑ i, ‖y i‖) (x xm : EuclideanSpace ℝ (Fin ↑n)) (tpos : 0 < t) (μpos : 0 < μ) :
  let g := (t * μ) • fun x => ∑ i, ‖x i‖;
  g = t • h →
    0 < t * μ →
      ∀ (y : EuclideanSpace ℝ (Fin ↑n)),
        ∀ i ∈ Finset.univ,
          let abs_subg := SubderivAt_abs (xm i);
          xm i = 0 →
            x i = 0 ∨ |x i| ≤ t * μ →
              |x i| ≤ t * μ → |y i| * μ⁻¹ * t⁻¹ * t * μ = |y i| → |y i| * μ⁻¹ * μ = |y i| := 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 < μ
g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
geqth : g = t • h
tμpos : 0 < t * μ
y : EuclideanSpace ℝ (Fin ↑n)
i : Fin ↑n
a✝ : i ∈ Finset.univ
abs_subg : SubderivAt abs (xm i) = if xm i = 0 then Set.Icc (-1) 1 else {sign (xm i)} := SubderivAt_abs (xm i)
hxm : xm i = 0
minpoint : x i = 0 ∨ |x i| ≤ t * μ
aux : |x i| ≤ t * μ
⊢ |y i| * μ⁻¹ * t⁻¹ * t * μ = |y i|

Tactic: rw [mul_assoc _ (t⁻¹) t, inv_mul_cancel₀, mul_one]

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 < μ
 g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
 geqth : g = t • h
 tμpos : 0 < t * μ
 y : EuclideanSpace ℝ (Fin ↑n)
 i : Fin ↑n
 a✝ : i ∈ Finset.univ
 abs_subg : SubderivAt abs (xm i) = if xm i = 0 then Set.Icc (-1) 1 else {sign (xm i)} := SubderivAt_abs (xm i)
 hxm : xm i = 0
 minpoint : x i = 0 ∨ |x i| ≤ t * μ
 aux : |x i| ≤ t * μ
 ⊢ |y i| * μ⁻¹ * μ = |y i|,
 n : ℕ+
 t μ : ℝ
 h : EuclideanSpace ℝ (Fin ↑n) → ℝ
 lasso : h = fun y => μ • ∑ i, ‖y i‖
 x xm : EuclideanSpace ℝ (Fin ↑n)
 tpos : 0 < t
 μpos : 0 < μ
 g : EuclideanSpace ℝ (Fin ↑n) → ℝ := (t * μ) • fun x => ∑ i, ‖x i‖
 geqth : g = t • h
 tμpos : 0 < t * μ
 y : EuclideanSpace ℝ (Fin ↑n)
 i : Fin ↑n
 a✝ : i ∈ Finset.univ
 abs_subg : SubderivAt abs (xm i) = if xm i = 0 then Set.Icc (-1) 1 else {sign (xm i)} := SubderivAt_abs (xm i)
 hxm : xm i = 0
 minpoint : x i = 0 ∨ |x i| ≤ t * μ
 aux : |x i| ≤ t * μ
 ⊢ t ≠ 0]

Premises used:
mul_one : ∀ {M : Type u} [inst : MulOneClass M] (a : M), a * 1 = a
mul_assoc : ∀ {G : Type u_1} [inst : Semigroup G] (a b c : G), a * b * c = a * (b * c)
inv_mul_cancel₀ : ∀ {G₀ : Type u_3} [inst : GroupWithZero G₀] {a : G₀}, a ≠ 0 → a⁻¹ * a = 1