Repository navigation
Conversation
Contributor
|
Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict. [Medium impact] No actionable regression was found in the shared certificate proofs or their callers. SummaryMoves repeated arithmetic into rational certificates, then transfers the results to the existing real bounds.
Reviews (1) · Last reviewed commit: "perf(Zeta5Irrational): share rational ce..." · Reviewed by Greptile |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Optimization verified locally: 36.87% faster for Zeta5Irrational, with every existing declaration preserved.
Change
The project's 214 modules contain 375,997 baseline source lines. Thousands of upper-potential certificates repeatedly normalize closed arithmetic over the reals, surrounding series checks that already run over the rationals. This pass replaces 6,326 logarithm range-reduction calculations and 6,396 geometric checks with kernel-checked rational certificates and shared transfer lemmas.
Two rational endpoint functions read the existing
table1; equality lemmas connect them to the unchanged real endpoints. The analytic proofs still use the existing logarithm and arcsine-potential lemmas. All numerical bounds and existing theorem statements remain unchanged. The pass touches 59 files in this project and removes 25,749 net lines. The module headers, public imports, project card and generated aggregate retain their existing API.Base:
595ff877b1d44314072d4baa9a6008ad4bef218d. Audited head:e0967625e99afe6824f2e41c94b7c93cf652e84c. Both use main's unchanged pinned Lean/Mathlib 4.35.0, Mathlib56a005855ea17e0b0958f73ec801ae140b0a1679, and the same Lake options. All ten dependency checkouts are clean at their recorded revisions.Invariant audit
Before editing, a Lean environment inspector imported the complete project at private visibility with extensions disabled. It recorded names, owning modules, kinds, fully elaborated types and binder information, universe parameters, safety, partiality, reducibility hints, non-theorem values, and inductive/constructor/recursor metadata. The comparison structurally interns expression DAGs without relying on hashes, ignoring nonsemantic expression metadata and theorem proof bodies.
All 25,865 baseline records, covering 25,862 unique declarations, remain identical: zero removals or changes. This includes the original private series certificates. The additions are seven supporting declarations (two definitions and five lemmas), their two generated equation lemmas, and 12,722 safe private kernel certificates. Every addition was classified; none is unsafe or partial. A separate source audit confirms unchanged signatures for all 15,180 original named source declarations and unchanged data-definition bodies.
Measurements
Each measurement removes only this project's generated library/IR outputs, retains identical warm dependency artifacts, and runs sequentially in isolated base/head worktrees:
Both logs contain fresh successful timings for all 214 project modules and no dependency rebuilds or warnings. User CPU falls by 26.36%. Successful synchronous command-heartbeat samples fall from 4,140.080 → 1,205.197 (
U_0_1), 3,970.308 → 1,227.740 (U_0_2), and 3,920.677 → 1,175.942 (U_0_3), without changing production budgets or options.This is one controlled pair on a shared Azure VM; CPUs are not exclusive. RSS is GNU time's maximum child-process RSS, not summed simultaneous build memory. Full-repository protected CI remains required.
Validation
warningAsError = true; zero warnings. All 59 changed modules have fresh timings below the repository's 600-second limit (slowest: 280.0 s).lake exe runLinter --no-build --only-modules=<214-module list> LeanPool.Zeta5Irrational.Importsandlake exe lint-style LeanPool.Zeta5Irrational.Imports.lake exe mk_all --module --check --repo <project-source-view>andgit diff --check.lake shake --force --keep-public --explain LeanPool.Zeta5Irrational.Importsexits 1 with pruning suggestions and zero compiler errors. Import pruning is left out of this proof-cost pass: existing public imports are preserved, and the new explicitLinarithimport records the tactic used by the shared logarithm proof even though it is currently also provided transitively.Raw manifests, timings, profiles, source hashes and check logs are retained on the VM under
/data/codex/scratch/researcher/optimization-20261115/. No merge or auto-merge is requested.