Is the following the right definition of $L$-functions (on the Galois side)? This question may be too elementary for this forum, but I have asked it on math stackexchange and didn't get an answer. I have now deleted it so there wouldn't be duplicates... Here is the question as it appeared on math stackexchange:
I know that this question is pretty elementary, but I'm still trying to grasp the basics of number theory, and I want to make sure I'm thinking about things correctly. Most likely, I am thinking about things in a way that is slightly off. Since it's so complicated, I would appreciate if you can point out for me any misconceptions that I have.
Let $X_{\mathbb{Q}}$ be a variety over $\mathbb{Q}$. I am trying to understand how to associate to $X_{\mathbb{Q}}$ an $L$-function. As I understand it (please correct any mistakes I make in my narrative) there's an $L$-function for every $i=0,1,2,...$ (for convenience call them $L_0, L_1,L_2, ...$). Starting at $2dim(X)+1$ the $L_i$'s are just $1$. The $L$-function'' associated to all of $X_{\mathbb{Q}}$, by which I mean the Hasse-Weil Zeta Function, is $\prod L_i$.
Let's fix $i$. The function $L_i$ is defined to be the product of $L$-functions $L_{i,p}$, where $p$ runs over all primes in $\mathbb{Z}$. Here things get murky again. We choose a model $X_{\mathbb{Z}}$ of $X_{\mathbb{Q}}$ over $\mathbb{Z}$. (How? It can't be that any model would work, can it?) Now we fix a Weil Cohomology theory (as I understand it, it shouldn't matter which. Is that true? Is it only a conjecture that it's true?). For example we can look at $l$-adic cohomology where $l$ is a prime coprime to $p$. Then we define $L_{i,p}(x)$ to be $P_i(x)^{(-1)^i}$ where $P_i(x)$ is the characteristic polynomial of the action of the Frobenius element on $H^i(X_{\mathbb{Z}/p},\mathbb{Q}_l)$ (or whichever Weil Cohomology theory we chose).
Questions
First of all I would like to know if the narrative above is accurate. If not, please tell me where. Particular things I am vague about are:
$1.$ How does one choose the model of $X_{\mathbb{Q}}$ over $\mathbb{Z}$?
$2.$ Is it true that we can choose any Weil Cohomology? Is that conjectural, or proven?
$3.$ As I understand it, it should be true that $\prod_{p \in Spec(\mathbb{Z})} L_{i,p}= e^{\sum_{l=1}^{\infty} |X_{\mathbb{Z}/p}(\mathbb{F}_p)|\frac{x^l}{l}}$. Is that right?
$4.$ Does this construction differ in any substantial way if we defined a Hasse-Weil Zeta function for a variety defined over a number field different from $\mathbb{Q}$?
 A: *

*A naive way of choosing a model is to write down some equations and clear denominators. The L-functions will depend on the model but only finitely many factors coming from "bad" primes. I think you want to assume that your variety is smooth and projective, otherwise some pathologies may happen. Nailing down the factors at the bad primes is trickier and I am not sure there is a nice way to do it, independent of the model, in general.

*There are theorems giving comparisons between étale (for any $\ell \ne p$) and crystalline cohomology in char $p$. If you have an abstract Weil cohomology that satisfies the Riemann hypothesis, then the local L-factors are uniquely determined (see 3. below).

*Your formula is wrong. What is true is that (for a fixed prime $p$ of good reduction)
$\prod_i L_{i,p} = e^{\sum_n |X_{\mathbb{Z}/p}(\mathbb{F}_{p^n})|p^{-ns}/n}$.
From this it follows that $\prod_i L_{i,p}$ is independent of the cohomology. RH then says that the reciprocals of the zeros of $L_{i,p}$ (as a polynomial in $t=p^{-s}$) have absolute value $p^{i/2}$. From this, you can extract the individual $L_{i,p}$ from the product over $i$.

*No. It's basically the same, using prime ideals instead of prime numbers.
A: 1 One does not need a model to find the L-function. The Frobenius element is a conjugacy class, up to ramification, in the Galois group of $\mathbb Q$. The Galois group of $\mathbb Q$ acts on the $l$-adic etale cohomology for every prime $l$ not $p$, and for the $p$-adic cohomology. However there is much more ramification for $p$-adic cohomology.
One takes the characteristic polynomial of the action of Frobenius on the invariants of the action of the ramification group. This is well-defined.
2 To prove a relationship between different $l$s, one can use a model over $\mathbb Z$. In particular one wants a model that is smooth and proper at $p$. Then one uses base change theorems to relate etale cohomology of the rational fiber and the characteristic p fiber, and then relates different characteristic $p$ cohomologies via the Lefschetz Trace Formula. However this only works for $l\neq p$, so one chooses an $L$-function via $l$-adic cohomology where $l\neq p$.
