-- File: optlib/Optlib/Algorithm/LASSO.lean
Theorem statement:
theorem extracted_formal_statement_48 {n m : ℕ+} {b : Fin ↑m → ℝ} {A : Matrix (Fin ↑m) (Fin ↑n) ℝ}
  (x : EuclideanSpace ℝ (Fin ↑n)) (ε : ℝ) (εpos : ε > 0) (y : EuclideanSpace ℝ (Fin ↑n)) (a : ‖x - y‖ ≤ ε)
  (h_original_goal :
    |∑ i, (Aᵀ *ᵥ b) i * y i - Aᵀ *ᵥ b ⬝ᵥ x -
          ((WithLp.equiv 2 (Fin ↑n → ℝ)) y ⬝ᵥ (WithLp.equiv 2 (Fin ↑n → ℝ)) (Aᵀ *ᵥ b) -
            (WithLp.equiv 2 (Fin ↑n → ℝ)) x ⬝ᵥ (WithLp.equiv 2 (Fin ↑n → ℝ)) (Aᵀ *ᵥ b))| ≤
      ε * ‖x - y‖) :
  |∑ x, y x * (Aᵀ *ᵥ b) x - Aᵀ *ᵥ b ⬝ᵥ x -
        ((WithLp.equiv 2 (Fin ↑n → ℝ)) y ⬝ᵥ (WithLp.equiv 2 (Fin ↑n → ℝ)) (Aᵀ *ᵥ b) -
          (WithLp.equiv 2 (Fin ↑n → ℝ)) x ⬝ᵥ (WithLp.equiv 2 (Fin ↑n → ℝ)) (Aᵀ *ᵥ b))| ≤
    ε * ‖x - y‖ := sorry

Tactic state before:
case right
n m : ℕ+
b : Fin ↑m → ℝ
A : Matrix (Fin ↑m) (Fin ↑n) ℝ
x : EuclideanSpace ℝ (Fin ↑n)
ε : ℝ
εpos : ε > 0
y : EuclideanSpace ℝ (Fin ↑n)
a✝ : ‖x - y‖ ≤ ε
⊢ |∑ i, (Aᵀ *ᵥ b) i * y i - Aᵀ *ᵥ b ⬝ᵥ x -
        ((WithLp.equiv 2 (Fin ↑n → ℝ)) y ⬝ᵥ (WithLp.equiv 2 (Fin ↑n → ℝ)) (Aᵀ *ᵥ b) -
          (WithLp.equiv 2 (Fin ↑n → ℝ)) x ⬝ᵥ (WithLp.equiv 2 (Fin ↑n → ℝ)) (Aᵀ *ᵥ b))| ≤
    ε * ‖x - y‖

Tactic: simp [mul_comm]

Tactic state after:
[case right
 n m : ℕ+
 b : Fin ↑m → ℝ
 A : Matrix (Fin ↑m) (Fin ↑n) ℝ
 x : EuclideanSpace ℝ (Fin ↑n)
 ε : ℝ
 εpos : ε > 0
 y : EuclideanSpace ℝ (Fin ↑n)
 a✝ : ‖x - y‖ ≤ ε
 ⊢ |∑ x, y x * (Aᵀ *ᵥ b) x - Aᵀ *ᵥ b ⬝ᵥ x -
         ((WithLp.equiv 2 (Fin ↑n → ℝ)) y ⬝ᵥ (WithLp.equiv 2 (Fin ↑n → ℝ)) (Aᵀ *ᵥ b) -
           (WithLp.equiv 2 (Fin ↑n → ℝ)) x ⬝ᵥ (WithLp.equiv 2 (Fin ↑n → ℝ)) (Aᵀ *ᵥ b))| ≤
     ε * ‖x - y‖]

Premises used:
mul_comm : ∀ {G : Type u_1} [inst : CommMagma G] (a b : G), a * b = b * a