Solution (source code)

= Solution
{c}

For the distinct <interpolation nodes>, define the <Lagrange cardinal polynomials>
$$
L_i(x)=\prod_{\substack{0\leq j\leq n\\j\ne i}}
\frac{x-x_j}{x_i-x_j},\qquad i=0,\ldots,n.
$$
Every denominator is nonzero, each $L_i$ has <polynomial degree> at most $n$, and $L_i(x_j)=\delta_{ij}$. Hence the <Lagrange interpolation polynomial>
$$
\boxed{p_n(x)=\sum_{i=0}^n f_iL_i(x)}
$$
belongs to $\Pi_n$ and has $p_n(x_j)=f_j$. This proves existence.

If $p_n$ and $\widetilde p_n$ both fit the data, their difference has <polynomial degree> at most $n$ but vanishes at the $n+1$ distinct <interpolation nodes>. Repeated application of the <factor theorem> implies that $\prod_{j=0}^n(x-x_j)$ divides that difference. A nonzero <polynomial> of degree at most $n$ cannot have such a divisor of degree $n+1$. Thus $p_n-\widetilde p_n=0$, proving uniqueness. When $n=0$, the empty product defining $L_0$ is $1$, so the argument includes the constant case.