Skip to main content

new_split_half

Function new_split_half 

Source
pub fn new_split_half<'alloc, A, F, P>(
    alloc: &'alloc A,
    num: FieldVec<P, A>,
    den: FieldVec<P, A>,
    eval_point: Vec<F>,
    claims: [F; 2],
) -> LayerProver<'alloc, A, F, P>
where A: Allocator, F: Field, P: PackedField<Scalar = F>,
Expand description

Creates the LayerProver reducing one fractional-addition layer, sharing two allocations.

num and den each have one more variable than eval_point:

  • their low halves fix the highest variable to 0,
  • their high halves fix it to 1.

The reduction proves the fractional addition of those halves. Both halves of each buffer live inside the one allocation, so separating them costs no copy.

§Arguments

  • num, den - The layer’s numerator and denominator buffers.
  • eval_point - The shared point at which both claims are taken.
  • claims - The layer’s claimed numerator and denominator evaluations, in that order.

§Preconditions

  • num.log_len() == den.log_len()
  • num.log_len() == eval_point.len() + 1