Repository navigation
Registration files never state stack - #5121
Merged
Merged
Conversation
With `Registration.stack` found in the contract `verified` proves (`stack_of`), no registration states it: this removes the 1,649 `stack := …` fields of the 540 files of `Artifacts/` that had one, and the names their `open … (…)` lists held only for them (`stackT`, `encStack`, …). 244 of them were not numbers but expressions over the proofs' definitions (`96 + Proof.Hmac.Stream.PPC64LE.hmacFrame Spec.Hmac.sha512I`), which a reviewer could only take on trust, and which the kernel was already comparing with the contract. `ci/check_registrations.py` refuses `stack :=` in a registration file, as it does `consts :=`, so code that uses more or less stack changes its proof and no file reviewed by hand. The `adding-a-primitive` skill and `lean/README.md` say so, and the skill says what to do where `verified`'s type is not known when the registration is elaborated. The generated crates are unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHHMmMkznUjKKnRwx5M
alex
force-pushed
the
claude/beautiful-clarke-lq6jdt-registrations
branch
from
November 15, 2026 17:34
2134f4a to
8ae708e
Compare
alex
enabled auto-merge
November 15, 2026 17:38
alex
pushed a commit
that referenced
this pull request
Nov 15, 2026
Since #5121 registration files never state `stack`: the search's registration drops `stack := 512`, which the default, `stack_of`, finds in the contract `params_verified` proves. The generated crates are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHGhkN8REQLPW8yxN5A
alex
pushed a commit
that referenced
this pull request
Nov 15, 2026
#4278 restored the RISC-V Miller–Rabin search to main (`Impl/MillerRabin/RISCV64/Search.lean`, `Proof/MillerRabin/RISCV64/Search/`) with the same definitions this branch had kept as FFDH-only copies. Those copies go: the candidate uses main's definitions and main's `montPrep_ok`, `r2Any_r2Ok` and `roundCall_ct`. Only the sieve's proofs, which main lacks, stay, in their one user `ParameterCandidate/Shape.lean`. The registration no longer states `stack` (#5121). The regenerated crate takes `vg_miller_rabin_round` from DSA's module, where #4278 put it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHHEKNw8eCDhgbwoFBL
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.
Follows #5120 (merged), which makes
Registration.stackdefault to the stack of the contractverifiedproves (stack_of). With that, no registration needs to state it, and this PR removes it from the files reviewed by hand.What changes
Artifacts/: the 1,649stack := …fields of the 540 registration files that had one are gone, with the names theiropen … (…)lists held only for them (stackT,encStack,decStackP, …; 61 names). Nothing else in those files changes. 244 of the fields were not numbers but expressions over the proofs' definitions, e.g.stack := Proof.Hmac.Stream.PPC64LE.hmacFrame Spec.Hmac.sha224I + 144 + Proof.Pbkdf2.Whole.PPC64LE.pbkFrame Spec.Hmac.sha224Iwhich a reviewer could only take on trust, and which the kernel was already comparing with the contract (
ofApi,ofSig).ci/check_registrations.pyrefusesstack :=in a registration file, as it doesconsts :=, with a test. Code that uses more or less stack now changes its proof and no file reviewed by hand.Docs: the
adding-a-primitiveskill's example and text, andlean/README.md's description of what a registration states. The skill also says what to do whereverified's type is not known when the registration is elaborated (give thevof avariants.map fun v =>its type), which is what the ten registrations fixed in Registration.stack is found in the contract the proof is of #5120 ran into.No
TCB/orSpec/change. The generated crates are unchanged: every artifact'sstackis the term it was, now read from the contract.The registration builders under
Proof/(mostly x86-64'sScrubmodules) still statestack; they are not reviewed by hand, and are left for a follow-up.Checked
On a3186ac (the latest cached build when I started), on top of #5120:
lake buildof every module,lake env lean --run Emit.lean --check, and the static checks. The branch was then recreated onmainwith the same script, and restacked onto #5120's merge; it differs from the checked copy only in the three Triple DES registrations #5114 changed, which I have not built locally.ci/check_lean_public_imports.py --basereports no import added. Its fulllake shakepass, to find an import that only a removed field used, fails in my checkout on a private part that does not match a locally rebuilt module; a search of the removed fields' names finds none whose namespace the file no longer mentions through an import of its own.🤖 Generated with Claude Code
https://claude.ai/code/session_01TKUFHHMmMkznUjKKnRwx5M