Struct winter_verifier::TransitionConstraintGroup[][src]

pub struct TransitionConstraintGroup<E> where
    E: FieldElement
{ /* fields omitted */ }
Expand description

A group of transition constraints all having the same degree.

A transition constraint group does not actually store transition constraints - it stores only their indexes and the info needed to compute their random linear combination. The indexes are assumed to be consistent with the order in which constraint evaluations are written into the evaluation table by the Air::evaluate_transition() function.

A transition constraint is described by a ration function of the form $\frac{C(x)}{z(x)}$, where:

  • $C(x)$ is the constraint polynomial.
  • $z(x)$ is the constraint divisor polynomial.

The divisor polynomial is the same for all transition constraints (see Air::transition_constraint_divisor()) and for this reason is not stored in a transition constraint group.

Implementations

Returns indexes of all constraints in this group.

Returns degree descriptors for all constraints in this group.

Adds a new constraint to the group. The constraint is identified by an index in the evaluation table.

Computes a linear combination of evaluations relevant to this constraint group.

The linear combination is computed as follows: $$ \sum_{i=0}^{k-1}{C_i(x) \cdot (\alpha_i + \beta_i \cdot x^d)} $$ where:

  • $C_i(x)$ is the evaluation of the $i$th constraint at x (same as evaluations[i]).
  • $\alpha$ and $\beta$ are random field elements. In the interactive version of the protocol, these are provided by the verifier.
  • $d$ is the degree adjustment factor computed as $D + (n - 1) - deg(C_i(x))$, where $D$ is the degree of the composition polynomial, $n$ is the length of the execution trace, and $deg(C_i(x))$ is the evaluation degree of the $i$th constraint.

There are two things to note here. First, the degree adjustment factor $d$ is the same for all constraints in the group (since all constraints have the same degree). Second, the merged evaluations represent a polynomial of degree $D + n - 1$, which is higher then the target degree of the composition polynomial. This is because at this stage, we are merging only the numerators of transition constraints, and we will need to divide them by the divisor later on. The degree of the divisor for transition constraints is always $n - 1$. Thus, once we divide out the divisor, the evaluations will represent a polynomial of degree $D$.

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

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

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.