pub trait ConstraintBuilder {
type Expr: Semiring;
type Ideal: Ideal + IdealCheck<Self::Expr>;
// Required methods
fn assert_in_ideal(&mut self, expr: Self::Expr, ideal: &Self::Ideal);
fn assert_zero(&mut self, expr: Self::Expr);
}Expand description
The abstract interface to constraint building logic. In essence it allows to create constraints modulo ideals.
Required Associated Types§
Sourcetype Expr: Semiring
type Expr: Semiring
The expressions the constraint builder operates on. It is opaque from the PoV of an AIR apart from the fact that arithmetic operations are available on it and one can check if an expression is in an ideal.
Sourcetype Ideal: Ideal + IdealCheck<Self::Expr>
type Ideal: Ideal + IdealCheck<Self::Expr>
The type of ideals used by the constraint builder.
Required Methods§
Sourcefn assert_in_ideal(&mut self, expr: Self::Expr, ideal: &Self::Ideal)
fn assert_in_ideal(&mut self, expr: Self::Expr, ideal: &Self::Ideal)
Add a constraint saying that expr belongs to the ideal ideal.
Sourcefn assert_zero(&mut self, expr: Self::Expr)
fn assert_zero(&mut self, expr: Self::Expr)
Add a constraint saying that expr is equal to zero which is
the same as saying that expr belongs to the zero ideal.