Closed delehef closed 1 month ago
@delehef Is this a fix for #138, or just something you have noticed ?
Test case:
(defcolumns (A :binary) B)
(defconstraint test1 () (vanishes! (eq (eq! A B) 1)))
This originally generated:
test1 :=
(A .- B - 1)^2
And now generates:
=== Constraints ===
test1 :=
1 - (A .- B .- 1) * C/INV[(.- (.- A B) 1)]
NORM[(.- (.- A B) 1)] :=
|(.- (.- A B) 1)| == (.- (.- A B) 1) × C/INV[(.- (.- A B) 1)]
(.- (.- A B) 1)×(1 - (.- (.- A B) 1)×C/INV[(.- (.- A B) 1)]) = 0
C/INV[(.- (.- A B) 1)]×(1 - (.- (.- A B) 1)×C/INV[(.- (.- A B) 1)]) = 0
=== Computations ===
C/INV[(.- (.- A B) 1)] = (inv (.- (.- A B) 1))
Have also recompiled the zkevm.bin
and that appears to have gone through.
Just something I noticed while crafting an example for #139 ;)
The following patch must be applied to the standard library:
~>>
is a no-op in the current state of affairs, and will always be for single-field-element values.