pub struct Point<F> {
pub x: F,
pub y: F,
/* private fields */
}Expand description
Affine representation of a point on the circle. x^2 + y^2 == 1
Fields§
§x: F§y: FImplementations§
Source§impl<F: Field> Point<F>
impl<F: Field> Point<F>
pub fn new(x: F, y: F) -> Self
Sourcepub fn from_projective_line(t: F) -> Self
pub fn from_projective_line(t: F) -> Self
Circle STARKs, Section 3, Lemma 1: (page 4 of the first revision PDF)
(x, y) = ((1-t^2)/(1+t^2), 2t/(1+t^2))Panics if t^2 = -1, corresponding to either of the points at infinity (on the projective circle) (1 : ±i : 0)
Sourcepub fn to_projective_line(self) -> Option<F>
pub fn to_projective_line(self) -> Option<F>
Circle STARKs, Section 3, Lemma 1: (page 4 of the first revision PDF)
t = y / (x + 1)Returns None if self.x = -1, corresponding to Inf on the projective line
This is also used as a selector polynomial, with a simple zero at (1,0) and a simple pole at (-1,0), which in the paper is called v_0 Circle STARKs, Section 5.1, Lemma 11 (page 21 of the first revision PDF)
Sourcepub fn double(self) -> Self
pub fn double(self) -> Self
The “squaring map”, or doubling in additive notation, denoted π(x,y) Circle STARKs, Section 3.1, Equation 1: (page 5 of the first revision PDF)
Sourcepub fn repeated_double(self, n: usize) -> Self
pub fn repeated_double(self, n: usize) -> Self
Apply the doubling map n times: π^n(x,y)
Sourcepub fn v_n(self, log_n: usize) -> F
pub fn v_n(self, log_n: usize) -> F
Evaluate the vanishing polynomial for the standard position coset of size 2^log_n at this point Circle STARKs, Section 3.3, Equation 8 (page 10 of the first revision PDF)
Sourcepub fn v_n_prod(self, log_n: usize) -> F
pub fn v_n_prod(self, log_n: usize) -> F
Compute a product of successive v_n’s.
More explicitly this computes (1..log_n).map(|i| self.v_n(i)).product()
but uses far fewer self.x.square().double() - F::ONE steps compared to the naive implementation.
Sourcepub fn v_tilde_p<EF: ExtensionField<F>>(self, at: Point<EF>) -> EF
pub fn v_tilde_p<EF: ExtensionField<F>>(self, at: Point<EF>) -> EF
Evaluate the selector function which is zero at self and nonzero elsewhere, at at.
Called v_0 . T_p⁻¹ or ṽ_p(x,y) in the paper, used for constraint selectors.
Panics if p = -self, the pole.
Section 5.1, Lemma 11 of Circle Starks (page 21 of first edition PDF)
Sourcepub fn s_p_at_p(self, log_n: usize) -> F
pub fn s_p_at_p(self, log_n: usize) -> F
The concrete value of the selector s_P = v_n / (v_0 . T_p⁻¹) at P=self, used for normalization. Circle STARKs, Section 5.1, Remark 16 (page 22 of the first revision PDF)
Sourcepub fn v_p<EF: ExtensionField<F>>(self, at: Point<EF>) -> (EF, EF)
pub fn v_p<EF: ExtensionField<F>>(self, at: Point<EF>) -> (EF, EF)
Evaluate the alternate single-point vanishing function v_p(x), used for DEEP quotient. Returns (a, b), representing the complex number a + bi. Simple zero at p, simple pole at +-infinity. Circle STARKs, Section 3.3, Equation 11 (page 11 of the first edition PDF).
Trait Implementations§
Source§impl<F: Field> AddAssign for Point<F>
impl<F: Field> AddAssign for Point<F>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+= operation. Read moreimpl<F: Copy> Copy for Point<F>
impl<F: Eq> Eq for Point<F>
Source§impl<F: Field> Neg for Point<F>
Circle STARKs, Section 3.1, Equation 2: (page 5 of the first revision PDF)
The inverse map J(x,y) = (x,-y)
impl<F: Field> Neg for Point<F>
Circle STARKs, Section 3.1, Equation 2: (page 5 of the first revision PDF) The inverse map J(x,y) = (x,-y)
impl<F: PartialEq> StructuralPartialEq for Point<F>
Auto Trait Implementations§
impl<F> Freeze for Point<F>where
F: Freeze,
impl<F> RefUnwindSafe for Point<F>where
F: RefUnwindSafe,
impl<F> Send for Point<F>where
F: Send,
impl<F> Sync for Point<F>where
F: Sync,
impl<F> Unpin for Point<F>where
F: Unpin,
impl<F> UnsafeUnpin for Point<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for Point<F>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more