Use this theorem
Create a project
lake +leanprover/lean4:v4.35.0 new myproject std.toml cd myprojectStandard template, not
math: themathtemplate adds its own Mathlib requirement pinned to the Lean release tag, not to the Mathlib commit this package is built and tested with, so you would get a second, different Mathlib. Mathlib comes in through this package. Skip this step in an existing project with the same Lean and Mathlib.Add the dependency to
lakefile.toml[[require]] name = "formalizations" git = "https://github.com/karlesmarin/formalizations" rev = "v0.15.0"Import the minimal module
import Formalizations.Reusable.AnalysisIn a file of the project, e.g.
Example.lean.Paste the example
open Formalizations.Reusable Real Set open MeasureTheory ProbabilityTheory in /-- The zero set of a solution of `y'' = x y` is not bounded below. -/ example (f f' : β β β) (hf : β x, HasDerivAt f (f' x) x) (hf' : β x, HasDerivAt f' (x * f x) x) : Β¬ BddBelow {x | f x = 0} := by rintro β¨m, hmβ© obtain β¨x, hx, h0β© := airy_eq_zeros_unbounded_below f f' hf hf' m exact absurd (hm h0) (not_le.2 hx)Steps 3 and 4 together are a complete Lean file:
FormalizationsTest/ReusableAnalysisExample.leanat v0.15.0, compiled by the CI.Fetch and check
lake update lake lean Example.leanlake updatefetches this package and Mathlib, and Mathlib's update hook downloads the compiled Mathlib (lake exe cache get).lake lean Example.leanbuilds the imports of the file (steps 3 and 4) and checks it. If the file belongs to alean_libof your project,lake build <lib>does the same. Avoid a barelake buildin a project from the standard template: its default target is the executable, whose link compiles every imported Mathlib module to native code. Same versions required: Leanv4.35.0, Mathlibf0b4c81.
Alternative: import Formalizations.Reusable imports the whole layer (all areas).
Every solution f of the Airy equation f'' = x f on β has zeros unbounded below: for every M there is x < M with f x = 0.
Lean statement
theorem airy_eq_zeros_unbounded_below (f f' : β β β)
(hf : β x, HasDerivAt f (f' x) x)
(hf' : β x, HasDerivAt f' (x * f x) x) (M : β) :
β x, x < M β§ f x = 0Links
Lean docstring
Oscillation of the Airy equation. If f is differentiable with derivative f', and f' is differentiable with derivative x β¦ x f x (that is, f'' = x f everywhere), then f has a zero below every bound: for every M there is x < M with f x = 0. This holds for every solution, including the zero solution; the proof is a Sturm comparison with sin (βc (x β a)) built from Rolle's theorem and the intermediate value theorem (Mathlib has no Sturm theory).
- Archive:
Airy.sturm_unbounded_zeros(Formalizations.Analysis.SpecialFunctions.Airy.Basic). - Paper: C. MarΓn, How a Falling Particle Counts Its Floors (2026), doi:10.5281/zenodo.20787671.
- Classical reference: DLMF Β§9.9 (zeros of the Airy functions); E. A. Coddington, N. Levinson, Theory of Ordinary Differential Equations, ch. 8 (Sturm comparison).
- Example: for a solution
fwithhf, hf',airy_eq_zeros_unbounded_below f f' hf hf' 0gives a negative zero off.
Upstream
Mathlib has no Sturm comparison theory; the right upstream object is a general Sturm comparison theorem, not this instance
Depends on, in this repository
None besides the archive module (repo_dependencies = []).