@@ -482,7 +482,7 @@ void ECCVMMSMRelationImpl<FF>::accumulate(ContainerOverSubrelations& accumulator
482482 // SELECTORS ARE MUTUALLY EXCLUSIVE
483483 // at most one of q_skew, q_double, q_add can be nonzero.
484484 // note that as we can expect our table to be zero padded, we _do not_ insist that q_add + q_double + q_skew == 1.
485- std::get<SELECTOR_EXCLUSIVITY >(accumulator) +=
485+ std::get<PHASE_SELECTOR_MUTUAL_EXCLUSIVITY >(accumulator) +=
486486 (q_add * q_double + q_add * q_skew + q_double * q_skew) * scaling_factor;
487487
488488 // ACCUMULATOR PRESERVATION ON NO-OP ROWS
@@ -501,8 +501,10 @@ void ECCVMMSMRelationImpl<FF>::accumulate(ContainerOverSubrelations& accumulator
501501 // starts a fresh MSM whose accumulator is initialized via first_add, not by continuity.
502502 auto no_op_selector =
503503 (-q_add + 1 ) * (-q_double + 1 ) * (-q_skew + 1 ) * (-msm_transition + 1 ) * (-lagrange_first + 1 ); // degree 5
504- std::get<NO_OP_ACC_X >(accumulator) += no_op_selector * (acc_x_shift - acc_x) * scaling_factor; // degree 6
505- std::get<NO_OP_ACC_Y >(accumulator) += no_op_selector * (acc_y_shift - acc_y) * scaling_factor; // degree 6
504+ std::get<IDLE_ROW_PRESERVES_ACC_X >(accumulator) +=
505+ no_op_selector * (acc_x_shift - acc_x) * scaling_factor; // degree 6
506+ std::get<IDLE_ROW_PRESERVES_ACC_Y >(accumulator) +=
507+ no_op_selector * (acc_y_shift - acc_y) * scaling_factor; // degree 6
506508
507509 // Validate that if q_add = 1 or q_skew = 1, add1 also is 1
508510 // NOTE(#2222): could just get rid of add1 as a column, as it is a linear combination.
@@ -522,7 +524,7 @@ void ECCVMMSMRelationImpl<FF>::accumulate(ContainerOverSubrelations& accumulator
522524 // in particular, `round_transition` is boolean. (`round_delta` is not boolean precisely one step before an MSM
523525 // transition, but that does not concern us here.)
524526 const auto round_transition = round_delta * (-msm_transition_shift + 1 );
525- std::get<ROUND_TRANSITION_BOOL >(accumulator) += round_transition * (round_delta - 1 ) * scaling_factor;
527+ std::get<ROUND_TRANSITION_FORCES_DELTA_ONE >(accumulator) += round_transition * (round_delta - 1 ) * scaling_factor;
526528
527529 // If `round_transition == 1`, then `round_delta == 1` and `msm_transition_shift == 0`. Therefore, we wish to
528530 // constrain next row in the VM to either be a double (if `round != 31`) or skew (if `round == 31`). In either case,
@@ -537,21 +539,22 @@ void ECCVMMSMRelationImpl<FF>::accumulate(ContainerOverSubrelations& accumulator
537539 // similarly, if q_double_shift == 1, then round_transition == 0,
538540 // the fact that a round_transition occurs at the first time skew_shift == 1 follows from the fact that skew == 1
539541 // implies round == 32 and the above three relations, together with the _definition_ of round_transition.
540- std::get<ROUND_TRANSITION_SKEW >(accumulator) += round_transition * q_skew_shift * (round - 31 ) * scaling_factor;
541- std::get<ROUND_TRANSITION_DOUBLE_OR_SKEW >(accumulator) +=
542+ std::get<ROUND_TRANSITION_SKEW_IMPLIES_ROUND_31 >(accumulator) +=
543+ round_transition * q_skew_shift * (round - 31 ) * scaling_factor;
544+ std::get<ROUND_TRANSITION_EXACTLY_ONE_DOUBLE_OR_SKEW >(accumulator) +=
542545 round_transition * (q_skew_shift + q_double_shift - 1 ) * scaling_factor;
543- std::get<NO_ROUND_CHANGE_NO_DOUBLE >(accumulator) += (-round_delta + 1 ) * q_double_shift * scaling_factor;
546+ std::get<DOUBLE_REQUIRES_ROUND_CHANGE >(accumulator) += (-round_delta + 1 ) * q_double_shift * scaling_factor;
544547 // if the next is neither double nor skew, and we are not at an msm_transition, then round_delta = 0 and the next
545548 // "row" of our VM is processing the same wNAF digit place.
546- std::get<ROUND_TRANSITION_NO_OP >(accumulator) +=
549+ std::get<ROUND_TRANSITION_NEEDS_DOUBLE_OR_SKEW >(accumulator) +=
547550 round_transition * (-q_double_shift + 1 ) * (-q_skew_shift + 1 ) * scaling_factor;
548551
549552 // CONSTRAINING Q_DOUBLE AND Q_SKEW
550553 // NOTE: we have already constrained q_add, q_skew, and q_double to be mutually exclusive.
551554
552555 // if double, next add = 1. As q_double, q_add, and q_skew are mutually exclusive, this suffices to force
553556 // q_double_shift == q_skew_shift == 0.
554- std::get<DOUBLE_THEN_ADD >(accumulator) += q_double * (-q_add_shift + 1 ) * scaling_factor;
557+ std::get<DOUBLE_IMPLIES_NEXT_IS_ADD >(accumulator) += q_double * (-q_add_shift + 1 ) * scaling_factor;
555558 // if the current row has q_skew == 1 and the next row is _not_ an MSM transition, then q_skew_shift = 1.
556559 // this forces q_skew to precisely correspond to the rows where `round == 32`. Indeed, note that the first q_skew
557560 // bit is set correctly:
@@ -561,28 +564,29 @@ void ECCVMMSMRelationImpl<FF>::accumulate(ContainerOverSubrelations& accumulator
561564 // == 1.)
562565 // this means that the first row with `round == 32` has q_skew == 1. then all subsequent q_skew entries must be 1,
563566 // _until_ we start our new MSM.
564- std::get<SKEW_PROPAGATION >(accumulator) +=
567+ std::get<SKEW_PERSISTS_UNTIL_MSM_TRANSITION >(accumulator) +=
565568 (-msm_transition_shift + 1 ) * q_skew * (-q_skew_shift + 1 ) * scaling_factor;
566569 // if q_skew == 1, then round == 32. This is almost certainly redundant but psychologically useful to "constrain
567570 // both ends".
568- std::get<SKEW_ROUND_CHECK >(accumulator) += q_skew * (-round + 32 ) * scaling_factor;
571+ std::get<SKEW_IMPLIES_ROUND_32 >(accumulator) += q_skew * (-round + 32 ) * scaling_factor;
569572
570573 // UPDATING THE COUNT
571574
572575 // if we are changing the `round` (i.e., starting to process a new wNAF digit or at an msm transition), the
573576 // count_shift must be 0.
574- std::get<COUNT_ZERO_ON_ROUND_CHANGE >(accumulator) += round_delta * count_shift * scaling_factor;
577+ std::get<COUNT_SHIFT_ZERO_ON_ROUND_CHANGE >(accumulator) += round_delta * count_shift * scaling_factor;
575578 // if msm_transition_shift = 0 and round_delta = 0, then the next "row" of the VM is processing the same wNAF digit.
576579 // this means that the count must increase: count_shift = count + add1 + add2 + add3 + add4
577- std::get<COUNT_UPDATE >(accumulator) += (-msm_transition_shift + 1 ) * (-round_delta + 1 ) *
578- (count_shift - count - add1 - add2 - add3 - add4) * scaling_factor;
580+ std::get<COUNT_INCREMENT_WITHIN_ROUND >(accumulator) += (-msm_transition_shift + 1 ) * (-round_delta + 1 ) *
581+ (count_shift - count - add1 - add2 - add3 - add4) *
582+ scaling_factor;
579583
580584 // at least one of the following must be true:
581585 // the next step is an MSM transition;
582586 // the next count is zero (meaning we are starting the processing of a new wNAF digit)
583587 // the next step is processing the same wNAF digit (i.e., round_delta == 0)
584588 // (note that at the start of a new MSM, the count is also zero, so the above are not mutually exclusive.)
585- std::get<COUNT_SHIFT_ZERO >(accumulator) +=
589+ std::get<COUNT_ZERO_AT_ROUND_BOUNDARY_OR_TRANSITION >(accumulator) +=
586590 is_not_first_row * (-msm_transition_shift + 1 ) * round_delta * count_shift * scaling_factor;
587591
588592 // if msm_transition = 1, then round = 0.
0 commit comments