-- File: optlib/Optlib/Algorithm/LASSO.lean
Theorem statement:
theorem extracted_formal_statement_113 {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 * μ →
                μ⁻¹ * t⁻¹ * |x i * y i| ≤ |y i| * μ⁻¹ * t⁻¹ * t * μ →
                  |y i| * μ⁻¹ * t⁻¹ * |x i| ≤ |y i| * μ⁻¹ * t⁻¹ * (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 < μ
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⁻¹ * |x i * y i| ≤ |y i| * μ⁻¹ * t⁻¹ * t * μ

Tactic: rw [abs_mul, ← mul_assoc, mul_comm, ← mul_assoc, ← mul_assoc, mul_assoc _ t]

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| * μ⁻¹ * t⁻¹ * |x i| ≤ |y i| * μ⁻¹ * t⁻¹ * (t * μ)]

Premises used:
mul_comm : ∀ {G : Type u_1} [inst : CommMagma G] (a b : G), a * b = b * a
abs_mul : ∀ {α : Type u_1} [inst : LinearOrderedRing α] (a b : α), |a * b| = |a| * |b|
mul_assoc : ∀ {G : Type u_1} [inst : Semigroup G] (a b c : G), a * b * c = a * (b * c)