diff --git a/src/core/mod.rs b/src/core/mod.rs index 47f096fcc..73f912764 100644 --- a/src/core/mod.rs +++ b/src/core/mod.rs @@ -9,7 +9,6 @@ pub mod constraints; pub mod fft; pub mod fields; pub mod fri; -pub mod oods; pub mod poly; pub mod proof_of_work; pub mod prover; diff --git a/src/core/oods.rs b/src/core/oods.rs deleted file mode 100644 index 129dface6..000000000 --- a/src/core/oods.rs +++ /dev/null @@ -1,56 +0,0 @@ -use itertools::enumerate; - -use super::backend::cpu::CPUCircleEvaluation; -use super::circle::CirclePoint; -use super::constraints::{complex_conjugate_line, pair_vanishing, point_vanishing}; -use super::fields::m31::BaseField; -use super::fields::qm31::SecureField; -use super::fields::ComplexConjugate; -use super::poly::circle::CircleEvaluation; -use super::poly::{BitReversedOrder, NaturalOrder}; -use super::utils::bit_reverse_index; - -/// Evaluates the OODS quotient polynomial on a single point. -pub fn eval_oods_quotient_at_point( - point: CirclePoint, - value: SecureField, - oods_point: CirclePoint, - oods_value: SecureField, -) -> SecureField { - let num = value - oods_value; - let denom: SecureField = point_vanishing(oods_point, point); - num / denom -} - -/// Evaluates the pair OODS quotient polynomial on a single point. -/// See `get_pair_oods_quotient` for more details. -pub fn eval_pair_oods_quotient_at_point( - point: CirclePoint, - value: BaseField, - oods_point: CirclePoint, - oods_value: SecureField, -) -> SecureField { - let num = value - complex_conjugate_line(oods_point, oods_value, point); - let denom = pair_vanishing(oods_point, oods_point.complex_conjugate(), point.into_ef()); - num / denom -} - -/// Returns the OODS quotient polynomial evaluation over the whole domain. -/// Note the resulting polynomial's highest monomial might increase by one. -pub fn get_oods_quotient( - oods_point: CirclePoint, - oods_value: SecureField, - eval: &CPUCircleEvaluation, -) -> CPUCircleEvaluation { - let mut values = Vec::with_capacity(eval.domain.size()); - for (i, point) in enumerate(eval.domain.iter()) { - let index = bit_reverse_index(i, eval.domain.log_size()); - values.push(eval_oods_quotient_at_point( - point, - eval.values[index], - oods_point, - oods_value, - )); - } - CircleEvaluation::new(eval.domain, values) -}