Trait kimchi_msm::circuit_design::capabilities::HybridCopyCap
source · pub trait HybridCopyCap<F: PrimeField, CIx: ColumnIndexer>where
Self: ColAccessCap<F, CIx>,{
// Required method
fn hcopy(&mut self, x: &Self::Variable, ix: CIx) -> Self::Variable;
}
Expand description
Capability for computing arithmetic functions and enforcing constraints simultaneously.
The “hybrid” in the name of the trait (and other traits here) means “maybe”.
That is, it allows computations which /might be/ no-ops (even partially) in the constraint builder case. For example, “hcopy”, despite its name, does not do any “write”, so hcopy !=> write_column.
Required Methods§
Implementors§
impl<'a, F: PrimeField, CIx1: ColumnIndexer, CIx2: ColumnIndexer, Env1: HybridCopyCap<F, CIx1>, L: MPrism<Source = CIx1, Target = CIx2>> HybridCopyCap<F, CIx2> for SubEnvColumn<'a, F, CIx1, Env1, L>
impl<'a, F: PrimeField, CIx1: ColumnIndexer, Env1: HybridCopyCap<F, CIx1>, L> HybridCopyCap<F, CIx1> for SubEnvLookup<'a, F, CIx1, Env1, L>
impl<F: PrimeField, CIx: ColumnIndexer, LT: LookupTableID> HybridCopyCap<F, CIx> for ConstraintBuilderEnv<F, LT>
impl<F: PrimeField, CIx: ColumnIndexer, const N_WIT: usize, const N_REL: usize, const N_DSEL: usize, const N_FSEL: usize, LT: LookupTableID> HybridCopyCap<F, CIx> for WitnessBuilderEnv<F, CIx, N_WIT, N_REL, N_DSEL, N_FSEL, LT>
If Env
implements real write (“for sure” writes), you can implement
hybrid copy (that is only required to “maybe” copy). The other way
around violates the semantics.
Sadly, rust does not allow “cover” instances to define this impl
for every T: ColWriteCap
.