From 587a99a2576e0dde9dbfd57ca5bcd563468f9728 Mon Sep 17 00:00:00 2001 From: narodnik Date: Fri, 24 Sep 2021 13:11:35 +0200 Subject: [PATCH] fix bug in halo2 sage script --- script/research/halo/halo2.sage | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/research/halo/halo2.sage b/script/research/halo/halo2.sage index f22bf5757..2402a8c14 100644 --- a/script/research/halo/halo2.sage +++ b/script/research/halo/halo2.sage @@ -274,7 +274,7 @@ for a in range(5): current = last_y_value # i iterates over the columns in our partition - for i in range(a * m, (a + 1)): + for i in range(a * m, (a + 1) * m): current *= v[i][j] + beta * delta^i * omega^j + gamma current /= v[i][j] + beta * s[i][j] + gamma @@ -308,7 +308,7 @@ gate_3 = f_4_X * (a_1_X * a_2_X * a_3_X - a_4_X) c = gate_0 + y * gate_1 + y^2 * gate_2 + y^3 * gate_3 t = X^n - 1 for i in range(n): - assert h(omega^i) == 0 + assert c(omega^i) == 0 # Normally we do: #h = c / t # But for some reason sage is producing fractional coefficients