% Formalization short paper on MathOverflow 337612. Build: latexmk -xelatex main.tex (pdflatex and lualatex also work) % Claim IDs (C1-C8) refer to outline.md. \documentclass[11pt]{article} \usepackage[margin=1in]{geometry} \usepackage{iftex} \ifXeTeX \usepackage{unicode-math} % Fonts are loaded by file name from TeX Live (Latin Modern), as arXiv's xelatex requires. \setmonofont{lmmono10-regular.otf}[HyphenChar=None] % Latin Modern Mono lacks the math symbols and Greek of the Lean code; print them from Latin Modern Math. \newfontfamily\monofb{latinmodern-math.otf} \XeTeXinterchartokenstate=1 \newXeTeXintercharclass\fbclass \def\fb#1{\XeTeXcharclass"#1=\fbclass} \fb{03B3}\fb{03C0}\fb{211D}\fb{2200}\fb{2203}\fb{2208}\fb{2227}\fb{222B}\fb{2264}\fb{27EA}\fb{27EB} \XeTeXinterchartoks 0 \fbclass = {\begingroup\monofb} \XeTeXinterchartoks 4095 \fbclass = {\begingroup\monofb} \XeTeXinterchartoks \fbclass 0 = {\endgroup} \XeTeXinterchartoks \fbclass 4095 = {\endgroup} % No TeX Live font used here has subscript digits. \catcode`₀=13 \def₀{\textsubscript{0}} \catcode`₁=13 \def₁{\textsubscript{1}} \else \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{amsmath,amssymb} % pdfLaTeX and LuaLaTeX: print the Unicode symbols of the Lean code as math. \ifPDFTeX \usepackage[utf8]{inputenc} \def\uc#1#2{\DeclareUnicodeCharacter{#1}{#2}} \else \def\uc#1#2{\begingroup\lccode`\~="#1\lowercase{\endgroup\def~}{#2}\catcode"#1=13 } \fi \uc{03B3}{\ensuremath{\gamma}} \uc{03C0}{\ensuremath{\pi}} \uc{2016}{\ensuremath{\Vert}} \uc{2022}{\ensuremath{\bullet}} \uc{2080}{\textsubscript{0}} \uc{2081}{\textsubscript{1}} \uc{211D}{\ensuremath{\mathbb{R}}} \uc{2192}{\ensuremath{\to}} \uc{2200}{\ensuremath{\forall}} \uc{2203}{\ensuremath{\exists}} \uc{2208}{\ensuremath{\in}} \uc{2227}{\ensuremath{\wedge}} \uc{222B}{\ensuremath{\int}} \uc{2264}{\ensuremath{\le}} \uc{27EA}{\ensuremath{\langle\!\langle}} \uc{27EB}{\ensuremath{\rangle\!\rangle}} \fi \usepackage{hyperref} \hypersetup{colorlinks=true, linkcolor=black, citecolor=black, urlcolor=black} \newcommand{\code}[1]{\texttt{#1}} \emergencystretch=3em \title{A Lean Proof of the Sharp Endpoint Bound for Plane Paths of Average Curvature at Most 1} \author{Gawain E. Kang\\[2pt] \small Daniel Guggenheim School of Aerospace Engineering\\ \small Georgia Institute of Technology, Atlanta, GA, USA\\ \small \href{mailto:gawain@gatech.edu}{gawain@gatech.edu}} \date{} \begin{document} \maketitle \begin{abstract} MathOverflow question 337612 asks for a lower bound on the endpoint distance of a plane path of length $l$ with average curvature at most 1: its unit tangent turns by at most $s-t$ between arclength parameters $t2\pi$. A Lean~4 file of 169 lines states this answer as one \code{IsLeast} theorem over Mathlib and proves it with no unproved step (\code{sorry}). The theorem takes paths defined on all of $\mathbb{R}$; the reduction from the paths on $[0,l]$ of the question is an informal step that Lean does not check. Every circle of radius $r\ge 1$ satisfies the condition, as its tangents at $t2\pi$. The lower bound is the projection argument of Chern's proof of Schur's comparison theorem: for $l<2\pi$, with $u$ the unit tangent at $l/2$, $\langle u,\gamma'(s)\rangle\ge\cos(s-l/2)$, and integrating gives $\langle u,\gamma(l)-\gamma(0)\rangle\ge 2\sin(l/2)$. The definition of admissible paths uses one derivative and Mathlib's unoriented angle, so it needs no curvature. The result is classical, and a web search in November 2026 found no earlier formalization of it in Lean, Isabelle or Coq (Rocq). \end{abstract} \section{Introduction} Let $\gamma$ be a $C^1$ plane path parametrized by arclength on $[0,l]$. MathOverflow question 337612 \cite{mo} calls $\gamma$ of average curvature at most 1 when, for all $t2\pi$, attained by a closed circle of radius $l/(2\pi)>1$. Kusner and Sullivan \cite[Lemma~5.1]{ks} state the lower bound for curves of curvature at most 1 and points at arclength distance at most $2\pi$, and prove it by projecting onto the tangent at the arclength midpoint. They note that it is a special case of Schur's comparison theorem \cite{schur,chern}, which Sullivan states for curves of finite total curvature \cite[Thm.~5.1]{sullivan}: an arc whose total curvature on every subarc is at most that of the corresponding subarc of a plane arc of the same length, convex together with its chord, has its endpoints at least as far apart. An arc of the unit circle of length $l$ is convex together with its chord when $l\le 2\pi$. The angle condition bounds the total curvature of $\gamma$ on $[t,s]$ by $s-t$, the total curvature of the unit circle: total curvature is the supremum, over partitions, of the sums of the angles between consecutive tangents, and by Section~2 each of these angles is at most the gap between its parameters. % [C8] The file \code{Mo337612.lean} proves the answer as the theorem \code{main}, over Mathlib \cite{mathlib} in Lean~4 \cite{lean4}. It has 169 lines, 37 of them the module docstring. With Lean v4.37.0-rc1 and the Mathlib tag of the same name, \code{lake build Formal.Mo337612} checks it in 12~s on an Apple M3 laptop (8 cores, 24~GB). The proof has no \code{sorry}, and \code{\#print axioms} lists \code{propext}, \code{Classical.choice} and \code{Quot.sound}. % [C2] [C3] Web searches in November 2026 for formalizations in Lean, Isabelle and Coq (Rocq), including the Isabelle Archive of Formal Proofs, found none of this bound or of Schur's comparison theorem. Mathlib does not define the curvature of a plane curve: pull request \#36731 \cite{pr}, which adds the Frénet frame and the signed curvature of plane curves, was open on 28 November 2026. The nearest Lean work on plane curves found in the search is Samarakkody's formalization of the isoperimetric inequality in the plane \cite{iso}. % [C6] [C7] Lean checks the exact answer for every $l\ge 0$: the theorem gives the value $0$ for $l>2\pi$ and covers $l=2\pi$, where the endpoints lie at distance $\pi$ from the midpoint and the hypothesis does not apply to them. Its class of paths is the one in the question, and the extension of a path on $[0,l]$ to $\mathbb{R}$ is the only step that Lean does not check. For formalization, the statement gives a way to write a comparison bound of this kind in Mathlib with one derivative and the unoriented angle, before Mathlib defines the curvature of a plane curve. \section{The Formal Statement} \code{Admissible} encodes the conditions of the question, and \code{main} states the answer; the speed and angle conditions apply on $[0,l]$ only. \begin{verbatim} def Admissible (l : ℝ) (γ : ℝ → EuclideanSpace ℝ (Fin 2)) : Prop := ContDiff ℝ 1 γ ∧ (∀ t ∈ Set.Icc 0 l, ‖deriv γ t‖ = 1) ∧ ∀ t ∈ Set.Icc 0 l, ∀ s ∈ Set.Icc 0 l, t < s → s < t + π → InnerProductGeometry.angle (deriv γ t) (deriv γ s) ≤ s - t theorem main (l : ℝ) (hl : 0 ≤ l) : IsLeast {d | ∃ γ, Admissible l γ ∧ d = ‖γ l - γ 0‖} (if l ≤ 2 * π then 2 * Real.sin (l / 2) else 0) \end{verbatim} The plane is \code{EuclideanSpace ℝ (Fin 2)}, with the Euclidean norm and inner product. The path is a map on all of $\mathbb{R}$ and is $C^1$ there, so \code{deriv γ} is the two-sided derivative at every point, including $0$ and $l$. A $C^1$ path on $[0,l]$ extends to $\mathbb{R}$ along its end tangents, so the class of paths is the one in the question; the docstring states this extension, and the file does not prove it. Unit speed, $\lVert\gamma'(t)\rVert=1$ on $[0,l]$, makes $l$ the length of $\gamma$ without a definition of arc length. The angle is Mathlib's unoriented angle, $\arccos\bigl(\langle x,y\rangle/(\lVert x\rVert\lVert y\rVert)\bigr)$, with values in $[0,\pi]$. The condition therefore involves $\gamma'$ only: the file has no second derivative and no curvature. For $s-t\ge\pi$ the condition holds for any two vectors, since the angle is at most $\pi$, so the bound $s2\pi$ the radius $l/(2\pi)$ exceeds 1, and the path is back at its start at $t=l$, since $l/r=2\pi$ (\code{circ\_closed}). The inner products and norms go through two lemmas: \code{inner\_e} computes $\langle a e_0+b e_1, c e_0+d e_1\rangle = ac+bd$ by \code{simp} with \code{EuclideanSpace.inner\_single\_left}, and \code{norm\_e\_sq} derives the squared norm from it. The attainment part, lines 52--108, takes 57 of the 169 lines. \section{The Lower Bound} Let $0\le l<2\pi$, $m=l/2$ and $u=\gamma'(m)$. For $s\in[0,l]$, $|s-m|\le l/2<\pi$, so the hypothesis, applied to the pair $(m,s)$ or $(s,m)$, gives $\angle(u,\gamma'(s))\le|s-m|$. Both sides lie in $[0,\pi]$, where $\cos$ decreases, and both vectors are unit vectors, so $\langle u,\gamma'(s)\rangle=\cos\angle(u,\gamma'(s))\ge\cos(s-m)$. Then \[ \lVert\gamma(l)-\gamma(0)\rVert \ge \langle u,\gamma(l)-\gamma(0)\rangle = \int_0^l \langle u,\gamma'(s)\rangle\,ds \ge \int_0^l \cos(s-m)\,ds = 2\sin(l/2). \] This is the projection argument of Chern's proof of Schur's theorem \cite[p.~36]{chern}, which Kusner and Sullivan use for Lemma~5.1 of \cite{ks}, with the unit circle as the comparison arc: the tangent of a circular arc at its midpoint is parallel to its chord. % [C5] The lemma \code{lower\_bound} follows these steps in 39 lines (110--148). The pointwise bound splits on \code{lt\_trichotomy m s}. For $m ⟪u, γ l⟫}, with an implicit binder, and the same \code{simpa} closes the derivative goal. The file passes \code{(f := fun x => ⟪u, γ x⟫)} to \code{refine}, so the goal shows the function as written. The derivative written as the composition of \code{innerSL ℝ u} with $\gamma$ does not close after \code{simp}, while \code{HasDerivAt.inner} with a constant first factor does. The theorem \code{main} joins the parts in 15 lines. For $l=2\pi$ the endpoints $s=0$ and $s=l$ lie at distance $\pi$ from $m$, where the hypothesis, stated for $s2\pi$. Using the bound $\angle\le\pi$ at these two endpoints would remove the case split. The proof of \code{lower\_bound} uses no coordinates, only norms, inner products and Mathlib's angle, which exist in every real inner product space. Its statement fixes the plane through \code{Admissible}, as the question does. Schur's theorem holds in $\mathbb{R}^n$ \cite{sullivan}, and the same argument applies there. \section{Limitations} The theorem is a known result; the file adds a machine-checked proof of it. Every lemma is local to the file and stated for the plane, so none of them is ready for Mathlib as it stands. The statement covers plane paths given on all of $\mathbb{R}$, and the file does not formalize the reduction from paths on $[0,l]$. For a $C^2$ unit-speed path, $\lVert\gamma''\rVert\le 1$ implies the angle condition. The file does not state this link, which current Mathlib can express with \code{deriv (deriv γ)}, without the curvature of pull request \#36731 \cite{pr}. The search for earlier formalizations covered web search results and the Isabelle Archive of Formal Proofs, so it would miss Lean code that search engines do not index. \section*{Declarations} \textbf{Supplementary material.} The Lean file \code{Formal/Mo337612.lean} (169 lines, Lean v4.37.0-rc1, Mathlib v4.37.0-rc1) is in \url{https://github.com/IOLIBRI/mo337612-lean}, tag \code{v1.0} (commit \code{0f6443e}).\\ \textbf{Funding.} None.\quad \textbf{Competing interests.} None.\quad \textbf{Ethics.} No human or animal subjects.\\ \textbf{Author contributions.} G.~E.~Kang is the sole author. \begin{thebibliography}{10} \raggedright \bibitem{mo} eryb, ``Lower bound of the distance between the endpoints of an average-curvature-constrained path of a given length,'' MathOverflow, question 337612, Aug.~4, 2019, and answer 338192, Aug.~12, 2019. Accessed: Nov.~28, 2026. [Online]. Available: \url{https://mathoverflow.net/questions/337612}, \url{https://mathoverflow.net/a/338192} \bibitem{dubins} L.~E. Dubins, ``On curves of minimal length with a constraint on average curvature, and with prescribed initial and terminal positions and tangents,'' \emph{Amer.\ J.\ Math.}, vol.~79, no.~3, pp.~497--516, Jul.\ 1957, doi: 10.2307/2372560. \bibitem{ekp} S.~Eriksson-Bique, D.~Kirkpatrick, and V.~Polishchuk, ``Discrete Dubins paths,'' arXiv:1211.2365, 2012, doi: 10.48550/arXiv.1211.2365. \bibitem{ks} R.~B. Kusner and J.~M. Sullivan, ``On distortion and thickness of knots,'' in \emph{Topology and Geometry in Polymer Science}, The IMA Volumes in Mathematics and its Applications, vol.~103. New York, NY, USA: Springer, 1998, pp.~67--76, doi: 10.1007/978-1-4612-1712-1\_7, arXiv:dg-ga/9702001. \bibitem{schur} A.~Schur, ``Über die Schwarzsche Extremaleigenschaft des Kreises unter den Kurven konstanter Krümmung,'' \emph{Math.\ Ann.}, vol.~83, no.~1--2, pp.~143--148, Mar.\ 1921, doi: 10.1007/BF01464234. \bibitem{chern} S.-S. Chern, ``Curves and surfaces in Euclidean space,'' in \emph{Studies in Global Geometry and Analysis}, S.-S. Chern, Ed., MAA Studies in Mathematics, vol.~4. Buffalo, NY, USA: Math.\ Assoc.\ America, 1967, pp.~16--56. \bibitem{sullivan} J.~M. Sullivan, ``Curves of finite total curvature,'' in \emph{Discrete Differential Geometry}, A.~I. Bobenko, J.~M. Sullivan, P.~Schröder, and G.~M. Ziegler, Eds., Oberwolfach Seminars, vol.~38. Basel, Switzerland: Birkhäuser, 2008, pp.~137--161, doi: 10.1007/978-3-7643-8621-4\_7, arXiv:math/0606007. \bibitem{mathlib} The mathlib Community, ``The Lean mathematical library,'' in \emph{Proc.\ 9th ACM SIGPLAN Int.\ Conf.\ Certified Programs and Proofs (CPP 2020)}, New Orleans, LA, USA, 2020, pp.~367--381, doi: 10.1145/3372885.3373824. \bibitem{lean4} L.~de~Moura and S.~Ullrich, ``The Lean 4 theorem prover and programming language,'' in \emph{Automated Deduction -- CADE 28}, A.~Platzer and G.~Sutcliffe, Eds., LNCS, vol.~12699. Cham, Switzerland: Springer, 2021, pp.~625--635, doi: 10.1007/978-3-030-79876-5\_37. \bibitem{pr} michael-novak-math, ``feat: Frénet moving frame and Frénet equation for plane curves,'' Mathlib pull request \#36731, opened Mar.~16, 2026. Accessed: Nov.~28, 2026. [Online]. Available: \url{https://github.com/leanprover-community/mathlib4/pull/36731} \bibitem{iso} M.~Samarakkody, ``Formalizing the classical isoperimetric inequality in the two-dimensional case,'' arXiv:2603.14663, 2026, doi: 10.48550/arXiv.2603.14663. \end{thebibliography} \end{document}