diff --git a/src/primitives/polynomial.rs b/src/primitives/polynomial.rs index 9ffd594e..7ecd965b 100644 --- a/src/primitives/polynomial.rs +++ b/src/primitives/polynomial.rs @@ -7,13 +7,21 @@ use core::{fmt, iter, ops, slice}; use super::{ExtensionField, Field, FieldVec}; /// A polynomial over some field. -#[derive(PartialEq, Eq, Clone, Debug, Hash)] +#[derive(Clone, Debug, Hash)] pub struct Polynomial { /// The coefficients of the polynomial, in "little-endian" order. /// That is the constant term is at index 0. inner: FieldVec, } +impl PartialEq for Polynomial { + fn eq(&self, other: &Self) -> bool { + self.inner[..self.degree()] == other.inner[..other.degree()] + } +} + +impl Eq for Polynomial {} + impl Polynomial { /// Determines whether the residue is representable, given the current /// compilation context.