Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permutation example #1195

Draft
wants to merge 41 commits into
base: main
Choose a base branch
from
Draft

Permutation example #1195

wants to merge 41 commits into from

Conversation

chriseth
Copy link
Member

No description provided.

};

let compress_selected_exprs: int, expr, expr, expr, expr[] -> expr = |id, alpha, beta, sel, exprs|
sel * (compress_columns(alpha, exprs) + id + beta - 1) + 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does the ID come from? We don't really need it, do we? I think it's a way to share the accumulator between several permutations, which we're not doing here?

};

let compress_selected_exprs: expr, expr, expr, expr[] -> expr = |alpha, beta, sel, exprs|
sel * (compress_columns(alpha, exprs) + beta - 1) + 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sel * (compress_columns(alpha, exprs) + beta - 1) + 1;
sel * (beta - compress_columns(alpha, exprs) - 1) + 1;

I think both is sound, but this makes it clear we're evaluating $$\prod_{i = 1}^n (X - a_i)$$ at a random point.

@chriseth
Copy link
Member Author

chriseth commented May 6, 2024

Wondering if this PR is superseded, but it adds the new_witness_in_stage builtin. That's all it does.

@leonardoalt
Copy link
Member

is it worth it to revive it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants