Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Gap parity for split polynomials

Proved
CollapsibleCubics.even_card_roots_between

by quesswho · Sep 7, 2026 · Mathlib 0df444a (Lean v4.33.1)

algebraalgebraic-numbersnumber-theorypolynomials

Let f=a∏r∈R(x−r)f = a\prod_{r \in R}(x - r)f=a∏r∈R​(x−r) be a split rational polynomial, with a≠0a \neq 0a=0 and RRR a finite multiset of rational roots. Let x<yx < yx<y be real numbers, neither of them a root of fff, at which fff takes the same nonzero value:

f(x)=f(y)≠0.f(x) = f(y) \neq 0.f(x)=f(y)=0.

Then the number of roots of fff lying strictly between xxx and yyy, counted with multiplicity, is even.

The mechanism is the sign of fff: since fff splits over R\mathbb{R}R, it changes sign exactly at its roots, counted with multiplicity, so equal values at the two endpoints force an even number of sign changes in between.

The application is to the totally real case. If Δ=−4d3−27e2>0\Delta = -4d^3 - 27e^2 > 0Δ=−4d3−27e2>0, the cubic has three real conjugates α1<α2<α3\alpha_1 < \alpha_2 < \alpha_3α1​<α2​<α3​, and a collapsing fff takes the same nonzero rational value at all three. The theorem then says that each of the two gaps (α1,α2)(\alpha_1, \alpha_2)(α1​,α2​) and (α2,α3)(\alpha_2, \alpha_3)(α2​,α3​) contains an even number of roots of fff. This is the only archimedean constraint known when Δ>0\Delta > 0Δ>0 — the degree bound available for Δ<0\Delta < 0Δ<0 has no analogue there — and it halves the effective search space.

Formalization Note Roots are counted with multiplicity, as elements of the multiset RRR. The hypotheses are satisfiable but not always: for an fff that is injective on the relevant range, no such pair x<yx < yx<y exists and the statement is vacuous for that fff.

Preamble
import Definitions.Def_CollapsibleCubics_basic
Formal statement
import Definitions.Def_CollapsibleCubics_basic

namespace CollapsibleCubics
open Polynomial
theorem even_card_roots_between {f : ℚ[X]} {a : ℚ} {rs : Multiset ℚ} (ha : a ≠ 0)
    (hf : f = C a * (rs.map fun r => X - C r).prod)
    {x y : ℝ} (hxy : x < y) (hr : ∀ r ∈ rs, (r : ℝ) ≠ x ∧ (r : ℝ) ≠ y)
    (hval : (aeval x f : ℝ) = aeval y f) (hne : (aeval x f : ℝ) ≠ 0) :
    Even (rs.filter fun r : ℚ => x < (r : ℝ) ∧ (r : ℝ) < y).card := by sorry
end CollapsibleCubics
Source
Miles, *Collapsible algebraic numbers*, blog post, 2026-08-20, https://quesswho.github.io/miles-blog/2026/08/20/collapsible/ (definitions of *split* polynomial and of *1-collapsible*; statement that the degree-3 case of one-step collapsibility is open). Underlying problem: Griffin Macris, list of open problems, Problem 3, https://sites.google.com/view/griffinmacris/open-problems. Archimedean constraint in the totally real case (result L16).
Read-back

What the Lean code literally says, in plain math · claude-opus-5

Fix a nonzero rational number aaa (that is, a≠0a \neq 0a=0) and a finite multiset rsrsrs of rational numbers, and let fff be the polynomial with rational coefficients given by

f=a⋅∏r∈rs(X−r),f = a \cdot \prod_{r \in rs} (X - r),f=a⋅r∈rs∏​(X−r),

where the product runs over the elements of rsrsrs with multiplicity (so a rational appearing kkk times in rsrsrs contributes the factor (X−r)k(X-r)^k(X−r)k); in particular, if rsrsrs is empty the product is 111 and fff is the constant polynomial aaa. Note that fff is assumed to be equal to this product — it is not merely assumed to have this shape up to some further factor, and every root of fff is therefore accounted for by rsrsrs.

Now let xxx and yyy be real numbers with x<yx < yx<y, and evaluate fff at real arguments via the inclusion Q↪R\mathbb{Q} \hookrightarrow \mathbb{R}Q↪R, writing f(x),f(y)∈Rf(x), f(y) \in \mathbb{R}f(x),f(y)∈R. Assume:

  • (no root at the endpoints) for every rrr belonging to rsrsrs, the real number rrr satisfies r≠xr \neq xr=x and r≠yr \neq yr=y;
  • (equal values) f(x)=f(y)f(x) = f(y)f(x)=f(y) as real numbers;
  • (nonvanishing) f(x)≠0f(x) \neq 0f(x)=0 (hence also f(y)≠0f(y) \neq 0f(y)=0, by the previous assumption).

The conclusion is that the number

#{ r∈rs:x<r<y }\#\{\, r \in rs : x < r < y \,\}#{r∈rs:x<r<y}

is even, where the count is again taken with multiplicity: it is the cardinality of the sub-multiset of rsrsrs obtained by keeping exactly those entries rrr whose image in R\mathbb{R}R lies strictly between xxx and yyy (both inequalities strict, so entries equal to xxx or to yyy would be excluded — though the endpoint hypothesis already rules those out). "Even" here means the cardinality is divisible by 222, which includes the value 000; so the statement is satisfied in particular when no element of rsrsrs lies strictly inside the interval, e.g. when rsrsrs is empty.

Every quantity is a bound variable of the statement: fff, aaa, rsrsrs, xxx, yyy are all universally quantified, with fff, aaa, rsrsrs, xxx, yyy implicit and the five hypotheses above explicit. Note that the hypotheses can be simultaneously satisfiable and can also be jointly impossible for particular choices — for instance, for a fixed fff that is strictly monotone on the relevant range no pair x<yx < yx<y with f(x)=f(y)f(x) = f(y)f(x)=f(y) exists, and the statement is then vacuous for that fff.

Human review
  • Endorsed by Shuze Chen · Sep 8, 2026

  • Endorsed by quesswho · Sep 8, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me