-- File: optlib/Optlib/Algorithm/LASSO.lean
Theorem statement:
theorem extracted_formal_statement_36 {n m : ℕ+} {A : Matrix (Fin ↑m) (Fin ↑n) ℝ} (hA : ¬A = 0)
  (x : EuclideanSpace ℝ (Fin ↑n)) (ε : ℝ) (εpos : ε > 0) :
  let normA := ‖(toEuclideanLin ≪≫ₗ LinearMap.toContinuousLinearMap) A‖;
  (∀ (x : EuclideanSpace ℝ (Fin ↑n)), ‖A *ᵥ x‖ ≤ normA * ‖x‖) →
    0 < normA →
      ∀ (y : EuclideanSpace ℝ (Fin ↑n)),
        ‖x - y‖ ≤ ε / normA ^ 2 →
          ((fun x_1 => y x_1 - x x_1) ⬝ᵥ fun x_1 => ((Aᵀ * A) *ᵥ x) x_1) = (Aᵀ * A) *ᵥ x ⬝ᵥ (y - x) →
            (∀ (u v : Fin ↑m → ℝ), u ⬝ᵥ u + (v ⬝ᵥ v - v ⬝ᵥ u * 2) = (u - v) ⬝ᵥ (u - v)) →
              (normA * ‖x - y‖) ^ 2 ≤ ε * ‖x - y‖ → normA * ‖x - y‖ * normA * ‖x - y‖ ≤ ε * ‖x - y‖ := sorry

Tactic state before:
n m : ℕ+
A : Matrix (Fin ↑m) (Fin ↑n) ℝ
hA : ¬A = 0
x : EuclideanSpace ℝ (Fin ↑n)
ε : ℝ
εpos : ε > 0
normA : ℝ := ‖(toEuclideanLin ≪≫ₗ LinearMap.toContinuousLinearMap) A‖
norm_mul : ∀ (x : EuclideanSpace ℝ (Fin ↑n)), ‖A *ᵥ x‖ ≤ normA * ‖x‖
normApos : 0 < normA
y : EuclideanSpace ℝ (Fin ↑n)
ydist : ‖x - y‖ ≤ ε / normA ^ 2
aux1 : ((fun x_1 => y x_1 - x x_1) ⬝ᵥ fun x_1 => ((Aᵀ * A) *ᵥ x) x_1) = (Aᵀ * A) *ᵥ x ⬝ᵥ (y - x)
aux2 : ∀ (u v : Fin ↑m → ℝ), u ⬝ᵥ u + (v ⬝ᵥ v - v ⬝ᵥ u * 2) = (u - v) ⬝ᵥ (u - v)
⊢ (normA * ‖x - y‖) ^ 2 ≤ ε * ‖x - y‖

Tactic: rw [pow_two, ← mul_assoc]

Tactic state after:
[n m : ℕ+
 A : Matrix (Fin ↑m) (Fin ↑n) ℝ
 hA : ¬A = 0
 x : EuclideanSpace ℝ (Fin ↑n)
 ε : ℝ
 εpos : ε > 0
 normA : ℝ := ‖(toEuclideanLin ≪≫ₗ LinearMap.toContinuousLinearMap) A‖
 norm_mul : ∀ (x : EuclideanSpace ℝ (Fin ↑n)), ‖A *ᵥ x‖ ≤ normA * ‖x‖
 normApos : 0 < normA
 y : EuclideanSpace ℝ (Fin ↑n)
 ydist : ‖x - y‖ ≤ ε / normA ^ 2
 aux1 : ((fun x_1 => y x_1 - x x_1) ⬝ᵥ fun x_1 => ((Aᵀ * A) *ᵥ x) x_1) = (Aᵀ * A) *ᵥ x ⬝ᵥ (y - x)
 aux2 : ∀ (u v : Fin ↑m → ℝ), u ⬝ᵥ u + (v ⬝ᵥ v - v ⬝ᵥ u * 2) = (u - v) ⬝ᵥ (u - v)
 ⊢ normA * ‖x - y‖ * normA * ‖x - y‖ ≤ ε * ‖x - y‖]

Premises used:
pow_two : ∀ {M : Type u_2} [inst : Monoid M] (a : M), a ^ 2 = a * a
mul_assoc : ∀ {G : Type u_1} [inst : Semigroup G] (a b c : G), a * b * c = a * (b * c)