Repository navigation
verify: Pin Lean 4.35.0, move projects 0.1 pinned, and certify with the pinned toolchain - #56
Merged
Merged
Conversation
… and certify with the pinned toolchain.
SwayamInSync
force-pushed
the
fix/lean-pin
branch
from
October 22, 2026 09:13
d249c91 to
b695c49
Compare
This was referenced Oct 22, 2026
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.
Lean projects now pin
leanprover/lean4:v4.35.0, the latest stable release (2026-10-12), instead ofv4.32.2. Moving the pin also exposed two problems with how a project's toolchain is handled:mainlake --dirlake +leanprover/lean4:v4.35.0 --dir=DIR …lakeoutside elan that runs another Leanthe project pins leanprover/lean4:v4.35.0, but /path/lake runs Lean 4.1.0; install elan …, which runs the pinned toolchainv4.32.2The first was hidden because CI installs the pin as elan's default. After this move, a machine whose default is still
v4.32.2would have built every project with 4.32.2.The warning, on a 0.1 project:
Design
Driver/CppVerifyVersion.h):LeanToolchainis the pin;EarlierLeanToolchainslists those earlier releases wrote. cpp-verify owns a project'slean-toolchain, since its generated semantics are written for one Lean. So a pin it wrote in an earlier release is its own to move, and the migration rewrites it once, with a warning. Any other pin is the user's, and stays an error. This is the toolchain part of the 0.1-project migration the plan bundles into 0.2; proof identity (LM3) migrates proof files later.lakeis elan's proxy, every step islake +<pin> --dir=DIR …, aselan runandlake +toolchainmean. Certification first askslake --version, alone, because lake takes--versiononly by itself, and refuses a lake that reports another Lean.Tests
suite/lean_project.cpp:v4.35.0;v4.32.2moves to it with the warning, keeps its proof files, and the next run is quiet;v4.31.0is still an error.suite/lean_toolchain.test(not on Windows):lakeas its proxy, records what certification asks:+leanprover/lean4:v4.35.0 --version, then+leanprover/lean4:v4.35.0 --dir=… build CppVerify.Generated CppVerify.User;lakeoutside elan that reports Lean 4.1.0 is refused with the message above.main, the log check fails (mainrunslake --dir=… buildand never names a toolchain), and so does the refusal (mainruns the fake lake's build).version.testexpects the new pin.lean_kernel,lean_certify,lean_fallback,lean_fallback_partial,backend_fidelity_gate, and the rest of the 33.Mutants of
Verifier.cpp, each rebuilt and run against the Lean tests,lean_project.cpp,lean_toolchain.test, andversion.test: 7 of 7 killed.--dir(lake rejects that, so every certification fails);Lean differential: every suite file (371 here, the exhaustive uleb128 file aside) exported by
main(pin 4.32.2) and by this PR (pin 4.35.0). Each project is built withlakeinside it, so that elan runs the toolchain the project pins. The results are identical file by file: 319 build, 28 fail with the same errors (the printer bugs #54 fixes), and 24 produce no project with either binary (tests of rejected input, and the uleb128 variants that need their own flags).Suites:
EncodingParityTest, which needs archives). The assertions build is left to CI.-W; docs coverage: 0 missing. clang-format: clean.Rebased onto
mainafter #54 and #55 merged, keeping #54's sentence before the pin indocs/DESIGN.md: the 36 lit tests that run Lean pass.Docs
--lean-certifyrow.