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‖) = √(⟪x, x⟫_ℝ * ⟪y, y⟫_ℝ - ⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ)
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
⊢ sin (arccos (⟪x, y⟫_ℝ / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖) = √(⟪x, x⟫_ℝ * ⟪y, y⟫_ℝ - ⟪x, y⟫_ℝ * ⟪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 (⟪x, y⟫_ℝ / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖) = √(⟪x, x⟫_ℝ * ⟪y, y⟫_ℝ - ⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ)
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
⊢ √((1 - ⟪x, y⟫_ℝ / (‖x‖ * ‖y‖) * (⟪x, y⟫_ℝ / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖ * (‖x‖ * ‖y‖))) =
    √(‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - ⟪x, y⟫_ℝ * ⟪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
⊢ √((1 - ⟪x, y⟫_ℝ / (‖x‖ * ‖y‖) * (⟪x, y⟫_ℝ / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖ * (‖x‖ * ‖y‖))) =
    √(‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - ⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ)
state_after: case pos
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : ‖x‖ * ‖y‖ = 0
⊢ √((1 - ⟪x, y⟫_ℝ / (‖x‖ * ‖y‖) * (⟪x, y⟫_ℝ / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖ * (‖x‖ * ‖y‖))) =
    √(‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - ⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ)

case neg
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : ¬‖x‖ * ‖y‖ = 0
⊢ √((1 - ⟪x, y⟫_ℝ / (‖x‖ * ‖y‖) * (⟪x, y⟫_ℝ / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖ * (‖x‖ * ‖y‖))) =
    √(‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - ⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ)

tactic: rw [show ‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) = ‖x‖ * ‖y‖ * (‖x‖ * ‖y‖) by ring, h, mul_zero,
  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
⊢ √((1 - ⟪x, y⟫_ℝ / (‖x‖ * ‖y‖) * (⟪x, y⟫_ℝ / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖ * (‖x‖ * ‖y‖))) =
    √(‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - ⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ)
state_after: case pos
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : ‖x‖ * ‖y‖ = 0
⊢ √0 = √(-(⟪x, y⟫_ℝ * ⟪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
⊢ √0 = √(-(⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ))
state_after: 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
⊢ √0 = √(-(⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ))

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
⊢ √0 = √(-(⟪x, y⟫_ℝ * ⟪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‖)
state_after: no goals

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
⊢ √0 = √(-(⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ))
state_after: 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
⊢ √0 = √(-(⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ))

tactic: rw [hx, inner_zero_left, 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
⊢ √0 = √(-(⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ))
state_after: no goals

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
⊢ √0 = √(-(⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ))
state_after: 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
⊢ √0 = √(-(⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ))

tactic: rw [hy, inner_zero_right, 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
⊢ √0 = √(-(⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ))
state_after: no goals

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
⊢ √((1 - ⟪x, y⟫_ℝ / (‖x‖ * ‖y‖) * (⟪x, y⟫_ℝ / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖ * (‖x‖ * ‖y‖))) =
    √(‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - ⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ)
state_after: case neg
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : ¬‖x‖ * ‖y‖ = 0
⊢ √(‖x‖ * ‖y‖ * (‖x‖ * ‖y‖) - ⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ) = √(‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - ⟪x, y⟫_ℝ * ⟪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
⊢ √(‖x‖ * ‖y‖ * (‖x‖ * ‖y‖) - ⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ) = √(‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - ⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ)
state_after: no goals