Skip to content

feat: update RangeTupleCheckerAir for openvm v2.0.0-rc.1#31

Open
Tuanlinh12312 wants to merge 2 commits intodevelop-v2.0.0from
feat/INT-6544-range-tuple
Open

feat: update RangeTupleCheckerAir for openvm v2.0.0-rc.1#31
Tuanlinh12312 wants to merge 2 commits intodevelop-v2.0.0from
feat/INT-6544-range-tuple

Conversation

@Tuanlinh12312
Copy link

@Tuanlinh12312 Tuanlinh12312 commented Mar 5, 2026

Resolves INT-6544.

Overview

Add Lean support for RangeTupleCheckerAir<2> with standard sizes [256, 8192], prove its wf_properties, and align its bus wiring with the repo’s RangeTupleCheckerBus.

Code Changes

OpenvmFv/Airs/RangeTupleCheckerAir.lean, OpenvmFv/Extraction/RangeTupleCheckerAir.lean

  • add the AIR/extraction pipeline for RangeTupleCheckerAir<2>
  • route the tuple-checker interaction to bus 11

OpenvmFv/Constraints/RangeTupleCheckerAir.lean

  • add the simplified constraint layer for the extracted AIR
  • prove the boundary and transition lemmas needed for the chip invariant
  • prove wf_properties : (t0_ air row).val < 256 ∧ (t1_ air row).val < 8192
  • add an iff lemma connecting this theorem to Interaction.RangeTupleCheckerBusEntryInstance.wf_properties

OpenvmFv/Spec/Mul.lean, OpenvmFv/Spec/Mulh.lean, OpenvmFv/Spec/DivRem.lean

  • update tuple/carry bounds from 2048 to 8192
  • keep downstream specs consistent with the standard RangeTupleChecker configuration

Hypotheses

The final wf_properties theorem assumes:

  • all_constraints_hold air: the extracted/simplified constraints hold at every valid row
  • rotation_consistent air: rotation-1 accesses correspond to the next row’s rotation-0 values
  • air.last_row + 1 < BB_prime: the trace length fits in BabyBear so the field-to-Nat conversions do not wrap
  • row ≤ air.last_row: the theorem is stated only for valid trace rows

Verification

  • lake build OpenvmFv.Constraints.RangeTupleCheckerAir
  • lake build OpenvmFv.Spec.Mul OpenvmFv.Spec.Mulh OpenvmFv.Spec.DivRem
  • lake build OpenvmFv.Equivalence.Mul OpenvmFv.Equivalence.Mulh OpenvmFv.Equivalence.DivRem

@Tuanlinh12312 Tuanlinh12312 changed the title feat: add RangeTupleCheckerAir constraint extraction and simplification feat: update RangeTupleCheckerAir for openvm v2.0.0-rc.1 Mar 5, 2026
Base automatically changed from feat/INT-6541-extractor to develop-v2.0.0 March 10, 2026 15:14
Tuanlinh12312 and others added 2 commits March 10, 2026 18:20
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>
@Tuanlinh12312 Tuanlinh12312 force-pushed the feat/INT-6544-range-tuple branch from 0e112f9 to b121b07 Compare March 10, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant