Integer Factorization: How Gemini 4’s Proof Shatters a 34-Year Mathematical Barrier

For 34 years, the best proven classical bound for integer factorization lagged behind the heuristic General Number Field Sieve. A paper produced by Google’s Cogentic framework using Gemini 4 closes that gap in the exponent. Theorem 1.1 gives a zero-error randomized algorithm that completely factors every integer in worst-case expected time LN[1/3,105]L_N[1/3,105], with worst-case workspace LN[1/3,40]L_N[1/3,40]. The proof reaches the one-third exponent with a new construction. The original sieve’s runtime analysis remains heuristic.

1. What Is Integer Factorization and Why Is It So Difficult?

The fundamental theorem of arithmetic gives every integer N>1N>1 a unique prime decomposition up to order. The integer factorization problem starts with 84 and asks for 22⋅3⋅72^2\cdot3\cdot7. Multiplication takes a number of bit operations polynomial in the length of its inputs. Trial division, by comparison, may look for divisors up to N\sqrt{N}. On a binary input of nn bits, that search can require exponentially many trials in nn. That gap motivates the search for a better integer factorization algorithm.

Key facts from Theorem 1.1. Both resource bounds are asymptotic.
PropertyWhat the Paper Establishes
Input and outputComplete prime decomposition for every integer N≥2N\ge2
Expected running timeLN[1/3,105]L_N[1/3,105] in bit operations
Worst-case workspaceLN[1/3,40]L_N[1/3,40] over all coin sequences
CorrectnessZero-error randomized computation with deterministic primality and product checks

2. The 34-Year Barrier: Why the Number Field Sieve Remained Heuristic

Dixon’s method combines square residues that factor over a small list of primes. Even total prime exponents produce another square. Lenstra and Pomerance’s 1992 proof used random imaginary quadratic class groups to improve the rigorous bound. The General Number Field Sieve (GNFS) instead collects matching relations on a rational side and in a number field. Its standard running-time analysis relies on expectations about smooth values, prime splitting and the rank of the relation matrix.

The paper uses the following scale, where ln⁡\ln denotes the natural logarithm, α\alpha controls how the exponent grows, and cc is its leading constant.

𝑳𝑵(𝜶,𝒄)=exp⁡(𝒄(ln⁡𝑵)𝜶(ln⁡ln⁡𝑵)1−𝜶)\boldsymbol{L_N(\alpha,c)=\exp\!\left(c(\ln N)^\alpha(\ln\ln N)^{1-\alpha}\right)}

Square brackets denote an asymptotic upper bound in this paper. For LN[α,c]L_N[\alpha,c], the limit superior of log cost divided by (ln⁡N)α(ln⁡ln⁡N)1−α(\ln N)^\alpha(\ln\ln N)^{1-\alpha} is at most cc. At the one-third scale, that denominator grows more slowly than at the one-half scale. So any fixed constant at one-third eventually yields a smaller bound than a positive fixed constant at one-half.

For GNFS, c=(64/9)1/3≈1.923c=(64/9)^{1/3}\approx1.923. Trial division is shown in arithmetic trials.
Factorization AlgorithmTime ScaleGuarantee
Trial divisionO(N)O(\sqrt{N})Unconditional
Dixon’s methodLN[1/2,22]L_N[1/2,2\sqrt{2}]Rigorous
Lenstra–Pomerance (1992)LN[1/2,1]L_N[1/2,1]Rigorous
General Number Field SieveLN[1/3,c]L_N[1/3,c]Heuristic
Gemini 4 via Cogentic (2026)LN[1/3,105]L_N[1/3,105]Unconditional

3. What Exactly Did Gemini 4 Prove?

Theorem 1.1 specifies a single uniform classical multitape Turing machine. The time bound averages over internal fair coin flips for each input. Every returned factorization is correct, the defining feature of a Las Vegas algorithm. The algorithm uses the Agrawal–Kayal–Saxena (AKS) primality test for each output prime and multiplies the prime powers back together to verify the input. The workspace guarantee holds for every coin sequence. All implied constants and finite thresholds are effectively computable.

The paper credits Cogentic and its base model Gemini 4 with generating the proof after one human prompt. The Cogentic methods paper describes the prove-and-verify loop. The six stages reconstruct the proof’s logic. The release leaves the discovery chronology undocumented.

4. Inside Gemini 4’s Proof: The Complete Mathematical Roadmap

  1. Start with modular squares. Hide each sampled root and work with its square modulo NN. Seek a second route to a root of a product of these residues.
  2. Prove smooth values occur. Count a weighted subset of integers whose prime factors are small enough to track. Obtain effective estimates in short portions of arithmetic progressions.
  3. Randomize two forms. Choose polynomial coefficients so both forms share a modular vanishing condition. Preserve room to vary future evaluations after fixing the ones already seen.
  4. Descend to a factor base. Convert each large-prime contribution into smaller ones. Bound the total failure probability as the descent branches.
  5. Certify and extract squares. Combine relations using parity and quadratic characters, lift exact roots, and map them back modulo NN. Reveal the hidden roots to try a split.
  6. Close the runtime bound. Apply the same factoring procedure to smaller integers arising in relation collection, and prove by induction that those calls fit the time budget.

Take N=77N=77. Both 20 and 13 square to 15 modulo 77. Since 7777 divides (20−13)(20+13)(20-13)(20+13), the greatest common divisor of the difference and 77 is 7, and the complementary factor is 11. At scale, finding a pair that splits the input is the challenge.

202≡132≡15(mod77),gcd⁡(20−13,77)=7\boldsymbol{20^2\equiv13^2\equiv15\pmod{77},\qquad \gcd(20-13,77)=7}

5. Hybrid Smooth Weights: Overcoming the Siegel-Zero Barrier

Four convolution blocks show how one integer and 4u₀ − 1 primes supply smoothness weights for integer factorization.
Four convolution blocks show how one integer and 4u₀ − 1 primes supply smoothness weights for integer factorization.

An integer is yy-smooth if all its prime factors are at most yy. The algorithm needs smooth values within short intervals on specific arithmetic progressions. Estimating those counts via Dirichlet characters, multiplicative functions that isolate residue classes, can run into a Siegel zero. This real zero near one can obstruct effective prime-distribution estimates.

Section 3 changes what gets counted. A four-fold convolution assigns weight to representations by one unrestricted integer in (y/2,y](y/2,y] and 4u−14u-1 primes in the same interval, where uu is a size parameter. That unrestricted factor is itself yy-smooth. In an admissible progression, the small common divisor of the residue and modulus must be absorbed by that factor. After dividing it out, the density of integers coprime to the reduced modulus cancels the reciprocal totient introduced by character orthogonality. This leaves a main-term density independent of the progression modulus within the stated range.

The factor also lets the proof sum over consecutive integers. The hybrid large sieve bounds how many characters can give unusually large prime sums. For the remaining troublesome low-conductor characters, Pólya–Vinogradov bounds cancellation in the integer sum and a truncated Brun sieve handles the coprimality restrictions. Lemma 3.5 isolates a sparse set of bad conductors, whose multiples must be excluded from the estimate. These weights drive the polynomial search.

6. Discrete Laplace Sampling: Removing Polynomial Smoothness Heuristics

The algorithm samples two binary forms, homogeneous polynomials of the same odd degree. Each vanishes at a shared base pair (g0,g1)(g_0,g_1) modulo NN. Fixing their reduction modulo 3 to a monic irreducible polynomial of the same degree ensures irreducibility over the rationals. It also keeps their evaluations at primitive pairs, whose coordinates are coprime, nonzero modulo 3. That second property will matter again when extracting square roots.

A marginal distribution for one evaluation is insufficient for descent. Evaluations along a path share coefficients, so past values constrain future ones. Lemma 4.2 weights coefficient vectors by a truncated discrete Laplace law, with weight decreasing exponentially in the sum of their absolute coordinate values. The sampler uses a mixture of boxes and Lenstra–Lenstra–Lovász (LLL) lattice reduction to sample within the modular constraint, with a proved error bound relative to the target law.

An evaluation fiber is the set of coefficient vectors giving specified values at selected points. Adding a polynomial that vanishes at those points preserves the evaluations. Small shifts along these directions change the Laplace weights by a controlled factor away from the truncation boundary. The lemma quantifies near-decoupling from the modulo-NN condition on eligible fibers. Smoothness estimates can then survive conditioning on earlier evaluations.

7. The Geometric Descent Ladder and Smoothness-Cancelling Telescoping

A random squared residue rarely factors entirely over primes at most BB. Two-dimensional Lagrange–Gauss reduction looks for a short pair representing it as a ratio modulo NN. The algorithm keeps ratios whose numerator and denominator are positive, coprime and split into primes near the initial scale Q0Q_0. For each such prime qq, it searches a special-qq lattice, a grid where a congruence forces divisibility by qq. In later steps, both fields map algebraic elements to scaled copies of the same rational linear form modulo NN. Dividing the normalized images cancels that form.

Geometric descent along one representative branch A rational prime at the initial scale yields smaller algebraic primes, starting at least two buckets lower. Later steps cancel the rational form using the two algebraic representations, and descent stops for primes at or below the cutoff B. Large Rational Prime Initial bucket near Q₀ Drop at least two rungs Smaller Algebraic Primes Use the two forms to replace large factors Repeat as needed Factor Base Stop descending at primes ≤ B Schematic · One branch, with intermediate steps omitted
Each replacement reduces the permitted prime scale. Different primes in a relation may give different branches.

The logarithms of the intermediate thresholds shrink by a factor of 3/43/4 before rounding. Children jump at least two rungs, and contributions at or below BB stay in the factor base. Size control alone leaves a probability problem. Selecting a smooth candidate repeatedly could make a path estimate pay the inverse of a small smoothness probability at every level.

Lemmas 4.4–4.6 use the product of the hybrid weights for candidate acceptance. Local second-moment estimates keep the total weight above half its expected scale on a good node. The bound for selecting a candidate divides by that scale, but summing the expected weighted contributions while working back up the path produces the same scale in the numerator. This backwards cancellation replaces repeated smoothness penalties with modest branching factors. For a suitable base pair, Lemma 4.6 finds that with probability at least 9/109/10 over the two forms, at least three-quarters of the eligible initial primes are ready for descent.

8. Stark–Chebotarev Certification and 3-Adic Square Roots

	Three independent kernel vectors yield seven combinations to test for squares in integer factorization.
Three independent kernel vectors yield seven combinations to test for squares in integer factorization.

Even prime-ideal valuations make a principal ideal an ideal square. Its generator can still be a nonsquare. A unit can carry an undetected square class, and the ideal being squared can represent a nontrivial class of order two. Lemma 5.1 tracks parity in the order generated by the algebraic root and accounts for primes involving the leading coefficient and discriminant.

Any remaining nonsquare defines a quadratic extension. A quadratic character detects it where the residue is a nonsquare. Effective Chebotarev supplies enough detecting primes for the nonexceptional classes. Stark’s lemma and Landau–Page repulsion restrict the possible exceptional classes to at most one per field. Thus, on the good sampling event, the two fields together leave at most two dimensions of residual uncertainty. Each kernel vector specifies which relations to multiply, using entries of zero or one. Three independent vectors guarantee that at least one of their seven nonzero combinations gives squares in both fields.

Lemma 5.2 starts the root computation in the finite field with 3d3^d elements, where dd is the odd degree of the forms. It lifts a root by Newton–Hensel iteration, doubling the precision in powers of 3. A coefficient bound determines how many digits suffice to reconstruct the root as an integer polynomial. Exact squaring then checks the reconstruction before the algorithm uses it modulo NN.

9. Blind Dixon Fruitfulness: Turning Square Relations Into Actual Factors

Equal squares can give useless gcds. If the roots agree everywhere modulo NN, the gcd of their difference with NN is NN. If the roots have opposite signs at every odd prime-power component, that gcd is 1. Lemma 5.3 keeps the random units zmz_m sealed while the algorithm chooses relations and builds a unit YY using only their squared residues and independent randomness. After unsealing, ZZ is the product of the selected roots.

Four sign patterns modulo 77 Plus signs at both 7 and 11 give gcd 77. A plus sign at 7 and minus at 11 give gcd 7. A minus sign at 7 and plus at 11 give gcd 11. Two minus signs give gcd 1. Signs of the Root Ratio Modulo 7 and 11 + at 11 − at 11 + at 7 − at 7 gcd = 77 Trivial gcd = 7 Splits 77 gcd = 11 Splits 77 gcd = 1 Trivial The mixed signs give a proper divisor.
In the example with roots 20 and 13, their ratio agrees with +1 modulo 7 and −1 modulo 11, giving the upper-right result.

Given that successful transcript, ZY−1ZY^{-1} is uniform over the square roots of one modulo NN. For odd NN with ω(N)≥2\omega(N)\ge2 distinct prime divisors, each prime power contributes an independent sign by the Chinese remainder theorem. Exactly two sign patterns are trivial, so the conditional probability of a nontrivial split is

1−21−𝝎(𝑵)≥12.\boldsymbol{1-2^{1-\omega(N)}\ge\frac12.}

After checking the gcd, the algorithm continues on both factors. Perfect powers and primes are handled separately, so repeated splitting yields the complete prime decomposition.

10. How Strong Induction Establishes the 1/3 Complexity Exponent

During relation collection the algorithm calls itself to factor candidate numerators and denominators at most N/2\sqrt{N}/2. The descent calls use integers at most N1/10N^{1/10}. Strong induction supplies a bound with leading constant 104 for every smaller input. Moving from NN to an input at most N/2\sqrt{N}/2 shrinks the cube-root log term by at least a factor of 2−1/32^{-1/3}. The log-log term can only help in the asymptotic comparison. The leading constant contracts accordingly.

104⋅2−1/3≈82.54485<82.56\boldsymbol{104\cdot2^{-1/3}\approx82.54485<82.56}

The paper caps the number of relation trials per phase at the scale LN(1/3,21.15)L_N(1/3,21.15). Multiplying by the recursive cost adds those constants in the exponent.

21.15+82.56=103.71<104<105\boldsymbol{21.15+82.56=103.71<104<105}

Section 6 budgets 103.72 for the smooth-ratio calls after allowing two per trial and 103.75 for the phase before constant multipliers. The analysis bounds the expected number of phases by three. Failed phases overwrite their scratch space, and nested calls shrink their inputs. This bounds workspace on every run. Interleaved trial division guarantees termination even on unlucky coin tapes and handles finite thresholds uniformly.

11. Is Gemini 4’s Integer Factorization Algorithm Faster Than GNFS?

	Integer factorization bounds compare Lenstra–Pomerance, Cogentic, and the General Number Field Sieve.
Integer factorization bounds compare Lenstra–Pomerance, Cogentic, and the General Number Field Sieve.

The older rigorous Lenstra–Pomerance bound has exponent 1/21/2. The new proof and heuristic GNFS both use 1/31/3, but the published constant 105 is far larger than the heuristic GNFS constant of about 1.923. An upper-bound constant says how much growth the analysis allows. It cannot tell us how fast an implementation will run. In binary input length the guarantee is subexponential and still grows faster than any fixed polynomial. Classical polynomial-time factoring remains open. Quantum factoring uses a different computational model.

Factoring an RSA modulus can expose its prime factors, but the paper gives no measured runtime at cryptographic key sizes or practical RSA attack. Bitcoin’s secp256k1 signatures rely on elliptic-curve discrete logarithms, a different problem. The theorem gives no algorithm for that problem.

12. What Gemini 4’s Proof Changes and What Remains Unresolved

The paper gives integer factorization complexity a rigorous one-third exponent with effective constants. Google’s release notes report a complete Lean 4 formalization using Mathlib and say it will appear in a companion submission. Independent readers can check the formal statement and dependencies when a reproducible build is released. The key checks are whether the analytic estimates hold on the adaptive paths the algorithm actually samples and whether all costs fit one uniform computation.

For unconditional integer factorization, the next questions are how far the constants can fall and which techniques merit implementation. Follow Binary Verse AI for more research explainers grounded in the mathematics.

What is integer factorization?

Integer factorization expresses an integer greater than one as a product of primes, including repetitions. Multiplying primes is computationally straightforward. Recovering the factors of a sufficiently large composite integer, such as a product of two large primes, can be much harder.

What did Gemini 4 prove about integer factorization?

Using Gemini 4, Google’s Cogentic framework produced a proof of an unconditional classical algorithm for complete integer factorization. Its worst-case expected time is LN[1/3,105]L_N[1/3,105] and its worst-case workspace is LN[1/3,40]L_N[1/3,40]. The proof improves the rigorous exponent of 1/21/2 established by Lenstra and Pomerance in 1992.

Why is Gemini 4’s integer factorization proof significant?

It establishes the number field sieve’s 1/31/3 complexity exponent without unproven number-theoretic hypotheses. The construction controls smoothness in arithmetic progressions, dependencies between polynomial evaluations, failure across recursive descent and the certification of algebraic squares.

Has Gemini 4 solved integer factorization in polynomial time?

No. The running-time guarantee is subexponential in the input bit length and grows faster than any fixed polynomial. Whether a classical polynomial-time factoring algorithm exists remains open.

Is Gemini 4’s factorization algorithm faster than the General Number Field Sieve?

The proof does not establish a speed advantage over GNFS. Both analyses use the 1/31/3 exponent. The new rigorous upper bound uses the constant 105105, while the heuristic GNFS analysis uses (64/9)1/3≈1.923(64/9)^{1/3}\approx1.923. These are asymptotic constants, and the paper supplies no head-to-head timings.

Does Gemini 4’s integer factorization proof break RSA or Bitcoin?

The paper establishes no practical RSA attack and gives no timings at cryptographic key sizes. Bitcoin’s secp256k1 signatures rely on the elliptic-curve discrete logarithm problem, which the integer factorization proof does not solve.

Has Gemini 4’s integer factorization proof been independently verified?

Google’s release notes report a complete Lean 4 formalization using Mathlib and say it will be released in a companion submission. At the time of the release, the Lean files were pending public release. The announced formalization is distinct from a publicly reproducible check or independent verification.

Leave a Comment