/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
import FormalConjecturesUtilErdős Problem 898
References:
[Er82e] Erdős, Paul, Some of my favourite problems which recently have been solved. (1982), 59--79.
open Affine EuclideanGeometrynamespace Erdos898If $A,B,C\in \mathbb{R}^2$ form a triangle and $P$ is a point in the interior then, if $N$ is where the perpendicular from $P$ to $AB$ meets the triangle, and similarly for $M$ and $L$, $$ \overline{PA}+\overline{PB}+\overline{PC}\geq 2(\overline{PM}+\overline{PN}+\overline{PL}). $$
Conjectured by Erdős in 1932 (according to [Er82e]) and proved by Mordell soon afterwards, now known as the Erdős-Mordell inequality.
@[category research solved, AMS 51, formal_proof using lean4 at "https://github.com/plby/lean-proofs/blob/main/src/v4.29.1/ErdosProblems/Erdos898.lean"]
theorem erdos_898 (A B C P L M N : ℝ²) (hABC : AffineIndependent ℝ ![A, B, C])
(hP : P ∈ interior (convexHull ℝ ({A, B, C} : Set ℝ²)))
(hN : N ∈ line[ℝ, A, B]) (hPN : line[ℝ, P, N].direction ⟂ line[ℝ, A, B].direction)
(hM : M ∈ line[ℝ, B, C]) (hPM : line[ℝ, P, M].direction ⟂ line[ℝ, B, C].direction)
(hL : L ∈ line[ℝ, C, A]) (hPL : line[ℝ, P, L].direction ⟂ line[ℝ, C, A].direction) :
dist P A + dist P B + dist P C ≥ 2 * (dist P M + dist P N + dist P L) := A:ℝ²B:ℝ²C:ℝ²P:ℝ²L:ℝ²M:ℝ²N:ℝ²hABC:AffineIndependent ℝ ![A, B, C]hP:P ∈ interior ((convexHull ℝ) {A, B, C})hN:N ∈ line[ℝ, A, B]hPN:line[ℝ, P, N].direction ⟂ line[ℝ, A, B].directionhM:M ∈ line[ℝ, B, C]hPM:line[ℝ, P, M].direction ⟂ line[ℝ, B, C].directionhL:L ∈ line[ℝ, C, A]hPL:line[ℝ, P, L].direction ⟂ line[ℝ, C, A].direction⊢ dist P A + dist P B + dist P C ≥ 2 * (dist P M + dist P N + dist P L)
All goals completed! 🐙end Erdos898