Is there a Riemann-Roch for smooth projective curves over an arbitrary field? Let $X$ be a smooth projective curve over a field $k$. We let $\omega$ be the canonical
line bundle of $X$ and we denote by $F$ the field of $k$-valued rational functions on $X$. 
(1) When $k$ is algebraically closed then $\omega$ is a dualizing sheaf for $X$. From there it is
easy to prove Riemann-Roch for regular (holomorphic) line bundles $L$ over $X$: By this I mean
a precise formula which computes the Euler characteristic of $L$ in terms of the degree
of $L$ and the genus of $X$ (I think of both as being topological invariants).
(2) When $k$ is a finite field then one may consider the topological ring $\mathbf{A}_F$,
the ring of Adeles of $F$. Doing Fourrier analysis on this self-dual locally compact abelian group and doing a counting argument one may deduce Riemann-Roch.
Q1: Is it possible to generalize Riemann-Roch to other fields? What about real and $p$-adic numbers?
Q2: Is $\omega$ a dualizing sheaf when $k$ is finite? If not 
(I guess that in general one has to replace the notion of dualizing sheaf by some kind
of complex in a derived category)
Q3: Is there a way to prove simultaneously $(1)$ and $(2)$?
Q4: Is there some notion that would encompass simultaneuously $\mathbf{A}_F$ and $\omega$? 
 A: Dear Hugo, the wonderful formalism of schemes allows us to have a Riemann-Roch theorem for a projective curve $X$  over an arbitrary field $k$, even without any assumption of smoothness.
It says, like in the good old times of Riemann surfaces, that for a Cartier divisor $D$ on $X$ we have
 $$\chi (\mathcal O_X(D))= deg(D)+ \chi (\mathcal O_X)$$ 
There is a dualizing sheaf $\omega$ and  Serre duality yields the formula 
$$  h^0(X,\mathcal O_X(D))-h^0(X,\omega \otimes\mathcal O_X(-D))=1-p_a(X)+deg D$$
where $p_a(X)=1-\chi(\mathcal O_x)$ is the so called arithmetic genus of the curve.
Everything is in our friend Qing Liu's fantastic book Algebraic Geometry and Arithmetic Curves but I bet he's too modest to give you this obvious answer!
Edit The first displayed formula is actually valid in  even greater generality: it holds for any projective curve $X$ (smooth or not) over an arbitrary artinian ring $k$. The proof is on page 164 of 
Altman, A.; Kleiman, S., Introduction to Grothendieck duality theory. Lecture
Notes in Mathematics No. 146, Springer-Verlag, Berlin-New York, 1970
Complement  As an answer to Hugo's question in his comment below, let me add that indeed, in the case of a smooth projective curve over a field $k$, the dualizing sheaf $\omega$ is nothing else than the canonical sheaf . More generally for a smooth projective variety of dimension $r$ over $k$, the dualizing sheaf is just the canonical sheaf $\omega=\Omega^r_{X/k}$.  This is (a special case of) Theorem I.4.6, page 14 in Altman-Kleiman's monograph.
A: Yes. There is a Riemann-Roch for smooth projective curves over arbitrary fields. It was proved by the German school of function fields in the 30's. From (2) I deduce that you've been reading Weil's "Basic Number Theory". Anyway, the proof that Weil gives there is a shortened version of a proof he gave of the full theorem. It's in his collected works ("Algebraische Beweis der Riemann-Roch Satz", or some such title). The proof is reproduced in many books, particularly those with "function field" in the title (e.g. Stichtenoth) or Lang's "Introduction to algebraic and abelian functions" (watch for misprints, as usual). You can also prove it with the modern geometric machinery. A book that bridges the two approaches is Serre's "Groupes algebriques et corps de classes". There is absolutely no restriction on the ground field, except the proof is slightly more tortuous when the field is not perfect.
