Theorem: InnerProductSpaceable.inner_.norm_sq
File: Mathlib/Analysis/InnerProductSpace/OfNorm.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝² : RCLike 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
⊢ ‖x‖ ^ 2 = re (inner_ 𝕜 x x)
state_after: 𝕜 : Type u_1
inst✝² : RCLike 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
⊢ ‖x‖ ^ 2 =
    re
      (4⁻¹ *
        (𝓚 ‖x + x‖ * 𝓚 ‖x + x‖ - 𝓚 ‖x - x‖ * 𝓚 ‖x - x‖ + I * 𝓚 ‖I • x + x‖ * 𝓚 ‖I • x + x‖ -
          I * 𝓚 ‖I • x - x‖ * 𝓚 ‖I • x - x‖))
tactic: simp only [inner_]
state_before: 𝕜 : Type u_1
inst✝² : RCLike 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
⊢ ‖x‖ ^ 2 =
    re
      (4⁻¹ *
        (𝓚 ‖x + x‖ * 𝓚 ‖x + x‖ - 𝓚 ‖x - x‖ * 𝓚 ‖x - x‖ + I * 𝓚 ‖I • x + x‖ * 𝓚 ‖I • x + x‖ -
          I * 𝓚 ‖I • x - x‖ * 𝓚 ‖I • x - x‖))
state_after: 𝕜 : Type u_1
inst✝² : RCLike 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
h₁ : normSq 4 = 16
⊢ ‖x‖ ^ 2 =
    re
      (4⁻¹ *
        (𝓚 ‖x + x‖ * 𝓚 ‖x + x‖ - 𝓚 ‖x - x‖ * 𝓚 ‖x - x‖ + I * 𝓚 ‖I • x + x‖ * 𝓚 ‖I • x + x‖ -
          I * 𝓚 ‖I • x - x‖ * 𝓚 ‖I • x - x‖))
tactic: have h₁ : RCLike.normSq (4 : 𝕜) = 16 := by
    have : ((4 : ℝ) : 𝕜) = (4 : 𝕜) := by norm_cast
    rw [← this, normSq_eq_def', RCLike.norm_of_nonneg (by norm_num : (0 : ℝ) ≤ 4)]
    norm_num
state_before: 𝕜 : Type u_1
inst✝² : RCLike 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
h₁ : normSq 4 = 16
⊢ ‖x‖ ^ 2 =
    re
      (4⁻¹ *
        (𝓚 ‖x + x‖ * 𝓚 ‖x + x‖ - 𝓚 ‖x - x‖ * 𝓚 ‖x - x‖ + I * 𝓚 ‖I • x + x‖ * 𝓚 ‖I • x + x‖ -
          I * 𝓚 ‖I • x - x‖ * 𝓚 ‖I • x - x‖))
state_after: 𝕜 : Type u_1
inst✝² : RCLike 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
h₁ : normSq 4 = 16
h₂ : ‖x + x‖ = 2 * ‖x‖
⊢ ‖x‖ ^ 2 =
    re
      (4⁻¹ *
        (𝓚 ‖x + x‖ * 𝓚 ‖x + x‖ - 𝓚 ‖x - x‖ * 𝓚 ‖x - x‖ + I * 𝓚 ‖I • x + x‖ * 𝓚 ‖I • x + x‖ -
          I * 𝓚 ‖I • x - x‖ * 𝓚 ‖I • x - x‖))
tactic: have h₂ : ‖x + x‖ = 2 * ‖x‖ := by rw [← two_smul 𝕜, norm_smul, RCLike.norm_two]
state_before: 𝕜 : Type u_1
inst✝² : RCLike 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
h₁ : normSq 4 = 16
h₂ : ‖x + x‖ = 2 * ‖x‖
⊢ ‖x‖ ^ 2 =
    re
      (4⁻¹ *
        (𝓚 ‖x + x‖ * 𝓚 ‖x + x‖ - 𝓚 ‖x - x‖ * 𝓚 ‖x - x‖ + I * 𝓚 ‖I • x + x‖ * 𝓚 ‖I • x + x‖ -
          I * 𝓚 ‖I • x - x‖ * 𝓚 ‖I • x - x‖))
state_after: 𝕜 : Type u_1
inst✝² : RCLike 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
h₁ : normSq 4 = 16
h₂ : ‖x + x‖ = 2 * ‖x‖
⊢ ‖x‖ ^ 2 =
    4 / 16 *
        (2 * ‖x‖ * (2 * ‖x‖) - 0 * 0 - 0 +
            ((0 * ‖I • x + x‖ - im I * 0) * ‖I • x + x‖ - (0 * 0 + im I * ‖I • x + x‖) * 0) -
          ((0 * ‖I • x - x‖ - im I * 0) * ‖I • x - x‖ - (0 * 0 + im I * ‖I • x - x‖) * 0)) -
      -0 / 16 *
        (2 * ‖x‖ * 0 + 0 * (2 * ‖x‖) - (0 * 0 + 0 * 0) +
            ((0 * ‖I • x + x‖ - im I * 0) * 0 + (0 * 0 + im I * ‖I • x + x‖) * ‖I • x + x‖) -
          ((0 * ‖I • x - x‖ - im I * 0) * 0 + (0 * 0 + im I * ‖I • x - x‖) * ‖I • x - x‖))
tactic: simp only [h₁, h₂, algebraMap_eq_ofReal, sub_self, norm_zero, mul_re, inv_re, ofNat_re, map_sub,
    map_add, ofReal_re, ofNat_im, ofReal_im, mul_im, I_re, inv_im]
state_before: 𝕜 : Type u_1
inst✝² : RCLike 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
h₁ : normSq 4 = 16
h₂ : ‖x + x‖ = 2 * ‖x‖
⊢ ‖x‖ ^ 2 =
    4 / 16 *
        (2 * ‖x‖ * (2 * ‖x‖) - 0 * 0 - 0 +
            ((0 * ‖I • x + x‖ - im I * 0) * ‖I • x + x‖ - (0 * 0 + im I * ‖I • x + x‖) * 0) -
          ((0 * ‖I • x - x‖ - im I * 0) * ‖I • x - x‖ - (0 * 0 + im I * ‖I • x - x‖) * 0)) -
      -0 / 16 *
        (2 * ‖x‖ * 0 + 0 * (2 * ‖x‖) - (0 * 0 + 0 * 0) +
            ((0 * ‖I • x + x‖ - im I * 0) * 0 + (0 * 0 + im I * ‖I • x + x‖) * ‖I • x + x‖) -
          ((0 * ‖I • x - x‖ - im I * 0) * 0 + (0 * 0 + im I * ‖I • x - x‖) * ‖I • x - x‖))
state_after: no goals
tactic: ring