-- Mathlib/Geometry/Euclidean/Circumcenter.lean
theorem eq_circumradius_of_dist_eq {n : ℕ} (s : Simplex ℝ P n) {p : P}
    (hp : p ∈ affineSpan ℝ (Set.range s.points)) {r : ℝ} (hr : ∀ i, dist (s.points i) p = r) :
    r = 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 : Simplex ℝ P n
p : P
hp : p ∈ affineSpan ℝ (Set.range s.points)
r : ℝ
hr : ∀ (i : Fin (n + 1)), dist (s.points i) p = r
⊢ r = s.circumradius

Tactic:
have h := s.circumsphere_unique_dist_eq.2 ⟨p, r⟩

Result:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s : Simplex ℝ P n
p : P
hp : p ∈ affineSpan ℝ (Set.range s.points)
r : ℝ
hr : ∀ (i : Fin (n + 1)), dist (s.points i) p = r
h :
  { center := p, radius := r }.center ∈ affineSpan ℝ (Set.range s.points) ∧
      Set.range s.points ⊆ Metric.sphere { center := p, radius := r }.center { center := p, radius := r }.radius →
    { center := p, radius := r } = s.circumsphere
⊢ r = 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 : Simplex ℝ P n
p : P
hp : p ∈ affineSpan ℝ (Set.range s.points)
r : ℝ
hr : ∀ (i : Fin (n + 1)), dist (s.points i) p = r
h : True ∧ Set.range s.points ⊆ Metric.sphere p r → p = s.circumsphere.center ∧ r = s.circumsphere.radius
⊢ r = s.circumradius

Tactic:
rw [subset_sphere (s := ⟨p, r⟩)] at h

Result:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s : Simplex ℝ P n
p : P
hp : p ∈ affineSpan ℝ (Set.range s.points)
r : ℝ
hr : ∀ (i : Fin (n + 1)), dist (s.points i) p = r
h :
  (True ∧ ∀ p_1 ∈ Set.range s.points, p_1 ∈ { center := p, radius := r }) →
    p = s.circumsphere.center ∧ r = s.circumsphere.radius
⊢ r = 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 : Simplex ℝ P n
p : P
hp : p ∈ affineSpan ℝ (Set.range s.points)
r : ℝ
hr : ∀ (i : Fin (n + 1)), dist (s.points i) p = r
h : p = s.circumsphere.center ∧ r = s.circumsphere.radius
⊢ r = s.circumradius

Tactic:
exact h.2

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 : Simplex ℝ P n
p : P
hp : p ∈ affineSpan ℝ (Set.range s.points)
r : ℝ
hr : ∀ (i : Fin (n + 1)), dist (s.points i) p = r
h :
  (True ∧ ∀ p_1 ∈ Set.range s.points, p_1 ∈ { center := p, radius := r }) →
    p = s.circumsphere.center ∧ r = s.circumsphere.radius
⊢ r = s.circumradius

Tactic:
simp only [hp, hr, forall_const, eq_self_iff_true, subset_sphere, Sphere.ext_iff,
  Set.forall_mem_range, mem_sphere, true_and] at h

Result:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s : Simplex ℝ P n
p : P
hp : p ∈ affineSpan ℝ (Set.range s.points)
r : ℝ
hr : ∀ (i : Fin (n + 1)), dist (s.points i) p = r
h : p = s.circumsphere.center ∧ r = s.circumsphere.radius
⊢ r = 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 : Simplex ℝ P n
p : P
hp : p ∈ affineSpan ℝ (Set.range s.points)
r : ℝ
hr : ∀ (i : Fin (n + 1)), dist (s.points i) p = r
h :
  { center := p, radius := r }.center ∈ affineSpan ℝ (Set.range s.points) ∧
      Set.range s.points ⊆ Metric.sphere { center := p, radius := r }.center { center := p, radius := r }.radius →
    { center := p, radius := r } = s.circumsphere
⊢ r = s.circumradius

Tactic:
simp only [hp, hr, forall_const, eq_self_iff_true, subset_sphere, Sphere.ext_iff,
  Set.forall_mem_range, mem_sphere] at h

Result:
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
s : Simplex ℝ P n
p : P
hp : p ∈ affineSpan ℝ (Set.range s.points)
r : ℝ
hr : ∀ (i : Fin (n + 1)), dist (s.points i) p = r
h : True ∧ Set.range s.points ⊆ Metric.sphere p r → p = s.circumsphere.center ∧ r = s.circumsphere.radius
⊢ r = s.circumradius