Trivial example. First, suppose $X$ is finite. Then we have a finite set $S := X(\overline{\mathbb{F}}_q)$ with an action of $\text{Fr}_q$. How can one explain why the rationality of the zeta function should be true in this case (it is still nonobvious from the definition of $Z(X, t)$)? Let $\mathbb{Q}[S]$ be the vector space spanned by $S$; then we get an induced linear action of $\text{Fr}_q$ on $\mathbb{Q}[S]$. We have$$Z(X, t) = \det(1 - t \cdot \text{Fr}_q; \mathbb{Q}[S])^{-1}.\tag*{$(1)$}$$This is seen by showing that the logarithmic derivatives of the two sides are the same. Let $\{\alpha_i\}$ denote the collection of the eigenvalues of $\text{Fr}_q$ acting on $\mathbb{Q}[S]$, counted with their algebraic multiplicities. Then$$\det(1 - t \cdot \text{Fr}_q) = \prod_i (1 - \alpha_i t).$$Applying $t \cdot {{\text{d}\log}\over{\text{d}t}}$ to both sides of $(1)$, we obtain$$\sum_{n = 1}^\infty |X(\mathbb{F}_{q^n})|t^n = \sum_i \sum_{n = 1}^\infty (\alpha_i t)^n = \sum_{n = 1}^\infty \text{Tr}(\text{Fr}_q^n) \cdot t^n.$$However, it is very easy to see that$$\text{Tr}(\text{Fr}_q^n; \mathbb{Q}[S]) = \left|S^{\text{Fr}_q^n}\right|,$$and so we get $(1)$ as desired.
A very different, but morally analogous, story. Let$$X = \text{compact }C^\infty\text{ manifold},$$$$\text{Fr} = \text{a self-diffeomorphism of }X,\text{ such that }\forall n \in \mathbb{N}, \text{ }\left|X^{\text{Fr}^n}\right| < \infty.$$Assume that $X$ is orientable, and that for any fixed point $x \in X$ of $\text{Fr}^n$ (for some $n \in \mathbb{N})$, the condition $\det(1 - \text{Fr}^n; T_xX) > 0$ holds. Then $\deg(1 - \text{Fr}^n; T_xX) \neq 0$ for all $x \in X^{\text{Fr}^n}$ is equivalent to all fixed points of $\text{Fr}^n$ being nondegenerate, i.e. the corresponding intersection points of $\Delta_X$ and $\Gamma(\text{Fr}^n)$ are transverse (here, $\Delta$ means diagonal, $\Gamma$ means graph). Now we can define the zeta function $Z((X, \text{Fr}), t)$ in the same way as above:$$Z((X, \text{Fr}), t) = \prod_{i = 0}^{\dim X} \det(1 - t \cdot \text{Fr}^*; H^i(X, \mathbb{Q}))^{(-1)^{i + 1}}.\tag*{$(2)$}$$If $X$ is finite, then $H^0(X, \mathbb{Q}) \cong \mathbb{Q}[X]^*$, and we are essentially reduced to the previous example.
- Anyways, applying $t \cdot {{\text{d}\log}\over{\text{d}t}}$ to both sides of $(2)$, we can reduce it to the following identity, the well-known Grothendieck-Lefschetz fixed point formula: for all $n \in \mathbb{N}$,$$\left|X^{\text{Fr}^n}\right| = \sum_{i = 0}^{\dim X} (-1)^i \text{Tr}\left(\text{Fr}^n; H^i(X, \mathbb{Q})\right).\tag*{(3)}$$
What I want. I want to see how one can guess the Lefschetz fixed point formula, which entails an informal argument which can be turned into a rigorous proof. The idea to imitate the argument given above in the case where $X$ is finite. I want to use the fact that cohomology can be computed as the de Rham cohomology.
Question. Pretend that all the spaces of differential forms $\Omega^i(X)$ are finite dimensional, replace $H^u(X)$ by $\Omega^i(X)$. How do I see $(2)$ by using the same method that I used in the case where $X$ is finite? What are the extra nuances I have to take into consideration/take care of?