Repository navigation
Conversation
… script, and an ELF diff modulo addresses Copied from #738's formal/rv64/guest and adapted to main: two-limb scalars, a fallible Bytecode::new, and a mechanical no_std + alloc copy of crates/verifier (scripts/nostd-verifier.sh) instead of #738's rewrites. Measured: 198 functions, 27,669 instructions. A one-line change to eq_eval changes 83 functions raw, 1 modulo addresses; a rewrite of MerklePath::root, 83 raw, 1 modulo addresses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… = abort machine-checked's Accepted is SP1's HALT with a0 = 0, so accept is 0, reject 1, malformed input, heap exhaustion or a panic 2. halt is a returning ecall followed by j ., not inlined, and panic = abort sends every panic site through the handler: no unimp from the guest. Of 222 functions (27,801 instructions), m-c's --proved lift takes 217 (25,324); left out: three core quicksorts (intrinsics::abort) and the two divuw sites. -Z trap-unreachable=no gives a byte-identical image, so it is not set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nostd-verifier.sh marks every verifier function inline(never), or inline(always) if boundaries.txt lists it (28 straight-line helpers), so the image's functions do not follow LLVM's size heuristics; no jump or lookup tables, no function merging. The link keeps relocations (--emit-relocs) and does not relax; check-relocs.py checks that every auipc pairs exactly with its users. Image: 309 functions, 29,792 instructions (from 222 / 27,801); the proved lift takes 304 / 27,782, leaving out the same five. 1,748 auipc: 1,584 calls (R_RISCV_CALL_PLT), 14 self-calls the assembler resolved, 150 address pairs (PCREL_HI20) with 151 lo12 users; 147 R_RISCV_64 in .rodata; no R_RISCV_RELAX; no direct jump leaves its function. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clmul_low, clmul, reduce, spread and times_x on machine words, K's square and inverse, and E's sum, Karatsuba product, product by K, square, frobenius, pow, inv, sum, Scaled::new/mul and powers on the pair of limbs, each proved equal to the statement's BF64 or Ext operation. Ported from #738's Model/Field, Clmul, Ext and FieldAlg, rewritten for the two-limb E (limb identities proved in the quotient GF(2)[X]/(x^64 + x^4 + x^3 + x + 1)). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eq_kernel and multilinear_eval with their Scaler, log2_ceil, log2_strict, eq_eval, dot (their asserts as Option), padding_weight, index_mle (through E::square), poly_eval, selector_point and Placement's stack_point and eq_above, each proved equal to the statement's. Ported from #738's Model/Multilinear. stack_offsets is left out, pending its rewrite without sort_by_key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
keccak_f, xor_block, keccak_hash, Digest::words, halves and from_halves (now infallible), proved Keccak-f[1600], Keccak-256 and the statement's digest encodings; hash_pair, hash_leaf and MerklePath::root, proved the statement's climb from the leaf's hash. Hash is #738's Model/Hash with the two-limb halves added; Merkle is new. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sponge field by field (state, pending slots, n_pending, ground): new, duplex, absorb (its assert a panic), observe, sample, absorb_nonce, each proved the statement's sponge over Keccak-f[1600] through toSpec. Transcript as a state monad over the Rust transcript (proof, sponge, offsets, checked, ghost roots): next_scalar(s), sample(s), grinding_bits, grind_check (the checked_shl mask), merkle (shape, positions, roots), a root's read by next_scalars(2) and from_halves, sumcheck_round_poly (usize subtractions wrapping) and sumcheck, finish, each simulating the statement's program fragment; runProof_of_sim ties a simulating mirror started by Transcript::new to runProof. The simulation framework is #738's, now carrying an invariant; Sponge is new. Model.lean pins the main theorems' axioms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ib last Requires statement by path (../Statement) and machine-checked by git at 10df1b2, with Mathlib v4.36.0 listed last so that Statement's pin wins over machine-checked's rc2; toolchain v4.36.0. The manifest pins every package at the revision formal/rv64mc/out/mcprobe2 resolved, so its built .lake/packages can be hard-linked in (cp -al) and nothing is rebuilt but machine-checked's own modules the project imports (84 small jobs, 21 s). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y program Probe of phase 0. EMulTmpl: <E as Mul>::mul's lift with every address a field of Link (entry, callees clmul and reduce by index and entry, five call sites by auipc value and jalr offset), and Link.WF as simp equations. EMul.ok: over any p with p[i]? = some (tmpl L), in any context, from clmul's and reduce's contracts (abstract results, the ABI kept), the result is the Rust's Karatsuba and the ABI is kept (sp, s0..s11, memory from sp up). No address of the image in it; axioms are Lean's three. lsym steps the template with symbolic leaves as it is: body lookups by rfl, stores, the auipc constants, the five calls through contracts. Two workarounds: Lprog.Isa.addrAt in lsym's simp lemmas (simp unfolds rvIsa, so a lemma about rvIsa.addrAt does not match) with WF stated as (p[idx]?).map (.addr) = some entry; and a callee's memory frame applied after lsym by simp with a bv_omega discharger, wrapped in first: a failing bv_omega as discharger logs an error instead of failing the rewrite. With the function index a variable, lsym does not see a loop: eq_eval without stop ran 333 s to the heartbeat limit; with stop [28], 9 s. Measured on a loaded host (load 40): EMul 87 CPU-s (lsym alone 25, the rest the frame closing, 34 s of it kernel checking) for 61 instructions, 18 memory operations, 5 calls. Linking against two builds where E::mul moved by 12 bytes: the generated template is byte-identical, and each link module (kernel_eq of the lift's literal against tmpl L, WF by kernel_eq and decide, EMul.ok applied) checks in about 2.5 s. check-relocs.py: line length. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…c step memOk is memOkSp1 (literally, noCodeAt included) and the guest's windows, each access wholly inside one; ECALL, EBREAK, CSRS and missing code are no step. step_stepSp1 and step_step: every step of it is one of SP1's and one of riscv-zkvm's generic step (byte and halfword arms included; our windows lie in the generic zones). Both proved, a case split and omega. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and constraints The stacked claims carried their weights as `Box<dyn Fn>`, WHIR's glued claims likewise, WHIR took the batched basis as `&dyn Fn`, the ring switch returned its weight as a closure, and a table held its constraints as a function pointer. Each is an indirect call a proof about the machine code must first resolve. A weight is now an enum variant carrying its data, evaluated by a `match`: `StackWeight` (an eq point, the ring weight, or the ring weight on a placement), `GluedWeight` (an OOD point or a level's queries), `RingWeight`; WHIR takes the basis as a generic closure, and a table's constraints are a `match` on its opcode, counted by a constant that a test pins to them. The values and their order of evaluation are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A `Form` kept its terms in a `BTreeMap` from monomial to coefficient, the stack's offsets were a `BTreeMap` from column, and `Bytecode::new` grouped a block's words in a `BTreeMap`: balanced-tree library code that a proof about the machine code would have to cover. A form's terms are now a `Vec` kept sorted by monomial, a new monomial inserted at its place; the offsets are a `Vec` indexed by column; a block's words are ordered by a least-significant-byte-first counting sort, stable, then grouped by runs. Each iterates in the order the map did, so every value, and the order every sum is taken in, is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sort `stack_offsets` ordered the blocks with `sort_by_key`, and `Bytecode::new` ordered a block's words by how many positions each has with another, library code a machine-code proof would have to cover. `stack_offsets` now places the blocks in one pass per size, largest first, each pass in index order: the order the sort gave, ties broken by index. A block's words are reordered by a stable counting sort on their position counts, the order the stable sort gave. A test pins the stack order, which is protocol, to the sort it replaces. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every column a flush, a constraint or a count reads was looked up by name at run time (`cols`, an `expect` on a miss), `count_columns` matched the prefix `cnt`, and KECCAK's column list was built with `format!`. String comparison and integer formatting in the machine code are a poor target for proving it equal to the Lean verifier. Each table's columns are now index constants, its count columns and width const arrays, so the verification path holds no string. The indices are those the names resolved to: every table's flushes, padding, width and count columns, the column bases and the constraints were checked identical before and after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`sample_queries` took `128 / depth` chunks from each sample and `KeccakShape::segments` is `ROUNDS / depth`; both divisors are small, so LLVM narrows each to a 32-bit `divuw` on RV64, the guest image's only two (`ROUNDS.is_multiple_of(depth)` in `verify_keccak_batch` stays, outside the guest). The chunks are now taken while another `depth` bits fit in the sample's 128, and the segments counted as the multiples of `depth` up to `ROUNDS`: the same counts for every `depth >= 1`. A zero `depth`, which neither reaches (a block is at least 2 long, a Keccak depth is 12 or checked positive), divided by zero before and now gives `count` zero queries or 24 segments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The walk read q_keccak's and the memory's placements through `expect`, each a panic branch a machine-code proof would have to show dead. They are now read through `Layout::committed`, which refuses a column nothing commits with `CommittedSize`, and `build_layout` refuses a column other than a q_keccak slot or an output lane that has no block of its own the same way, where it gave such a column no placement before. Neither refusal is reachable: the memory columns and q_keccak always have a placement and every other column a block. `verify_keccak_batch` bounds `log_steps` by the largest stack before adding the slot bits to it, so the sum cannot overflow; such a batch was already refused with the same error (a wrapped sum is below the smallest stack), and only a build with overflow checks panicked on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'s and the generic step Image as plain code and data words decoded inside the statement, Loaded, Halts, decodeInput for the current guest input (two-word scalars), verify and Sound as in #738 but for a0 = 0, and AllDecode. StepMeet's theorems now speak about the statement's step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ABI (Core/Abi) Callee, Site and DataRef with their WF predicates, callee_site (now for any register) and DataRef.WF.eval move out of Probe/Link, which goes; Abi, Entry and Saved go to Core/Abi. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
frobenius_8, ring_psi, ring_target, ring_coefficients, ring_weight and ring_switch, each proved equal to the statement's (ring_switch simulating ringSwitch), and the Rust test of the map run on the mirrors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts environment Env: an abstract Static invariant reading one region, NEXT, the heap end and the stack limit, in the guest's order. Holds wraps rvIsa.Contract in sp1Ctx with the calling convention, the stack bound, a whole-memory frame (own stack, allocations, NEXT, Out) and Static. Holds.call and h.contract for lsym; a leaf and a caller of it proved as the worked example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ss lemmas, tests - Pin: Model.lean names the mirrored crates/verifier commit, 1135c52; scripts/model-drift.sh hashes the five mirrored files and fails on change. - stack_offsets (7964e57: a pass per size, largest first, ties by index) mirrored and proved the statement's stackOffsets (a merge sort). - Non-vacuity: success lemmas for next_scalar(s), sample, grind_check, a root's read, merkle and finish; Model/Tests.lean checks the mirrors on the Rust's own vectors (field.rs K and E, Scaled, keccak_hash, stack_offsets against the statement). - sumcheck_round_poly's count - 1 + [eq] now wraps in usize (usizeAdd). - Docs: the panic rule as it is (a mirror may return anything where the Rust panics, fails only where it fails); is_power_of_two is count_ones() == 1 in this core; the compiled merkle assumes block_length != 0; the TM and SimR combinators marked as API. - Every [u8; 32] is a digest's bytes (exists_digestBits). - Hygiene: helpers private; duplicates of Mathlib replaced (List.getD_map, getD_append(_right), foldl_ext), primes dropped from the local copies of lean_vm's limb lemmas, unused lemmas removed, lines within 100 columns. - Golf: one getD lemma for the sponge's set loops; sub_clz_eq_bitLength over any width; log2StrictRust_eq through toNat once; eqKernel_inner by set on appends; runK_bind by one induction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-checked's transfer Bridge: a halting run of the statement's step is an accepting stepSp1 run, so safety gives the verdict (sound_of_safe), and Loaded puts the lifted functions in the code (FnsIn). MainSpec: main returning 0 means the input decodes and verify accepts, with the Holds convention. _start as a template, proved safe at Lprog from MainSpec; sound_of_main assembles it with SafeN.of_lift. Every other hypothesis is a decidable fact about the concrete image. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ch next state Rules per instruction form (Tactic/Steps), address facts with literal offsets decided by the kernel (Tactic/Addr), and a MetaM executor that reads registers through updReg chains by reduction, resolves loads through stores and callee frames, and closes ABI goals (Tactic/Sym). E::mul's contract (Bench/EMulAuto) is rv_auto plus its functional goals: 87 CPU-s with lsym, about 1 CPU-s here (0.15 s tactic, 0.65 s kernel). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KeccakShape, instance_weights, along, linear_transpose, verify_layer, open and verify_keccak in TM, simulating verifyKeccakLayer, keccakOpen and verifyKeccak at KECCAK_DEPTH; the RMFE tables, projected value, iota, split kernel, next weights, linear_transpose and open's row proved equal to the statement's. Shared PCS helpers: mulKE (E * K), TM.whenChecked and the simulation lemmas for checks and Option steps only the Rust makes. The RMFE test of keccak.rs and a linear_transpose cross-check run on the mirrors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the whole image scripts/gen.py writes, from the ELF's relocations and decompile --to lean --proved, a template per function (Rv64mc/Gen/Tmpl, gitignored), keyed by its demangled name without crate disambiguators, with every layout-dependent value a Link field, and a link module (Rv64mc/Gen/Link) proving by the kernel that the image's function is the template at its link and that Link.WF holds. scripts/regen.sh builds, lifts, generates and reports the changed templates. Probe/EMul now proves its contract of the generated template; Probe/EMulTmpl goes. All 230 functions of the canonical image templatize. Tmpl cold 816 CPU-s, link step (Words, Index, 230 Link) about 1,060 CPU-s. C1 (eq_eval) and C2 (MerklePath::root) each change one template; their rebuilds take 971 and 995 CPU-s, all link step, and do not rebuild Probe/EMul. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…own rustflags regen.sh builds the guest in a fresh directory with an empty target dir and CARGO_ENCODED_RUSTFLAGS set to guest/.cargo/config.toml's rustflags: Cargo merged the repository's target-cpu=native into the guest's, which changed the code (128 of 230 templates). The image's sha256 is in image.sha256, which regen.sh --check verifies. out/canon.elf and Rv64mc/Gen are regenerated from it; Probe/EMul and Probe/EqEval build unchanged. Rebuild 1,900 CPU-s, 248 s wall. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ow memory, link structures eq_eval's contract (Bench/EqEvalAuto) over any mul contract: rv_auto runs the entry to the loop head and closes the length check's assert_failed path; the loop is a lemma by induction whose invariant is the fold's prefix, its body stepped by rv_sym and its back edge left as eight arithmetic and fold goals. rv_intro and rv_close for invariants; memory frames against any offset below a bound; branch hypotheses named apart; tail calls, byte, halfword and word loads and stores; a link structure given whole; contracts quantified over the callee. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rv64mc-run reads an ELF into the statement's Image, builds a state satisfying Loaded (checked clause by clause), runs the statement's step on a hash-map state, and prints AllDecode, decodeInput, the statement's verify and the verdict. input-words.py writes the guest input of a verifier fixture, honest, bit-flipped or truncated. notes/non-vacuity.md says how. On out/canon.elf with fixtures/fibonacci-rate4 (16,664 input words): AllDecode true, Loaded true; honest: verify true, halted with a0 = 0 after 124,216,679 steps (900 CPU-s); first scalar flipped: verify false, a0 = 1 after 2,618,848 steps (20 CPU-s); last word dropped: decodeInput none, a0 = 2 after 1,697,027 steps (13 CPU-s). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Forms kept sorted as the Rust keeps them (partition_point, core's binary search), related to the statement's by value; the tables, their flushes, qkeccak_slot, column_kappas, stack and build_layout, which fails exactly where buildLayout does and otherwise gives its layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
derive_config (Whir.ladder on the whole window, by evaluation), sample_queries, subspace_roots and Subspace, novel_basis, novel_eval, fold_row, induced_weight, GluedWeight, verify_whir, and lib.rs's read_ood, StackWeight and verify_stacked_opening. verify_whir reads commitments as it goes, so its simulation is SimRoots: SimR from transcripts whose ghost roots are the stack's only, every other step keeping the roots. The whir.rs tests (novel basis, times_x, affine row fold) run on the mirrors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t sret BuiltLayoutAt extends the bus's LayoutAt with what walk reads besides (placements, stack log, heights, Keccak shape); Err's niche read off the code, Result<Layout, _> not being printed by type-layouts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… negative offset, runtime limits leave the goal arithProve and the executor's side-goal closer catch running out of recursion depth or heartbeats and leave the goal as it was; a negative offset of a base other than the stack top reaches omega as b - k or a wrap (toNat_add_negk), never as a 64-bit constant (the Bytecode family's counting_sort with a symbolic need). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…S discharged from the template's tables gen.py: an address a referenced object holds becomes the term L.<p>.hi + L.<p>.lo of a link field for the object it points to (hi its address, lo zero), whose words are emitted too; such a template's tables L lists every table with its words. DataRef.InData env (tables L) (Core/ReprLemmas) is the link step's fact, with .words and .mem. Table/Whir: Spec.Whir.WhirQueries.Table follows from InData by one kernel evaluation of the headers' and rows' pairs (tableCheck); whir_queries' contract now takes the template's tables in env.data instead. Regenerated: whir_queries and count_columns changed, 228 templates unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… at its one instance, evaluate_basis (its environment read off the code), and powers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…term tuple's Layouts offsets rv_auto stops at the call to Form::term, where the fresh block names term's ghosts; prod's four orders of the two columns in one declaration (maxHeartbeats 1000000 on it). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t exploration logged Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…refix-sum loops proved Each loop over the model's pass on the starts block the call allocated, its continuation a hypothesis; the copy and the placing loop are not done yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…image Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on memcpy alone finish_grow from alloc's and memcpy's contracts, in rv_sym.heap with three cuts: the size check's mulhu as an exact product below 2^63, memcpy's frame through the new block, the copied bytes through the result's stores. Table/Runtime adds finish_grow, do_reserve_and_handle, Box::new_uninit and the three drops at the image. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t on its own budget; with-facts as hypotheses A conjunct that runs out of recursion depth or heartbeats is left alone and the others closed (main's calls of Bytecode::new and Input::digest now leave the input region's WordsAt, Live and the reader's bound, not the whole Holds.pre); matching a hypothesis by default unfolding has a heartbeat budget; with rv_sym.heap, the facts given in `with` that are not equations are hypotheses hwith_k, so a region's WordsAt or Live given there is carried to the call's memory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Proof/Transcript/Samples.lean: samples keeps its contract from alloc, Vec::reserve, handle_error and Sponge::sample, in selector_point's shape (stop at reserve's return, After, tail, a count-down loop by induction, the header copied to sret). The loop's memory is the entry's frame with the sponge as out, so the transcript at the end is the entry's through its sponge (TranscriptAt.through), then past the sret stores (TranscriptAt.agree). Model/Extra/Samples.lean: samples always succeeds and appends a challenge at a time. lake env lean: 37.4 s CPU over its imports; 547 proof lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
REPORT.md and a self-contained index.html: iteration cost against #738, what is proved end to end, framework gaps in machine-checked and braid, recommendations. Placeholders {{PR738_C1}} and {{STATUS}} await the #738 rebuild measurement and the final proof counts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…04eaf2; conjuncts split on their own only in a callee's precondition Restores Proof/Runtime/FinishGrow (its postcondition's goals are again those it was proved against): a heartbeat exhaustion while matching a hypothesis by default unfolding leaves the whole side goal again, and only a callee's precondition (not the function's postcondition) is closed conjunct by conjunct. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…at a time, try_allocate_in's guest instance main's own try_allocate_in instance takes (sret, capacity, align, size), not TryAllocSpec's (init, align, size): TryAllocRv64Spec states it, with the dangling pointer for no bytes. Base is what every cut point of main keeps, with a store and a call that keep it. The stream loop (instruction 74) is proved against its continuation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tatus of main and the end theorem's callee contracts MainEntry: Bytecode::new's slice (WordsAt, Live, for any count, as rv_auto with facts) and its length, and Input::digest's reader bound, from MainPre's input words. status.md lists the five unproved callee contracts the end theorem will take once main is proved, the cut points left, and the rv_auto gaps met. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ved callers, cold build C6 to C9 (E::mul, dot, Sponge::duplex, poly_eval) from a copy of c48bd7d, with each changed function's proof status and its callers' in iteration-bench.tsv (iterate.py's new column), and the cold build of Rv64mc. Results in notes/iteration-log.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ss without omega A byte load reads through doubleword stores apart from its doubleword and byte stores to other bytes (readByte); a precondition's apartness of two regions is instantiated to show it (neByHyp); an Owned-like region is apart from the stack's slots by ne_slot_of_region instead of omega; omega's results are reused within one run. Full lake build Rv64mc green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The statement's machine and the Model runner on four fixtures, honest, flipped and truncated: verdicts 0, 1, 2 as before, step counts slightly lower after Bump::alloc's alignment change. The earlier table is kept as history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… files Probe/ (phase-0 lsym probes) and Tactic/Bench/ (hand-copied templates used to develop rv_auto) are imported by nothing else; each duplicates a real proof (Proof/Field/EMul, Proof/Multilinear/EqEval, Proof/Layout/Constant), which exercise the same tactic features on the generated templates. Notes that named them point at the real proofs. lake build Rv64mc green (6117 jobs, warm). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…final status Applies the review's framing, accuracy and clarity findings and its cuts; adds the round 2 benchmark on proved functions, both cold builds, #738's C1 breakage (rebuild still in progress), the final proof status and the non-vacuity re-run on the current image. No placeholders left. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, agent effort Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The C1 rebuild of #738 cost 3.71 CPU-h before any repair and left 28 modules failing and 707 unchecked, its soundness theorem among them; summary, comparison table and chart updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Experimental, not for merging. Question: if the Rust verifier changes a little, how much proving and building does it take to re-establish "the RISC-V build of the Rust verifier accepts ⇒ the Lean verifier
verifyWithaccepts", compared with #738? This PR decompiles the RV64IM build of today's verifier with machine-checked's proved lift and builds the proof so that re-proving is local and cheap.Report:
formal/rv64mc/report/REPORT.md(and a self-containedindex.htmlnext to it). Status per function:formal/rv64mc/notes/status.md.Answer in one paragraph
Each function is proved once against a relocatable template of its lifted code, with its callees' contracts (stated over Lean mirrors of the Rust) as hypotheses; a proof-free link step instantiates everything at the real binary. Across 13 measured changes the whole tree re-checked in 300 to 3,230 CPU-s (4 to 13 min wall). A code change to a proved function never reached its callers: only its own proof broke, repaired in minutes when the compiler merely reallocated registers, hours when it turned unrolled code into a loop. On #738, the same one-token change leaves 225 to 228 of its 823 proof files naming a moved address or lemma, its rebuild costs 3.71 CPU-h and leaves 28 modules failing and 707 unchecked, against a cold build of about 23.4 CPU-h (ours: 1.2 CPU-h). Our tree is partial, so the report also projects a complete one (estimate: a widely imported mirror or contract edit at 1.5 to 3+ CPU-h).
What is proved (standard axioms only, no
sorry)rv64_sound_of_main : MainSpec … → AllDecode image ∧ Sound image: every code word decodes, and a run that halts with accept read a proof thatverifyWith keccakF1600accepts, givenmain's contract, which is not proved.verifyWith.What is in the diff
crates/verifier: six behaviour-preserving rewrites (no boxed closures,BTreeMaps, library sorts,format!, divisions orexpects on the verification path), reviewed adversarially; 2,124 mutated proofs give identical verdicts before and after; the Lean statement needs no change.formal/rv64mc/: the guest and its hermetic build, the template generator and link step, the contract framework,rv_auto(a symbolic executor 100× cheaper thanlsymon the one function measured), the Model mirrors, specs and proofs, the iteration benchmark harness (scripts/iterate.sh) and its patches, notes, and the report.Caveats
Partial correctness (traps not excluded); the binary is a
no_stdcopy of the verifier with inserted inline attributes; riscv-zkvm's decoder and the ELF reader are trusted; braid (very experimental) was only tried on two functions. After the one-token change, #738's rebuild took 3.71 CPU-h (about 1 h wall): 28 modules failed, all sampled ones on renamed addresses, and 707 (including the finalsoundness) were not checked because they import a failed one. After the Merkle-root rewrite (C2), #738 took 2.97 CPU-h with 33 modules failing and 699 unchecked;rootis inlined intoverify_stacked_opening, whose body changed, so those proofs must be redone, not renamed (here C2 cost 1,245 CPU-s, but the corresponding function is not proved yet, so that row is not a like-for-like repair comparison).How to check
🤖 Generated with Claude Code