Skip to main content

pad_leaf_fraction

Function pad_leaf_fraction 

Source
pub fn pad_leaf_fraction<E: FieldOps>(fraction: (E, E), pad_eq: E) -> (E, E)
Expand description

Pads a leaf fraction — the forward map that the prover’s unpad_leaf_claim inverts.

Padding a tree scales its numerator by the padding coordinates’ equality weight $q$ and sends its denominator through the one-padding selector $\textsf{sel}(q, v) = 1 + (v - 1) q$. A verifier that rebuilds a padded batch’s leaf claim from transparent parts applies this to each tree. The inverse direction is the prover’s: only it holds claims on padded witnesses to reduce, so unpad_leaf_claim lives in binius-ip-prover.

The weight is a parameter rather than the padding coordinates, so a caller padding several trees computes each distinct one once.

§Arguments

  • fraction - The unpadded leaf’s numerator and denominator.
  • pad_eq - The padding coordinates’ equality weight $\text{eq}(0^\nu; X_\text{pad})$, which is the all-zeros equality indicator over the lowest coordinates of the leaf point.