1,737만 줄짜리
Blog

1,737만 줄짜리

해줘
2026.11.22
·Web·by Homin.Lee
#AI#AWS#Python#REST#SQL

Key Points

  • 1Researchers conducted a comprehensive verification of a 17.37 million-line Lean 4 formal proof of the Riemann Hypothesis and Generalized Riemann Hypothesis, confirming the absence of kernel-bypassing patterns or meta-programming manipulation.
  • 2The analysis revealed that the massive codebase was largely due to redundant, explicitly expanded type signatures, which were successfully compressed by over 90% in specific modules while maintaining full mathematical integrity and kernel compatibility.
  • 3The study demonstrates that while the proof stands as a robust verification, its primary immediate impact lies in establishing a scalable AI-assisted pipeline for verifying complex software and high-stakes mathematical proofs with machine-checked certainty.

The paper provides a technical autopsy of a 17.37-million-line Lean 4 formal proof of the Riemann Hypothesis (RH) and the Generalized Riemann Hypothesis (GRH), developed by researcher Levent Alpöge with Anthropic’s Claude. Published on November 21, 2026, the codebase encompasses 175,187 modules and 1,061,425 declarations.

Core Findings and 17.37 Million Line Structure

The analysis confirms that the proof is mathematically sound and devoid of "kernel bypass" patterns (e.g., sorry, axiom, or debug.skipKernelTC). The immense size is attributed to "expanded types" (pp.explicit) generated by AI to avoid type-inference timeouts, rather than inherent mathematical complexity.
  • Kernel Integrity: Using local indexing and independent verifiers (nanoda, leanchecker), the authors confirmed that the formal declarations map to the standard definitions of the Riemann zeta function and Dirichlet LL-functions.
  • Redundancy: The analysis revealed that roughly 24.3% of the declarations (2.69 million lines) are "dead code" (imported but not used in the proof terms). Systematic refactoring of redundant pp.explicit outputs resulted in an 81.9% to 90.9% reduction in key modules without altering the kernel-level equivalence.

Methodology

The authors employed a multi-stage pipeline to audit the massive codebase without full recompilation:
  1. Local Indexing: A Python-based parallel parser (16 workers) extracted metadata and import graphs into a DuckDB instance, enabling a 42-second comprehensive structural scan.
  2. Four-Agent Audit:
    • @meta_auditor scanned for kernel-level manipulations.
    • @math_translator mapped definitions to the published claims.
    • @refactor_eng performed automated code condensation.
    • @adversarial_critic validated findings using differential (diff) analysis and independent compilation tests.
  3. Refinement: The team identified and fixed 10 critical errors in the initial proof draft—specifically regarding finiteness conditions in extended natural numbers (N∞\mathbb{N}_{\infty}) and index alignment in ContinuousLinearMapContinuousLinearMap.

Proof Architecture

The proof addresses the hypothesis by showing that if an off-critical-line zero exists, the weighted sum of the von Mangoldt function, Gz(x)=∑Λ(n)(X/n−1)+−Xlog⁡X+(1+γ)XG_z(x) = \sum \Lambda(n)(X/n - 1)_+ - X \log X + (1 + \gamma)X, must oscillate above x1/2+δx^{1/2+\delta}. The proof structure is categorized into four key technical domains:
  • Behrend Frames: Utilizes Mathlib.Behrend.exists_large_sphere to control Frobenius orbit overlaps.
  • Theta Lifts: Uses a chain of length m∼xm \sim \sqrt{x} for 반복(iterative) theta lifting to balance error terms against x1/2x^{1/2} precision.
  • Bessel Poincaré Decay: Leverages the Hilbert-Schmidt quasi-orthogonality of U(p,q)U(p,q) projected Bessel Poincaré series, ensuring decay below exp⁡(−xϵ/8)\exp(-x^{\epsilon/8}).
  • Algebraic Error Control: Employs Kato Euler systems, Ferrero-Washington theory, and U(3)U(3) patching to bound the Vandiver-type error terms, effectively controlling H1H^1 and H2H^2 lengths.

Conclusion and Impact

The paper demonstrates that AI-generated formal proofs, while initially unwieldy, can be audited and reduced to human-maintainable sizes through rigorous indexing and algebraic verification. The findings transition the RH/GRH from "conditional" assumptions in number theory to fully verified facts within the Lean 4 environment, setting a precedent for the automated verification of complex mathematical conjectures.