I am a beginner in studying the Christoffel-Darboux kernel polynomials that were defined as follows: $$ K_n(y,x)=\sum_{k=0}^n p_k(y)p_k(x), $$ where $p_0,...,p_n$ are orthonormal polynomials for a weight $w$ in the interval $[a,b]$, i.e $\int_a^b p_i(x)p_j(x)w(x)dx=\delta_{ij}$, the Kronecker-Delta.
I am trying to prove that the kernel polynomials are the only polynomials having the reproducing property given by: \begin{equation} \int_a^b K_n(t,x)q_n(t)w(t)dt=q_n(x)\hspace{1cm} (1) \end{equation} where $q_n$ is a polynomial of degree at most $n$.
What I have tried so far: I thought about replacing $K_n(t,x)$ by an arbitrary function in $t$ and $x$. Let's say $f(t,x)$. I assumed that $(1)$ holds for this substitution and wrote $q_n(x)$ in the orthonormal basis $\{p_n\}$, i.e. $q_n=\sum_{k=0}^n a_k p_k(x)$. Replacing it in $(1)$ I obtained that:
\begin{align*} &~\int_a^b f(t,x)q_n(t)w(t)dt = q_n(x)\\ \Leftrightarrow & ~ \int_a^b f(t,x)\left(\sum_{k=0}^{n}a_kp_k(t)\right)w(t)dt =q_n(x)\\ \Leftrightarrow & ~ a_0\int_a^b f(t,x)p_0(t)w(t)dt +...+ a_n \int_a^b f(t,x)p_n(t)w(t)dt= a_0p_0(x)+...+a_np_n(x) \end{align*}
Making the respective correspondence I have that $\int_a^b f(t,x)p_i(t)w(t)dt=p_i(x)$, for all $i \in \{0,1,...,n\}$.
Is what am I doing so far right? I don't know if I am just not seeing how, from here, I can see that $f(t,x)$ is going to be equal to $K_n(t,x)$. Any help is very much appreciated!