|
| static auto & | get_grand_product_polynomial (auto &input) |
| | Get the grand product polynomial object (either from the proving key or AllEntities depending on context)
|
| |
| static auto & | get_shifted_grand_product_polynomial (auto &input) |
| | Get the shifted grand product polynomial object (either from the proving key or AllEntities depending on context)
|
| |
| template<typename Accumulator , typename AllEntities , typename Parameters > |
| static Accumulator | compute_grand_product_numerator (const AllEntities &in, const Parameters ¶ms) |
| | Compute numerator term of the lookup relation:
|
| |
| template<typename Accumulator , typename AllEntities , typename Parameters > |
| static Accumulator | compute_grand_product_denominator (const AllEntities &in, const Parameters ¶ms) |
| | Compute denominator term of the lookup relation:
|
| |
| template<typename ContainerOverSubrelations , typename AllEntities , typename Parameters > |
| static void | accumulate (ContainerOverSubrelations &accumulators, const AllEntities &in, const Parameters ¶ms, const FF &scaling_factor) |
| | Compute contribution of the lookup grand prod relation for a given edge (internal function)
|
| |
template<typename FF_>
class proof_system::LookupRelationImpl< FF_ >
LookupRelationImpl defines the algebra for the lookup polynomial:
∏ (1 + β) ⋅ (q_lookup*f_k + γ) ⋅ (t_k + βt_{k+1} + γ(1 + β))
Z_lookup(g^j) = -----------------------------------------------------------------------— ∏ (s_k + βs_{k+1} + γ(1 + β))
The method compute_numerator_term computes polynomials f, t and incorporate them into terms that are ultimately needed to construct the grand product polynomial Z_lookup(X): Note 1: In the above, 't' is associated with table values (and is not to be confused with the quotient polynomial, also refered to as 't' elsewhere). Polynomial 's' is the sorted concatenation of the witnesses and the table values.
- Template Parameters
-
| FF | parametrises the prime field class being used |
template<typename FF_ >
template<typename ContainerOverSubrelations , typename AllEntities , typename Parameters >
| static void proof_system::LookupRelationImpl< FF_ >::accumulate |
( |
ContainerOverSubrelations & |
accumulators, |
|
|
const AllEntities & |
in, |
|
|
const Parameters & |
params, |
|
|
const FF & |
scaling_factor |
|
) |
| |
|
inlinestatic |
Compute contribution of the lookup grand prod relation for a given edge (internal function)
This the relation confirms faithful calculation of the lookup grand product polynomial Z_lookup. The contribution is z_lookup * (1 + β) * [q_lookup * f + γ] * (t_accum_k + βt_accum_{k+1} + γ(1 + β)) - z_lookup_shift * (s_accum_k + βs_accum_{k+1} + γ(1 + β)) where f = (w_1 + q_2*w_1_shift) + η(w_2 + q_m*w_2_shift) + η²(w_3 + q_c*w_3_shift) + η³q_index, t_accum = table_1 + ηtable_2 + η²table_3 + η³table_4, and s_accum = s_1 + ηs_2 + η²s_3 + η³s_4. Note: Selectors q_2, q_m and q_c are repurposed as 'column step size' for lookup gates.
- Parameters
-
| evals | transformed to evals + C(in(X)...)*scaling_factor |
| in | an std::array containing the fully extended Univariate edges. |
| parameters | contains beta, gamma, and public_input_delta, .... |
| scaling_factor | optional term to scale the evaluation before adding to evals. |