Skip to content

Commit

Permalink
fix: fix multiplicity to handle dummy rows in LogUp
Browse files Browse the repository at this point in the history
  • Loading branch information
zmalatrax committed Dec 2, 2024
1 parent a73c9c3 commit 7c07c4c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/brainfuck_prover/src/components/memory/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@ impl FrameworkEval for MemoryEval {
eval.add_constraint(d.clone() * (next_mp - mp.clone()));

// If `d` is set, then `mv` remains the same
eval.add_constraint(d * (next_mv - mv.clone()));
eval.add_constraint(d.clone() * (next_mv - mv.clone()));

// LogUp of `clk`, `mp` and `mv`
let multiplicity = E::EF::from(d) - E::EF::one();
eval.add_to_relation(&[RelationEntry::new(
&self.memory_lookup_elements,
-E::EF::one(),
multiplicity,
&[clk, mp, mv],
)]);

Expand Down

0 comments on commit 7c07c4c

Please sign in to comment.