pub fn eval_rs_eq<F>(
n_pack: usize,
z_vals: &[F],
query: &[F],
expanded_row_batch_query: &[F],
) -> Fwhere
F: FieldOps<Scalar: BinaryField>,Expand description
Evaluate the ring switching equality indicator at a given point.
The ring switching equality indicator is the multilinear function $A$ from DP24,
Construction 3.1, generalized to an oracle of n_pack entries rather than a power of two
(binius.xyz#128, §Ring-Switching): its cell factor is the prefix indicator
$\mathrm{eq}_{<n}(z, y)$, so $A$ vanishes above the oracle. It is evaluated succinctly by
computing that indicator over the tensor algebra, where the first components live in the
vertical subring and the later components live in the horizontal subring. Then we apply
row-batching to the tensor algebra element.
z_vals may have more coordinates than query, when the claim spans a wider word-index space
than the oracle. The oracle is zero there, so those surplus coordinates contribute
$c = \prod_j (1 - z_j)$. The row-batching map is only $\mathbb{F}_2$-linear, so $c$ enters
through the vertical subring rather than as a scalar on the result.
§Arguments
n_pack- the oracle’s lengthz_vals- the vertical evaluation pointquery- the horizontal evaluation point, over the oracle’s variablesexpanded_row_batch_query- the scaling elements for row-batching
§Pre-conditions
z_valshas at least as many components asqueryn_packis at most2^query.len()- the length of
expanded_row_batch_querymust equalFE::DEGREE