Skip to content

Speed up Erdős 97 coverage certificate compilation - #1079

Merged
Vilin97 merged 1 commit into
mainfrom
vilin/erdos97-kernel-coverage-20261129
Nov 29, 2026
Merged

Vilin97 merged 1 commit into
mainfrom
vilin/erdos97-kernel-coverage-20261129

Conversation

@Vilin97

@Vilin97 Vilin97 commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Ready for review. Erdős 97 cuts clean build wall time by 18.79% with every existing declaration preserved.

Project and changes

The Lean Pool source profile at ebaad62ab60d27fe11a5242fcbd7246d0d74d061 attributed 438.3 of this 269-module project's 638.4 source-elaboration seconds to 94 certificate fact modules. They shared one replay implementation. The proof of coverageBranchNodes_6_15_00000 accounted for 3.70 seconds in that profile.

  • Replay packed masks with kernel-reducible Nat bit operations. The equivalence to the existing checker covers arbitrary claims, preserves the 64-bit shift semantics, and justifies skipping a word loop when both its mask and witness stream are empty. The 375 node audits select the new decider locally.
  • Check the 88 conflict-cover and 64 summary-table audits with decide +kernel to avoid repeating closed computation during elaboration.
  • Trim four repeated private Mathlib imports from 153 modules. Add targeted imports where the source uses a finite-set lemma or tactic. The compiler import inventory of CoverageCertificateFacts80 went from 2,074 artifacts to 750.

Measurements

Base commit 90362e7ab43700093d9bb548c978817ff55c9342. Optimized commit a526db6614351800d56c95813dabf2aa3f2d4df8. Both measurements used Lean and Mathlib v4.36.0, with Mathlib at fc4f59e577feb1a4956671bc04ac18aaaf8cd842.

Measurement Base Optimized
Clean project wall time 189.88 s 154.21 s
User + system CPU time 1068.88 s 858.36 s
Peak process RSS 1,651,000 KiB 1,646,664 KiB
Lake time for CoverageCertificateFacts80 5.3s 4.3s
Lake time for CoverageCertificateConflictCovers21 6.0s 3.7s
Lake time for CoverageSummaryData00 3.6s 2.3s

Consecutive clean builds ran in the same isolated Azure worktree, pinned to logical CPUs 0–7. Each removed the selected project's Lean and IR outputs under .lake/build and reused the pinned dependency artifacts. Both builds compiled all 269 project modules. The module times are Lake's rounded times under concurrent compilation. The wall-time percentage reflects this VM and CPU affinity.

lake exe cache get
taskset -c 0-7 /usr/bin/time -v lake build LeanPool.Erdos97ConvexOctagon.Imports
lake shake --force --keep-public LeanPool.Erdos97ConvexOctagon.Imports

Declaration audit

Before the edit and again after the final build, I used Lean.readModuleDataParts to read every module's exported, server, and private .olean sections and streamed the manifest through zstd. The comparison includes full names, universe parameters, structural types, non-theorem values, safety and reducibility metadata, inductive and recursor data, and compiler-generated names. It elides theorem bodies and source metadata.

All 132,021 existing records match, with zero changed or missing records. The 245 added records come from the packed replay and the auxiliary proofs generated by the kernel audits. The initial audit caught changes to two generated private proofs in PairStateExactness. Restoring that module's original imports restored the exact records. The diff preserves all public imports.

The local audit used the following commands with the same module list on both builds.

lake env lean --run ../Manifest.lean ../project-modules.txt | zstd -T1 -q -3 -o ../final-manifest.jsonl.zst
python3 ../compare-manifests.py ../base-manifest.jsonl.zst ../final-manifest.jsonl.zst

Validation

The project build completed with warning-as-error enabled. The repository's project shard validation covered declaration linting, registered declarations, allowed axioms, the backdoor audit, and build messages. The style, repository static-quality, and generated-index checks also passed.

PYTHONPATH=python uv run --project python --locked python -m lean_pool.shard_validation --repo . --units Erdos97ConvexOctagon --cache .lake/validation-cache/final-proof-audit
PYTHONPATH=python uv run --project python --locked python -m lean_pool.quality --repo . --static-only
lake exe lint-style LeanPool.Erdos97ConvexOctagon.Imports
lake exe mk_all --module --check
git diff --check

@greptile-apps

greptile-apps Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict.

No blocking issue was found in this performance refactor.RetriggerView in Greptile

[Medium impact] No blocking issue was found in this performance refactor.

Summary

Speeds up certificate checks without changing the claims they prove.

  • Erdős 97 certificate checks replay packed masks with natural-number operations.
  • Conflict-cover and summary-table audits reduce their closed checks in the kernel.

No actionable issues found. External source fidelity and the original project's provenance were not independently reverified; this refactor leaves their claims and metadata unchanged.

Reviews (1) · Last reviewed commit: "Speed up Erdős 97 coverage certificate c..." · Reviewed by Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Proof profile (new / modified Lean files)

Statement changes

✅ No statements changed — all 1,833 tracked declarations across 186 modified files kept their type; only proofs / definition bodies changed.

Also: 28 declarations added, 0 removed. A reorganization moves declarations between files, which shows up here as an add in one file and a remove in another.

➕ Declarations added (28)
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedActiveRow — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedActiveRow_eq — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedActiveWord — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedActiveWord_empty — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedActiveWord_eq — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedAddRow — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedAddRow_eq — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedBEq_eq — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedBNe_eq — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedBit_eq — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedChunk — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedHardMatch — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedHardMatch_eq — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedNode — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedNode_eq — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedPatternMatch — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedPatternMatch_eq — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedPruning — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedPruning_eq — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedRejectedWord — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedRejectedWord_empty — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedRowIndices — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedRowIndices_eq — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedRowIndices_zero — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedShiftAmount — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedWords — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.packedWords_eq — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean
  • Erdos97Octagon.RawIncidence.StaticDirectCoverage.replayWordAt_empty — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean

Statements are compared textually against the merge base (comments and whitespace ignored; by proof terms embedded in a type are treated as proof-irrelevant), the same method as physlib's /check-golf. Anonymous instances and examples are not tracked.

Compile cost of modified files — base → head

Heartbeats: 6,867,195 → 3,950,924 (-2,916,271, -42.5%). Commands: 1,701 → 1,730.

Per-file wall sum: 1101.0 s → 769.5 s (-30.1%). Wall clock is measured under parallel load and is noisy; heartbeats are deterministic and are the regression signal.

Files: 92 compared — 55 cheaper, 1 costlier, 36 within noise (threshold: |Δ heartbeats| ≥ 1,000 and ≥ 1%).

Both sides are elaborated against the merge-base build of the pool — sound when only proofs and definition bodies change; a file whose statements changed may fail there and is flagged ⚠. Heartbeats come from disjoint root command traces with trace.profiler.useHeartbeats and synchronous elaboration, converted to maxHeartbeats units. Failed measurements are not classified as cheaper or costlier. Δ lines counts added/deleted lines from this PR diff.

File Δ lines HB base HB head Δ HB Δ HB % Wall base (s) Wall head (s)
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData00.lean +2/-2 88,554 13,352 -75,201 -84.9% 13.75 4.94
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData02.lean +2/-2 85,006 12,735 -72,271 -85.0% 15.78 5.45
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData01.lean +2/-2 82,550 12,217 -70,333 -85.2% 14.31 7.44
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData03.lean +2/-2 81,424 12,149 -69,275 -85.1% 8.10 5.27
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData31.lean +2/-2 79,094 12,020 -67,074 -84.8% 15.39 4.22
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData27.lean +2/-2 77,064 11,596 -65,467 -85.0% 10.62 4.76
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData26.lean +2/-2 75,273 11,357 -63,916 -84.9% 13.28 5.14
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData05.lean +2/-2 75,101 11,361 -63,740 -84.9% 13.28 4.11
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData04.lean +2/-2 73,778 11,106 -62,672 -84.9% 18.53 4.57
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData06.lean +2/-2 71,859 10,809 -61,051 -85.0% 8.47 4.83
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData30.lean +2/-2 69,848 10,598 -59,249 -84.8% 8.08 4.22
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers17.lean +4/-8 93,561 36,038 -57,523 -61.5% 17.61 6.94
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData28.lean +2/-2 67,336 10,312 -57,023 -84.7% 12.85 4.45
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers16.lean +4/-8 91,129 35,318 -55,811 -61.2% 10.54 6.89
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers03.lean +4/-8 90,199 34,843 -55,356 -61.4% 10.16 6.19
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers08.lean +4/-8 89,302 34,647 -54,655 -61.2% 15.70 6.98
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData12.lean +2/-2 64,418 9,783 -54,635 -84.8% 9.28 4.62
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers11.lean +4/-8 89,113 34,553 -54,560 -61.2% 14.21 6.44
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData29.lean +2/-2 64,297 9,784 -54,514 -84.8% 10.10 4.53
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers12.lean +4/-8 88,855 34,473 -54,381 -61.2% 12.94 7.76
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData10.lean +2/-2 63,890 9,682 -54,208 -84.8% 16.51 4.03
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData25.lean +2/-2 63,718 9,647 -54,070 -84.9% 16.12 3.65
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData24.lean +2/-2 63,664 9,750 -53,914 -84.7% 9.35 4.56
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData07.lean +2/-2 63,474 9,721 -53,752 -84.7% 15.17 3.77
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData13.lean +2/-2 62,741 9,582 -53,160 -84.7% 13.81 3.95
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData11.lean +2/-2 62,441 9,439 -53,001 -84.9% 12.03 4.99
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers20.lean +4/-8 86,820 33,889 -52,931 -61.0% 15.34 5.32
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers02.lean +4/-8 86,843 34,000 -52,843 -60.8% 18.50 8.50
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers09.lean +4/-8 86,418 33,687 -52,730 -61.0% 9.62 7.38
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData09.lean +2/-2 62,144 9,426 -52,718 -84.8% 9.80 3.66
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers15.lean +4/-8 85,861 33,548 -52,313 -60.9% 12.01 7.33
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData08.lean +2/-2 61,307 9,263 -52,045 -84.9% 8.48 4.98
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers14.lean +4/-8 85,360 33,375 -51,986 -60.9% 15.50 5.46
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers13.lean +4/-8 85,061 33,132 -51,929 -61.0% 9.70 7.05
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData21.lean +2/-2 60,896 9,326 -51,570 -84.7% 7.85 3.91
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData22.lean +2/-2 60,893 9,357 -51,536 -84.6% 10.72 4.04
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers04.lean +4/-8 84,220 33,030 -51,190 -60.8% 7.16 6.78
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData20.lean +2/-2 59,619 9,126 -50,493 -84.7% 8.72 4.33
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers19.lean +4/-8 82,196 32,345 -49,851 -60.6% 7.61 5.83
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers10.lean +4/-8 81,603 32,213 -49,389 -60.5% 7.19 6.59
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers07.lean +4/-8 81,448 32,294 -49,154 -60.3% 9.90 5.55
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData23.lean +2/-2 57,422 8,713 -48,710 -84.8% 11.07 4.85
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers01.lean +4/-8 80,386 31,825 -48,561 -60.4% 13.69 7.69
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers00.lean +4/-8 78,763 31,206 -47,557 -60.4% 16.10 8.64
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers21.lean +4/-8 76,589 29,422 -47,167 -61.6% 12.14 6.51
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers06.lean +4/-8 77,585 30,896 -46,689 -60.2% 11.96 7.64
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers05.lean +4/-8 76,481 30,578 -45,903 -60.0% 17.27 5.22
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData14.lean +2/-2 54,446 8,550 -45,896 -84.3% 10.99 3.95
LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers18.lean +4/-8 75,627 30,182 -45,444 -60.1% 9.09 6.03
LeanPool/Erdos97ConvexOctagon/CoverageSummaryData16.lean +2/-2 52,029 8,123 -43,906 -84.4% 10.16 3.80
… +42 more files, each with a smaller move (≤ 42,851 HB); full table in the run's step summary
Total +402/-390 6,867,195 3,950,924 -2,916,271 -42.5% 1101.0 769.5

Per-project compile cost (top 2 of 2 projects by |Δ heartbeats|):

Project Files HB base HB head Δ HB Δ HB %
Erdos97ConvexOctagon 91 6,867,194 3,950,923 -2,916,271 -42.5%
(root) 1 1 1 +0 +0.0%

New files — absolute profile

Total heartbeats: — maxHeartbeats units across 0 valid files (94 added LOC).

Sum of lean --profile: — across 0 valid files. Import-excluded time: —.

Count-heartbeats wall-clock total: 0.00 s. Repeated import cost inside lean --profile: —.

Heartbeat values sum disjoint root command traces with trace.profiler.useHeartbeats and synchronous elaboration, converted from raw allocations to maxHeartbeats units by dividing by 1000. They include command elaboration and kernel checking, exclude imports, and include profiler overhead; they are not comparable to the deprecated linter's totals. Per-file wall clocks are measured under parallel load and are noisier than heartbeats.

LOC counts added lines in the profiled Lean files from this PR diff.

File LOC Heartbeats (maxHB) Count wall (s) lean --profile (s) Without import (s) Import (s) Commands Errors
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts00.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts01.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts02.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts03.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts04.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts05.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts06.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts07.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts08.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts09.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts10.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts11.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts12.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts13.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts14.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts15.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts16.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts17.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts18.lean 1 — — — — — 15 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts19.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts20.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts21.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts22.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts23.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts24.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts25.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts26.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts27.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts28.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts29.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts30.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts31.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts32.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts33.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts34.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts35.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts36.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts37.lean 1 — — — — — 11 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts38.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts39.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts40.lean 1 — — — — — 11 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts41.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts42.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts43.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts44.lean 1 — — — — — 11 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts45.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts46.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts47.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts48.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts49.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts50.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts51.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts52.lean 1 — — — — — 11 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts53.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts54.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts55.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts56.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts57.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts58.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts59.lean 1 — — — — — 11 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts60.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts61.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts62.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts63.lean 1 — — — — — 11 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts64.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts65.lean 1 — — — — — 11 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts66.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts67.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts68.lean 1 — — — — — 11 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts69.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts70.lean 1 — — — — — 11 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts71.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts72.lean 1 — — — — — 11 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts73.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts74.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts75.lean 1 — — — — — 14 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts76.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts77.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts78.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts79.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts80.lean 1 — — — — — 13 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts81.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts82.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts83.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts84.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts85.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts86.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts87.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts88.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts89.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts90.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts91.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts92.lean 1 — — — — — 12 1
LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts93.lean 1 — — — — — 10 1
Total 94 — 0.00 — — — 1184 94

Aggregate phase totals

Phase Time
Unavailable —

Advisory only — never blocks merge. Full log uploaded as the proof-profile artifact.

@Vilin97 Vilin97 left a comment •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accepted at a526db661435. The packed replay proves the existing Erdős 97 certificate checks with less total build work.

  • The new decider is equivalent to the existing chunk predicate for arbitrary claims and chunk bounds. The shift proofs preserve UInt64’s modulo-64 behavior. The word shortcut requires both a zero mask and an empty witness array. All 375 node audits, 88 conflict-cover audits and 64 summary audits use kernel-checked decisions. Packed replay
  • The import changes preserve the public import list. I checked the retained manifest comparison across all 269 project modules. It found zero changes or removals among the 132,021 existing records. The new decider’s body is present as a safe definition in the private module section, and the retained axiom and trust audits passed. Validation evidence
  • The retained clean builds took 189.88 s and 154.21 s. The advisory profiler measured a higher elaboration cost in the replay helper itself, where the PR adds the equivalence proofs. Across all 92 comparable files, total heartbeats fell 42.5%. All 94 failed measurements reference the new decider absent from the profiler’s merge-base imports. The exact-head build checks the complete dependency graph. Proof Profile · Lean Action CI

@Vilin97

Vilin97 commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 LLM review — refactor (gpt-6.2-sol)

Reviewed head: a526db6614351800d56c95813dabf2aa3f2d4df8

Verdict: ✅ approve

The PR moves node audits to a Nat-based replay proved equivalent to the existing checker for arbitrary claims, uses decide +kernel for closed table audits, and trims private Mathlib imports. All 269 project modules built at head. I reproduced the drop from 2,074 to 750 import artifacts for CoverageCertificateFacts80, and the packed replay was faster in both paired runs of 20 identical chunk audits. The 18.79% clean-build speedup is the contributor’s measurement.

Aspect Value
Scope certificate replay and import optimization
Introduces tech debt 🛑 yes
Maintainability ✅ improved
Brittleness ➖ unchanged
Risk ✅ low

The lower audit cost and narrower imports outweigh the duplicated replay logic, whose agreement with the checker is enforced by explicit equivalence proofs.

Findings (1)

  • duplicated-logic — LeanPool/Erdos97ConvexOctagon/CoverageCertificateReplay.lean:417
    packedActiveRow repeats the witness routing and child guards in replayActiveRow, and packedPruning repeats the row partition checks. A change to those rules now has to be carried through the checker and both replays. As a follow-up, share the traversal and common guards between the replays, then rerun the chunk benchmark to verify that the shared code retains the speedup.

Tokens: 2,861,170 in / 19,532 out · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $11.7377 (Standard API equivalent; uncached input) (long-context rate)
Automated review against .github/REFACTOR_REVIEW_RULES.md. Disagree? Reply on the PR; rules can be updated in a PR of their own.

@Vilin97
Vilin97 added this pull request to the merge queue Nov 29, 2026
Merged via the queue into main with commit 894efd7 Nov 29, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant