I am trying to prove the following $\mathrm{Conn}^{\mathrm{reg}}(X) = \mathrm{Conn}(X) \cap \mathrm{Mod}\_{rh}(\mathcal{D}\_X)$.
Here an integrable connection on a smooth algebraic variety $X$ is a $\mathcal{D}\_X$ module which is locally free over $\mathcal{O}\_X$ of finite rank. Regular integrable connections and regular holonomic modules are defined as in the book *$\mathcal{D}$-modules, perverse sheaves and representation theory*. The inclusion of the left-hand side into the right-hand side is easy because the composition factors of an integrable connection are integrable connections and regularity is closed under submodules, quotient modules and extensions. Where I got stuck is the other inclusion. Let $M$ be an integrable connection which is regular holonomic. Let $L\_i$ a composition factor on $M$, then $L\_i \simeq L(Y\_i, N\_i)$ where $N\_i$ is a regular integrable connection on $Y\_i$, and $Y\_i$ is a locally closed smooth subvariety of $X$ such that the inclusion is affine. We notice that ($L\_i$ is an integrable connection) we have $L(X,L\_i) \simeq L\_i \simeq L(Y\_i, N\_i)$. Therefore, by Theorem 3.4.2. on the same book, we have that $Y\_i$ is dense (hence open being locally closed) and there exists a dense open subset $Y$ of $Y\_i$ (which is, therefore, open dense in $X$) such that $L\_i \vert\_Y \simeq N\_i \vert\_Y$. Here is where I got stuck because I do not understand how I can conclude that the whole $L\_i$ is a regular integrable connection, which is what I want to prove in order to prove that $M$ is a regular integrable connection.



Regular integrable connections and regular holonomic modules
This is actually just Theorem 6.1.6 (Curve Testing Criterion) combined with Defintion 5.3.2 (the definition of regular integrable connection).


