Theorem: InnerProductGeometry.sin_angle_mul_norm_mul_norm
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: unfold angle
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
⊢ sin (angle x y) * (‖x‖ * ‖y‖) = sqrt (inner x x * inner y y - inner x y * inner x y)

tactic: rw [Real.sin_arccos, ← Real.sqrt_mul_self (mul_nonneg (norm_nonneg x) (norm_nonneg y)),
  ← Real.sqrt_mul' _ (mul_self_nonneg _), sq,
  Real.sqrt_mul_self (mul_nonneg (norm_nonneg x) (norm_nonneg y)),
  real_inner_self_eq_norm_mul_norm, real_inner_self_eq_norm_mul_norm]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
⊢ sin (arccos (inner x y / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖) = sqrt (inner x x * inner y y - inner x y * inner x y)

tactic: by_cases h : ‖x‖ * ‖y‖ = 0
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
⊢ sqrt ((1 - inner x y / (‖x‖ * ‖y‖) * (inner x y / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖ * (‖x‖ * ‖y‖))) =
    sqrt (‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - inner x y * inner x y)

tactic: rw [show ‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) = ‖x‖ * ‖y‖ * (‖x‖ * ‖y‖) by ring, h, MulZeroClass.mul_zero,
  MulZeroClass.mul_zero, zero_sub]
state_before: case pos
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : ‖x‖ * ‖y‖ = 0
⊢ sqrt ((1 - inner x y / (‖x‖ * ‖y‖) * (inner x y / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖ * (‖x‖ * ‖y‖))) =
    sqrt (‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - inner x y * inner x y)

tactic: cases' eq_zero_or_eq_zero_of_mul_eq_zero h with hx hy
state_before: case pos
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : ‖x‖ * ‖y‖ = 0
⊢ sqrt 0 = sqrt (-(inner x y * inner x y))

tactic: ring
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : ‖x‖ * ‖y‖ = 0
⊢ ‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) = ‖x‖ * ‖y‖ * (‖x‖ * ‖y‖)

tactic: rw [norm_eq_zero] at hx
state_before: case pos.inl
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : ‖x‖ * ‖y‖ = 0
hx : ‖x‖ = 0
⊢ sqrt 0 = sqrt (-(inner x y * inner x y))

tactic: rw [hx, inner_zero_left, MulZeroClass.zero_mul, neg_zero]
state_before: case pos.inl
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : ‖x‖ * ‖y‖ = 0
hx : x = 0
⊢ sqrt 0 = sqrt (-(inner x y * inner x y))

tactic: rw [norm_eq_zero] at hy
state_before: case pos.inr
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : ‖x‖ * ‖y‖ = 0
hy : ‖y‖ = 0
⊢ sqrt 0 = sqrt (-(inner x y * inner x y))

tactic: rw [hy, inner_zero_right, MulZeroClass.zero_mul, neg_zero]
state_before: case pos.inr
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : ‖x‖ * ‖y‖ = 0
hy : y = 0
⊢ sqrt 0 = sqrt (-(inner x y * inner x y))

tactic: field_simp [h]
state_before: case neg
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : ¬‖x‖ * ‖y‖ = 0
⊢ sqrt ((1 - inner x y / (‖x‖ * ‖y‖) * (inner x y / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖ * (‖x‖ * ‖y‖))) =
    sqrt (‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - inner x y * inner x y)

tactic: ring_nf
state_before: case neg
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : ¬‖x‖ * ‖y‖ = 0
⊢ sqrt (‖x‖ * ‖y‖ * (‖x‖ * ‖y‖) - inner x y * inner x y) = sqrt (‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - inner x y * inner x y)