Theorem: Affine.Triangle.dist_orthocenter_reflection_circumcenter
File: Mathlib/Geometry/Euclidean/MongePoint.lean

tactic: rw [← mul_self_inj_of_nonneg dist_nonneg t.circumradius_nonneg,
  t.reflection_circumcenter_eq_affineCombination_of_pointsWithCircumcenter h,
  t.orthocenter_eq_mongePoint, mongePoint_eq_affineCombination_of_pointsWithCircumcenter,
  dist_affineCombination t.pointsWithCircumcenter (sum_mongePointWeightsWithCircumcenter _)
    (sum_reflectionCircumcenterWeightsWithCircumcenter h)]
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h : i₁ ≠ i₂
⊢ dist t.orthocenter ((EuclideanGeometry.reflection (affineSpan ℝ (t.points '' {i₁, i₂}))) (circumcenter t)) =
    circumradius t
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h : i₁ ≠ i₂
⊢ (-∑ i₁_1 : PointsWithCircumcenterIndex 2,
          ∑ i₂_1 : PointsWithCircumcenterIndex 2,
            (mongePointWeightsWithCircumcenter 0 - reflectionCircumcenterWeightsWithCircumcenter i₁ i₂) i₁_1 *
                (mongePointWeightsWithCircumcenter 0 - reflectionCircumcenterWeightsWithCircumcenter i₁ i₂) i₂_1 *
              (dist (pointsWithCircumcenter t i₁_1) (pointsWithCircumcenter t i₂_1) *
                dist (pointsWithCircumcenter t i₁_1) (pointsWithCircumcenter t i₂_1))) /
      2 =
    circumradius t * circumradius t

tactic: simp_rw [sum_pointsWithCircumcenter, Pi.sub_apply, mongePointWeightsWithCircumcenter,
  reflectionCircumcenterWeightsWithCircumcenter]
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h : i₁ ≠ i₂
⊢ (-∑ i₁_1 : PointsWithCircumcenterIndex 2,
          ∑ i₂_1 : PointsWithCircumcenterIndex 2,
            (mongePointWeightsWithCircumcenter 0 - reflectionCircumcenterWeightsWithCircumcenter i₁ i₂) i₁_1 *
                (mongePointWeightsWithCircumcenter 0 - reflectionCircumcenterWeightsWithCircumcenter i₁ i₂) i₂_1 *
              (dist (pointsWithCircumcenter t i₁_1) (pointsWithCircumcenter t i₂_1) *
                dist (pointsWithCircumcenter t i₁_1) (pointsWithCircumcenter t i₂_1))) /
      2 =
    circumradius t * circumradius t
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h : i₁ ≠ i₂
⊢ -(∑ x : Fin (0 + 2 + 1),
            (∑ x_1 : Fin (0 + 2 + 1),
                ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    ((↑(0 + 1))⁻¹ - if x_1 = i₁ ∨ x_1 = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1)) *
                    dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1))) +
              ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) * (-2 / ↑(0 + 1) - -1) *
                (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                  dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex))) +
          (∑ x : Fin (0 + 2 + 1),
              (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                    (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                  dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                    (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
            (-2 / ↑(0 + 1) - -1) * (-2 / ↑(0 + 1) - -1) *
              (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)))) /
      2 =
    circumradius t * circumradius t

tactic: have hu : ({i₁, i₂} : Finset (Fin 3)) ⊆ univ := subset_univ _
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h : i₁ ≠ i₂
⊢ -(∑ x : Fin (0 + 2 + 1),
            (∑ x_1 : Fin (0 + 2 + 1),
                ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    ((↑(0 + 1))⁻¹ - if x_1 = i₁ ∨ x_1 = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1)) *
                    dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1))) +
              ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) * (-2 / ↑(0 + 1) - -1) *
                (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                  dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex))) +
          (∑ x : Fin (0 + 2 + 1),
              (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                    (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                  dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                    (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
            (-2 / ↑(0 + 1) - -1) * (-2 / ↑(0 + 1) - -1) *
              (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)))) /
      2 =
    circumradius t * circumradius t
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h : i₁ ≠ i₂
hu : {i₁, i₂} ⊆ univ
⊢ -(∑ x : Fin (0 + 2 + 1),
            (∑ x_1 : Fin (0 + 2 + 1),
                ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    ((↑(0 + 1))⁻¹ - if x_1 = i₁ ∨ x_1 = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1)) *
                    dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1))) +
              ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) * (-2 / ↑(0 + 1) - -1) *
                (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                  dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex))) +
          (∑ x : Fin (0 + 2 + 1),
              (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                    (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                  dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                    (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
            (-2 / ↑(0 + 1) - -1) * (-2 / ↑(0 + 1) - -1) *
              (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)))) /
      2 =
    circumradius t * circumradius t

tactic: obtain ⟨i₃, hi₃, hi₃₁, hi₃₂⟩ :
    ∃ i₃, univ \ ({i₁, i₂} : Finset (Fin 3)) = {i₃} ∧ i₃ ≠ i₁ ∧ i₃ ≠ i₂ := by
  fin_cases i₁ <;> fin_cases i₂ <;> simp at h <;> decide
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h : i₁ ≠ i₂
hu : {i₁, i₂} ⊆ univ
⊢ -(∑ x : Fin (0 + 2 + 1),
            (∑ x_1 : Fin (0 + 2 + 1),
                ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    ((↑(0 + 1))⁻¹ - if x_1 = i₁ ∨ x_1 = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1)) *
                    dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1))) +
              ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) * (-2 / ↑(0 + 1) - -1) *
                (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                  dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex))) +
          (∑ x : Fin (0 + 2 + 1),
              (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                    (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                  dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                    (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
            (-2 / ↑(0 + 1) - -1) * (-2 / ↑(0 + 1) - -1) *
              (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)))) /
      2 =
    circumradius t * circumradius t
state_after: case intro.intro.intro
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h : i₁ ≠ i₂
hu : {i₁, i₂} ⊆ univ
i₃ : Fin 3
hi₃ : univ \ {i₁, i₂} = {i₃}
hi₃₁ : i₃ ≠ i₁
hi₃₂ : i₃ ≠ i₂
⊢ -(∑ x : Fin (0 + 2 + 1),
            (∑ x_1 : Fin (0 + 2 + 1),
                ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    ((↑(0 + 1))⁻¹ - if x_1 = i₁ ∨ x_1 = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1)) *
                    dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1))) +
              ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) * (-2 / ↑(0 + 1) - -1) *
                (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                  dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex))) +
          (∑ x : Fin (0 + 2 + 1),
              (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                    (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                  dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                    (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
            (-2 / ↑(0 + 1) - -1) * (-2 / ↑(0 + 1) - -1) *
              (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)))) /
      2 =
    circumradius t * circumradius t

tactic: rw [← sum_sdiff hu, ← sum_sdiff hu, hi₃, sum_singleton, ← sum_sdiff hu, hi₃]
state_before: case intro.intro.intro
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h : i₁ ≠ i₂
hu : {i₁, i₂} ⊆ univ
i₃ : Fin 3
hi₃ : univ \ {i₁, i₂} = {i₃}
hi₃₁ : i₃ ≠ i₁
hi₃₂ : i₃ ≠ i₂
⊢ -(∑ x : Fin (0 + 2 + 1),
            (∑ x_1 : Fin (0 + 2 + 1),
                ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    ((↑(0 + 1))⁻¹ - if x_1 = i₁ ∨ x_1 = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1)) *
                    dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1))) +
              ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) * (-2 / ↑(0 + 1) - -1) *
                (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                  dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex))) +
          (∑ x : Fin (0 + 2 + 1),
              (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                    (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                  dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                    (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
            (-2 / ↑(0 + 1) - -1) * (-2 / ↑(0 + 1) - -1) *
              (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)))) /
      2 =
    circumradius t * circumradius t
state_after: case intro.intro.intro
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h : i₁ ≠ i₂
hu : {i₁, i₂} ⊆ univ
i₃ : Fin 3
hi₃ : univ \ {i₁, i₂} = {i₃}
hi₃₁ : i₃ ≠ i₁
hi₃₂ : i₃ ≠ i₂
⊢ -(∑ x ∈ {i₃},
                  ((↑(0 + 1))⁻¹ - if i₃ = i₁ ∨ i₃ = i₂ then 1 else 0) *
                      ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
                ∑ x ∈ {i₁, i₂},
                  ((↑(0 + 1))⁻¹ - if i₃ = i₁ ∨ i₃ = i₂ then 1 else 0) *
                      ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
              ((↑(0 + 1))⁻¹ - if i₃ = i₁ ∨ i₃ = i₂ then 1 else 0) * (-2 / ↑(0 + 1) - -1) *
                (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                  dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)) +
            ∑ x ∈ {i₁, i₂},
              (∑ x_1 : Fin (0 + 2 + 1),
                  ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                      ((↑(0 + 1))⁻¹ - if x_1 = i₁ ∨ x_1 = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1))) +
                ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) * (-2 / ↑(0 + 1) - -1) *
                  (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                    dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex))) +
          (∑ x ∈ {i₃},
                (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                    dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
              ∑ x ∈ {i₁, i₂},
                (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                    dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
            (-2 / ↑(0 + 1) - -1) * (-2 / ↑(0 + 1) - -1) *
              (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)))) /
      2 =
    circumradius t * circumradius t

tactic: split_ifs with h
state_before: case intro.intro.intro
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h : i₁ ≠ i₂
hu : {i₁, i₂} ⊆ univ
i₃ : Fin 3
hi₃ : univ \ {i₁, i₂} = {i₃}
hi₃₁ : i₃ ≠ i₁
hi₃₂ : i₃ ≠ i₂
⊢ -(∑ x ∈ {i₃},
                  ((↑(0 + 1))⁻¹ - if i₃ = i₁ ∨ i₃ = i₂ then 1 else 0) *
                      ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
                ∑ x ∈ {i₁, i₂},
                  ((↑(0 + 1))⁻¹ - if i₃ = i₁ ∨ i₃ = i₂ then 1 else 0) *
                      ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
              ((↑(0 + 1))⁻¹ - if i₃ = i₁ ∨ i₃ = i₂ then 1 else 0) * (-2 / ↑(0 + 1) - -1) *
                (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                  dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)) +
            ∑ x ∈ {i₁, i₂},
              (∑ x_1 : Fin (0 + 2 + 1),
                  ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                      ((↑(0 + 1))⁻¹ - if x_1 = i₁ ∨ x_1 = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1))) +
                ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) * (-2 / ↑(0 + 1) - -1) *
                  (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                    dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex))) +
          (∑ x ∈ {i₃},
                (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                    dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
              ∑ x ∈ {i₁, i₂},
                (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                    dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
            (-2 / ↑(0 + 1) - -1) * (-2 / ↑(0 + 1) - -1) *
              (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)))) /
      2 =
    circumradius t * circumradius t
state_after: case pos
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h✝ : i₁ ≠ i₂
hu : {i₁, i₂} ⊆ univ
i₃ : Fin 3
hi₃ : univ \ {i₁, i₂} = {i₃}
hi₃₁ : i₃ ≠ i₁
hi₃₂ : i₃ ≠ i₂
h : i₃ = i₁ ∨ i₃ = i₂
⊢ -(∑ x ∈ {i₃},
                  ((↑(0 + 1))⁻¹ - 1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
                ∑ x ∈ {i₁, i₂},
                  ((↑(0 + 1))⁻¹ - 1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
              ((↑(0 + 1))⁻¹ - 1) * (-2 / ↑(0 + 1) - -1) *
                (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                  dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)) +
            ∑ x ∈ {i₁, i₂},
              (∑ x_1 : Fin (0 + 2 + 1),
                  ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                      ((↑(0 + 1))⁻¹ - if x_1 = i₁ ∨ x_1 = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1))) +
                ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) * (-2 / ↑(0 + 1) - -1) *
                  (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                    dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex))) +
          (∑ x ∈ {i₃},
                (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                    dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
              ∑ x ∈ {i₁, i₂},
                (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                    dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
            (-2 / ↑(0 + 1) - -1) * (-2 / ↑(0 + 1) - -1) *
              (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)))) /
      2 =
    circumradius t * circumradius t

case neg
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h✝ : i₁ ≠ i₂
hu : {i₁, i₂} ⊆ univ
i₃ : Fin 3
hi₃ : univ \ {i₁, i₂} = {i₃}
hi₃₁ : i₃ ≠ i₁
hi₃₂ : i₃ ≠ i₂
h : ¬(i₃ = i₁ ∨ i₃ = i₂)
⊢ -(∑ x ∈ {i₃},
                  ((↑(0 + 1))⁻¹ - 0) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
                ∑ x ∈ {i₁, i₂},
                  ((↑(0 + 1))⁻¹ - 0) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
              ((↑(0 + 1))⁻¹ - 0) * (-2 / ↑(0 + 1) - -1) *
                (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                  dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)) +
            ∑ x ∈ {i₁, i₂},
              (∑ x_1 : Fin (0 + 2 + 1),
                  ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                      ((↑(0 + 1))⁻¹ - if x_1 = i₁ ∨ x_1 = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1))) +
                ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) * (-2 / ↑(0 + 1) - -1) *
                  (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                    dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex))) +
          (∑ x ∈ {i₃},
                (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                    dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
              ∑ x ∈ {i₁, i₂},
                (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                    dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
            (-2 / ↑(0 + 1) - -1) * (-2 / ↑(0 + 1) - -1) *
              (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)))) /
      2 =
    circumradius t * circumradius t

tactic: simp only [zero_add, Nat.cast_one, inv_one, sub_zero, one_mul, pointsWithCircumcenter_point,
  sum_singleton, h, ite_false, dist_self, mul_zero, mem_singleton, true_or, ite_true, sub_self,
  zero_mul, implies_true, sum_insert_of_eq_zero_if_not_mem, or_true, add_zero, div_one,
  sub_neg_eq_add, pointsWithCircumcenter_eq_circumcenter, dist_circumcenter_eq_circumradius,
  sum_const_zero, dist_circumcenter_eq_circumradius', mul_one, neg_add_rev, half_add_self]
state_before: case neg
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h✝ : i₁ ≠ i₂
hu : {i₁, i₂} ⊆ univ
i₃ : Fin 3
hi₃ : univ \ {i₁, i₂} = {i₃}
hi₃₁ : i₃ ≠ i₁
hi₃₂ : i₃ ≠ i₂
h : ¬(i₃ = i₁ ∨ i₃ = i₂)
⊢ -(∑ x ∈ {i₃},
                  ((↑(0 + 1))⁻¹ - 0) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
                ∑ x ∈ {i₁, i₂},
                  ((↑(0 + 1))⁻¹ - 0) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
              ((↑(0 + 1))⁻¹ - 0) * (-2 / ↑(0 + 1) - -1) *
                (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                  dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)) +
            ∑ x ∈ {i₁, i₂},
              (∑ x_1 : Fin (0 + 2 + 1),
                  ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                      ((↑(0 + 1))⁻¹ - if x_1 = i₁ ∨ x_1 = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1))) +
                ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) * (-2 / ↑(0 + 1) - -1) *
                  (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                    dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex))) +
          (∑ x ∈ {i₃},
                (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                    dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
              ∑ x ∈ {i₁, i₂},
                (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                    dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
            (-2 / ↑(0 + 1) - -1) * (-2 / ↑(0 + 1) - -1) *
              (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)))) /
      2 =
    circumradius t * circumradius t
state_after: case neg
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h✝ : i₁ ≠ i₂
hu : {i₁, i₂} ⊆ univ
i₃ : Fin 3
hi₃ : univ \ {i₁, i₂} = {i₃}
hi₃₁ : i₃ ≠ i₁
hi₃₂ : i₃ ≠ i₂
h : ¬(i₃ = i₁ ∨ i₃ = i₂)
⊢ -((-2 + 1) * (circumradius t * circumradius t)) = circumradius t * circumradius t

tactic: norm_num
state_before: case neg
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h✝ : i₁ ≠ i₂
hu : {i₁, i₂} ⊆ univ
i₃ : Fin 3
hi₃ : univ \ {i₁, i₂} = {i₃}
hi₃₁ : i₃ ≠ i₁
hi₃₂ : i₃ ≠ i₂
h : ¬(i₃ = i₁ ∨ i₃ = i₂)
⊢ -((-2 + 1) * (circumradius t * circumradius t)) = circumradius t * circumradius t
state_after: no goals

tactic: fin_cases i₁ <;> fin_cases i₂ <;> simp at h <;> decide
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h : i₁ ≠ i₂
hu : {i₁, i₂} ⊆ univ
⊢ ∃ i₃, univ \ {i₁, i₂} = {i₃} ∧ i₃ ≠ i₁ ∧ i₃ ≠ i₂
state_after: no goals

tactic: exact (h.elim hi₃₁ hi₃₂).elim
state_before: case pos
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
t : Triangle ℝ P
i₁ i₂ : Fin 3
h✝ : i₁ ≠ i₂
hu : {i₁, i₂} ⊆ univ
i₃ : Fin 3
hi₃ : univ \ {i₁, i₂} = {i₃}
hi₃₁ : i₃ ≠ i₁
hi₃₂ : i₃ ≠ i₂
h : i₃ = i₁ ∨ i₃ = i₂
⊢ -(∑ x ∈ {i₃},
                  ((↑(0 + 1))⁻¹ - 1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
                ∑ x ∈ {i₁, i₂},
                  ((↑(0 + 1))⁻¹ - 1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
              ((↑(0 + 1))⁻¹ - 1) * (-2 / ↑(0 + 1) - -1) *
                (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                  dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex i₃))
                    (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)) +
            ∑ x ∈ {i₁, i₂},
              (∑ x_1 : Fin (0 + 2 + 1),
                  ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                      ((↑(0 + 1))⁻¹ - if x_1 = i₁ ∨ x_1 = i₂ then 1 else 0) *
                    (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1)) *
                      dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                        (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x_1))) +
                ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) * (-2 / ↑(0 + 1) - -1) *
                  (dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                    dist (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))
                      (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex))) +
          (∑ x ∈ {i₃},
                (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                    dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
              ∑ x ∈ {i₁, i₂},
                (-2 / ↑(0 + 1) - -1) * ((↑(0 + 1))⁻¹ - if x = i₁ ∨ x = i₂ then 1 else 0) *
                  (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x)) *
                    dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                      (pointsWithCircumcenter t (PointsWithCircumcenterIndex.pointIndex x))) +
            (-2 / ↑(0 + 1) - -1) * (-2 / ↑(0 + 1) - -1) *
              (dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex) *
                dist (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)
                  (pointsWithCircumcenter t PointsWithCircumcenterIndex.circumcenterIndex)))) /
      2 =
    circumradius t * circumradius t
state_after: no goals