73 return Settings::inverse_polynomial_is_computed_at_row(row);
92 template <
typename Accumulator,
typename AllEntities>
95 using View =
typename Accumulator::View;
99 Accumulator
const& first_set_enabled = Accumulator(
102 Accumulator
const& second_set_enabled = Accumulator(
106 return (first_set_enabled + second_set_enabled - (first_set_enabled * second_set_enabled));
114 template <
typename Accumulator,
size_t read_index,
typename AllEntities>
119 using View =
typename Accumulator::View;
132 template <
typename Accumulator,
size_t write_index,
typename AllEntities>
136 using View =
typename Accumulator::View;
154 template <
typename Accumulator,
size_t read_index,
typename AllEntities,
typename Parameters>
157 using View =
typename Accumulator::View;
162 const auto all_polynomials = Settings::get_const_entities(in);
164 auto result = Accumulator(0);
169 1>([&]<
size_t i>() { result = result * params.beta + View(
std::get<i>(all_polynomials)); });
171 const auto& gamma = params.gamma;
172 return result + gamma;
185 template <
typename Accumulator,
size_t write_index,
typename AllEntities,
typename Parameters>
188 using View =
typename Accumulator::View;
193 const auto& used_entities = Settings::get_const_entities(in);
195 auto result = Accumulator(0);
199 1>([&]<
size_t i>() { result = result * params.beta + View(
std::get<i>(used_entities)); });
201 const auto& gamma = params.gamma;
202 return result + gamma;
212 template <
typename ContainerOverSubrelations,
typename AllEntities,
typename Parameters>
213 static void accumulate(ContainerOverSubrelations& accumulator,
214 const AllEntities& in,
215 const Parameters& params,
216 const FF& scaling_factor)
220 accumulator, in, params, scaling_factor);
224template <
typename Settings,
typename FF>
static constexpr std::array< bool, 2 > SUBRELATION_LINEARLY_INDEPENDENT
We apply the power polynomial only to the first subrelation.
static bool operation_exists_at_row(const AllValues &row)
Check if we need to compute the inverse polynomial element value for this row.
static Accumulator compute_read_term_predicate(const AllEntities &in)
Compute if the value from the first set exists in this row.
static Accumulator compute_write_term_predicate(const AllEntities &in)
Compute if the value from the second set exists in this row.
static Accumulator compute_inverse_exists(const AllEntities &in)
Get selector/wire switching on(1) or off(0) inverse computation We turn it on if either of the permut...
static Accumulator compute_read_term(const AllEntities &in, const Parameters ¶ms)
Compute the value of a single item in the set.
static constexpr size_t READ_TERMS
static void accumulate(ContainerOverSubrelations &accumulator, const AllEntities &in, const Parameters ¶ms, const FF &scaling_factor)
Expression for generic log-derivative-based set permutation.
static constexpr size_t LENGTH
static constexpr std::array< size_t, 2 > SUBRELATION_PARTIAL_LENGTHS
static auto & get_inverse_polynomial(AllEntities &in)
Get the inverse permutation polynomial (needed to compute its value)
static Accumulator compute_write_term(const AllEntities &in, const Parameters ¶ms)
Compute the value of a single item in the set.
static constexpr size_t WRITE_TERMS
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.
GenericPermutationSettingIndices
Specifies positions of elements in the tuple of entities received from methods in the Settings class.
@ INVERSE_POLYNOMIAL_INDEX
@ PERMUTATION_SETS_START_POLYNOMIAL_INDEX
@ FIRST_PERMUTATION_SET_ENABLE_POLYNOMIAL_INDEX
@ ENABLE_INVERSE_CORRECTNESS_CHECK_POLYNOMIAL_INDEX
@ SECOND_PERMUTATION_SET_ENABLE_POLYNOMIAL_INDEX
void accumulate_logderivative_permutation_subrelation_contributions(ContainerOverSubrelations &accumulator, const AllEntities &in, const Parameters ¶ms, const FF &scaling_factor)
Compute generic log-derivative set permutation subrelation accumulation.
constexpr void constexpr_for(F &&f)
Implements a loop using a compile-time iterator. Requires c++20. Implementation (and description) fro...
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept