-- Mathlib/Geometry/Euclidean/Circumcenter.lean
theorem circumcenter_eq_of_range_eq {n : ℕ} {s₁ s₂ : Simplex ℝ P n}
    (h : Set.range s₁.points = Set.range s₂.points) : s₁.circumcenter = s₂.circumcenter

Proof state:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s₁ s₂ : Simplex ℝ P n
h : Set.range s₁.points = Set.range s₂.points
hs : s₁.circumcenter ∈ affineSpan ℝ (Set.range s₂.points)
i : Fin (n + 1)
hi : s₂.points i ∈ Set.range s₂.points
⊢ dist (s₂.points i) s₁.circumcenter = s₁.circumradius

Tactic:
rw [← h, Set.mem_range] at hi

Result:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s₁ s₂ : Simplex ℝ P n
h : Set.range s₁.points = Set.range s₂.points
hs : s₁.circumcenter ∈ affineSpan ℝ (Set.range s₂.points)
i : Fin (n + 1)
hi : ∃ y, s₁.points y = s₂.points i
⊢ dist (s₂.points i) s₁.circumcenter = s₁.circumradius

Proof state:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s₁ s₂ : Simplex ℝ P n
h : Set.range s₁.points = Set.range s₂.points
hs : s₁.circumcenter ∈ affineSpan ℝ (Set.range s₂.points)
⊢ s₁.circumcenter = s₂.circumcenter

Tactic:
have hr : ∀ i, dist (s₂.points i) s₁.circumcenter = s₁.circumradius := by
  intro i
  have hi : s₂.points i ∈ Set.range s₂.points := Set.mem_range_self _
  rw [← h, Set.mem_range] at hi
  rcases hi with ⟨j, hj⟩
  rw [← hj, s₁.dist_circumcenter_eq_circumradius j]

Result:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s₁ s₂ : Simplex ℝ P n
h : Set.range s₁.points = Set.range s₂.points
hs : s₁.circumcenter ∈ affineSpan ℝ (Set.range s₂.points)
hr : ∀ (i : Fin (n + 1)), dist (s₂.points i) s₁.circumcenter = s₁.circumradius
⊢ s₁.circumcenter = s₂.circumcenter

Proof state:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s₁ s₂ : Simplex ℝ P n
h : Set.range s₁.points = Set.range s₂.points
hs : s₁.circumcenter ∈ affineSpan ℝ (Set.range s₂.points)
⊢ ∀ (i : Fin (n + 1)), dist (s₂.points i) s₁.circumcenter = s₁.circumradius

Tactic:
intro i

Result:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s₁ s₂ : Simplex ℝ P n
h : Set.range s₁.points = Set.range s₂.points
hs : s₁.circumcenter ∈ affineSpan ℝ (Set.range s₂.points)
i : Fin (n + 1)
⊢ dist (s₂.points i) s₁.circumcenter = s₁.circumradius

Proof state:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s₁ s₂ : Simplex ℝ P n
h : Set.range s₁.points = Set.range s₂.points
hs : s₁.circumcenter ∈ affineSpan ℝ (Set.range s₂.points)
i : Fin (n + 1)
⊢ dist (s₂.points i) s₁.circumcenter = s₁.circumradius

Tactic:
have hi : s₂.points i ∈ Set.range s₂.points := Set.mem_range_self _

Result:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s₁ s₂ : Simplex ℝ P n
h : Set.range s₁.points = Set.range s₂.points
hs : s₁.circumcenter ∈ affineSpan ℝ (Set.range s₂.points)
i : Fin (n + 1)
hi : s₂.points i ∈ Set.range s₂.points
⊢ dist (s₂.points i) s₁.circumcenter = s₁.circumradius

Proof state:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s₁ s₂ : Simplex ℝ P n
h : Set.range s₁.points = Set.range s₂.points
⊢ s₁.circumcenter = s₂.circumcenter

Tactic:
have hs : s₁.circumcenter ∈ affineSpan ℝ (Set.range s₂.points) :=
  h ▸ s₁.circumcenter_mem_affineSpan

Result:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s₁ s₂ : Simplex ℝ P n
h : Set.range s₁.points = Set.range s₂.points
hs : s₁.circumcenter ∈ affineSpan ℝ (Set.range s₂.points)
⊢ s₁.circumcenter = s₂.circumcenter

Proof state:
case intro
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s₁ s₂ : Simplex ℝ P n
h : Set.range s₁.points = Set.range s₂.points
hs : s₁.circumcenter ∈ affineSpan ℝ (Set.range s₂.points)
i j : Fin (n + 1)
hj : s₁.points j = s₂.points i
⊢ dist (s₂.points i) s₁.circumcenter = s₁.circumradius

Tactic:
rw [← hj, s₁.dist_circumcenter_eq_circumradius j]

Result:
no goals

Proof state:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s₁ s₂ : Simplex ℝ P n
h : Set.range s₁.points = Set.range s₂.points
hs : s₁.circumcenter ∈ affineSpan ℝ (Set.range s₂.points)
i : Fin (n + 1)
hi : ∃ y, s₁.points y = s₂.points i
⊢ dist (s₂.points i) s₁.circumcenter = s₁.circumradius

Tactic:
rcases hi with ⟨j, hj⟩

Result:
case intro
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s₁ s₂ : Simplex ℝ P n
h : Set.range s₁.points = Set.range s₂.points
hs : s₁.circumcenter ∈ affineSpan ℝ (Set.range s₂.points)
i j : Fin (n + 1)
hj : s₁.points j = s₂.points i
⊢ dist (s₂.points i) s₁.circumcenter = s₁.circumradius

Proof state:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s₁ s₂ : Simplex ℝ P n
h : Set.range s₁.points = Set.range s₂.points
hs : s₁.circumcenter ∈ affineSpan ℝ (Set.range s₂.points)
hr : ∀ (i : Fin (n + 1)), dist (s₂.points i) s₁.circumcenter = s₁.circumradius
⊢ s₁.circumcenter = s₂.circumcenter

Tactic:
exact s₂.eq_circumcenter_of_dist_eq hs hr

Result:
no goals