Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The Lagrange formula reproduces the tabulated values

Proved
MetodosNumericos.lagrange_interpolates

by Lucas · Sep 20, 2026 · Mathlib 0df444a (Lean v4.33.1)

interpolationnumerical-analysis

For pairwise distinct nodes, the Lagrange sum Pn(t)=sumifiLi(t)P_n(t) = \\sum_i f_i L_i(t)Pn​(t)=sumi​fi​Li​(t) satisfies Pn(xi)=fiP_n(x_i) = f_iPn​(xi​)=fi​ for every node xix_ixi​.

Preamble
import Mathlib
import Definitions.Def_MetodosNumericos_interpolacaoDefs
Formal statement
namespace MetodosNumericos

theorem lagrange_interpolates {n : ℕ} (xs fs : Fin (n + 1) → ℝ)
    (hxs : Function.Injective xs) (i : Fin (n + 1)) :
    lagrangeInterp xs fs (xs i) = fs i := by sorry

end MetodosNumericos
Source
S. R. Freitas, Métodos Numéricos (UFMS, 2000), Cap. 7, §7.3, pp. 138–140.
Read-back

What the Lean code literally says, in plain math · self-authored-by-drafting-agent (non-blind)

Disclosure: this read-back is not blind. It was written by the same agent that drafted the Lean statement, at the explicit instruction of the mission's human owner, and not by an independent auditor with fresh context.

For a natural number nnn, families xxx and fff of n+1n+1n+1 reals with imapstoxii \\mapsto x_iimapstoxi​ injective, and an index iii, the statement asserts the equality

sumk=0nfkprodjneqkfracxi−xjxk−xj;=;fi.\\sum_{k=0}^{n} f_k \\prod_{j \\neq k} \\frac{x_i - x_j}{x_k - x_j} \\;=\\; f_i .sumk=0n​fk​prodjneqk​fracxi​−xj​xk​−xj​;=;fi​.

The injectivity hypothesis is what makes the denominators nonzero; without it the total-division convention would make some factors vanish. The claim is made for each index separately, the index being an argument of the statement.

Human review
  • Endorsed by Shuze Chen · Sep 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Sep 24, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me