4. If the function $f(x)=\sin ^{t} x \cdot \sin t x+\cos ^{t} x \cdot \cos t x-$ $\cos ^{2} 2 x$ is a constant for all real numbers $x$, then the value of the positive integer $t$ is ().
(A) 3
(B) 1
(C) 3 or 1
(D) does not exist
4. A.

From $x=0$ we know $f(0)=0$.
Also, by the problem statement, for all real numbers $x, f(x)$ is always a constant, so it must be that $f(x)=0$.
Taking $x=\frac{\pi}{t}$, we have
$$
\begin{array}{l}
f\left(\frac{\pi}{t}\right)=\sin ^{4} \frac{\pi}{k} \sin \pi+\cos ^{t} \frac{\pi}{k} \cos \pi-\cos ^{\prime} \frac{2 \pi}{t}=0, \\
-\cos ^{t} \frac{\pi}{t}=\cos ^{t} \frac{2 \pi}{t} .
\end{array}
$$

Clearly, $t$ is an odd number, so
$$
\begin{array}{l}
-\cos \frac{\pi}{t}=\cos \frac{2 \pi}{t}, \\
\cos \left(\pi-\frac{\pi}{t}\right)=\cos \frac{2 \pi}{t}, \\
\pi-\frac{\pi}{t}=2 n \pi \pm \frac{2 \pi}{t},(n \in Z) \\
1-\frac{1}{t}=2 n \pm \frac{2}{t} .
\end{array}
$$

From this, we get $t=1$ or 3.
When $t=1$, $f(x)=1-\cos 2 x$ is not always 0.
It can be verified that when $t=3$, $f(x)$ is always 0.