I'm trying to get the gist of the proof of the Weil conjectures. Let $X$ be a variety over $\mathbb{F}_{p^n}$. A priori $Z(X,t)\in \mathbb{Q}[[t]]$. Due to the Grothendieck-Lefschetz fixed point theorem, $Z(X,t)=\prod P_i(t)^{(-1)^{i+1}}$, where $P_i(t)$ is the characteristic polynomial of the Frobenius acting on $H^i(X,\mathbb{Q}_l)$ where $l$ is a fixed prime different from $p$. This implies that $Z(X,t)\in \mathbb{Q}_l(t)\cap \mathbb{Q}[[t]]$ for every prime $l$ different from $p$.
Does this suffice to determine that it is in $\mathbb{Q}(t)$? If not, then how was it proven that it is in $\mathbb{Q}(t)$?