l3lab/ntp-mathlib huggingface dataset:
/-- In the case of a triangle, altitudes are the same thing as Monge
planes. -/
theorem altitude_eq_mongePlane (t : Triangle ℝ P) {i₁ i₂ i₃ : Fin 3} (h₁₂ : i₁ ≠ i₂) (h₁₃ : i₁ ≠ i₃)
    (h₂₃ : i₂ ≠ i₃) : t.altitude i₁ = t.mongePlane i₂ i₃ := by
  have hs : ({i₂, i₃}ᶜ : Finset (Fin 3)) = {i₁} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  have he : univ.erase i₁ = {i₂, i₃} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  rw [mongePlane_def, altitude_def, direction_affineSpan, hs, he, centroid_singleton, coe_insert,
    coe_singleton, vectorSpan_image_eq_span_vsub_set_left_ne ℝ _ (Set.mem_insert i₂ _)]
  simp [h₂₃, Submodule.span_insert_eq_span]
  -- porting note: this didn't need the `congr` and the `fin_cases`
  congr
  fin_cases i₂ <;> 

Proof state:
case e_a.e_direction.e_K.e_s.tail.tail.head
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₃
h₁₂ : i₁ ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }
h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃
hs : {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, i₃}ᶜ = {i₁}
he : erase univ i₁ = {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, i₃}
⊢ (fun x => points t { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } -ᵥ x) ''
      (t.points '' ({i₃} \ {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }})) =
    {points t { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } -ᵥ points t i₃}

Next tactic:
fin_cases i₃
/-- In the case of a triangle, altitudes are the same thing as Monge
planes. -/
theorem altitude_eq_mongePlane (t : Triangle ℝ P) {i₁ i₂ i₃ : Fin 3} (h₁₂ : i₁ ≠ i₂) (h₁₃ : i₁ ≠ i₃)
    (h₂₃ : i₂ ≠ i₃) : t.altitude i₁ = t.mongePlane i₂ i₃ := by
  have hs : ({i₂, i₃}ᶜ : Finset (Fin 3)) = {i₁} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  have he : univ.erase i₁ = {i₂, i₃} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  rw [mongePlane_def, altitude_def, direction_affineSpan, hs, he, centroid_singleton, coe_insert,
    coe_singleton, vectorSpan_image_eq_span_vsub_set_left_ne ℝ _ (Set.mem_insert i₂ _)]
  simp [h₂₃, Submodule.span_insert_eq_span]
  -- porting note: this didn't need the `congr` and the `fin_cases`
  congr
  fin_cases i₂ <;> fin_cases i₃ <;> 

Proof state:
case e_a.e_direction.e_K.e_s.head.head
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₁ : Fin 3
h₁₂ h₁₃ : i₁ ≠ { val := 0, isLt := (_ : 0 < 3) }
h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }
hs : {{ val := 0, isLt := (_ : 0 < 3) }, { val := 0, isLt := (_ : 0 < 3) }}ᶜ = {i₁}
he : erase univ i₁ = {{ val := 0, isLt := (_ : 0 < 3) }, { val := 0, isLt := (_ : 0 < 3) }}
⊢ (fun x => points t { val := 0, isLt := (_ : 0 < 3) } -ᵥ x) ''
      (t.points '' ({{ val := 0, isLt := (_ : 0 < 3) }} \ {{ val := 0, isLt := (_ : 0 < 3) }})) =
    {points t { val := 0, isLt := (_ : 0 < 3) } -ᵥ points t { val := 0, isLt := (_ : 0 < 3) }}

Next tactic:
simp (config := {decide := true}) at h₂₃ ⊢
/-- In the case of a triangle, altitudes are the same thing as Monge
planes. -/
theorem altitude_eq_mongePlane (t : Triangle ℝ P) {i₁ i₂ i₃ : Fin 3} (h₁₂ : i₁ ≠ i₂) (h₁₃ : i₁ ≠ i₃)
    (h₂₃ : i₂ ≠ i₃) : t.altitude i₁ = t.mongePlane i₂ i₃ := by
  have hs : ({i₂, i₃}ᶜ : Finset (Fin 3)) = {i₁} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  have he : univ.erase i₁ = {i₂, i₃} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  rw [mongePlane_def, altitude_def, direction_affineSpan, hs, he, centroid_singleton, coe_insert,
    coe_singleton, vectorSpan_image_eq_span_vsub_set_left_ne ℝ _ (Set.mem_insert i₂ _)]
  simp [h₂₃, Submodule.span_insert_eq_span]
  -- porting note: this didn't need the `congr` and the `fin_cases`
  congr
  fin_cases i₂ <;> fin_cases i₃ <;> 

Proof state:
case e_a.e_direction.e_K.e_s.head.tail.head
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₁ : Fin 3
h₁₂ : i₁ ≠ { val := 0, isLt := (_ : 0 < 3) }
h₁₃ : i₁ ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }
h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }
hs : {{ val := 0, isLt := (_ : 0 < 3) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) }}ᶜ = {i₁}
he : erase univ i₁ = {{ val := 0, isLt := (_ : 0 < 3) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) }}
⊢ (fun x => points t { val := 0, isLt := (_ : 0 < 3) } -ᵥ x) ''
      (t.points '' ({{ val := 1, isLt := (_ : (fun a => a < 3) 1) }} \ {{ val := 0, isLt := (_ : 0 < 3) }})) =
    {points t { val := 0, isLt := (_ : 0 < 3) } -ᵥ points t { val := 1, isLt := (_ : (fun a => a < 3) 1) }}

Next tactic:
simp (config := {decide := true}) at h₂₃ ⊢
/-- In the case of a triangle, altitudes are the same thing as Monge
planes. -/
theorem altitude_eq_mongePlane (t : Triangle ℝ P) {i₁ i₂ i₃ : Fin 3} (h₁₂ : i₁ ≠ i₂) (h₁₃ : i₁ ≠ i₃)
    (h₂₃ : i₂ ≠ i₃) : t.altitude i₁ = t.mongePlane i₂ i₃ := by
  have hs : ({i₂, i₃}ᶜ : Finset (Fin 3)) = {i₁} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  have he : univ.erase i₁ = {i₂, i₃} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  rw [mongePlane_def, altitude_def, direction_affineSpan, hs, he, centroid_singleton, coe_insert,
    coe_singleton, vectorSpan_image_eq_span_vsub_set_left_ne ℝ _ (Set.mem_insert i₂ _)]
  simp [h₂₃, Submodule.span_insert_eq_span]
  -- porting note: this didn't need the `congr` and the `fin_cases`
  congr
  fin_cases i₂ <;> fin_cases i₃ <;> 

Proof state:
case e_a.e_direction.e_K.e_s.head.tail.tail.head
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₁ : Fin 3
h₁₂ : i₁ ≠ { val := 0, isLt := (_ : 0 < 3) }
h₁₃ : i₁ ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }
h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }
hs : {{ val := 0, isLt := (_ : 0 < 3) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}ᶜ = {i₁}
he : erase univ i₁ = {{ val := 0, isLt := (_ : 0 < 3) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}
⊢ (fun x => points t { val := 0, isLt := (_ : 0 < 3) } -ᵥ x) ''
      (t.points ''
        ({{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }} \ {{ val := 0, isLt := (_ : 0 < 3) }})) =
    {points t { val := 0, isLt := (_ : 0 < 3) } -ᵥ points t { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}

Next tactic:
simp (config := {decide := true}) at h₂₃ ⊢
/-- In the case of a triangle, altitudes are the same thing as Monge
planes. -/
theorem altitude_eq_mongePlane (t : Triangle ℝ P) {i₁ i₂ i₃ : Fin 3} (h₁₂ : i₁ ≠ i₂) (h₁₃ : i₁ ≠ i₃)
    (h₂₃ : i₂ ≠ i₃) : t.altitude i₁ = t.mongePlane i₂ i₃ := by
  have hs : ({i₂, i₃}ᶜ : Finset (Fin 3)) = {i₁} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  have he : univ.erase i₁ = {i₂, i₃} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  rw [mongePlane_def, altitude_def, direction_affineSpan, hs, he, centroid_singleton, coe_insert,
    coe_singleton, vectorSpan_image_eq_span_vsub_set_left_ne ℝ _ (Set.mem_insert i₂ _)]
  simp [h₂₃, Submodule.span_insert_eq_span]
  -- porting note: this didn't need the `congr` and the `fin_cases`
  congr
  fin_cases i₂ <;> fin_cases i₃ <;> 

Proof state:
case e_a.e_direction.e_K.e_s.tail.head.head
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₁ : Fin 3
h₁₂ : i₁ ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }
h₁₃ : i₁ ≠ { val := 0, isLt := (_ : 0 < 3) }
h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }
hs : {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 0, isLt := (_ : 0 < 3) }}ᶜ = {i₁}
he : erase univ i₁ = {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 0, isLt := (_ : 0 < 3) }}
⊢ (fun x => points t { val := 1, isLt := (_ : (fun a => a < 3) 1) } -ᵥ x) ''
      (t.points '' ({{ val := 0, isLt := (_ : 0 < 3) }} \ {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }})) =
    {points t { val := 1, isLt := (_ : (fun a => a < 3) 1) } -ᵥ points t { val := 0, isLt := (_ : 0 < 3) }}

Next tactic:
simp (config := {decide := true}) at h₂₃ ⊢
/-- In the case of a triangle, altitudes are the same thing as Monge
planes. -/
theorem altitude_eq_mongePlane (t : Triangle ℝ P) {i₁ i₂ i₃ : Fin 3} (h₁₂ : i₁ ≠ i₂) (h₁₃ : i₁ ≠ i₃)
    (h₂₃ : i₂ ≠ i₃) : t.altitude i₁ = t.mongePlane i₂ i₃ := by
  have hs : ({i₂, i₃}ᶜ : Finset (Fin 3)) = {i₁} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  have he : univ.erase i₁ = {i₂, i₃} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  rw [mongePlane_def, altitude_def, direction_affineSpan, hs, he, centroid_singleton, coe_insert,
    coe_singleton, vectorSpan_image_eq_span_vsub_set_left_ne ℝ _ (Set.mem_insert i₂ _)]
  simp [h₂₃, Submodule.span_insert_eq_span]
  -- porting note: this didn't need the `congr` and the `fin_cases`
  congr
  fin_cases i₂ <;> fin_cases i₃ <;> 

Proof state:
case e_a.e_direction.e_K.e_s.tail.head.tail.head
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₁ : Fin 3
h₁₂ h₁₃ : i₁ ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }
h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }
hs : {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) }}ᶜ = {i₁}
he : erase univ i₁ = {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) }}
⊢ (fun x => points t { val := 1, isLt := (_ : (fun a => a < 3) 1) } -ᵥ x) ''
      (t.points ''
        ({{ val := 1, isLt := (_ : (fun a => a < 3) 1) }} \ {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }})) =
    {points t { val := 1, isLt := (_ : (fun a => a < 3) 1) } -ᵥ points t { val := 1, isLt := (_ : (fun a => a < 3) 1) }}

Next tactic:
simp (config := {decide := true}) at h₂₃ ⊢
/-- In the case of a triangle, altitudes are the same thing as Monge
planes. -/
theorem altitude_eq_mongePlane (t : Triangle ℝ P) {i₁ i₂ i₃ : Fin 3} (h₁₂ : i₁ ≠ i₂) (h₁₃ : i₁ ≠ i₃)
    (h₂₃ : i₂ ≠ i₃) : t.altitude i₁ = t.mongePlane i₂ i₃ := by
  have hs : ({i₂, i₃}ᶜ : Finset (Fin 3)) = {i₁} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  have he : univ.erase i₁ = {i₂, i₃} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  rw [mongePlane_def, altitude_def, direction_affineSpan, hs, he, centroid_singleton, coe_insert,
    coe_singleton, vectorSpan_image_eq_span_vsub_set_left_ne ℝ _ (Set.mem_insert i₂ _)]
  simp [h₂₃, Submodule.span_insert_eq_span]
  -- porting note: this didn't need the `congr` and the `fin_cases`
  congr
  fin_cases i₂ <;> fin_cases i₃ <;> 

Proof state:
case e_a.e_direction.e_K.e_s.tail.head.tail.tail.head
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₁ : Fin 3
h₁₂ : i₁ ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }
h₁₃ : i₁ ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }
h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }
hs :
  {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}ᶜ = {i₁}
he :
  erase univ i₁ =
    {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}
⊢ (fun x => points t { val := 1, isLt := (_ : (fun a => a < 3) 1) } -ᵥ x) ''
      (t.points ''
        ({{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }} \
          {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }})) =
    {points t { val := 1, isLt := (_ : (fun a => a < 3) 1) } -ᵥ
        points t { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}

Next tactic:
simp (config := {decide := true}) at h₂₃ ⊢
/-- In the case of a triangle, altitudes are the same thing as Monge
planes. -/
theorem altitude_eq_mongePlane (t : Triangle ℝ P) {i₁ i₂ i₃ : Fin 3} (h₁₂ : i₁ ≠ i₂) (h₁₃ : i₁ ≠ i₃)
    (h₂₃ : i₂ ≠ i₃) : t.altitude i₁ = t.mongePlane i₂ i₃ := by
  have hs : ({i₂, i₃}ᶜ : Finset (Fin 3)) = {i₁} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  have he : univ.erase i₁ = {i₂, i₃} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  rw [mongePlane_def, altitude_def, direction_affineSpan, hs, he, centroid_singleton, coe_insert,
    coe_singleton, vectorSpan_image_eq_span_vsub_set_left_ne ℝ _ (Set.mem_insert i₂ _)]
  simp [h₂₃, Submodule.span_insert_eq_span]
  -- porting note: this didn't need the `congr` and the `fin_cases`
  congr
  fin_cases i₂ <;> fin_cases i₃ <;> 

Proof state:
case e_a.e_direction.e_K.e_s.tail.tail.head.head
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₁ : Fin 3
h₁₂ : i₁ ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }
h₁₃ : i₁ ≠ { val := 0, isLt := (_ : 0 < 3) }
h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }
hs : {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 0, isLt := (_ : 0 < 3) }}ᶜ = {i₁}
he : erase univ i₁ = {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 0, isLt := (_ : 0 < 3) }}
⊢ (fun x => points t { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } -ᵥ x) ''
      (t.points ''
        ({{ val := 0, isLt := (_ : 0 < 3) }} \ {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }})) =
    {points t { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } -ᵥ points t { val := 0, isLt := (_ : 0 < 3) }}

Next tactic:
simp (config := {decide := true}) at h₂₃ ⊢
/-- In the case of a triangle, altitudes are the same thing as Monge
planes. -/
theorem altitude_eq_mongePlane (t : Triangle ℝ P) {i₁ i₂ i₃ : Fin 3} (h₁₂ : i₁ ≠ i₂) (h₁₃ : i₁ ≠ i₃)
    (h₂₃ : i₂ ≠ i₃) : t.altitude i₁ = t.mongePlane i₂ i₃ := by
  have hs : ({i₂, i₃}ᶜ : Finset (Fin 3)) = {i₁} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  have he : univ.erase i₁ = {i₂, i₃} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  rw [mongePlane_def, altitude_def, direction_affineSpan, hs, he, centroid_singleton, coe_insert,
    coe_singleton, vectorSpan_image_eq_span_vsub_set_left_ne ℝ _ (Set.mem_insert i₂ _)]
  simp [h₂₃, Submodule.span_insert_eq_span]
  -- porting note: this didn't need the `congr` and the `fin_cases`
  congr
  fin_cases i₂ <;> fin_cases i₃ <;> 

Proof state:
case e_a.e_direction.e_K.e_s.tail.tail.head.tail.head
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₁ : Fin 3
h₁₂ : i₁ ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }
h₁₃ : i₁ ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }
h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }
hs :
  {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) }}ᶜ = {i₁}
he :
  erase univ i₁ =
    {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) }}
⊢ (fun x => points t { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } -ᵥ x) ''
      (t.points ''
        ({{ val := 1, isLt := (_ : (fun a => a < 3) 1) }} \
          {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }})) =
    {points t { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } -ᵥ
        points t { val := 1, isLt := (_ : (fun a => a < 3) 1) }}

Next tactic:
simp (config := {decide := true}) at h₂₃ ⊢
/-- In the case of a triangle, altitudes are the same thing as Monge
planes. -/
theorem altitude_eq_mongePlane (t : Triangle ℝ P) {i₁ i₂ i₃ : Fin 3} (h₁₂ : i₁ ≠ i₂) (h₁₃ : i₁ ≠ i₃)
    (h₂₃ : i₂ ≠ i₃) : t.altitude i₁ = t.mongePlane i₂ i₃ := by
  have hs : ({i₂, i₃}ᶜ : Finset (Fin 3)) = {i₁} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  have he : univ.erase i₁ = {i₂, i₃} := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ h₂₃ ⊢
  rw [mongePlane_def, altitude_def, direction_affineSpan, hs, he, centroid_singleton, coe_insert,
    coe_singleton, vectorSpan_image_eq_span_vsub_set_left_ne ℝ _ (Set.mem_insert i₂ _)]
  simp [h₂₃, Submodule.span_insert_eq_span]
  -- porting note: this didn't need the `congr` and the `fin_cases`
  congr
  fin_cases i₂ <;> fin_cases i₃ <;> 

Proof state:
case e_a.e_direction.e_K.e_s.tail.tail.head.tail.tail.head
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₁ : Fin 3
h₁₂ h₁₃ : i₁ ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }
h₂₃ :
  { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠
    { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }
hs :
  {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },
        { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}ᶜ =
    {i₁}
he :
  erase univ i₁ =
    {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },
      { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}
⊢ (fun x => points t { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } -ᵥ x) ''
      (t.points ''
        ({{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }} \
          {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }})) =
    {points t { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } -ᵥ
        points t { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}

Next tactic:
simp (config := {decide := true}) at h₂₃ ⊢
/-- The orthocenter lies in the altitudes. -/
theorem orthocenter_mem_altitude (t : Triangle ℝ P) {i₁ : Fin 3} :
    t.orthocenter ∈ t.altitude i₁ := by
  

Proof state:
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₁ : Fin 3
⊢ orthocenter t ∈ altitude t i₁

Next tactic:
obtain ⟨i₂, i₃, h₁₂, h₂₃, h₁₃⟩ : ∃ i₂ i₃, i₁ ≠ i₂ ∧ i₂ ≠ i₃ ∧ i₁ ≠ i₃ := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> decide
/-- The orthocenter lies in the altitudes. -/
theorem orthocenter_mem_altitude (t : Triangle ℝ P) {i₁ : Fin 3} :
    t.orthocenter ∈ t.altitude i₁ := by
  obtain ⟨i₂, i₃, h₁₂, h₂₃, h₁₃⟩ : ∃ i₂ i₃, i₁ ≠ i₂ ∧ i₂ ≠ i₃ ∧ i₁ ≠ i₃ := by
    -- porting note: was `decide!`
    

Proof state:
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₁ : Fin 3
⊢ ∃ i₂ i₃, i₁ ≠ i₂ ∧ i₂ ≠ i₃ ∧ i₁ ≠ i₃

Next tactic:
fin_cases i₁
/-- The orthocenter lies in the altitudes. -/
theorem orthocenter_mem_altitude (t : Triangle ℝ P) {i₁ : Fin 3} :
    t.orthocenter ∈ t.altitude i₁ := by
  obtain ⟨i₂, i₃, h₁₂, h₂₃, h₁₃⟩ : ∃ i₂ i₃, i₁ ≠ i₂ ∧ i₂ ≠ i₃ ∧ i₁ ≠ i₃ := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> 

Proof state:
case head
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₃, { val := 0, isLt := (_ : 0 < 3) } ≠ i₂ ∧ i₂ ≠ i₃ ∧ { val := 0, isLt := (_ : 0 < 3) } ≠ i₃

Next tactic:
decide
/-- The orthocenter lies in the altitudes. -/
theorem orthocenter_mem_altitude (t : Triangle ℝ P) {i₁ : Fin 3} :
    t.orthocenter ∈ t.altitude i₁ := by
  obtain ⟨i₂, i₃, h₁₂, h₂₃, h₁₃⟩ : ∃ i₂ i₃, i₁ ≠ i₂ ∧ i₂ ≠ i₃ ∧ i₁ ≠ i₃ := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> 

Proof state:
case tail.head
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₃,
    { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₂ ∧ i₂ ≠ i₃ ∧ { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃

Next tactic:
decide
/-- The orthocenter lies in the altitudes. -/
theorem orthocenter_mem_altitude (t : Triangle ℝ P) {i₁ : Fin 3} :
    t.orthocenter ∈ t.altitude i₁ := by
  obtain ⟨i₂, i₃, h₁₂, h₂₃, h₁₃⟩ : ∃ i₂ i₃, i₁ ≠ i₂ ∧ i₂ ≠ i₃ ∧ i₁ ≠ i₃ := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> 

Proof state:
case tail.tail.head
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₃,
    { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₂ ∧
      i₂ ≠ i₃ ∧ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃

Next tactic:
decide
/-- The orthocenter lies in the altitudes. -/
theorem orthocenter_mem_altitude (t : Triangle ℝ P) {i₁ : Fin 3} :
    t.orthocenter ∈ t.altitude i₁ := by
  obtain ⟨i₂, i₃, h₁₂, h₂₃, h₁₃⟩ : ∃ i₂ i₃, i₁ ≠ i₂ ∧ i₂ ≠ i₃ ∧ i₁ ≠ i₃ := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> decide
  

Proof state:
case intro.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₂ i₃ : Fin 3
h₁₂ : i₁ ≠ i₂
h₂₃ : i₂ ≠ i₃
h₁₃ : i₁ ≠ i₃
⊢ orthocenter t ∈ altitude t i₁

Next tactic:
rw [orthocenter_eq_mongePoint, t.altitude_eq_mongePlane h₁₂ h₁₃ h₂₃]
/-- The orthocenter lies in the altitudes. -/
theorem orthocenter_mem_altitude (t : Triangle ℝ P) {i₁ : Fin 3} :
    t.orthocenter ∈ t.altitude i₁ := by
  obtain ⟨i₂, i₃, h₁₂, h₂₃, h₁₃⟩ : ∃ i₂ i₃, i₁ ≠ i₂ ∧ i₂ ≠ i₃ ∧ i₁ ≠ i₃ := by
    -- porting note: was `decide!`
    fin_cases i₁ <;> decide
  rw [orthocenter_eq_mongePoint, t.altitude_eq_mongePlane h₁₂ h₁₃ h₂₃]
  

Proof state:
case intro.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₂ i₃ : Fin 3
h₁₂ : i₁ ≠ i₂
h₂₃ : i₂ ≠ i₃
h₁₃ : i₁ ≠ i₃
⊢ mongePoint t ∈ mongePlane t i₂ i₃

Next tactic:
exact t.mongePoint_mem_mongePlane