For a variety $X$ over a finite field, I guess one can take $\ell$-adic sheaves to replace differential forms. Then the local integral around a closed point $x$ (like integral over a little loop around that point) is the trace of the local Frobenius $Frob_x$ on the stalk of sheaf, the so-called naive local term. Note that $Frob_x$ can be regarded as an element (or conjugacy class) in $\pi_1(X)$, "a loop around $x$". The global integral would be the global trace map $$H^{2d}c(X,\mathbf{Q}{\ell})\to\mathbf{Q}_{\ell}(-d),$$ $H^{2d}_c(X,\mathbf{Q}_{\ell})\to\mathbf{Q}_{\ell}(-d), $$ and the Tate twist is responsible for the Hodge structure in Betti cohomology (or the (2\pi i)^d one has to divide by). The Lefschetz trace formula might be the analog of the residue theorem in complex analysis on Riemann surfaces. For the case of number fields, each closed point v in Spec\ O_k still defines a "loop" Frob_v in \pi_1(Spec\ k) (let's allow ramified covers. One can take the image of Frob_v under \pi_1(Spec\ k)\to\pi_1(Spec\ O_k), but the target group doesn't seem to be big enough). For global integral, there's the Artin-Verdier trace map H^3(Spec\ O_k,\mathbb G_m)\to\mathbb{Q/Z} and a "Poincar\'e duality" in this setting, but I don't know if there is a trace formula. The fact that 3 is odd always makes me excited and confused. So basically I think of trace maps (both local and global) as counterpart of integrals. Correct me if I was wrong. 7 added 6 characters in body For a variety X over a finite field, I guess one can take \ell-adic sheaves to replace differential forms. Then the local integral around a closed point x (like integral over a little loop around that point) is the trace of the local Frobenius Frob_x on the stalk of sheaf, the so-called naive local term. Note that Frob_x can be regarded as an element (or conjugacy class) in \pi_1(X), "a loop around x". The global integral would be the global trace map H^{2d}H^{2d}c(X,\mathbf{Q}\ell)\to\mathbf{Q}_\ell(-d), {\ell})\to\mathbf{Q}_{\ell}(-d),$$ and the Tate twist is responsible for the Hodge structure in Betti cohomology (or the$(2\pi i)^d$one has to divide by). The Lefschetz trace formula might be the analog of the residue theorem in complex analysis on Riemann surfaces. For the case of number fields, each closed point$v$in$Spec\ O_k$still defines a "loop"$Frob_v$in$\pi_1(Spec\ k)$(let's allow ramified covers. One can take the image of$Frob_v$under$\pi_1(Spec\ k)\to\pi_1(Spec\ O_k)$, but the target group doesn't seem to be big enough). For global integral, there's the Artin-Verdier trace map$H^3(Spec\ O_k,\mathbb G_m)\to\mathbb{Q/Z}$and a "Poincar\'e duality" in this setting, but I don't know if there is a trace formula. The fact that 3 is odd always makes me excited and confused. So basically I think of trace maps (both local and global) as counterpart of integrals. Correct me if I was wrong. 6 dollars added For a variety$X$over a finite field, I guess one can take$\ell$-adic sheaves to replace differential forms. Then the local integral around a closed point$x$(like integral over a little loop around that point) is the trace of the local Frobenius$Frob_x$on the stalk of sheaf, the so-called naive local term. Note that$Frob_x$can be regarded as an element (or conjugacy class) in$\pi_1(X)$, "a loop around$x$". The global integral would be the global trace map H^{2d}_c(X, Q_l)\to Q_l(-d),$H^{2d}c(X,\mathbf{Q}\ell)\to\mathbf{Q}_\ell(-d),$and the Tate twist is responsible for the Hodge structure in Betti cohomology (or the$(2\pi i)^d$one has to divide by). The Lefschetz trace formula might be the analog of the residue theorem in complex analysis on Riemann surfaces. For the case of number fields, each closed point$v$in$Spec\ O_k$still defines a "loop"$Frob_v$in$\pi_1(Spec\ k)$(let's allow ramified covers. One can take the image of$Frob_v$under$\pi_1(Spec\ k)\to\pi_1(Spec\ O_k)$, but the target group doesn't seem to be big enough). For global integral, there's the Artin-Verdier trace map$H^3(Spec\ O_k,\mathbb G_m)\to\mathbb{Q/Z}\$ and a "Poincar\'e duality" in this setting, but I don't know if there is a trace formula. The fact that 3 is odd always makes me excited and confused.