Cyclic vector of holomorphic vector bundle with flat connection over compact Riemann surface I originally posted the question on math.stackexhange, but there doesn't seem to be an answer. I apalogize in advance for cross posting.
Let $E\rightarrow X$ be a holomorphic vector bundle over a compact Riemann surface with a holomorphic connection $\nabla:E\rightarrow E\otimes K$, where $K$ is the canonical bundle of $X$. Since the holomorphic connection is necessarily flat, its sheaf of local holomorphic sections $\mathcal{E}$ defines a (holonomic) $D$-module.  Every holonomic D-module is locally cyclic, i.e. for any point $z_0$ there exists a neighborhood $U$ s.th. $\mathcal{E}(U)$ has a cyclic generator as a $D$-module (see e.g. Proposition 3.1.5. in Björk: Analytic $D$-Modules and Applications). Suppose we are given a coordinate $z$ on $U$ and identify $D(U)\cong D_1$, with $D_1=\mathbb{C}\left\lbrace z \right\rbrace \left\langle \partial_z \right\rangle$ (differential operators with coefficients in convergent power-series). So locally it holds $\mathcal{E}(U)\cong D_1/ I$, where $I$ is the ideal of differential operators annihilating the cyclic generator. This ideal is in general generated by two elements $P,Q$, with $P$ an operator of smallest possible degree in $I$ and furthermore $I/D_1P$ is of torsion type, i.e. for any $D\in I$ it holds $z^nD\in D_1P$ for some $n$ (Proposition 5.1.4 and Remark 5.1.5 in Björk: Analytic $D$-Modules and Applications). This implies for the dual $D$-module $\hom_{D_1}(D_1/I,\mathbb{C}\left\lbrace z\right\rbrace)=\left\lbrace f\in \mathbb{C}\left\lbrace z\right\rbrace \, \middle|\, Pf=Qf=0\right\rbrace=\left\lbrace f\in \mathbb{C}\left\lbrace z\right\rbrace \, \middle|\, Pf=0\right\rbrace$. 
So far so good. Now on $U$ the holomorphic connection reads $\nabla|_U=\partial+A$ with $A$ some matrix of holomorphic functions.The dual bundle naturally comes with a holomorphic connection, too, which in local coordinates takes the form $\partial-A^T$. The whole discussion above shows that locally flat sections ($(\partial-A^T)Y=0$) are in one to one correspondence with solutions of $Pf=0$.
On the other hand there is Deligne's lemma of a cyclic vector. One way to formulate it, is to say that locally on a coordinate neighborhood $U$, for a vector bundle with holomorphic connection there exists $G\in \mathrm{GL}(n,\mathcal{O}(U))$, s.th. 
\begin{equation} \partial_z G-G A^T=\tilde{A}G \end{equation} with $\tilde{A}$ in companion form. Here $\partial-A^T$ is the local form of the holomorphic connection. But in general the non unit entries $a_i$ in $\tilde{A}$ are only meromorphic and $G$ might not be invertible as a holomorphic matrix. 
It is clear that a system of linear differential equations $\partial_z Y=A^T Y$ with $A^T$ in companion form corresponds to a single $n$-th order scalar differential equation $Qf=0$. So from Deligne's cyclic vector lemma I get an $n$-th order scalar differential equation, but the corresponding differential operator might not be in $D_1$, but in $\mathbb{C}\left\lbrace z\right\rbrace [z^{-1}]\left\langle \partial_z\right\rangle$.
Q: Is there any relation between the differential operator I get from the discussion in the first paragraph applied to the dual bundle and the differential equation I get from Deligne's cyclic vector lemma? 
I guess they are the same, maybe after imposing further constraints on the open $U$. It might very well be that the relation is obvious and just shows my lack of understanding.
 A: I think I found the relation. The paper A Simple Algorithm for Cyclic Vectors by N. Katz seems crucial. The cyclic vector lemma is mostly stated for differential fields (see e.g. section 2 in Galois Theory of Linear Differential Equations), but theorem 1 in the paper by Katz actually doesn't need a field. To be more precise, let $R$ be a commutative, local ring with a derivation $\partial:R\rightarrow R$, an element $z\in R$ s.th. $\partial(z)=1$ and $(V,D,\mathbf{e})$ a freely, finitely generated $R$-module, where $D$ is an additive mapping $D:V\rightarrow V$ satisfying the usual Leibniz rule $D(rv)=\partial(r)v+rD(v)$ and $\mathbf{e}=(e_0,\dots e_{n-1})$ is an $R$-basis. Then under the assumption that $R$ is an $\mathbb{Z}\left[\frac{1}{(n-1)!}\right]$-algebra and $z$ is in the unique maximal ideal of $R$, there is a cyclic vector $c(\mathbf{e},z)$, i.e. $(c,Dc,\dots , D^{n-1}c)$ is an $R$-basis in $V$.
Since locally on a trivializing open $U$ with coordinate $z$, the sheaf of sections $\mathcal{E}(U)$ is a free $\mathbb{C}\left\lbrace z \right\rbrace$ module and $\left(\mathbb{C}\left\lbrace z \right\rbrace,\partial_z,z\right)$ is a local ring in which $(n-1)!$ is invertible one can apply the theorem to this situation.
Moreover the path trough the dual bundle seems unnecessary from this. Since $(c,\nabla_{\frac{\partial}{\partial z}}c,\dots, \nabla^{(n-1)}_{\frac{\partial}{\partial z}}c$) is a local frame, its corresponding matrix $C=\left(c\,\nabla_{\frac{\partial}{\partial z}}c\, \cdots\,\nabla^{(n-1)}_{\frac{\partial}{\partial z}}c\right)$ is invertible as a holomorphic matrix. Applying the gauge transformation $C^{-1}\left(\partial_z+A\right)C$ to the local form of the connection gives a connection in companion form and hence an $n$-th order scalar differential equation. 
On the other hand, from the $D$-module point of view, it is clear that there is an equation \begin{equation} \nabla^{(n)}_{\frac{\partial}{\partial z}}c=\sum_{i=0}^{n-1}f_i(z)\nabla^{(i)}_{\frac{\partial}{\partial z}}c\end{equation}, thus $P\equiv \partial_z^n-\sum_{i=0}^{n-1}f_i \partial_z^i$ is in the ideal $I$ of $D_1$, killing the cyclic generator. In addition I think $I=D_1P$, since the leading coefficient in $P$ is just $1$ and $\mathcal{E}(U)$ is locally free $\mathbb{C}\left\lbrace z\right\rbrace $-module. Furthermore, $P$ is the differential operator one gets from the companion form of the connection.
