Factor climb engines toward generic from Verity (thin instantiation, least on Verity)#4
Merged
Merged
Conversation
- Copy minimal Frames.lean (Verity PR #1983) into local vendored verity/
for build.
- Append notes in BindingFrame.lean and StateFrame.lean pointing at the
generic versions in Compiler.Proofs.Frames.
- Add section to STRATEGY.md documenting the desired split:
* Verity owns the generic preservation combinators (least surface).
* SPHINCS- supplies the step spec + range supplier + contract-specific
layout and segments.
- Keeps additive concrete modelling (SphincsMinusVerifierSpec/) untouched.
- Documents the target thin observable top-level claim.
Depends on lfglabs-dev/verity#1983 .
This is the SPHINCS- side of the "least possible on Verity" refactoring
for the reusable C13 climb engines (ClimbKit, frames, preservation, etc.).
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.
Summary
This PR (together with the companion minimal Verity PR #1983) begins the factoring of the reusable climb / frame machinery so that:
Changes in this PR (kept deliberately small on the Verity side)
Compiler/Proofs/Frames.lean(from Verity PR #1983) into the local vendoredverity/so the workspace builds.BindingFrame.leanandStateFrame.leanpointing at the generic versions.STRATEGY.mddocumenting the intended split and the target thin top-level claim.The "additive concrete" modelling in
SphincsMinusVerifierSpec/(C13Concrete, hMsgC13, the pure index lemmas, etc.) is completely untouched.Motivation (from previous agent work)
Agents repeatedly hit RAM blowups when trying to close the remaining bridge axioms (
c13_refines_byte_spec, Layer-3 compose, atomicexecC13flip) with monolithicsimp/aesopstrategies over the full state + long climb traces.The successful commits were the ones that decomposed into frames + preservation bricks + data obligations reduced to pure-spec facts + range suppliers. This PR externalises the most reusable pieces of that decomposition.
Desired end state (documented in STRATEGY.md)
Frames(and in follow-ups: genericClimbEnginetakingstep,specStep,DataSupplier, and frame-preservation proofs).stepMerkle/ guarded runBody, themerkleSpecStep, thexmss_climb_data_range/fors_climb_data_range(fromhauth+ frozen calldata), and the C13-specific memory layout.pkiff the byte spec accepts androotMatchesPkholds. No full trace equivalence.Test plan / verification
lake build(or equivalent in the harness) should still pass for the spec side.Companion Verity PR: lfglabs-dev/verity#1983
This implements the "least possible on the verity side" version of the refactoring discussed for the C13 accept-path climb correspondence work.
Note
Low Risk
Additive proof scaffolding, comments, and strategy docs; no changes to verifier specs, axioms, or runtime behavior.
Overview
Vendors
Compiler/Proofs/Frames.lean(from Verity PR #1983) into the localverity/tree so the workspace can build against the shared climb/frame lemmas. That module adds genericPreservesBindingsExcept/PreservesSelectorCalldataand keccak-freeletVar/mstorepreservation theorems for reuse in climb proofs.BindingFrame.leangains an import ofCompiler.Proofs.Framesplus a short note that SPHINCS-specific lemmas sit on top of the generic engine; existing SPHINCS frame proofs are unchanged.StateFrame.leanonly adds a cross-reference to the generic selector/calldata lemmas.STRATEGY.mddocuments the June 2026 climb engine factoring: Verity owns generic frames (and later a generic climb lift); SPHINCS- keeps concrete step specs, range suppliers, and memory layout—aimed at avoiding RAM blowups from monolithic bridge proofs.Reviewed by Cursor Bugbot for commit f4cd500. Bugbot is set up for automated code reviews on this repo. Configure here.