pub trait IsZeroInstruction<F: Field> {
    // Required method
    fn assign(
        &self,
        region: &mut Region<'_, F>,
        offset: usize,
        value: Value<F>
    ) -> Result<(), Error>;
}
Expand description

Trait that needs to be implemented for any gadget or circuit that wants to implement IsZero.

Required Methods§

source

fn assign( &self, region: &mut Region<'_, F>, offset: usize, value: Value<F> ) -> Result<(), Error>

Given a value to be checked if it is zero:

  • witnesses inv0(value), where inv0(x) is 0 when x = 0, and 1/x otherwise

Implementors§

source§

impl<F: Field> IsZeroInstruction<F> for IsZeroChip<F>