pub enum AirExpr<F: Field> {
Constant(F),
Ref(ColumnRef),
Neg(Box<AirExpr<F>>),
Sum(Box<AirExpr<F>>, Box<AirExpr<F>>),
Product(Box<AirExpr<F>>, Box<AirExpr<F>>),
}Expand description
A symbolic polynomial expression over row-relative column references.
Used to define AIR transition constraints: expressions that must
equal zero for every consecutive row pair (row[i], row[i+1]).
§Examples
use field_cat::F101;
use machine_cat::{AirExpr, Column};
// Constraint: next_a - current_b = 0
let current_b = AirExpr::<F101>::current(Column::new(1));
let next_a = AirExpr::<F101>::next(Column::new(0));
let constraint = next_a - current_b;Variants§
Constant(F)
A field constant.
Ref(ColumnRef)
A row-relative column reference.
Neg(Box<AirExpr<F>>)
Negation.
Sum(Box<AirExpr<F>>, Box<AirExpr<F>>)
Sum of two expressions.
Product(Box<AirExpr<F>>, Box<AirExpr<F>>)
Product of two expressions.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for AirExpr<F>where
F: Freeze,
impl<F> RefUnwindSafe for AirExpr<F>where
F: RefUnwindSafe,
impl<F> Send for AirExpr<F>where
F: Send,
impl<F> Sync for AirExpr<F>where
F: Sync,
impl<F> Unpin for AirExpr<F>where
F: Unpin,
impl<F> UnsafeUnpin for AirExpr<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for AirExpr<F>where
F: 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
Mutably borrows from an owned value. Read more