While calculating an integral in a quantum mechanical problem by two different methods, I came across the following identity $$\sum_{k=0}^n\sum_{m=0}^{2k}(-2)^m\binom{2(n-k)}{n-k}\binom{2k}{k}\binom{2k}{m}\cos^m{\phi}U_m(\cos{\phi})=2^{2n}U_{2n}(\cos{\phi})P_n(\cos{2\phi}),$$ where $U_m(x)$ are Chebyshev polynomials of the second kind and $P_n(x)$ is the Legendre polynomial. Is this identity known? Were similar identities considered in the literature?
P.S. It seems this is a special $m=0$ case of a more general identity $$\sum\limits_{k=0}^n\sum\limits_{r=0}^{2k}(-2)^r \frac{(k+1)_m}{(m+r+1)_m}\binom{2(n-k)}{n-k}\binom{2k}{r} \binom{2(m+k)}{m+k}\cos^r{\phi}\,U_{m+r}(\cos{\phi})= 2^{2n}U_{2n+m}(\cos{\phi})\,P_n^{(0,m)}(\cos{2\phi}),$$ where $P_n^{(0,m)}$ is the Jacobi polynomial and $(x)_m=\Gamma(x+m)/\Gamma(x)$.
One more identity with symmetrical double sum is $$\sum\limits_{k=0}^n\sum\limits_{r=0}^n \frac{(-1)^{k+r}(n+1)_m(k+r+1)_m}{(k+1)_m(r+1)_m}\binom{n}{k}\binom{n}{r} \binom{k+r}{k}\cos^{k+r}{\phi}U_{m+k+r}(\cos{\phi})= U_{2n+m}(\cos{\phi})\,P_n^{(0,m)}(\cos{2\phi}).$$
Can a similar identity be found for the double sum $$\sum_{m_1=0}^n\sum_{m_2=0}^n\frac{(-1)^{m_1+m_2}(m_1+m_2+1)_m} {(m+1)_m(m+1)_m}\binom{n}{m_1}\binom{n}{m_2}\binom{m_1+m_2}{m_1} \times $$ $$(m+m_1+m_2+1)\, {_2{F}_1}(a,a+1/2;k+3/2;-\tan^2{\phi}),$$ where $a=1+(m+m_1+m_2)/2$? Such a generalization, if found, will allow to increase numerical stability of certain atomic form factors calculations.