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

remove assumption that first column of constraint system is always 1 #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bh2smith
Copy link
Contributor

The edited lines were somewhat restrictive to the assumption that the first column of the constraint system is always 1. This does not appear to be necessary (even when the first component of the input vector is 1). The changes here result in equivalent evaluation for the project's example(s) and enables satisfiability for more general constraints systems.

If there is any particular reason for this that I may have overlooked, please let me know.

@bh2smith
Copy link
Contributor Author

As an alternative, equivalent, suggestion

The line

final FieldT value = index == 0 ? one : input.get((int) index).mul(terms.get(i).value());

could also be replaced with

final FieldT value = index == 0 ? one.mul(terms.get(i).value()) : input.get((int) index).mul(terms.get(i).value());

But this doesn't appear to add much value.

@alexpArtos
Copy link

This would solve Issue #11.

doutv pushed a commit to doutv/dizk that referenced this pull request Jul 5, 2023
remove assumption that first column of constraint system is always 1
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.

2 participants