diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/alu.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/alu.hpp index ff431393770..eda58900a6e 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/alu.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/alu.hpp @@ -326,7 +326,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(3); - auto tmp = ((alu_cf * (-alu_cf + FF(1))) - FF(0)); + auto tmp = (alu_cf * (-alu_cf + FF(1))); tmp *= scaling_factor; std::get<3>(evals) += tmp; } @@ -334,7 +334,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(4); - auto tmp = ((alu_ff_tag * (-alu_ff_tag + FF(1))) - FF(0)); + auto tmp = (alu_ff_tag * (-alu_ff_tag + FF(1))); tmp *= scaling_factor; std::get<4>(evals) += tmp; } @@ -342,7 +342,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(5); - auto tmp = ((alu_u8_tag * (-alu_u8_tag + FF(1))) - FF(0)); + auto tmp = (alu_u8_tag * (-alu_u8_tag + FF(1))); tmp *= scaling_factor; std::get<5>(evals) += tmp; } @@ -350,7 +350,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(6); - auto tmp = ((alu_u16_tag * (-alu_u16_tag + FF(1))) - FF(0)); + auto tmp = (alu_u16_tag * (-alu_u16_tag + FF(1))); tmp *= scaling_factor; std::get<6>(evals) += tmp; } @@ -358,7 +358,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(7); - auto tmp = ((alu_u32_tag * (-alu_u32_tag + FF(1))) - FF(0)); + auto tmp = (alu_u32_tag * (-alu_u32_tag + FF(1))); tmp *= scaling_factor; std::get<7>(evals) += tmp; } @@ -366,7 +366,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(8); - auto tmp = ((alu_u64_tag * (-alu_u64_tag + FF(1))) - FF(0)); + auto tmp = (alu_u64_tag * (-alu_u64_tag + FF(1))); tmp *= scaling_factor; std::get<8>(evals) += tmp; } @@ -374,7 +374,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(9); - auto tmp = ((alu_u128_tag * (-alu_u128_tag + FF(1))) - FF(0)); + auto tmp = (alu_u128_tag * (-alu_u128_tag + FF(1))); tmp *= scaling_factor; std::get<9>(evals) += tmp; } @@ -382,10 +382,9 @@ template class aluImpl { { Avm_DECLARE_VIEWS(10); - auto tmp = ((alu_sel_alu * - ((((((alu_ff_tag + alu_u8_tag) + alu_u16_tag) + alu_u32_tag) + alu_u64_tag) + alu_u128_tag) - - FF(1))) - - FF(0)); + auto tmp = + (alu_sel_alu * + ((((((alu_ff_tag + alu_u8_tag) + alu_u16_tag) + alu_u32_tag) + alu_u64_tag) + alu_u128_tag) - FF(1))); tmp *= scaling_factor; std::get<10>(evals) += tmp; } @@ -404,18 +403,17 @@ template class aluImpl { { Avm_DECLARE_VIEWS(12); - auto tmp = ((((alu_op_add + alu_op_sub) * - ((((((((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + - (alu_u16_r1 * FF(4294967296UL))) + - (alu_u16_r2 * FF(281474976710656UL))) + - (alu_u16_r3 * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) + - (alu_u16_r4 * FF(uint256_t{ 0UL, 65536UL, 0UL, 0UL }))) + - (alu_u16_r5 * FF(uint256_t{ 0UL, 4294967296UL, 0UL, 0UL }))) + - (alu_u16_r6 * FF(uint256_t{ 0UL, 281474976710656UL, 0UL, 0UL }))) - - alu_ia) + - (alu_ff_tag * alu_ic))) + - ((alu_op_add - alu_op_sub) * ((alu_cf * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL })) - alu_ib))) - - FF(0)); + auto tmp = + (((alu_op_add + alu_op_sub) * ((((((((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + + (alu_u16_r1 * FF(4294967296UL))) + + (alu_u16_r2 * FF(281474976710656UL))) + + (alu_u16_r3 * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) + + (alu_u16_r4 * FF(uint256_t{ 0UL, 65536UL, 0UL, 0UL }))) + + (alu_u16_r5 * FF(uint256_t{ 0UL, 4294967296UL, 0UL, 0UL }))) + + (alu_u16_r6 * FF(uint256_t{ 0UL, 281474976710656UL, 0UL, 0UL }))) - + alu_ia) + + (alu_ff_tag * alu_ic))) + + ((alu_op_add - alu_op_sub) * ((alu_cf * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL })) - alu_ib))); tmp *= scaling_factor; std::get<12>(evals) += tmp; } @@ -423,23 +421,22 @@ template class aluImpl { { Avm_DECLARE_VIEWS(13); - auto tmp = ((((alu_op_add + alu_op_sub) * - (((((((alu_u8_tag * alu_u8_r0) + (alu_u16_tag * (alu_u8_r0 + (alu_u8_r1 * FF(256))))) + - (alu_u32_tag * ((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))))) + - (alu_u64_tag * ((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + - (alu_u16_r1 * FF(4294967296UL))) + - (alu_u16_r2 * FF(281474976710656UL))))) + - (alu_u128_tag * ((((((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + - (alu_u16_r1 * FF(4294967296UL))) + - (alu_u16_r2 * FF(281474976710656UL))) + - (alu_u16_r3 * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) + - (alu_u16_r4 * FF(uint256_t{ 0UL, 65536UL, 0UL, 0UL }))) + - (alu_u16_r5 * FF(uint256_t{ 0UL, 4294967296UL, 0UL, 0UL }))) + - (alu_u16_r6 * FF(uint256_t{ 0UL, 281474976710656UL, 0UL, 0UL }))))) + - (alu_ff_tag * alu_ia)) - - alu_ic)) + - ((alu_ff_tag * (alu_op_add - alu_op_sub)) * alu_ib)) - - FF(0)); + auto tmp = (((alu_op_add + alu_op_sub) * + (((((((alu_u8_tag * alu_u8_r0) + (alu_u16_tag * (alu_u8_r0 + (alu_u8_r1 * FF(256))))) + + (alu_u32_tag * ((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))))) + + (alu_u64_tag * ((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + + (alu_u16_r1 * FF(4294967296UL))) + + (alu_u16_r2 * FF(281474976710656UL))))) + + (alu_u128_tag * ((((((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + + (alu_u16_r1 * FF(4294967296UL))) + + (alu_u16_r2 * FF(281474976710656UL))) + + (alu_u16_r3 * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) + + (alu_u16_r4 * FF(uint256_t{ 0UL, 65536UL, 0UL, 0UL }))) + + (alu_u16_r5 * FF(uint256_t{ 0UL, 4294967296UL, 0UL, 0UL }))) + + (alu_u16_r6 * FF(uint256_t{ 0UL, 281474976710656UL, 0UL, 0UL }))))) + + (alu_ff_tag * alu_ia)) - + alu_ic)) + + ((alu_ff_tag * (alu_op_add - alu_op_sub)) * alu_ib)); tmp *= scaling_factor; std::get<13>(evals) += tmp; } @@ -447,7 +444,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(14); - auto tmp = (((alu_ff_tag * alu_op_mul) * ((alu_ia * alu_ib) - alu_ic)) - FF(0)); + auto tmp = ((alu_ff_tag * alu_op_mul) * ((alu_ia * alu_ib) - alu_ic)); tmp *= scaling_factor; std::get<14>(evals) += tmp; } @@ -455,16 +452,15 @@ template class aluImpl { { Avm_DECLARE_VIEWS(15); - auto tmp = (((((-alu_ff_tag + FF(1)) - alu_u128_tag) * alu_op_mul) * - (((((((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + - (alu_u16_r1 * FF(4294967296UL))) + - (alu_u16_r2 * FF(281474976710656UL))) + - (alu_u16_r3 * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) + - (alu_u16_r4 * FF(uint256_t{ 0UL, 65536UL, 0UL, 0UL }))) + - (alu_u16_r5 * FF(uint256_t{ 0UL, 4294967296UL, 0UL, 0UL }))) + - (alu_u16_r6 * FF(uint256_t{ 0UL, 281474976710656UL, 0UL, 0UL }))) - - (alu_ia * alu_ib))) - - FF(0)); + auto tmp = ((((-alu_ff_tag + FF(1)) - alu_u128_tag) * alu_op_mul) * + (((((((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + + (alu_u16_r1 * FF(4294967296UL))) + + (alu_u16_r2 * FF(281474976710656UL))) + + (alu_u16_r3 * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) + + (alu_u16_r4 * FF(uint256_t{ 0UL, 65536UL, 0UL, 0UL }))) + + (alu_u16_r5 * FF(uint256_t{ 0UL, 4294967296UL, 0UL, 0UL }))) + + (alu_u16_r6 * FF(uint256_t{ 0UL, 281474976710656UL, 0UL, 0UL }))) - + (alu_ia * alu_ib))); tmp *= scaling_factor; std::get<15>(evals) += tmp; } @@ -473,13 +469,12 @@ template class aluImpl { Avm_DECLARE_VIEWS(16); auto tmp = - ((alu_op_mul * (((((alu_u8_tag * alu_u8_r0) + (alu_u16_tag * (alu_u8_r0 + (alu_u8_r1 * FF(256))))) + - (alu_u32_tag * ((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))))) + - (alu_u64_tag * ((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + - (alu_u16_r1 * FF(4294967296UL))) + - (alu_u16_r2 * FF(281474976710656UL))))) - - (((-alu_ff_tag + FF(1)) - alu_u128_tag) * alu_ic))) - - FF(0)); + (alu_op_mul * (((((alu_u8_tag * alu_u8_r0) + (alu_u16_tag * (alu_u8_r0 + (alu_u8_r1 * FF(256))))) + + (alu_u32_tag * ((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))))) + + (alu_u64_tag * ((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + + (alu_u16_r1 * FF(4294967296UL))) + + (alu_u16_r2 * FF(281474976710656UL))))) - + (((-alu_ff_tag + FF(1)) - alu_u128_tag) * alu_ic))); tmp *= scaling_factor; std::get<16>(evals) += tmp; } @@ -487,15 +482,14 @@ template class aluImpl { { Avm_DECLARE_VIEWS(17); - auto tmp = (((alu_u128_tag * alu_op_mul) * - ((((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + - (alu_u16_r1 * FF(4294967296UL))) + - (alu_u16_r2 * FF(281474976710656UL))) + - ((((alu_u16_r3 + (alu_u16_r4 * FF(65536))) + (alu_u16_r5 * FF(4294967296UL))) + - (alu_u16_r6 * FF(281474976710656UL))) * - FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) - - alu_ia)) - - FF(0)); + auto tmp = ((alu_u128_tag * alu_op_mul) * + ((((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + + (alu_u16_r1 * FF(4294967296UL))) + + (alu_u16_r2 * FF(281474976710656UL))) + + ((((alu_u16_r3 + (alu_u16_r4 * FF(65536))) + (alu_u16_r5 * FF(4294967296UL))) + + (alu_u16_r6 * FF(281474976710656UL))) * + FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) - + alu_ia)); tmp *= scaling_factor; std::get<17>(evals) += tmp; } @@ -504,15 +498,14 @@ template class aluImpl { Avm_DECLARE_VIEWS(18); auto tmp = - (((alu_u128_tag * alu_op_mul) * - ((((((alu_u8_r0_shift + (alu_u8_r1_shift * FF(256))) + (alu_u16_r0_shift * FF(65536))) + - (alu_u16_r1_shift * FF(4294967296UL))) + - (alu_u16_r2_shift * FF(281474976710656UL))) + - ((((alu_u16_r3_shift + (alu_u16_r4_shift * FF(65536))) + (alu_u16_r5_shift * FF(4294967296UL))) + - (alu_u16_r6_shift * FF(281474976710656UL))) * - FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) - - alu_ib)) - - FF(0)); + ((alu_u128_tag * alu_op_mul) * + ((((((alu_u8_r0_shift + (alu_u8_r1_shift * FF(256))) + (alu_u16_r0_shift * FF(65536))) + + (alu_u16_r1_shift * FF(4294967296UL))) + + (alu_u16_r2_shift * FF(281474976710656UL))) + + ((((alu_u16_r3_shift + (alu_u16_r4_shift * FF(65536))) + (alu_u16_r5_shift * FF(4294967296UL))) + + (alu_u16_r6_shift * FF(281474976710656UL))) * + FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) - + alu_ib)); tmp *= scaling_factor; std::get<18>(evals) += tmp; } @@ -521,22 +514,21 @@ template class aluImpl { Avm_DECLARE_VIEWS(19); auto tmp = - (((alu_u128_tag * alu_op_mul) * - ((((alu_ia * ((((alu_u8_r0_shift + (alu_u8_r1_shift * FF(256))) + (alu_u16_r0_shift * FF(65536))) + - (alu_u16_r1_shift * FF(4294967296UL))) + - (alu_u16_r2_shift * FF(281474976710656UL)))) + - ((((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + - (alu_u16_r1 * FF(4294967296UL))) + - (alu_u16_r2 * FF(281474976710656UL))) * - (((alu_u16_r3_shift + (alu_u16_r4_shift * FF(65536))) + (alu_u16_r5_shift * FF(4294967296UL))) + - (alu_u16_r6_shift * FF(281474976710656UL)))) * - FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) - - (((alu_cf * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL })) + - (((alu_u16_r7 + (alu_u16_r8 * FF(65536))) + (alu_u16_r9 * FF(4294967296UL))) + - (alu_u16_r10 * FF(281474976710656UL)))) * - FF(uint256_t{ 0UL, 0UL, 1UL, 0UL }))) - - alu_ic)) - - FF(0)); + ((alu_u128_tag * alu_op_mul) * + ((((alu_ia * ((((alu_u8_r0_shift + (alu_u8_r1_shift * FF(256))) + (alu_u16_r0_shift * FF(65536))) + + (alu_u16_r1_shift * FF(4294967296UL))) + + (alu_u16_r2_shift * FF(281474976710656UL)))) + + ((((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + + (alu_u16_r1 * FF(4294967296UL))) + + (alu_u16_r2 * FF(281474976710656UL))) * + (((alu_u16_r3_shift + (alu_u16_r4_shift * FF(65536))) + (alu_u16_r5_shift * FF(4294967296UL))) + + (alu_u16_r6_shift * FF(281474976710656UL)))) * + FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) - + (((alu_cf * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL })) + + (((alu_u16_r7 + (alu_u16_r8 * FF(65536))) + (alu_u16_r9 * FF(4294967296UL))) + + (alu_u16_r10 * FF(281474976710656UL)))) * + FF(uint256_t{ 0UL, 0UL, 1UL, 0UL }))) - + alu_ic)); tmp *= scaling_factor; std::get<19>(evals) += tmp; } @@ -544,7 +536,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(20); - auto tmp = ((alu_op_not * alu_ff_tag) - FF(0)); + auto tmp = (alu_op_not * alu_ff_tag); tmp *= scaling_factor; std::get<20>(evals) += tmp; } @@ -552,12 +544,12 @@ template class aluImpl { { Avm_DECLARE_VIEWS(21); - auto tmp = ((alu_op_not * ((alu_ia + alu_ic) - ((((((alu_u8_tag * FF(256)) + (alu_u16_tag * FF(65536))) + - (alu_u32_tag * FF(4294967296UL))) + - (alu_u64_tag * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) + - (alu_u128_tag * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL }))) - - FF(1)))) - - FF(0)); + auto tmp = (alu_op_not * + ((alu_ia + alu_ic) - + ((((((alu_u8_tag * FF(256)) + (alu_u16_tag * FF(65536))) + (alu_u32_tag * FF(4294967296UL))) + + (alu_u64_tag * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) + + (alu_u128_tag * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL }))) - + FF(1)))); tmp *= scaling_factor; std::get<21>(evals) += tmp; } @@ -565,7 +557,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(22); - auto tmp = (((alu_sel_cmp + alu_op_eq) * (alu_ic * (-alu_ic + FF(1)))) - FF(0)); + auto tmp = ((alu_sel_cmp + alu_op_eq) * (alu_ic * (-alu_ic + FF(1)))); tmp *= scaling_factor; std::get<22>(evals) += tmp; } @@ -574,10 +566,9 @@ template class aluImpl { Avm_DECLARE_VIEWS(23); auto tmp = - ((alu_op_eq * - ((((alu_ia - alu_ib) * ((alu_ic * (-alu_op_eq_diff_inv + FF(1))) + alu_op_eq_diff_inv)) - FF(1)) + - alu_ic)) - - FF(0)); + (alu_op_eq * + ((((alu_ia - alu_ib) * ((alu_ic * (-alu_op_eq_diff_inv + FF(1))) + alu_op_eq_diff_inv)) - FF(1)) + + alu_ic)); tmp *= scaling_factor; std::get<23>(evals) += tmp; } @@ -603,7 +594,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(26); - auto tmp = ((alu_p_a_borrow * (-alu_p_a_borrow + FF(1))) - FF(0)); + auto tmp = (alu_p_a_borrow * (-alu_p_a_borrow + FF(1))); tmp *= scaling_factor; std::get<26>(evals) += tmp; } @@ -611,11 +602,10 @@ template class aluImpl { { Avm_DECLARE_VIEWS(27); - auto tmp = (((alu_p_sub_a_lo - - ((-alu_a_lo + FF(uint256_t{ 4891460686036598784UL, 2896914383306846353UL, 0UL, 0UL })) + - (alu_p_a_borrow * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL })))) * - ((alu_sel_cmp + alu_op_cast) + alu_op_div_std)) - - FF(0)); + auto tmp = ((alu_p_sub_a_lo - + ((-alu_a_lo + FF(uint256_t{ 4891460686036598784UL, 2896914383306846353UL, 0UL, 0UL })) + + (alu_p_a_borrow * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL })))) * + ((alu_sel_cmp + alu_op_cast) + alu_op_div_std)); tmp *= scaling_factor; std::get<27>(evals) += tmp; } @@ -623,11 +613,10 @@ template class aluImpl { { Avm_DECLARE_VIEWS(28); - auto tmp = (((alu_p_sub_a_hi - - ((-alu_a_hi + FF(uint256_t{ 13281191951274694749UL, 3486998266802970665UL, 0UL, 0UL })) - - alu_p_a_borrow)) * - ((alu_sel_cmp + alu_op_cast) + alu_op_div_std)) - - FF(0)); + auto tmp = ((alu_p_sub_a_hi - + ((-alu_a_hi + FF(uint256_t{ 13281191951274694749UL, 3486998266802970665UL, 0UL, 0UL })) - + alu_p_a_borrow)) * + ((alu_sel_cmp + alu_op_cast) + alu_op_div_std)); tmp *= scaling_factor; std::get<28>(evals) += tmp; } @@ -635,7 +624,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(29); - auto tmp = ((alu_p_b_borrow * (-alu_p_b_borrow + FF(1))) - FF(0)); + auto tmp = (alu_p_b_borrow * (-alu_p_b_borrow + FF(1))); tmp *= scaling_factor; std::get<29>(evals) += tmp; } @@ -643,11 +632,10 @@ template class aluImpl { { Avm_DECLARE_VIEWS(30); - auto tmp = (((alu_p_sub_b_lo - - ((-alu_b_lo + FF(uint256_t{ 4891460686036598784UL, 2896914383306846353UL, 0UL, 0UL })) + - (alu_p_b_borrow * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL })))) * - alu_sel_cmp) - - FF(0)); + auto tmp = ((alu_p_sub_b_lo - + ((-alu_b_lo + FF(uint256_t{ 4891460686036598784UL, 2896914383306846353UL, 0UL, 0UL })) + + (alu_p_b_borrow * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL })))) * + alu_sel_cmp); tmp *= scaling_factor; std::get<30>(evals) += tmp; } @@ -655,11 +643,10 @@ template class aluImpl { { Avm_DECLARE_VIEWS(31); - auto tmp = (((alu_p_sub_b_hi - - ((-alu_b_hi + FF(uint256_t{ 13281191951274694749UL, 3486998266802970665UL, 0UL, 0UL })) - - alu_p_b_borrow)) * - alu_sel_cmp) - - FF(0)); + auto tmp = ((alu_p_sub_b_hi - + ((-alu_b_hi + FF(uint256_t{ 13281191951274694749UL, 3486998266802970665UL, 0UL, 0UL })) - + alu_p_b_borrow)) * + alu_sel_cmp); tmp *= scaling_factor; std::get<31>(evals) += tmp; } @@ -667,13 +654,12 @@ template class aluImpl { { Avm_DECLARE_VIEWS(32); - auto tmp = (((alu_res_lo - - (((((alu_a_lo - alu_b_lo) - FF(1)) + (alu_borrow * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL }))) * - ((alu_op_lt * alu_ic) + ((-alu_ic + FF(1)) * alu_op_lte))) + - (((alu_b_lo - alu_a_lo) + (alu_borrow * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL }))) * - (-((alu_op_lt * alu_ic) + ((-alu_ic + FF(1)) * alu_op_lte)) + FF(1))))) * - alu_sel_cmp) - - FF(0)); + auto tmp = ((alu_res_lo - + (((((alu_a_lo - alu_b_lo) - FF(1)) + (alu_borrow * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL }))) * + ((alu_op_lt * alu_ic) + ((-alu_ic + FF(1)) * alu_op_lte))) + + (((alu_b_lo - alu_a_lo) + (alu_borrow * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL }))) * + (-((alu_op_lt * alu_ic) + ((-alu_ic + FF(1)) * alu_op_lte)) + FF(1))))) * + alu_sel_cmp); tmp *= scaling_factor; std::get<32>(evals) += tmp; } @@ -682,12 +668,11 @@ template class aluImpl { Avm_DECLARE_VIEWS(33); auto tmp = - (((alu_res_hi - - ((((alu_a_hi - alu_b_hi) - alu_borrow) * ((alu_op_lt * alu_ic) + ((-alu_ic + FF(1)) * alu_op_lte))) + - (((alu_b_hi - alu_a_hi) - alu_borrow) * - (-((alu_op_lt * alu_ic) + ((-alu_ic + FF(1)) * alu_op_lte)) + FF(1))))) * - alu_sel_cmp) - - FF(0)); + ((alu_res_hi - + ((((alu_a_hi - alu_b_hi) - alu_borrow) * ((alu_op_lt * alu_ic) + ((-alu_ic + FF(1)) * alu_op_lte))) + + (((alu_b_hi - alu_a_hi) - alu_borrow) * + (-((alu_op_lt * alu_ic) + ((-alu_ic + FF(1)) * alu_op_lte)) + FF(1))))) * + alu_sel_cmp); tmp *= scaling_factor; std::get<33>(evals) += tmp; } @@ -695,7 +680,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(34); - auto tmp = ((((alu_cmp_rng_ctr_shift - alu_cmp_rng_ctr) + FF(1)) * alu_cmp_rng_ctr) - FF(0)); + auto tmp = (((alu_cmp_rng_ctr_shift - alu_cmp_rng_ctr) + FF(1)) * alu_cmp_rng_ctr); tmp *= scaling_factor; std::get<34>(evals) += tmp; } @@ -703,7 +688,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(35); - auto tmp = (((alu_cmp_rng_ctr_shift - FF(4)) * alu_sel_cmp) - FF(0)); + auto tmp = ((alu_cmp_rng_ctr_shift - FF(4)) * alu_sel_cmp); tmp *= scaling_factor; std::get<35>(evals) += tmp; } @@ -711,7 +696,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(36); - auto tmp = ((alu_sel_rng_chk * (-alu_sel_rng_chk + FF(1))) - FF(0)); + auto tmp = (alu_sel_rng_chk * (-alu_sel_rng_chk + FF(1))); tmp *= scaling_factor; std::get<36>(evals) += tmp; } @@ -719,7 +704,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(37); - auto tmp = ((alu_sel_rng_chk * alu_sel_cmp) - FF(0)); + auto tmp = (alu_sel_rng_chk * alu_sel_cmp); tmp *= scaling_factor; std::get<37>(evals) += tmp; } @@ -727,10 +712,9 @@ template class aluImpl { { Avm_DECLARE_VIEWS(38); - auto tmp = (((alu_cmp_rng_ctr * - (((-alu_sel_rng_chk + FF(1)) * (-alu_op_eq_diff_inv + FF(1))) + alu_op_eq_diff_inv)) - - alu_sel_rng_chk) - - FF(0)); + auto tmp = ((alu_cmp_rng_ctr * + (((-alu_sel_rng_chk + FF(1)) * (-alu_op_eq_diff_inv + FF(1))) + alu_op_eq_diff_inv)) - + alu_sel_rng_chk); tmp *= scaling_factor; std::get<38>(evals) += tmp; } @@ -789,7 +773,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(42); - auto tmp = (((alu_a_lo_shift - alu_b_lo) * alu_sel_rng_chk_shift) - FF(0)); + auto tmp = ((alu_a_lo_shift - alu_b_lo) * alu_sel_rng_chk_shift); tmp *= scaling_factor; std::get<42>(evals) += tmp; } @@ -797,7 +781,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(43); - auto tmp = (((alu_a_hi_shift - alu_b_hi) * alu_sel_rng_chk_shift) - FF(0)); + auto tmp = ((alu_a_hi_shift - alu_b_hi) * alu_sel_rng_chk_shift); tmp *= scaling_factor; std::get<43>(evals) += tmp; } @@ -805,7 +789,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(44); - auto tmp = (((alu_b_lo_shift - alu_p_sub_a_lo) * alu_sel_rng_chk_shift) - FF(0)); + auto tmp = ((alu_b_lo_shift - alu_p_sub_a_lo) * alu_sel_rng_chk_shift); tmp *= scaling_factor; std::get<44>(evals) += tmp; } @@ -813,7 +797,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(45); - auto tmp = (((alu_b_hi_shift - alu_p_sub_a_hi) * alu_sel_rng_chk_shift) - FF(0)); + auto tmp = ((alu_b_hi_shift - alu_p_sub_a_hi) * alu_sel_rng_chk_shift); tmp *= scaling_factor; std::get<45>(evals) += tmp; } @@ -821,7 +805,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(46); - auto tmp = (((alu_p_sub_a_lo_shift - alu_p_sub_b_lo) * alu_sel_rng_chk_shift) - FF(0)); + auto tmp = ((alu_p_sub_a_lo_shift - alu_p_sub_b_lo) * alu_sel_rng_chk_shift); tmp *= scaling_factor; std::get<46>(evals) += tmp; } @@ -829,7 +813,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(47); - auto tmp = (((alu_p_sub_a_hi_shift - alu_p_sub_b_hi) * alu_sel_rng_chk_shift) - FF(0)); + auto tmp = ((alu_p_sub_a_hi_shift - alu_p_sub_b_hi) * alu_sel_rng_chk_shift); tmp *= scaling_factor; std::get<47>(evals) += tmp; } @@ -837,7 +821,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(48); - auto tmp = (((alu_p_sub_b_lo_shift - alu_res_lo) * alu_sel_rng_chk_shift) - FF(0)); + auto tmp = ((alu_p_sub_b_lo_shift - alu_res_lo) * alu_sel_rng_chk_shift); tmp *= scaling_factor; std::get<48>(evals) += tmp; } @@ -845,7 +829,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(49); - auto tmp = (((alu_p_sub_b_hi_shift - alu_res_hi) * alu_sel_rng_chk_shift) - FF(0)); + auto tmp = ((alu_p_sub_b_hi_shift - alu_res_hi) * alu_sel_rng_chk_shift); tmp *= scaling_factor; std::get<49>(evals) += tmp; } @@ -861,22 +845,21 @@ template class aluImpl { { Avm_DECLARE_VIEWS(51); - auto tmp = ((alu_op_cast * - (((((((alu_u8_tag * alu_u8_r0) + (alu_u16_tag * (alu_u8_r0 + (alu_u8_r1 * FF(256))))) + - (alu_u32_tag * ((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))))) + - (alu_u64_tag * ((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + - (alu_u16_r1 * FF(4294967296UL))) + - (alu_u16_r2 * FF(281474976710656UL))))) + - (alu_u128_tag * ((((((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + - (alu_u16_r1 * FF(4294967296UL))) + - (alu_u16_r2 * FF(281474976710656UL))) + - (alu_u16_r3 * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) + - (alu_u16_r4 * FF(uint256_t{ 0UL, 65536UL, 0UL, 0UL }))) + - (alu_u16_r5 * FF(uint256_t{ 0UL, 4294967296UL, 0UL, 0UL }))) + - (alu_u16_r6 * FF(uint256_t{ 0UL, 281474976710656UL, 0UL, 0UL }))))) + - (alu_ff_tag * alu_ia)) - - alu_ic)) - - FF(0)); + auto tmp = (alu_op_cast * + (((((((alu_u8_tag * alu_u8_r0) + (alu_u16_tag * (alu_u8_r0 + (alu_u8_r1 * FF(256))))) + + (alu_u32_tag * ((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))))) + + (alu_u64_tag * ((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + + (alu_u16_r1 * FF(4294967296UL))) + + (alu_u16_r2 * FF(281474976710656UL))))) + + (alu_u128_tag * ((((((((alu_u8_r0 + (alu_u8_r1 * FF(256))) + (alu_u16_r0 * FF(65536))) + + (alu_u16_r1 * FF(4294967296UL))) + + (alu_u16_r2 * FF(281474976710656UL))) + + (alu_u16_r3 * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) + + (alu_u16_r4 * FF(uint256_t{ 0UL, 65536UL, 0UL, 0UL }))) + + (alu_u16_r5 * FF(uint256_t{ 0UL, 4294967296UL, 0UL, 0UL }))) + + (alu_u16_r6 * FF(uint256_t{ 0UL, 281474976710656UL, 0UL, 0UL }))))) + + (alu_ff_tag * alu_ia)) - + alu_ic)); tmp *= scaling_factor; std::get<51>(evals) += tmp; } @@ -884,7 +867,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(52); - auto tmp = ((alu_op_cast * (alu_a_lo_shift - alu_p_sub_a_lo)) - FF(0)); + auto tmp = (alu_op_cast * (alu_a_lo_shift - alu_p_sub_a_lo)); tmp *= scaling_factor; std::get<52>(evals) += tmp; } @@ -892,7 +875,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(53); - auto tmp = ((alu_op_cast * (alu_a_hi_shift - alu_p_sub_a_hi)) - FF(0)); + auto tmp = (alu_op_cast * (alu_a_hi_shift - alu_p_sub_a_hi)); tmp *= scaling_factor; std::get<53>(evals) += tmp; } @@ -900,7 +883,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(54); - auto tmp = ((((alu_op_mul * alu_u128_tag) + alu_op_cast) * alu_sel_alu_shift) - FF(0)); + auto tmp = (((alu_op_mul * alu_u128_tag) + alu_op_cast) * alu_sel_alu_shift); tmp *= scaling_factor; std::get<54>(evals) += tmp; } @@ -908,8 +891,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(55); - auto tmp = - (((alu_shift_lt_bit_len * alu_op_shr) * (alu_a_lo - ((alu_two_pow_s - alu_b_lo) - FF(1)))) - FF(0)); + auto tmp = ((alu_shift_lt_bit_len * alu_op_shr) * (alu_a_lo - ((alu_two_pow_s - alu_b_lo) - FF(1)))); tmp *= scaling_factor; std::get<55>(evals) += tmp; } @@ -917,9 +899,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(56); - auto tmp = - (((alu_shift_lt_bit_len * alu_op_shr) * (alu_a_hi - ((alu_two_pow_t_sub_s - alu_b_hi) - FF(1)))) - - FF(0)); + auto tmp = ((alu_shift_lt_bit_len * alu_op_shr) * (alu_a_hi - ((alu_two_pow_t_sub_s - alu_b_hi) - FF(1)))); tmp *= scaling_factor; std::get<56>(evals) += tmp; } @@ -927,9 +907,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(57); - auto tmp = - (((alu_shift_lt_bit_len * alu_op_shl) * (alu_a_lo - ((alu_two_pow_t_sub_s - alu_b_lo) - FF(1)))) - - FF(0)); + auto tmp = ((alu_shift_lt_bit_len * alu_op_shl) * (alu_a_lo - ((alu_two_pow_t_sub_s - alu_b_lo) - FF(1)))); tmp *= scaling_factor; std::get<57>(evals) += tmp; } @@ -937,8 +915,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(58); - auto tmp = - (((alu_shift_lt_bit_len * alu_op_shl) * (alu_a_hi - ((alu_two_pow_s - alu_b_hi) - FF(1)))) - FF(0)); + auto tmp = ((alu_shift_lt_bit_len * alu_op_shl) * (alu_a_hi - ((alu_two_pow_s - alu_b_hi) - FF(1)))); tmp *= scaling_factor; std::get<58>(evals) += tmp; } @@ -946,7 +923,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(59); - auto tmp = ((alu_shift_lt_bit_len * (-alu_shift_lt_bit_len + FF(1))) - FF(0)); + auto tmp = (alu_shift_lt_bit_len * (-alu_shift_lt_bit_len + FF(1))); tmp *= scaling_factor; std::get<59>(evals) += tmp; } @@ -972,8 +949,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(61); - auto tmp = - (((alu_shift_lt_bit_len * alu_op_shr) * (((alu_b_hi * alu_two_pow_s) + alu_b_lo) - alu_ia)) - FF(0)); + auto tmp = ((alu_shift_lt_bit_len * alu_op_shr) * (((alu_b_hi * alu_two_pow_s) + alu_b_lo) - alu_ia)); tmp *= scaling_factor; std::get<61>(evals) += tmp; } @@ -981,7 +957,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(62); - auto tmp = ((alu_op_shr * (alu_ic - (alu_b_hi * alu_shift_lt_bit_len))) - FF(0)); + auto tmp = (alu_op_shr * (alu_ic - (alu_b_hi * alu_shift_lt_bit_len))); tmp *= scaling_factor; std::get<62>(evals) += tmp; } @@ -989,9 +965,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(63); - auto tmp = - (((alu_shift_lt_bit_len * alu_op_shl) * (((alu_b_hi * alu_two_pow_t_sub_s) + alu_b_lo) - alu_ia)) - - FF(0)); + auto tmp = ((alu_shift_lt_bit_len * alu_op_shl) * (((alu_b_hi * alu_two_pow_t_sub_s) + alu_b_lo) - alu_ia)); tmp *= scaling_factor; std::get<63>(evals) += tmp; } @@ -999,7 +973,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(64); - auto tmp = ((alu_op_shl * (alu_ic - ((alu_b_lo * alu_two_pow_s) * alu_shift_lt_bit_len))) - FF(0)); + auto tmp = (alu_op_shl * (alu_ic - ((alu_b_lo * alu_two_pow_s) * alu_shift_lt_bit_len))); tmp *= scaling_factor; std::get<64>(evals) += tmp; } @@ -1015,7 +989,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(66); - auto tmp = ((alu_op_div_a_lt_b * (-alu_op_div_a_lt_b + FF(1))) - FF(0)); + auto tmp = (alu_op_div_a_lt_b * (-alu_op_div_a_lt_b + FF(1))); tmp *= scaling_factor; std::get<66>(evals) += tmp; } @@ -1023,7 +997,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(67); - auto tmp = ((alu_op_div_a_lt_b * (alu_a_lo - ((alu_ib - alu_ia) - FF(1)))) - FF(0)); + auto tmp = (alu_op_div_a_lt_b * (alu_a_lo - ((alu_ib - alu_ia) - FF(1)))); tmp *= scaling_factor; std::get<67>(evals) += tmp; } @@ -1031,7 +1005,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(68); - auto tmp = ((alu_op_div_a_lt_b * alu_ic) - FF(0)); + auto tmp = (alu_op_div_a_lt_b * alu_ic); tmp *= scaling_factor; std::get<68>(evals) += tmp; } @@ -1039,7 +1013,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(69); - auto tmp = ((alu_op_div_a_lt_b * (alu_ia - alu_remainder)) - FF(0)); + auto tmp = (alu_op_div_a_lt_b * (alu_ia - alu_remainder)); tmp *= scaling_factor; std::get<69>(evals) += tmp; } @@ -1047,7 +1021,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(70); - auto tmp = ((alu_op_div_std * (-alu_op_div_std + FF(1))) - FF(0)); + auto tmp = (alu_op_div_std * (-alu_op_div_std + FF(1))); tmp *= scaling_factor; std::get<70>(evals) += tmp; } @@ -1055,9 +1029,8 @@ template class aluImpl { { Avm_DECLARE_VIEWS(71); - auto tmp = ((alu_op_div_std * - ((alu_ib - alu_divisor_lo) - (alu_divisor_hi * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL })))) - - FF(0)); + auto tmp = + (alu_op_div_std * ((alu_ib - alu_divisor_lo) - (alu_divisor_hi * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL })))); tmp *= scaling_factor; std::get<71>(evals) += tmp; } @@ -1065,9 +1038,8 @@ template class aluImpl { { Avm_DECLARE_VIEWS(72); - auto tmp = ((alu_op_div_std * - ((alu_ic - alu_quotient_lo) - (alu_quotient_hi * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL })))) - - FF(0)); + auto tmp = (alu_op_div_std * + ((alu_ic - alu_quotient_lo) - (alu_quotient_hi * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL })))); tmp *= scaling_factor; std::get<72>(evals) += tmp; } @@ -1085,12 +1057,10 @@ template class aluImpl { Avm_DECLARE_VIEWS(74); auto tmp = - ((alu_op_div_std * - ((((alu_divisor_lo * alu_quotient_lo) + (alu_partial_prod_lo * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) + - ((alu_partial_prod_hi + (alu_divisor_hi * alu_quotient_hi)) * - FF(uint256_t{ 0UL, 0UL, 1UL, 0UL }))) - - (alu_a_lo + (alu_a_hi * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL }))))) - - FF(0)); + (alu_op_div_std * + ((((alu_divisor_lo * alu_quotient_lo) + (alu_partial_prod_lo * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) + + ((alu_partial_prod_hi + (alu_divisor_hi * alu_quotient_hi)) * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL }))) - + (alu_a_lo + (alu_a_hi * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL }))))); tmp *= scaling_factor; std::get<74>(evals) += tmp; } @@ -1098,7 +1068,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(75); - auto tmp = ((alu_op_div_std * (alu_b_hi - ((alu_ib - alu_remainder) - FF(1)))) - FF(0)); + auto tmp = (alu_op_div_std * (alu_b_hi - ((alu_ib - alu_remainder) - FF(1)))); tmp *= scaling_factor; std::get<75>(evals) += tmp; } @@ -1106,7 +1076,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(76); - auto tmp = (((alu_cmp_rng_ctr_shift - FF(2)) * alu_op_div_std) - FF(0)); + auto tmp = ((alu_cmp_rng_ctr_shift - FF(2)) * alu_op_div_std); tmp *= scaling_factor; std::get<76>(evals) += tmp; } @@ -1114,7 +1084,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(77); - auto tmp = ((alu_sel_rng_chk * alu_op_div_std) - FF(0)); + auto tmp = (alu_sel_rng_chk * alu_op_div_std); tmp *= scaling_factor; std::get<77>(evals) += tmp; } @@ -1123,12 +1093,10 @@ template class aluImpl { Avm_DECLARE_VIEWS(78); auto tmp = - ((alu_op_div_std * - ((((alu_divisor_lo * alu_quotient_lo) + (alu_partial_prod_lo * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) + - ((alu_partial_prod_hi + (alu_divisor_hi * alu_quotient_hi)) * - FF(uint256_t{ 0UL, 0UL, 1UL, 0UL }))) - - (alu_ia - alu_remainder))) - - FF(0)); + (alu_op_div_std * + ((((alu_divisor_lo * alu_quotient_lo) + (alu_partial_prod_lo * FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }))) + + ((alu_partial_prod_hi + (alu_divisor_hi * alu_quotient_hi)) * FF(uint256_t{ 0UL, 0UL, 1UL, 0UL }))) - + (alu_ia - alu_remainder))); tmp *= scaling_factor; std::get<78>(evals) += tmp; } @@ -1136,7 +1104,7 @@ template class aluImpl { { Avm_DECLARE_VIEWS(79); - auto tmp = ((alu_sel_div_rng_chk * (-alu_sel_div_rng_chk + FF(1))) - FF(0)); + auto tmp = (alu_sel_div_rng_chk * (-alu_sel_div_rng_chk + FF(1))); tmp *= scaling_factor; std::get<79>(evals) += tmp; } diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/binary.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/binary.hpp index 615e12a21c9..98260f37337 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/binary.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/binary.hpp @@ -69,7 +69,7 @@ template class binaryImpl { { Avm_DECLARE_VIEWS(0); - auto tmp = ((binary_sel_bin * (-binary_sel_bin + FF(1))) - FF(0)); + auto tmp = (binary_sel_bin * (-binary_sel_bin + FF(1))); tmp *= scaling_factor; std::get<0>(evals) += tmp; } @@ -77,7 +77,7 @@ template class binaryImpl { { Avm_DECLARE_VIEWS(1); - auto tmp = (((binary_op_id_shift - binary_op_id) * binary_mem_tag_ctr) - FF(0)); + auto tmp = ((binary_op_id_shift - binary_op_id) * binary_mem_tag_ctr); tmp *= scaling_factor; std::get<1>(evals) += tmp; } @@ -85,7 +85,7 @@ template class binaryImpl { { Avm_DECLARE_VIEWS(2); - auto tmp = ((((binary_mem_tag_ctr_shift - binary_mem_tag_ctr) + FF(1)) * binary_mem_tag_ctr) - FF(0)); + auto tmp = (((binary_mem_tag_ctr_shift - binary_mem_tag_ctr) + FF(1)) * binary_mem_tag_ctr); tmp *= scaling_factor; std::get<2>(evals) += tmp; } @@ -93,10 +93,9 @@ template class binaryImpl { { Avm_DECLARE_VIEWS(3); - auto tmp = (((binary_mem_tag_ctr * - (((-binary_sel_bin + FF(1)) * (-binary_mem_tag_ctr_inv + FF(1))) + binary_mem_tag_ctr_inv)) - - binary_sel_bin) - - FF(0)); + auto tmp = ((binary_mem_tag_ctr * + (((-binary_sel_bin + FF(1)) * (-binary_mem_tag_ctr_inv + FF(1))) + binary_mem_tag_ctr_inv)) - + binary_sel_bin); tmp *= scaling_factor; std::get<3>(evals) += tmp; } @@ -104,7 +103,7 @@ template class binaryImpl { { Avm_DECLARE_VIEWS(4); - auto tmp = (((-binary_sel_bin + FF(1)) * binary_acc_ia) - FF(0)); + auto tmp = ((-binary_sel_bin + FF(1)) * binary_acc_ia); tmp *= scaling_factor; std::get<4>(evals) += tmp; } @@ -112,7 +111,7 @@ template class binaryImpl { { Avm_DECLARE_VIEWS(5); - auto tmp = (((-binary_sel_bin + FF(1)) * binary_acc_ib) - FF(0)); + auto tmp = ((-binary_sel_bin + FF(1)) * binary_acc_ib); tmp *= scaling_factor; std::get<5>(evals) += tmp; } @@ -120,7 +119,7 @@ template class binaryImpl { { Avm_DECLARE_VIEWS(6); - auto tmp = (((-binary_sel_bin + FF(1)) * binary_acc_ic) - FF(0)); + auto tmp = ((-binary_sel_bin + FF(1)) * binary_acc_ic); tmp *= scaling_factor; std::get<6>(evals) += tmp; } @@ -128,8 +127,7 @@ template class binaryImpl { { Avm_DECLARE_VIEWS(7); - auto tmp = - ((((binary_acc_ia - binary_ia_bytes) - (binary_acc_ia_shift * FF(256))) * binary_mem_tag_ctr) - FF(0)); + auto tmp = (((binary_acc_ia - binary_ia_bytes) - (binary_acc_ia_shift * FF(256))) * binary_mem_tag_ctr); tmp *= scaling_factor; std::get<7>(evals) += tmp; } @@ -137,8 +135,7 @@ template class binaryImpl { { Avm_DECLARE_VIEWS(8); - auto tmp = - ((((binary_acc_ib - binary_ib_bytes) - (binary_acc_ib_shift * FF(256))) * binary_mem_tag_ctr) - FF(0)); + auto tmp = (((binary_acc_ib - binary_ib_bytes) - (binary_acc_ib_shift * FF(256))) * binary_mem_tag_ctr); tmp *= scaling_factor; std::get<8>(evals) += tmp; } @@ -146,8 +143,7 @@ template class binaryImpl { { Avm_DECLARE_VIEWS(9); - auto tmp = - ((((binary_acc_ic - binary_ic_bytes) - (binary_acc_ic_shift * FF(256))) * binary_mem_tag_ctr) - FF(0)); + auto tmp = (((binary_acc_ic - binary_ic_bytes) - (binary_acc_ic_shift * FF(256))) * binary_mem_tag_ctr); tmp *= scaling_factor; std::get<9>(evals) += tmp; } diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/conversion.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/conversion.hpp index a51605c8f18..b83fb6bf7ac 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/conversion.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/conversion.hpp @@ -37,7 +37,7 @@ template class conversionImpl { { Avm_DECLARE_VIEWS(0); - auto tmp = ((conversion_sel_to_radix_le * (-conversion_sel_to_radix_le + FF(1))) - FF(0)); + auto tmp = (conversion_sel_to_radix_le * (-conversion_sel_to_radix_le + FF(1))); tmp *= scaling_factor; std::get<0>(evals) += tmp; } diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/gas.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/gas.hpp index 7c69045c001..a5e2adfe5a0 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/gas.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/gas.hpp @@ -41,7 +41,7 @@ template class gasImpl { { Avm_DECLARE_VIEWS(0); - auto tmp = ((gas_sel_gas_cost - gas_sel_gas_cost) - FF(0)); + auto tmp = (gas_sel_gas_cost - gas_sel_gas_cost); tmp *= scaling_factor; std::get<0>(evals) += tmp; } @@ -49,7 +49,7 @@ template class gasImpl { { Avm_DECLARE_VIEWS(1); - auto tmp = ((gas_l2_gas_fixed_table - gas_l2_gas_fixed_table) - FF(0)); + auto tmp = (gas_l2_gas_fixed_table - gas_l2_gas_fixed_table); tmp *= scaling_factor; std::get<1>(evals) += tmp; } @@ -57,7 +57,7 @@ template class gasImpl { { Avm_DECLARE_VIEWS(2); - auto tmp = ((gas_da_gas_fixed_table - gas_da_gas_fixed_table) - FF(0)); + auto tmp = (gas_da_gas_fixed_table - gas_da_gas_fixed_table); tmp *= scaling_factor; std::get<2>(evals) += tmp; } diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/keccakf1600.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/keccakf1600.hpp index 18989c0e836..56e0a9e6a5d 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/keccakf1600.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/keccakf1600.hpp @@ -37,7 +37,7 @@ template class keccakf1600Impl { { Avm_DECLARE_VIEWS(0); - auto tmp = ((keccakf1600_sel_keccakf1600 * (-keccakf1600_sel_keccakf1600 + FF(1))) - FF(0)); + auto tmp = (keccakf1600_sel_keccakf1600 * (-keccakf1600_sel_keccakf1600 + FF(1))); tmp *= scaling_factor; std::get<0>(evals) += tmp; } diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/kernel.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/kernel.hpp index e9e0d0e1748..a53770f6481 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/kernel.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/kernel.hpp @@ -98,9 +98,8 @@ template class kernelImpl { Avm_DECLARE_VIEWS(0); auto tmp = - (((-main_sel_last + FF(1)) * (kernel_note_hash_exist_write_offset_shift - - (kernel_note_hash_exist_write_offset + main_sel_op_note_hash_exists))) - - FF(0)); + ((-main_sel_last + FF(1)) * (kernel_note_hash_exist_write_offset_shift - + (kernel_note_hash_exist_write_offset + main_sel_op_note_hash_exists))); tmp *= scaling_factor; std::get<0>(evals) += tmp; } @@ -108,10 +107,8 @@ template class kernelImpl { { Avm_DECLARE_VIEWS(1); - auto tmp = - (((-main_sel_last + FF(1)) * (kernel_emit_note_hash_write_offset_shift - - (kernel_emit_note_hash_write_offset + main_sel_op_emit_note_hash))) - - FF(0)); + auto tmp = ((-main_sel_last + FF(1)) * (kernel_emit_note_hash_write_offset_shift - + (kernel_emit_note_hash_write_offset + main_sel_op_emit_note_hash))); tmp *= scaling_factor; std::get<1>(evals) += tmp; } @@ -119,10 +116,9 @@ template class kernelImpl { { Avm_DECLARE_VIEWS(2); - auto tmp = (((-main_sel_last + FF(1)) * - (kernel_nullifier_exists_write_offset_shift - - (kernel_nullifier_exists_write_offset + (main_sel_op_nullifier_exists * main_ib)))) - - FF(0)); + auto tmp = ((-main_sel_last + FF(1)) * + (kernel_nullifier_exists_write_offset_shift - + (kernel_nullifier_exists_write_offset + (main_sel_op_nullifier_exists * main_ib)))); tmp *= scaling_factor; std::get<2>(evals) += tmp; } @@ -131,10 +127,9 @@ template class kernelImpl { Avm_DECLARE_VIEWS(3); auto tmp = - (((-main_sel_last + FF(1)) * - (kernel_nullifier_non_exists_write_offset_shift - - (kernel_nullifier_non_exists_write_offset + (main_sel_op_nullifier_exists * (-main_ib + FF(1)))))) - - FF(0)); + ((-main_sel_last + FF(1)) * + (kernel_nullifier_non_exists_write_offset_shift - + (kernel_nullifier_non_exists_write_offset + (main_sel_op_nullifier_exists * (-main_ib + FF(1)))))); tmp *= scaling_factor; std::get<3>(evals) += tmp; } @@ -142,10 +137,8 @@ template class kernelImpl { { Avm_DECLARE_VIEWS(4); - auto tmp = - (((-main_sel_last + FF(1)) * (kernel_emit_nullifier_write_offset_shift - - (kernel_emit_nullifier_write_offset + main_sel_op_emit_nullifier))) - - FF(0)); + auto tmp = ((-main_sel_last + FF(1)) * (kernel_emit_nullifier_write_offset_shift - + (kernel_emit_nullifier_write_offset + main_sel_op_emit_nullifier))); tmp *= scaling_factor; std::get<4>(evals) += tmp; } @@ -153,10 +146,9 @@ template class kernelImpl { { Avm_DECLARE_VIEWS(5); - auto tmp = (((-main_sel_last + FF(1)) * - (kernel_l1_to_l2_msg_exists_write_offset_shift - - (kernel_l1_to_l2_msg_exists_write_offset + main_sel_op_l1_to_l2_msg_exists))) - - FF(0)); + auto tmp = ((-main_sel_last + FF(1)) * + (kernel_l1_to_l2_msg_exists_write_offset_shift - + (kernel_l1_to_l2_msg_exists_write_offset + main_sel_op_l1_to_l2_msg_exists))); tmp *= scaling_factor; std::get<5>(evals) += tmp; } @@ -164,10 +156,9 @@ template class kernelImpl { { Avm_DECLARE_VIEWS(6); - auto tmp = (((-main_sel_last + FF(1)) * - (kernel_emit_unencrypted_log_write_offset_shift - - (kernel_emit_unencrypted_log_write_offset + main_sel_op_emit_unencrypted_log))) - - FF(0)); + auto tmp = ((-main_sel_last + FF(1)) * + (kernel_emit_unencrypted_log_write_offset_shift - + (kernel_emit_unencrypted_log_write_offset + main_sel_op_emit_unencrypted_log))); tmp *= scaling_factor; std::get<6>(evals) += tmp; } @@ -175,10 +166,9 @@ template class kernelImpl { { Avm_DECLARE_VIEWS(7); - auto tmp = (((-main_sel_last + FF(1)) * - (kernel_emit_l2_to_l1_msg_write_offset_shift - - (kernel_emit_l2_to_l1_msg_write_offset + main_sel_op_emit_l2_to_l1_msg))) - - FF(0)); + auto tmp = + ((-main_sel_last + FF(1)) * (kernel_emit_l2_to_l1_msg_write_offset_shift - + (kernel_emit_l2_to_l1_msg_write_offset + main_sel_op_emit_l2_to_l1_msg))); tmp *= scaling_factor; std::get<7>(evals) += tmp; } @@ -186,9 +176,8 @@ template class kernelImpl { { Avm_DECLARE_VIEWS(8); - auto tmp = (((-main_sel_last + FF(1)) * - (kernel_sload_write_offset_shift - (kernel_sload_write_offset + main_sel_op_sload))) - - FF(0)); + auto tmp = ((-main_sel_last + FF(1)) * + (kernel_sload_write_offset_shift - (kernel_sload_write_offset + main_sel_op_sload))); tmp *= scaling_factor; std::get<8>(evals) += tmp; } @@ -196,9 +185,8 @@ template class kernelImpl { { Avm_DECLARE_VIEWS(9); - auto tmp = (((-main_sel_last + FF(1)) * - (kernel_sstore_write_offset_shift - (kernel_sstore_write_offset + main_sel_op_sstore))) - - FF(0)); + auto tmp = ((-main_sel_last + FF(1)) * + (kernel_sstore_write_offset_shift - (kernel_sstore_write_offset + main_sel_op_sstore))); tmp *= scaling_factor; std::get<9>(evals) += tmp; } diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/main.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/main.hpp index 1517e106ca7..360aa5af82b 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/main.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/main.hpp @@ -307,7 +307,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(0); - auto tmp = ((main_l2_out_of_gas * (-main_l2_out_of_gas + FF(1))) - FF(0)); + auto tmp = (main_l2_out_of_gas * (-main_l2_out_of_gas + FF(1))); tmp *= scaling_factor; std::get<0>(evals) += tmp; } @@ -315,7 +315,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(1); - auto tmp = ((main_da_out_of_gas * (-main_da_out_of_gas + FF(1))) - FF(0)); + auto tmp = (main_da_out_of_gas * (-main_da_out_of_gas + FF(1))); tmp *= scaling_factor; std::get<1>(evals) += tmp; } @@ -323,9 +323,8 @@ template class mainImpl { { Avm_DECLARE_VIEWS(2); - auto tmp = ((main_sel_gas_accounting_active * - ((main_l2_gas_remaining_shift - main_l2_gas_remaining) + main_l2_gas_op_cost)) - - FF(0)); + auto tmp = (main_sel_gas_accounting_active * + ((main_l2_gas_remaining_shift - main_l2_gas_remaining) + main_l2_gas_op_cost)); tmp *= scaling_factor; std::get<2>(evals) += tmp; } @@ -333,9 +332,8 @@ template class mainImpl { { Avm_DECLARE_VIEWS(3); - auto tmp = ((main_sel_gas_accounting_active * - ((main_da_gas_remaining_shift - main_da_gas_remaining) + main_da_gas_op_cost)) - - FF(0)); + auto tmp = (main_sel_gas_accounting_active * + ((main_da_gas_remaining_shift - main_da_gas_remaining) + main_da_gas_op_cost)); tmp *= scaling_factor; std::get<3>(evals) += tmp; } @@ -343,7 +341,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(4); - auto tmp = (((-main_sel_gas_accounting_active + FF(1)) * main_l2_gas_op_cost) - FF(0)); + auto tmp = ((-main_sel_gas_accounting_active + FF(1)) * main_l2_gas_op_cost); tmp *= scaling_factor; std::get<4>(evals) += tmp; } @@ -351,7 +349,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(5); - auto tmp = (((-main_sel_gas_accounting_active + FF(1)) * main_da_gas_op_cost) - FF(0)); + auto tmp = ((-main_sel_gas_accounting_active + FF(1)) * main_da_gas_op_cost); tmp *= scaling_factor; std::get<5>(evals) += tmp; } @@ -359,11 +357,10 @@ template class mainImpl { { Avm_DECLARE_VIEWS(6); - auto tmp = ((main_sel_gas_accounting_active * - ((((-(main_l2_out_of_gas * FF(2)) + FF(1)) * main_l2_gas_remaining_shift) - - (main_abs_l2_rem_gas_hi * FF(65536))) - - main_abs_l2_rem_gas_lo)) - - FF(0)); + auto tmp = (main_sel_gas_accounting_active * + ((((-(main_l2_out_of_gas * FF(2)) + FF(1)) * main_l2_gas_remaining_shift) - + (main_abs_l2_rem_gas_hi * FF(65536))) - + main_abs_l2_rem_gas_lo)); tmp *= scaling_factor; std::get<6>(evals) += tmp; } @@ -371,11 +368,10 @@ template class mainImpl { { Avm_DECLARE_VIEWS(7); - auto tmp = ((main_sel_gas_accounting_active * - ((((-(main_da_out_of_gas * FF(2)) + FF(1)) * main_da_gas_remaining_shift) - - (main_abs_da_rem_gas_hi * FF(65536))) - - main_abs_da_rem_gas_lo)) - - FF(0)); + auto tmp = (main_sel_gas_accounting_active * + ((((-(main_da_out_of_gas * FF(2)) + FF(1)) * main_da_gas_remaining_shift) - + (main_abs_da_rem_gas_hi * FF(65536))) - + main_abs_da_rem_gas_lo)); tmp *= scaling_factor; std::get<7>(evals) += tmp; } @@ -383,7 +379,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(8); - auto tmp = ((main_sel_op_sender * (-main_sel_op_sender + FF(1))) - FF(0)); + auto tmp = (main_sel_op_sender * (-main_sel_op_sender + FF(1))); tmp *= scaling_factor; std::get<8>(evals) += tmp; } @@ -391,7 +387,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(9); - auto tmp = ((main_sel_op_address * (-main_sel_op_address + FF(1))) - FF(0)); + auto tmp = (main_sel_op_address * (-main_sel_op_address + FF(1))); tmp *= scaling_factor; std::get<9>(evals) += tmp; } @@ -399,7 +395,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(10); - auto tmp = ((main_sel_op_storage_address * (-main_sel_op_storage_address + FF(1))) - FF(0)); + auto tmp = (main_sel_op_storage_address * (-main_sel_op_storage_address + FF(1))); tmp *= scaling_factor; std::get<10>(evals) += tmp; } @@ -407,7 +403,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(11); - auto tmp = ((main_sel_op_chain_id * (-main_sel_op_chain_id + FF(1))) - FF(0)); + auto tmp = (main_sel_op_chain_id * (-main_sel_op_chain_id + FF(1))); tmp *= scaling_factor; std::get<11>(evals) += tmp; } @@ -415,7 +411,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(12); - auto tmp = ((main_sel_op_version * (-main_sel_op_version + FF(1))) - FF(0)); + auto tmp = (main_sel_op_version * (-main_sel_op_version + FF(1))); tmp *= scaling_factor; std::get<12>(evals) += tmp; } @@ -423,7 +419,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(13); - auto tmp = ((main_sel_op_block_number * (-main_sel_op_block_number + FF(1))) - FF(0)); + auto tmp = (main_sel_op_block_number * (-main_sel_op_block_number + FF(1))); tmp *= scaling_factor; std::get<13>(evals) += tmp; } @@ -431,7 +427,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(14); - auto tmp = ((main_sel_op_coinbase * (-main_sel_op_coinbase + FF(1))) - FF(0)); + auto tmp = (main_sel_op_coinbase * (-main_sel_op_coinbase + FF(1))); tmp *= scaling_factor; std::get<14>(evals) += tmp; } @@ -439,7 +435,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(15); - auto tmp = ((main_sel_op_timestamp * (-main_sel_op_timestamp + FF(1))) - FF(0)); + auto tmp = (main_sel_op_timestamp * (-main_sel_op_timestamp + FF(1))); tmp *= scaling_factor; std::get<15>(evals) += tmp; } @@ -447,7 +443,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(16); - auto tmp = ((main_sel_op_fee_per_l2_gas * (-main_sel_op_fee_per_l2_gas + FF(1))) - FF(0)); + auto tmp = (main_sel_op_fee_per_l2_gas * (-main_sel_op_fee_per_l2_gas + FF(1))); tmp *= scaling_factor; std::get<16>(evals) += tmp; } @@ -455,7 +451,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(17); - auto tmp = ((main_sel_op_fee_per_da_gas * (-main_sel_op_fee_per_da_gas + FF(1))) - FF(0)); + auto tmp = (main_sel_op_fee_per_da_gas * (-main_sel_op_fee_per_da_gas + FF(1))); tmp *= scaling_factor; std::get<17>(evals) += tmp; } @@ -463,7 +459,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(18); - auto tmp = ((main_sel_op_transaction_fee * (-main_sel_op_transaction_fee + FF(1))) - FF(0)); + auto tmp = (main_sel_op_transaction_fee * (-main_sel_op_transaction_fee + FF(1))); tmp *= scaling_factor; std::get<18>(evals) += tmp; } @@ -471,7 +467,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(19); - auto tmp = ((main_sel_op_l2gasleft * (-main_sel_op_l2gasleft + FF(1))) - FF(0)); + auto tmp = (main_sel_op_l2gasleft * (-main_sel_op_l2gasleft + FF(1))); tmp *= scaling_factor; std::get<19>(evals) += tmp; } @@ -479,7 +475,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(20); - auto tmp = ((main_sel_op_dagasleft * (-main_sel_op_dagasleft + FF(1))) - FF(0)); + auto tmp = (main_sel_op_dagasleft * (-main_sel_op_dagasleft + FF(1))); tmp *= scaling_factor; std::get<20>(evals) += tmp; } @@ -487,7 +483,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(21); - auto tmp = ((main_sel_op_note_hash_exists * (-main_sel_op_note_hash_exists + FF(1))) - FF(0)); + auto tmp = (main_sel_op_note_hash_exists * (-main_sel_op_note_hash_exists + FF(1))); tmp *= scaling_factor; std::get<21>(evals) += tmp; } @@ -495,7 +491,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(22); - auto tmp = ((main_sel_op_emit_note_hash * (-main_sel_op_emit_note_hash + FF(1))) - FF(0)); + auto tmp = (main_sel_op_emit_note_hash * (-main_sel_op_emit_note_hash + FF(1))); tmp *= scaling_factor; std::get<22>(evals) += tmp; } @@ -503,7 +499,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(23); - auto tmp = ((main_sel_op_nullifier_exists * (-main_sel_op_nullifier_exists + FF(1))) - FF(0)); + auto tmp = (main_sel_op_nullifier_exists * (-main_sel_op_nullifier_exists + FF(1))); tmp *= scaling_factor; std::get<23>(evals) += tmp; } @@ -511,7 +507,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(24); - auto tmp = ((main_sel_op_emit_nullifier * (-main_sel_op_emit_nullifier + FF(1))) - FF(0)); + auto tmp = (main_sel_op_emit_nullifier * (-main_sel_op_emit_nullifier + FF(1))); tmp *= scaling_factor; std::get<24>(evals) += tmp; } @@ -519,7 +515,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(25); - auto tmp = ((main_sel_op_l1_to_l2_msg_exists * (-main_sel_op_l1_to_l2_msg_exists + FF(1))) - FF(0)); + auto tmp = (main_sel_op_l1_to_l2_msg_exists * (-main_sel_op_l1_to_l2_msg_exists + FF(1))); tmp *= scaling_factor; std::get<25>(evals) += tmp; } @@ -527,7 +523,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(26); - auto tmp = ((main_sel_op_emit_unencrypted_log * (-main_sel_op_emit_unencrypted_log + FF(1))) - FF(0)); + auto tmp = (main_sel_op_emit_unencrypted_log * (-main_sel_op_emit_unencrypted_log + FF(1))); tmp *= scaling_factor; std::get<26>(evals) += tmp; } @@ -535,7 +531,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(27); - auto tmp = ((main_sel_op_emit_l2_to_l1_msg * (-main_sel_op_emit_l2_to_l1_msg + FF(1))) - FF(0)); + auto tmp = (main_sel_op_emit_l2_to_l1_msg * (-main_sel_op_emit_l2_to_l1_msg + FF(1))); tmp *= scaling_factor; std::get<27>(evals) += tmp; } @@ -543,7 +539,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(28); - auto tmp = ((main_sel_op_get_contract_instance * (-main_sel_op_get_contract_instance + FF(1))) - FF(0)); + auto tmp = (main_sel_op_get_contract_instance * (-main_sel_op_get_contract_instance + FF(1))); tmp *= scaling_factor; std::get<28>(evals) += tmp; } @@ -551,7 +547,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(29); - auto tmp = ((main_sel_op_sload * (-main_sel_op_sload + FF(1))) - FF(0)); + auto tmp = (main_sel_op_sload * (-main_sel_op_sload + FF(1))); tmp *= scaling_factor; std::get<29>(evals) += tmp; } @@ -559,7 +555,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(30); - auto tmp = ((main_sel_op_sstore * (-main_sel_op_sstore + FF(1))) - FF(0)); + auto tmp = (main_sel_op_sstore * (-main_sel_op_sstore + FF(1))); tmp *= scaling_factor; std::get<30>(evals) += tmp; } @@ -567,7 +563,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(31); - auto tmp = ((main_sel_op_radix_le * (-main_sel_op_radix_le + FF(1))) - FF(0)); + auto tmp = (main_sel_op_radix_le * (-main_sel_op_radix_le + FF(1))); tmp *= scaling_factor; std::get<31>(evals) += tmp; } @@ -575,7 +571,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(32); - auto tmp = ((main_sel_op_sha256 * (-main_sel_op_sha256 + FF(1))) - FF(0)); + auto tmp = (main_sel_op_sha256 * (-main_sel_op_sha256 + FF(1))); tmp *= scaling_factor; std::get<32>(evals) += tmp; } @@ -583,7 +579,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(33); - auto tmp = ((main_sel_op_poseidon2 * (-main_sel_op_poseidon2 + FF(1))) - FF(0)); + auto tmp = (main_sel_op_poseidon2 * (-main_sel_op_poseidon2 + FF(1))); tmp *= scaling_factor; std::get<33>(evals) += tmp; } @@ -591,7 +587,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(34); - auto tmp = ((main_sel_op_keccak * (-main_sel_op_keccak + FF(1))) - FF(0)); + auto tmp = (main_sel_op_keccak * (-main_sel_op_keccak + FF(1))); tmp *= scaling_factor; std::get<34>(evals) += tmp; } @@ -599,7 +595,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(35); - auto tmp = ((main_sel_op_pedersen * (-main_sel_op_pedersen + FF(1))) - FF(0)); + auto tmp = (main_sel_op_pedersen * (-main_sel_op_pedersen + FF(1))); tmp *= scaling_factor; std::get<35>(evals) += tmp; } @@ -607,7 +603,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(36); - auto tmp = ((main_sel_op_add * (-main_sel_op_add + FF(1))) - FF(0)); + auto tmp = (main_sel_op_add * (-main_sel_op_add + FF(1))); tmp *= scaling_factor; std::get<36>(evals) += tmp; } @@ -615,7 +611,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(37); - auto tmp = ((main_sel_op_sub * (-main_sel_op_sub + FF(1))) - FF(0)); + auto tmp = (main_sel_op_sub * (-main_sel_op_sub + FF(1))); tmp *= scaling_factor; std::get<37>(evals) += tmp; } @@ -623,7 +619,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(38); - auto tmp = ((main_sel_op_mul * (-main_sel_op_mul + FF(1))) - FF(0)); + auto tmp = (main_sel_op_mul * (-main_sel_op_mul + FF(1))); tmp *= scaling_factor; std::get<38>(evals) += tmp; } @@ -631,7 +627,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(39); - auto tmp = ((main_sel_op_div * (-main_sel_op_div + FF(1))) - FF(0)); + auto tmp = (main_sel_op_div * (-main_sel_op_div + FF(1))); tmp *= scaling_factor; std::get<39>(evals) += tmp; } @@ -639,7 +635,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(40); - auto tmp = ((main_sel_op_fdiv * (-main_sel_op_fdiv + FF(1))) - FF(0)); + auto tmp = (main_sel_op_fdiv * (-main_sel_op_fdiv + FF(1))); tmp *= scaling_factor; std::get<40>(evals) += tmp; } @@ -647,7 +643,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(41); - auto tmp = ((main_sel_op_not * (-main_sel_op_not + FF(1))) - FF(0)); + auto tmp = (main_sel_op_not * (-main_sel_op_not + FF(1))); tmp *= scaling_factor; std::get<41>(evals) += tmp; } @@ -655,7 +651,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(42); - auto tmp = ((main_sel_op_eq * (-main_sel_op_eq + FF(1))) - FF(0)); + auto tmp = (main_sel_op_eq * (-main_sel_op_eq + FF(1))); tmp *= scaling_factor; std::get<42>(evals) += tmp; } @@ -663,7 +659,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(43); - auto tmp = ((main_sel_op_and * (-main_sel_op_and + FF(1))) - FF(0)); + auto tmp = (main_sel_op_and * (-main_sel_op_and + FF(1))); tmp *= scaling_factor; std::get<43>(evals) += tmp; } @@ -671,7 +667,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(44); - auto tmp = ((main_sel_op_or * (-main_sel_op_or + FF(1))) - FF(0)); + auto tmp = (main_sel_op_or * (-main_sel_op_or + FF(1))); tmp *= scaling_factor; std::get<44>(evals) += tmp; } @@ -679,7 +675,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(45); - auto tmp = ((main_sel_op_xor * (-main_sel_op_xor + FF(1))) - FF(0)); + auto tmp = (main_sel_op_xor * (-main_sel_op_xor + FF(1))); tmp *= scaling_factor; std::get<45>(evals) += tmp; } @@ -687,7 +683,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(46); - auto tmp = ((main_sel_op_cast * (-main_sel_op_cast + FF(1))) - FF(0)); + auto tmp = (main_sel_op_cast * (-main_sel_op_cast + FF(1))); tmp *= scaling_factor; std::get<46>(evals) += tmp; } @@ -695,7 +691,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(47); - auto tmp = ((main_sel_op_lt * (-main_sel_op_lt + FF(1))) - FF(0)); + auto tmp = (main_sel_op_lt * (-main_sel_op_lt + FF(1))); tmp *= scaling_factor; std::get<47>(evals) += tmp; } @@ -703,7 +699,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(48); - auto tmp = ((main_sel_op_lte * (-main_sel_op_lte + FF(1))) - FF(0)); + auto tmp = (main_sel_op_lte * (-main_sel_op_lte + FF(1))); tmp *= scaling_factor; std::get<48>(evals) += tmp; } @@ -711,7 +707,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(49); - auto tmp = ((main_sel_op_shl * (-main_sel_op_shl + FF(1))) - FF(0)); + auto tmp = (main_sel_op_shl * (-main_sel_op_shl + FF(1))); tmp *= scaling_factor; std::get<49>(evals) += tmp; } @@ -719,7 +715,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(50); - auto tmp = ((main_sel_op_shr * (-main_sel_op_shr + FF(1))) - FF(0)); + auto tmp = (main_sel_op_shr * (-main_sel_op_shr + FF(1))); tmp *= scaling_factor; std::get<50>(evals) += tmp; } @@ -727,7 +723,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(51); - auto tmp = ((main_sel_op_internal_call * (-main_sel_op_internal_call + FF(1))) - FF(0)); + auto tmp = (main_sel_op_internal_call * (-main_sel_op_internal_call + FF(1))); tmp *= scaling_factor; std::get<51>(evals) += tmp; } @@ -735,7 +731,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(52); - auto tmp = ((main_sel_op_internal_return * (-main_sel_op_internal_return + FF(1))) - FF(0)); + auto tmp = (main_sel_op_internal_return * (-main_sel_op_internal_return + FF(1))); tmp *= scaling_factor; std::get<52>(evals) += tmp; } @@ -743,7 +739,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(53); - auto tmp = ((main_sel_op_jump * (-main_sel_op_jump + FF(1))) - FF(0)); + auto tmp = (main_sel_op_jump * (-main_sel_op_jump + FF(1))); tmp *= scaling_factor; std::get<53>(evals) += tmp; } @@ -751,7 +747,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(54); - auto tmp = ((main_sel_op_jumpi * (-main_sel_op_jumpi + FF(1))) - FF(0)); + auto tmp = (main_sel_op_jumpi * (-main_sel_op_jumpi + FF(1))); tmp *= scaling_factor; std::get<54>(evals) += tmp; } @@ -759,7 +755,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(55); - auto tmp = ((main_sel_op_halt * (-main_sel_op_halt + FF(1))) - FF(0)); + auto tmp = (main_sel_op_halt * (-main_sel_op_halt + FF(1))); tmp *= scaling_factor; std::get<55>(evals) += tmp; } @@ -767,7 +763,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(56); - auto tmp = ((main_sel_op_external_call * (-main_sel_op_external_call + FF(1))) - FF(0)); + auto tmp = (main_sel_op_external_call * (-main_sel_op_external_call + FF(1))); tmp *= scaling_factor; std::get<56>(evals) += tmp; } @@ -775,7 +771,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(57); - auto tmp = ((main_sel_op_mov * (-main_sel_op_mov + FF(1))) - FF(0)); + auto tmp = (main_sel_op_mov * (-main_sel_op_mov + FF(1))); tmp *= scaling_factor; std::get<57>(evals) += tmp; } @@ -783,7 +779,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(58); - auto tmp = ((main_sel_op_cmov * (-main_sel_op_cmov + FF(1))) - FF(0)); + auto tmp = (main_sel_op_cmov * (-main_sel_op_cmov + FF(1))); tmp *= scaling_factor; std::get<58>(evals) += tmp; } @@ -791,7 +787,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(59); - auto tmp = ((main_op_err * (-main_op_err + FF(1))) - FF(0)); + auto tmp = (main_op_err * (-main_op_err + FF(1))); tmp *= scaling_factor; std::get<59>(evals) += tmp; } @@ -799,7 +795,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(60); - auto tmp = ((main_tag_err * (-main_tag_err + FF(1))) - FF(0)); + auto tmp = (main_tag_err * (-main_tag_err + FF(1))); tmp *= scaling_factor; std::get<60>(evals) += tmp; } @@ -807,7 +803,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(61); - auto tmp = ((main_id_zero * (-main_id_zero + FF(1))) - FF(0)); + auto tmp = (main_id_zero * (-main_id_zero + FF(1))); tmp *= scaling_factor; std::get<61>(evals) += tmp; } @@ -815,7 +811,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(62); - auto tmp = ((main_sel_mem_op_a * (-main_sel_mem_op_a + FF(1))) - FF(0)); + auto tmp = (main_sel_mem_op_a * (-main_sel_mem_op_a + FF(1))); tmp *= scaling_factor; std::get<62>(evals) += tmp; } @@ -823,7 +819,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(63); - auto tmp = ((main_sel_mem_op_b * (-main_sel_mem_op_b + FF(1))) - FF(0)); + auto tmp = (main_sel_mem_op_b * (-main_sel_mem_op_b + FF(1))); tmp *= scaling_factor; std::get<63>(evals) += tmp; } @@ -831,7 +827,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(64); - auto tmp = ((main_sel_mem_op_c * (-main_sel_mem_op_c + FF(1))) - FF(0)); + auto tmp = (main_sel_mem_op_c * (-main_sel_mem_op_c + FF(1))); tmp *= scaling_factor; std::get<64>(evals) += tmp; } @@ -839,7 +835,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(65); - auto tmp = ((main_sel_mem_op_d * (-main_sel_mem_op_d + FF(1))) - FF(0)); + auto tmp = (main_sel_mem_op_d * (-main_sel_mem_op_d + FF(1))); tmp *= scaling_factor; std::get<65>(evals) += tmp; } @@ -847,7 +843,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(66); - auto tmp = ((main_rwa * (-main_rwa + FF(1))) - FF(0)); + auto tmp = (main_rwa * (-main_rwa + FF(1))); tmp *= scaling_factor; std::get<66>(evals) += tmp; } @@ -855,7 +851,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(67); - auto tmp = ((main_rwb * (-main_rwb + FF(1))) - FF(0)); + auto tmp = (main_rwb * (-main_rwb + FF(1))); tmp *= scaling_factor; std::get<67>(evals) += tmp; } @@ -863,7 +859,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(68); - auto tmp = ((main_rwc * (-main_rwc + FF(1))) - FF(0)); + auto tmp = (main_rwc * (-main_rwc + FF(1))); tmp *= scaling_factor; std::get<68>(evals) += tmp; } @@ -871,7 +867,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(69); - auto tmp = ((main_rwd * (-main_rwd + FF(1))) - FF(0)); + auto tmp = (main_rwd * (-main_rwd + FF(1))); tmp *= scaling_factor; std::get<69>(evals) += tmp; } @@ -879,7 +875,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(70); - auto tmp = ((main_sel_resolve_ind_addr_a * (-main_sel_resolve_ind_addr_a + FF(1))) - FF(0)); + auto tmp = (main_sel_resolve_ind_addr_a * (-main_sel_resolve_ind_addr_a + FF(1))); tmp *= scaling_factor; std::get<70>(evals) += tmp; } @@ -887,7 +883,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(71); - auto tmp = ((main_sel_resolve_ind_addr_b * (-main_sel_resolve_ind_addr_b + FF(1))) - FF(0)); + auto tmp = (main_sel_resolve_ind_addr_b * (-main_sel_resolve_ind_addr_b + FF(1))); tmp *= scaling_factor; std::get<71>(evals) += tmp; } @@ -895,7 +891,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(72); - auto tmp = ((main_sel_resolve_ind_addr_c * (-main_sel_resolve_ind_addr_c + FF(1))) - FF(0)); + auto tmp = (main_sel_resolve_ind_addr_c * (-main_sel_resolve_ind_addr_c + FF(1))); tmp *= scaling_factor; std::get<72>(evals) += tmp; } @@ -903,7 +899,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(73); - auto tmp = ((main_sel_resolve_ind_addr_d * (-main_sel_resolve_ind_addr_d + FF(1))) - FF(0)); + auto tmp = (main_sel_resolve_ind_addr_d * (-main_sel_resolve_ind_addr_d + FF(1))); tmp *= scaling_factor; std::get<73>(evals) += tmp; } @@ -911,7 +907,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(74); - auto tmp = ((((main_sel_op_eq + main_sel_op_lte) + main_sel_op_lt) * (main_w_in_tag - FF(1))) - FF(0)); + auto tmp = (((main_sel_op_eq + main_sel_op_lte) + main_sel_op_lt) * (main_w_in_tag - FF(1))); tmp *= scaling_factor; std::get<74>(evals) += tmp; } @@ -919,7 +915,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(75); - auto tmp = (((main_sel_op_fdiv * (-main_op_err + FF(1))) * ((main_ic * main_ib) - main_ia)) - FF(0)); + auto tmp = ((main_sel_op_fdiv * (-main_op_err + FF(1))) * ((main_ic * main_ib) - main_ia)); tmp *= scaling_factor; std::get<75>(evals) += tmp; } @@ -927,8 +923,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(76); - auto tmp = - (((main_sel_op_fdiv + main_sel_op_div) * (((main_ib * main_inv) - FF(1)) + main_op_err)) - FF(0)); + auto tmp = ((main_sel_op_fdiv + main_sel_op_div) * (((main_ib * main_inv) - FF(1)) + main_op_err)); tmp *= scaling_factor; std::get<76>(evals) += tmp; } @@ -936,7 +931,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(77); - auto tmp = ((((main_sel_op_fdiv + main_sel_op_div) * main_op_err) * (-main_inv + FF(1))) - FF(0)); + auto tmp = (((main_sel_op_fdiv + main_sel_op_div) * main_op_err) * (-main_inv + FF(1))); tmp *= scaling_factor; std::get<77>(evals) += tmp; } @@ -944,7 +939,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(78); - auto tmp = ((main_sel_op_fdiv * (main_r_in_tag - FF(6))) - FF(0)); + auto tmp = (main_sel_op_fdiv * (main_r_in_tag - FF(6))); tmp *= scaling_factor; std::get<78>(evals) += tmp; } @@ -952,7 +947,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(79); - auto tmp = ((main_sel_op_fdiv * (main_w_in_tag - FF(6))) - FF(0)); + auto tmp = (main_sel_op_fdiv * (main_w_in_tag - FF(6))); tmp *= scaling_factor; std::get<79>(evals) += tmp; } @@ -960,7 +955,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(80); - auto tmp = ((main_op_err * ((main_sel_op_fdiv + main_sel_op_div) - FF(1))) - FF(0)); + auto tmp = (main_op_err * ((main_sel_op_fdiv + main_sel_op_div) - FF(1))); tmp *= scaling_factor; std::get<80>(evals) += tmp; } @@ -968,17 +963,16 @@ template class mainImpl { { Avm_DECLARE_VIEWS(81); - auto tmp = ((((((((((((main_sel_op_sender + main_sel_op_address) + main_sel_op_storage_address) + - main_sel_op_chain_id) + - main_sel_op_version) + - main_sel_op_block_number) + - main_sel_op_coinbase) + - main_sel_op_timestamp) + - main_sel_op_fee_per_l2_gas) + - main_sel_op_fee_per_da_gas) + - main_sel_op_transaction_fee) * - (-main_sel_q_kernel_lookup + FF(1))) - - FF(0)); + auto tmp = (((((((((((main_sel_op_sender + main_sel_op_address) + main_sel_op_storage_address) + + main_sel_op_chain_id) + + main_sel_op_version) + + main_sel_op_block_number) + + main_sel_op_coinbase) + + main_sel_op_timestamp) + + main_sel_op_fee_per_l2_gas) + + main_sel_op_fee_per_da_gas) + + main_sel_op_transaction_fee) * + (-main_sel_q_kernel_lookup + FF(1))); tmp *= scaling_factor; std::get<81>(evals) += tmp; } @@ -987,13 +981,12 @@ template class mainImpl { Avm_DECLARE_VIEWS(82); auto tmp = - ((((((((main_sel_op_note_hash_exists + main_sel_op_emit_note_hash) + main_sel_op_nullifier_exists) + - main_sel_op_emit_nullifier) + - main_sel_op_l1_to_l2_msg_exists) + - main_sel_op_emit_unencrypted_log) + - main_sel_op_emit_l2_to_l1_msg) * - (-main_sel_q_kernel_output_lookup + FF(1))) - - FF(0)); + (((((((main_sel_op_note_hash_exists + main_sel_op_emit_note_hash) + main_sel_op_nullifier_exists) + + main_sel_op_emit_nullifier) + + main_sel_op_l1_to_l2_msg_exists) + + main_sel_op_emit_unencrypted_log) + + main_sel_op_emit_l2_to_l1_msg) * + (-main_sel_q_kernel_output_lookup + FF(1))); tmp *= scaling_factor; std::get<82>(evals) += tmp; } @@ -1001,7 +994,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(83); - auto tmp = ((main_sel_op_jump * (main_pc_shift - main_ia)) - FF(0)); + auto tmp = (main_sel_op_jump * (main_pc_shift - main_ia)); tmp *= scaling_factor; std::get<83>(evals) += tmp; } @@ -1009,9 +1002,8 @@ template class mainImpl { { Avm_DECLARE_VIEWS(84); - auto tmp = ((main_sel_op_jumpi * (((-main_id_zero + FF(1)) * (main_pc_shift - main_ia)) + - (main_id_zero * ((main_pc_shift - main_pc) - FF(1))))) - - FF(0)); + auto tmp = (main_sel_op_jumpi * (((-main_id_zero + FF(1)) * (main_pc_shift - main_ia)) + + (main_id_zero * ((main_pc_shift - main_pc) - FF(1))))); tmp *= scaling_factor; std::get<84>(evals) += tmp; } @@ -1020,8 +1012,7 @@ template class mainImpl { Avm_DECLARE_VIEWS(85); auto tmp = - ((main_sel_op_internal_call * (main_internal_return_ptr_shift - (main_internal_return_ptr + FF(1)))) - - FF(0)); + (main_sel_op_internal_call * (main_internal_return_ptr_shift - (main_internal_return_ptr + FF(1)))); tmp *= scaling_factor; std::get<85>(evals) += tmp; } @@ -1029,7 +1020,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(86); - auto tmp = ((main_sel_op_internal_call * (main_internal_return_ptr - main_mem_addr_b)) - FF(0)); + auto tmp = (main_sel_op_internal_call * (main_internal_return_ptr - main_mem_addr_b)); tmp *= scaling_factor; std::get<86>(evals) += tmp; } @@ -1037,7 +1028,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(87); - auto tmp = ((main_sel_op_internal_call * (main_pc_shift - main_ia)) - FF(0)); + auto tmp = (main_sel_op_internal_call * (main_pc_shift - main_ia)); tmp *= scaling_factor; std::get<87>(evals) += tmp; } @@ -1045,7 +1036,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(88); - auto tmp = ((main_sel_op_internal_call * ((main_pc + FF(1)) - main_ib)) - FF(0)); + auto tmp = (main_sel_op_internal_call * ((main_pc + FF(1)) - main_ib)); tmp *= scaling_factor; std::get<88>(evals) += tmp; } @@ -1053,7 +1044,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(89); - auto tmp = ((main_sel_op_internal_call * (main_rwb - FF(1))) - FF(0)); + auto tmp = (main_sel_op_internal_call * (main_rwb - FF(1))); tmp *= scaling_factor; std::get<89>(evals) += tmp; } @@ -1061,7 +1052,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(90); - auto tmp = ((main_sel_op_internal_call * (main_sel_mem_op_b - FF(1))) - FF(0)); + auto tmp = (main_sel_op_internal_call * (main_sel_mem_op_b - FF(1))); tmp *= scaling_factor; std::get<90>(evals) += tmp; } @@ -1070,8 +1061,7 @@ template class mainImpl { Avm_DECLARE_VIEWS(91); auto tmp = - ((main_sel_op_internal_return * (main_internal_return_ptr_shift - (main_internal_return_ptr - FF(1)))) - - FF(0)); + (main_sel_op_internal_return * (main_internal_return_ptr_shift - (main_internal_return_ptr - FF(1)))); tmp *= scaling_factor; std::get<91>(evals) += tmp; } @@ -1079,7 +1069,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(92); - auto tmp = ((main_sel_op_internal_return * ((main_internal_return_ptr - FF(1)) - main_mem_addr_a)) - FF(0)); + auto tmp = (main_sel_op_internal_return * ((main_internal_return_ptr - FF(1)) - main_mem_addr_a)); tmp *= scaling_factor; std::get<92>(evals) += tmp; } @@ -1087,7 +1077,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(93); - auto tmp = ((main_sel_op_internal_return * (main_pc_shift - main_ia)) - FF(0)); + auto tmp = (main_sel_op_internal_return * (main_pc_shift - main_ia)); tmp *= scaling_factor; std::get<93>(evals) += tmp; } @@ -1095,7 +1085,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(94); - auto tmp = ((main_sel_op_internal_return * main_rwa) - FF(0)); + auto tmp = (main_sel_op_internal_return * main_rwa); tmp *= scaling_factor; std::get<94>(evals) += tmp; } @@ -1103,7 +1093,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(95); - auto tmp = ((main_sel_op_internal_return * (main_sel_mem_op_a - FF(1))) - FF(0)); + auto tmp = (main_sel_op_internal_return * (main_sel_mem_op_a - FF(1))); tmp *= scaling_factor; std::get<95>(evals) += tmp; } @@ -1111,43 +1101,42 @@ template class mainImpl { { Avm_DECLARE_VIEWS(96); - auto tmp = ((((((main_sel_gas_accounting_active - - (((((((main_sel_op_fdiv + - ((((((((((main_sel_op_add + main_sel_op_sub) + main_sel_op_mul) + main_sel_op_div) + - main_sel_op_not) + - main_sel_op_eq) + - main_sel_op_lt) + - main_sel_op_lte) + - main_sel_op_shr) + - main_sel_op_shl) + - main_sel_op_cast)) + - ((main_sel_op_and + main_sel_op_or) + main_sel_op_xor)) + - (main_sel_op_cmov + main_sel_op_mov)) + - ((((main_sel_op_radix_le + main_sel_op_sha256) + main_sel_op_poseidon2) + - main_sel_op_keccak) + - main_sel_op_pedersen)) + - ((((((((((main_sel_op_sender + main_sel_op_address) + main_sel_op_storage_address) + - main_sel_op_chain_id) + - main_sel_op_version) + - main_sel_op_block_number) + - main_sel_op_coinbase) + - main_sel_op_timestamp) + - main_sel_op_fee_per_l2_gas) + - main_sel_op_fee_per_da_gas) + - main_sel_op_transaction_fee)) + - ((((((main_sel_op_note_hash_exists + main_sel_op_emit_note_hash) + - main_sel_op_nullifier_exists) + - main_sel_op_emit_nullifier) + - main_sel_op_l1_to_l2_msg_exists) + - main_sel_op_emit_unencrypted_log) + - main_sel_op_emit_l2_to_l1_msg)) + - (main_sel_op_dagasleft + main_sel_op_l2gasleft))) - - (((main_sel_op_jump + main_sel_op_jumpi) + main_sel_op_internal_call) + - main_sel_op_internal_return)) - - main_sel_op_sload) - - main_sel_op_sstore) - - main_sel_mem_op_activate_gas) - - FF(0)); + auto tmp = + (((((main_sel_gas_accounting_active - + (((((((main_sel_op_fdiv + + ((((((((((main_sel_op_add + main_sel_op_sub) + main_sel_op_mul) + main_sel_op_div) + + main_sel_op_not) + + main_sel_op_eq) + + main_sel_op_lt) + + main_sel_op_lte) + + main_sel_op_shr) + + main_sel_op_shl) + + main_sel_op_cast)) + + ((main_sel_op_and + main_sel_op_or) + main_sel_op_xor)) + + (main_sel_op_cmov + main_sel_op_mov)) + + ((((main_sel_op_radix_le + main_sel_op_sha256) + main_sel_op_poseidon2) + main_sel_op_keccak) + + main_sel_op_pedersen)) + + ((((((((((main_sel_op_sender + main_sel_op_address) + main_sel_op_storage_address) + + main_sel_op_chain_id) + + main_sel_op_version) + + main_sel_op_block_number) + + main_sel_op_coinbase) + + main_sel_op_timestamp) + + main_sel_op_fee_per_l2_gas) + + main_sel_op_fee_per_da_gas) + + main_sel_op_transaction_fee)) + + ((((((main_sel_op_note_hash_exists + main_sel_op_emit_note_hash) + + main_sel_op_nullifier_exists) + + main_sel_op_emit_nullifier) + + main_sel_op_l1_to_l2_msg_exists) + + main_sel_op_emit_unencrypted_log) + + main_sel_op_emit_l2_to_l1_msg)) + + (main_sel_op_dagasleft + main_sel_op_l2gasleft))) - + (((main_sel_op_jump + main_sel_op_jumpi) + main_sel_op_internal_call) + + main_sel_op_internal_return)) - + main_sel_op_sload) - + main_sel_op_sstore) - + main_sel_mem_op_activate_gas); tmp *= scaling_factor; std::get<96>(evals) += tmp; } @@ -1156,67 +1145,8 @@ template class mainImpl { Avm_DECLARE_VIEWS(97); auto tmp = - (((((-main_sel_first + FF(1)) * (-main_sel_op_halt + FF(1))) * - (((((((main_sel_op_fdiv + - ((((((((((main_sel_op_add + main_sel_op_sub) + main_sel_op_mul) + main_sel_op_div) + - main_sel_op_not) + - main_sel_op_eq) + - main_sel_op_lt) + - main_sel_op_lte) + - main_sel_op_shr) + - main_sel_op_shl) + - main_sel_op_cast)) + - ((main_sel_op_and + main_sel_op_or) + main_sel_op_xor)) + - (main_sel_op_cmov + main_sel_op_mov)) + - ((((main_sel_op_radix_le + main_sel_op_sha256) + main_sel_op_poseidon2) + main_sel_op_keccak) + - main_sel_op_pedersen)) + - ((((((((((main_sel_op_sender + main_sel_op_address) + main_sel_op_storage_address) + - main_sel_op_chain_id) + - main_sel_op_version) + - main_sel_op_block_number) + - main_sel_op_coinbase) + - main_sel_op_timestamp) + - main_sel_op_fee_per_l2_gas) + - main_sel_op_fee_per_da_gas) + - main_sel_op_transaction_fee)) + - ((((((main_sel_op_note_hash_exists + main_sel_op_emit_note_hash) + main_sel_op_nullifier_exists) + - main_sel_op_emit_nullifier) + - main_sel_op_l1_to_l2_msg_exists) + - main_sel_op_emit_unencrypted_log) + - main_sel_op_emit_l2_to_l1_msg)) + - (main_sel_op_dagasleft + main_sel_op_l2gasleft))) * - (main_pc_shift - (main_pc + FF(1)))) - - FF(0)); - tmp *= scaling_factor; - std::get<97>(evals) += tmp; - } - // Contribution 98 - { - Avm_DECLARE_VIEWS(98); - - auto tmp = - (((-(((main_sel_first + main_sel_op_internal_call) + main_sel_op_internal_return) + main_sel_op_halt) + - FF(1)) * - (main_internal_return_ptr_shift - main_internal_return_ptr)) - - FF(0)); - tmp *= scaling_factor; - std::get<98>(evals) += tmp; - } - // Contribution 99 - { - Avm_DECLARE_VIEWS(99); - - auto tmp = - (((main_sel_op_internal_call + main_sel_op_internal_return) * (main_space_id - FF(255))) - FF(0)); - tmp *= scaling_factor; - std::get<99>(evals) += tmp; - } - // Contribution 100 - { - Avm_DECLARE_VIEWS(100); - - auto tmp = - (((((((((main_sel_op_fdiv + + ((((-main_sel_first + FF(1)) * (-main_sel_op_halt + FF(1))) * + (((((((main_sel_op_fdiv + ((((((((((main_sel_op_add + main_sel_op_sub) + main_sel_op_mul) + main_sel_op_div) + main_sel_op_not) + main_sel_op_eq) + @@ -1243,9 +1173,64 @@ template class mainImpl { main_sel_op_l1_to_l2_msg_exists) + main_sel_op_emit_unencrypted_log) + main_sel_op_emit_l2_to_l1_msg)) + - (main_sel_op_dagasleft + main_sel_op_l2gasleft)) * - (main_call_ptr - main_space_id)) - - FF(0)); + (main_sel_op_dagasleft + main_sel_op_l2gasleft))) * + (main_pc_shift - (main_pc + FF(1)))); + tmp *= scaling_factor; + std::get<97>(evals) += tmp; + } + // Contribution 98 + { + Avm_DECLARE_VIEWS(98); + + auto tmp = + ((-(((main_sel_first + main_sel_op_internal_call) + main_sel_op_internal_return) + main_sel_op_halt) + + FF(1)) * + (main_internal_return_ptr_shift - main_internal_return_ptr)); + tmp *= scaling_factor; + std::get<98>(evals) += tmp; + } + // Contribution 99 + { + Avm_DECLARE_VIEWS(99); + + auto tmp = ((main_sel_op_internal_call + main_sel_op_internal_return) * (main_space_id - FF(255))); + tmp *= scaling_factor; + std::get<99>(evals) += tmp; + } + // Contribution 100 + { + Avm_DECLARE_VIEWS(100); + + auto tmp = + ((((((((main_sel_op_fdiv + + ((((((((((main_sel_op_add + main_sel_op_sub) + main_sel_op_mul) + main_sel_op_div) + + main_sel_op_not) + + main_sel_op_eq) + + main_sel_op_lt) + + main_sel_op_lte) + + main_sel_op_shr) + + main_sel_op_shl) + + main_sel_op_cast)) + + ((main_sel_op_and + main_sel_op_or) + main_sel_op_xor)) + + (main_sel_op_cmov + main_sel_op_mov)) + + ((((main_sel_op_radix_le + main_sel_op_sha256) + main_sel_op_poseidon2) + main_sel_op_keccak) + + main_sel_op_pedersen)) + + ((((((((((main_sel_op_sender + main_sel_op_address) + main_sel_op_storage_address) + + main_sel_op_chain_id) + + main_sel_op_version) + + main_sel_op_block_number) + + main_sel_op_coinbase) + + main_sel_op_timestamp) + + main_sel_op_fee_per_l2_gas) + + main_sel_op_fee_per_da_gas) + + main_sel_op_transaction_fee)) + + ((((((main_sel_op_note_hash_exists + main_sel_op_emit_note_hash) + main_sel_op_nullifier_exists) + + main_sel_op_emit_nullifier) + + main_sel_op_l1_to_l2_msg_exists) + + main_sel_op_emit_unencrypted_log) + + main_sel_op_emit_l2_to_l1_msg)) + + (main_sel_op_dagasleft + main_sel_op_l2gasleft)) * + (main_call_ptr - main_space_id)); tmp *= scaling_factor; std::get<100>(evals) += tmp; } @@ -1253,8 +1238,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(101); - auto tmp = - (((main_sel_op_cmov + main_sel_op_jumpi) * (((main_id * main_inv) - FF(1)) + main_id_zero)) - FF(0)); + auto tmp = ((main_sel_op_cmov + main_sel_op_jumpi) * (((main_id * main_inv) - FF(1)) + main_id_zero)); tmp *= scaling_factor; std::get<101>(evals) += tmp; } @@ -1262,7 +1246,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(102); - auto tmp = ((((main_sel_op_cmov + main_sel_op_jumpi) * main_id_zero) * (-main_inv + FF(1))) - FF(0)); + auto tmp = (((main_sel_op_cmov + main_sel_op_jumpi) * main_id_zero) * (-main_inv + FF(1))); tmp *= scaling_factor; std::get<102>(evals) += tmp; } @@ -1286,7 +1270,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(105); - auto tmp = ((main_sel_mov_ia_to_ic * (main_ia - main_ic)) - FF(0)); + auto tmp = (main_sel_mov_ia_to_ic * (main_ia - main_ic)); tmp *= scaling_factor; std::get<105>(evals) += tmp; } @@ -1294,7 +1278,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(106); - auto tmp = ((main_sel_mov_ib_to_ic * (main_ib - main_ic)) - FF(0)); + auto tmp = (main_sel_mov_ib_to_ic * (main_ib - main_ic)); tmp *= scaling_factor; std::get<106>(evals) += tmp; } @@ -1302,7 +1286,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(107); - auto tmp = (((main_sel_op_mov + main_sel_op_cmov) * (main_r_in_tag - main_w_in_tag)) - FF(0)); + auto tmp = ((main_sel_op_mov + main_sel_op_cmov) * (main_r_in_tag - main_w_in_tag)); tmp *= scaling_factor; std::get<107>(evals) += tmp; } @@ -1329,14 +1313,13 @@ template class mainImpl { Avm_DECLARE_VIEWS(109); auto tmp = - (((((((((((main_sel_op_add + main_sel_op_sub) + main_sel_op_mul) + main_sel_op_div) + main_sel_op_not) + - main_sel_op_eq) + - main_sel_op_lt) + - main_sel_op_lte) + - main_sel_op_shr) + - main_sel_op_shl) * - (main_alu_in_tag - main_r_in_tag)) - - FF(0)); + ((((((((((main_sel_op_add + main_sel_op_sub) + main_sel_op_mul) + main_sel_op_div) + main_sel_op_not) + + main_sel_op_eq) + + main_sel_op_lt) + + main_sel_op_lte) + + main_sel_op_shr) + + main_sel_op_shl) * + (main_alu_in_tag - main_r_in_tag)); tmp *= scaling_factor; std::get<109>(evals) += tmp; } @@ -1344,7 +1327,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(110); - auto tmp = ((main_sel_op_cast * (main_alu_in_tag - main_w_in_tag)) - FF(0)); + auto tmp = (main_sel_op_cast * (main_alu_in_tag - main_w_in_tag)); tmp *= scaling_factor; std::get<110>(evals) += tmp; } @@ -1352,7 +1335,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(111); - auto tmp = ((main_sel_op_l2gasleft * (main_ia - main_l2_gas_remaining_shift)) - FF(0)); + auto tmp = (main_sel_op_l2gasleft * (main_ia - main_l2_gas_remaining_shift)); tmp *= scaling_factor; std::get<111>(evals) += tmp; } @@ -1360,7 +1343,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(112); - auto tmp = ((main_sel_op_dagasleft * (main_ia - main_da_gas_remaining_shift)) - FF(0)); + auto tmp = (main_sel_op_dagasleft * (main_ia - main_da_gas_remaining_shift)); tmp *= scaling_factor; std::get<112>(evals) += tmp; } @@ -1368,7 +1351,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(113); - auto tmp = ((main_sel_op_sender * (kernel_kernel_in_offset - FF(0))) - FF(0)); + auto tmp = (main_sel_op_sender * kernel_kernel_in_offset); tmp *= scaling_factor; std::get<113>(evals) += tmp; } @@ -1376,7 +1359,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(114); - auto tmp = ((main_sel_op_address * (kernel_kernel_in_offset - FF(1))) - FF(0)); + auto tmp = (main_sel_op_address * (kernel_kernel_in_offset - FF(1))); tmp *= scaling_factor; std::get<114>(evals) += tmp; } @@ -1384,7 +1367,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(115); - auto tmp = ((main_sel_op_storage_address * (kernel_kernel_in_offset - FF(2))) - FF(0)); + auto tmp = (main_sel_op_storage_address * (kernel_kernel_in_offset - FF(2))); tmp *= scaling_factor; std::get<115>(evals) += tmp; } @@ -1392,7 +1375,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(116); - auto tmp = ((main_sel_op_fee_per_da_gas * (kernel_kernel_in_offset - FF(35))) - FF(0)); + auto tmp = (main_sel_op_fee_per_da_gas * (kernel_kernel_in_offset - FF(35))); tmp *= scaling_factor; std::get<116>(evals) += tmp; } @@ -1400,7 +1383,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(117); - auto tmp = ((main_sel_op_fee_per_l2_gas * (kernel_kernel_in_offset - FF(36))) - FF(0)); + auto tmp = (main_sel_op_fee_per_l2_gas * (kernel_kernel_in_offset - FF(36))); tmp *= scaling_factor; std::get<117>(evals) += tmp; } @@ -1408,7 +1391,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(118); - auto tmp = ((main_sel_op_transaction_fee * (kernel_kernel_in_offset - FF(40))) - FF(0)); + auto tmp = (main_sel_op_transaction_fee * (kernel_kernel_in_offset - FF(40))); tmp *= scaling_factor; std::get<118>(evals) += tmp; } @@ -1416,7 +1399,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(119); - auto tmp = ((main_sel_op_chain_id * (kernel_kernel_in_offset - FF(29))) - FF(0)); + auto tmp = (main_sel_op_chain_id * (kernel_kernel_in_offset - FF(29))); tmp *= scaling_factor; std::get<119>(evals) += tmp; } @@ -1424,7 +1407,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(120); - auto tmp = ((main_sel_op_version * (kernel_kernel_in_offset - FF(30))) - FF(0)); + auto tmp = (main_sel_op_version * (kernel_kernel_in_offset - FF(30))); tmp *= scaling_factor; std::get<120>(evals) += tmp; } @@ -1432,7 +1415,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(121); - auto tmp = ((main_sel_op_block_number * (kernel_kernel_in_offset - FF(31))) - FF(0)); + auto tmp = (main_sel_op_block_number * (kernel_kernel_in_offset - FF(31))); tmp *= scaling_factor; std::get<121>(evals) += tmp; } @@ -1440,7 +1423,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(122); - auto tmp = ((main_sel_op_coinbase * (kernel_kernel_in_offset - FF(33))) - FF(0)); + auto tmp = (main_sel_op_coinbase * (kernel_kernel_in_offset - FF(33))); tmp *= scaling_factor; std::get<122>(evals) += tmp; } @@ -1448,7 +1431,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(123); - auto tmp = ((main_sel_op_timestamp * (kernel_kernel_in_offset - FF(32))) - FF(0)); + auto tmp = (main_sel_op_timestamp * (kernel_kernel_in_offset - FF(32))); tmp *= scaling_factor; std::get<123>(evals) += tmp; } @@ -1456,9 +1439,8 @@ template class mainImpl { { Avm_DECLARE_VIEWS(124); - auto tmp = ((main_sel_op_note_hash_exists * - (kernel_kernel_out_offset - (kernel_note_hash_exist_write_offset + FF(0)))) - - FF(0)); + auto tmp = (main_sel_op_note_hash_exists * + (kernel_kernel_out_offset - (kernel_note_hash_exist_write_offset + FF(0)))); tmp *= scaling_factor; std::get<124>(evals) += tmp; } @@ -1466,7 +1448,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(125); - auto tmp = ((main_sel_first * kernel_note_hash_exist_write_offset) - FF(0)); + auto tmp = (main_sel_first * kernel_note_hash_exist_write_offset); tmp *= scaling_factor; std::get<125>(evals) += tmp; } @@ -1474,9 +1456,8 @@ template class mainImpl { { Avm_DECLARE_VIEWS(126); - auto tmp = ((main_sel_op_emit_note_hash * - (kernel_kernel_out_offset - (kernel_emit_note_hash_write_offset + FF(176)))) - - FF(0)); + auto tmp = (main_sel_op_emit_note_hash * + (kernel_kernel_out_offset - (kernel_emit_note_hash_write_offset + FF(176)))); tmp *= scaling_factor; std::get<126>(evals) += tmp; } @@ -1484,7 +1465,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(127); - auto tmp = ((main_sel_first * kernel_emit_note_hash_write_offset) - FF(0)); + auto tmp = (main_sel_first * kernel_emit_note_hash_write_offset); tmp *= scaling_factor; std::get<127>(evals) += tmp; } @@ -1492,11 +1473,10 @@ template class mainImpl { { Avm_DECLARE_VIEWS(128); - auto tmp = ((main_sel_op_nullifier_exists * - (kernel_kernel_out_offset - - ((main_ib * (kernel_nullifier_exists_write_offset + FF(32))) + - ((-main_ib + FF(1)) * (kernel_nullifier_non_exists_write_offset + FF(64)))))) - - FF(0)); + auto tmp = (main_sel_op_nullifier_exists * + (kernel_kernel_out_offset - + ((main_ib * (kernel_nullifier_exists_write_offset + FF(32))) + + ((-main_ib + FF(1)) * (kernel_nullifier_non_exists_write_offset + FF(64)))))); tmp *= scaling_factor; std::get<128>(evals) += tmp; } @@ -1504,7 +1484,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(129); - auto tmp = ((main_sel_first * kernel_nullifier_exists_write_offset) - FF(0)); + auto tmp = (main_sel_first * kernel_nullifier_exists_write_offset); tmp *= scaling_factor; std::get<129>(evals) += tmp; } @@ -1512,7 +1492,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(130); - auto tmp = ((main_sel_first * kernel_nullifier_non_exists_write_offset) - FF(0)); + auto tmp = (main_sel_first * kernel_nullifier_non_exists_write_offset); tmp *= scaling_factor; std::get<130>(evals) += tmp; } @@ -1520,9 +1500,8 @@ template class mainImpl { { Avm_DECLARE_VIEWS(131); - auto tmp = ((main_sel_op_emit_nullifier * - (kernel_kernel_out_offset - (kernel_emit_nullifier_write_offset + FF(192)))) - - FF(0)); + auto tmp = (main_sel_op_emit_nullifier * + (kernel_kernel_out_offset - (kernel_emit_nullifier_write_offset + FF(192)))); tmp *= scaling_factor; std::get<131>(evals) += tmp; } @@ -1530,7 +1509,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(132); - auto tmp = ((main_sel_first * kernel_emit_nullifier_write_offset) - FF(0)); + auto tmp = (main_sel_first * kernel_emit_nullifier_write_offset); tmp *= scaling_factor; std::get<132>(evals) += tmp; } @@ -1538,9 +1517,8 @@ template class mainImpl { { Avm_DECLARE_VIEWS(133); - auto tmp = ((main_sel_op_l1_to_l2_msg_exists * - (kernel_kernel_out_offset - (kernel_l1_to_l2_msg_exists_write_offset + FF(96)))) - - FF(0)); + auto tmp = (main_sel_op_l1_to_l2_msg_exists * + (kernel_kernel_out_offset - (kernel_l1_to_l2_msg_exists_write_offset + FF(96)))); tmp *= scaling_factor; std::get<133>(evals) += tmp; } @@ -1548,7 +1526,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(134); - auto tmp = ((main_sel_first * kernel_l1_to_l2_msg_exists_write_offset) - FF(0)); + auto tmp = (main_sel_first * kernel_l1_to_l2_msg_exists_write_offset); tmp *= scaling_factor; std::get<134>(evals) += tmp; } @@ -1556,9 +1534,8 @@ template class mainImpl { { Avm_DECLARE_VIEWS(135); - auto tmp = ((main_sel_op_emit_unencrypted_log * - (kernel_kernel_out_offset - (kernel_emit_unencrypted_log_write_offset + FF(210)))) - - FF(0)); + auto tmp = (main_sel_op_emit_unencrypted_log * + (kernel_kernel_out_offset - (kernel_emit_unencrypted_log_write_offset + FF(210)))); tmp *= scaling_factor; std::get<135>(evals) += tmp; } @@ -1566,7 +1543,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(136); - auto tmp = ((main_sel_first * kernel_emit_unencrypted_log_write_offset) - FF(0)); + auto tmp = (main_sel_first * kernel_emit_unencrypted_log_write_offset); tmp *= scaling_factor; std::get<136>(evals) += tmp; } @@ -1574,9 +1551,8 @@ template class mainImpl { { Avm_DECLARE_VIEWS(137); - auto tmp = ((main_sel_op_emit_l2_to_l1_msg * - (kernel_kernel_out_offset - (kernel_emit_l2_to_l1_msg_write_offset + FF(208)))) - - FF(0)); + auto tmp = (main_sel_op_emit_l2_to_l1_msg * + (kernel_kernel_out_offset - (kernel_emit_l2_to_l1_msg_write_offset + FF(208)))); tmp *= scaling_factor; std::get<137>(evals) += tmp; } @@ -1584,7 +1560,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(138); - auto tmp = ((main_sel_first * kernel_emit_l2_to_l1_msg_write_offset) - FF(0)); + auto tmp = (main_sel_first * kernel_emit_l2_to_l1_msg_write_offset); tmp *= scaling_factor; std::get<138>(evals) += tmp; } @@ -1592,8 +1568,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(139); - auto tmp = - ((main_sel_op_sload * (kernel_kernel_out_offset - (kernel_sload_write_offset + FF(144)))) - FF(0)); + auto tmp = (main_sel_op_sload * (kernel_kernel_out_offset - (kernel_sload_write_offset + FF(144)))); tmp *= scaling_factor; std::get<139>(evals) += tmp; } @@ -1601,7 +1576,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(140); - auto tmp = ((main_sel_first * kernel_sload_write_offset) - FF(0)); + auto tmp = (main_sel_first * kernel_sload_write_offset); tmp *= scaling_factor; std::get<140>(evals) += tmp; } @@ -1609,8 +1584,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(141); - auto tmp = - ((main_sel_op_sstore * (kernel_kernel_out_offset - (kernel_sstore_write_offset + FF(112)))) - FF(0)); + auto tmp = (main_sel_op_sstore * (kernel_kernel_out_offset - (kernel_sstore_write_offset + FF(112)))); tmp *= scaling_factor; std::get<141>(evals) += tmp; } @@ -1618,7 +1592,7 @@ template class mainImpl { { Avm_DECLARE_VIEWS(142); - auto tmp = ((main_sel_first * kernel_sstore_write_offset) - FF(0)); + auto tmp = (main_sel_first * kernel_sstore_write_offset); tmp *= scaling_factor; std::get<142>(evals) += tmp; } @@ -1627,13 +1601,12 @@ template class mainImpl { Avm_DECLARE_VIEWS(143); auto tmp = - ((((((((main_sel_op_note_hash_exists + main_sel_op_emit_note_hash) + main_sel_op_nullifier_exists) + - main_sel_op_emit_nullifier) + - main_sel_op_l1_to_l2_msg_exists) + - main_sel_op_emit_unencrypted_log) + - main_sel_op_emit_l2_to_l1_msg) * - (kernel_side_effect_counter_shift - (kernel_side_effect_counter + FF(1)))) - - FF(0)); + (((((((main_sel_op_note_hash_exists + main_sel_op_emit_note_hash) + main_sel_op_nullifier_exists) + + main_sel_op_emit_nullifier) + + main_sel_op_l1_to_l2_msg_exists) + + main_sel_op_emit_unencrypted_log) + + main_sel_op_emit_l2_to_l1_msg) * + (kernel_side_effect_counter_shift - (kernel_side_effect_counter + FF(1)))); tmp *= scaling_factor; std::get<143>(evals) += tmp; } diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/mem.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/mem.hpp index 6e4c4fdd982..da94d705197 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/mem.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/mem.hpp @@ -126,7 +126,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(0); - auto tmp = ((mem_lastAccess * (-mem_lastAccess + FF(1))) - FF(0)); + auto tmp = (mem_lastAccess * (-mem_lastAccess + FF(1))); tmp *= scaling_factor; std::get<0>(evals) += tmp; } @@ -134,7 +134,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(1); - auto tmp = ((mem_last * (-mem_last + FF(1))) - FF(0)); + auto tmp = (mem_last * (-mem_last + FF(1))); tmp *= scaling_factor; std::get<1>(evals) += tmp; } @@ -142,7 +142,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(2); - auto tmp = ((mem_rw * (-mem_rw + FF(1))) - FF(0)); + auto tmp = (mem_rw * (-mem_rw + FF(1))); tmp *= scaling_factor; std::get<2>(evals) += tmp; } @@ -150,7 +150,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(3); - auto tmp = ((mem_tag_err * (-mem_tag_err + FF(1))) - FF(0)); + auto tmp = (mem_tag_err * (-mem_tag_err + FF(1))); tmp *= scaling_factor; std::get<3>(evals) += tmp; } @@ -158,7 +158,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(4); - auto tmp = ((mem_sel_op_a * (-mem_sel_op_a + FF(1))) - FF(0)); + auto tmp = (mem_sel_op_a * (-mem_sel_op_a + FF(1))); tmp *= scaling_factor; std::get<4>(evals) += tmp; } @@ -166,7 +166,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(5); - auto tmp = ((mem_sel_op_b * (-mem_sel_op_b + FF(1))) - FF(0)); + auto tmp = (mem_sel_op_b * (-mem_sel_op_b + FF(1))); tmp *= scaling_factor; std::get<5>(evals) += tmp; } @@ -174,7 +174,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(6); - auto tmp = ((mem_sel_op_c * (-mem_sel_op_c + FF(1))) - FF(0)); + auto tmp = (mem_sel_op_c * (-mem_sel_op_c + FF(1))); tmp *= scaling_factor; std::get<6>(evals) += tmp; } @@ -182,7 +182,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(7); - auto tmp = ((mem_sel_op_d * (-mem_sel_op_d + FF(1))) - FF(0)); + auto tmp = (mem_sel_op_d * (-mem_sel_op_d + FF(1))); tmp *= scaling_factor; std::get<7>(evals) += tmp; } @@ -190,7 +190,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(8); - auto tmp = ((mem_sel_resolve_ind_addr_a * (-mem_sel_resolve_ind_addr_a + FF(1))) - FF(0)); + auto tmp = (mem_sel_resolve_ind_addr_a * (-mem_sel_resolve_ind_addr_a + FF(1))); tmp *= scaling_factor; std::get<8>(evals) += tmp; } @@ -198,7 +198,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(9); - auto tmp = ((mem_sel_resolve_ind_addr_b * (-mem_sel_resolve_ind_addr_b + FF(1))) - FF(0)); + auto tmp = (mem_sel_resolve_ind_addr_b * (-mem_sel_resolve_ind_addr_b + FF(1))); tmp *= scaling_factor; std::get<9>(evals) += tmp; } @@ -206,7 +206,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(10); - auto tmp = ((mem_sel_resolve_ind_addr_c * (-mem_sel_resolve_ind_addr_c + FF(1))) - FF(0)); + auto tmp = (mem_sel_resolve_ind_addr_c * (-mem_sel_resolve_ind_addr_c + FF(1))); tmp *= scaling_factor; std::get<10>(evals) += tmp; } @@ -214,7 +214,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(11); - auto tmp = ((mem_sel_resolve_ind_addr_d * (-mem_sel_resolve_ind_addr_d + FF(1))) - FF(0)); + auto tmp = (mem_sel_resolve_ind_addr_d * (-mem_sel_resolve_ind_addr_d + FF(1))); tmp *= scaling_factor; std::get<11>(evals) += tmp; } @@ -235,7 +235,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(13); - auto tmp = ((mem_sel_mem * (mem_sel_mem - FF(1))) - FF(0)); + auto tmp = (mem_sel_mem * (mem_sel_mem - FF(1))); tmp *= scaling_factor; std::get<13>(evals) += tmp; } @@ -243,7 +243,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(14); - auto tmp = ((((-main_sel_first + FF(1)) * mem_sel_mem_shift) * (-mem_sel_mem + FF(1))) - FF(0)); + auto tmp = (((-main_sel_first + FF(1)) * mem_sel_mem_shift) * (-mem_sel_mem + FF(1))); tmp *= scaling_factor; std::get<14>(evals) += tmp; } @@ -251,7 +251,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(15); - auto tmp = ((main_sel_first * mem_sel_mem) - FF(0)); + auto tmp = (main_sel_first * mem_sel_mem); tmp *= scaling_factor; std::get<15>(evals) += tmp; } @@ -259,7 +259,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(16); - auto tmp = ((((-mem_last + FF(1)) * mem_sel_mem) * (-mem_sel_mem_shift + FF(1))) - FF(0)); + auto tmp = (((-mem_last + FF(1)) * mem_sel_mem) * (-mem_sel_mem_shift + FF(1))); tmp *= scaling_factor; std::get<16>(evals) += tmp; } @@ -302,7 +302,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(20); - auto tmp = ((main_sel_first * (-mem_lastAccess + FF(1))) - FF(0)); + auto tmp = (main_sel_first * (-mem_lastAccess + FF(1))); tmp *= scaling_factor; std::get<20>(evals) += tmp; } @@ -310,7 +310,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(21); - auto tmp = (((-mem_lastAccess + FF(1)) * (mem_glob_addr_shift - mem_glob_addr)) - FF(0)); + auto tmp = ((-mem_lastAccess + FF(1)) * (mem_glob_addr_shift - mem_glob_addr)); tmp *= scaling_factor; std::get<21>(evals) += tmp; } @@ -318,12 +318,11 @@ template class memImpl { { Avm_DECLARE_VIEWS(22); - auto tmp = ((mem_sel_rng_chk * (((((mem_lastAccess * (mem_glob_addr_shift - mem_glob_addr)) + - ((-mem_lastAccess + FF(1)) * (mem_tsp_shift - mem_tsp))) - - (mem_diff_hi * FF(4294967296UL))) - - (mem_diff_mid * FF(65536))) - - mem_diff_lo)) - - FF(0)); + auto tmp = (mem_sel_rng_chk * (((((mem_lastAccess * (mem_glob_addr_shift - mem_glob_addr)) + + ((-mem_lastAccess + FF(1)) * (mem_tsp_shift - mem_tsp))) - + (mem_diff_hi * FF(4294967296UL))) - + (mem_diff_mid * FF(65536))) - + mem_diff_lo)); tmp *= scaling_factor; std::get<22>(evals) += tmp; } @@ -331,7 +330,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(23); - auto tmp = ((((-mem_lastAccess + FF(1)) * (-mem_rw_shift + FF(1))) * (mem_val_shift - mem_val)) - FF(0)); + auto tmp = (((-mem_lastAccess + FF(1)) * (-mem_rw_shift + FF(1))) * (mem_val_shift - mem_val)); tmp *= scaling_factor; std::get<23>(evals) += tmp; } @@ -339,7 +338,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(24); - auto tmp = ((((-mem_lastAccess + FF(1)) * (-mem_rw_shift + FF(1))) * (mem_tag_shift - mem_tag)) - FF(0)); + auto tmp = (((-mem_lastAccess + FF(1)) * (-mem_rw_shift + FF(1))) * (mem_tag_shift - mem_tag)); tmp *= scaling_factor; std::get<24>(evals) += tmp; } @@ -347,7 +346,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(25); - auto tmp = (((mem_lastAccess * (-mem_rw_shift + FF(1))) * mem_val_shift) - FF(0)); + auto tmp = ((mem_lastAccess * (-mem_rw_shift + FF(1))) * mem_val_shift); tmp *= scaling_factor; std::get<25>(evals) += tmp; } @@ -365,9 +364,8 @@ template class memImpl { { Avm_DECLARE_VIEWS(27); - auto tmp = ((((mem_tag * (-mem_skip_check_tag + FF(1))) * (-mem_rw + FF(1))) * - (((mem_r_in_tag - mem_tag) * (-mem_one_min_inv + FF(1))) - mem_tag_err)) - - FF(0)); + auto tmp = (((mem_tag * (-mem_skip_check_tag + FF(1))) * (-mem_rw + FF(1))) * + (((mem_r_in_tag - mem_tag) * (-mem_one_min_inv + FF(1))) - mem_tag_err)); tmp *= scaling_factor; std::get<27>(evals) += tmp; } @@ -375,7 +373,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(28); - auto tmp = (((mem_tag * (-mem_tag_err + FF(1))) * mem_one_min_inv) - FF(0)); + auto tmp = ((mem_tag * (-mem_tag_err + FF(1))) * mem_one_min_inv); tmp *= scaling_factor; std::get<28>(evals) += tmp; } @@ -383,7 +381,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(29); - auto tmp = (((mem_skip_check_tag + mem_rw) * mem_tag_err) - FF(0)); + auto tmp = ((mem_skip_check_tag + mem_rw) * mem_tag_err); tmp *= scaling_factor; std::get<29>(evals) += tmp; } @@ -391,7 +389,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(30); - auto tmp = ((mem_rw * (mem_w_in_tag - mem_tag)) - FF(0)); + auto tmp = (mem_rw * (mem_w_in_tag - mem_tag)); tmp *= scaling_factor; std::get<30>(evals) += tmp; } @@ -399,7 +397,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(31); - auto tmp = ((mem_rw * mem_tag_err) - FF(0)); + auto tmp = (mem_rw * mem_tag_err); tmp *= scaling_factor; std::get<31>(evals) += tmp; } @@ -407,7 +405,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(32); - auto tmp = ((mem_sel_resolve_ind_addr_a * (mem_r_in_tag - FF(3))) - FF(0)); + auto tmp = (mem_sel_resolve_ind_addr_a * (mem_r_in_tag - FF(3))); tmp *= scaling_factor; std::get<32>(evals) += tmp; } @@ -415,7 +413,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(33); - auto tmp = ((mem_sel_resolve_ind_addr_b * (mem_r_in_tag - FF(3))) - FF(0)); + auto tmp = (mem_sel_resolve_ind_addr_b * (mem_r_in_tag - FF(3))); tmp *= scaling_factor; std::get<33>(evals) += tmp; } @@ -423,7 +421,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(34); - auto tmp = ((mem_sel_resolve_ind_addr_c * (mem_r_in_tag - FF(3))) - FF(0)); + auto tmp = (mem_sel_resolve_ind_addr_c * (mem_r_in_tag - FF(3))); tmp *= scaling_factor; std::get<34>(evals) += tmp; } @@ -431,7 +429,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(35); - auto tmp = ((mem_sel_resolve_ind_addr_d * (mem_r_in_tag - FF(3))) - FF(0)); + auto tmp = (mem_sel_resolve_ind_addr_d * (mem_r_in_tag - FF(3))); tmp *= scaling_factor; std::get<35>(evals) += tmp; } @@ -439,7 +437,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(36); - auto tmp = ((mem_sel_resolve_ind_addr_a * mem_rw) - FF(0)); + auto tmp = (mem_sel_resolve_ind_addr_a * mem_rw); tmp *= scaling_factor; std::get<36>(evals) += tmp; } @@ -447,7 +445,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(37); - auto tmp = ((mem_sel_resolve_ind_addr_b * mem_rw) - FF(0)); + auto tmp = (mem_sel_resolve_ind_addr_b * mem_rw); tmp *= scaling_factor; std::get<37>(evals) += tmp; } @@ -455,7 +453,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(38); - auto tmp = ((mem_sel_resolve_ind_addr_c * mem_rw) - FF(0)); + auto tmp = (mem_sel_resolve_ind_addr_c * mem_rw); tmp *= scaling_factor; std::get<38>(evals) += tmp; } @@ -463,7 +461,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(39); - auto tmp = ((mem_sel_resolve_ind_addr_d * mem_rw) - FF(0)); + auto tmp = (mem_sel_resolve_ind_addr_d * mem_rw); tmp *= scaling_factor; std::get<39>(evals) += tmp; } @@ -471,7 +469,7 @@ template class memImpl { { Avm_DECLARE_VIEWS(40); - auto tmp = (((mem_sel_mov_ia_to_ic + mem_sel_mov_ib_to_ic) * mem_tag_err) - FF(0)); + auto tmp = ((mem_sel_mov_ia_to_ic + mem_sel_mov_ib_to_ic) * mem_tag_err); tmp *= scaling_factor; std::get<40>(evals) += tmp; } diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/pedersen.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/pedersen.hpp index eb73ea8dfdd..d09722720e9 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/pedersen.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/pedersen.hpp @@ -37,7 +37,7 @@ template class pedersenImpl { { Avm_DECLARE_VIEWS(0); - auto tmp = ((pedersen_sel_pedersen * (-pedersen_sel_pedersen + FF(1))) - FF(0)); + auto tmp = (pedersen_sel_pedersen * (-pedersen_sel_pedersen + FF(1))); tmp *= scaling_factor; std::get<0>(evals) += tmp; } diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/poseidon2.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/poseidon2.hpp index 1f6d384a3f7..a758f8333b2 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/poseidon2.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/poseidon2.hpp @@ -37,7 +37,7 @@ template class poseidon2Impl { { Avm_DECLARE_VIEWS(0); - auto tmp = ((poseidon2_sel_poseidon_perm * (-poseidon2_sel_poseidon_perm + FF(1))) - FF(0)); + auto tmp = (poseidon2_sel_poseidon_perm * (-poseidon2_sel_poseidon_perm + FF(1))); tmp *= scaling_factor; std::get<0>(evals) += tmp; } diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/powers.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/powers.hpp index 7c43cb2db78..dab82e6757e 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/powers.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/powers.hpp @@ -37,7 +37,7 @@ template class powersImpl { { Avm_DECLARE_VIEWS(0); - auto tmp = ((powers_power_of_2 - powers_power_of_2) - FF(0)); + auto tmp = (powers_power_of_2 - powers_power_of_2); tmp *= scaling_factor; std::get<0>(evals) += tmp; } diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/sha256.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/sha256.hpp index d77d4d69f67..189cbb7c699 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/sha256.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/sha256.hpp @@ -37,7 +37,7 @@ template class sha256Impl { { Avm_DECLARE_VIEWS(0); - auto tmp = ((sha256_sel_sha256_compression * (-sha256_sel_sha256_compression + FF(1))) - FF(0)); + auto tmp = (sha256_sel_sha256_compression * (-sha256_sel_sha256_compression + FF(1))); tmp *= scaling_factor; std::get<0>(evals) += tmp; } diff --git a/bb-pilcom/bb-pil-backend/src/relation_builder.rs b/bb-pilcom/bb-pil-backend/src/relation_builder.rs index cfae7c85092..dcb15e54f4e 100644 --- a/bb-pilcom/bb-pil-backend/src/relation_builder.rs +++ b/bb-pilcom/bb-pil-backend/src/relation_builder.rs @@ -399,11 +399,22 @@ fn craft_expression( Expression::Number(_) => (degree, format!("({} + {})", rhs, lhs)), _ => (degree, format!("({} + {})", lhs, rhs)), }, - AlgebraicBinaryOperator::Sub => match lhe.as_ref() { - // BBerg hack, we do not want a field on the lhs of an expression - Expression::Number(_) => (degree, format!("(-{} + {})", rhs, lhs)), - _ => (degree, format!("({} - {})", lhs, rhs)), - }, + AlgebraicBinaryOperator::Sub => { + // BBerg hack here, to make sure we dont have a trivial (- FF(0)) + if let Expression::Number(rhe) = rhe.as_ref() { + // If the binary operation is a sub and the rhs expression is 0, we can just + // return the lhs + if rhe.to_arbitrary_integer() == 0u64.into() { + return (degree, lhs); + } + } + // Otherwise continue with the match + match lhe.as_ref() { + // BBerg hack, we do not want a field on the lhs of an expression + Expression::Number(_) => (degree, format!("(-{} + {})", rhs, lhs)), + _ => (degree, format!("({} - {})", lhs, rhs)), + } + } AlgebraicBinaryOperator::Mul => match lhe.as_ref() { // BBerg hack, we do not want a field on the lhs of an expression Expression::Number(_) => (ld + rd, format!("({} * {})", rhs, lhs)),