/-
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.
-/
module
public import FormalConjecturesUtilTao's Optimization Constant 7a / The Irrationality Measure of $\pi$
References:
Tao's Optimization Constant 7a
[D1842] Dirichlet, L. G. P., Verallgemeinerung eines Satzes aus der Lehre von den Kettenbrüchen nebst einigen Anwendungen auf die Theorie der Zahlen. Sitzungsberichte der Preussischen Akademie der Wissenschaften (1842), 93–95.
[M1953] Mahler, K., On the approximation of $\pi$. Nederl. Akad. Wetensch. Proc. Ser. A 56 = Indag. Math. 15 (1953), 30–42.
[R1955] Roth, K. F., Rational approximations to algebraic numbers. Mathematika 2 (1955), 1–20.
[RV1993] Rhin, G. and Viola, C., On the irrationality measure of $\zeta(2)$. Ann. Inst. Fourier 43 (1993), 85–109.
[ZZ2020] Zeilberger, D. and Zudilin, W., The irrationality measure of $\pi$ is at most $7.103205334137\ldots$. Moscow J. Comb. Number Theory 9 (2020), 407–419. arXiv:1912.06345
[OAI2026] OpenAI, The irrationality exponent of $\pi$ is 2, 2026.
@[expose] public sectionnamespace Constant7aopen Real ENNReal Set NNRealThe irrationality exponent of a real number.
noncomputable def irrationalityExponent (x : ℝ) : ℝ≥0∞ :=
sSup ((↑) '' {p : ℝ≥0 | LiouvilleWith p x})The irrationality exponent of a rational number is one.
@[category API, AMS 11]
theorem irrationalityExponent_ratCast (x : ℚ) : irrationalityExponent x = 1 := x:ℚ⊢ irrationalityExponent ↑x = 1
x:ℚ⊢ sSup (ofNNReal '' {p | LiouvilleWith ↑p ↑x}) = 1
x:ℚ⊢ sSup (ofNNReal '' {p | LiouvilleWith ↑p ↑x}) ≤ 1x:ℚ⊢ 1 ≤ sSup (ofNNReal '' {p | LiouvilleWith ↑p ↑x})
x:ℚ⊢ sSup (ofNNReal '' {p | LiouvilleWith ↑p ↑x}) ≤ 1 x:ℚ⊢ ∀ (a : ℝ≥0), LiouvilleWith ↑a ↑x → a ≤ 1
x:ℚa✝:ℝ≥0h:LiouvilleWith ↑a✝ ↑x⊢ a✝ ≤ 1
All goals completed! 🐙
x:ℚ⊢ 1 ≤ sSup (ofNNReal '' {p | LiouvilleWith ↑p ↑x}) x:ℚ⊢ 1 ∈ ofNNReal '' {p | LiouvilleWith ↑p ↑x}
x:ℚ⊢ LiouvilleWith 1 ↑x
All goals completed! 🐙refine_2.inl x:ℝz:ℝ≥0∞h:∀ (z : ℝ≥0), LiouvilleWith (↑z) xzy:z < ∞⊢ z < z + 1
exact lt_add_right zy.ne one_ne_zero All goals completed! 🐙
obtain ⟨a, za, ay⟩ := DenselyOrdered.dense z y zy refine_2.inr x:ℝy:ℝ≥0∞h:∀ (z : ℝ≥0), ↑z < y → LiouvilleWith (↑z) xz:ℝ≥0∞zy:z < yhy:y ≠ ∞a:ℝ≥0∞za:z < aay:a < y⊢ ∃ a, LiouvilleWith (↑a) x ∧ z < ↑a
refine ⟨a.toNNReal, ?_, ?_⟩ refine_2.inr.refine_1 x:ℝy:ℝ≥0∞h:∀ (z : ℝ≥0), ↑z < y → LiouvilleWith (↑z) xz:ℝ≥0∞zy:z < yhy:y ≠ ∞a:ℝ≥0∞za:z < aay:a < y⊢ LiouvilleWith (↑a.toNNReal) xrefine_2.inr.refine_2 x:ℝy:ℝ≥0∞h:∀ (z : ℝ≥0), ↑z < y → LiouvilleWith (↑z) xz:ℝ≥0∞zy:z < yhy:y ≠ ∞a:ℝ≥0∞za:z < aay:a < y⊢ z < ↑a.toNNReal
· refine_2.inr.refine_1 x:ℝy:ℝ≥0∞h:∀ (z : ℝ≥0), ↑z < y → LiouvilleWith (↑z) xz:ℝ≥0∞zy:z < yhy:y ≠ ∞a:ℝ≥0∞za:z < aay:a < y⊢ LiouvilleWith (↑a.toNNReal) x apply h refine_2.inr.refine_1 x:ℝy:ℝ≥0∞h:∀ (z : ℝ≥0), ↑z < y → LiouvilleWith (↑z) xz:ℝ≥0∞zy:z < yhy:y ≠ ∞a:ℝ≥0∞za:z < aay:a < y⊢ ↑a.toNNReal < y
rwa [ENNReal.coe_toNNReal (by x:ℝy:ℝ≥0∞h:∀ (z : ℝ≥0), ↑z < y → LiouvilleWith (↑z) xz:ℝ≥0∞zy:z < yhy:y ≠ ∞a:ℝ≥0∞za:z < aay:a < y⊢ a ≠ ∞ grind All goals completed! 🐙)] refine_2.inr.refine_1 x:ℝy:ℝ≥0∞h:∀ (z : ℝ≥0), ↑z < y → LiouvilleWith (↑z) xz:ℝ≥0∞zy:z < yhy:y ≠ ∞a:ℝ≥0∞za:z < aay:a < y⊢ a < y
· refine_2.inr.refine_2 x:ℝy:ℝ≥0∞h:∀ (z : ℝ≥0), ↑z < y → LiouvilleWith (↑z) xz:ℝ≥0∞zy:z < yhy:y ≠ ∞a:ℝ≥0∞za:z < aay:a < y⊢ z < ↑a.toNNReal rwa [ENNReal.coe_toNNReal (by x:ℝy:ℝ≥0∞h:∀ (z : ℝ≥0), ↑z < y → LiouvilleWith (↑z) xz:ℝ≥0∞zy:z < yhy:y ≠ ∞a:ℝ≥0∞za:z < aay:a < y⊢ a ≠ ∞ grind All goals completed! 🐙)] refine_2.inr.refine_2 x:ℝy:ℝ≥0∞h:∀ (z : ℝ≥0), ↑z < y → LiouvilleWith (↑z) xz:ℝ≥0∞zy:z < yhy:y ≠ ∞a:ℝ≥0∞za:z < aay:a < y⊢ z < a@[category API, AMS 11]
theorem irrationalityExponent_eq_top_iff (x : ℝ) : irrationalityExponent x = ⊤ ↔ Liouville x := by x:ℝ⊢ irrationalityExponent x = ∞ ↔ Liouville x
simp_rw [ x:ℝ⊢ irrationalityExponent x = ∞ ↔ Liouville x← ENNReal.not_lt_top, x:ℝ⊢ ¬irrationalityExponent x < ∞ ↔ Liouville x not_lt, x:ℝ⊢ ∞ ≤ irrationalityExponent x ↔ Liouville x le_irrationalityExponent_iff, x:ℝ⊢ (∀ (z : ℝ≥0), ↑z < ∞ → LiouvilleWith (↑z) x) ↔ Liouville x ← forall_liouvilleWith_iff, x:ℝ⊢ (∀ (z : ℝ≥0), ↑z < ∞ → LiouvilleWith (↑z) x) ↔ ∀ (p : ℝ), LiouvilleWith p x
coe_lt_top, x:ℝ⊢ (∀ (z : ℝ≥0), True → LiouvilleWith (↑z) x) ↔ ∀ (p : ℝ), LiouvilleWith p x forall_const x:ℝ⊢ (∀ (z : ℝ≥0), LiouvilleWith (↑z) x) ↔ ∀ (p : ℝ), LiouvilleWith p x]
exact ⟨fun h p ↦ (h p.toNNReal).mono <| le_coe_toNNReal p, fun h z ↦ h z⟩ All goals completed! 🐙Every irrational real number has irrationality exponent at least two by Dirichlet's approximation theorem [D1842].
@[category textbook, AMS 11]
theorem two_le_irrationalityExponent {x : ℝ} (hx : Irrational x) :
2 ≤ irrationalityExponent x := by x:ℝhx:Irrational x⊢ 2 ≤ irrationalityExponent x
sorry All goals completed! 🐙Every algebraic real number has irrationality exponent at most two. For irrational algebraic numbers, this is Roth's theorem [R1955].
@[category research solved, AMS 11]
theorem irrationalityExponent_of_algebraic {x : ℝ} (hx : IsAlgebraic ℚ x) :
irrationalityExponent x ≤ 2 := by x:ℝhx:IsAlgebraic ℚ x⊢ irrationalityExponent x ≤ 2
sorry All goals completed! 🐙Tao's Optimization Constant 7a / The irrationality measure of $\pi$.
@[optimization_constant "7a"]
noncomputable def C7a : ℝ≥0∞ := irrationalityExponent πThe sharp lower bound, given by Dirichlet's theorem [D1842]. This bound holds for every irrational real number.
@[category textbook, AMS 11]
theorem c7a_lower_bound : 2 ≤ C7a := two_le_irrationalityExponent irrational_piThe first known upper bound, proved by Mahler in [M1953]. This was the first proof that $C_{7a}$ is finite, or equivalently that $\pi$ is not a Liouville number.
@[category research solved, AMS 11]
theorem c7a_le_42 : C7a ≤ 42 := by ⊢ C7a ≤ 42
sorry All goals completed! 🐙An intermediate upper bound proved by Rhin and Viola in [RV1993]. It follows from an effective irrationality measure for $\zeta(2) = \pi^2 / 6$.
@[category research solved, AMS 11]
theorem c7a_lt_14_797075 : C7a < 14.797075 := by ⊢ C7a < 14.797075
sorry All goals completed! 🐙The best upper bound before [OAI2026], proved by Zeilberger and Zudilin in [ZZ2020].
@[category research solved, AMS 11]
theorem c7a_upper_bound : C7a < 7.103205334138 := by ⊢ C7a < 7.103205334138
sorry All goals completed! 🐙The irrationality measure of $\pi$ is exactly $2$, proved by OpenAI in [OAI2026].
@[category research solved, AMS 11, formal_proof using lean4 at
"https://github.com/openai/math/blob/main/lean/ComparatorChallenges/PiExponent.lean"]
theorem c7a_eq_two : C7a = 2 := by ⊢ C7a = 2
sorry All goals completed! 🐙end Constant7a