Repository navigation
Conversation
Scaled::mul looped over an array of the three limbs; the patch (pre-extraction only) indexes the array over a range instead, so the loop extracts as the others do. The verifier's tests and the real-proof suite pass on the patched source.
Field/Window.lean: times_x is multiplication by x, and a word is the sum of its six-bit windows' bits weighed by the powers of x they stand for. Scaled.lean: Scaled::new(r) tabulates each window's multiples of r y^t (new_spec), and mul(a) sums one entry per window, so scaled_mul: Scaled::new(r) then mul(a) is a * r. eq_kernel_spec, level0_fold and deeper_fold now hold for points of up to 31 coordinates, where 1 << len fits a 32-bit usize, through Scaled's table or not. Std.lean gains loop_range_spec_result, the range-loop rule for a loop whose result is not its state. New axiom: the bv_decide certificate of timesX_eq, alongside the field proofs' own.
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.
Stacked on #2:
Scaled, the table the verifier multiplies a fixed factor through, computes the product, soeq_kernel's theorems now cover points of up to 31 coordinates (they stopped at 8, below whicheq_kernelmultiplies without the table). The folds of #1 and #2 inherit the wider bound.What is proved
In
crates/verifier/proofs/verifier/lean/Verifier/Verification/:Field/Window.lean, on bits:ofBitVec_timesX:Scaled::new'stimes_xmultiplies byx.ofBitVec_eq_sum: a word is the sum of the powers ofxits bits stand for.sum_win: a word is the sum of its eleven six-bit windows, each window's bits weighed by their powers ofx.Scaled.lean:new_spec: entryidxofScaled::new(r)is windowidx % 704 / 64's valueidx % 64timesr y^(idx / 704), proved loop by loop (bits, windows, limbs).mul_specandscaled_mul:Scaled::new(r)thenmul(a)isa * r.EqKernel.lean:scaler_new_spec(aScalermultiplies by its factor, through the table or not);eq_kernel_spec,level0_fold,deeper_foldnow takepoint.length ≤ 31, the most for which1 << lenfits a 32-bitusize.Std.lean:loop_range_spec_result, hax's range-loop rule for a loop whose result is not its state.Axioms: Lean's three, the field proofs'
bv_decidecertificates, and one more of the same kind fortimesX_eq.Patch
09-scaled-limbs-by-index.patch(pre-extraction only) indexesScaled::mul's three limbs over a range instead of iterating the array. The verifier's tests and the real-proof suite pass on the patched source.Bug hunting
No bug found.
Scaled's last window tabulates multiples byx^64andx^65it never reads (a limb's top window holds four bits);scaled_mulconfirms the lookups land only on the rest. Checked that no prover-announced length reacheseq_kernelunbounded: the Keccak shape'sdepthis the constantKECCAK_DEPTHin execution proofs and is required to divideROUNDSinverify_keccak_batch, sosegments()neither divides by zero nor underflows; the other call sites take fixed lengths or ones the announced-size checks bound.Warnings
14, as on #1.