Theorem: Orientation.inner_mul_inner_add_areaForm_mul_areaForm'
File: Mathlib/Analysis/InnerProductSpace/TwoDim.lean

tactic: by_cases ha : a = 0
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
⊢ ⟪a, x⟫_ℝ • (innerₛₗ ℝ) a + (o.areaForm a) x • o.areaForm a = ‖a‖ ^ 2 • (innerₛₗ ℝ) x
state_after: case pos
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : a = 0
⊢ ⟪a, x⟫_ℝ • (innerₛₗ ℝ) a + (o.areaForm a) x • o.areaForm a = ‖a‖ ^ 2 • (innerₛₗ ℝ) x

case neg
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
⊢ ⟪a, x⟫_ℝ • (innerₛₗ ℝ) a + (o.areaForm a) x • o.areaForm a = ‖a‖ ^ 2 • (innerₛₗ ℝ) x

tactic: apply (o.basisRightAngleRotation a ha).ext
state_before: case neg
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
⊢ ⟪a, x⟫_ℝ • (innerₛₗ ℝ) a + (o.areaForm a) x • o.areaForm a = ‖a‖ ^ 2 • (innerₛₗ ℝ) x
state_after: case neg
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
⊢ ∀ (i : Fin 2),
    (⟪a, x⟫_ℝ • (innerₛₗ ℝ) a + (o.areaForm a) x • o.areaForm a) ((o.basisRightAngleRotation a ha) i) =
      (‖a‖ ^ 2 • (innerₛₗ ℝ) x) ((o.basisRightAngleRotation a ha) i)

tactic: intro i
state_before: case neg
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
⊢ ∀ (i : Fin 2),
    (⟪a, x⟫_ℝ • (innerₛₗ ℝ) a + (o.areaForm a) x • o.areaForm a) ((o.basisRightAngleRotation a ha) i) =
      (‖a‖ ^ 2 • (innerₛₗ ℝ) x) ((o.basisRightAngleRotation a ha) i)
state_after: case neg
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
i : Fin 2
⊢ (⟪a, x⟫_ℝ • (innerₛₗ ℝ) a + (o.areaForm a) x • o.areaForm a) ((o.basisRightAngleRotation a ha) i) =
    (‖a‖ ^ 2 • (innerₛₗ ℝ) x) ((o.basisRightAngleRotation a ha) i)

tactic: fin_cases i
state_before: case neg
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
i : Fin 2
⊢ (⟪a, x⟫_ℝ • (innerₛₗ ℝ) a + (o.areaForm a) x • o.areaForm a) ((o.basisRightAngleRotation a ha) i) =
    (‖a‖ ^ 2 • (innerₛₗ ℝ) x) ((o.basisRightAngleRotation a ha) i)
state_after: case neg.head
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
⊢ (⟪a, x⟫_ℝ • (innerₛₗ ℝ) a + (o.areaForm a) x • o.areaForm a) ((o.basisRightAngleRotation a ha) ⟨0, ⋯⟩) =
    (‖a‖ ^ 2 • (innerₛₗ ℝ) x) ((o.basisRightAngleRotation a ha) ⟨0, ⋯⟩)

case neg.tail.head
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
⊢ (⟪a, x⟫_ℝ • (innerₛₗ ℝ) a + (o.areaForm a) x • o.areaForm a) ((o.basisRightAngleRotation a ha) ⟨1, ⋯⟩) =
    (‖a‖ ^ 2 • (innerₛₗ ℝ) x) ((o.basisRightAngleRotation a ha) ⟨1, ⋯⟩)

tactic: simp [ha]
state_before: case pos
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : a = 0
⊢ ⟪a, x⟫_ℝ • (innerₛₗ ℝ) a + (o.areaForm a) x • o.areaForm a = ‖a‖ ^ 2 • (innerₛₗ ℝ) x
state_after: no goals

tactic: simp only [Fin.mk_zero, coe_basisRightAngleRotation, Matrix.cons_val_zero, LinearMap.add_apply,
  LinearMap.smul_apply, innerₛₗ_apply, real_inner_self_eq_norm_sq, smul_eq_mul,
  areaForm_apply_self, mul_zero, add_zero, Real.rpow_two, real_inner_comm]
state_before: case neg.head
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
⊢ (⟪a, x⟫_ℝ • (innerₛₗ ℝ) a + (o.areaForm a) x • o.areaForm a) ((o.basisRightAngleRotation a ha) ⟨0, ⋯⟩) =
    (‖a‖ ^ 2 • (innerₛₗ ℝ) x) ((o.basisRightAngleRotation a ha) ⟨0, ⋯⟩)
state_after: case neg.head
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
⊢ ⟪a, x⟫_ℝ * ‖a‖ ^ 2 = ‖a‖ ^ 2 * ⟪a, x⟫_ℝ

tactic: ring
state_before: case neg.head
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
⊢ ⟪a, x⟫_ℝ * ‖a‖ ^ 2 = ‖a‖ ^ 2 * ⟪a, x⟫_ℝ
state_after: no goals

tactic: simp only [Fin.mk_one, coe_basisRightAngleRotation, Matrix.cons_val_one, Matrix.head_cons,
  LinearMap.add_apply, LinearMap.smul_apply, innerₛₗ_apply, inner_rightAngleRotation_right,
  areaForm_apply_self, neg_zero, smul_eq_mul, mul_zero, areaForm_rightAngleRotation_right,
  real_inner_self_eq_norm_sq, zero_add, Real.rpow_two, mul_neg]
state_before: case neg.tail.head
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
⊢ (⟪a, x⟫_ℝ • (innerₛₗ ℝ) a + (o.areaForm a) x • o.areaForm a) ((o.basisRightAngleRotation a ha) ⟨1, ⋯⟩) =
    (‖a‖ ^ 2 • (innerₛₗ ℝ) x) ((o.basisRightAngleRotation a ha) ⟨1, ⋯⟩)
state_after: case neg.tail.head
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
⊢ (o.areaForm a) x * ‖a‖ ^ 2 = -(‖a‖ ^ 2 * (o.areaForm x) a)

tactic: rw [o.areaForm_swap]
state_before: case neg.tail.head
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
⊢ (o.areaForm a) x * ‖a‖ ^ 2 = -(‖a‖ ^ 2 * (o.areaForm x) a)
state_after: case neg.tail.head
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
⊢ -(o.areaForm x) a * ‖a‖ ^ 2 = -(‖a‖ ^ 2 * (o.areaForm x) a)

tactic: ring
state_before: case neg.tail.head
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
a x : E
ha : ¬a = 0
⊢ -(o.areaForm x) a * ‖a‖ ^ 2 = -(‖a‖ ^ 2 * (o.areaForm x) a)
state_after: no goals