Repository navigation
Variants are lists; generic callers are ordinary registration files - #4654
Merged
Merged
Conversation
The emitter found variants and generic callers by their files' paths (`Variants/<Iface>/<Target>/<Name>.lean`, one file per implementation, and `Generic/<Iface…>/<Target>/<Alg>.lean`, applied to every variant or combination of variants). Both are now plain Lean: * the implementations of an interface on a target are one list, `variants` in `Proof/Variants/<Iface>/<Target>.lean` (53 files for 170 one-line variant files); * each generic file is part of the registration file of its algorithm and target, `Artifacts/<Alg>/<Target>.lean`, whose `artifacts` applies it to each element of those lists (nested `flatMap`s for several interfaces; the list itself for an `All<Iface>` one), as the emitter did. Where an algorithm's functions came from several files (an existing registration file, or generic files over different interfaces), each is a namespace of the one file. The emitter now finds no file under `Generic/` or `Variants/` (the trusted code that did goes in a change of its own). The generated crates have the same items, in another order where their artifacts now come from another file; every dispatcher is unchanged. The checks and documentation that named the two directories name `Artifacts/` and `Proof/Variants/`. Part of #4548. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHFjAR7Byf513R4zuFy
alex
enabled auto-merge
November 8, 2026 17:59
alex
pushed a commit
that referenced
this pull request
Nov 8, 2026
Since #4654 the emitter reads no registration file under Generic/, so the search's registration moves to Artifacts/DsaParameters/RISCV64.lean, as PPC64LE's, mapping over Proof.Variants.MillerRabin.RISCV64.variants. The RISC-V crate's generated dispatch/dsa.rs conflicted: it takes main's side and is regenerated with the full emitter. 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
`vg_ffdh_generate_key_cached` is internal on main (#4875, #4876): the registration drops its artifact and its proofs name `Proof.Ffdh.cachedGenerateKeyContract`. Generic callers are ordinary registrations (#4654), so the sieved parameter search is registered in `Artifacts/Ffdh/RISCV64.lean` over `Proof.Variants.MillerRabin.RISCV64`, as on PPC64LE. `Shape.lean` uses the shared `RsaKeyGen.wv_half` that replaced FFDH's `WordHalf` (#5059). 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.
Part of #4548. There are no trust changes: nothing under
TCB/orSpec/changes.The emitter used to find variants and generic callers by their file paths, with one file per implementation at
Variants/<Iface>/<Target>/<Name>.lean. EachGeneric/<Iface…>/<Target>/<Alg>.leanwas applied to every variant, or to every combination of variants. Both are now plain Lean.What changes
variants, inProof/Variants/<Iface>/<Target>.lean. That is 53 files in place of 170 one-line variant files.Artifacts/<Alg>/<Target>.lean. That file'sartifactsapplies it to each element of those lists, exactly as the emitter did:flatMaps for a caller of several interfaces;All<Iface>caller.Generic/orVariants/. Deleting the trusted code that searched for them is a separate PR, together with ranking dispatchers by list order instead of byDispatch.lean.ci/check_registrations.py,check_lean_speed.py,lit_imports.py,check_lean_public_imports.py,trim_lean_imports.py, CLAUDE.md,lean/README.mdand theadding-a-primitiveskill now nameArtifacts/andProof/Variants/.Generated crates
45 generated files change, and only in the order of their items: their artifacts now come from a different file. Splitting every changed file at its top-level items, each file has exactly the same items as before. Every dispatcher, including the order of its arms, is unchanged.
Checks
lake buildpasses on every changed module.Emit.leanregenerates the crates and passes its audits.ci/check_lean_public_imports.pypasses on the 224 changed modules.Generated by Claude Code