82 Settings::INVERSE_EXISTS_POLYNOMIAL_DEGREE) +
114 return Settings::inverse_polynomial_is_computed_at_row(row);
134 template <
typename Accumulator,
typename AllEntities>
137 using View =
typename Accumulator::View;
139 Accumulator
const& first_set_enabled = Accumulator(
142 Accumulator
const& second_set_enabled = Accumulator(
146 return (first_set_enabled + second_set_enabled - (first_set_enabled * second_set_enabled));
158 template <
typename Accumulator,
size_t lookup_index,
typename AllEntities>
163 using View =
typename Accumulator::View;
180 template <
typename Accumulator,
size_t table_index,
typename AllEntities>
184 using View =
typename Accumulator::View;
201 template <
typename Accumulator,
size_t lookup_index,
typename AllEntities,
typename Parameters>
204 using View =
typename Accumulator::View;
208 const FF beta = params.beta;
209 const FF gamma = params.gamma;
211 auto result = Accumulator(0);
214 const auto all_polynomials = Settings::get_const_entities(in);
217 bb::constexpr_for<start_polynomial_index, start_polynomial_index + Settings::COLUMNS_PER_SET, 1>(
218 [&]<
size_t i>() { result = result * beta + View(
std::get<i>(all_polynomials)); });
220 return result + gamma;
234 template <
typename Accumulator,
size_t table_index,
typename AllEntities,
typename Parameters>
237 using View =
typename Accumulator::View;
241 const FF beta = params.beta;
242 const FF gamma = params.gamma;
244 auto result = Accumulator(0);
247 const auto all_polynomials = Settings::get_const_entities(in);
250 bb::constexpr_for<start_polynomial_index, start_polynomial_index + Settings::COLUMNS_PER_SET, 1>(
251 [&]<
size_t i>() { result = result * beta + View(
std::get<i>(all_polynomials)); });
253 return result + gamma;
274 template <
typename ContainerOverSubrelations,
typename AllEntities,
typename Parameters>
275 static void accumulate(ContainerOverSubrelations& accumulator,
276 const AllEntities& in,
277 const Parameters& params,
278 const FF& scaling_factor)
282 ContainerOverSubrelations,
285 true>(accumulator, in, params, scaling_factor);
289template <
typename Settings,
typename FF>
Implementation of a generic permutation relation.
static constexpr size_t FIRST_RELATION_PARTIAL_LENGTH
static Accumulator compute_lookup_term(const AllEntities &in, const Parameters ¶ms)
Compute the value of the lookup term at a given index.
static constexpr std::array< bool, 2 > SUBRELATION_LINEARLY_INDEPENDENT
We apply the power polynomial only to the first subrelation.
static constexpr size_t NUM_LOOKUP_TERMS
static Accumulator compute_table_term(const AllEntities &in, const Parameters ¶ms)
Compute the value of a table term at a given index.
static bool operation_exists_at_row(const AllValues &row)
Check if we need to compute the inverse polynomial element value for this row.
static constexpr size_t NUM_TABLE_TERMS
static constexpr size_t SECOND_RELATION_PARTIAL_LENGTH
static Accumulator compute_inverse_exists(const AllEntities &in)
Get selector/wire switching on (1) or off (0) inverse computation.
static Accumulator get_table_term_predicate(const AllEntities &in)
Extract predicate enabling looking up a given table term at this row.
static void accumulate(ContainerOverSubrelations &accumulator, const AllEntities &in, const Parameters ¶ms, const FF &scaling_factor)
Compute generic log-derivative set permutation subrelation accumulation.
static constexpr size_t LENGTH
static constexpr std::array< size_t, 2 > SUBRELATION_PARTIAL_LENGTHS
static Accumulator get_lookup_term_predicate(const AllEntities &in)
Extract predicate enabling looking up a given lookup term at this row.
static auto & get_inverse_polynomial(AllEntities &in)
Get the inverse permutation polynomial (needed to compute its value)
Specialization of the polynomial structure required for the lookup argument to the case of the permut...
static constexpr size_t get_lookup_term_predicate_index()
static constexpr size_t get_table_term_predicate_index()
static constexpr size_t LOOKUP_TERM_START_POLYNOMIAL_INDEX
static constexpr size_t TABLE_TERM_PREDICATE_START_POLYNOMIAL_INDEX
static constexpr size_t LOOKUP_TERM_PREDICATE_START_POLYNOMIAL_INDEX
static constexpr size_t get_inverse_polynomial_index()
static constexpr size_t compute_table_term_polynomial_offset()
static constexpr size_t NUM_TABLE_TERMS
static constexpr size_t NUM_LOOKUP_TERMS
static constexpr size_t TABLE_TERM_START_POLYNOMIAL_INDEX
static constexpr size_t INVERSE_POLYNOMIAL_INDEX
static constexpr size_t compute_lookup_term_polynomial_offset()
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
Entry point for Barretenberg command-line interface.
void _accumulate_logderivative_subrelation_contributions(ContainerOverSubrelations &accumulator, const AllEntities &in, const Parameters ¶ms, const FF &scaling_factor)
Unified implementation of log-derivative subrelation accumulation.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept