-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9855348
commit 1bbcc9b
Showing
3 changed files
with
20 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
use std::prelude::Query; | ||
use std::convert::fe; | ||
use std::protocols::lookup::lookup; | ||
use std::math::fp2::from_base; | ||
use std::prover::challenge; | ||
|
||
machine Main with degree: 8 { | ||
|
||
// Pre-compute f(X) = X + 1 for X = 1, 2, 3, 4, 5, 6, 7, 8 | ||
col fixed X_PRECOMPUTED = [1, 2, 3, 4, 5, 6, 7, 8]; | ||
col fixed Y_PRECOMPUTED = [2, 3, 4, 5, 6, 7, 8, 9]; | ||
|
||
// Runtime values, masking some elements | ||
col fixed x = [2, 2, 5, 4, 7, 8, 3, 3]; | ||
col fixed MASK = [1, 1, 0, 1, 1, 1, 0, 1]; | ||
col fixed x = [1, 5, 2, 6, 4, 2, 6, 3]; | ||
col witness y; | ||
|
||
col fixed m = [0, 2, 1, 1, 0, 0, 1, 1]; | ||
// Pre-compute f(x) = x + 1 for all x in [1, 8] | ||
col fixed INC_X = [1, 2, 3, 4, 5, 6, 7, 8]; | ||
col fixed INC_Y = [2, 3, 4, 5, 6, 7, 8, 9]; | ||
|
||
// Machine extractor currently accepts the multiplicity column with exact the name of "m_logup_multiplicity" | ||
col witness m_logup_multiplicity; | ||
|
||
// This would be the correct multiplicity values that would satisfy the constraints: | ||
//col fixed m_logup_multiplicity = [1, 2, 1, 1, 1, 2, 0, 0]; | ||
|
||
let lookup_constraint = MASK $ [x, y] in [X_PRECOMPUTED, Y_PRECOMPUTED]; | ||
let lookup_constraint = [x, y] in [INC_X, INC_Y]; | ||
|
||
lookup(lookup_constraint, m); | ||
} | ||
lookup(lookup_constraint, m_logup_multiplicity); | ||
} |
This file was deleted.
Oops, something went wrong.