Repository navigation
perf: adopt modules and reduce Lean Pool build cost - #415
Conversation
|
Measurement setup and first migration checkpoint
The baseline is not finished yet; no performance improvement is claimed at this checkpoint. The first repair build has found tactic implementations needing explicit |
|
First measured pilot: Each version was compiled with a fresh pool build directory, prebuilt Mathlib,
The module-only step roughly halves maximum RSS, largely by excluding private imported data. Shake removes unnecessary tactic imports and makes the SFinite/infinite-sum proof dependencies private; both public project re-exports remain. Relative to the original, the shaken pilot executes 16.3% fewer userspace instructions and has 10.7% lower sampled peak anonymous memory. The shaken run has higher system time and wall time than the module-only run despite fewer instructions. These are single samples on a shared WSL host; I am repeating the pilot before drawing timing conclusions. Neither full-pool build has finished yet. The initial draft also exposed the existing CI planner’s oversized |
|
Pilot repeats: the memory result is robust; the first shake-speedup inference was premature I repeated all three configurations twice, again removing the pool build directory before each run and rotating execution order. All nine builds passed. Medians across the three runs:
The initial baseline and module runs each executed about 6 billion more instructions than their subsequent runs, while the copied shake checkout did not show that initial overhead. The earlier 16.3% instruction reduction and 10.7% anonymous-memory reduction should not be used as conclusions. Across the repeated samples, module conversion reduces instructions by about 4.5% and maximum per-process RSS by about 48%; additional shake savings in this particular small project are negligible. Anonymous memory is essentially unchanged. Wall time varies substantially on the shared host (original: 7.50–14.26 s; modules: 8.31–12.03 s; shaken: 6.49–12.06 s), so I am not treating the wall-time medians as a reliable speedup estimate. The full-pool comparison remains in progress. |
|
Module-port repair checkpoint The first 30 failing files have localized repairs, verified with targeted Lake builds. Examples:
The full library textual style checker passes. The initial whole-pool build is still collecting later failures; this checkpoint is not a claim that the full migrated library passes yet. No checking options or gates were disabled. |
|
A larger benchmark checkpoint: 92 Lean modules in the complete
The mechanical module migration reduces instructions by 7.4% and maximum process RSS by 51.6%. The much smaller change in total anonymous memory is consistent with the module system chiefly reducing imported proof/olean data. Shake applied 73 import suggestions; its first sample saves a further 0.5% of instructions. Do not read the wall/task-clock columns as a controlled speedup estimate yet. Other full builds are running on this host, and the shaken sample has much worse timing despite almost unchanged instruction count. I am running two more interleaved rounds of all three versions and retaining every sample. Method: identical pinned toolchain and prebuilt package dependencies, empty per-copy |
|
Feige import optimization is now in e54e55a, and the integration build in this PR worktree passes. The separate benchmark has also completed three clean builds of each version, all successfully. Medians (92 modules in the original dependency set, same toolchain/cache/CPU affinity; methods as in the previous comment):
The repeatable result is 7.4% fewer instructions from modules, then another 0.5% from Shake; maximum process RSS is approximately halved. This benchmark does not establish a wall-time improvement from Shake. The shaken wall times were 209.57, 205.72, and 94.26 seconds, while the other variants also varied substantially. All timings remain visible below; the host was shared with the full baseline and migration builds. Shake changes 73 files. Public import lines fall from 234 to 164; total direct import lines rise from 234 to 292, because Shake adds explicit dependencies while removing redundant imports and re-exports. A smaller direct-import count is not the optimization target: the accessible dependency set and import visibility matter. All nine samples (seconds, billion instructions, KiB)
The content PR remains a draft. The first full migration scan is still running, with failures repaired and checked locally as they surface. These are project-level measurements, not a completed whole-pool result. |
|
The full original baseline completed successfully at base
Configuration: The migrated full build is still being repaired, so this is a reference measurement, not yet a full-pool speedup claim. The completed Feige comparison above remains the measured comparison for the module/import changes so far. |
|
Pushed another repair checkpoint, The original full build measurement is recorded above. The migrated full build is still incomplete: diagnostic passes have reported 129, then 67, then 52 failing files. These are not identical test sets: repairing dependencies lets each pass reach previously skipped downstream files. Sixteen failures in the latest pass are the same private certificate-array dependency pattern, now being repaired together. The checkpoint does not claim a successful whole-pool build, complete import minimization, or final performance figures. Existing CI cannot yet compile this large diff because its changed-file environment exceeds the OS argument-size limit (the main build-planner fix is separately proposed in #412). The proof-profile workflow has the same size-limit problem. No checks, profiling workflow, or linter settings have been weakened. |
3ba6c3d to
fe76137
Compare
|
The complete module migration now builds: Pushed checkpoint I also rebased onto Full-pool |
|
Full-pool
The higher total is expected: broad transitive imports become explicit dependencies. These counts describe the tool output before compatibility repairs; they are not a build-time result. The rebuild is finding cases that still require explicit public imports (notably theorem references inside exposed constructors and some attributes), along with unused namespace/section declarations whose imports shake removed. I am repairing these as their compile jobs finish. The full declaration linter on the pre-shake module checkpoint found only naming/docstring issues: 393 newly public helper names with underscores and 527 missing docstrings, mostly generated certificate arrays. Those fixes are applied locally and included in the rebuild. The source style check, generated-index check, and unchanged Challenge/Solution build passed at that checkpoint. Full linter/axiom verification and the optimized cold-build measurements remain outstanding. |
# Conflicts: # LeanPool.lean
|
The full import-minimization repair is progressing: the first rebuild reported 127 failing modules; the next reported 61 as more downstream files became reachable. Repairs for that second set are now undergoing another full build. These results are diagnostic rebuilds, not performance measurements. The recurring exceptions to a mechanical
The source checks pass for headers, forbidden constructs, file sizes, and proof sizes; the full style checker also passes. The helper documentation and naming fixes for the declaration linter are in the working tree and are being rebuilt. The final declaration-linter run, stable-artifact axiom/option audits, and full optimized cold-build measurement are still outstanding. The successful baseline measurement above remains the comparison point; no full-pool speedup is claimed yet. |
|
The minimized 159-project snapshot now builds successfully and passes the full declaration linter. Tested snapshot: Validation completed for that snapshot:
The full repository quality checker, including axiom and option audits, is still running. The fresh optimized build measurement has started in a separate checkout of Two automated merges added Ehrhart volume inequality and sphere packing to this PR branch while the optimization was underway. I have integrated those merges in |
|
The full quality audit caught problems beyond what the build and declaration linter covered. Fixed in
Validation: the expanded pool builds successfully (10,149 jobs), every current source's build trace is free of compiler warnings/errors, and the style checker passes. Full declaration lint and the complete quality audit are running again on this stable snapshot. I stopped and discarded the incomplete cold measurement of |
|
Correction to the workload labels in earlier progress comments: the actual |
|
All local validation now passes for
The failed Lentil auxiliary proofs and entry-point exports reported in the earlier audit are fixed in source. No gates or waivers were changed. The matched 180-project cold benchmark on corrected commit |
|
Measurement reproduction details: The full comparison uses fresh Run the harness below from each corresponding worktree, with a different output prefix: LEAN_NUM_THREADS=8 taskset -c 0-7 python3 measure.py /path/to/results/baseline-full lake build LeanPoolThis Linux/x86-64 harness starts inherited perf counters before releasing the child process, records maximum process RSS through
Exact measurement harness"""Measure a process tree with inherited Linux perf counters and /proc sampling."""
import ctypes
import fcntl
import json
import os
from pathlib import Path
import struct
import sys
import time
def counter(process, kind, configuration, userspace=False):
attributes = ctypes.create_string_buffer(128)
flags = 1 | (1 << 1)
if userspace:
flags |= (1 << 5) | (1 << 6)
struct.pack_into("IIQQQQQ", attributes, 0, kind, 128, configuration, 0, 0, 3, flags)
library = ctypes.CDLL(None, use_errno=True)
descriptor = library.syscall(298, ctypes.byref(attributes), process, -1, -1, 0)
if descriptor < 0:
raise OSError(ctypes.get_errno(), os.strerror(ctypes.get_errno()))
return descriptor
def sample(group):
anonymous = 0
count = 0
for entry in Path('/proc').iterdir():
if not entry.name.isdecimal():
continue
try:
fields = (entry / 'stat').read_text().rsplit(')', 1)[1].split()
if int(fields[2]) != group:
continue
count += 1
for line in (entry / 'status').read_text().splitlines():
if line.startswith('RssAnon:'):
anonymous += int(line.split()[1])
except (FileNotFoundError, ProcessLookupError, PermissionError):
continue
return anonymous, count
def main():
destination = Path(sys.argv[1])
command = sys.argv[2:]
reader, writer = os.pipe()
process = os.fork()
if process == 0:
os.close(writer)
os.setsid()
os.read(reader, 1)
os.close(reader)
with destination.with_suffix('.log').open('wb') as log:
os.dup2(log.fileno(), 1)
os.dup2(log.fileno(), 2)
os.execvpe(command[0], command, os.environ)
os.close(reader)
counters = {}
errors = {}
for name, arguments in [('task_clock_ns', (1, 1, True)), ('instructions_user', (0, 1, True))]:
try:
counters[name] = counter(process, *arguments)
except OSError as error:
errors[name] = str(error)
start = time.monotonic()
for descriptor in counters.values():
fcntl.ioctl(descriptor, 0x2400, 0)
os.write(writer, b'1')
os.close(writer)
peak_anonymous = 0
peak_processes = 0
samples = 0
while True:
anonymous, count = sample(process)
peak_anonymous = max(peak_anonymous, anonymous)
peak_processes = max(peak_processes, count)
samples += 1
completed, status, usage = os.wait4(process, os.WNOHANG)
if completed:
break
time.sleep(0.2)
results = {
'command': command, 'cwd': os.getcwd(),
'exit_code': os.waitstatus_to_exitcode(status),
'wall_seconds': time.monotonic() - start,
'user_seconds': usage.ru_utime, 'system_seconds': usage.ru_stime,
'max_process_rss_kib': usage.ru_maxrss,
'sampled_peak_tree_anonymous_kib': peak_anonymous,
'peak_processes': peak_processes, 'samples': samples,
'sampling_interval_seconds': 0.2,
'affinity': sorted(os.sched_getaffinity(0)),
'counter_errors': errors,
}
for name, descriptor in counters.items():
value, enabled, running = struct.unpack('QQQ', os.read(descriptor, 24))
results[name] = value
results[name + '_enabled_ns'] = enabled
results[name + '_running_ns'] = running
os.close(descriptor)
destination.with_suffix('.json').write_text(json.dumps(results, indent=2) + '\n')
print(json.dumps(results, indent=2), flush=True)
return results['exit_code']
if __name__ == '__main__':
sys.exit(main()) |
|
Auto-rebase stopped: this PR conflicts with |
|
Auto-rebase stopped: this PR conflicts with |
3 similar comments
|
Auto-rebase stopped: this PR conflicts with |
|
Auto-rebase stopped: this PR conflicts with |
|
Auto-rebase stopped: this PR conflicts with |
Automated review disposition: needs-maintainerReviewed exact head What changed underneath it: That is why this is a maintainer decision rather than a change request to an author: the PR is a pool-wide architecture change (Lean module system across ~4,600 files, a root index that mixes module and legacy imports, the #416 rebase-tool prerequisite, and a
No code in this PR is being judged deficient; the label records the reconciliation cost and the architecture question. |
|
Auto-rebase stopped: this PR conflicts with |
4 similar comments
|
Auto-rebase stopped: this PR conflicts with |
|
Auto-rebase stopped: this PR conflicts with |
|
Auto-rebase stopped: this PR conflicts with |
|
Auto-rebase stopped: this PR conflicts with |
|
Update at |
…' into codex/module-import-optimization
Lean Pool's legacy imports load proof bodies and broad transitive dependencies, and several closed certificates repeat expensive evaluation. This refactor adopts Lean modules and minimizes imports across the existing project scope, shares mathematical arguments, and replaces repeated certificate work with proved evaluators. The historical fixed-workload benchmark reports 17.13% fewer retired instructions; its workload and source snapshot are documented below and do not cover later incoming projects.
The branch is reconciled with current
main. PolynomialMethodRestrictedSums keeps upstream proof repairs together with the module import headers. GapCVP remains byte-identical tomain: its incomplete mechanical module conversion was removed because exposed definitions referred to private helpers and failed to compile. The root index retains legacy imports so it can aggregate both migrated projects and newly imported legacy projects. This does not revert the module conversions inside the other projects.The branch incorporates main
6850d487333f4eff5388859a02a7c91eb2304ee7, including Lean/Mathlib 4.34, the latest imported projects, and the separately merged CI performance work. Current headddc2a6a92837d8c01fe8e87342feab60f5aac958preserves the resolution of 126 conflicted files and adds explicit dependencies exposed by full CI after Mathlib's module splits. The repairs cover public p-adic valuation and pullback APIs, matrix order and spectral APIs, countability, polynomial mapping, dominated convergence, and other moved analysis lemmas. Two Incompleteness proof fields now use proof blocks to reference their private helper, and one Poincare continuity composition explicitly identifies its intermediate point. Mathematical statements and computational definitions are preserved.Current repair validation: all 19 affected projects build with warnings treated as errors and pass declaration linting. The three build batches completed 4,768, 4,543, and 2,488 jobs respectively; these counts include overlapping dependencies and are not a whole-pool job count. The incoming InfiniteConnesRigidity changes are byte-identical to main and separately pass a 3,755-job build and declaration linting. Whole-pool source style and generated-index checks pass on the current head. Earlier Lean 4.34 integration builds and linters also passed for AndersonConjecture, BrauerGroupNew, Brouwer, Chudnovsky, MetricCodes, MRiscX, Lentil, RellichKondrachov, OSforGFF, ArtinWedderburn, BollobasNikiforov, and Erdos132ConvexK3; those project sources are unchanged by the latest repair.
All active non-documentation CI passes on current head
ddc2a6a92837d8c01fe8e87342feab60f5aac958. Lean CI run 35387422721 completed successfully: all ten build shards, assembled whole-pool build, Challenge/Solution builds, declaration linters, source style, generated indexes, and repository quality checks pass. Greptile, separation and advisory checks, and Documentation preflight also pass. The long exposition and doc-gen4 jobs remain running and are excluded from the merge decision at the maintainer's explicit request. The superseded runs exposed the repaired failures; they are not reported as passing. Earlier heads75a8a905and137da926passed all active non-documentation CI on the previous toolchain, which does not validate the current Lean 4.34 integration.Earlier scoped checks on the preceding toolchain passed: the generated index; complete GapCVP build (3,222 jobs, warnings treated as errors); PolynomialMethodRestrictedSums build (1,998 jobs, warnings treated as errors); both projects’ declaration/style linters; whole-pool style; repository source-quality scans; scoped axiom audits (2,976 GapCVP and 60 PolynomialMethodRestrictedSums declarations); and the compiled environment option/soundness audit. No checks, gates, resource limits, or waivers have been changed. The PR diff contains only permitted content paths.
Per the maintainer's explicit instruction, merge after all current-head active non-documentation checks pass without waiting for long-running documentation jobs. Required branch protection, including Documentation preflight, remains in force. The documentation investigation is complete and the performance fixes landed separately in #450; this PR adds no workflow changes relative to main.
Historical benchmarks, implementation details, and earlier scoped validation
The following records describe earlier checkpoints. In particular, references to a pending GapCVP module repair and a module-mode root index are superseded by the integration described above. Historical full-suite passes are not validation of the current head.
Four of the five newly reconciled projects now pass their scoped checks: QuantumParallelRepetition, MetricCodes, NonSoficGroup and InfiniteConnesRigidity. GapCVP passes its build, linters, quality and axiom checks; its final compiled kernel comparisons are still running, so that repair is not included in this checkpoint. The full frozen PASS below predates all five incoming projects and is not a full validation of the current PR head. Upstream also merged 1,585 Navier–Stokes/Euler module files; they remain byte-identical to main and are outside the measured and fully validated snapshots.
Lean Pool's legacy imports load proof bodies and broad transitive dependencies, while several closed certificates repeatedly evaluate large expressions. This PR adopts Lean's module system, minimizes imports with
lake shake, and replaces expensive repeated work with proved evaluators and shared mathematical arguments. Public import edges fall from 22,410 to 15,488 in the original measured snapshot.Project entry points and intentional API exports are preserved. Dependencies of generated tactic code are explicit, including the standalone public ring-tactic dependency. The migration also fixes generated Lentil proofs whose universe mismatches were hidden by a command-elaborator round trip, gives new public helpers suitable names and documentation, and ports the legacy sensitivity proof into its project.
Certificate changes include a proved coefficient-combining algorithm for Gardam's product, six symplectic pairings for Connes, an early-exit ternary scanner for GKP, and a finite-support evaluator for TwoColoring. Hypergraph, octagon, and geometric finite checks evaluate directly in the Lean kernel. Other proofs reuse existing algebra equivalences, finite-set and finite-sum lemmas, order bounds, and folded homeomorphisms. Shared arguments remove hundreds of lines from Nesterov assembly, Scarf, Anderson union constructions, and planar mesh proofs. Adic-completion proofs now reuse Mathlib’s completeness and evaluation-kernel theorems, with repeated subring closure arguments shared privately. Jensen's final construction reuses the completion equivalence already supplied by the Heitmann proposition; a compiled
rflprobe preserves its private wrapper. Vlasov's global flow bounds use existing local theorems. Čech and Laurent-tail proofs use existing restriction maps, direct-limit induction, and finite-support sum maps. Skyscraper's vanishing criterion now reuses coboundary linearity and the existing global-section gluing theorem, removing 90 lines. ZF function proofs use existing graph, lambda, and product facts, removing 170 lines. Existing public statements and computational definitions are preserved; new shared constructions have explicit correctness or carrier-equality checks.The cold full-pool comparison uses the same 180-project/4,624-import workload, pinned dependencies/configuration, empty pool caches, and CPU affinity 0–7. All six historical snapshots remain below: legacy
9e514186, modules/imports8c7997a5, proof benchmarkf1f05501e, cumulative07e9f1804,4114a7b84, andf6dc6c0d1. The seventh column freezes sourcee25b6810fat98e24aed6.The latest fixed-selection run completed all 10,110 jobs and exactly 4,625 pool modules without warnings or errors. Instructions are 17.13% below legacy, 13.57% below the module snapshot, and 0.47% below the preceding warning-free cumulative benchmark. All 4,802 source/configuration hashes and nine pinned dependency repositories stayed unchanged; counters have no errors or multiplexing. Wall time is 41.147 minutes from the harness monotonic clock. These are single shared-host runs, so elapsed times do not isolate causality. Sampled peak tree anonymous memory rises 6.27% from the previous run; process RSS is effectively flat. This is not a memory-improvement claim. Raw wrapper UTC and monotonic spans differ by 109.396 seconds; the cause remains unestablished. Harness and reproduction details, original results, and earlier cumulative results.
Representative scoped measurements are below. These use their own before/after sources and include substantial changes after the cold full-pool snapshot; they are not additive or whole-pool reductions.
The new
NSubringChain.unionNSubringremoves 234 lines by sharing the union's structure and cardinality arguments. Three alternating cold builds of all 50 Anderson modules, including the new constructor and every caller, reduce median instructions from 1.481933T to 1.459215T (1.53%). Individual-process RSS is flat; the concurrent anonymous-memory peak rises about 5%, so this is not a memory-improvement claim. A compiled client proves the constructor's carrier equals the existing union byrfl.The frozen checkpoint
ede6e24fdbce180ef331ccd01dc3dac259b1f6dfhas validation status PASS for all eleven full checks. The full suite covers the pool build, generated indexes, Challenge/Solution build script, all six declaration/style linters, the unchanged full quality CLI, and a supplemental parser-delta audit. The quality parser finds 75,711 pooled declaration occurrences; the supplement checks 24 additional names under the same axiom whitelist. Thirty-four known inline-include/omitpublic Anderson names are explicitly audited as well. The shared union and new private subring carriers have compiledrflprobes. A standalone client imports the Čech colimit module and applies the new public cocycle induction principle under its intended assumptions; its axiom audit passes.A separate read-only compiled axiom-closure audit also passes at that exact frozen checkpoint. It covers all 214,328 serialized pool declarations (213,791 distinct names) across 4,678 modules, and traverses 398,360 reachable serialized declaration bodies, including private/generated declarations, theorem and opaque bodies, constructor types, and earlier serialized variants of duplicate names. Its axiom union is exactly
propext,Classical.choice, andQuot.sound, with zero missing constants or metadata errors. Adversarial fixtures cover hidden private/opaque axioms and overwritten duplicate theorem bodies; an unused foreign duplicate correctly remains outside the reachable graph. All 4,724 source/gate hashes remain unchanged. This external audit supplements the unchanged repository checks; it is not an independent kernel replay. Later changes have full per-project builds, declaration/style checks, and scoped source/axiom/environment validation. No authored quality-gate, source-limit, or waiver changes are included.Shared public lemmas also remove duplicate proofs across callers. The Čech colimit/multiplication pair saves 2.66% in three alternating compilations of both modules including artifact emission. Reusing the existing factorial bound between two Chudnovsky modules saves 7.39% under the same inclusive protocol. These are separate scoped comparisons: the Čech pair's process RSS is flat and sampled anonymous memory rises 1.20%; factorial sharing adds 1,824 bytes across the two public artifacts while shrinking the consumer's private artifact by 56.64%.
The latest warning-free cold benchmark stops at source
e25b6810fd280bb52c2e9e2a5f58c1f5b5ba15ff. Its unchanged historical selection excludes the five newly reconciled project scopes; it also predates the additional proof commits reported in this update. Those have separate scoped measurements and are not included in the latest cold column.Upstream main
fec1e89f48and the automated PR update196cd5279are preserved by reconciliationaadad161f, integrated atc07200bc2. MinimumDegreeMatching's six files now use modules, explicit field definitions, and private implementation imports. Its public facade and all 59 compiled public types/axiom lists match the original legacy project; computational definitions and instances are preserved. The matching proof bounds are shorter. Three alternating compilations of all six modules, including provider/consumer artifacts, reduce median instructions from 106.128B to 92.677B (12.67%) for the combined import and proof changes. This project is included in the latest frozen validation; the historical cold benchmark selection excludes it. All upstream non-Lean files remain byte-identical to main, and the PR diff contains only allowed content paths.Companion tooling work remains separate: #416 preserves module exports when automatic rebases regenerate indexes. The prepared quality-parser compatibility patch handles module import/card syntax, explicit public declarations, and section modifiers, with 92 scratch tests passing. It remains unapplied pending the explicit authorization required by the contributing rules; inline declaration wrappers still need further parser coverage.
A supplementary audit of the three round-44 Borel files now verifies all 143 named compiled public types and axiom sets against their original versions; the logs are warning-free.
Correction to earlier Borel evidence: a redundant
Classical.not_impargument introduced a compiler warning in Zero/Strat. Earlier scoped reports missed that warning; seven summaries have been corrected and their original logs preserved. Commite55f6bf5bremoves the unused argument. The affected three final timing runs are superseded by three fresh original/final pairs: 33.390B → 32.158B instructions (3.69%), with all six logs warning-free and all 14 named compiled types/axiom sets identical. Wall time is effectively flat; the private artifact grows by 7,424 bytes while public/IR artifacts remain unchanged. The latest frozen whole-pool build also has no unexpected compiler warnings.A newer fixed-selection cold benchmark freezes source
a1aa4f42fat7585918ef. That source predates the Borel warning fix. The run retains its original source and logs and is classified separately from the warning-free results above. It completed with 103.379T measured instructions and the known warning; it is not a warning-free validation checkpoint. Its monotonic elapsed time is 41.457 minutes. Raw UTC and monotonic clock spans differ; their cause remains unestablished.Upstream main
ae6d5445dand automated PR updatee7b024e6aare reconciled. They add 110 Lean files across GapCVP, InfiniteConnesRigidity, MetricCodes, NonSoficGroup and QuantumParallelRepetition. The 99 legacy files receive module/public-import headers; 11 existing module files are unchanged. The root facade preserves its prior public exports and adds the new modules. Its existing generated header marker, dropped during reconciliation, is restored exactly from the earlier validated checkpoint; all 4,787 public imports remain byte-identical andmk_all --checkpasses. NonSoficGroup and InfiniteConnesRigidity pass their complete scoped builds, linters and quality/axiom checks with unchanged upstream source. All upstream non-Lean changes are preserved. The frozen full PASS and historical cold benchmarks exclude this incoming scope.QuantumParallelRepetition now has 123 compiler-required helper promotions, 110 meaningful helper/field docstrings, and one private proof import. Reversing those edits and the mechanical headers reconstructs all 13 upstream sources byte-for-byte: all original mathematical statements and proof/computational bodies are preserved. Its 3,147-job build, declaration/style linters, unchanged scoped quality checks, option audit, and conservative compiled axiom closure pass without warnings. All 3,379 stable serialized declarations preserve types, universes, safety and computational values after the explicit private-name mapping and proof normalization; 31 remaining expressions pass direct Lean kernel definitional-equality checks. This includes 2,245 originally public declarations and 650 originally public computational definitions. All 1,689 source-public names also pass an actual module-mode client. Compiler-generated proof/match auxiliary names are not claimed unchanged; their bodies remain covered by the full axiom closure. No performance reduction is claimed for this compatibility repair.
Three further JacobianDiffgeo proof refactors remove 86 lines in total: shared Čech patch restrictions, quotient membership for window dimensions, and direct Laurent-tail map/order identities. Each has three warning-free matched measurements, complete compiled named-interface/axiom equality, a full 3,399-job project build, declaration/style linters, unchanged scoped quality checks, and a conservative compiled axiom closure. All original computational definitions remain byte-identical. The Laurent-tail comparison begins after its earlier optimization, so its 7.19% is a follow-up scope, not a replacement whole-pool result.
MetricCodes now passes its 16-file scoped repair: 570 compiler-required helper promotions, 565 required docstrings, two private proof imports, 11 helper renames, and four explicit instance names retaining the original generated names. Exact inverse reconstruction preserves the upstream source modulo those recorded edits. All 6,625 stable project declarations, including 1,570 computational definitions and 5,379 parsed source-named declarations, preserve their compiled interfaces/values through typed normalization, three explicit raw noConfusion matches, and 99 kernel equality checks. Build, linters, unchanged quality/option checks and all 10,372 serialized-root axiom closures pass without warnings. The parsed-name count is not a complete lexical declaration count; the stronger compiled inventory also covers local/anonymous declarations. One foreign compiler artifact changes visibility: the lazily generated
Real.binEntropy.eq_1is now private, so an ordinary public client can no longer reference that incidental name. Its raw statement is unchanged; this exception is recorded explicitly. No performance saving is claimed for this repair.Upstream main
76d244430and automatic PR update0dc7314feare preserved. The incoming NavierStokesAndEuler project already uses modules: all 1,585 source files are byte-identical to main, with no authored project changes or performance claim. The automatic update regenerated the root as legacy imports; its established module/public-import form is restored with all 6,372 module names and their order preserved, andmk_all --checkpasses. Upstream NOTICE, README and registry data remain byte-identical to main. This additional inherited project is also excluded from the fixed cold selection and previous full frozen validation.The latest 6 measured proof scopes remove 242 lines net. Each has three warning-free matched actual-source compilations, preserved named compiled types, a complete project build, declaration/style checks, unchanged scoped quality/option checks and conservative serialized axiom closure. The LatticeTriangle quotient-product proof additionally drops its dependencies on Classical.choice and Quot.sound, retaining only propext; its other axiom lists are unchanged. Divisor's local instance is explicitly included in its API probe. These are incremental scoped reductions, not additive whole-pool savings.