Skip to content

fix: reject replay map entries stored under a different name - #16677

Merged
nomeata merged 1 commit into
masterfrom
joachim/issue16675
Nov 22, 2026
Merged

nomeata merged 1 commit into
masterfrom
joachim/issue16675

Conversation

@nomeata

@nomeata nomeata commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

This PR makes leanchecker reject .olean files whose constant name table does not match the names of the stored constants. Previously, a recursor, constructor or quotient entry stored under a different key was never compared against the kernel-generated declaration.

Kernel.Environment.replay now checks that each map key equals the name of the ConstantInfo stored under it. This covers the plain, --fresh and --from-export paths. leanchecker additionally rejects modules with duplicate entries in constNames or with constNames and constants of different sizes.

Fixes #16675 (and the variants in #15100, #15101).

Built with Claude

🤖 Generated with Claude Code

This PR makes `leanchecker` reject `.olean` files whose constant name table does not match the names of the stored constants. Previously, a recursor, constructor or quotient entry stored under a different key was never compared against the kernel-generated declaration.

`Kernel.Environment.replay` now checks that each map key equals the name of the `ConstantInfo` stored under it. `leanchecker` additionally rejects modules with duplicate entries in `constNames` or with `constNames` and `constants` of different sizes.

Fixes #16675

Built with Claude

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@nomeata
nomeata enabled auto-merge November 22, 2026 22:26
@nomeata
nomeata added this pull request to the merge queue Nov 22, 2026
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Nov 22, 2026
Merged via the queue into master with commit 4e48c96 Nov 22, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-other toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

1 participant