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

Proof steps:
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₂ i₃ : Fin 3
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
⊢ altitude t i₁ = mongePlane t i₂ i₃
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₂ i₃ : Fin 3
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
hs : {i₂, i₃}ᶜ = {i₁}
⊢ altitude t i₁ = mongePlane t i₂ i₃
tactic: have hs : ({i₂, i₃}ᶜ : Finset (Fin 3)) = {i₁} := by
    -- Porting note (#11043): was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ 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₂ i₃ : Fin 3
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
hs : {i₂, i₃}ᶜ = {i₁}
⊢ altitude t i₁ = mongePlane t i₂ i₃
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₂ i₃ : Fin 3
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
hs : {i₂, i₃}ᶜ = {i₁}
he : univ.erase i₁ = {i₂, i₃}
⊢ altitude t i₁ = mongePlane t i₂ i₃
tactic: have he : univ.erase i₁ = {i₂, i₃} := by
    -- Porting note (#11043): was `decide!`
    fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃
      <;> simp (config := {decide := true}) at h₁₂ h₁₃ 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₂ i₃ : Fin 3
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
hs : {i₂, i₃}ᶜ = {i₁}
he : univ.erase i₁ = {i₂, i₃}
⊢ altitude t i₁ = mongePlane t i₂ i₃
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₂ i₃ : Fin 3
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
hs : {i₂, i₃}ᶜ = {i₁}
he : univ.erase i₁ = {i₂, i₃}
⊢ mk' (t.points i₁) (Submodule.span ℝ ((fun x => t.points i₂ -ᵥ x) '' (t.points '' ({i₂, i₃} \ {i₂}))))ᗮ ⊓
      affineSpan ℝ (Set.range t.points) =
    mk' (t.points i₁) (Submodule.span ℝ {t.points i₂ -ᵥ t.points i₃})ᗮ ⊓ affineSpan ℝ (Set.range t.points)
tactic: 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₂ _)]
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₂ i₃ : Fin 3
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
hs : {i₂, i₃}ᶜ = {i₁}
he : univ.erase i₁ = {i₂, i₃}
⊢ mk' (t.points i₁) (Submodule.span ℝ ((fun x => t.points i₂ -ᵥ x) '' (t.points '' ({i₂, i₃} \ {i₂}))))ᗮ ⊓
      affineSpan ℝ (Set.range t.points) =
    mk' (t.points i₁) (Submodule.span ℝ {t.points i₂ -ᵥ t.points i₃})ᗮ ⊓ affineSpan ℝ (Set.range t.points)
state_after: no goals
tactic: simp [h₂₃, Submodule.span_insert_eq_span]