pub struct UairSignature<Prime: Semiring> { /* private fields */ }Expand description
The signature of a UAIR.
Public columns precede witness columns within each type group.
The flattened trace ordering is:
[pub_bin, wit_bin, pub_arb, wit_arb, pub_int, wit_int].
Implementations§
Source§impl<Prime: Semiring> UairSignature<Prime>
impl<Prime: Semiring> UairSignature<Prime>
Sourcepub fn new(
total_cols: TotalColumnLayout,
public_cols: PublicColumnLayout,
shifts: Vec<ShiftSpec>,
lookup_specs: Vec<LookupColumnSpec>,
) -> Self
pub fn new( total_cols: TotalColumnLayout, public_cols: PublicColumnLayout, shifts: Vec<ShiftSpec>, lookup_specs: Vec<LookupColumnSpec>, ) -> Self
Create a new signature, sorting shifts by source_col.
Sourcepub fn with_primes(self, primes: Vec<Prime>) -> Self
pub fn with_primes(self, primes: Vec<Prime>) -> Self
Attach the prime-power tuple (q_1, ..., q_n) that
$F_{q_i}[X]$-constraints emitted by this UAIR live over.
Sourcepub fn primes(&self) -> &[Prime]
pub fn primes(&self) -> &[Prime]
Prime-power tuple (q_1, ..., q_n) declared by this UAIR. Empty for
UAIRs with $Q[X]$-only constraints.
Sourcepub fn with_bit_op_specs(self, bit_op_specs: Vec<BitOpSpec>) -> Self
pub fn with_bit_op_specs(self, bit_op_specs: Vec<BitOpSpec>) -> Self
Attach bit-op virtual column specs to the signature.
Each spec must reference a binary_poly source column. The bit-op count
must be less than the binary-poly cell width W; materialization sites
check that bound with their const DEGREE_PLUS_ONE parameter.
§Down-row ordering invariant
Bit-op virtuals slot into the binary_poly slice of the down
TraceRow, after the shifted-binary entries and before any
non-binary entries. The full ordering of the down row is:
[shifted_binary_poly..., bit_op_binary_poly..., shifted_arbitrary_poly..., shifted_int...]This keeps down consistent with ColumnLayout’s
binary_poly || arbitrary_poly || int partitioning. Materialization
code in CPR / mp_eval must respect this order; appending bit-op evals
at the tail of down_evals would silently misalign constraint indices
on mixed-type shift UAIRs.
Insertion order of bit_op_specs determines the position of each
bit-op virtual within its sub-slice.
Sourcepub fn with_affine_virtual_specs(
self,
affine_virtual_specs: Vec<AffineVirtualSpec>,
) -> Self
pub fn with_affine_virtual_specs( self, affine_virtual_specs: Vec<AffineVirtualSpec>, ) -> Self
Attach affine virtual booleanity specs to the signature.
Each term in each spec must be unshifted and reference a binary_poly
column. Affine virtuals describe Q-side {0,1}^{<D}[X] membership
targets such as the Ch/Maj linear combinations in the Zinc+ paper. They
are not committed columns and do not affect the down-row layout.
pub fn lookup_specs(&self) -> &[LookupColumnSpec]
pub fn total_cols(&self) -> &TotalColumnLayout
pub fn public_cols(&self) -> &PublicColumnLayout
Sourcepub fn witness_cols(&self) -> &WitnessColumnLayout
pub fn witness_cols(&self) -> &WitnessColumnLayout
Witness column counts (total minus public) per type.
pub fn shifts(&self) -> &[ShiftSpec]
Sourcepub fn bit_op_specs(&self) -> &[BitOpSpec]
pub fn bit_op_specs(&self) -> &[BitOpSpec]
Bit-op virtual column specs, in insertion order. Each spec contributes one binary_poly entry to the down row, appended after the shifted entries.
Sourcepub fn affine_virtual_specs(&self) -> &[AffineVirtualSpec]
pub fn affine_virtual_specs(&self) -> &[AffineVirtualSpec]
Affine virtual booleanity specs, in insertion order.
Sourcepub fn bit_op_down_offset(&self) -> usize
pub fn bit_op_down_offset(&self) -> usize
Number of row-shift virtual columns that precede bit-op virtuals in the down-row ordering.
The full down-row order is:
[shifted_binary_poly..., bit_op_binary_poly..., shifted_arbitrary_poly..., shifted_int...].
Sourcepub fn down_cols(&self) -> &VirtualColumnLayout
pub fn down_cols(&self) -> &VirtualColumnLayout
Column-type layout of the down row (shifted virtuals + bit-op virtuals).
Sourcepub fn dummy_rows<T: Clone>(&self, val: T) -> (Vec<T>, Vec<T>)
pub fn dummy_rows<T: Clone>(&self, val: T) -> (Vec<T>, Vec<T>)
Build correctly-sized dummy up and down TraceRows for static
analysis (constraint counting, degree counting, scalar/ideal
collection).
Trait Implementations§
Source§impl<Prime: Clone + Semiring> Clone for UairSignature<Prime>
impl<Prime: Clone + Semiring> Clone for UairSignature<Prime>
Source§fn clone(&self) -> UairSignature<Prime>
fn clone(&self) -> UairSignature<Prime>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<Prime> Freeze for UairSignature<Prime>
impl<Prime> RefUnwindSafe for UairSignature<Prime>where
Prime: RefUnwindSafe,
impl<Prime> Send for UairSignature<Prime>
impl<Prime> Sync for UairSignature<Prime>
impl<Prime> Unpin for UairSignature<Prime>where
Prime: Unpin,
impl<Prime> UnsafeUnpin for UairSignature<Prime>
impl<Prime> UnwindSafe for UairSignature<Prime>where
Prime: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more