/- 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 FormalConjecturesUtil

Erdős Problem 898

References:

open Affine EuclideanGeometrynamespace Erdos898

If $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].directiondist P A + dist P B + dist P C 2 * (dist P M + dist P N + dist P L) All goals completed! 🐙end Erdos898