Skip to content

Registration files never state stack - #5121

Merged
alex merged 1 commit into
mainfrom
claude/beautiful-clarke-lq6jdt-registrations
Nov 15, 2026
Merged

alex merged 1 commit into
mainfrom
claude/beautiful-clarke-lq6jdt-registrations

Conversation

@alex

@alex alex commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Follows #5120 (merged), which makes Registration.stack default to the stack of the contract verified proves (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,649 stack := … fields of the 540 registration files that had one are gone, with the names their open … (…) 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.sha224I

    which a reviewer could only take on trust, and which the kernel was already comparing with the contract (ofApi, ofSig).

  • ci/check_registrations.py refuses stack := in a registration file, as it does consts :=, with a test. Code that uses more or less stack now changes its proof and no file reviewed by hand.

  • Docs: the adding-a-primitive skill's example and text, and lean/README.md's description of what a registration states. The skill also says what to do where verified's type is not known when the registration is elaborated (give the v of a variants.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/ or Spec/ change. The generated crates are unchanged: every artifact's stack is the term it was, now read from the contract.

The registration builders under Proof/ (mostly x86-64's Scrub modules) still state stack; 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 build of every module, lake env lean --run Emit.lean --check, and the static checks. The branch was then recreated on main with 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 --base reports no import added. Its full lake shake pass, 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

Base automatically changed from claude/beautiful-clarke-lq6jdt to main November 15, 2026 17:34
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
alex force-pushed the claude/beautiful-clarke-lq6jdt-registrations branch from 2134f4a to 8ae708e Compare November 15, 2026 17:34
@alex
alex enabled auto-merge November 15, 2026 17:38
@alex
alex added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit aec7139 Nov 15, 2026
26 checks passed
@alex
alex deleted the claude/beautiful-clarke-lq6jdt-registrations branch November 15, 2026 17:52
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants