binius_math

Function tensor_prod_eq_ind

Source
pub fn tensor_prod_eq_ind<P: PackedField>(
    log_n_values: usize,
    packed_values: &mut [P],
    extra_query_coordinates: &[P::Scalar],
) -> Result<(), Error>
Expand description

Tensor Product expansion of values with partial eq indicator evaluated at extra_query_coordinates

Let nn be log_n_values, pp, kk be the lengths of packed_values and extra_query_coordinates. Requires * nkn \geq k * p = max(1, 2^{n+k} / P::WIDTH) Let vv be a vector corresponding to the first 2n2^n scalar values of values. Let r=(r0,,rk1)r = (r_0, \ldots, r_{k-1}) be the vector of extra_query_coordinates.

§Formal Definition

values is updated to contain the result of: v(1r0,r0)(1rk1,rk1)v \otimes (1 - r_0, r_0) \otimes \ldots \otimes (1 - r_{k-1}, r_{k-1}) which is now a vector of length 2n+k2^{n+k}. If 2^{n+k} < P::WIDTH, then the result is packed into a single element of values where only the first 2^{n+k} elements have meaning.

§Interpretation

Let ff be an nn variate multilinear polynomial that has evaluations over the nn dimensional hypercube corresponding to vv. Then values is updated to contain the evaluations of gg over the n+kn+k-dimensional hypercube where

  • g(x0,,xn+k1)=f(x0,,xn1)eq(xn,,xn+k1,r)g(x_0, \ldots, x_{n+k-1}) = f(x_0, \ldots, x_{n-1}) * eq(x_n, \ldots, x_{n+k-1}, r)