@@ -668,7 +668,13 @@ impl BusValue {
668668 }
669669 }
670670 }
671- * acc += & result * & alpha_powers[ alpha_offset] ;
671+ // Bus elements that are zero on this row contribute nothing — skip the
672+ // F×E multiply. (Covers the constant(0) bus-width padding plus any
673+ // variable element that is zero on this row; α⁰ = 1 covers the bus-id
674+ // term separately.)
675+ if result != FieldElement :: < F > :: zero ( ) {
676+ * acc += & result * & alpha_powers[ alpha_offset] ;
677+ }
672678 1
673679 }
674680 }
@@ -778,7 +784,12 @@ impl BusValue {
778784 }
779785 }
780786 }
781- * acc += result * & alpha_powers[ alpha_offset] ;
787+ // Bus elements that are zero on this row contribute nothing — skip the
788+ // F×E multiply. (Covers the constant(0) bus-width padding plus any
789+ // variable element that is zero on this row.)
790+ if result != FieldElement :: < A > :: zero ( ) {
791+ * acc += result * & alpha_powers[ alpha_offset] ;
792+ }
782793 1
783794 }
784795 }
@@ -1483,11 +1494,10 @@ where
14831494 // fp[k*chunk_len + i] = interaction k at row chunk_start+i.
14841495 let mut fingerprints: Vec < FieldElement < E > > = Vec :: with_capacity ( n * chunk_len) ;
14851496 for interaction in interactions. iter ( ) {
1497+ // α⁰ = 1: the bus-id term needs no multiply — embed it into E once.
1498+ let bus_id_e = FieldElement :: < E > :: from ( interaction. bus_id ) ;
14861499 for row in chunk_start..chunk_start + chunk_len {
1487- // alpha_powers[0] is always 1, so the bus_id term is just the
1488- // embedded bus id — skip the base×ext multiply and build the
1489- // extension element straight from the bus id.
1490- let mut lc = FieldElement :: < E > :: from ( interaction. bus_id ) ;
1500+ let mut lc = bus_id_e. clone ( ) ;
14911501 let mut alpha_offset = 1 ;
14921502 for bv in & interaction. values {
14931503 alpha_offset += bv. accumulate_fingerprint (
@@ -1675,17 +1685,15 @@ fn compute_multiplicity_from_step<A: IsSubFieldOf<B>, B: IsField>(
16751685
16761686/// Computes the fingerprint for an interaction from a `TableView`.
16771687///
1678- /// Returns `z - (bus_id*α^0 + v[0]*α^1 + v[1]*α^2 + ...)`
1688+ /// Returns `z - (bus_id + α· v[0] + α²· v[1] + ...)`
16791689fn compute_fingerprint_from_step < A : IsSubFieldOf < B > , B : IsField > (
16801690 step : & TableView < A , B > ,
16811691 interaction : & BusInteraction ,
16821692 z : & FieldElement < B > ,
16831693 alpha_powers : & [ FieldElement < B > ] ,
16841694 shifts : & PackingShifts < A > ,
16851695) -> FieldElement < B > {
1686- // alpha_powers[0] is always 1, so the bus_id term is just the embedded bus
1687- // id — skip the base×ext multiply and build the extension element straight
1688- // from the bus id.
1696+ // α⁰ = 1: the bus-id term needs no multiply — embed it into B directly.
16891697 let mut linear_combination = FieldElement :: < B > :: from ( interaction. bus_id ) ;
16901698 let mut alpha_idx = 1 ;
16911699 for bv in & interaction. values {
0 commit comments