pub struct BoundaryConstraint<F, E>where
    F: FieldElement,
    E: FieldElement<BaseField = <F as FieldElement>::BaseField> + ExtensionOf<F>,
{ /* private fields */ }
Expand description

The numerator portion of a boundary constraint.

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(b)$ is the value polynomial for this constraint.
  • $z(x)$ is the constraint divisor polynomial.

In addition to the value polynomial, a BoundaryConstraint also contains info needed to evaluate the constraint and to compose constraint evaluations with other constraints (i.e., constraint composition coefficients).

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:

  • F could be the base field of the protocol, in which case E is the extension field used.
  • F could be the extension field, in which case F and E are the same type.

Boundary constraints cannot be instantiated directly, they are created internally from Assertions.

Implementations

Returns index of the column against which this constraint applies.

Returns a value polynomial for this constraint.

Returns offset by which we need to shift the domain before evaluating this constraint.

The offset is returned as a tuple describing both, the number of steps by which the domain needs to be shifted, and field element by which a domain element needs to be multiplied to achieve the desired shift.

Returns composition coefficients for this constraint.

Evaluates this constraint at the specified point x.

The constraint is evaluated by computing $f(x) - b(x)$, where:

  • $f$ is a trace polynomial for the column against which the constraint is placed.
  • $f(x)$ = trace_value
  • $b$ is the value polynomial for this constraint.

For boundary constraints derived from single and periodic assertions, $b(x)$ is a constant.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.