V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
⊢ dist a p * dist b p = abs (dist b q ^ 2 - dist p q ^ 2)
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
⊢ dist a p * dist b p = abs (dist b q ^ 2 - dist p q ^ 2)
let m : P := midpoint ℝ a b
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
⊢ dist a p * dist b p = abs (dist b q ^ 2 - dist p q ^ 2)
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
⊢ dist a p * dist b p = abs (dist b q ^ 2 - dist p q ^ 2)
have h1 := vsub_sub_vsub_cancel_left a p m
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
⊢ dist a p * dist b p = abs (dist b q ^ 2 - dist p q ^ 2)
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
⊢ dist a p * dist b p = abs (dist b q ^ 2 - dist p q ^ 2)
have h2 := vsub_sub_vsub_cancel_left p q m
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
h3 : m -ᵥ q - (m -ᵥ a) = a -ᵥ q
⊢ dist a p * dist b p = abs (dist b q ^ 2 - dist p q ^ 2)
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
⊢ dist a p * dist b p = abs (dist b q ^ 2 - dist p q ^ 2)
have h3 := vsub_sub_vsub_cancel_left a q m
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
h3 : m -ᵥ q - (m -ᵥ a) = a -ᵥ q
h : ∀ (r : P), b -ᵥ r = m -ᵥ r + (m -ᵥ a)
⊢ dist a p * dist b p = abs (dist b q ^ 2 - dist p q ^ 2)
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
h3 : m -ᵥ q - (m -ᵥ a) = a -ᵥ q
⊢ dist a p * dist b p = abs (dist b q ^ 2 - dist p q ^ 2)
have h : ∀ r, b -ᵥ r = m -ᵥ r + (m -ᵥ a) := fun r => by
  rw [midpoint_vsub_left, ← right_vsub_midpoint, add_comm, vsub_add_vsub_cancel]
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
h3 : m -ᵥ q - (m -ᵥ a) = a -ᵥ q
h : ∀ (r : P), b -ᵥ r = m -ᵥ r + (m -ᵥ a)
⊢ ‖a -ᵥ p‖ * ‖b -ᵥ p‖ = abs (‖b -ᵥ q‖ ^ 2 - ‖p -ᵥ q‖ ^ 2)
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
h3 : m -ᵥ q - (m -ᵥ a) = a -ᵥ q
h : ∀ (r : P), b -ᵥ r = m -ᵥ r + (m -ᵥ a)
⊢ dist a p * dist b p = abs (dist b q ^ 2 - dist p q ^ 2)
iterate 4 rw [dist_eq_norm_vsub V]
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
h3 : m -ᵥ q - (m -ᵥ a) = a -ᵥ q
h : ∀ (r : P), b -ᵥ r = m -ᵥ r + (m -ᵥ a)
⊢ ‖m -ᵥ p - (m -ᵥ a)‖ * ‖m -ᵥ p + (m -ᵥ a)‖ = abs (‖m -ᵥ q + (m -ᵥ a)‖ ^ 2 - ‖m -ᵥ q - (m -ᵥ p)‖ ^ 2)
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
h3 : m -ᵥ q - (m -ᵥ a) = a -ᵥ q
h : ∀ (r : P), b -ᵥ r = m -ᵥ r + (m -ᵥ a)
⊢ ‖a -ᵥ p‖ * ‖b -ᵥ p‖ = abs (‖b -ᵥ q‖ ^ 2 - ‖p -ᵥ q‖ ^ 2)
rw [← h1, ← h2, h, h]
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hq : dist a q = dist b q
m : P := midpoint ℝ a b
hp : ∃ k, k ≠ 1 ∧ m -ᵥ p + (m -ᵥ a) = k • (m -ᵥ p - (m -ᵥ a))
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
h3 : m -ᵥ q - (m -ᵥ a) = a -ᵥ q
h : ∀ (r : P), b -ᵥ r = m -ᵥ r + (m -ᵥ a)
⊢ ‖m -ᵥ p - (m -ᵥ a)‖ * ‖m -ᵥ p + (m -ᵥ a)‖ = abs (‖m -ᵥ q + (m -ᵥ a)‖ ^ 2 - ‖m -ᵥ q - (m -ᵥ p)‖ ^ 2)
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
h3 : m -ᵥ q - (m -ᵥ a) = a -ᵥ q
h : ∀ (r : P), b -ᵥ r = m -ᵥ r + (m -ᵥ a)
⊢ ‖m -ᵥ p - (m -ᵥ a)‖ * ‖m -ᵥ p + (m -ᵥ a)‖ = abs (‖m -ᵥ q + (m -ᵥ a)‖ ^ 2 - ‖m -ᵥ q - (m -ᵥ p)‖ ^ 2)
rw [← h1, h] at hp
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
m : P := midpoint ℝ a b
hq : ‖m -ᵥ q - (m -ᵥ a)‖ = ‖m -ᵥ q + (m -ᵥ a)‖
hp : ∃ k, k ≠ 1 ∧ m -ᵥ p + (m -ᵥ a) = k • (m -ᵥ p - (m -ᵥ a))
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
h3 : m -ᵥ q - (m -ᵥ a) = a -ᵥ q
h : ∀ (r : P), b -ᵥ r = m -ᵥ r + (m -ᵥ a)
⊢ ‖m -ᵥ p - (m -ᵥ a)‖ * ‖m -ᵥ p + (m -ᵥ a)‖ = abs (‖m -ᵥ q + (m -ᵥ a)‖ ^ 2 - ‖m -ᵥ q - (m -ᵥ p)‖ ^ 2)
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hq : dist a q = dist b q
m : P := midpoint ℝ a b
hp : ∃ k, k ≠ 1 ∧ m -ᵥ p + (m -ᵥ a) = k • (m -ᵥ p - (m -ᵥ a))
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
h3 : m -ᵥ q - (m -ᵥ a) = a -ᵥ q
h : ∀ (r : P), b -ᵥ r = m -ᵥ r + (m -ᵥ a)
⊢ ‖m -ᵥ p - (m -ᵥ a)‖ * ‖m -ᵥ p + (m -ᵥ a)‖ = abs (‖m -ᵥ q + (m -ᵥ a)‖ ^ 2 - ‖m -ᵥ q - (m -ᵥ p)‖ ^ 2)
rw [dist_eq_norm_vsub V a q, dist_eq_norm_vsub V b q, ← h3, h] at hq
no goals
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
m : P := midpoint ℝ a b
hq : ‖m -ᵥ q - (m -ᵥ a)‖ = ‖m -ᵥ q + (m -ᵥ a)‖
hp : ∃ k, k ≠ 1 ∧ m -ᵥ p + (m -ᵥ a) = k • (m -ᵥ p - (m -ᵥ a))
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
h3 : m -ᵥ q - (m -ᵥ a) = a -ᵥ q
h : ∀ (r : P), b -ᵥ r = m -ᵥ r + (m -ᵥ a)
⊢ ‖m -ᵥ p - (m -ᵥ a)‖ * ‖m -ᵥ p + (m -ᵥ a)‖ = abs (‖m -ᵥ q + (m -ᵥ a)‖ ^ 2 - ‖m -ᵥ q - (m -ᵥ p)‖ ^ 2)
exact mul_norm_eq_abs_sub_sq_norm hp hq
no goals
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
h3 : m -ᵥ q - (m -ᵥ a) = a -ᵥ q
r : P
⊢ b -ᵥ r = m -ᵥ r + (m -ᵥ a)
rw [midpoint_vsub_left, ← right_vsub_midpoint, add_comm, vsub_add_vsub_cancel]
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
h3 : m -ᵥ q - (m -ᵥ a) = a -ᵥ q
h : ∀ (r : P), b -ᵥ r = m -ᵥ r + (m -ᵥ a)
⊢ ‖a -ᵥ p‖ * ‖b -ᵥ p‖ = abs (‖b -ᵥ q‖ ^ 2 - ‖p -ᵥ q‖ ^ 2)
V : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_2
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b p q : P
hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p)
hq : dist a q = dist b q
m : P := midpoint ℝ a b
h1 : m -ᵥ p - (m -ᵥ a) = a -ᵥ p
h2 : m -ᵥ q - (m -ᵥ p) = p -ᵥ q
h3 : m -ᵥ q - (m -ᵥ a) = a -ᵥ q
h : ∀ (r : P), b -ᵥ r = m -ᵥ r + (m -ᵥ a)
⊢ ‖a -ᵥ p‖ * ‖b -ᵥ p‖ = abs (‖b -ᵥ q‖ ^ 2 - dist p q ^ 2)
rw [dist_eq_norm_vsub V]