pub fn evaluate_product_at_point<F: IsField>(
    factors: &[DenseMultilinearPolynomial<F>],
    point: &[FieldElement<F>],
) -> Result<FieldElement<F>, String>
where
    F::BaseType: Send + Sync,
    FieldElement<F>: Clone + Mul<Output = FieldElement<F>>,
{
    if factors.is_empty() {
        return Err("Cannot evaluate product of zero factors.".to_string());
    }
    if factors[0].num_vars() != point.len() {
        return Err(format!(
            "Point length {} does not match polynomial num_vars {}",
            point.len(),
            factors[0].num_vars()
        ));
    }

    factors
        .iter()
        .map(|factor| factor.evaluate(point.to_vec()).map_err(|e| e.to_string())) // Using to_string assuming Display for MultilinearError
        .try_fold(FieldElement::one(), |acc, eval_result| {
            eval_result.map(|eval| acc * eval)
        })
}
Evaluate the product of multiple multilinear polynomials at a point.
crates/provers/sumcheck/src/lib.rs