/- 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 FormalConjecturesUtil /-! # Erdős Problem 206 *References:* - [erdosproblems.com/206](https://www.erdosproblems.com/206) - [ErGr80] Erdős, P. and Graham, R., *Old and new problems and results in combinatorial number theory*. Monographies de L'Enseignement Mathématique (1980). - [Cu22] Curtiss, D. R., *On Kellogg's Diophantine Problem*. Amer. Math. Monthly (1922), 380-387. - [Er50b] Erdős, Pál, *On a Diophantine equation*. Mat. Lapok (1950), 192-210. - [Na23] Nathanson, M., *Underapproximation by Egyptian fractions*. J. Number Theory (2023), 208-234. - [Ch23b] Chu, H. V., *A threshold for the best two-term underapproximation by Egyptian fractions*. arXiv:2306.12564 (2023). - [Ko24b] Kovač, V., *On eventually greedy best underapproximations by Egyptian fractions*. arXiv:2406.07218 (2024). -/ @[expose] public section open MeasureTheory namespace Erdos206 /- Formalization notes: - The problem's greedy recursion ($R_{n+1}(x)=R_n(x)+1/m$ with $m$ minimal such that $m$ does not appear in $R_n(x)$ and the right-hand side is $ 0 ∧ ∃ (m : ℕ → ℕ), StrictMono m ∧ (∀ k, 0 < m k) ∧ ∃ n₀ : ℕ, ∀ n ≥ n₀, IsBestNTerm (Finset.image m (Finset.range n)) n x set_option linter.style.formal_proof_palomar false in /-- Let $x>0$ be a real number. For any $n\geq 1$ let $$R_n(x) = \sum_{i=1}^n\frac{1}{m_i}