snarkify / sirius

A Plonkish folding framework for Incrementally Verifiable Computation (IVC).
MIT License
106 stars 15 forks source link

feat(poly): impl `get_lagrange_poly_for_cyclic_group` #255

Closed cyphersnake closed 1 month ago

cyphersnake commented 1 month ago

Calculation of Lagrange polynomials Input: k number of instances to be folded (i.e. k+1 is the domain size with $k+1=2^{k'}$.). Output: Lagrange polynomial L_i(X), i in {0,1,...,k}

For cyclic group ${1,\omega,\cdots,\omega^k}$. The Lagrange polynomial over it is defined by $L_i(X)=\frac{\omega^i}{n}\frac{X^k-1}{X-\omega^i}$

fn eval evaluate Lagrange Polynomial L_i at any given point.

fn get_lagrange_poly_for_cyclic_group(k: usize, i: usize) -> Expression<F> {
    // construct cyclic group of size k+1
     //return L_i(X) expression above.
}