pub fn check_eval<'a, F, C>(
wiring: &'a WiringInfo,
public_eval: C::Elem,
r_x: &[C::Elem],
subspace: &BinarySubspace<F>,
r_zhat_prime: &C::Elem,
output: &VerifyOutput<C::Elem>,
channel: &mut C,
) -> Result<WiringEvalClaim<'a, C::Elem>, Error>Expand description
Validates the evaluation claims from the shift reduction protocol.
After the shift reduction protocol completes, this function checks that the prover-provided witness evaluation is consistent with the expected values. It reads the wiring multilinear’s evaluation from the prover and verifies the final equation relating the witness and monster evaluations.
§Protocol Details
The function verifies that:
eval = trace_eval * monster_evalwhere monster_eval is the prover’s claimed wiring evaluation — the AND, IMUL and BMUL
constraint polynomials summed — scaled by the sumcheck’s two bit-index factors, the Lagrange
weights and the interpolated shift indicators, both at r_i.
That claim is not checked here. It comes back as a WiringEvalClaim, holding the function
that evaluates the wiring multilinear from public-channel-derived values together with the
claimed value it must equal, for the caller to discharge however it opens claims.
trace_eval is the witness evaluation reconstructed from its two segments:
trace_eval = (1 - r_segment) * public_eval + r_segment * witness_evalpublic_eval is the public segment over the shift’s whole index space — r_j over the bit
within a word and all of r_y over the word — so it already carries the zero-padding above the
segment’s own length. Tying it to the public values is the caller’s job: the caller reads it
from the prover and reduces it onto the packed public segment, so a prover that used different
public values fails there rather than here.
r_x is the constraint point every padded operation matrix is claimed at. Only the point enters
here; the evaluation claims at it are verify’s to batch.
wiring is the wiring multilinear the returned claim is about.
§Panics
Panics if wiring is laid out over a different point than output and r_x form, since it
would then name a different polynomial.
§Errors
Error::VerificationFailureif the evaluation equation doesn’t hold- Propagates errors from reading the wiring evaluation off the channel