diff --git a/goldilocks/base.go b/goldilocks/base.go index aa59b20..9a27802 100644 --- a/goldilocks/base.go +++ b/goldilocks/base.go @@ -215,6 +215,9 @@ func (p *Chip) ReduceWithMaxBits(x Variable, maxNbBits uint64) Variable { remainder := NewVariable(result[1]) p.RangeCheck(remainder) + + p.api.AssertIsEqual(x, p.api.Add(p.api.Mul(quotient, MODULUS), remainder.Limb)) + return remainder }