Repository navigation
Conversation
|
Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict. [Low impact] This proof-only change appears safe to merge. SummaryReplaces two single-step proofs with explicit rewrites through
Reviews (1) · Last reviewed commit: "perf(Incompleteness): avoid kernel reduc..." · Reviewed by Greptile |
Proof profile (new / modified Lean files)A base→head comparison was attempted but its measurements are unavailable (see the run log); modified files are omitted from the tables below. Statement changes✅ No statements changed — all 289 tracked declarations across 2 modified files kept their type; only proofs / definition bodies changed. Statements are compared textually against the merge base (comments and whitespace ignored; Total heartbeats: 588,008 maxHeartbeats units across 2 valid files (14 added LOC). Sum of Count-heartbeats wall-clock total: 55.00 s. Repeated import cost inside Heartbeat values sum disjoint root command traces with LOC counts added lines in the profiled Lean files from this PR diff.
Aggregate phase totals
Advisory only — never blocks merge. Full log uploaded as the |
Incompleteness's term constructions spend 52 s and 56.6 s in two kernel type-checking events around the encoded
listMaxDefandnthDefsubstitutions. This changes only the corresponding proof bodies: unfold the blueprint, explicitly rewriteHierarchySymbol.Semiformula.val_mkSigmaandSemiformula.eval_substs, then simplify the resulting evaluation. The explicit equality steps avoid the expensive conversion observed with the original singlesimp [blueprint].Selected project: Incompleteness, 184 modules. These two hotspots dominated its declaration profiles and each required about 12 GiB in the original build. No imports, statements, definitions, instances, exported names, project metadata, indexes, toolchain pins, or gates change.
Base:
edbe5bd56f476cc2965564676b66199f281ab714Head:
d2be42e0a03f8ebbd081fc388f62e1b224f138f3The base was fetched again and verified immediately before committing. This uses current main's existing Lean/Mathlib 4.35.0-rc3 pins.
Invariant audit. Before editing, a Lean environment inspector recorded private module data, fully elaborated expression DAGs for every constant's type and every non-theorem value, universe parameters, declaration kind, safety/partial flags, reducibility hints, and inductive/constructor/recursor metadata. Only theorem proof values and expression source metadata are omitted. The rebuilt head manifest is byte-identical to base: SHA-256
22a3fbdb780054b2a8235bf823640dc08042cc4f388f2fbdcd6435af6c6d8576. Both contain 19,614 inventory rows for 19,605 distinct names; repeated module memberships were checked explicitly. A separate ownership audit confirms coverage of all 19,604 project-owned constants (the inventory also includes one generated imported congruence helper). Zero additions, removals, or differences. A source audit checks all 184 files and permits exactly the two proof-body replacements and explanatory comments.Controlled measurements. Four sequential clean-project builds in base/head/head/base order, with identical cached dependencies,
LEAN_NUM_THREADS=2, and/usr/bin/time -v lake --no-cache build --wfail LeanPool.Incompleteness.Imports. Each run deletes only the selected project's Lean/IR artifacts, verifies its source hashes before/after, and compiles all 184 project modules. No other Lean jobs from this task ran concurrently.Observed median reductions: 31.34% wall time, 89.03% maximum child RSS. This is a shared Azure VM without CPU isolation or OS cache flushing; RSS is the largest child's peak, not aggregate simultaneous-process memory. These are project compilation measurements, not a whole-pool benchmark.
Validation.
+LeanPool.lake env lean --run scripts/ci/lint-project.lean <all 184 project modules>: passed, 19,604 declarations, including slow Mathlib/Batteries checks.lake exe lint-style LeanPool.Incompleteness.Imports: passed.python -m lean_pool.quality --repo <project-scoped validation view>: passed, including axiom, compiled option/soundness, card, reachability, header and size checks. The view contains all selected sources, its existing card, unchanged pinned configuration and root, and the built artifacts.git diff --check: passed. No generated changes required.lake shake --force --keep-public LeanPool.Incompleteness.Importsreturns 1 with five pre-existing import advisories. Its output is byte-identical to the recorded base output; those public imports are retained to preserve the API invariant.Whole-pool CI and independent PR review remain pending. Open for review only; do not enqueue, enable auto-merge, or merge as part of this optimization cycle.