3#include "barretenberg/ecc/curves/bn254/fq.hpp"
4#include "barretenberg/ecc/curves/bn254/fr.hpp"
5#include "barretenberg/ecc/curves/bn254/g1.hpp"
6#include "barretenberg/polynomials/univariate.hpp"
8#include "barretenberg/transcript/transcript.hpp"
10#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp"
11#include "barretenberg/stdlib/primitives/biggroup/biggroup.hpp"
12#include "barretenberg/stdlib/primitives/field/field.hpp"
14namespace proof_system::plonk::stdlib::recursion::utility {
44 return field_ct::from_witness(builder, native_element);
55 return field_ct::from_witness(builder, native_element);
66 return element_ct::from_witness(builder, native_element);
74 template <
size_t LENGTH>
75 static std::array<field_ct, LENGTH>
from_witness(
Builder* builder, std::array<FF, LENGTH> native_element)
77 std::array<field_ct, LENGTH>
element;
78 for (
size_t i = 0; i < LENGTH; ++i) {
79 element[i] = field_ct::from_witness(builder, native_element[i]);
89 template <
size_t LENGTH>
93 for (
size_t i = 0; i < LENGTH; ++i) {
94 element.value_at(i) = field_ct::from_witness(builder, native_element.value_at(i));
114 template <
size_t LENGTH>
struct NativeType<uint32_t, LENGTH> {
115 using type = uint32_t;
126 template <
size_t LENGTH>
struct NativeType<std::array<field_ct, LENGTH>, 0> {
127 using type = std::array<FF, LENGTH>;
A univariate polynomial represented by its values on {domain_start, domain_start + 1,...
Definition: univariate.hpp:23
Definition: affine_element.hpp:11
Definition: standard_circuit_builder.hpp:12
Definition: biggroup.hpp:22
Utility class for converting native types to corresponding stdlib types.
Definition: utility.hpp:26
static Univariate_ct< LENGTH > from_witness(Builder *builder, Univariate< LENGTH > native_element)
Construct field_t array from native Univariate type.
Definition: utility.hpp:90
static element_ct from_witness(Builder *builder, Commitment native_element)
Construct stdlib group from native affine group element type.
Definition: utility.hpp:64
static field_ct from_witness(Builder *builder, FF native_element)
Construct stdlib field from native field type.
Definition: utility.hpp:53
static std::array< field_ct, LENGTH > from_witness(Builder *builder, std::array< FF, LENGTH > native_element)
Construct field_t array from native field array.
Definition: utility.hpp:75
static field_ct from_witness(Builder *builder, uint32_t native_element)
Construct stdlib field from uint32_t.
Definition: utility.hpp:42
Utility for mapping template parameter for recursive honk transcript deserialization to the correspon...
Definition: utility.hpp:110