Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
written_public_data_slots_tree_check_impl.hpp
Go to the documentation of this file.
1// AUTOGENERATED FILE
2#pragma once
3
6
7namespace bb::avm2 {
8
9template <typename FF_>
10template <typename ContainerOverSubrelations, typename AllEntities>
12 const AllEntities& in,
13 [[maybe_unused]] const RelationParameters<FF_>&,
14 [[maybe_unused]] const FF_& scaling_factor)
15{
16 using C = ColumnAndShifts;
17
18 const auto constants_AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_HEIGHT = FF(6);
19 const auto constants_DOM_SEP__PUBLIC_LEAF_SLOT = FF(1247650290);
20 const auto written_public_data_slots_tree_check_EXISTS =
21 (FF(1) - in.get(C::written_public_data_slots_tree_check_leaf_not_exists));
22 const auto written_public_data_slots_tree_check_SLOT_LOW_LEAF_SLOT_DIFF =
23 (in.get(C::written_public_data_slots_tree_check_leaf_slot) -
24 in.get(C::written_public_data_slots_tree_check_low_leaf_slot));
25 const auto written_public_data_slots_tree_check_NEXT_SLOT_IS_ZERO =
26 (FF(1) - in.get(C::written_public_data_slots_tree_check_next_slot_is_nonzero));
28 {
29 using View = typename std::tuple_element_t<0, ContainerOverSubrelations>::View;
30 auto tmp = static_cast<View>(in.get(C::written_public_data_slots_tree_check_sel)) *
31 (FF(1) - static_cast<View>(in.get(C::written_public_data_slots_tree_check_sel)));
32 std::get<0>(evals) += (tmp * scaling_factor);
33 }
34 {
35 using View = typename std::tuple_element_t<1, ContainerOverSubrelations>::View;
36 auto tmp = static_cast<View>(in.get(C::written_public_data_slots_tree_check_write)) *
37 (FF(1) - static_cast<View>(in.get(C::written_public_data_slots_tree_check_write)));
38 std::get<1>(evals) += (tmp * scaling_factor);
39 }
40 {
41 using View = typename std::tuple_element_t<2, ContainerOverSubrelations>::View;
42 auto tmp = static_cast<View>(in.get(C::written_public_data_slots_tree_check_leaf_not_exists)) *
43 (FF(1) - static_cast<View>(in.get(C::written_public_data_slots_tree_check_leaf_not_exists)));
44 std::get<2>(evals) += (tmp * scaling_factor);
45 }
46 {
47 using View = typename std::tuple_element_t<3, ContainerOverSubrelations>::View;
48 auto tmp = static_cast<View>(in.get(C::written_public_data_slots_tree_check_sel)) *
49 (CView(constants_DOM_SEP__PUBLIC_LEAF_SLOT) -
50 static_cast<View>(in.get(C::written_public_data_slots_tree_check_siloing_separator)));
51 std::get<3>(evals) += (tmp * scaling_factor);
52 }
53 {
54 using View = typename std::tuple_element_t<4, ContainerOverSubrelations>::View;
55 auto tmp = static_cast<View>(in.get(C::written_public_data_slots_tree_check_sel)) *
56 (static_cast<View>(in.get(C::written_public_data_slots_tree_check_const_three)) - FF(3));
57 std::get<4>(evals) += (tmp * scaling_factor);
58 }
59 {
60 using View = typename std::tuple_element_t<5, ContainerOverSubrelations>::View;
61 auto tmp = (static_cast<View>(in.get(C::written_public_data_slots_tree_check_should_insert)) -
62 static_cast<View>(in.get(C::written_public_data_slots_tree_check_write)) *
63 static_cast<View>(in.get(C::written_public_data_slots_tree_check_leaf_not_exists)));
64 std::get<5>(evals) += (tmp * scaling_factor);
65 }
66 {
67 using View = typename std::tuple_element_t<6, ContainerOverSubrelations>::View;
68 auto tmp = static_cast<View>(in.get(C::written_public_data_slots_tree_check_write)) *
69 CView(written_public_data_slots_tree_check_EXISTS) *
70 (static_cast<View>(in.get(C::written_public_data_slots_tree_check_root)) -
71 static_cast<View>(in.get(C::written_public_data_slots_tree_check_write_root)));
72 std::get<6>(evals) += (tmp * scaling_factor);
73 }
74 {
75 using View = typename std::tuple_element_t<7, ContainerOverSubrelations>::View;
76 auto tmp = (static_cast<View>(in.get(C::written_public_data_slots_tree_check_tree_size_after_write)) -
77 (static_cast<View>(in.get(C::written_public_data_slots_tree_check_tree_size_before_write)) +
78 static_cast<View>(in.get(C::written_public_data_slots_tree_check_should_insert))));
79 std::get<7>(evals) += (tmp * scaling_factor);
80 }
81 {
82 using View = typename std::tuple_element_t<8, ContainerOverSubrelations>::View;
83 auto tmp = static_cast<View>(in.get(C::written_public_data_slots_tree_check_should_insert)) *
84 (static_cast<View>(in.get(C::written_public_data_slots_tree_check_tree_size_before_write)) -
85 static_cast<View>(in.get(C::written_public_data_slots_tree_check_updated_low_leaf_next_index)));
86 std::get<8>(evals) += (tmp * scaling_factor);
87 }
88 {
89 using View = typename std::tuple_element_t<9, ContainerOverSubrelations>::View;
90 auto tmp = static_cast<View>(in.get(C::written_public_data_slots_tree_check_should_insert)) *
91 (static_cast<View>(in.get(C::written_public_data_slots_tree_check_leaf_slot)) -
92 static_cast<View>(in.get(C::written_public_data_slots_tree_check_updated_low_leaf_next_slot)));
93 std::get<9>(evals) += (tmp * scaling_factor);
94 }
95 {
96 using View = typename std::tuple_element_t<10, ContainerOverSubrelations>::View;
97 auto tmp = static_cast<View>(in.get(C::written_public_data_slots_tree_check_sel)) *
98 (CView(constants_AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_HEIGHT) -
99 static_cast<View>(in.get(C::written_public_data_slots_tree_check_tree_height)));
100 std::get<10>(evals) += (tmp * scaling_factor);
101 }
102 { // EXISTS_CHECK
103 using View = typename std::tuple_element_t<11, ContainerOverSubrelations>::View;
104 auto tmp =
105 static_cast<View>(in.get(C::written_public_data_slots_tree_check_sel)) *
106 ((CView(written_public_data_slots_tree_check_SLOT_LOW_LEAF_SLOT_DIFF) *
107 (CView(written_public_data_slots_tree_check_EXISTS) *
108 (FF(1) - static_cast<View>(
109 in.get(C::written_public_data_slots_tree_check_slot_low_leaf_slot_diff_inv))) +
110 static_cast<View>(in.get(C::written_public_data_slots_tree_check_slot_low_leaf_slot_diff_inv))) -
111 FF(1)) +
112 CView(written_public_data_slots_tree_check_EXISTS));
113 std::get<11>(evals) += (tmp * scaling_factor);
114 }
115 {
116 using View = typename std::tuple_element_t<12, ContainerOverSubrelations>::View;
117 auto tmp = static_cast<View>(in.get(C::written_public_data_slots_tree_check_next_slot_is_nonzero)) *
118 (FF(1) - static_cast<View>(in.get(C::written_public_data_slots_tree_check_next_slot_is_nonzero)));
119 std::get<12>(evals) += (tmp * scaling_factor);
120 }
121 { // NEXT_SLOT_IS_ZERO_CHECK
122 using View = typename std::tuple_element_t<13, ContainerOverSubrelations>::View;
123 auto tmp =
124 static_cast<View>(in.get(C::written_public_data_slots_tree_check_leaf_not_exists)) *
125 ((static_cast<View>(in.get(C::written_public_data_slots_tree_check_low_leaf_next_slot)) *
126 (CView(written_public_data_slots_tree_check_NEXT_SLOT_IS_ZERO) *
127 (FF(1) - static_cast<View>(in.get(C::written_public_data_slots_tree_check_next_slot_inv))) +
128 static_cast<View>(in.get(C::written_public_data_slots_tree_check_next_slot_inv))) -
129 FF(1)) +
130 CView(written_public_data_slots_tree_check_NEXT_SLOT_IS_ZERO));
131 std::get<13>(evals) += (tmp * scaling_factor);
132 }
133}
134
135} // namespace bb::avm2
static void accumulate(ContainerOverSubrelations &evals, const AllEntities &in, const RelationParameters< FF > &, const FF &scaling_factor)
AvmFlavorSettings::FF FF
Definition field.hpp:10
ColumnAndShifts
Definition columns.hpp:34
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
#define CView(v)
Container for parameters used by the grand product (permutation, lookup) Honk relations.