Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Least integer quartic switch and uniform rounding bounds

Proved
ThreeSum1960614.integer_schedule

by Yuxuan Xu · Oct 14, 2026 · Mathlib 0df444a (Lean v4.33.1)

3sumalgorithmsentropyword-ram

For arbitrary positive natural block count JJJ, positive even microblock size sss, and level 0≤j<J0\le j<J0≤j<J with j/J≤13/20j/J\le13/20j/J≤13/20, let r=(J−j)sr=(J-j)sr=(J−j)s and μ=Js\mu=Jsμ=Js. There exists a positive least integer q≤r/2q\le r/2q≤r/2 satisfying the cleared integer comparison, and every smaller natural number fails it. This same qqq satisfies K≤P(q/r)<K+9/rK\le P(q/r)<K+9/rK≤P(q/r)<K+9/r for K=(v+j/J)/(1−j/J)K=(v+j/J)/(1-j/J)K=(v+j/J)/(1−j/J). It also satisfies S≤2b−j/J+(1−j/J)γ232(q/r)S\le2b-j/J+(1-j/J)\gamma_{232}(q/r)S≤2b−j/J+(1−j/J)γ232​(q/r) and (1−j/J)H(q/r)<ρ(1+v)+9ρ/μ(1-j/J)H(q/r)<\rho(1+v)+9\rho/\mu(1−j/J)H(q/r)<ρ(1+v)+9ρ/μ. No divisibility of JJJ is needed for these per-level bounds; positivity and evenness make r/2r/2r/2 an integer and every real denominator nonzero.

Preamble
import Definitions.Def_ThreeSum1960614_Analysis
import Definitions.Def_TrulySubcubicAPSP_SourceSpecification

set_option autoImplicit false
set_option relaxedAutoImplicit false
open ThreeSum1960614
Formal statement
theorem ThreeSum1960614.integer_schedule (J s j : ℕ)
    (hJ : 0 < J) (hs : 0 < s) (heven : Even s) (hj : j < J)
    (hlevel : (j : ℝ) / J ≤ tau) :
    ∃ q : ℕ, 0 < q ∧ q ≤ ((J - j) * s) / 2 ∧ clearedSwitch J s j q ∧
      (∀ k < q, ¬ clearedSwitch J s j k) ∧
      threshold ((j : ℝ) / J) ≤ phi ((q : ℝ) / ((J - j) * s)) ∧
      phi ((q : ℝ) / ((J - j) * s)) <
        threshold ((j : ℝ) / J) + 9 / ((J - j) * s) ∧
      saving ≤ 2 * beta - (j : ℝ) / J +
        (1 - (j : ℝ) / J) * gamma 232 ((q : ℝ) / ((J - j) * s)) ∧
      (1 - (j : ℝ) / J) * entropy ((q : ℝ) / ((J - j) * s)) <
        rho * (1 + v) + 9 * rho / (J * s) := by sorry
Source
User-supplied 3sum_certificate_1p960614_v3/3sum_certificate_v3/PROOF.md (14 October 2026); Section 4.2–4.3; upstream https://github.com/c0ldzy17/three-sum-lean/tree/2b639655e07421b9ac743de9090459bab473a7c0
Read-back

What the Lean code literally says, in plain math · GPT-6


declaration: ThreeSum1960614.integer_schedule readback_model: GPT-6

For every three natural numbers J,s,jJ,s,jJ,s,j such that J>0J>0J>0, s>0s>0s>0, sss is even, j<Jj<Jj<J, and j/J≤13/20j/J\leq 13/20j/J≤13/20 when this quotient is taken in the real numbers, put d=J−jd=J-jd=J−j, r=dsr=dsr=ds, and a=j/Ja=j/Ja=j/J. Here the natural-number subtraction J−jJ-jJ−j, which in general is truncated at zero, is the ordinary positive difference under the hypothesis j<Jj<Jj<J. Define the real-valued functions

H(t)=−tlog⁡t−(1−t)log⁡(1−t)log⁡2,P(t)=785174904t+72447023t2+24044466t3+12022459t4100000000,H(t)=\frac{-t\log t-(1-t)\log(1-t)}{\log 2},\qquad P(t)=\frac{785174904t+72447023t^2+24044466t^3+12022459t^4}{100000000},H(t)=log2−tlogt−(1−t)log(1−t)​,P(t)=100000000785174904t+72447023t2+24044466t3+12022459t4​,

where log⁡\loglog is the total real natural logarithm: log⁡t=ln⁡∣t∣\log t=\ln|t|logt=ln∣t∣ for t≠0t\ne0t=0 and log⁡0=0\log0=0log0=0, so the entropy summands at zero are zero. There exists a natural number q>0q>0q>0 with q≤⌊r/2⌋q\leq\lfloor r/2\rfloorq≤⌊r/2⌋ such that the following comparison of nonnegative integers holds:

500000000d(785174904qr3+72447023q2r2+24044466q3r+12022459q4)≥100000000(159243801J+500000000j)r4.500000000d\bigl(785174904qr^3+72447023q^2r^2+24044466q^3r+12022459q^4\bigr) \geq 100000000\bigl(159243801J+500000000j\bigr)r^4.500000000d(785174904qr3+72447023q2r2+24044466q3r+12022459q4)≥100000000(159243801J+500000000j)r4.

Moreover, for every natural number k<qk<qk<q, including k=0k=0k=0, this integer comparison is false after replacing qqq by kkk; thus qqq is least among all natural numbers satisfying that comparison, not merely among those in the stated upper range. For this same qqq, putting x=q/rx=q/rx=q/r, all four of the following real inequalities hold:

159243801/500000000+a1−a≤P(x),\frac{159243801/500000000+a}{1-a}\leq P(x),1−a159243801/500000000+a​≤P(x), P(x)<159243801/500000000+a1−a+9r,P(x)<\frac{159243801/500000000+a}{1-a}+\frac{9}{r},P(x)<1−a159243801/500000000+a​+r9​, 1931755701000000000≤2(−626560161000000000)−a+(1−a)[232H(1232)−232H(1−x232)],\frac{193175570}{1000000000} \leq 2\left(-\frac{62656016}{1000000000}\right)-a +(1-a)\left[232H\left(\frac1{232}\right)-232H\left(\frac{1-x}{232}\right)\right],1000000000193175570​≤2(−100000000062656016​)−a+(1−a)[232H(2321​)−232H(2321−x​)], (1−a)H(x)<279050310000000(1+159243801500000000)+9(2790503/10000000)Js.(1-a)H(x) <\frac{2790503}{10000000}\left(1+\frac{159243801}{500000000}\right) +\frac{9(2790503/10000000)}{Js}.(1−a)H(x)<100000002790503​(1+500000000159243801​)+Js9(2790503/10000000)​.

The bound on qqq uses natural-number division, hence the floor indicated above; since sss is positive and even, rrr is even and at least 222, so that floor equals the exact integer r/2r/2r/2. Every quotient in the four analytic inequalities, and in aaa, xxx, HHH, and PPP, is real division, with natural numbers embedded into the real numbers. Their denominators are nonzero: J>0J>0J>0, r>0r>0r>0, Js>0Js>0Js>0, and 1−a≥7/20>01-a\geq 7/20>01−a≥7/20>0. In particular 0<x≤1/20<x\leq 1/20<x≤1/2, so the entropy arguments appearing in these inequalities are positive and less than 111. The hypotheses allow j=0j=0j=0 and allow J=1J=1J=1 with j=0j=0j=0; they impose no additional lower bound on JJJ or on the positive even number sss.

Human review
  • Endorsed by Shuze Chen · Oct 14, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Yuxuan Xu · Oct 14, 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, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me