fn compute_chi(a: &[bool], r: &[FieldElement<F>]) -> Result<FieldElement<F>, MultilinearError> {
        assert_eq!(a.len(), r.len());
        if a.len() != r.len() {
            return Err(MultilinearError::ChisAndEvalsLengthMismatch(
                a.len(),
                r.len(),
            ));
        }
        let mut chi_i = FieldElement::one();
        for j in 0..r.len() {
            if a[j] {
                chi_i *= &r[j];
            } else {
                chi_i *= FieldElement::<F>::one() - &r[j];
            }
        }
        Ok(chi_i)
    }
Computes the eq extension polynomial of the polynomial.
return 1 when a == r, otherwise return 0.
Chi is the Lagrange basis polynomial evaluated at r
a indicates the binary decomposition of the index of the Lagrange basis polynomial
crates/math/src/polynomial/sparse_multilinear_poly.rs