pub fn prove<A, P, Channel>(
alloc: &A,
packed_witness: FieldSlice<'_, P>,
n_pack: usize,
eval_point: &[B128],
channel: &mut Channel,
) -> RingSwitchOutput<A, P>Expand description
Prove the ring-switching reduction.
Takes the packed witness and evaluation point from shift reduction, and:
- Computes partial evaluations s_hat_v
- Sends s_hat_v to verifier via channel
- Samples row-batching challenges
- Computes the ring-switching equality indicator and sumcheck claim
Returns the transparent polynomial and sumcheck claim for BaseFold.
§Arguments
alloc- the allocator the ring-switching equality indicator is drawn frompacked_witness- the packed witness buffer (B1 polynomial packed into P elements), zero at and aboven_packn_pack- the oracle’s length; the indicator vanishes above iteval_point- the evaluation point from shift reductionchannel- the prover channel for sending/sampling
The claim may span more coordinates than the packed witness, when the word-index space is wider
than the oracle. The witness is zero there, so the surplus coordinates contribute the scale
c = Π (1 - r_j), which enters every tensor entry before the row-batching fold.
§Preconditions
packed_witness.log_len() + log_packing <= eval_point.len()where log_packing is the base-2 log of the extension degree of B128 over B1 (= 7)n_pack <= 2^packed_witness.log_len()