pub fn compose<F>(
poly_1: &Polynomial<FieldElement<F>>,
poly_2: &Polynomial<FieldElement<F>>,
) -> Polynomial<FieldElement<F>>where
F: IsField,
Expand description
Computes the composition of polynomials P1(t) and P2(t), that is P1(P2(t)) It uses interpolation to determine the evaluation at points x_i and evaluates P1(P2(x[i])). The interpolation theorem ensures that we can reconstruct the polynomial uniquely by interpolation over a suitable number of points This is an inefficient version, for something more efficient, use FFT for evaluation, provided the field satisfies the necessary traits