Module expr

Source

Modules§

constraints
A number of useful constraints
prologue
You can import this module like use kimchi::circuits::expr::prologue::* to obtain a number of handy aliases and helpers

Macros§

auto_clone
Auto clone macro - Helps make constraints more readable by eliminating requirement to .clone() all the time
auto_clone_array

Structs§

Cache
A cache
CacheId
A key for a cached value
Constants
The collection of constants required to evaluate an Expr.
Linearization
A “linearization”, which is linear combination with E coefficients of columns.
RowOffset
Variable
A type representing a variable which can appear in a constraint. It specifies a column and a relative position (Curr or Next)

Enums§

ConstantExprInner
ConstantTerm
Define the constant terms an expression can use. It can be any constant term (Literal), a matrix (Mds - used by the permutation used by Poseidon for instance), or endomorphism coefficients (EndoCoefficient - used as an optimisation). As for challengeTerm, it has been used initially to implement the PLONK IOP, with the custom gate Poseidon. However, the terms have no built-in semantic in the expression framework. TODO: we should generalize the expression type over challenges and constants. See https://github.com/MinaProtocol/mina/issues/15287
ExprError
ExprInner
FeatureFlag
The feature flags that can be used to enable or disable parts of constraints.
Operations
PolishToken
For efficiency of evaluation, we compile expressions to reverse Polish notation expressions, which are vectors of the below tokens.

Traits§

AlphaChallengeTerm
The Challenge term that contains an alpha. Is used to make a random linear combination of constraints
ColumnEnvironment
ColumnEvaluations
FormattedOutput
Literal

Functions§

l0_1
Computes prod_{j != n} (1 - omega^j) Assure we don’t multiply by (1 - omega^n) = (1 - omega^0) = (1 - 1) = 0
unnormalized_lagrange_basis

Type Aliases§

ConstantExpr
Expr
An multi-variate polynomial over the base ring C with variables