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 $n$ be log_n_values, $p$, $k$ be the lengths of packed_values and extra_query_coordinates. Requires * $n \geq k$ * p = max(1, 2^{n+k} / P::WIDTH) Let $v$ be a vector corresponding to the first $2^n$ scalar values of values. Let $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 \otimes (1 - r_0, r_0) \otimes \ldots \otimes (1 - r_{k-1}, r_{k-1})$ which is now a vector of length $2^{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 $f$ be an $n$ variate multilinear polynomial that has evaluations over the $n$ dimensional hypercube corresponding to $v$. Then values is updated to contain the evaluations of $g$ over the $n+k$-dimensional hypercube where

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