Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
translator_decomposition_short_relation.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Planned, auditors: [], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
11
12namespace bb {
13
14template <typename FF_> class TranslatorDecompositionShortRelationImpl {
15 public:
16 using FF = FF_;
17
18 // 1 + polynomial degree of this relation
19 static constexpr size_t RELATION_LENGTH =
20 4; // degree(lagrange_even_in_minicircuit_in_minicircuit(a - a_0 - a_1*2¹⁴ ... - a_l⋅2¹⁴ˡ )op) = 3
21 static constexpr std::array<size_t, 48> SUBRELATION_PARTIAL_LENGTHS{
22 4, // decomposition of accumulator limb 0 into microlimbs subrelation
23 4, // decomposition of accumulator limb 1 into microlimbs subrelation
24 4, // decomposition of accumulator limb 2 into microlimbs subrelation
25 4, // decomposition of accumulator limb 3 into microlimbs subrelation
26 3, // decomposition of P.y limb 0 into microlimbs subrelation
27 3, // decomposition of P.y limb 1 into microlimbs subrelation
28 3, // decomposition of P.y limb 2 into microlimbs subrelation
29 3, // decomposition of P.y limb 3 into microlimbs subrelation
30 3, // decomposition of z1 limb 0 into microlimbs subrelation
31 3, // decomposition of z2 limb 0 into microlimbs subrelation
32 3, // decomposition of z1 limb 1 into microlimbs subrelation
33 3, // decomposition of z2 limb 1 into microlimbs subrelation
34 3, // decomposition of P.x limb 0 into microlimbs subrelation
35 3, // decomposition of P.x limb 1 into microlimbs subrelation
36 3, // decomposition of P.x limb 2 into microlimbs subrelation
37 3, // decomposition of P.x limb 3 into microlimbs subrelation
38 3, // decomposition of quotient limb 0 into microlimbs subrelation
39 3, // decomposition of quotient limb 1 into microlimbs subrelation
40 3, // decomposition of quotient limb 2 into microlimbs subrelation
41 3, // decomposition of quotient limb 3 into microlimbs subrelation
42 3, // decomposition of low relation wide limb into microlimbs subrelation
43 3, // decomposition of high relation wide limb into microlimbs subrelation
44 3, // stricter constraint on highest microlimb of P.x limb 0 subrelation
45 3, // stricter constraint on highest microlimb of P.x limb 1 subrelation
46 3, // stricter constraint on highest microlimb of P.x limb 2 subrelation
47 3, // stricter constraint on highest microlimb of P.x limb 3 subrelation
48 3, // stricter constraint on highest microlimb of P.y limb 0 subrelation
49 3, // stricter constraint on highest microlimb of P.y limb 1 subrelation
50 3, // stricter constraint on highest microlimb of P.y limb 2 subrelation
51 3, // stricter constraint on highest microlimb of P.y limb 3 subrelation
52 3, // stricter constraint on highest microlimb of z1 limb 0 subrelation
53 3, // stricter constraint on highest microlimb of z2 limb 0 subrelation
54 3, // stricter constraint on highest microlimb of z1 limb 1 subrelation
55 3, // stricter constraint on highest microlimb of z2 limb 1 subrelation
56 3, // stricter constraint on highest microlimb of accumulator limb 0 subrelation
57 3, // stricter constraint on highest microlimb of accumulator limb 1 subrelation
58 3, // stricter constraint on highest microlimb of accumulator limb 2 subrelation
59 3, // stricter constraint on highest microlimb of accumulator limb 3 subrelation
60 3, // stricter constraint on highest microlimb of quotient limb 0 subrelation
61 3, // stricter constraint on highest microlimb of quotient limb 1 subrelation
62 3, // stricter constraint on highest microlimb of quotient limb 2 subrelation
63 3, // stricter constraint on highest microlimb of quotient limb 3 subrelation
64 3, // decomposition of x_lo into 2 limbs subrelation
65 3, // decomposition of x_hi into 2 limbs subrelation
66 3, // decomposition of y_lo into 2 limbs subrelation
67 3, // decomposition of y_hi into 2 limbs subrelation
68 3, // decomposition of z1 into 2 limbs subrelation
69 3 // decomposition of z2 into 2 limbs subrelation
70 };
71
76 template <typename AllEntities> inline static bool skip(const AllEntities& in)
77 {
78 return in.lagrange_even_in_minicircuit.is_zero();
79 }
80
99 template <typename ContainerOverSubrelations, typename AllEntities, typename Parameters>
100 static void accumulate(ContainerOverSubrelations& accumulators,
101 const AllEntities& in,
102 const Parameters&,
103 const FF& scaling_factor);
104};
105
106template <typename FF>
108
109} // namespace bb
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
static bool skip(const AllEntities &in)
Returns true if the contribution from all subrelations for the provided inputs is identically zero.
static constexpr std::array< size_t, 48 > SUBRELATION_PARTIAL_LENGTHS
static void accumulate(ContainerOverSubrelations &accumulators, const AllEntities &in, const Parameters &, const FF &scaling_factor)
Expression for decomposition of various values into smaller limbs or microlimbs.
Entry point for Barretenberg command-line interface.
Definition api.hpp:5