Skip to content

Commit

Permalink
Merge pull request #2721 from o1-labs/marc/fix-cons-sel
Browse files Browse the repository at this point in the history
o1vm/pickles: fix selectors constraints
  • Loading branch information
dannywillems authored Oct 18, 2024
2 parents 0dab255 + ae58bc5 commit 8c9ceb3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions o1vm/src/interpreters/mips/constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::{
lookups::{Lookup, LookupTableIDs},
E,
};
use ark_ff::{Field, One, Zero};
use ark_ff::{Field, One};
use kimchi::circuits::{
expr::{ConstantTerm::Literal, Expr, ExprInner, Operations, Variable},
gate::CurrOrNext,
Expand Down Expand Up @@ -632,9 +632,9 @@ impl<Fp: Field> Env<Fp> {
(var.clone() - one.clone()) * var.clone()
})
.collect();
let enforce_one_activation = (0..N_MIPS_SEL_COLS).fold(E::<Fp>::zero(), |res, i| {
let enforce_one_activation = (0..N_MIPS_SEL_COLS).fold(E::<Fp>::one(), |res, i| {
let var = self.variable(MIPSColumn::Selector(i));
res + var.clone()
res - var.clone()
});

enforce_bool.push(enforce_one_activation);
Expand Down

0 comments on commit 8c9ceb3

Please sign in to comment.