Skip to content

Commit

Permalink
Rename pair_excluder to pair_vanishing
Browse files Browse the repository at this point in the history
  • Loading branch information
spapinistarkware committed Feb 14, 2024
1 parent 6a26d5d commit ac17ecf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/core/constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub fn point_excluder<F: ExtensionOf<BaseField>>(
}

// A vanishing polynomial on 2 circle points.
pub fn pair_excluder<F: ExtensionOf<BaseField>>(
pub fn pair_vanishing<F: ExtensionOf<BaseField>>(
excluded0: CirclePoint<F>,
excluded1: CirclePoint<F>,
p: CirclePoint<F>,
Expand Down Expand Up @@ -182,7 +182,7 @@ mod tests {

use super::{coset_vanishing, point_excluder, point_vanishing};
use crate::core::circle::{CirclePoint, CirclePointIndex, Coset};
use crate::core::constraints::{complex_conjugate_line, pair_excluder};
use crate::core::constraints::{complex_conjugate_line, pair_vanishing};
use crate::core::fields::m31::{BaseField, M31};
use crate::core::fields::qm31::QM31;
use crate::core::fields::{ComplexConjugate, Field};
Expand Down Expand Up @@ -227,9 +227,9 @@ mod tests {
let excluded1 = Coset::half_odds(5).at(13);
let point = (CirclePointIndex::generator() * 4).to_point();

assert_ne!(pair_excluder(excluded0, excluded1, point), M31::zero());
assert_eq!(pair_excluder(excluded0, excluded1, excluded0), M31::zero());
assert_eq!(pair_excluder(excluded0, excluded1, excluded1), M31::zero());
assert_ne!(pair_vanishing(excluded0, excluded1, point), M31::zero());
assert_eq!(pair_vanishing(excluded0, excluded1, excluded0), M31::zero());
assert_eq!(pair_vanishing(excluded0, excluded1, excluded1), M31::zero());
}

#[test]
Expand Down Expand Up @@ -290,7 +290,7 @@ mod tests {
for point in large_domain.iter() {
let line = complex_conjugate_line(vanish_point, vanish_point_value, point);
let mut value = polynomial.eval_at_point(point) - line;
value /= pair_excluder(
value /= pair_vanishing(
vanish_point,
vanish_point.complex_conjugate(),
point.into_ef(),
Expand Down
4 changes: 2 additions & 2 deletions src/core/oods.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::air::Mask;
use super::circle::{CirclePoint, CirclePointIndex};
use super::constraints::{
complex_conjugate_line, pair_excluder, point_vanishing, EvalByEvaluation, EvalByPoly,
complex_conjugate_line, pair_vanishing, point_vanishing, EvalByEvaluation, EvalByPoly,
PolyOracle,
};
use super::fields::m31::BaseField;
Expand Down Expand Up @@ -30,7 +30,7 @@ pub fn eval_pair_oods_quotient_point(
) -> SecureField {
let num = eval.get_at(CirclePointIndex(0))
- complex_conjugate_line(oods_point, oods_value, eval.point());
let denom = pair_excluder(
let denom = pair_vanishing(
oods_point,
oods_point.complex_conjugate(),
eval.point().into_ef(),
Expand Down
6 changes: 3 additions & 3 deletions src/fibonacci/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use num_traits::One;
use crate::core::air::evaluation::{DomainEvaluationAccumulator, PointEvaluationAccumulator};
use crate::core::air::{Component, ComponentTrace};
use crate::core::circle::{CirclePoint, Coset};
use crate::core::constraints::{coset_vanishing, pair_excluder};
use crate::core::constraints::{coset_vanishing, pair_vanishing};
use crate::core::fields::m31::BaseField;
use crate::core::fields::qm31::SecureField;
use crate::core::fields::{ExtensionOf, Field};
Expand All @@ -29,7 +29,7 @@ impl FibonacciComponent {
) -> F {
let constraint_zero_domain = Coset::subgroup(self.log_size);
let constraint_value = mask[0].square() + mask[1].square() - mask[2];
let selector = pair_excluder(
let selector = pair_vanishing(
constraint_zero_domain
.at(constraint_zero_domain.size() - 2)
.into_ef(),
Expand Down Expand Up @@ -58,7 +58,7 @@ impl FibonacciComponent {
let linear = F::one() + point.y * (self.claim - BaseField::one()) * p.y.inverse();

let num = mask[0] - linear;
let denom = pair_excluder(p.into_ef(), CirclePoint::zero(), point);
let denom = pair_vanishing(p.into_ef(), CirclePoint::zero(), point);
num / denom
}
}
Expand Down

0 comments on commit ac17ecf

Please sign in to comment.