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 /-- Eneström–Kakeya: `1 + z/2 + z²/3` (coefficients `1 ≥ 1/2 ≥ 1/3 > 0`) has no zero in the open unit disc. -/ example {z : ℂ} (hz : ‖z‖ < 1) : (1 : ℂ) + z / 2 + z ^ 2 / 3 ≠ 0 := by have h := enestrom_kakeya_ne_zero (n := 2) (fun k => 1 / ((k : ℝ) + 1)) (fun k _ => by positivity) (fun k _ => one_div_le_one_div_of_le (by positivity) (by push_cast; linarith)) hz convert h using 1 simp only [Finset.sum_range_succ, Finset.sum_range_zero] push_cast ringSteps 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).
The Eneström–Kakeya theorem: a polynomial \(∑_{k ≤ n}\) a_k z^k with real coefficients a_0 ≥ a_1 ≥ ⋯ ≥ a_n > 0 has no zero in the open unit disc ‖z‖ < 1.
Lean statement
theorem enestrom_kakeya_ne_zero {n : ℕ} (a : ℕ → ℝ) (hpos : ∀ k ≤ n, 0 < a k)
(hmono : ∀ k, k < n → a (k + 1) ≤ a k) {z : ℂ} (hz : ‖z‖ < 1) :
∑ k ∈ Finset.range (n + 1), (a k : ℂ) * z ^ k ≠ 0Links
Lean docstring
The Eneström–Kakeya theorem. A polynomial ∑_{k=0}^n a_k z^k with real coefficients a_0 ≥ a_1 ≥ ⋯ ≥ a_n > 0 has no zero in the open unit disc ‖z‖ < 1. The proof multiplies by 1 − z, telescopes and applies the triangle inequality. (In the other common form, increasing positive coefficients give no zero outside the closed unit disc; it follows by reversing the polynomial.)
- Archive:
Dilog.enestrom_kakeya(Formalizations.Analysis.Polynomial.EnestromKakeya, in the namespace of the dilogarithm notes of the same archive; the module also has the boundary case,Dilog.enestrom_kakeya_boundary). - Classical reference: G. Eneström (1893), S. Kakeya, Tôhoku Math. J. 2 (1912); Q. I. Rahman, G. Schmeisser, Analytic Theory of Polynomials (2002).
- Example:
1 + z/2 + z²/3(coefficients1 ≥ 1/2 ≥ 1/3 > 0) has no zero with‖z‖ < 1.
Upstream
a zero-localization lemma for polynomials with monotone coefficients; the archive module imports the dilogarithm module, whose names its proof does not use; to be split before any PR
Depends on, in this repository
Formalizations.Analysis.SpecialFunctions.Dilogarithm.Basic