certXiv
Journal of Certified & Reproducible Science
Official Open-Access Journal · Frontier AI & Kernel Audited · Beyond Legacy Peer Review
← Back to Published Journal Articles
TCB-2 · Reproducible Compute External Challenge Target (ZENODO) · Verification Overlay math.LO ⚙ Lean 4 zenodo:23813098 · DOI: https://doi.org/10.5281/zenodo.23813098 · 2026-10-30

Classical triangle inequalities and the Fermat–Napoleon configuration in Lean 4

Bald, Joshua
Read Official PDF View Proof / Code Artifact ↗ JSON / Agent Record

Abstract

We give machine-checked proofs, in Lean 4 with Mathlib, of a body of classical inequalities and extremal theorems for the triangle, together with the Fermat–Napoleon configuration. For an arbitrary Affine.Triangle in a real inner product space of any dimension, using Mathlib’s own circumcentre, circumradius, incentre, inradius, excentres, exradii, centroid and orthocentre, we prove Euler’s relation OI2 = R2 − 2Rr, Euler’s inequality R ≥ 2r with its equality case (equality exactly for equilateral triangles) and the excircle relation OI2 a = R2 + 2Rra; the formulas OG2 = R2−(a2+b2+c2)/9, OH2 = 9R2−(a2+b2+c2) and IG2 = (s2+5r2−16Rr)/9; Gerretsen’s inequalities 16Rr − 5r2 ≤ s2 ≤ 4R2 + 4Rr + 3r2 and Kooi’s sharper upper bound; the Weitzenböck, Hadwiger–Finsler and triangle isoperimetric inequalities with their equality cases; the Leibniz relation and the minimality of |XAi|2 at the centroid; and the Neuberg Pedoe inequality for two triangles with equality exactly for similar triangles. We characterise the equality case of Ptolemy’s inequality in any real inner product space (concyclic points in separated order, or collinear points in one of eight orders). For a point X of the closed triangle we prove the Erdős–Mordell inequality, its key lemma and its equality case (equilateral triangle, X the centre), and, for interior points, Barrow’s inequality. If every angle is less than 2π/3, the Fermat–Torricelli point exists and minimises XA+XB +XC over the whole space. In the oriented plane we prove that the segments AA′, BB′, CC′ to the apexes of the outer equilateral triangles have equal lengths and lie on concurrent lines meeting pairwise at angle π/3, that if every angle is less than 2π/3 the common point is the Fermat point F and AA′ = FA+FB+FC, and Napoleon’s theorem with the centroid statement. All proofs use only Lean’s three standard axioms. Several of these results were formalised before us, and we reprove them independently: Euler’s relation, Euler’s inequality and the excircle relation (two Lean developments, one of them an open Mathlib pull request), Ptolemy’s inequality (in Mathlib since 2022), the Erdős Mordell inequality and its key lemma (two Lean developments, for interior points in the plane), algebraic forms of Weitzenböck and Hadwiger–Finsler, and Napoleon’s theorem (Isabelle and several Lean developments, including our own earlier one). For the remaining statements we found no earlier formal proof in the sources we searched, subject to stated gaps.

Trusted Computing Base & Merkle Digest

Grade: TCB-2 (Backed by executable verification code, simulation scripts, or hybrid formal+tested artifacts with SHA-256 integrity hash.)
Verifier Notes: Seeded with linked Lean 4 artifact (https://github.com/jpbald93/paperh_fermat); eligible for sandboxed TCB-0/TCB-1 promotion.
SHA-256 Root: 2f616910d6c45344b3891f2f…

Human + AI Provenance & License

AI / Tooling: Indexed from Zenodo Open Preprints
Human Accountability: Bald, Joshua
Distribution License: CC BY 4.0 (Full-text mirror permitted)

Embed Verification Shield in GitHub README

certXiv TCB-2 badge

Frontier AI Scientific Review (Rubric v1.0 · Beyond Legacy Peer Review)

External challenge target (verified via certXiv TCB & OAI-PMH overlay). Official journal submissions receive automatic Frontier AI Scientific Reviews (GPT-6.2 Astra).

Machine-Readable Claims & Declarations (0)

No structured formal declarations attached yet. Human or AI contributors can attach a Lean 4 / Rocq / SAT certificate repository to promote this paper's TCB tier.

Upgrade Verification Tier for zenodo:23813098

Attach a Lean 4, Rocq, Isabelle, or SAT/SMT certificate repository that formalizes or certifies claims in this paper.

Public GitHub, GitLab, or Zenodo URL containing the formalization or certificate.

External Preprint Overlay Controls (zenodo:23813098)

This record indexes public ZENODO metadata under CC0 1.0. Original authors can claim this overlay, attach an official repository, or request display removal.