Theorem: EuclideanGeometry.mul_dist_le_mul_dist_add_mul_dist
File: Mathlib/Geometry/Euclidean/Inversion.lean

tactic: rcases eq_or_ne b a with (rfl | hb)
state_before: V : Type ?u.37918
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a✝ b✝ c✝ d✝ x y z : P
R : ℝ
a b c d : P
⊢ dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d

tactic: rcases eq_or_ne c a with (rfl | hc)
state_before: case inr
V : Type ?u.37918
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a✝ b✝ c✝ d✝ x y z : P
R : ℝ
a b c d : P
hb : b ≠ a
⊢ dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d

tactic: rcases eq_or_ne d a with (rfl | hd)
state_before: case inr.inr
V : Type ?u.37918
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a✝ b✝ c✝ d✝ x y z : P
R : ℝ
a b c d : P
hb : b ≠ a
hc : c ≠ a
⊢ dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d

tactic: have H := dist_triangle (inversion a 1 b) (inversion a 1 c) (inversion a 1 d)
state_before: case inr.inr.inr
V : Type ?u.37918
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a✝ b✝ c✝ d✝ x y z : P
R : ℝ
a b c d : P
hb : b ≠ a
hc : c ≠ a
hd : d ≠ a
⊢ dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d

tactic: rw [dist_inversion_inversion hb hd, dist_inversion_inversion hb hc,
  dist_inversion_inversion hc hd, one_pow] at H
state_before: case inr.inr.inr
V : Type ?u.37918
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a✝ b✝ c✝ d✝ x y z : P
R : ℝ
a b c d : P
hb : b ≠ a
hc : c ≠ a
hd : d ≠ a
H :
  dist (inversion a 1 b) (inversion a 1 d) ≤
    dist (inversion a 1 b) (inversion a 1 c) + dist (inversion a 1 c) (inversion a 1 d)
⊢ dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d

tactic: rw [← dist_pos] at hb hc hd
state_before: case inr.inr.inr
V : Type ?u.37918
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a✝ b✝ c✝ d✝ x y z : P
R : ℝ
a b c d : P
hb : b ≠ a
hc : c ≠ a
hd : d ≠ a
H : 1 / (dist b a * dist d a) * dist b d ≤ 1 / (dist b a * dist c a) * dist b c + 1 / (dist c a * dist d a) * dist c d
⊢ dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d

tactic: rw [← div_le_div_right (mul_pos hb (mul_pos hc hd))]
state_before: case inr.inr.inr
V : Type ?u.37918
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a✝ b✝ c✝ d✝ x y z : P
R : ℝ
a b c d : P
hb✝ : b ≠ a
hb : 0 < dist b a
hc✝ : c ≠ a
hc : 0 < dist c a
hd✝ : d ≠ a
hd : 0 < dist d a
H : 1 / (dist b a * dist d a) * dist b d ≤ 1 / (dist b a * dist c a) * dist b c + 1 / (dist c a * dist d a) * dist c d
⊢ dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d

tactic: convert H using 1 <;> (field_simp [hb.ne', hc.ne', hd.ne', dist_comm a]; ring)
state_before: case inr.inr.inr
V : Type ?u.37918
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a✝ b✝ c✝ d✝ x y z : P
R : ℝ
a b c d : P
hb✝ : b ≠ a
hb : 0 < dist b a
hc✝ : c ≠ a
hc : 0 < dist c a
hd✝ : d ≠ a
hd : 0 < dist d a
H : 1 / (dist b a * dist d a) * dist b d ≤ 1 / (dist b a * dist c a) * dist b c + 1 / (dist c a * dist d a) * dist c d
⊢ dist a c * dist b d / (dist b a * (dist c a * dist d a)) ≤
    (dist a b * dist c d + dist b c * dist a d) / (dist b a * (dist c a * dist d a))

tactic: rw [dist_self, MulZeroClass.zero_mul, zero_add]
state_before: case inl
V : Type ?u.37918
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b✝ c✝ d✝ x y z : P
R : ℝ
b c d : P
⊢ dist b c * dist b d ≤ dist b b * dist c d + dist b c * dist b d

tactic: rw [dist_self, MulZeroClass.zero_mul]
state_before: case inr.inl
V : Type ?u.37918
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b✝ c✝ d✝ x y z : P
R : ℝ
b c d : P
hb : b ≠ c
⊢ dist c c * dist b d ≤ dist c b * dist c d + dist b c * dist c d

tactic: apply_rules [add_nonneg, mul_nonneg, dist_nonneg]
state_before: case inr.inl
V : Type ?u.37918
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b✝ c✝ d✝ x y z : P
R : ℝ
b c d : P
hb : b ≠ c
⊢ 0 ≤ dist c b * dist c d + dist b c * dist c d

tactic: rw [dist_self, MulZeroClass.mul_zero, add_zero, dist_comm d, dist_comm d, mul_comm]
state_before: case inr.inr.inl
V : Type ?u.37918
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b✝ c✝ d✝ x y z : P
R : ℝ
b c d : P
hb : b ≠ d
hc : c ≠ d
⊢ dist d c * dist b d ≤ dist d b * dist c d + dist b c * dist d d

tactic: field_simp [hb.ne', hc.ne', hd.ne', dist_comm a]
state_before: case h.e'_4
V : Type ?u.37918
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a✝ b✝ c✝ d✝ x y z : P
R : ℝ
a b c d : P
hb✝ : b ≠ a
hb : 0 < dist b a
hc✝ : c ≠ a
hc : 0 < dist c a
hd✝ : d ≠ a
hd : 0 < dist d a
H : 1 / (dist b a * dist d a) * dist b d ≤ 1 / (dist b a * dist c a) * dist b c + 1 / (dist c a * dist d a) * dist c d
⊢ (dist a b * dist c d + dist b c * dist a d) / (dist b a * (dist c a * dist d a)) =
    1 / (dist b a * dist c a) * dist b c + 1 / (dist c a * dist d a) * dist c d

tactic: ring
state_before: case h.e'_4
V : Type ?u.37918
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a✝ b✝ c✝ d✝ x y z : P
R : ℝ
a b c d : P
hb✝ : b ≠ a
hb : 0 < dist b a
hc✝ : c ≠ a
hc : 0 < dist c a
hd✝ : d ≠ a
hd : 0 < dist d a
H : 1 / (dist b a * dist d a) * dist b d ≤ 1 / (dist b a * dist c a) * dist b c + 1 / (dist c a * dist d a) * dist c d
⊢ (dist b a * dist c d + dist b c * dist d a) * (dist b a * dist c a * (dist c a * dist d a)) =
    (dist b c * (dist c a * dist d a) + dist c d * (dist b a * dist c a)) * (dist b a * (dist c a * dist d a))