Skip to main content

batch_prove_unequal_depths

Function batch_prove_unequal_depths 

Source
pub fn batch_prove_unequal_depths<'a, A, F, P, Channel>(
    provers: Vec<ProdcheckProver<'a, A, P>>,
    claimed_products: Vec<F>,
    selector_point: Vec<F>,
    channel: &mut Channel,
) -> BatchProveUnequalDepthsOutput<F, impl MleCheckProver<F> + use<'a, A, F, P, Channel>>
where A: Allocator, F: Field, P: PackedField<Scalar = F>, Channel: IPProverChannel<F>,
Expand description

Runs a batched product check for trees of unequal depths.

This is batch_prove without the requirement that every prover have the same layer count. Each tree shallower than the deepest is proved as a product check over the one-padding of its witness — the same witness with constant-1 leaves filling the extra depth, which leaves its product unchanged. The transcript is then exactly that of an equal-depth batch of the maximum depth: the verifier runs the ordinary binius_ip::prodcheck::verify over n_layers layers and never learns the individual depths.

Unlike batch_prove, every prover must reduce over all of its witness variables, so each product is a scalar and there is no content point. The one-padding is only worth its bookkeeping on full trees, and dropping the content dimension keeps that bookkeeping to two scalars per layer.

The prover does not materialize the padded witnesses. Each layer’s per-tree reduction runs through one_pad_mle, which corrects the unpadded layer’s messages in $O(1)$ per round.

The protocol and the round polynomials are specified in the Batched Product Checks of Unequal Depths appendix of the Binius64 whitepaper.

§Arguments

As batch_prove, except that the provers’ layer counts may differ and there is no content_point.

§Preconditions

  • provers must be non-empty.
  • Every prover’s witness must have exactly prover.n_layers() variables, which must be at least 1.
  • 2^selector_point.len() >= provers.len().
  • claimed_products.len() == provers.len().

§Returns

This stops one layer short, returning each tree’s reduced claim beside the prover for its final (widest) layer — the layer whose reduction dominates the cost, which a caller can therefore batch with other sumchecks. Running those provers and the selector rounds that follow finishes the check.

The returned claims and, after the final layer, the per-tree leaf evaluations are claims on the padded witnesses. unpad_leaf_claim reduces one to the claim on the tree’s own witness.