Skip to content

feat(multilinear): the sumcheck, and the two arguments built on it - #998

Draft
ColoCarletti wants to merge 1 commit into
whir-pr/01-shared-from-starkfrom
whir-pr/02-sumcheck
Draft

ColoCarletti wants to merge 1 commit into
whir-pr/01-shared-from-starkfrom
whir-pr/02-sumcheck

Conversation

@ColoCarletti

Copy link
Copy Markdown
Collaborator

New crate. Nothing in the tree calls it yet.

The sumcheck reduces a sum over 2^n points to one evaluation: each round
the prover sends a one-variable polynomial, the verifier draws, the cube
halves. It does not send g(0) — that comes from the claim the round
entered with — which saves a pass over the cube and one element per round,
and has a consequence worth knowing: a round never rejects. The only
rejection is the final claim, and discharging it is the caller's. All four
callers here do.

Two uses on top: zerocheck says a polynomial vanishes on the whole cube,
logup says a bus balances. Neither is a separate protocol — both are a
weight and a claim handed to the same rounds. batch runs several
statements over one cube in one pass; claim_reduce ties shifted reads
back to the columns they read.

zerocheck is the reference, not the path, and says so: a real table's
constraints go in as a compiled batch::Rule.

gpu is only the half that declines — every entry point returns None, so
the whole thing is host-only and reads without a card.

One test is worth pointing at: the_claims_are_bound_to_the_batching_challenge.
Pull the claim absorptions out of both sides and every proof still verifies
and every other test passes; what is lost is soundness, and only the
transcript sees it. Checked that it is the one test that fails.

One brick and two uses.

The sumcheck reduces a sum over `2^n` points to a single evaluation: round by
round the prover sends a one-variable polynomial, the verifier draws, and the
cube halves. The form here does not send `g(0)` — it is recovered from the claim
the round entered with, since `g(0) + g(1)` is that claim — which saves a whole
pass over the cube and one element per round, and has a consequence worth
stating plainly: **a round never rejects.** Verification recovers `g(0)`,
absorbs, draws and interpolates; the only rejection a sumcheck has is its final
claim, and discharging that is the caller's.

On top of it, two arguments. The zerocheck says a polynomial vanishes on the
whole cube, by weighting it with `eq(r, ·)` at the cost of one degree. LogUp-GKR
says a bus balances, by reducing a tree of fractions layer by layer. Neither is
a separate protocol: both are a weight and a claim handed to the same rounds.
`claim_reduce` ties the shifted views a table reads back to the columns they
read, so a shifted read is not a second commitment.

`batch` is what makes that one pass instead of several: statements over one cube
share their factors and their rounds, combined with powers of a challenge. The
claims are absorbed **before** that challenge is drawn — which is the only thing
stopping a prover from picking a statement after seeing it.

`gpu` is the seam to the device, and this is the half that declines: every entry
point returns `None`, so the whole path is host-only and can be read without a
card. The half that does the work lands last.

`zerocheck` is the reference and says so: a real table's constraints go in as a
compiled `batch::Rule` beside its two bus claims, so all three share one pass
over one factor list. Nothing outside tests calls it. It stays because the tests
that do call it are `stark`'s, they run the production polynomial through it, and
three of them are negative.

What pinches it: 128 tests, in debug and parallel. The one to know about is
`batch::the_claims_are_bound_to_the_batching_challenge`, which is not a test of a
proof — pull the three claim absorptions out of both sides and every other test
still passes, because the two sides still agree and the proof still verifies.
What is lost is soundness, and the only thing that sees it is the transcript:
two different claims have to give different challenges. Checked that it is the
one test that fails.

Not wired to anything. Nothing in the tree calls this crate yet.
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.

1 participant