refactor(CryptoFoundations): derive replay forking from PolyFun contexts#488
Conversation
🤖 PR Summary
Refactor: Derive Replay Forking from PolyFun Contexts This refactoring recasts replay‑based forking as a probability argument over PolyFun's typed The core change concentrates in: Mathematical Formalization
Infrastructure / CI
Universe Polymorphism & Reducibility Tweaks
Proof Mechanics (Examples)
Note: The PR body is accurate and complete; per‑file summaries confirm no Statistics
Lean Declarations ✏️ Removed: 99 declaration(s)
✏️ Added: 72 declaration(s)
✏️ Affected: 39 declaration(s) (line number changed)
Coverage Notes
Partially Analyzed Files
📋 **Additional Analysis**The diff upgrades the project from Lean 4.31 to 4.32, including updates to all dependencies (PolyFun, mathlib, loom2, batteries, proofwidgets, aesop, Qq, and several transitive deps), the toolchain, and various library configurations. It also contains many source-level adaptations to API changes that the dependencies' version bump entailed: rewrites from 📄 **Per-File Summaries**
Last updated: 2026-07-15 17:43 UTC. |
Build Timing Report
Incremental Rebuild Signal
This compares a clean project build against an incremental rebuild in the same CI job; it is a lightweight variability signal, not a full cross-run benchmark. Slowest Current Clean-Build FilesShowing 20 slowest current targets, with comparison against the selected baseline when available.
|
9967622 to
fc7cda9
Compare
Summary
Recasts replay-based forking as a probability argument over PolyFun's typed Cursor occurrence contexts. Structural program decomposition, shared-prefix wiring, completion, and fixed/dynamic forking now live in PolyFun; VCVio retains the oracle-specific erasure bridge and the collision/probability estimates.
The former companion stack has merged:
97a262ce2ba7513448b76635e1f6a07f61f40de5This branch is rebased on current VCVio
mainand ports VCVio to Lean/Mathlib 4.32. It pins the validated Loom2 4.32 compatibility commit2f65f311fae959c302586b07aa45390999b935d4.Replay proof structure
replayFirstPathexposes PolyFun execution paths whilereplayPathResulterases them to the output/query-log view used by cryptographic applications.PathCfReachablestates reachability at the semantic path level and follows from the existing support-level reachability condition.contextForkWitnessandcontextForkuse dynamically selectedCursor.ForkViews rather than replay cursors, flat-log indices, or a bespoke replay oracle.This removes
ReplayForkStdDo.leanand the remaining replay-oracle/pathway machinery.ReplayFork.leanis 1,332 lines and contains noreplayOracle,forkReplay, replay cursor, or pathway definitions.Lean 4.32 compatibility
v4.32.0;Path/reforknames toCursor/fork;maxmetavariables.No cryptographic theorem statement was weakened, and no
sorry,admit, axiom, unsafe declaration, or new trust escape was added.Review guide
VCVio/CryptoFoundations/ReplayFork.lean: structural erasure bridge and probability core.VCVio/CryptoFoundations/FiatShamir/Sigma/Fork.lean: shared-prefix application to Fiat–Shamir.VCVio/CryptoFoundations/FiatShamir/Sigma/Reductions.lean: final reduction call site.01c57c0e: FreeM compatibility.d9d0ab68: proof cutover to typed occurrence contexts.fc7cda93: Lean 4.32, merged Cursor/Fork API, exact dependency pins, and compatibility cleanup.Validation
lake build(2,979 jobs)lake build VCVio.CryptoFoundations.ReplayForklake build VCVio.CryptoFoundations.FiatShamir.Sigma.Fork VCVio.CryptoFoundations.FiatShamir.Sigma.Reductionslake env lean VCVioTest/Smoke.leanlake env lean VCVioTest/MerkleTreeBatch.leanlake exe slhdsa_katlake exe slhdsa_c13_katlake exe lint-style ToMathlib VCVio FFI LatticeCrypto Examples VCVioWidgets Interopmk_all --checklibrary-import gatesgit diff --checkThe dormant
Interoptarget remains excluded, as documented onmain, pending independent Lean 4.32 ports of its upstream Hax/Aeneas dependencies.