Struct kimchi::circuits::polynomials::complete_add::CompleteAdd
source · pub struct CompleteAdd<F>(_);
Expand description
Implementation of the CompleteAdd
gate
It uses the constraints
(x2 - x1) * s = y2 - y1 s^2 = x1 + x2 + x3 y3 = s (x1 - x3) - y1
for addition and
2 * s * y1 = 3 * x1^2 s^2 = 2 x1 + x3 y3 = s (x1 - x3) - y1
for doubling.
See here for the formulas used.
Trait Implementations§
source§impl<F> Argument<F> for CompleteAdd<F>where
F: PrimeField,
impl<F> Argument<F> for CompleteAdd<F>where F: PrimeField,
source§const ARGUMENT_TYPE: ArgumentType = _
const ARGUMENT_TYPE: ArgumentType = _
The type of constraints that this will produce.
This is important to enforce that we don’t combine the constraints
with powers of alpha that collide with other mutually inclusive arguments.
source§const CONSTRAINTS: u32 = 7u32
const CONSTRAINTS: u32 = 7u32
The number of constraints created by the argument.
source§fn constraint_checks<T: ExprOps<F, BerkeleyChallengeTerm>>(
env: &ArgumentEnv<F, T>,
cache: &mut Cache
) -> Vec<T>
fn constraint_checks<T: ExprOps<F, BerkeleyChallengeTerm>>( env: &ArgumentEnv<F, T>, cache: &mut Cache ) -> Vec<T>
Constraints for this argument
source§impl<F: Default> Default for CompleteAdd<F>
impl<F: Default> Default for CompleteAdd<F>
source§fn default() -> CompleteAdd<F>
fn default() -> CompleteAdd<F>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<F> RefUnwindSafe for CompleteAdd<F>where F: RefUnwindSafe,
impl<F> Send for CompleteAdd<F>where F: Send,
impl<F> Sync for CompleteAdd<F>where F: Sync,
impl<F> Unpin for CompleteAdd<F>where F: Unpin,
impl<F> UnwindSafe for CompleteAdd<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