feat: update RangeTupleCheckerAir for openvm v2.0.0-rc.1#31
Open
Tuanlinh12312 wants to merge 2 commits intodevelop-v2.0.0from
Open
feat: update RangeTupleCheckerAir for openvm v2.0.0-rc.1#31Tuanlinh12312 wants to merge 2 commits intodevelop-v2.0.0from
Tuanlinh12312 wants to merge 2 commits intodevelop-v2.0.0from
Conversation
Add Airs/Extraction/Constraints files for RangeTupleCheckerAir<2> with sizes=[256, 8192] (standard SdkVmConfig after optimization). - 3 columns: tuple_0, tuple_1, mult - 8 constraints covering first/last row boundaries, transition boolean, increment-or-wrap, and degree-3 T6 polynomial - 1 bus interaction on bus 10: (-mult, [tuple_0, tuple_1]) - Fix wf_properties in Interaction.lean: x2 < 2048 -> x2 < 8192 to match the actual standard config sizes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0e112f9 to
b121b07
Compare
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.
Resolves INT-6544.
Overview
Add Lean support for
RangeTupleCheckerAir<2>with standard sizes[256, 8192], prove itswf_properties, and align its bus wiring with the repo’sRangeTupleCheckerBus.Code Changes
OpenvmFv/Airs/RangeTupleCheckerAir.lean,OpenvmFv/Extraction/RangeTupleCheckerAir.leanRangeTupleCheckerAir<2>11OpenvmFv/Constraints/RangeTupleCheckerAir.leanwf_properties : (t0_ air row).val < 256 ∧ (t1_ air row).val < 8192ifflemma connecting this theorem toInteraction.RangeTupleCheckerBusEntryInstance.wf_propertiesOpenvmFv/Spec/Mul.lean,OpenvmFv/Spec/Mulh.lean,OpenvmFv/Spec/DivRem.lean2048to8192RangeTupleCheckerconfigurationHypotheses
The final
wf_propertiestheorem assumes:all_constraints_hold air: the extracted/simplified constraints hold at every valid rowrotation_consistent air: rotation-1 accesses correspond to the next row’s rotation-0 valuesair.last_row + 1 < BB_prime: the trace length fits in BabyBear so the field-to-Natconversions do not wraprow ≤ air.last_row: the theorem is stated only for valid trace rowsVerification
lake build OpenvmFv.Constraints.RangeTupleCheckerAirlake build OpenvmFv.Spec.Mul OpenvmFv.Spec.Mulh OpenvmFv.Spec.DivRemlake build OpenvmFv.Equivalence.Mul OpenvmFv.Equivalence.Mulh OpenvmFv.Equivalence.DivRem