Function srl_ind

Source
pub fn srl_ind<F: Field>(i: &[F], j: &[F], s: &[F]) -> F
Expand description

Computes the multilinear extension of the logical right shift indicator at a point.

The shift indicator for logical right shift (srl) evaluates to 1 when bit i of the output equals bit j of the input after shifting right by s positions. Specifically:

  • srl_ind(i, j, s) = 1 if and only if j = i + s and j < 2^k
  • srl_ind(i, j, s) = 0 otherwise

This function evaluates the multilinear extension of this indicator at the given point (i, j, s) where each coordinate is a field element.

§Arguments

  • i - Slice of field elements representing the output bit position (length k)
  • j - Slice of field elements representing the input bit position (length k)
  • s - Slice of field elements representing the shift amount (length k)

§Panics

Panics if the slices don’t all have the same length.