Theorem: Orientation.inner_mul_areaForm_sub'
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⟫_ℝ • o.areaForm a - (o.areaForm a) x • (innerₛₗ ℝ) a = ‖a‖ ^ 2 • o.areaForm 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⟫_ℝ • o.areaForm a - (o.areaForm a) x • (innerₛₗ ℝ) a = ‖a‖ ^ 2 • o.areaForm 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⟫_ℝ • o.areaForm a - (o.areaForm a) x • (innerₛₗ ℝ) a = ‖a‖ ^ 2 • o.areaForm 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⟫_ℝ • o.areaForm a - (o.areaForm a) x • (innerₛₗ ℝ) a = ‖a‖ ^ 2 • o.areaForm 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⟫_ℝ • o.areaForm a - (o.areaForm a) x • (innerₛₗ ℝ) a) ((o.basisRightAngleRotation a ha) i) =
      (‖a‖ ^ 2 • o.areaForm 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⟫_ℝ • o.areaForm a - (o.areaForm a) x • (innerₛₗ ℝ) a) ((o.basisRightAngleRotation a ha) i) =
      (‖a‖ ^ 2 • o.areaForm 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⟫_ℝ • o.areaForm a - (o.areaForm a) x • (innerₛₗ ℝ) a) ((o.basisRightAngleRotation a ha) i) =
    (‖a‖ ^ 2 • o.areaForm 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⟫_ℝ • o.areaForm a - (o.areaForm a) x • (innerₛₗ ℝ) a) ((o.basisRightAngleRotation a ha) i) =
    (‖a‖ ^ 2 • o.areaForm 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⟫_ℝ • o.areaForm a - (o.areaForm a) x • (innerₛₗ ℝ) a) ((o.basisRightAngleRotation a ha) ⟨0, ⋯⟩) =
    (‖a‖ ^ 2 • o.areaForm 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⟫_ℝ • o.areaForm a - (o.areaForm a) x • (innerₛₗ ℝ) a) ((o.basisRightAngleRotation a ha) ⟨1, ⋯⟩) =
    (‖a‖ ^ 2 • o.areaForm 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⟫_ℝ • o.areaForm a - (o.areaForm a) x • (innerₛₗ ℝ) a = ‖a‖ ^ 2 • o.areaForm x
state_after: no goals

tactic: simp only [o.areaForm_swap a x, neg_smul, sub_neg_eq_add, Fin.mk_zero,
  coe_basisRightAngleRotation, Matrix.cons_val_zero, LinearMap.add_apply, LinearMap.smul_apply,
  areaForm_apply_self, smul_eq_mul, mul_zero, innerₛₗ_apply, real_inner_self_eq_norm_sq,
  zero_add, Real.rpow_two]
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⟫_ℝ • o.areaForm a - (o.areaForm a) x • (innerₛₗ ℝ) a) ((o.basisRightAngleRotation a ha) ⟨0, ⋯⟩) =
    (‖a‖ ^ 2 • o.areaForm 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
⊢ (o.areaForm x) a * ‖a‖ ^ 2 = ‖a‖ ^ 2 * (o.areaForm x) a

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
⊢ (o.areaForm x) a * ‖a‖ ^ 2 = ‖a‖ ^ 2 * (o.areaForm x) a
state_after: no goals

tactic: simp only [Fin.mk_one, coe_basisRightAngleRotation, Matrix.cons_val_one, Matrix.head_cons,
  LinearMap.sub_apply, LinearMap.smul_apply, areaForm_rightAngleRotation_right,
  real_inner_self_eq_norm_sq, smul_eq_mul, innerₛₗ_apply, inner_rightAngleRotation_right,
  areaForm_apply_self, neg_zero, mul_zero, sub_zero, Real.rpow_two, real_inner_comm]
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⟫_ℝ • o.areaForm a - (o.areaForm a) x • (innerₛₗ ℝ) a) ((o.basisRightAngleRotation a ha) ⟨1, ⋯⟩) =
    (‖a‖ ^ 2 • o.areaForm 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
⊢ ⟪a, x⟫_ℝ * ‖a‖ ^ 2 = ‖a‖ ^ 2 * ⟪a, x⟫_ℝ

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
⊢ ⟪a, x⟫_ℝ * ‖a‖ ^ 2 = ‖a‖ ^ 2 * ⟪a, x⟫_ℝ
state_after: no goals