Skip to main content

UairSignature

Struct UairSignature 

Source
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>

Source

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.

Source

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.

Source

pub fn primes(&self) -> &[Prime]

Prime-power tuple (q_1, ..., q_n) declared by this UAIR. Empty for UAIRs with $Q[X]$-only constraints.

Source

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.

Source

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.

Source

pub fn lookup_specs(&self) -> &[LookupColumnSpec]

Source

pub fn total_cols(&self) -> &TotalColumnLayout

Source

pub fn public_cols(&self) -> &PublicColumnLayout

Source

pub fn witness_cols(&self) -> &WitnessColumnLayout

Witness column counts (total minus public) per type.

Source

pub fn shifts(&self) -> &[ShiftSpec]

Source

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.

Source

pub fn affine_virtual_specs(&self) -> &[AffineVirtualSpec]

Affine virtual booleanity specs, in insertion order.

Source

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...].

Source

pub fn down_cols(&self) -> &VirtualColumnLayout

Column-type layout of the down row (shifted virtuals + bit-op virtuals).

Source

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>

Source§

fn clone(&self) -> UairSignature<Prime>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Prime: Debug + Semiring> Debug for UairSignature<Prime>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.