pub struct BoundaryConstraintGroup<F, E>where
F: FieldElement,
E: FieldElement<BaseField = <F as FieldElement>::BaseField> + ExtensionOf<F>,{ /* private fields */ }Expand description
A group of boundary constraints all having the same divisor.
A boundary constraint is described by a rational function $\frac{f(x) - b(x)}{z(x)}$, where:
- $f(x)$ is a trace polynomial for the column against which the constraint is placed.
- $b(x)$ is the value polynomial for the constraint.
- $z(x)$ is the constraint divisor polynomial.
A boundary constraint group groups together all boundary constraints where polynomial $z$ is the same. The constraints stored in the group describe polynomials $b$. At the time of constraint evaluation, a prover or a verifier provides evaluations of the relevant polynomial $f$ so that the value of the constraint can be computed.
When the protocol is run in a large field, types F and E are the same. However, when
working with small fields, F and E can be set as follows:
Fcould be the base field of the protocol, in which caseEis the extension field used.Fcould be the extension field, in which caseFandEare the same type.
The above arrangement allows us to describe boundary constraints for main and auxiliary segments of the execution trace. Specifically:
- For the constraints against columns of the main execution trace,
Fis set to the base field of the protocol, andEis set to the extension field. - For the constraints against columns of the auxiliary trace segment, both
FandEare set to the extension field.
Implementations§
Source§impl<F, E> BoundaryConstraintGroup<F, E>where
F: FieldElement,
E: FieldElement<BaseField = <F as FieldElement>::BaseField> + ExtensionOf<F>,
impl<F, E> BoundaryConstraintGroup<F, E>where
F: FieldElement,
E: FieldElement<BaseField = <F as FieldElement>::BaseField> + ExtensionOf<F>,
Sourcepub fn constraints(&self) -> &[BoundaryConstraint<F, E>]
pub fn constraints(&self) -> &[BoundaryConstraint<F, E>]
Returns a list of boundary constraints in this group.
Sourcepub fn divisor(&self) -> &ConstraintDivisor<<F as FieldElement>::BaseField>
pub fn divisor(&self) -> &ConstraintDivisor<<F as FieldElement>::BaseField>
Returns a divisor applicable to all boundary constraints in this group.
Sourcepub fn evaluate_at(&self, state: &[E], x: E) -> E
pub fn evaluate_at(&self, state: &[E], x: E) -> E
Evaluates all constraints in this group at the specified point x.
Constraint evaluations are merges into a single value by computing their random linear combination and dividing the result by the divisor of this constraint group as follows: $$ \frac{\sum_{i=0}^{k-1}{\alpha_i \cdot C_i(x)}}{z(x)} $$ where:
- $C_i(x)$ is the evaluation of the $i$th constraint at
xcomputed as $f(x) - b(x)$. - $\alpha_i$ are random field elements. In the interactive version of the protocol, these are provided by the verifier.
Trait Implementations§
Source§impl<F, E> Clone for BoundaryConstraintGroup<F, E>where
F: Clone + FieldElement,
E: Clone + FieldElement<BaseField = <F as FieldElement>::BaseField> + ExtensionOf<F>,
<F as FieldElement>::BaseField: Clone,
impl<F, E> Clone for BoundaryConstraintGroup<F, E>where
F: Clone + FieldElement,
E: Clone + FieldElement<BaseField = <F as FieldElement>::BaseField> + ExtensionOf<F>,
<F as FieldElement>::BaseField: Clone,
Source§fn clone(&self) -> BoundaryConstraintGroup<F, E>
fn clone(&self) -> BoundaryConstraintGroup<F, E>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more