Skip to content

Add fixed-domain barycentric interpolation for repeated-query univariate evaluation #183

Description

@eliasjudin

Summary

Add a fixed-domain barycentric interpolation surface to CompPoly.CPolynomial.CLagrange for repeated-query univariate evaluation over a field.

For pairwise distinct nodes x : Fin n → R, store the barycentric weights
w_i = ∏_{j ≠ i} (x_i - x_j)⁻¹
once and evaluate by the classical second barycentric formula:

  • if z = x_i, return y_i;
  • otherwise return
    (∑ i, w_i * y_i * (z - x_i)⁻¹) / (∑ i, w_i * (z - x_i)⁻¹).

Correctness target

Prove that for every y : Fin n → R and z : R,
BarycentricDomain.eval y z = (Lagrange.interpolate Finset.univ x y).eval z.

Also derive the CompPoly-facing corollary
BarycentricDomain.eval y z = (CLagrange.interpolate Finset.univ x y).eval z,
together with the roots-of-unity specialization agreeing with CLagrange.interpolatePow.

Motivation

This supports the Phase 2 evaluation/interpolation track by separating one-time nodal preprocessing from per-query evaluation on a fixed domain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions