Skip to content

docs: Add mathematical proof for Lagrange interpolation optimizations #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GarmashAlex
Copy link

Description

This PR adds a comprehensive mathematical proof for two key optimization points in the Lagrange interpolator implementation:

  1. The formula v_inv[0] = m*h^{m-1} - Proven by analyzing the product representation and leveraging properties of multiplicative groups
  2. The recurrence relation v_inv[i] = g^{-1} * v_inv[i-1] - Derived through algebraic manipulation and group theory properties

These optimizations significantly reduce the computational cost of Lagrange interpolation by avoiding redundant calculations and leveraging mathematical properties of finite fields.

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (master)
  • Linked to Github issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests (N/A - Documentation

@GarmashAlex GarmashAlex requested a review from a team as a code owner April 15, 2025 19:27
@GarmashAlex GarmashAlex requested review from Pratyush, mmagician and weikengchen and removed request for a team April 15, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant