The algebraic version of Riemann-Hilbert correspondence It is well known that if I have a differentiable manifold (holomorphic manifold) $M$, then I have a functor from the category of vector bundles on $M$ with flat connections to the category of local systems on $M$, given by $$(V,\nabla)\mapsto V^{\nabla}$$ and this functor is an equivalence of categories.
Now if I change the setting a little bit. I assume $X$ is a smooth scheme over a field $k$ of characteristic 0. Do I still have a functor like the above? Or in other words, is it true that
for any vector bundle $(V,\nabla)$ on $X$ the sheaf of horizontal sections $V^{\nabla}$ (i.e. the kernel of $\nabla$ as $k$-vector spaces) is still a locally constant sheaf of $k$-vector spaces?
I think it is true, and it should be written somewhere, could you tell me the reference for that?
 A: Obviously you can still define the functor. But it won't have nice properties because the Zariski open sets are just too big for the concept of locally constant sheaf to apply in an interesting way and the solutions of algebraic differential equations are not algebraic functions in general.
Just take a trivial vector bundle $O_X^2$ on $X = \mathbb{G}_m$ with connection
$$
  \nabla \begin{pmatrix} f_1 \cr f_2\end{pmatrix} = 
  d\begin{pmatrix} f_1 \cr f_2\end{pmatrix} -
 \begin{pmatrix} 0 & 0 \cr 1 & 0 \end{pmatrix} 
  \begin{pmatrix} f_1 \cr f_2\end{pmatrix} \frac{dz}{z}
$$
Holomorphic horizontal sections are  linear combinations $A \begin{pmatrix} 0 \cr 1 \end{pmatrix} + B \begin{pmatrix} 1 \cr log(z) \end{pmatrix}$. You get a rank 2 local system.
But if you look at algebraic horizontal sections you will only get the constant sheaf $A \begin{pmatrix} 0 \cr 1 \end{pmatrix}$.
PS: For the same reason (Zariski open sets are too big), one needs to use the hypercohomology of the algebraic de Rham complex to define a reasonable algebraic de Rham cohomology. Also for the same reason (not enough algebraic solutions) only the holomorphic solution complex or the holomorphic de Rham complex of a D-module are relevant to the Riemann-Hilbert correspondence.
A: As the previous answer points out you have to consider local systems for a finer topology than the Zariski topology. It is natural to consider the étale topology. The category of étale local systems of finite dimensional $k$-vector spaces form a tannakian category whose group is the étale fundamental group (more precisely it is a pro-(constant finite) algebraic group). You can find this and much more in Saavedra's book on tannakian categories (LNM Volume 265).
The category of bundles with connexion (with a regularity condition at infinity if needed) also form a tannakian category (if $X$ is smooth over an algebraically closed field of characteristic zero say), but the corresponding pro-algebraic group is much larger (Deligne call this the algebraic fundamental group). He computes this group in the example of the affine line in his famous article "Le Groupe Fondamental de la Droite Projective Moins Trois Points" (PDF).
So to an étale local system of finite dimensional $k$-vector space you can associate a bundle with connexion, and this will give you a fully faithful Riemann-Hilbert functor, but in this way you will obtain only those bundles with connexion whose monodromy group is finite and étale (in other words those trivialized by an étale cover).
