/- Copyright 2025 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 1038

Reference:

    erdosproblems.com/1038

    [Tao25] Tao, Terence. Sublevel Sets of Logarithmic Potentials. Terry Tao’s Blog, Dec. 2025 (https://terrytao.wordpress.com/wp-content/uploads/2025/12/erdos-1038-1.pdf)

    [EHP58] Erdős, P., Herzog, F., Piranian, G. Metric properties of polynomials. J. Analyse Math. 6 (1958), 125--148.

@[expose] public sectionopen scoped Real ENNRealopen MeasureTheory Setnamespace Erdos1038def erdos_1038.parts.i.answer : ℝ≥0∞ := sorry

What is the infimum of |{x ∈ ℝ : |f x| < 1}| over all nonconstant monic polynomials f such that all of its roots are real and contained in [-1,1]?

@[category research open, question value, AMS 28] theorem erdos_1038.parts.i : erdos_1038.parts.i.answer = ⨅ f : {f : Polynomial ℝ // f.Monic ∧ f ≠ 1 ∧ (f.roots.filter fun x => x ∈ Set.Icc (-1 : ℝ) 1).card = f.natDegree}, volume {x | |f.1.eval x| < 1} := ⊢ i.answer = ⨅ f, volume {x | |Polynomial.eval x ↑f| < 1} All goals completed! 🐙

The supremum of |{x ∈ ℝ : |f x| < 1}| over all monic polynomials f such that all of its roots are real and contained in [-1,1] is 2 * 2 ^ (1 / 2). This is proved in [Tao25].

@[category research solved, AMS 28] theorem erdos_1038.parts.ii : 2 * 2 ^ (1 / 2 : ℝ) = ⨆ f : {f : Polynomial ℝ // f.Monic ∧ (f.roots.filter fun x => x ∈ Set.Icc (-1 : ℝ) 1).card = f.natDegree}, volume {x | |f.1.eval x| < 1} := ⊢ 2 * 2 ^ (1 / 2) = ⨆ f, volume {x | |Polynomial.eval x ↑f| < 1} All goals completed! 🐙

The infimum of |{x ∈ ℝ : |f x| < 1}| over all nonconstant monic polynomials f such that all of its roots are real and contained in [-1,1] is < 1.835.

@[category research solved, AMS 28] theorem erdos_1038.variants.inf_upperBound : ⨅ f : {f : Polynomial ℝ // f.Monic ∧ f ≠ 1 ∧ (f.roots.filter fun x => x ∈ Set.Icc (-1 : ℝ) 1).card = f.natDegree}, volume {x | |f.1.eval x| < 1} < 1.835 := ⊢ ⨅ f, volume {x | |Polynomial.eval x ↑f| < 1} < 1.835 All goals completed! 🐙

The infimum of |{x ∈ ℝ : |f x| < 1}| over all nonconstant monic polynomials f such that all of its roots are real and contained in [-1,1] is ≥ 2 ^ (4 / 3) - 1.

@[category research solved, AMS 28] theorem erdos_1038.variants.inf_lowerBound : 2 ^ (4 / 3 : ℝ) - 1 ≤ ⨅ f : {f : Polynomial ℝ // f.Monic ∧ f ≠ 1 ∧ (f.roots.filter fun x => x ∈ Set.Icc (-1 : ℝ) 1).card = f.natDegree}, volume {x | |f.1.eval x| < 1} := ⊢ 2 ^ (4 / 3) - 1 ≤ ⨅ f, volume {x | |Polynomial.eval x ↑f| < 1} All goals completed! 🐙

For a monic quadratic with roots at distance at most two, the sublevel measure is $2\sqrt{1+d^2}$, where $2|d|$ is the distance between the roots. This gives the degree-two case of the sublevel-set problem in [Tao25].

m:ℝd:ℝhd:|d| ≤ 1hd2:d ^ 2 ≤ 1hs:0 < √(1 + d ^ 2)hsq:√(1 + d ^ 2) ^ 2 = 1 + d ^ 2I:Set ℝ := Ioo (m - √(1 + d ^ 2)) (m + √(1 + d ^ 2))hupper:{x | |(x - m) ^ 2 - d ^ 2| < 1} ⊆ Ihlower:I \ {m} ⊆ {x | |(x - m) ^ 2 - d ^ 2| < 1}hI:volume I = ENNReal.ofReal (2 * √(1 + d ^ 2))⊢ volume {x | |(x - m) ^ 2 - d ^ 2| < 1} = ENNReal.ofReal (2 * √(1 + d ^ 2)) m:ℝd:ℝhd:|d| ≤ 1hd2:d ^ 2 ≤ 1hs:0 < √(1 + d ^ 2)hsq:√(1 + d ^ 2) ^ 2 = 1 + d ^ 2I:Set ℝ := Ioo (m - √(1 + d ^ 2)) (m + √(1 + d ^ 2))hupper:{x | |(x - m) ^ 2 - d ^ 2| < 1} ⊆ Ihlower:I \ {m} ⊆ {x | |(x - m) ^ 2 - d ^ 2| < 1}hI:volume I = ENNReal.ofReal (2 * √(1 + d ^ 2))⊢ volume {x | |(x - m) ^ 2 - d ^ 2| < 1} ≤ ENNReal.ofReal (2 * √(1 + d ^ 2))m:ℝd:ℝhd:|d| ≤ 1hd2:d ^ 2 ≤ 1hs:0 < √(1 + d ^ 2)hsq:√(1 + d ^ 2) ^ 2 = 1 + d ^ 2I:Set ℝ := Ioo (m - √(1 + d ^ 2)) (m + √(1 + d ^ 2))hupper:{x | |(x - m) ^ 2 - d ^ 2| < 1} ⊆ Ihlower:I \ {m} ⊆ {x | |(x - m) ^ 2 - d ^ 2| < 1}hI:volume I = ENNReal.ofReal (2 * √(1 + d ^ 2))⊢ ENNReal.ofReal (2 * √(1 + d ^ 2)) ≤ volume {x | |(x - m) ^ 2 - d ^ 2| < 1} m:ℝd:ℝhd:|d| ≤ 1hd2:d ^ 2 ≤ 1hs:0 < √(1 + d ^ 2)hsq:√(1 + d ^ 2) ^ 2 = 1 + d ^ 2I:Set ℝ := Ioo (m - √(1 + d ^ 2)) (m + √(1 + d ^ 2))hupper:{x | |(x - m) ^ 2 - d ^ 2| < 1} ⊆ Ihlower:I \ {m} ⊆ {x | |(x - m) ^ 2 - d ^ 2| < 1}hI:volume I = ENNReal.ofReal (2 * √(1 + d ^ 2))⊢ volume {x | |(x - m) ^ 2 - d ^ 2| < 1} ≤ ENNReal.ofReal (2 * √(1 + d ^ 2)) calc _ ≤ volume I := measure_mono hupper _ = _ := hI m:ℝd:ℝhd:|d| ≤ 1hd2:d ^ 2 ≤ 1hs:0 < √(1 + d ^ 2)hsq:√(1 + d ^ 2) ^ 2 = 1 + d ^ 2I:Set ℝ := Ioo (m - √(1 + d ^ 2)) (m + √(1 + d ^ 2))hupper:{x | |(x - m) ^ 2 - d ^ 2| < 1} ⊆ Ihlower:I \ {m} ⊆ {x | |(x - m) ^ 2 - d ^ 2| < 1}hI:volume I = ENNReal.ofReal (2 * √(1 + d ^ 2))⊢ ENNReal.ofReal (2 * √(1 + d ^ 2)) ≤ volume {x | |(x - m) ^ 2 - d ^ 2| < 1} m:ℝd:ℝhd:|d| ≤ 1hd2:d ^ 2 ≤ 1hs:0 < √(1 + d ^ 2)hsq:√(1 + d ^ 2) ^ 2 = 1 + d ^ 2I:Set ℝ := Ioo (m - √(1 + d ^ 2)) (m + √(1 + d ^ 2))hupper:{x | |(x - m) ^ 2 - d ^ 2| < 1} ⊆ Ihlower:I \ {m} ⊆ {x | |(x - m) ^ 2 - d ^ 2| < 1}hI:volume I = ENNReal.ofReal (2 * √(1 + d ^ 2))h:volume (I \ {m}) ≤ volume {x | |(x - m) ^ 2 - d ^ 2| < 1}⊢ ENNReal.ofReal (2 * √(1 + d ^ 2)) ≤ volume {x | |(x - m) ^ 2 - d ^ 2| < 1} rwa [measure_sdiff_null (m:ℝd:ℝhd:|d| ≤ 1hd2:d ^ 2 ≤ 1hs:0 < √(1 + d ^ 2)hsq:√(1 + d ^ 2) ^ 2 = 1 + d ^ 2I:Set ℝ := Ioo (m - √(1 + d ^ 2)) (m + √(1 + d ^ 2))hupper:{x | |(x - m) ^ 2 - d ^ 2| < 1} ⊆ Ihlower:I \ {m} ⊆ {x | |(x - m) ^ 2 - d ^ 2| < 1}hI:volume I = ENNReal.ofReal (2 * √(1 + d ^ 2))h:volume (I \ {m}) ≤ volume {x | |(x - m) ^ 2 - d ^ 2| < 1}⊢ volume {m} = 0 All goals completed! 🐙), m:ℝd:ℝhd:|d| ≤ 1hd2:d ^ 2 ≤ 1hs:0 < √(1 + d ^ 2)hsq:√(1 + d ^ 2) ^ 2 = 1 + d ^ 2I:Set ℝ := Ioo (m - √(1 + d ^ 2)) (m + √(1 + d ^ 2))hupper:{x | |(x - m) ^ 2 - d ^ 2| < 1} ⊆ Ihlower:I \ {m} ⊆ {x | |(x - m) ^ 2 - d ^ 2| < 1}hI:volume I = ENNReal.ofReal (2 * √(1 + d ^ 2))h:ENNReal.ofReal (2 * √(1 + d ^ 2)) ≤ volume {x | |(x - m) ^ 2 - d ^ 2| < 1}⊢ ENNReal.ofReal (2 * √(1 + d ^ 2)) ≤ volume {x | |(x - m) ^ 2 - d ^ 2| < 1}m:ℝd:ℝhd:|d| ≤ 1hd2:d ^ 2 ≤ 1hs:0 < √(1 + d ^ 2)hsq:√(1 + d ^ 2) ^ 2 = 1 + d ^ 2I:Set ℝ := Ioo (m - √(1 + d ^ 2)) (m + √(1 + d ^ 2))hupper:{x | |(x - m) ^ 2 - d ^ 2| < 1} ⊆ Ihlower:I \ {m} ⊆ {x | |(x - m) ^ 2 - d ^ 2| < 1}hI:volume I = ENNReal.ofReal (2 * √(1 + d ^ 2))h:ENNReal.ofReal (2 * √(1 + d ^ 2)) ≤ volume {x | |(x - m) ^ 2 - d ^ 2| < 1}⊢ ENNReal.ofReal (2 * √(1 + d ^ 2)) ≤ volume {x | |(x - m) ^ 2 - d ^ 2| < 1} at h

The degree-two case of the supremum bound in [Tao25]: if $a,b\in[-1,1]$, the sublevel set of $(x-a)(x-b)$ has measure at most $2\sqrt{2}$.

a:ℝb:ℝha:|a| ≤ 1hb:|b| ≤ 1hd:|(a - b) / 2| ≤ 1hpoly:∀ (x : ℝ), (x - a) * (x - b) = (x - (a + b) / 2) ^ 2 - ((a - b) / 2) ^ 2hd2:((a - b) / 2) ^ 2 ≤ 1h:√(1 + ((a - b) / 2) ^ 2) ≤ √2⊢ 2 * √(1 + ((a - b) / 2) ^ 2) ≤ 2 * √2 All goals completed! 🐙

The admissible quadratic $x^2-1$, with roots $-1$ and $1$, attains the supremum value $2\sqrt{2}$ in [Tao25].

@[category textbook, AMS 28] theorem erdos_1038.variants.quadratic_extremizer : volume {x : ℝ | |x ^ 2 - 1| < 1} = ENNReal.ofReal (2 * Real.sqrt 2) := ⊢ volume {x | |x ^ 2 - 1| < 1} = ENNReal.ofReal (2 * √2) convert erdos_1038.variants.quadratic_sublevel_formula 0 1 (⊢ |1| ≤ 1 All goals completed! 🐙) using 1 ⊢ volume {x | |x ^ 2 - 1| < 1} = volume {x | |(x - 0) ^ 2 - 1 ^ 2| < 1}⊢ ENNReal.ofReal (2 * √2) = ENNReal.ofReal (2 * √(1 + 1 ^ 2)) All goals completed! 🐙open Polynomial in

The lower half of erdos_1038.parts.ii: the supremum is at least $2\sqrt{2}$, because the admissible polynomial $x^2-1$ has sublevel measure exactly $2\sqrt{2}$. The matching upper bound is proved in [Tao25].

hroots:(X ^ 2 - C 1).roots = {-1, 1}⊢ 2 * 2 ^ (1 / 2) ≤ ENNReal.ofReal 2 * ENNReal.ofReal 2 ^ (1 / 2) All goals completed! 🐙open Polynomial in

The infimum in erdos_1038.parts.i is strictly less than $2$, as observed in [EHP58]: for $f(x)=(x+1)(x-1)^3$ the sublevel set ${x : |f(x)| < 1}$ is contained in $(-1.108,-0.835)\cup(0,1.718)$, whose total length is $1.991$.

hmonic:((X + C 1) * (X - C 1) ^ 3).Monichdeg:((X + C 1) * (X - C 1) ^ 3).natDegree = 4hne:(X + C 1) * (X - C 1) ^ 3 ≠ 1hcard:(Multiset.filter (fun x ↦ x ∈ Icc (-1) 1) ((X + C 1) * (X - C 1) ^ 3).roots).card = ((X + C 1) * (X - C 1) ^ 3).natDegreehsub:{x | |(x + 1) * (x - 1) ^ 3| < 1} ⊆ Ioo (-277 / 250) (-167 / 200) ∪ Ioo 0 (859 / 500)⊢ -167 / 200 - -277 / 250 + (859 / 500 - 0) < ENNReal.toReal 2 All goals completed! 🐙end Erdos1038