feat: implement log-derivative argument over small fields#1673
Merged
feat: implement log-derivative argument over small fields#1673
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements log-derivative argument support for small fields (BabyBear, KoalaBear, Goldilocks) by utilizing field extensions and the WithWideCommitment interface. Previously, attempting to use range checking with small fields would panic; this change enables it for single-column tables.
Key changes:
- Enables log-derivative arguments over small fields using field extensions
- Adds small field test coverage for range checking
- Removes panic for WideCommitter in rangecheck package
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| std/rangecheck/rangecheck.go | Removes panic for WideCommitter case and enables commit-based range checking for small fields |
| std/rangecheck/rangecheck_test.go | Refactors test to use CheckCircuit helper, reduces test size, and adds dedicated small field test |
| std/internal/logderivarg/logderivarg.go | Implements small field support using field extensions and WithWideCommitment, but only for single-column tables |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9 tasks
ThomasPiellard
approved these changes
Jan 12, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We previously didn't support doing log-derivative argument over small fields as we didn't have operations for defining the log-derivative argument. But now with #1672 we can complete the implementation.
This particularly allows for lookups, range checks etc.
NB! Merge only after #1672.
Type of change
How has this been tested?
Checklist:
golangci-lintdoes not output errors locallyNote
Enables the log-derivative argument on small fields and aligns range checking to work with wide commitments.
logderivarg.Build: usefieldextensionops andmulticommit.WithWideCommitment; add extension-based coefficient/combination helpers and small-field detection viasmallfields.IsSmallFieldWithCommitmentand batch inversion where availablerangecheck.Newto returnnewCommitRangecheckerforfrontend.WideCommitter(remove panic)test.WithSmallfieldCheck()to lookup; rework rangecheck tests (smaller samples, explicit invalid assignments, add small-field variant)Written by Cursor Bugbot for commit 67ed00c. This will update automatically on new commits. Configure here.