We study families of linear differential equations parametrized by an algebraic variety $\X$ and show that the set of all points $x\in \X$, such that the differential Galois group at the generic fibre specializes to the differential Galois group at the fibre over $x$, is Zariski dense in $\X$. As an application, we prove Matzat's conjecture in full generality: The absolute differential Galois group of a one-variable function field over an algebraically closed field of characteristic zero is a free proalgebraic group.Mathematics Subject Classification Codes: 14L15, 34M50, 12H05.
Key words and phrases:
Differential Galois theory, Matzat's conjecture, specializations of linear differential equations, Néron's specialization theorem

§ INTRODUCTION

The absolute differential Galois group of a differential field $F$ governs the algebraic properties of solutions of linear differential equations over $F$. Determining the structure of this group for interesting differential fields is a central problem in differential Galois theory (see e.g., <cit.>). Matzat's conjecture addresses the case of one-variable function fields.

Let $k$ be an algebraically closed field of characteristic zero and let $F$ be a one-variable function field over $k$, equipped with a non-trivial $k$-derivation. Then the absolute differential Galois group of $F$ is the free proalgebraic group on a set of cardinality $|F|$.

The main goal of this article is to prove Matzat's conjecture (Theorem <ref>) in the form stated above. Several special cases of Matzat's conjecture are already known:  The first case, when the differential field $F$ equals $(k(x),\frac{d}{dx})$, with $k$ countable and of infinite transcendence degree (over $\mathbb{Q}$) was established in [8]. The case when $F$ is $(k(x),\frac{d}{dx})$, with $k$ of infinite transcendence degree was treated in [7]. The case when $k$ has infinite transcendence degree was established in [49].

Moreover,  in [49] it was shown that for an arbitrary algebraically closed field $k$ of characteristic zero, Matzat's conjecture for $(k(x), \frac{d}{dx})$ implies Matzat's conjecture for one-variable function fields over $k$. On the other hand, thanks to the work in [48] and [8], it is known that Matzat's conjecture holds for $F$ countable if and only if every differential embedding problem of finite type over $F$ is solvable. Thus, to prove Matzat's conjecture in full generality, it suffices to prove the following:

[Theorem <ref>]
Let $k$ be an algebraically closed field of characteristic zero. Then every differential embedding problem of finite type over $(k(x),\frac{d}{dx})$ is solvable.

Theorem A was proved in [5] under the assumption that $k$ has infinite transcendence degree. To remove this unnecessary assumption, we establish a specialization result for Picard-Vessiot rings and differential Galois groups that we deem of independent interest.
The most conceptual and useful formulation of our specialization result is in terms of differential torsors (Theorem <ref>). For clarity, we state here a simpler, more concrete, version of our specialization result.

Let $k\subseteq K$ be an inclusion of algebraically closed fields of characteristic zero. A Picard-Vessiot ring $R/K(x)$ (the differential analog of the splitting field of a polynomial) for a linear differential equation $\de(y)=Ay$ with $A\in K(x)^{n\times n}$, is as a quotient $R= K(x)[X,\frac{1}{\det(X)}]/\m$,
where $X$ is an $n\times n$ matrix of indeterminates, $\de(X)=AX$ and $\m$ is a maximal differential ideal of $K(x)[X,\frac{1}{\det(X)}]$.

Assume the ideal $\m$ is generated by $P_1,\ldots,P_m$. Choose a finitely generated $k$-subalgebra $\B$ of $K$ and a monic polynomial $f\in \B[x]$ such that $A\in \B[x]_f^{n\times n}$ and $P_1,\ldots,P_m\in \B[x]_f[X,\frac{1}{\det(X)}]$. For $\X=\spec(\B)$, a specialization $c\in \X(k)=\Hom_k(\B,k)$ extends to a map $c\colon \B[x]_f\to k(x)$ by $c(x)=x$. In particular, applying $c$ to the coefficients of $A$ yields a matrix $A^c\in k(x)^{n\times n}$ and applying $c$ to the coefficients of a $P_i$ yields a $P_i^c\in k(x)[X,\frac{1}{\det(X)}]$.

[Corollary <ref>]

The set of all $c\in \X(k)$ such that $\m^c=(P_1^c,\ldots,P_m^c)$ is a maximal differential ideal of $k(x)[X,\frac{1}{\det(X)}]$, i.e., $R^c=k(x)[X,\frac{1}{\det(X)}]/\m^c$ is a Picard-Vessiot ring for $\de(y)=A^cy$, is Zariski dense in $\X(k)$.

So, roughly speaking, Theorem B asserts that, for many specializations, the algebraic relations among the solutions of the specialized equation $\de(y)=A^cy$ are exactly the specializations of the algebraic relations among the solutions of the generic equation $\de(y)=Ay$. We note that already the existence of a single “good” specialization in Theorem B is a nontrivial problem.

The behavior of differential Galois groups and Picard-Vessiot rings under specialization has been studied by various authors in various different settings ([19], <cit.>, [39], <cit.>, [3] [11], [14],  [36], [34]). Unfortunately, these results are not general or precise enough to be applicable to a proof of Matzat's conjecture.

It is well-known that the set of good specializations in Theorem B may not contain a Zariski open subset, in particular it is in general not Zariski constructible. The easiest example illustrating this point is the differential equation $\de(y)=\frac{\alpha}{x}y$ with solution $x^\alpha$, which is transcendental for $\alpha\in k\smallsetminus\mathbb{Q}$ but algebraic for $\alpha\in\mathbb{Q}$.

As in this example, despite the lack of generic behavior with respect to the Zariski topology, the set of good specializations is expected to be “large” and not merely Zariski-dense. To confirm this expectation, we use, following [23], commutative group schemes of finite type over $\B$ to define “open” subsets of $\X(k)$.
An ad-open subset (the ad refers to the additive group $\Ga$) of $\X(k)$ is of the form $\{c\in \X(k)|\ c \text{ is injective on } \Gamma\}$, where $\Gamma$ is a finitely generated subgroup of $\Ga(\B)=(\B,+)$ and $\X(k)$ is identified with $\Hom_k(\B,k)$. For example, $k$ minus a finitely generated $\mathbb{Q}$/̄subspace of $k$, is an ad-open subset of $k=\A^1(k)$. Note that in case $\Gamma$ is generated by a single element $h$, the corresponding ad-open subset is the Zariski open subset of $\X(k)$ where $h$ does not vanish. We can thus think of ad-open subsets as a generalization of Zariski open subsets. Ad$\times$Jac-open subsets of $\X(k)$ are defined roughly similar but with the additive group replaced by a product of the additive group with a Jacobian variety. (For a precise formulation see Definition <ref> below.)
For example,

\begin{equation}
\label{eq: adxjac}
\{\alpha\in k|\ 256\alpha^3-27\neq 0 \text{ and } (0,1) \text{ is not torsion on the elliptic curve } y^2=x^3-4\alpha x+1\}
\end{equation}

is an ad$\times$Jac-open subset of $k=\mathbb{A}^1(k)$.

A more detailed version of Theorem B, confirming the expectation that the set of good specializations is large, states that the set of good specializations contains an ad$\times$Jac-open subset of $\X(k)$ (Theorem <ref>). Moreover, if the differential Galois group of $
\de(y)=A y$ (over $K(x)$) is connected, then the Jacobian variety is not needed, i.e., the set of good specializations contains an ad-open subset (Corollary <ref>).

We note that a result similar to Theorem B but for finite difference equations, i.e., for the operator $k(x)\to k(x),\ h(x)\mapsto h(x+1)$ instead of the derivation $\frac{d}{dx}$, was established in [17]. There Jacobien varieties are not needed, essentially because $k(x)$ does not have nontrivial finite difference field extensions.

(In our context, the Jacobien varieties arise via Jacobians of curves associated to finite field extensions of $k(x)$, which are of course differential fields.)  However, in [17] one also requires subsets that are “open” with respect to the multiplicative group. These occur in the step when one has to determine the multiplicative independence of rational functions. In our context, this step is replaced by determining the logarithmic independence of algebraic functions which leads to ad$\times$Jac/̄open subsets.

Our proof of Theorem B owes a lot to [23]. In particular, it relies on the ideas underlying Hrushovski's algorithm for computing the differential Galois group of a linear differential equation.
Compared to the specialization results in <cit.>, our result is more general and more precise: In [23]  open subsets with respect to arbitrary commutative algebraic groups are required, whereas for us, the algebraic group can be chosen to be a direct product of the additive group with a Jacobian variety. If the generic differential Galois group is connected, even the additive group alone is sufficient for us. Moreover, many of the statements in <cit.> are restricted to the case that $\B$ has Krull dimension one and $k=\overline{\mathbb{Q}}$.

Historically, a prime force for the development of differential algebra and differential Galois theory, was the desire to understand when an indefinite integral or differential equation can be solved “by quadratures”. Of course, making the notion of “solving” rigorous was part of the problem.
As explained in the beautiful survey [50], when studied in families, this somewhat old-fashioned topic of solving, is closely connected to some modern problems in the realm of unlikely intersections.

Given an indefinite integral of an algebraic function depending on a parameter or a linear differential equation depending on a parameter, an important question (asked in <cit.>) is the following:

For which values of the parameter can the solutions be expressed within some
prescribed class, assuming this can't be done for the generic solution?

The expectation is that this set of “exceptional” parameter values is small (albeit not necessarily finite). For example, in [30], it was shown that for a parametric family of differentials on an algebraic curve, which cannot be integrated in elementary terms at the generic fibre, the set of specializations such that the specialized differential can be integrated in elementary terms is small, in fact, finite in many circumstances.

Based on our specialization result (Theorem <ref>) we can answer the above question for classes of functions that are amenable to differential Galois theory in the sense that solvability of a linear differential equation in the class of functions can be characterized through a property of the differential Galois group. For example, for the widely used class of Liouvillian functions we obatin:

[Corollary <ref>]
Assume that the differential equation $\de(y)=A y$ (over $K(x)$) does not have a basis of solutions consisting of Liouvillian functions, then the set of specializations $c\in\X(k)$ such that the differential equation $\de(y)=A^cy$ (over $k(x)$) has a basis of solutions consisting of Liouvillian functions, is contained in an ad$\times$Jac-closed subset of $\X(k)$.

Moreover, if the differential Galois group of $\de(y)=Ay$ (over $K(x)$) is connected, then already an ad-closed subset suffices. Here a subset of $\X(k)$ is called ad$\times$Jac-closed (or ad-closed) if its complement is ad$\times$Jac-open (or ad-open). For example, a finitely generated $\mathbb{Q}$-subspace of $k$ is an ad-closed subset of $k=\mathbb{A}^1(k)$.

As an illustration of Corollary B1, consider Bessel's differential equation

It has a basis of solutions consisting of Liouvillian functions if and only if $\alpha\notin \frac{1}{2}+\mathbb{Z}$. The exceptional set $\frac{1}{2}+\mathbb{Z}$ is contained in $\mathbb{Q}$, an ad-closed subset of $k$.
As predicted by the general theory, in this case, the Jacobien variety is not needed because the differential Galois group at the generic fibre (i.e., the differential Galois group of Bessel's equation over $K(x)$, where $K$ is the algebraic closure of the rational function field $k(\alpha)$) is $\Sl_2$, which is connected.

If we choose as class of functions, the class of all algebraic functions, we obtain an equicharacteristic zero version of the Grothendieck-Katz conjecture (cf. <cit.> and <cit.>):

[Corollary <ref>]
Assume that the differential equation $\de(y)=A y$ (over $K(x)$) does not have a basis of solutions consisting of algebraic functions, then the set of all specializations $c\in\X(k)$ such that the differential equation $\de(y)=A^cy$ (over $k(x)$) has a basis of solutions consisting of algebraic functions, is contained in an ad$\times$Jac-closed subset of $\X(k)$.

Again, if the differential Galois group of $\de(y)=Ay$ (over $K(x)$) is connected, then already an ad-closed subset suffices.
As the intersection of two ad$\times$Jac-open subsets of $\X(k)$ is nonempty (Remark <ref>), Corollary B2 can also be reformulated in the maybe more familiar spirit of a local to global principle: If the set of all $c\in \X(k)$ such that $\de(y)=A^cy$ has a basis of solutions consisting of algebraic functions, contains an ad$\times$Jac-open subset (e.g., a nonempty Zariski open subset), then  $\de(y)=A y$ has a basis of solutions consisting of algebraic functions.

Theorem B (and its more detailed variant Theorem <ref>) can be used to transfer results from a single algebraically closed field of constants (e.g., the field $\C$ of complex numbers) to an arbitrary algebraically closed field of constants. Our prime illustration of this fact is of course our proof of Theorem A. However, we also show how one can deduce a new and very short proof of the solution of the inverse problem in differential Galois theory from Theorem <ref>. Recall that the solution of the inverse problem states that every linear algebraic group over $k$ is a differential Galois group over $k(x)$. Using analytic methods, namely Plemelj's (weak) solution of the Riemann-Hilbert problem, this was proved for $k=\mathbb{C}$ already in 1979 ([43]). However, it took more than 25 years and contributions of many authors to finally solve the inverse problem for an arbitrary algebraically closed field $k$ of characteristic zero ([22]).
Using Theorem <ref>, we can deduce the solution of the inverse problem from the solution over $\mathbb{C}$ rather directly. To the best of our knowledge, so far only two types of proofs of the solution of the inverse problem were known. Firstly, the proof from [22], secondly proofs that rely on patching. Of course, also Matzat's conjecture and Theorem A imply the solution of the inverse problem. However, these results ultimately rely on patching.

We conclude the introduction with a more detailed outline of the paper. The larger part of the article is concerned with the proof of the specialization theorem (Section 2 and the two appendices). Appendix A corresponds to the first main step in Hrushovski's algorithm while Appendix B corresponds to the second main step in Hrushovski's algorithm.

In the first main step of Hrushovski's algorithm one computes the $K(x)$-algebraic relations among the entries of a fundamental solution matrix for $\de(y)=Ay$, $A\in K(x)^{n\times n}$ up to a fixed predetermined degree $d=d(n)$. The corresponding specialization result proved in Appendix A (Theorem <ref>) is that, if $f_1,\ldots,f_r$ is a basis of the $K(x)$-vector space of all algebraic relations of degree at most $d$ among the entries of a generic solution matrix, then there exists an ad-open subset $\U$ of $\X(k)$ such that $f_1^c,\ldots,f_r^c$ is a $k(x)$-basis of the vector space of all $k(x)$-algebraic relations of degree at most $d$ among the entries of a fundamental solution matrix for the specialized equation $\de(y)=A^cy$ for all $c\in \U$.

Roughly, the first step in Hrushovski's algorithm allows one to compute the differential Galois group up to a torus (and a finite group, which is however irrelevant for our purpose). In the second main step (“the toric part”) the central question is to decide the logarithmic independence of algebraic functions. Here, elements $f_1,\ldots,f_s\in F$ belonging to a finite field extension $F$ of $K(x)$ are called logarithmically independent over $F$ if a relation of the form

$$d_1f_1+\ldots+d_sf_s=\tfrac{\de(h)}{h}\quad  \text{ with } d_1,\ldots,d_s\in\mathbb{Z} \text{ and } h\in F^\times$$

implies $d_1,\ldots,d_s=0$. For $F=K(x)$ this question can be settled as follows. An element of $K(x)$ is a logarithmic derivative of an element of $K(x)$ if and only if all its poles are simple with integer residues. Thus an inspection of the poles and residues of $f_1,\ldots,f_s$ will yield all possible values of $d_1,\ldots,d_s$. For $F/K(x)$ finite, there exists a similar criterion, however, in this case, it involves the degree zero divisor class group of $F/K$. This is exactly how the Jacobien varieties enter into the picture. The degree zero divisor class group of $F/K$ can be identified with the group $J(K)$, where $J$ is the Jacobien of a smooth projective curve with function field $F/K$.
The criterion for the logarithmic independence, thus relates the computation of the differential Galois group to the question if certain elements $\gamma_1,\ldots,\gamma_m\in J(K)$ are $\mathbb{Z}$-linearly independent. For example, if $a=\frac{x^2}{x^4+x+\alpha}$, the differential Galois group $G_\alpha$ of

is a subgroup of the group $G$ of $2\times 2$ monomial matrices. A sufficient criterion for $G_\alpha=G$, derived from the criterion for logarithmic independence, is that
the point $(0,1)$ is not a torsion point on the elliptic curve $y^2=x^3-4\alpha x+1$. This leads to the ad$\times$Jac-open subset in (<ref>).

The main result of Appendix B is that logarithmic independence of algebraic functions is preserved on an ad$\times$Jac-open subset.

The two main results from the appendices are combined in the later parts of Section <ref> to yield a proof of the specialization theorem.
Before tackling the proof, in Section <ref> we introduce differential torsors and show that ad$\times$Jac-open subsets are Zariski dense.

Differential torsors provide a convenient framework to simultaneously study Picard-Vessiot rings and differential Galois groups under specialization in a compatible fashion. This compatibility is vital for the proof of Theorem A, where, in effect, we consider differential embedding problems under specialization. Roughly, a differential torsor is obtained by spreading out a Picard-Vessiot ring $R$ for $\de(y)=Ay$ (over $K(x)$) with the action of the differential Galois group $G$, into a nice family $\R$ with an action of an affine group scheme $\G$.

Our main specialization result then states that there exists an ad$\times$Jac-open subset $\U$ of the parameter space $\X$ such that $\R_c$ is a Picard-Vessiot ring with differential Galois group $\G_c$ for every $c\in \U$.

This result would be rather vacuous if we do not know that ad$\times$Jac-open subsets are nonempty. While the Zariski denseness of ad-open subsets is readily available in the literature, the Zariski denseness of ad$\times$Jac-open subsets does not seem to be available in the generality required for the proof of Matzat's conjecture. In Subsection <ref> we therefore provide a proof of the Zariski denseness of ad$\times$Jac-open subsets based on a variant of Néron's specialization theorem and a geometric version of abstract Hilbert sets.

With the specialization theorem in hand, we then prove Theorem A and Matzat's conjecture in Section <ref>.

Finally, in the short Section <ref>, we solve the inverse problem via our specialization theorem.

We are grateful to Sebastian Petersen for helpful comments on Néron's specialization theorem.

§ SPECIALIZATIONS OF DIFFERENTIAL TORSORS

In this section, we prove our main specialization result (Theorem <ref>). Before entering the discussion of differential torsors and their specializations, let us agree on some general conventions and notations that will be in place throughout the article.

All rings are assumed to be commutative and unital. All fields are assumed to be of characteristic zero.
The group of multiplicative units of a ring $\B$ is denoted by $\B^\times$.

If $\X$ is a scheme over $\B$ and $\B\to \B'$ is a morphism of rings, then $\X_{\B'}$ denotes the scheme over $\B'$ obtained by base change via $\B\to \B'$. A similar notation applies to morphisms of schemes.
For an affine scheme $\X$ over $\B$ we write $\B[\X]$ for the ring of global sections of $\X$ so that $\X=\spec(\B[\X])$. We sometimes abbreviate $\B'[\X_{\B'}]$ to $\B'[\X]$.

For a ring $\B$, the polynomial ring $\B[x]$ over $\B$ in the variable $x$ is always considered as a differential ring with respect to the derivation $\de=\frac{d}{dx}$. Similarly, the field of rational functions in $x$ (over some field of constants) is always considered as a differential field  with respect to  $\de=\frac{d}{dx}$. With $X=(X_{ij})_{1\leq i,j\leq n}$ we always denote an $n\times n$ matrix of indeterminates (over practically any ring that is around). It is the matrix of coordinate functions on $\Gl_n$.

For an algebra $\B$ over a field $k$ and a prime ideal $\p$ of $\B$ we denote the residue field at $\p$ with $k(\p)$. If $\B$ is an integral domain, we write $k(\B)$ for the field of fractions of $\B$. If $\X$ is an integral scheme over $k$, we write $k(\X)$ for the function field of $\X$. With $\overline{K}$ we denote the algebraic closure of a field $K$.

Throughout this article $k$ is an algebraically closed field of characteristic zero. By “algebraic group over $k$” we mean a (not necessarily linear) group scheme of finite type over $k$.
Algebraic groups, or more generally group schemes, are often identified with their functor of points.
By a “closed subgroup” of a group scheme we mean a closed subgroup scheme. A “variety” is a not necessarily irreducible, geometrically reduced, separated scheme of finite type over a field.

For a $k$-algebra morphism $c:\B\rightarrow k$, we shall denote with $b^c$ the image of $b\in\B$ under $c$. For a polynomial $P$ with coefficients in $\B$ we denote with $P^c$ the polynomial obtained from $P$ by applying $c$ to its coefficients. Moreover, $M^c=\{P^c|\ P\in M\}$ for a set $M$ of polynomials over $\B$.

§.§ Differential Galois theory

We begin by recalling the basic definitions and results from the Galois theory of linear differential equations. Proofs and more background can be found in any of the introductory textbooks [27], [44], [12], [35].

Let $(F,\de)$ be a differential field with field of constants $k=F^\de=\{a\in F|\ \de(a)=0\}$.
Recall that a differential ring $R$ is $\de$-simple if it is not the zero ring and the only $\de$-ideals of $R$ are $R$ and the zero ideal.

A Picard-Vessiot ring for $\de(y)=Ay$, ($A\in F^{n\times n}$) is a $\de$-simple $F$/̄$\de$/̄algebra $R$ such that there exists a $Y\in \Gl_n(R)$ with $\de(Y)=AY$ and $R=F[Y,\frac{1}{\det(Y)}]$.

For any given $A\in F^{n\times n}$, there exist a Picard-Vessiot ring $R/F$ for $\de(y)=Ay$ and it is unique up to an $F$-$\de$-isomorphism. Moreover, $R^\de=k$. The differential Galois group $G=G(R/F)$ of $R/F$ (or of $\de(y)=Ay$) is the functor from the category of $k$-algebras to the category of groups given by
$G(T)=\Aut(R\otimes_k T/F\otimes_k T)$, where $T$ is considered as a constant differential ring. It is a linear algebraic group (over $k$).

Its coordinate ring $k[G]$ can explicitly be described as $k[G]=(R\otimes_F R)^\de=k[Z,\frac{1}{\det(Z)}]$, with $Z=Y^{-1}\otimes Y\in \Gl_n((R\otimes_K R)^\de)$ and $Y$ as in Definition <ref>. The canonical map

$$R\otimes_k k[G]\to R\otimes_F R$$

is an isomorphism and so we may make the identification $R\otimes_F R=R\otimes_k k[G]$. For a $k$/̄algebra $T$, any $g\in G(T)$, i.e., any $K\otimes_k T$-$\de$-isomorphism $g\colon R\otimes_k T\to R\otimes_k T$, is determined by $g(Y\otimes 1)$. Moreover, $g(Y\otimes 1)=Y\otimes [g]$ for a unique $[g]\in \Gl_n(T)$. The assignment $g\mapsto [g]$ determines a morphism $G\to \Gl_{n,k}$ of algebraic groups over $k$ which is a closed embedding. The dual of this morphism is the map $k[\Gl_n]=k[X,\frac{1}{\det(X)}]\to k[G],\ X\mapsto Z$.

The (functorial) action of $G$ on $R/F$ is determined by the map $\rho\colon R\to R\otimes_k k[G]$, which, under the identification $R\otimes_F R=R\otimes_k k[G]$ corresponds to the inclusion into the second factor. Explicitly, we have $\rho(Y)=Y\otimes Z$. For $g\in G(T)=\Hom(k[G],T)$, the corresponding automorphism $g\colon R\otimes_k T\to R\otimes_k T$ is the $T$-linear extension of $R\xrightarrow{\rho} R\otimes_k k[G] \to R\otimes_k T$.

The following lemma shows that Picard-Vessiot rings and differential Galois group are well-behaved under extension of the constants. For a proof see, e.g. <cit.>.

Let $k\subseteq k'$ be an inclusion of algebraically closed fields of characteristic and let $R/k(x)$ be a Picard-Vessiot ring with differential Galois group $G$. Then $R\otimes_{k(x)}k'(x)/k'(x)$ is a Picard-Vessiot ring with differential Galois group $G_{k'}$.

§.§ Differential torsors

Differential torsors were introduced in [6] for the purpose of solving differential embedding problems. To study the behaviour of Picard-Vessiot rings and differential embedding problems under specialization, we will need a version of differential torsors that works over an arbitrary base and not just a differential field, as in [6].

As in the introduction, consider an inclusion $k\subseteq K$ of algebraically closed fields of characteristic zero and a differential equation $\de(y)=Ay$ over $K(x)$ with differential Galois group $G$ and Picard-Vessiot ring $R/K(x)$. To discuss specializations of $G$ and $R$ down to $k$ one first needs to spread out $G$ and $R$ into families, i.e., we would like to have a finitely generated $k$-subalgebra $\B$ of $K$, an affine group scheme $\G$ and a differential ring $\R$ over $\B$ such that the base change from $\B$ to $K$ yields $G$ and $R$. It is then natural to also ask for an action of $\G$ on $\R$ compatible with the action of $G$ on $R$. Moreover, since $R$ defines a $G$-torsor, also $\R$ should define a $\G$-torsor. This idea is formalized through the notion of differential torsor.

Let $k$ be an algebraically closed field of characteristic zero and let $\mathcal{B}$ be a $k$-algebra (considered as a constant $\de$-ring). Let $\mathcal{Q}$ be a $\mathcal{B}$-$\de$-algebra.
The two most relevant cases for us are, firstly $\B=k$ and $\Q=k(x)$ and, secondly $\Q=\B[x]_f$, where $f\in \B[x]$ is a monic polynomial.

For a $\mathcal{Q}$-$\de$-algebra $\mathcal{R}$, we define $\Autt(\mathcal{R}/\mathcal{Q})$ to be the functor from the category of $\mathcal{B}$/̄algebras to the category of groups given by $\Autt(\mathcal{R}/\mathcal{Q})(\mathcal{T})=\Aut(\mathcal{R}\otimes_{\mathcal{B}}\mathcal{T}/\mathcal{Q}\otimes_{\mathcal{B}}\mathcal{T})$ for any $\mathcal{B}$-algebra $\mathcal{T}$. Here $\mathcal{T}$ is considered as a constant $\de$-ring and the automorphisms are understood to be differential automorphisms. An element $g$ of $\Autt(\mathcal{R}/\mathcal{Q})(\mathcal{T})$ is thus a $\mathcal{Q}\otimes_\mathcal{B}\mathcal{T}$/̄$\de$/̄isomorphism $g\colon \mathcal{R}\otimes_\mathcal{B}\mathcal{T}\to \mathcal{R}\otimes_\mathcal{B}\mathcal{T}$. On morphisms $\Autt(\mathcal{R}/\mathcal{Q})$ is given by base change.

Let $\G$ be an affine group scheme over $\mathcal{B}$. An action of $\G$ on $\mathcal{R}/\mathcal{Q}$ is a morphism $\G\to \Autt(\mathcal{R}/\mathcal{Q})$ of group functors. In particular, for a $\mathcal{B}$-algebra $\mathcal{T}$, every $g\in \G(\mathcal{T})$ defines a $\mathcal{Q}\otimes_\mathcal{B}\mathcal{T}$/̄$\de$/̄automorphism $g\colon \mathcal{R}\otimes_\mathcal{B}\mathcal{T}\to \mathcal{R}\otimes_\mathcal{B}\mathcal{T}$.

To specify an action of $\G$ on $\R/\mathcal{Q}$ is equivalent to specifying a morphism $\rho\colon\R\to\R\otimes_\B \B[\G]$ of $\Q$-$\de$-algebras such that the diagrams

\xymatrix{
\R \ar^-\rho[r] \ar_-\rho[d] & \R\otimes_\B\B[\G] \ar^-{\rho\otimes \B[\G]}[d] \\
\R\otimes_\B\B[\G] \ar^-{\R\otimes\Delta}[r] & \R\otimes_\B\B[\G]\otimes_\B \B[\G]

\xymatrix{
\R \ar^-\rho[rr] \ar_-{\id}[rd] & & \R\otimes_\B \B[\G] \ar^-{\id\cdot\varepsilon}[ld] \\
& \R	&

commute, where $\Delta\colon \B[\G]\to \B[\G]\otimes_\B\B[\G]$ is the comultiplication and $\varepsilon\colon \B[\G]\to\B$ the counit of the Hopf algebra $\B[\G]$ over $\B$.

As this is a fairly standard argument, we only sketch the proof. First assume that on action of $\G$ on $\R/\Q$ is given. For $\T=\B[\G]$ and $g=\id\in\G(\T)=\Hom(\B[\G],\B[\G])$ we thus have a $\Q\otimes_\B \B[\G]$-$\de$-automorphism $g\colon \R\otimes_\B\B[\G]\to \R\otimes_\B\B[\G]$. Then we can define $\rho$ as the composition $\rho\colon \R\to \R\otimes_\B \B[\G]\xrightarrow{g}\R\otimes_\B \B[\G]$.

Conversely, given $\rho$, we define an action of $\G$ on $\R/\Q$ as follows. For a $\B$-algebra $\T$ and $g\in \G(\T)=\Hom(\B[\G],\T)$ we define $g\colon \R\otimes_\B\T\to \R\otimes_\B\T$ as the $\T$-linear extension of $\R\xrightarrow{\rho}\R\otimes_\B\B[\G]\xrightarrow{\R\otimes g} \R\otimes_\B \T$. The first diagram corresponds to the associativity of this action while the second diagram shows that the identity acts trivial.

As above, let $\G$ act on $\R/\Q$ and let $\rho\colon \R\to \R\otimes_\B \B[\G]$ denote the coaction (as in Lemma <ref>). We call $\R/\Q$ a differential $\G$-torsor if $\R$ is not the zero ring and the map $\R\otimes_\Q\R\to \R\otimes_\B\B[\G],\ a\otimes b \mapsto (a\otimes 1)\cdot \rho(b)$ is an isomorphism. The geometric interpretation of this condition is the usual torsor condition, i.e., for $\mathcal{Z}=\spec(\R)$, the morphism

$$\Z\times_\Q \G_\Q\to \Z\times_\Q\Z,\ (z,g)\mapsto (z, zg)$$

of affine schemes over $\Q$ is an isomorphism.

Let $\mathcal{A}\in\Q^{n\times n}$. A differential $\G$-torsor $\R/\Q$ is a differential $\G$-torsor for $\de(y)=\mathcal{A}y$ if there exists a $\Y\in\Gl_n(\R)$ such that

* $\de(\Y)=\mathcal{A}\Y$,

* $\R=\Q[\Y,\frac{1}{\det(\Y)}]$ and

* for every $\B$-algebra $\T$ and every $g\in \G(\T)$ there exists a $[g]\in \Gl_n(\T)$ such that $g(\Y\otimes 1)=(\Y\otimes 1)(1\otimes [g])$.

A matrix $\Y\in\Gl_n(\R)$ such that the above three conditions are satisfied is called a fundamental matrix.

Assuming Definition <ref>, the assignment $g\mapsto [g]$ defines a morphism $\G\to \Gl_{n,\B}$ of group schemes over $\B$.

The most basic example of the above definitions is when $\B=k$, $\Q=F$ is a differential field with $F^\de=k$ and $\mathcal{R}=R$ is a Picard-Vessiot ring over $F$ for $\de(y)=Ay$ ($A\in F^{n\times n}$) with differential Galois group $\G=G$. As explained in Section <ref>, $G$ acts on $R/F$ and $R/F$ is a differential $G$-torsor for $\de(y)=Ay$. Note that if $\Y=Y\in\Gl_n(R)$ is such that $\de(Y)=AY$ and $R=K[Y,\frac{1}{\det{Y}}]$, then condition (iii) of Definition <ref> is automatically satisfied (because $(R\otimes_k T)^\de=T$ for any $k$-algebra $T$).

In the following example we construct a differential torsor for the group scheme of $2\times 2$ monomial matrices.

Let $\B\subseteq \Q\subseteq \Q[\eta]$ be an inclusion of differential $k$-algebras such that $\B$ is constant and $\Q[\eta]$ is an integral domain. We assume that $\eta$ has minimal polynomial $y^2-a$ over the field of fractions of $\Q$, where $a$ is some element of $\Q^\times$. We also fix $b\in \Q$. Let $y_1,y_2$ be indeterminates over $\Q[\eta]$ and define a derivation $\de$ on $\R=\Q[\eta][y_1,y_2,y^{-1}_1,y^{-1}_2]$ by $\de(y_1)=(b+\eta)y_1,\ \de(y_2)=(b-\eta)y_2$.

y_1 & y_2 \\
\de(y_1) & \de(y_2)
\end{pmatrix}=\begin{pmatrix}
y_1 & y_2 \\
(b+\eta)y_1 & (b-\eta)y_2
\end{pmatrix}.

Then $\det(\Y)=-2\eta y_1y_2$. Therefore $\R=\Q[\Y,\frac{1}{\det(\Y)}]$.

A direct computation shows that $\de(\Y)=\cA\Y$, where

$$\cA=\begin{pmatrix}  0 & 1 \\ a+\de(b)-b^2-\frac{\delta(a)b}{2a} & 2b+\frac{\delta(a)}{2a}\end{pmatrix}\in\Q^{2\times 2}.$$

We would like to describe $\Z=\spec(\R)$ explicitly as a closed subscheme of $\Gl_{2,\Q}$. To this end, let $\mathcal{I}$ denote the kernel of the morphism $\Q[X,\frac{1}{\det(X)}]\to \R,\ X\mapsto \Y$. As $\R$ is an integral domain, $\mathcal{I}$ is a prime differential ideal of $\Q[X,\frac{1}{\det(X)}]$, where $\de(X)=\cA X$. We have

$$(b+\eta)y_1\cdot(b-\eta)y_2=(b^2-a)y_1y_2 \quad \text{ and } \quad (b+\eta)y_1\cdot y_2+(b-\eta)y_2\cdot y_1=2by_1y_2. $$

Therefore, the polynomials

P_1=X_{21}X_{22}-(b^2-a)X_{11}X_{12} \quad \text{ and } \quad  P_2=X_{21}X_{12}+X_{22}X_{11}-2bX_{11}X_{12} $$

lie in $\mathcal{I}$. We will show that $\mathcal{I}=(P_1,P_2)$. For this, it suffices to show that the induced map $\Q[X,\frac{1}{\det(X)}]/\mathcal{I}\to \R$ is injective. Let $z_1, z_2, z_1', z_2'$ denote the image in $\Q[X,\frac{1}{\det(X)}]/\mathcal{I}$ of $X_{11},X_{12},X_{21},X_{22}$ respectively. Then

\begin{equation} \label{eq: for ex 1}
\end{equation}

\begin{equation} \label{eq: for ex 2}
\end{equation}

Subtracting $2z_1'z_2$ from (<ref>) yields $z_1z_2'-z_1'z_2=2z_2(bz_1-z_1')$. Since $z_1z_2'-z_1'z_2$ is invertible, we see that also $z_2$ is invertible. Similarly, subtracting $2z_2'z_1$ from (<ref>), we see that $z_1$ is invertible. So (<ref>) can be rewritten as

\begin{equation}
\label{eq: for ex 3}
\tfrac{z'_1}{z_1}+\tfrac{z_2'}{z_2}=2b
\end{equation}
whereas (<ref>) becomes $\frac{z'_1}{z_1}\cdot\frac{z_2'}{z_2}=b^2-a$. Plugging $\frac{z'_2}{z_2}=2b-\frac{z_1'}{z_1}$ into the latter equation yields $(\frac{z'_1}{z_1}-b)^2=a$. Set $\eta'=\frac{z'_1}{z_1}-b$. Then $\eta'^2=a$,  $z_1'=(b+\eta')z_1$ and from (<ref>) we obtain $z_2'=(b-\eta')z_2$.

Set $\mathcal{S}=\Q[\eta',z_1,z_2,z_1^{-1},z_2^{-1}]$. We claim that $\mathcal{S}=\Q[X,\frac{1}{\det(X)}]/\mathcal{I}$. It suffices to show that $z_1',z_2'$ and $\frac{1}{z_1z_2'-z_1'z_2}$ lie in $\mathcal{S}$. But $z_1'=(b+\eta')z_1\in\mathcal{S}$, $z_2'=(b-\eta')z_2\in\mathcal{S}$ and
$z_1z_2'-z_1'z_2=2\eta'z_1z_2$. So $\frac{1}{z_1z_2'-z_1'z_2}\in \SSS$ and $\mathcal{S}=\Q[X,\frac{1}{\det(X)}]/\mathcal{I}$ as claimed.

The map

\begin{equation} \label{eq: map}
\Q[\eta'][z_1,z_2,z_1^{-1},z_2^{-1}]=\Q[X,\tfrac{1}{\det(X)}]/\mathcal{I}\longrightarrow \R=\Q[\eta][y_1,y_2,y^{-1}_1,y^{-1}_2]
\end{equation}

sends $\eta'$ to $\eta$, $z_1$ to $y_1$ and $z_2$ to $y_2$.
As $\eta'^2=a$, the restriction $\Q[\eta']\to \Q[\eta]$ is injective. But then, since $y_1$ and $y_2$ are algebraically independent over $\Q[\eta]$, the map (<ref>) is injective. Thus $\mathcal{I}=(P_1,P_2)$ as claimed. In other words, $\Z$ is the closed subscheme of $\Gl_{2,\Q}$ defined by $P_1$ and $P_2$.

Let $\G$ be the group scheme of monomial $2\times 2$ matrices over $\B$, i.e.,

\begin{equation} \label{eq: group of monomial matrices}
\G(\T)=\left\{\begin{pmatrix} g_{11} & g_{12} \\ g_{21} & g_{22} \end{pmatrix}\in\Gl_2(\T) \mid g_{11}g_{12}=g_{21}g_{22}=g_{11}g_{21}=g_{12}g_{22}=0\right\}\leq\Gl_2(\T)
\end{equation}

for any $\B$-algebra $\T$. In particular, if $\T$ is an integral domain then

\G(\T)=\left\{\begin{pmatrix} s & 0 \\ 0 & t \end{pmatrix}\mid s,t\in \T^\times\right\}\cup \left\{\begin{pmatrix} 0 & s \\ t & 0  \end{pmatrix}\mid s,t\in \T^\times\right\}\leq\Gl_2(\T).

Note that the equations in (<ref>) are redundant, in fact,

$$\G(\T)=\left\{\begin{pmatrix} g_{11} & g_{12} \\ g_{21} & g_{22} \end{pmatrix}\in\Gl_2(\T) \mid g_{11}g_{12}=g_{21}g_{22}=0\right\}$$

for any $\B$-algebra $\T$. For example, if $g_{11}g_{12}=g_{21}g_{22}=0$, then $(g_{11}g_{22}-g_{12}g_{21})g_{11}g_{21}=0$ and so also $g_{11}g_{21}=0$ since $g_{11}g_{22}-g_{12}g_{21}$ is invertible.

We will define an action of $\G$ on $\R/\Q$. Roughly, the idea is that a diagonal matrix $\begin{pmatrix} s & 0 \\ 0 & t \end{pmatrix}$ acts by $y_1\mapsto sy_1$, $y_2\mapsto ty_2$ and fixing $\eta$, whereas the permutation matrix

$\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$
acts by interchanging $y_1$ with $y_2$ and $\eta$ with $-\eta$. In general, for $\T$ a $\B$-algebra, $g=\begin{pmatrix} g_{11} & g_{12} \\ g_{21} & g_{22} \end{pmatrix}\in\G(\T)$ acts on $\R\otimes_\B\T$ by $g(\Y)=\Y\otimes g$. To make sure that this is well-defined, we check that
for any $\Q$-algebra $\SSS$, $Z=\begin{pmatrix} Z_{11} & Z_{12} \\ Z_{21} & Z_{22} \end{pmatrix}\in \Z(\SSS)$ and $g=\begin{pmatrix} g_{11} & g_{12} \\ g_{21} & g_{22} \end{pmatrix}\in\G(\SSS)$, we have $Zg=\begin{pmatrix} Z_{11}g_{11}+Z_{12}g_{21} & Z_{11}g_{12}+Z_{12}g_{22} \\ Z_{21}g_{11}+Z_{22}g_{21} & Z_{21}g_{12}+Z_{22}g_{22} \end{pmatrix}\in \Z(\SSS)$.
Using (<ref>), we find

\begin{align*}
\end{align*}

\begin{align*}
P_2(Zg)&=(Z_{21}g_{11}+Z_{22}g_{21})(Z_{11}g_{12}+Z_{12}g_{22})+( Z_{21}g_{12}+Z_{22}g_{22})(Z_{11}g_{11}+Z_{12}g_{21})-\\
& \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad 2b(Z_{11}g_{11}+Z_{12}g_{21})( Z_{11}g_{12}+Z_{12}g_{22})\\
&=Z_{21}Z_{12}g_{11}g_{22}+Z_{22}Z_{11}g_{21}g_{12}+Z_{21}Z_{12}g_{12}g_{21}+Z_{22}Z_{11}g_{11}g_{22}-\\  & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad2b(Z_{11}Z_{12}g_{11}g_{22}+Z_{12}Z_{11}g_{21}g_{12})\\
\end{align*}

To see that $\R/\Q$ is indeed a differential $\G$-torsor, it suffices to check that for $Z,Z'\in \Z(\SSS)$, the matrix $Z^{-1}Z'$ lies in $\G(\SSS)$.

$$Z^{-1}Z'=\frac{1}{\det(Z)}\begin{pmatrix} Z_{22} & -Z_{12} \\
-Z_{21} & Z_{11}\end{pmatrix}\begin{pmatrix} Z'_{11} & Z'_{12} \\
Z'_{21} & Z'_{22}\end{pmatrix}=\frac{1}{\det(Z)}\begin{pmatrix} Z_{22}Z'_{11}-Z_{12}Z'_{21}  & Z_{22}Z'_{12}-Z_{12}Z'_{22} \\
Z_{11}Z'_{21}-Z_{21}Z'_{11} & Z_{11}Z'_{22}-Z_{21}Z'_{12}\end{pmatrix},$$

it suffices to show that

\begin{equation} \label{eq: torsor 1}
\end{equation}

\begin{equation} \label{eq: torsor 2}
\end{equation}

To verify these identities, it is helpful to rewrite $P_1(Z)=0$ and $P_2(Z)=0$ as

\begin{equation} \label{eq: for fractions}
\tfrac{Z_{21}}{Z_{11}}\cdot \tfrac{Z_{22}}{Z_{12}}=b^2-a\quad \text{ and } \tfrac{Z_{21}}{Z_{11}}+ \tfrac{Z_{22}}{Z_{12}}=2b.
\end{equation}

(Note that subtracting $2Z_{21}Z_{12}$ from $P_2(Z)=0$ and using the invertibility of $\det(Z)$ shows that $Z_{12}$ is invertible. By a similar argument, $Z_{11}$ is invertible.) From (<ref>) we deduce $(\frac{Z_{22}}{Z_{12}}-b)^2=a$, which leads to

\begin{align*}
0&=(\tfrac{Z_{22}}{Z_{12}})^2-2b\tfrac{Z_{22}}{Z_{12}}+(b^2-a)=(\tfrac{Z_{22}}{Z_{12}})^2-\left(\tfrac{Z'_{21}}{Z'_{11}}+ \tfrac{Z'_{22}}{Z'_{12}}\right)\tfrac{Z_{22}}{Z_{12}}-\tfrac{Z'_{21}}{Z'_{11}}\cdot \tfrac{Z'_{22}}{Z'_{12}}=\\
\end{align*}

Clearing denominators, we find (<ref>). A similar computation verifies (<ref>). In summary, we see that $\R/\Q$ is a differential $\G$-torsor for $\de(y)=\cA y$ with fundamental matrix $\Y$.

In the next lemma we collect two basic observations that will be used repeatedly in what follows.

Let $\G$ act on $\mathcal{R}/\mathcal{Q}$.

* If $\mathcal{B}\to\mathcal{B'}$ is a morphism of $k$-algebras, then $\G_{\mathcal{B}'}$ acts on $\mathcal{R}\otimes_{\mathcal{B}}\mathcal{B'}/\mathcal{Q}\otimes_{\mathcal{B}}\mathcal{B'}$.

* If $\mathcal{S}$ is a multiplicatively closed subset of $\mathcal{Q}$, then the action of $\G$ on $\mathcal{R}/\mathcal{Q}$ extends canonically to an action of $\G$ on $\mathcal{S}^{-1}\mathcal{R}/\mathcal{S}^{-1}\mathcal{Q}$.

Moreover, if $\R/\Q$ is a differential $\G$-torsor, then also the actions in (i) and (ii) define differential torsors, provided that $\R\otimes_\B \B'$ and $\mathcal{S}^{-1}\R$ respectively is not the zero ring.

For later use we record a lemma on differential torsors in the case $\B=k$ and $\Q=k(x)$.

Let $G$ be a linear algebraic group over $k$ and let $R/k(x)$ be a differential $G$-torsor. Then the intersection of all maximal $\de$-ideals of $R$ is zero.

Let $\m$ be a maximal $\de$-ideal of $R$. For every $g\in G(k)$, also $g(\m)$ is a maximal $\de$-ideal of $R$. It thus suffices to show that the ideal $I=\bigcap_{g\in G(k)}g(\m)$ of $R$ is zero.
Clearly $g(I)\subseteq I$ for every $g\in G(k)$. In terms of the coaction $\rho\colon R\to R\otimes_k k[G]$ (as in Lemma <ref>) this property translates to $\rho(I)\subseteq I\otimes_k k[G]$. But then the closed subscheme $W$ of $\spec(R)$ defined by $I$ is stable under the action of $G_{k(x)}$. Since $\spec(R)$ is a $G_{k(x)}$-torsor, this is only possible if $W=\spec(R)$, i.e, $I=0$.

To explain how differential torsors are obtained by “spreading out” a Picard-Vessiot ring into a family of differential rings we will need a basic lemma on linear algebraic groups.

Let $G$ be a linear algebraic group over $k$ and let $k'/k$ be a field extension. If $\f'\colon G_{k'}\to \Gl_{n,k'}$ is a closed embedding of algebraic groups over $k'$, then there exists a finitely generated $k$-subalgebra $\B$ of $k'$ and a closed embedding $\f\colon G_\B\to \Gl_{n,\B}$ of group schemes over $\B$ such that $\f_{k'}=\f'$.

Writing $k'$ as the directed union of its finitely generated $k$-subalgebras, this follows from Theorem 8.8.2 and Theorem 8.10.5 (iv) in [20].

The following simple example illustrates Lemma <ref>.

Let $k'/k$ be a field extension and $b\in k'\smallsetminus\{0\}$. Consider the closed embedding $\f'\colon\mathbb{G}_{a,k'}\to \Gl_{2,k'}$ of algebraic groups over $k'$ (where $\mathbb{G}_{a,k'}$ denoted the additive group over $k'$) given by

\begin{equation} \label{eq: embed Ga}
g\mapsto \begin{pmatrix}
1 & bg \\
0 & 1
\end{pmatrix}.
\end{equation}

For $\B=k[b]\subseteq k'$, formula (<ref>) defines a morphism $\mathbb{G}_{a,\B}\to \Gl_{2,\B}$ of group schemes over $\B$ that need not be a closed embedding, e.g., if $b$ is transcendental over $k$, the fibre over $b=0$ is not a closed embedding. However, for $\B=k[b,b^{-1}]\subseteq k'$, formula (<ref>) defines a closed embedding $\mathbb{G}_{a,\B}\to \Gl_{2,\B}$ of group schemes over $\B$.

One can think of differential torsors as the kind of objects one obtains  when “spreading out” a Picard-Vessiot ring into a nice family. This is formalized in the following lemma.

Let $k\subseteq k'$ be an inclusion of algebraically closed fields of characteristic zero and let $R'/k'(x)$ be a Picard-Vessiot ring for $\de(y)=A'y$ with $A'\in k'(x)^{n\times n}$ and $Y'\in\Gl_n(R')$ such that $\de(Y')=A'Y'$. Then there exist

* a finitely generated $k$-subalgebra $\B$ of $k'$,

* a monic polynomial $f\in \B[x]$,

* an affine group scheme $\G$ of finite type over $\B$ and

* a differential $\G$-torsor $\R/\B[x]_f$

such that

* $A'\in\B[x]_f^{n\times n}$,

* $\R$ is flat over $\B[x]_f$ and $\R/\B[x]_f$ is a differential $\G$-torsor for $\de(y)=A'y$ with fundamental solution matrix $\Y\in\Gl_n(\R)$ and $R^\gen=\R\otimes_{\B[x]_f}K(x)$ is $\de$-simple, where $K\subseteq k'$ is the algebraic closure of the field of fractions of $\B$ and

* $R^\gen\otimes_{K(x)}k'(x)\simeq R'$ via an isomorphism that identifies $\Y$ with $Y'$.

Moreover, if $\B_0$ is a finitely generated $k$-subalgebra of $k'$ and $f_0\in \B_0[x]$ is monic,

then $\B$ can be chosen such that $\B_0\subseteq \B$ and $f$ can be chosen such that $f_0$ divides $f$ in $\B[x]$. If, in addition, $f_0\in \B_0[x]$ is such that $A'\in\B_0[x]_{f_0}^{n\times n}$, then $\B$ can, in addition, be chosen such that $\B$ is contained in the algebraic closure of the field of fractions of $\B_0$.

Furthermore, if the differential Galois group $G'$ of $R'/k'(x)$ is of the form $G'=G_{k'}$ for some algebraic group $G$ over $k$, then $\G$ can be chosen to be equal to $G_{\B}$.

We consider the differential Galois group $G'$ of $R'/k'(x)$ as a closed subgroup of $\Gl_{n,k'}$ via the choice of $Y'$. The contributions to $\B$ and $f$ came from three different sources. We go through them one by one:

* Let $\B_1$ be a finitely generated $k$/̄subalgebra of $k'$ and $f_1\in \B[x]$ a monic polynomial such that $A'\in \B_1[x]_{f_1}$. Then $\B_1[x]_{f_1}[Y',\frac{1}{\det(Y')}]$ is a $\de$-subring of $R'$.

* Consider the ideal $I'$ of $k'(x)[X,\frac{1}{\det(X)}]$ given by $I'=\{p\in k'(x)[X,\frac{1}{\det(X)}]|\ p(Y')=0\}$. Choose $p_1,\ldots,p_r\in I'$ such  $I'=(p_1,\ldots,p_r)$. Let $\B_2$ be a finitely generated $k$/̄subalgebra of $k'$ and let $f_2\in \B_2[x]$ be monic such that $p_1,\ldots,p_r\in \B_2[x]_{f_2}[X,\frac{1}{\det(X)}]\subseteq k'(x)[X,\frac{1}{\det(X)}].$

* Let $\B_3$ be a finitely generated $k$-subalgebra of $k'$ and $\G'$ a closed subgroup scheme of $\Gl_{n,\B_3}$ such that $\G'_{k'}=G'$ as closed subgroups of $\Gl_{n,k'}$. By generic flatness (<cit.>), we may assume that $\G'$ is flat over $\B_3$.

Let $\B_4$ be the $k$-subalgebra of $k'$ generated by $\B_1,\B_2$ and $\B_3$. Furthermore, set $f_4=f_1f_2$ and consider the finitely generated $\B_4[x]_{f_4}$-algebra $\B_4[x]_{f_4}[Y',\frac{1}{\det(Y')}]\subseteq R'$.	By generic flatness (<cit.>), there exists a nonzero (not necessarily monic) $h\in\B_4[x]_{f_4}$ such that $(\B_4[x]_{f_4})_{h}[Y',\frac{1}{\det(Y')}]$ is flat over $(\B_4[x]_{f_4})_{h}$. Write $h=\frac{h'}{f_4^\ell}$ with $h'\in\B_4[x]$ and $\ell\geq 1$. Then $(\B_4[x]_{f_4})_{h}=\B_4[x]_{h'}$. Let $\B$ be the $k$-subalgebra of $k'$ generated by $\B_4$ and the inverse (in $k'$) of the leading coefficient $b$ of $h'$.

In general, if $R\to S$ is a flat ring map and $f\in R$, then $S_f=S\otimes_R R_f$ is a flat $R_f$-module (<cit.>). Therefore, since $\B_4[x]_{h'}[Y',\frac{1}{\det(Y')}]$ is a flat $\B_4[x]_{h'}$/̄module, $(\B_4[x]_{h'})_b[Y',\frac{1}{\det(Y')}]$ is a flat $(\B_4[x]_{h'})_{b}$/̄module. For the monic polynomial $f=\frac{1}{b}h'\in \B_5[x]$ we have $(\B_4[x]_{h'})_{b}=\B[x]_{f}$ and so $\B[x]_{f}[Y',\frac{1}{\det(Y')}]$ is a flat $\B[x]_{f}$-module.

We set $\R=\B[x]_{f}[Y',\frac{1}{\det(Y')}]$ and $\G=\G'_\B$. Then $\R$ is a $\B[x]_f$-$\de$-algebra and flat over $\B[x]_f$. Moreover, the canonical surjection $\R\otimes_{\B[x]_f}k'(x)\to R'$ is an isomorphism by item (b) above. Since $\G'$ is flat over $\B_3$, we see that $\G$ is flat over $\B$.
Furthermore, $\G_{k'}=(\G'_\B)_{k'}=\G'_{k'}=G'$. In particular, $k'(x)\otimes_\B \B[\G]=k'(x)\otimes_{k'}k'[G']$.

The above flatness properties allow us to identify $\R\otimes_\B \B[\G]$ with a $\de$-subring of $R'\otimes_{k'}k'[\G']$. In detail, since $\B[\G]$ is a flat $\B$-algebra, $\B[x]_f\otimes_\B \B[\G]$ is a flat $\B[x]_f$-algebra and therefore $\R\otimes_\B\B[\G]=\R\otimes_{\B[x]_f}(\B[x]_f\otimes_\B\B[\G])$ is flat $\B[x]_f$-algebra. This entails that the map $\R\otimes_\B\B[\G]\to (\R\otimes_\B\B[\G])\otimes_{\B[x]_f}k'(x)$ is injective. But

\begin{align*}
(\R\otimes_\B\B[\G])\otimes_{\B[x]_f}k'(x)= & (\R\otimes_{\B[x]_f}k'(x))\otimes_{k'(x)}(k'(x)\otimes_\B\B[\G])= \\ = & R'\otimes_{k'(x)}(k'(x)\otimes_{k'}k'[G'])=R'\otimes_{k'}k'[G'].
\end{align*}

So we can consider $\R\otimes_\B\B[\G]$ as a subring of $R'\otimes_{k'}k'[G']$.

As explained in Section <ref>, the closed embedding $G_{k'}\to \Gl_{n,k'}$ corresponds to the morphism $k'[X, \frac{1}{\det(X)}]\to k'[G]=(R'\otimes_{k'(x)}R')^\de,\ X\mapsto Z=Y'^{-1}\otimes Y'$. Moreover, the coaction $R'\to R'\otimes_{k'}k'[G']$ is determined by $Y'\mapsto Y'\otimes Z$. In summary, we see that the coaction  $R'\to R'\otimes_{k'}k'[G']$ restricts to a map $\R\to \R\otimes_\B \B[\G]$. It is then clear that $\G$ acts on $\R/\B[x]_f$. Indeed, for a $\B$-algebra $\T$, every $g\in\G(\T)\leq\Gl_n(\T)$ acts on $\R\otimes_\B\T$ by $Y'\otimes 1\mapsto Y'\otimes g$.

To see that $\R/\B[x]_f$ is a differential $\G$-torsor, let us first show that $\R\otimes_{\B[x]_f}\R\to R'\otimes_{k'(x)}R'$ is injective. Note that

It thus suffices to show that the map $\R\otimes_{\B[x]_f}\R\to (\R\otimes_{\B[x]_f}\R)\otimes_{\B[x]_f}k'(x)$ is injective.
But this follows from the flatness of $\B[x]_f\to \R\otimes_{\B[x]_f}\R$, which in turn follows from the flatness of $\B[x]_f\to \R$.

We claim that the isomorphism
$R'\otimes_{k'(x)}R'\to R'\otimes_{k'}k'[G']$ restricts to an isomorphism $\R\otimes_{\B[x]_f}\R\to \R\otimes_\B\B[\G]$. Injectivity being obvious, the surjectivity of $\R\otimes_{\B[x]_f}\R\to \R\otimes_\B\B[\G]$ follows from $\B[\G]=\B[Z,\frac{1}{\det(Z)}]$, where $Z=Y'^{-1}\otimes Y'\in \Gl_n(R'\otimes_{k'(x)}R')$, and $\R\otimes_{\B[x]_f}\R\to \R\otimes_\B\B[\G]$ maps $Y'^{-1}\otimes Y'$ to $1\otimes Z$. Thus $\R/\B[x]_f$ is a differential $\G$-torsor. As $\de(Y')=A'Y'$ and $\R=\B[x]_f[Y',\frac{1}{\det(\Y')}]$, we see that, in fact, $\R/\B[x]_f$ is a differential $\G$-torsor for $\de(y)=A'y$ with fundamental matrix $\Y=Y'$.

As $(\R\otimes_{\B[x]_f}K(x))\otimes_{K(x)}k'(x)=\R\otimes_{\B[x]_f}k'(x)=R'$ is $\de$-simple, we see that also $R^\gen=\R\otimes_{\B[x]_f}K(x)$ must be $\de$-simple. We have thus established the first claim of the lemma.

To address the second claim, let $K_0\subseteq k'$ be the algebraic closure of the field of fractions of $\B_0$. Note that there is no difficulty in arranging $\B$ such that $\B_0\subseteq \B$. For example, in the above construction of $\B$, we could choose $\B_1$ such that $\B_0\subseteq \B_1$. Similarly, we can choose $f_1$ so that $f_0$ divides $f_1$.

Assume that $A'\in \B_0[x]_{f_0}^{n\times n}$.
As $A'\in K_0(x)^{n\times n}$, we may consider a Picard-Vessiot ring $R_0/K_0(x)$ for $\de(y)=A'y$. It then follows from Lemma <ref> that $R_0\otimes_{K_0(x)}k'(x)$ is a Picard-Vessiot ring for $\de(y)=A'y$ over $k'(x)$. By the uniqueness of Picard-Vessiot rings, we thus have $R'\simeq R_0\otimes_{K_0(x)}k'(x)$.
We can now apply the first claim of the lemma to the inclusion $k\subseteq K_0$ and the Picard-Vessiot ring $R_0/K_0(x)$. Then automatically $\B\subseteq K_0$.

Concerning the last claim of the lemma, note that, according to Lemma <ref>, the closed embedding $G'=G_{k'}\to \Gl_{n,k'}$ determined by $Y'$ spreads out to a closed embedding $G_{\B'}\to \Gl_{n,\B'}$, where $\B'$ is a finitely generated $k$-subalgebra of $k'$. In point (c) above, we can thus choose $\B_3=\B'$ and $\G'=G_{\B_3}$, so that $\G=G_\B$.

We now describe the framework in which we will carry out our specialization arguments.

e are mainly interested in the following setup.

* $k$ is an algebraically closed field of characteristic zero;

* $\B$ is a finitely generated $k$-algebra and an integral domain;

* $\X=\spec(\B)$;

* $\G$ is an affine group scheme of finite type over $\B$;

* $f\in \B[x]$ is a monic polynomial and $\B[x]_f$ is a differential ring with respect to $\de=\frac{d}{dx}$;

* $\cA\in\B[x]_f^{n\times n}$;

* $\R/\B[x]_f$ is a differential $\G$-torsor for $\de(y)=\cA y$ with fundamental matrix $\Y\in\Gl_n(\R)$ such that $\R$ is flat over $\B[x]_f$;

* $R^c=\R\otimes_{\B[x]_f}k(x)$, where $c\in \X(k)=\Hom_k(\B,k)$ and the tensor product is formed using the extension of $c\colon \B\to k$ to $c\colon \B[x]_f\to k(x)$ determined by $c(x)=x$;

* $Y^c=\Y\otimes 1\in\Gl_n(R^c)$ is the image of $\Y$ in $R^c$;

* $A^c\in k(x)^{n\times n}$ is obtained from $\cA$ by applying $c\colon \B[x]_f\to k(x)$ to the coefficients of $\cA$;

* $G^c=\G_c$ is the algebraic group over $k$ obtained from $\G$ by base change via $c\colon \B\to k$;

* $K$ is the algebraic closure of the field of fractions $k(\B)$ of $\B$;

* $R^\gen=\R\otimes_{\B[x]_f}K(x)$ is $\de$-simple;

* $Y^\gen=\Y\otimes 1\in \Gl_n(R^\gen)$ is the image of $\Y$ in $R^\gen$;

* $G^\gen=\G_K$ is the algebraic group over $K$ obtained from $\G$ by base change via $\B\to K$.

Furthermore, for $h\in \R$, denote with $h^c=h\otimes 1\in R^c$ the image of $h$ in $R^c$.

Similarly, $h^\gen=h\otimes 1\in R^\gen$ denotes the image of $h$ in $R^\gen$.

For the remainder of Section <ref> we assume Notation <ref>.

Notation <ref> gives a precise meaning to the idea of a family of potential Picard-Vessiot rings for a family of linear differential equations with prescribed potential differential Galois groups.  (Lemmas <ref> and <ref> below elaborate this point.) We think of $\R$ as defining the family $(R^c)_{c\in\X(k)}$ and we would like to compare the individual $R^c$'s with the ring $R^\gen$ at the generic fibre.

We now explore some first consequences of Notation <ref>.

The ring $\R$ is an integral domain and the morphisms $\B[x]_f\to \R$, $\B\to \B[\G]$ and $\R\to R^\gen$ are injective.

Suppose that $h\in \B[x]_f$ is a nonzero element of the kernel of  $\B[x]_f\to \R$. Then the image $h^\gen$ of $h$ in $R^\gen$ is zero but also a unit. Thus $R^\gen$ must be the zero ring. This contradicts the assumption that $R^\gen$ is $\de$-simple.

Assume that $b\in\B$ lies in the kernel of $\B\to\B[\G]$. Then the image of $b$ in $\R\otimes_\B \B[\G]$ is zero. But then the second diagram of Lemma <ref> implies that $b=0$.

As $\R$ is flat over $\B[x]_f$ it is clear that $\R\to R^\gen$ is injective.	From this it follows that $\R$ is an integral domain because differentially simple rings are integral domains.

Because $\R\to R^\gen$ is injective, it is not really necessary to distinguish between an element $h\in\R$ and its image $h^\gen$ in $R^\gen$.
However, we will sometimes use the notation $h^\gen$ to emphasize that we are considering $h$ as an element of $R^\gen$.

At the generic fibre we have a Picard-Vessiot ring:

The $K(x)$-$\de$-algebra $R^\gen$ is a Picard-Vessiot ring for $\de(y)=\cA y$ with fundamental matrix $Y^\gen$ and differential Galois group $G^\gen$.

As $\R/\B[x]_f$ is a differential $\G$/̄torsor, $\R\otimes_\B K/\B[x]_f\otimes_\B K$ is a differential $G^\gen$/̄torsor by Lemma <ref> (i). But $\R\otimes_\B K=\R\otimes_{\B[x]_f}K[x]_f$ and $\B[x]_f\otimes_\B K=K[x]_f$. Thus $R^\gen/K(x)$ is a differential $G^\gen$-torsor by Lemma <ref> (ii).

As $\R=\B[x]_f[\Y,\frac{1}{\det(\Y)}]$ and $\de(\Y)=\cA\Y$, we have $R^\gen=K(x)[Y^\gen,\frac{1}{\det(Y^\gen)}]$

and $\de(Y^\gen)=\cA Y^\gen$. Because $R^\gen$ is assumed to be $\de$-simple, we see that $R^\gen/K(x)$ is a Picard-Vessiot ring for $\de(y)=\cA y$.

It follows from <cit.> that the differential Galois group of $R^\gen/K(x)$ is $G^\gen$.

So, reversing the idea of Lemma <ref>, we can think of $\R/\B[x]_f$ as having been obtained by “spreading out” the Picard-Vessiot ring $R^\gen/K(x)$. At the special fibres we either have nothing or a ring that “looks like” a Picard-Vessiot ring:

If $c\in \X(k)$ is such that $R^c$ is not the zero ring, then $R^c/k(x)$ is a differential $G^c$-torsor for $\de(y)=A^cy$ with fundamental matrix $Y^c$. Moreover, there exists a nonempty Zariski open subset $\U$ of $\X(k)$ such that $R^c$ is not the zero ring for every $c\in \U$.

Assume that $R^c$ is not the zero ring. As in Lemma <ref>, using Lemma <ref>, one sees that $R^c/k(x)$ is a differential $G^c$/̄torsor. Furthermore, $R^c=k(x)[Y^c,\frac{1}{\det(Y^c)}]$ and $\de(Y^c)=A^cY^c$.

Let $T$ be a $k$-algebra and $g\in G^c(T)$. When interpreted as an element of $\G(T)$, $g$ acts on $\Y\otimes1\in\Gl_n(\R\otimes_\B T)$ by multiplication with a matrix $[g]\in \Gl_n(T)$. Thus $g$ also acts on $Y^c\otimes 1\in\Gl_n(R^c\otimes_kT)$ by multiplication with $[g]$. This proves the first claim of the lemma.

For the second claim, note that $\B[x]_f\subseteq \R$ by Lemma <ref> and that $\R$ is a finitely generated $\B[x]_f$-algebra. By <cit.> (applied with $b=1$) there exists a nonzero $h\in \B[x]_f$ such that any morphism $\psi$ (of rings) from $\B[x]_f$ into an algebraically closed field with $\psi(h)\neq 0$, extends to a morphism on $\R$. Without loss of generality we may assume $h\in\B[x]$. Let $a\in \B$ be the leading coefficient of $h$ and let $\U$ be the Zariski open subset of $\X(k)$ defined by $a$, i.e., $\U$ is the complement of the vanishing locus of $a$.

Let $c\in \U$. We will show that $R^c$ is not the zero ring. Taking $\psi$ as $\psi\colon \B[x]_f\xrightarrow{c} k(x)\to \overline{k(x)}$, we see that $\psi(h)\neq 0$ and so $\psi$ extends to a morphism $\psi\colon \R\to \overline{k(x)}$. Then $\R\otimes_{\B[x]_f}k(x)\to\overline{k(x)},\ r\otimes \lambda\mapsto \psi(r)\lambda$ is a morphism of rings. Thus $\R\otimes_{\B[x]_f}k(x)$ cannot be the zero ring.

We can do slightly better:

There exists a nonempty Zariski open subset $\U$ of $\X(k)$ such that $R^c$ is an integral domain for all $c\in\U$.

The key fact from algebraic geometry that we will use is that being geometrically integral “spreads out” from the generic fibre (<cit.>). More concretely, if $\B\subseteq \R$ is an inclusion of finitely generated $k$-algebras, such that $\R\otimes_\B K$ is an integral domain (where, as usual, $K$ is the algebraic closure of the field of fractions $k(\B)$ of $\B$), then there exists a nonempty Zariski open subset $\U$ of $\spec(\B)$ such that $\R\otimes_\B \overline{k(\p)}$ is an integral domain for every $\p\in\U$.

To apply this to our situation, note that $\R\otimes_\B K$ is an integral domain because $\R\otimes_\B K=\R\otimes_{\B[x]_f}K[x]_f\subseteq \R\otimes_{\B[x]_f}K(x)=R^\gen$ and the latter is an integral domain.

By the first paragraph, there exists a nonempty Zariski open subset $\U$ of $\X(k)$ such that $\R\otimes_\B k$ is an integral domain for all $c\in \U$. As

$$R^c=\R\otimes_{\B[x]_f}k(x)=(\R\otimes_{\B[x]_f}k[x]_{f^c})\otimes_{k[x]_{f^c}}k(x)=(\R\otimes_\B k)\otimes_{k[x]_{f^c}}k(x),$$

we see that $R^c$ is a localization of the integral domain $R\otimes_\B k$ for all $c\in \U$. So $R^c$ is either the zero ring or an integral domain. Thus the claim follows from Lemma <ref>.

The following example illustrates Lemma <ref>.

Let $a$ be a unit of $\B[x]_f$ such that $a$ is not a square in $k(\B)(x)$. Then $\B[x]_f[y]/(y^2-a)=\B[x]_f[\eta]$ is an integral domain and naturally a differential ring (with $\de(\eta)=\frac{\delta(a)}{2a}\eta$). Let $b\in\B[x]_f$. As in Example <ref> set

where $\de(y_1)=(b+\eta)y_1$, $\de(y_2)=(b-\eta)y_2$,

P_1=X_{21}X_{22}-(b^2-a)X_{11}X_{12}, \quad  \quad  P_2=X_{21}X_{12}+X_{22}X_{11}-2bX_{11}X_{12,} $$

$$\cA=\begin{pmatrix}  0 & 1 \\ a+\de(b)-b^2-\frac{\delta(a)b}{2a} & 2b+\frac{\delta(a)}{2a}\end{pmatrix}\in\B[x]_f^{2\times 2},$$

and $\de(X)=\cA X$. Then $\R$ is an integral domain and $\R/\B[x]_f$ is a differential $\G$-torsor for $\de(y)=\cA y$, where $\G$ is the group scheme of $2\times 2$ monomial matrices over $\B$ (as seen in Example <ref>).

We claim that for $c\in \X(k)$
the $k(x)$-$\de$-algebra $R^c=\R\otimes_{\B[x]_f}k(x)$ is an integral domain if and only if $a^c$ is not a square in $k(x)$.
Note that $\R$ is a Laurent-polynomial ring in $y_1,y_2$ over $\B[x]_f[\eta]$. Therefore, $\R\otimes_{\B[x]_f}k(x)$ is a Laurent polynomial ring over $\B[x]_f[\eta]\otimes_{\B[x]_f}k(x)$. The latter is an integral domain, if and only if  $\B[x]_f[\eta]\otimes_{\B[x]_f}k(x)=k(x)[y]/(y^2-a^c)$ is an integral domain and this is the case if and only if $a^c$ is not a square in $k(x)$.

Thus, for example, for $\B=k[\alpha,\beta]$, with $\alpha,\beta$ algebraically independent over $k$ and $a=x^2+\alpha x+\beta$, we that $R^c$ is an integral domain if and only $c\in \U$, where $\U\subseteq \X(k)$ is the Zariski open subset where the discriminant $\alpha^2-4\beta$ does not vanish.

By Lemma <ref> the $R^c$'s “look like” Picard-Vessiot rings for $\de(y)=A^cy$ with differential Galois group $G^c$. The only missing piece of information is whether or not $R^c$ is $\de$-simple. If $R^c$ is $\de$-simple, then $R^c/k(x)$ is a Picard-Vessiot ring with differential Galois group $G^c$.

The main question is: Are there “many” $c$'s in $\X(k)$ such that $R^c/k(x)$ is Picard-Vessiot?
Eventually (Theorem <ref>) we will see that the answer is yes.

The following example illustrates that the set of all $c\in \X(k)$ such that $R^c$ is Picard-Vessiot is in general not constructible.

Let $\B=k[\alpha]$, with $\alpha$ a variable over $k$ and set $f=x$. Let

0 & 1 \\
(\frac{\alpha}{x})^2-1 & -\frac{1}{x}
\end{pmatrix}\in \B[x]_f^{2\times 2}=k[\alpha,x]_x^{2\times 2}

be the companion matrix of Bessel's differential equation $y''+\frac{1}{x}y'+(1-(\frac{\alpha}{x})^2)y=0$. Let $X$ be a $2\times 2$ matrix of indeterminates over $\B[x]_f$. Consider $\B[x]_f[X,\frac{1}{\det(X)}]$ as a $\B[x]_f$-$\de$-algebra via $\de(X)=\mathcal{A}{X}$. Then

and so $(\det(X)-\frac{1}{x})$ is a $\de$-ideal of $\B[x]_f[X,\frac{1}{\det(X)}]$ and $\R=\B[x]_f[X,\frac{1}{\det(X)}]/(\det(X)-\frac{1}{x})$ is a $\B[x]_f$-$\de$-algebra. Let $\Y\in \Gl_n(\R)$ denote the image of $X$ in $\R$. Let $\G=\Sl_2=\Sl_{2,\B}$ be the group scheme $\Sl_2$ over $\B$. Then $\G$ acts on $\R/\B[x]_f$: For a $\B$-algebra $\T$, a $g\in\Sl_2(\T)$ defines a $\B[x]_f\otimes_\B \T$-$\de$-automorphism $g\colon \R\otimes_\B\T\to \R\otimes_\B\T$ by $g(\Y\otimes 1)=(\Y\otimes 1)(1\otimes g)$.
The corresponding morphism $\rho\colon \R\to \R\otimes_\B \B[\Sl_2]$ of $\B[x]_f$-$\de$-algebras (as in Lemma <ref>) is given by $\rho(\Y)=(\Y\otimes 1)(1\otimes T)$, where $T\in\B[\Sl_2]^{2\times 2 }$ is the matrix of coordinate functions on $\Sl_2$. The morphism $\R\otimes_{\B[x]_f}\R\to \R\otimes_\B \B[\G],\ a\otimes b\mapsto (a\otimes 1)\cdot\rho(b)$ is an isomorphism, its inverse is determined by $1\otimes T\mapsto (\Y\otimes 1)^{-1}(1\otimes \Y)$. So $\R/\B[x]_f$ is a differential $\G$-torsor for $\de(y)=\mathcal{A} y$.

From a more geometric perspective, if $\Q$ is any ring (e.g., $\B[x]_f$) and $a\in\Q^\times$, it is clear that the closed subscheme $\Z$ of $\Gl_{2,\Q}$ defined by $\det(X)-a$ is an $\Sl_{2,\Q}$-torsor: For any $\Q$-algebra $\Q'$, the map
$\Z(\Q')\times\Sl_2(\Q')\to \Z(\Q')\times \Z(\Q'),\ (z,g)\mapsto (z,zg)$ is bijective with inverse $(z_1,z_2)\mapsto (z_1, z_1^{-1}z_2)$.

The differential Galois group of Bessel's equation is $\Sl_{2}$ if $\alpha-\frac{1}{2}\notin\mathbb{Z}$ and the multiplicative group otherwise (Appendix of [25]). The significance of the condition $\alpha-\frac{1}{2}\notin\mathbb{Z}$ is also explained in Example <ref>. It follows that $R^\gen=\R\otimes_{\B[x]_f}K(x)/K(x)$ is Picard-Vessiot. Moreover, $R^c$ is Picard-Vessiot if and only if $c\in k\smallsetminus\{\frac{1}{2}+m|\ m\in\mathbb{Z}\}$.

The following two lemmas will be useful later on.

Let $h\in \R$ be nonzero. Then there exists a nonempty Zariski open subset $\U$ of $\X(k)$ such that $h^c\in R^c$ is nonzero for every $c\in \U$.

Applying <cit.> to the inclusion $\B[x]_f\subseteq \R$, we find a nonzero element $g\in\B[x]_f$ such that every morphism
$\psi$ (of rings) from $\B[x]_f$ into an algebraically closed field with $\psi(g)\neq 0$, extends to a morphism $\psi$ on $\R$ with $\psi(h)\neq 0$. Without loss of generality we may assume that $g\in \B[x]$. Let $a\in \B$ be the leading coefficient of $g$ and let $\U$ be the Zariski open subset of $\X(k)$ defined by $a$.

For $c\in \U$ let $\psi$ be defined by $\psi\colon \B[x]_f\xrightarrow{c}k(x)\to \overline{k(x)}$. Then $\psi(g)\neq 0$ and $\psi$ extends to $\R$ with $\psi(h)\neq 0$. We can thus define a morphism $\psi'\colon R^c=\R\otimes_{\B[x]_f}k(x)\to \overline{k(x)},\ r\otimes \lambda\mapsto \psi(r)\lambda$. Then $\psi'(h^c)=\psi(h)\neq 0$. Thus $h^c\neq 0$.

Recall (Definition <ref>) that the fundamental matrix $\Y\in\Gl_n(\R)$ defines a morphism $\G\to \Gl_{n,\B}$ of group schemes over $\B$.

There exists a nonzero element $b\in\B$ such that the base change of $\G\to \Gl_{n,\B}$ via $\B\to\B_b$ is a closed embedding.

Set $\R'=\R\otimes_{\B[x]_f}k(\B)(x)$. As in the proof of Lemma <ref> we see that $\R'/k(\B)(x)$ is a differential $\G_{k(\B)}$-torsor for $\de(y)=\cA y$ with fundamental solution matrix $\Y\otimes 1\in \Gl_n(\R')$.
From this we deduce that the morphism $\G_{k(\B)}\to\Gl_{n,k(\B)}$ determined by $\Y\otimes 1$ is a closed embedding as follows: Assume $\T$ is a $k(\B)$/̄algebra and $g\in\G_{k(\B)}(\T)=\Hom_{k(\B)}(k(\B)[\G],\T)$ is in the kernel of $\G_{k(\B)}(\T)\to\Gl_n(\T)$, i.e., $g$ acts trivially on $\R'\otimes_{k(\B)}\T$.
Let $\rho'\colon \R'\to \R'\otimes_{k(\B)}k(\B)[\G]$ denote the coaction and $e\in\Hom(k(\B)[\G],\T)=\G(\T)$ the identity element. As $g$ acts trivially, the maps

$$\R'\xrightarrow{\rho'} \R'\otimes_{k(\B)}k(\B)[\G]\xrightarrow{\R'\otimes g} \R'\otimes_{k(\B)}\T  $$

$$\R'\xrightarrow{\rho'} \R'\otimes_{k(\B)}k(\B)[\G]\xrightarrow{\R'\otimes e} \R'\otimes_{k(\B)}\T  $$

agree (with $a\mapsto a\otimes 1$). As the $\R'$-linear extension of $\rho'$ is an isomorphism, it follows that $\R'\otimes g=\R'\otimes e$ and therefore $g=e$. This shows that $\G_{k(\B)}(\T)\to \Gl_n(\T)$ is injective for every $k(\B)$-algebra $T$. Therefore $\G_{k(\B)}\to \Gl_{n,k(\B)}$ is a closed embedding (<cit.>).

The morphism $\G\to \Gl_{n,\B}$ determined by $\Y$, after base change via $\B\to k(\B)$, yields the morphism $\G_{k(\B)}\to\Gl_{n,k(\B)}$ determined by $\Y\otimes 1$ (and, as we have just seen, the latter is a closed embedding). So the map $\psi\colon \B[X,\frac{1}{\det(X)}]\to \B[\G]$, dual to the morphism $\G\to \Gl_{n,\B}$, becomes surjective after the base change $\B\to k(\B)$. In other words, the map $S^{-1}\psi\colon S^{-1}\B[X,\frac{1}{\det(X)}]\to S^{-1}\B[\G]$ is surjective, where $S$ is the multiplicatively closed subset of all nonzero elements of $\B$.

Let $a_1,\ldots,a_m\in \B[\G]$ be generators of $\B[\G]$ as a $\B$-algebra and let $\frac{f_1}{s_1},\ldots,\frac{f_m}{s_m}\in S^{-1}\B[X,\frac{1}{\det(X)}]$ be such that $(S^{-1}\psi)(\frac{f_1}{s_i})=\frac{a_i}{1}$ for $i=1,\ldots,m$.
Then there exist $s_1',\ldots,s_m'\in S$ such that $s_i'(\psi(f_i)-s_ia_i)=0$ for $i=1,\ldots,m$. Thus $b=s_1\ldots s_ms_1'\ldots s_m'$ has the desired property.

§.§ Ad$\times$Jac-open sets

To show that the set of all $c$'s in $\X(k)$ such that, in the context of Notation <ref>,  $R^c/k(x)$ is Picard-Vessiot,  is in a certain sense “large”,
we introduce ad$\times$Jac-open subsets of $\X(k)$ following [23] and [17]. Our main specialization theorem (Theorem <ref>) states that the set of good specializations contains an ad$\times$Jac-open subset. This result would of course be useless if it is not known that an ad$\times$Jac-open subset is nonempty.

The main result of this section is that an ad$\times$Jac-open subset is not only nonempty but in fact Zariski dense in $\X(k)$ (Theorem <ref>). It was already shown in [17] that the intersection of an ad-open with an open with respect to the multiplicative group is Zariski dense. So most of our work here is focused on the case of abelian varieties. For related but weaker results see <cit.>.

§.§.§ Open subsets defined by commutative group schemes

Throughout Section <ref> we assume that

* $k$ is an algebraically closed field of characteristic zero;

* $\B$ is a finitely generated $k$/̄algebra that is an integral domain and

* $\X=\spec(\B)$.

Let $\cA$ be a commutative group scheme of finite type over $\B$. For every $c\in \X(k)$ we have a specialization morphism

$$\s_c\colon\cA(\B)\to \cA(k),$$

given by applying $\cA$, considered as a functor on the category of $\B$-algebras, to the morphism $c\colon\B\to k$. For a finitely generated subgroup $\Gamma$ of $\cA(\B)$ we set

$$W_\X(\cA,\Gamma)=\{c\in\X(k)|\ \s_c \text{ is injective on } \Gamma\}.$$

The subsets of $\X(k)$ of the form $W_\X(\cA,\Gamma)$ satisfy the axioms for a basis of a topology: $\X(k)=W_\X(\cA,1)$ and

\begin{equation} \label{eq: intersection of ads}
W_\X(\cA_1,\Gamma_1)\cap W_\X(\cA_2,\Gamma_2)=W_\X(\cA_1\times \cA_2, \Gamma_1\times\Gamma_2).
\end{equation}

This statement remains true if we restrict the $\cA$'s to belong to a class of group schemes that is closed under taking products, such as the class of all abelian schemes.

We can thus consider the topology of $\X(k)$ generated by such a basis. The point of this construction is that, while families of linear differential equations parametrized by $\X$ do not exhibit generic behaviour with respect to the Zariski topology, they may exhibit generic behaviour with respect to such a finer topology. If we allow more $\cA$'s in our class, the corresponding topology gets finer and so the genericity statement we hope to prove gets weaker. It is therefore vital to restrict the shape of the allowed $\cA$'s as much as possible. In this context it is then irrelevant whether or not the sets of the form $W_\X(\cA,\Gamma)$ with $\cA$ an allowed group scheme still form a basis of a topology. We note however, that already a genericity result with respect to the discrete topology is not easily obtained, i.e., in the context of Theorem B from the introduction, it is nontrivial to prove the existence of a single good specialization.
In fact, we are not aware of a proof of the existence of a single good specialization that does not go through Theorem <ref>.

We next discuss the shape that we will allow for the possible $\cA$'s.

A subset $\U$ of $\X(k)$ is ad-open if it is of the form $\U=W_\X(\Ga,\Gamma)$, for some finitely generated subgroup $\Gamma$ of $\Ga(\B)=(\B,+)$.

As we are in characteristic zero, the group $\Gamma\leq (\B,+)$ is torsion free and thus a finite free $\mathbb{Z}$-module. If follows that the ad-open subsets of $\X(k)$ consist of exactly those specializations that preserve the $\mathbb{Z}$-linear independence of a finite family of elements of $\B$.

Note that if $\Gamma$ is generated by a single nonzero element $b\in \B$, then
$$W_\X(\Ga,\Gamma)=\{c\in \X(k)|\ b(c)\neq 0\}$$
is the basic Zariski open subset of $\X(k)$ where $b$ does not vanish. In this sense, the “topology” generated by the ad-open sets is finer than the Zariski topology.

Let $\B=k[u]$ be a univariate polynomial ring over $k$ so that $\X=\A^1_k$ and $\X(k)=k$. For $\mathbb{Q}$-linearly independent elements $a_1,\ldots,a_m\in k$, let $\Gamma$ be the subgroup of $(\B,+)$ generated by $a_1,\ldots,a_m$ and $u$. Then $W_\X(\Ga,\Gamma)=k\smallsetminus V$ consists of all elements of $k$ that are not contained in the $\mathbb{Q}$-vector space $V$ generated by $a_1,\ldots,a_m$.

If $\Gamma_1,\ldots,\Gamma_m$ are finitely generated subgroups of $(\B,+)$ and $\Gamma$ is the subgroup generated by $\Gamma_1,\ldots,\Gamma_m$, then $W_\X(\Ga,\Gamma)\subseteq W_\X(\Ga,\Gamma_1)\cap\ldots\cap W_\X(\Ga,\Gamma_m)$. Thus a finite intersection of ad-open subsets of $\X(k)$ contains an ad-open subset.

In the context of Notation <ref> it is often important to be able to enlarge the $k$/̄algebra $\B$ by adjoining finitely many elements from $K=\overline{k(\B)}$, because certain properties of the differential equation at the generic fibre may only manifest themselves over the algebraic closure $\overline{k(\B)}$ of the field of fractions of $\B$. We therefore also need to consider subsets of $\X(k)$ that are the form $\f(W_{\X'}(\cA,\Gamma))$, where $\X'=\spec(\B')$ with $\B\subseteq\B'\subseteq \overline{k(\B)}$ and $\B'$ is finitely generated over $\B$, $\cA$ is a commutative group scheme of finite type over $\B'$, $\Gamma$ is a finitely generated subgroup of $\cA(\B')$ and $\f\colon \X'(k)\to \X(k)$ is the morphism induced by the inclusion $\B\subseteq \B'$.

We call an inclusion of integral domains $\B\subseteq\B'$ algebraic if the field extension $k(\B')/k(\B)$ is algebraic.

The following lemma is a slight variation of
<cit.>. It shows that for ad-open subsets it is not necessary to consider these more general subsets.

Let $\B\subseteq\B'$ be an inclusion of integral domains such that $\B$ is finitely generated and algebraic over $\B$. Set $\X'=\spec(\B')$ and let $\f\colon  \X'(k)\to\X(k)$ be the map induced by the inclusion $\B\subseteq\B'$. If $\U'$ is an ad-open subset $\X'(k)$, then there exists an ad-open subset $\U$ of $\X(k)$ such that $\U\subseteq \f(\U')$ and $\f^{-1}(\U)\subseteq \U'$.

Let $\U'=W_{\X'}(\Ga, \Gamma')$, where $\Gamma'\leq (\B',+)$ is generated by $w_1,\dots,w_s$. Let $F$ be the Galois closure of $k(\B')/k(\B)$. Let $T, z_1,\dots,z_s$ be indeterminates. Set

P(T,z_1,\dots,z_s)=\prod_{g\in \gal(F/k(\B))}\left(T-\sum_{i=1}^s g(w_i)z_i\right)=\sum_{i=0}^{|\gal(F/k(\B))|}\left(\sum_{j=1}^{\ell_i} a_{i,j} \bfm_{i,j}\right)T^i,$$

where $\bfm_{i,1},\dots,\bfm_{i,\ell_i}$ are all monomials in $z_1,\dots,z_s$ of degree $|\gal(F/k(\B))|-i$.
Since $g(P)=P$ for every $g\in \gal(F/k(\B))$, all $a_{i,j}$ are in $k(\B)$. Write $a_{i,j}=u_{i,j}/v$ where $u_{i,j},v\in \B$ and $v\neq 0$. Let $b$ be a nonzero element of $\B$ such that any $c\in \X(k)$ with $c(b)\neq 0$ can be lifted to a $c'\in \X'(k)$. (Such a $b$ exists by Chevalley's theorem.) Set $\U=W_{\X}(\Ga, \Gamma)$, where $\Gamma$ is the subgroup of $\B$ generated by $b$ and all $u_{i,j}$'s.

Assume that $c\in \U$, $c'\in \X'(k)$ and $\f(c')=c$. We claim that $c'\in \U'$. For a contradiction, suppose $c'\notin \U'$. Then there exists a $\gamma'\in \Gamma'\setminus\{0\}$ such that $c'(\gamma')=0$. Write $\gamma'=\sum_{i=1}^s n_iw_i$ for some $n_1,\dots,n_s\in \bZ$. Since $\gamma'\neq 0$,

v P(0,n_1,\dots,n_s)=v(-1)^{|\gal(F/k(\B))|}\prod_{g\in \gal(F/k(\B))} g(\gamma')\neq 0.

Furthermore, $v P(\gamma',n_1,\dots,n_s)=0$ and

v P(0,n_1,\dots,n_s)=v\sum_{j=1}^{\ell_0} a_{0,j}\bfm_{0,j}(n_1,\dots,n_s)=\sum_{j=1}^{\ell_0} u_{0,j}\bfm_{0,j}(n_1,\dots,n_s)\in \Gamma.

On the other hand, since $c'(\gamma')=0$, one has that

\begin{align*}
0&=c'\left( vP(\gamma',n_1,\dots,n_s)\right)=\sum_{i=0}^{|\gal(F/k(\B))|} c'\left(\sum_{j=1}^{\ell_i} u_{i,j}\bfm_{i,j}(n_1,\dots,n_s)\right) c'(\gamma')^i \\
&=c'\left(\sum_{j=1}^{\ell_0} u_{0,j}\bfm_{0,j}(n_1,\dots,n_s)\right)=c'(vP(0,n_1,\dots,n_s))=c(vP(0,n_1,\dots,n_s)).
\end{align*}

This implies that $c$ is not injective on $\Gamma$, because $0\neq vP(0,n_1,\dots,n_s)\in \Gamma$, a contradiction. Therefore $\f^{-1}(\U)\subseteq  \U'$.

To see that $\U\subseteq \f(\U')$, it suffices to note that every $c\in \U$ lifts to a $c'\in \X'(k)$ because $c(b)\neq 0$ as $b\in\Gamma$.

For group schemes, other than the additive group $\Ga$, we do not have a statement analogous to Lemma <ref> at hand. Therefore, in this case, we need to consider algebraic extensions $\B'\supseteq\B$.

For simplicity, we call a group scheme $\cA$ over some integral domain $\B_0$ of abelian type (or of Jacobian type) if it is commutative, separated and of finite type over $\B_0$ such that the generic fibre $\cA\times_{\spec(\B_0)}\spec(K_0)$ is an abelian variety (or a Jacobien variety) over $K_0$, where $K_0$ is the field of fractions of $\B_0$.

Consider the following three kinds of subsets of $\X(k)$:

* subsets of the form $\f(W_{\X'}(\Ga\times \cJ,\Gamma))$ with $\cJ$ of Jacobien type;

* subsets of the form $\f(W_{\X'}(\Ga,\Gamma_1)\cap W_{\X'}(\cJ,\Gamma_2))$ with $\cJ$ of Jacobien type;

* subsets of the form $W_\X(\Ga,\Gamma_1)\cap \f(W_{\X'}(\cJ,\Gamma_2))$ with $\cJ$ of Jacobien type.

Then a subset of one kind contains a subset of any other kind. Here, in all of the above cases, $\X'=\spec(\B')$, with $\B'$ finitely generated and algebraic over $\B$ and $\f\colon \X'(k)\to \X(k)$ is induced by the inclusion $\B\subseteq\B'$.

As $W_{\X'}(\Ga,\Gamma_1)\cap W_{\X'}(\cJ,\Gamma_2)=W_{\X'}(\Ga\times\cJ,\Gamma_1\times\Gamma_2)$, a set of the second kind is in fact a set of the first kind. Conversely, given $\Gamma\leq \Ga(\B')\times \cJ(\B')$ let $\Gamma_1\leq\Ga(\B')$ denote the image of $\Gamma$ under $\Ga(\B')\times \cJ(\B')\to \Ga(\B')$ and $\Gamma_2\leq\cJ(\B')$ the image of $\Gamma$ under $\Ga(\B')\times \cJ(\B')\to \cJ(\B')$. Then $\Gamma\leq \Gamma_1\times \Gamma_2$ and so

$$W_{\X'}(\Ga,\Gamma_1)\cap W_{\X'}(\cJ,\Gamma_2)=W_{\X'}(\Ga\times\cJ,\Gamma_1\times\Gamma_2)\subseteq W_{\X'}(\Ga\times \cJ,\Gamma). $$

Thus a subset of the first kind contains a subset of the second kind.

If $W_\X(\Ga,\Gamma_1)\cap \f(W_{\X'}(\cJ,\Gamma_2))$ is a subset of the third kind, we may consider $\Gamma_1$ as a subgroup of $(\B',+)$ and then  $W_\X(\Ga,\Gamma_1)\cap \f(W_{\X'}(\cJ,\Gamma_2))= \f(W_{\X'}(\Ga,\Gamma_1)\cap W_{\X'}(\cJ,\Gamma_2))$. Thus a subset of the third kind is in fact a subset of the second kind.

Finally, given a subset $\f(W_{\X'}(\Ga,\Gamma_1)\cap W_{\X'}(\cJ,\Gamma_2))$ of the second kind, there exists, by Lemma <ref>, a finitely generated subgroup $\Gamma_0$ of $(\B,+)$ such that $W_\X(\Ga,\Gamma_0)\subseteq \f(W_{\X'}(\Ga,\Gamma_1))$ and $\f^{-1}(W_\X(\Ga,\Gamma_0))\subseteq (W_{\X'}(\Ga,\Gamma_1)$. We then have
$$W_\X(\Ga,\Gamma_0)\cap \f(W_{\X'}(\cJ,\Gamma_2))\subseteq \f(W_{\X'}(\Ga,\Gamma_1)\cap W_{\X'}(\cJ,\Gamma_2)).$$

So a subset of the second kind contains a subset of the third kind.

We now the define the “open” subset of $\X(k)$ that are the most relevant for us.

A subset $\U$ of $\X(k)$ is ab-open (or Jac-open) if
it is of the form $\U=\f(W_{\X'}(\cA,\Gamma))$, where
$\X'=\spec(\B')$ with $\B'$ containing $\B$ an integral domain finitely generated and algebraic over $\B$, $\cA$ is a group scheme over $\B'$ of abelian (or of Jacobien) type, $\Gamma$ is a finitely generated subgroup of $\cA(\B')$ and $\f\colon \X'(k)\to \X(k)$ is the morphism induced by the inclusion $\B\subseteq \B'$.

A subset of $\X(k)$ is ad$\times$Jac-open if it is the intersection of an ad-open subset with a Jac-open subset of $\X(k)$.

A subset of $\X(k)$ is ad$\times$Jac-closed (or ad-closed) if its complement is ad$\times$Jac-open (or ad-open).

In particular, a Jac-open subset is ab-open. We have used the third kind of subsets from Lemma <ref> to define ad$\times$Jac-open subset. The lemma shows that we could have, more or less equivalently, also used the first or second kind of subsets in the definition.

Let $\B'$ be an integral domain containing $\B$ such that $\B'$ is finitely generated and algebraic over $\B$. Let $\f\colon \X'(k)\to \X(k)$ denote the morphism induced by the inclusion $\B\subseteq \B'$ and let $\U'$ be a subset of $\X'(k)$ that is either ad-open, ab-open, Jac-open or ad$\times$Jac/̄open, then $\f(\U')$ contains a subset $\U$ of $\X(k)$ that is of the same type as $\U'$.

The case of ad-open subsets follows from Lemma <ref>. For the case of ab-open and Jac-open subsets it suffices to note that if $\B\subseteq \B'\subseteq \B''$ such that $\B'$ is finitely generated and algebraic over $\B$ and $\B''$ is finitely generated and algebraic over $\B'$, then $\B''$ is finitely generated and algebraic over $\B$. The case of ad$\times$Jac-open subsets is similar but also uses Lemma <ref>.

As explained in the following remark, Lemma <ref> allows us, in the context of Notation <ref>, to enlarge $\B$ if necessary. This is important from a technical perspective and will be used repeatedly in what follows.

Assume that in the setup of Notation <ref> we would like to show that there exists

* an ad-open,

* a Jac-open or

* an ad$\times$Jac-open

subset $\U$ of $\X(k)$ such that

* the differential $k(x)$-algebra $R^c$ has a certain property for every $c\in \U$ or

* that for given $f_1,\ldots,f_s\in \R$, the elements $f_1^c,\ldots,f_s^c\in R^c$ have a certain property,

then we can, without loss of generality, replace $\B$ with an integral domain $\B'$ such that $\B\subseteq \B'$ and $\B'$ is finitely generated and algebraic over $\B$.

Note that $k(\B)\subseteq k(\B')\subseteq \overline{k(\B)}=K$.

Then $\R'$ is not the zero ring and so $\R'$ is a differential   $\G'=\G_{\B'}$/̄torsor over $\B[x]_f\otimes_\B\B'=\B'[x]_f$ by Lemma <ref>.
We next verify that $\R'/\B'[x]_f$ has all the properties listed in Notation <ref>. The matrix $\Y'=\Y\otimes1\in \Gl_n(\R')$ is such that $\de(\Y')=\cA\Y'$ and $\R'=\B'[x]_f[\Y',\frac{1}{\det(\Y')}]$. Since $\G$ acts on $\Y$ through matrix multiplication, also $\G'$ acts on $\Y'$ through matrix multiplication. Thus $\R'/\B'[x]_f$ is a differential $\G'$-torsor for $\de(y)=\cA y$ with fundamental matrix $\Y'$.
As $\R$ is a flat over $\B[x]_f$, we see that $\R'=\R\otimes_{\B[x]_f}\B'[x]_f$ is flat over $\B'[x]_f$. Moreover,

is $\de$-simple.

Similarly, if $\f\colon\X'(k)\to \X(k)$ is the morphism induced by the inclusion $\B\subseteq \B'$ and $c'\in\X(k)$ is such that $\f(c')=c$, then
$${R'}^{c'}=\R'\otimes_{\B'[x]_f}k(x)= (\R\otimes_{\B[x]_f}\B'[x]_f)\otimes_{\B'[x]_f}k(x)=\R\otimes_{\B[x]_f}k(x)=R^c.$$

Furthermore, for $i=1,\ldots,s$, the image $f_i^{c'}$ of $f_i$ in $R'^{c'}$ agrees with the image $f_i^{c}$ of $f_i$ in $R^c$.

Thus, if there exists a subset $\U'$ of $\X'(k)$ of one of three kinds listed in the remark such that one of the two properties of the remark is true for all $c'\in \U'$, then Lemma <ref> yields a subset $\U$ of $\X(k)$ of the corresponding kind such that $\U\subseteq \f(\U')$ and the corresponding property holds for all $c\in \U$.

§.§.§ Hilbert sets

To show that ad$\times$Jac-open subsets are Zarisiki dense we will use Hilbert sets. We therefore, in this section, recall their definition and discuss the properties that are relevant for our proof.

Throughout Section <ref> let $k_0$ be a field of characteristic zero and let $\B_0$ be a finitely generated $k_0$-algebra that is an integral domain.

We begin by recalling the abstract definition of Hilbert sets from <cit.>. This is closely related to the notion of thin sets (see e.g., <cit.>) but restricted to the affine setting.

For an inclusion $\B\subseteq \B'$ of integral domains, an element $b'\in \B'$ is called algebraic over $\B$ if $b'$ (considered as an element of the field of fractions of $\B'$) is algebraic over the field of fractions of $\B$, i.e., $b'$ satisfies a nonzero (not necessarily monic) univariate polynomial over $\B$. Moreover, $\B'$ is algebraic over $\B$ if every element of $\B'$ is algebraic over $\B$.

Let $\B_0'$ be an integral domain containing $\B_0$ such that $\B_0'$ is algebraic over $\B_0$ and a finitely generated $\B_0$-algebra. The fields of fractions $k_0(\B_0')$ and $k_0(\B_0)$ of $\B'_0$ and $\B_0$ respectively, thus form a finite field extension $k_0(\B_0')/k_0(\B_0)$.

Let $H(\B_0'/\B_0)$ denote the subset of $\spec(\B_0)$ consisting of all $\p\in\spec(\B_0)$ such that there exists a unique $\p'\in\spec(\B_0')$ lying above $\p$ and for this $\p'$ one has $[k_0(\p'):k_0(\p)]=[k_0(\B_0'):k_0(\B_0)]$.
A subset of $\spec(\B_0)$ of the form $H(\B'_0/\B_0)$ is called a basic Hilbert set.

Recall that a basic Zariski open subset of $\spec(\B_0)$ has the form $D(b)=\{\p\in\spec(\B_0)|\ b\notin \B_0\}$ for some nonzero $b\in\B_0$.
A Hilbert subset of $\spec(\B_0)$ is a finite intersection of basic Hilbert sets with a basic Zariski open.

Let $g\in \B_0[y]$ be a univariate polynomial of positive degree such that $(g)\subseteq \B_0[y]$ is a prime ideal. Set $\B_0'=\B_0[y]/(g)$.
Then $H(\B_0'/\B_0)$ consists of all $\p\in\spec(\B_0)$ such that the leading coefficient of $g$ does not lie in $\p$ and the image $\overline{g}$ of $g$ in $k_0(\p)[y]$ is an irreducible polynomial. To see this, note that the set of primes of $\B_0'$ lying above $\p$ can be identified with the spectrum of $\B_0'\otimes_{\B_0}k(\p)=k_0(\p)[y]/(\overline{g})$.

For $k_0$ algebraically closed, the above notion of Hilbert subset is not really useful: If $\p$ is a closed point of $\spec(\B_0)$ (i.e., a maximal ideal) then $k_0(\p)=k_0$ has no finite extensions. Thus, if $\p$ belongs to some basic Hilbert set $H(\B_0'/\B_0)$ we must have $[k_0(\B_0'):k_0(\B_0)]=1$. So $k_0(\B_0')=k_0(\B_0)$ and  $\B_0'$ is contained in a localization of $\B_0$.

The following definition introduces a notion of Hilbert set that is useful when working over an algebraically closed field.

Let $k$ be an algebraically closed field of characteristic zero and let $\B$ be a finitely generated $k$-algebra that is an integral domain. A subset $\H$ of $(k)$, where $=()$, is a \emph{geometric Hilbert set} if there exists a subfield $k_0$ of $k$ finitely generated over $ℚ$, a finitely generated $k_0$-subalgebra $_0$ of $$ such that the canonical map $_0⊗_k_0k→$ is an isomorphism and a Hilbert subset $H$ of $_0=(_0)$ such that $$̋ is the inverse image of $H$ under $\X(k)\to \X\to \X_0$.
In case we need to be more specific, we call such an $\H$ a geometric \emph{$\B_0/k_0$-Hilbert set}.
\end{defi}

We will see below that geometric Hilbert sets are always Zariski dense in $(k)$. The following two lemmas will be needed to establish further good behavior of (geometric) Hilbert sets.

\begin{lemma} \label{lemma: good generic behaviour}
Let $\B_0'$ be an integral domain containing $\B_0$ such that $\B_0'$ is algebraic over $\B_0$ and a finitely generated $\B_0$-algebra. Then there exists a non-zero $b\in\B_0$ such that for every $\p\in D(b)$
\begin{itemize}
\item there exists a $\p'\in\spec(\B_0')$ lying above $\p$;
\item the fibre $\B'_0\otimes_{\B_0}k_0(\p)$ is a $k_0(\p)$-vector space of dimension $[k_0(\B_0'):k_0(\B_0)]$;
\item for every prime $\p'\in\spec(\B_0')$ lying above $\p$ one has $[k_0(\p'):k_0(\p)]\leq [k_0(\B_0'):k_0(\B_0)]$.
\end{itemize}
\end{lemma}
\begin{proof}
As $\B_0'$ is algebraic over $\B_0$, there exists a non-zero $b_1\in \B_0$ such that $(\B'_0)_{b_1}$ is integral over $(\B_0)_{b_1}$. Since $(\B'_0)_{b_1}$ is finitely generated over $(\B_0)_{b_1}$, in fact  $(\B'_0)_{b_1}$ is finite over $(\B_0)_{b_1}$. By generic freeness (see e.g., \cite[\href{https://stacks.math.columbia.edu/tag/051S}{Tag 051S}]{stacks-project}) there exists a non-zero $b_2\in \B_0$ such that $(\B_0')_{b_1b_2}$ is not only finite over $(\B_0)_{b_1b_2}$ but even free. The rank $d$ of $(\B_0')_{b_1b_2}$ as a $(\B_0)_{b_1b_2}$-module is then necessarily equal to $[k_0(\B_0'):k_0(\B_0)]$.

We claim that $b=b_1b_2$ has the required property.
First note that because $(\B_0')_b$ is integral over $(\B_0)_b$, for every $\p\in D(b)$ there exists a $\p'\in\spec(\B_0')$ lying above $\p$.

Regarding the second point, note that for $\p\in D(b)$ the fibre $$\B_0'\otimes_{\B_0}k_0(\p)=(\B_0')_b\otimes_{(\B_0)_b}k_0(\p)$$ is a $k_0(\p)$-vector space of dimension $d$. Thirdly, a prime $\p'\in\spec(\B_0')$ lying above $\p$ corresponds to a prime $\tilde{\p}'$ in $\spec(\B_0'\otimes_{\B_0}k_0(\p))$. The residue field of $\p'$ can be identified with the residue field of $\tilde{\p}'$, which is an extension of degree at most $d$ of $k_0(\p)$.
% \rf{I change $k_0(\p')$ into $\p'$.}
\end{proof}

%We will need the following lemma.

\begin{lemma} \label{lemma: Hilbert set under projection}
Let $\B_0'$ be an integral domain containing $\B_0$ such that $\B_0'$ is algebraic and finitely generated over $\B_0$. Let $\pi\colon \spec(\B_0')\to \spec(\B_0)$ denote the morphism corresponding to the inclusion $\B_0\subseteq \B_0'$ and let $H'\subseteq \spec(\B_0')$ be a Hilbert set. Then there exists a Hilbert set $H$ in $\spec(\B_0)$ satisfying the following two conditions:
\begin{itemize}
\item $H\subseteq \pi(H')$ and
\item for every $\p\in H$ there exists a unique $\p'\in \spec(\B_0')$ lying above $\p$. (Of course then $\p'\in H'$.)
\end{itemize}
\end{lemma}
\begin{proof}
Write $H'=H(\B''_1/\B_0')\cap\ldots\cap H(\B''_m/\B_0')\cap D(b')$.
By Lemma \ref{lemma: good generic behaviour} there exists a non-zero $b'_1\in \B_0'$ such that, for $i=1,\ldots,m$, every prime in $D(b'_1)$ lifts to a prime in $\B_i''$ and for every prime $\p_i''\in\spec(\B_i'')$ lying above $\p'\in D(b')$ one has $[k_0(\p_i''):k_0(\p')]\leq[k_0(\B_i''):k_0(\B_0')]$. By Chevalley's theorem there exists a non-zero $b_1\in \B_0$ such that $D(b_1)\subseteq \pi(D(b'_1b'))$.

By Lemma \ref{lemma: good generic behaviour} again, there exists a non-zero $b_2\in\B_0$ such
that %every prime in $D(b_2)$ lifts to a prime of $\B_0'$ and
for every $\p\in D(b_2)$ the $k_0(\p)$-vector space $\B_0'\otimes_{\B_0}k_0(\p)$ has dimension $[k_0(\B_0'):k_0(\B_0)]$ and for every prime $\p'$ of $\B_0'$ lying above $\p$ one has $[k_0(\p'):k_0(\p)]\leq[k_0(\B_0'):k_0(\B_0)]$.

We claim that $H=H(\B''_1/\B_0)\cap\ldots\cap H(\B''_m/\B_0)\cap D(b_1b_2)$ has the required property.
%	As $\B_i''/\B_0$ is algebraic and finitely generated, there exists by Lemma \ref{lemma: good generic behaviour} a non-zero $b\in\B_0$ such that for every $i=1,\ldots,m$  $(\B_i'')_b$ is integral over $(\B_0)_b$. In fact, we can find a $b\in \B_0$ that works for every $i\in\{1,\ldots,m\}$.
%	Consider the morphism $\spec(\B_i'')\to\spec(\B_0')$. There exists a non-empty Zariski open subset $\U'_i$ of $\spec(\B_0')$ such that the degree of the fibre (i.e., the dimension of $\B_0'\otimes_{\B_0}k_0(\p')$ as a $k_0(\p')$-vector space) is constant on $\U_i'$ ().
%	Set $H=H(\B''_1/\B_0)\cap\ldots\cap H(\B''_m/\B_0)\cap D(b)$ where $b$??
Let $\p\in H$. As $\p\in D(b_1)\subseteq \pi(D(b_1'b')$, there exists a prime $\p'\in D(b_1'b')$ lying above $\p$. Since $\p\in D(b_2)$ we have  $[k_0(\p'):k_0(\p)]\leq[k_0(\B_0'):k_0(\B_0)]$.

Because $\p'\in D(b_1')$ there exists, for every $i=1,\ldots,m$, a prime $\p''_i\in\spec(\B_i'')$ lying above $\p'$ and satisfying $[k_0(\p_i''):k_0(\p')]\leq[k_0(\B_i''):k_0(\B_0')]$. As $\p_i''\in\spec(B_i'')$ is a prime above $\p$ and $\p\in H(\B_i''/\B_0)$ we see that $\p_i''$ is the unique prime of $\B_i''$ above $\p$ and that $[k_0(\p_i''):k_0(\p)]=[k_0(\B_i''):k_0(\B_0)]$. Therefore

\begin{align*}
[k_0(\B_i''):k_0(\B_0)] & =[k_0(\B_i''):k_0(\B'_0)]\cdot [k_0(\B'):k_0(\B_0)]\geq [k_0(\p_i''):k_0(\p')]\cdot [k_0(\p'):k_0(\p)]=\\
& = [k_0(\p_i''):k_0(\p)]=[k_0(\B_i''):k_0(\B_0)]
\end{align*}
and it follows that
\begin{equation} \label{eq: degree equality}
[k_0(\p'):k_0(\p)]=[k_0(\B'):k_0(\B_0)]\quad  \text{ and  } \quad [k_0(\p_i''):k_0(\p')]=[k_0(\B_i''):k_0(\B'_0)].
\end{equation}

We next show that $\p'\in H'$. As $\p'\in D(b')$ we only have to show that $\p'\in H(\B_i''/\B')$ for $i=1,\ldots,m$. If there was a prime of $\B_i''$ other than $\p_i''$ lying above $\p'$, this would also be a prime other than $\p_i''$ lying above $\p$ which is impossible. Thus $\p_i''$ is the unique prime of $\B_i''$ lying above $\p'$. By (\ref{eq: degree equality}) we see that $\p'\in H(\B_i''/\B')$. So $\p'\in H'$ and $\p\in\pi(H')$, i.e., $H\subseteq \pi(H')$.

Regarding the second item, note that by the choice of $b_2$, the fibre $\B_0'\otimes_{\B_0}k_0(\p)$ is a $k_0(\p)$-vector space of dimension $[k_0(\B'):k_0(\B_0)]$. On the other hand, there exists a prime in $\B_0'\otimes_{\B_0}k_0(\p)$ whose residue field is an extension of $k_0(\p)$ of degree $[k_0(\B'):k_0(\B_0)]$. Thus $\B_0'\otimes_{\B_0}k_0(\p)$ is a field and there is only one prime in $\spec(\B_0')$ lying above $\p$.
\end{proof}

%	Let $

We next relate the abstract notion of Hilbert set with the more classical notion concerned with polynomials that remain irreducible under specialization (see \cite[Chapter~12]{FriedJarden:FieldArithmetic}).

Let $f_1,…,f_m∈_0[y]$ be monic univariate polynomials that are irreducible as elements of $k_0(_0)[y]$. For a prime ideal $$ of $_0$ let $f_i$ denote the image of $f_i$ in $k_0()[y]$, i.e., the coefficients of $f_i$ are reduced modulo $$. We set
$$H_{\B_0}(f_1,\ldots,f_m)=\{\p\in\spec(\B_0)|\ \overline{f_1},\ldots,\overline{f_m}\in k_0(\p)[y] \text{ are irreducible }\}. $$

\begin{lemma} \label{lemma: relate Hilbert sets}
Let $\B_0'$ be an integral domain containing $\B_0$, finitely generated and algebraic over $\B_0$. Then there exists a monic polynomial $f\in \B_0[y]$ such that $f$ is irreducible in $k_0(\B_0)[y]$ and a nonzero $b\in\B_0$ such that $$H_{\B_0}(f)\cap D(b)\subseteq H(\B_0'/\B_0).$$
\end{lemma}
\begin{proof}
As $k_0(\B_0')/k_0(\B_0)$ is a finite field extension, there exists, by the primitive element theorem, an $\alpha\in \B_0'$ such that $k_0(\B')=k_0(\B_0)[\alpha]$. Replacing $\alpha$ with a $\B_0$-multiple of $\alpha$ if necessary, we can assume that the minimal polynomial $f$ of $\alpha$ over $k_0(\B_0)$ has coefficients in $\B_0$. Write $\B_0'=\B_0[b_1,\ldots,b_m]$ and $b_i=f_i(\alpha)$  with $f_i\in k_0(\B_0)[y]$  $(1\leq i\leq m)$. Let $b\in \B_0\smallsetminus\{0\}$ be such that $bf_i$ has coefficients in $\B_0$ for $i=1,\ldots,m$. Then $b_i\in (\B_0)_b[\alpha]$ and therefore $(\B_0')_b=(\B_0)_b[\alpha]=(\B_0)_b[y]/(f)$.

Let $\p\in H_{\B_0}(f)\cap D(b)$. Then $\p_b$ is a prime ideal of $(\B_0)_b$ and for the fibre of $\B_0'/\B_0$ over $\p$ we have
As $\p\in H_{\B_0}(f)$, we see that $\B_0'\otimes_{\B_0}k_0(\p)$ is a field extension of $k_0(\p)$ of degree $\deg(f)=[k_0(\B_0'):k_0(\B_0)]$. Thus $\p\in H(\B_0'/\B_0)$ as desired.
\end{proof}
As an immediate corollary to Lemma \ref{lemma: relate Hilbert sets} we obtain:

\begin{cor} \label{cor: relate Hilbert sets}
Let $H$ be a Hilbert subset of $\spec(\B_0)$. Then there exist $f_1\ldots,f_m\in \B_0[y]$ monic and irreducible in $k_0(\B_0)[y]$ and $b\in \B_0\smallsetminus\{0\}$ such that
$$H_{\B_0}(f_1,\ldots,f_m)\cap D(b)\subseteq H.$$ \qed
\end{cor}

A different, less intrinsic, notion of geometric Hilbert set was used in [17]. In order to be able to use the results from [17], we have to relate the two notions. Let us first recall the definition from \cite[Notation 2.6]{Feng:DifferenceGaloisGrousUnderSpecialization}.

Let $k$ be an algebraically closed field of characteristic zero and let $$ be a finitely generated $k$-algebra that is an integral domain. By Noether's normalization lemma, we can find $η_1,…,η_ℓ,…,η_m∈$ such that $=k[η_1,…,η_m]$, $η_1,…,η_ℓ$ are algebraically independent over $k$ and $η_ℓ+1,…,…,η_m$ are integral over $k[η_1,…,η_ℓ]$. We abbreviate $η=(η_1,…,η_m)$ and $η_ℓ=(η_1,…,η_l)$.

Note that for $i=1,…,m-ℓ$, the minimal polynomial of $η_ℓ+i$ over $k(η_l)$ has coefficients in $k[η_ℓ]$ since $k[η_ℓ]$ is integrally closed (\cite[Prop. 5.15]{AtiyahMacdonald:Introductiontocommutativealgebra}). We can thus find a subfield $k_0$ of $k$ finitely generated over $ℚ$ such that, for $i=1,…,m-ℓ$, the minimal polynomial of $η_ℓ+i$ over $k(η_l)$ has coefficients in $k_0[η_ℓ]$.

Let $f$ be a finite tuple of monic elements of $k_0[η][y]$ that are irreducible in $k_0(η)[y]$. Furthermore, let $g∈k_0[η]∖{0}$ and let $d=(d_1,…,d_ℓ)∈ℤ^ℓ$ be an $ℓ$-tuple of positive integers. Set $=()$. Identifying $(k)$ with $_k(,k)$ we define
as the set of all $c∈(k)$ such that
\begin{itemize}
\item $[k_0(c(\eta_1),\ldots, c(\eta_i)): k_0(c(\eta_1),\ldots,c(\eta_{i-1}))]\geq d_i$ for $i=1,\ldots,\ell$;
\item for every entry $f$ of $\boldsymbol{f}$ the polynomial $f^c$ obtained from $f$ by applying $c$ to the coefficients is irreducible in $k_0(c(\boldsymbol{\eta}))[y]$;
\item $c(g)\neq 0$.
\end{itemize}

The following lemma shows that every geometric Hilbert set contains a set of the form $_̋k_0,(k)^η(d,f,g)$.

\begin{lemma} \label{lemma: containmemt for Hilber sets}
Let $k$ be an algebraically closed field of characteristic zero and $\B$ a finitely generated $k$-algebra that is an integral domain. Let $k_0\subseteq k$ be a finitely generated field extension of $\mathbb{Q}$ and $\B_0\subseteq \B$ a finitely generated $k_0$-algebra such that $\B_0\otimes_{k_0}k\to \B$ is an isomorphism. Furthermore, let $H$ be a Hilbert subset of $\X_0=\spec(\B_0)$ and let $\H\subseteq \X(k)$ be the corresponding geometric Hilbert set, where $\X=\spec(\B)$.

Then there exists $\boldsymbol{\eta}\in \B_0^m$ with $\B_0=k_0[\boldsymbol{\eta}]$ and appropriate $\boldsymbol{f}$, $g$ such that
$$\H_{k_0,\X(k)}^{\boldsymbol{\eta}}((1,\ldots,1),\boldsymbol{f},g)\subseteq \H.$$
\end{lemma}
\begin{proof}
Applying Noether's normalization lemma to $\B_0$, we find $\boldsymbol{\eta}=(\eta_1,\ldots,\eta_\ell,\ldots,\eta_m)\in \B_0^m$ with $\B_0=k_0[\boldsymbol{\eta}]$ such that $\eta_1,\ldots,\eta_\ell$ are algebraically independent over $k_0$ and $\eta_{\ell+1},\ldots,\eta_m$ are integral over $k_0[\eta_1,\ldots,\eta_\ell]$. Note that $\eta_1,\ldots,\eta_\ell$ are also algebraically independent over $k$ and $\eta_{\ell+1},\ldots,\eta_m$ are integral over $k[\eta_1,\ldots,\eta_\ell]$. Moreover, for $i=1,\ldots,m-\ell$, the minimal polynomial of $\eta_{\ell+i}$ over $k(\eta_1,\ldots,\eta_\ell)$ has coefficients in $k_0[\eta_1,\ldots,\eta_\ell]$.

By Corollary \ref{cor: relate Hilbert sets}, there exist monic polynomials $f_1,\ldots,f_r\in \B_0[y]$ irreducible in $k_0(\B_0)[y]$ and a $g\in\B_0\smallsetminus\{0\}$ such that
$H_{\B_0}(f_1,\ldots,f_r)\cap D(g)\subseteq H$. With $\boldsymbol{f}=(f_1,\ldots,f_r)$ we thus have $\H_{k_0,\X(k)}^{\boldsymbol{\eta}}((1,\ldots,1),\boldsymbol{f},g)\subseteq \H.$
\end{proof}

The following proposition, going back to [23], explains why the sets of the form   $_̋k_0,(k)^η(d,f,g)$ are useful for us. We assume that $k_0, η$ and $$ are as described after Corollary~\ref{cor: relate Hilbert sets}.

\begin{prop} \label{prop: Hilbert set in ad-open}
Let $\Gamma$ be a finitely generated subgroup of $(k_0[\boldsymbol{\eta}],+)$. Then there exists a $\bf{d}$ such that $\H_{k_0,\X(k)}^{\boldsymbol{\eta}}(\boldsymbol{d},\emptyset,1)\subseteq W_\X(\Ga,\Gamma)$.
\end{prop}
%\rf{It seems that $W_\X(\Ga,\Gamma)$ is defined in the next subsection.}
\begin{proof}
This is really just a restatement of \cite[Prop. 2.10]{Feng:DifferenceGaloisGrousUnderSpecialization}.
\end{proof}

\subsubsection{N\'{e}ron's specialization theorem} \label{subsubsection Nerons specialization theorem}

N\'{e}ron's specialization theorem is a crucial ingredient in our proof that ad$×$Jac-open sets are Zariski dense (Theorem \ref{theo: ad meets ab is dense}). Roughly speaking, N\'{e}ron's specialization theorem states that in an algebraic family of abelian varieties, the specialization map defined by a point of the parameter space is injective for all points in a Hilbert subset of the parameter space. This theorem can be used to construct abelian varieties with groups of rational points of large rank. Several versions of N\'{e}ron's specialization theorem are available in the literature. The original reference is [31]. Other presentations are in \cite[Section~11.1]{Serre:LecturesOnTheMordellWeilTheorem}, \cite[Chapter 9, Section 6]{Lang:FundamentalsofDiophantineGeometry} and \cite[Section~3]{Petersen:OnAQuestionOfFreyAndJardenAboutTheRankOfAbelianVarieties}. Unfortunately, none of these versions seems to directly yield the result we need. We therefore include a self contained proof of our variant of N\'{e}ron's specialization theorem, mostly following [38] in the argument (cf. \cite[Section 2]{Feng:DifferenceGaloisGrousUnderSpecialization}).

\medskip

Throughout Section \ref{subsubsection Nerons specialization theorem} we make the following assumptions:

\begin{itemize}
\item $k_0$ is a field of characteristic zero;
\item $\X_0=\spec(\B_0)$ is an affine variety over $k_0$ (i.e., a geometrically integral affine scheme of finite type over $k_0$);
\item $K_0=k_0(\B_0)$ is the function field of $\X_0$, i.e., the field of fractions of $\B_0$;

\item $\cA_0$ is a commutative separated group scheme of finite type over $\B_0$ such that $\cA_0\times_{\X_0}\spec(K_0)$ is connected.
\end{itemize}

%Let $\B_1\subseteq \overline{K_0}$ be a finitely generated $\B_0$-algebra, e.g., $\B_1=\B_0$. Then for every $x_1\in \X_1=\spec(\B_1)$ we have a specialization morphism
%$$\sigma_{x_1}\colon \cA_0(\B_1)\to \cA_0(k_0(x_1)),$$
%obtained by applying $\cA$, considered as a functor on the category of $\B_0$-algebras, to the morphism $\B_1\to k_0(x_1)$. %composing an element of $\cA_0(\B_1)=\Hom_{\X_0}(\X_1,\cA_0)$ with $\spec(k_0(x_1))\to \X_1$.
We also make the following assumption on $_0$.
%Let $k_0$ be a finitely generated field extension of $\mathbb{Q}$
%\mw{Is this even needed for the proof of Neron's specialization theorem?}
% and let $\X_0$ be an affine variety over $k_0$ (i.e., a geometrically integral affine scheme of finite type over $k_0$). Let $\cA\to \X_0$ be a commutative group scheme over $\X_0$.
%We further assume that $\cA$ is a commutative group scheme over $\X_0$ satisfying that

\begin{enumerate}
%	\item [(A1)]
%	For $m\geq 1$, $\B_1\subseteq \overline{K_0}$ a finitely generated $\B_0$-algebra
%	%\mw{Enough to assume that exists $m$??}
%	and $a\in \cA_0(\B_1)$, the set $\{b\in \cA_0(\overline{K_0})\mid b^m=a\}$ is finite and nonempty and there exist a nonempty open subset $\U_1$ of $\X_1=\spec(\B_1)$ such that
%	$$
%	|\{ u\in \cA_0(\overline{k_0(x_1)})\mid u^m=\sigma_{x_1}(a)\}|=|\{b\in \cA_0(\overline{K_0})\mid b^m=a\}|
%	$$
%	for every $x_1\in \U_1$.
\item [(A1)] For every finitely generated subgroup $\Gamma$ of $\cA_0(K_0)$, the group
\{a\in \cA_0(K_0) \mid a^\ell\in \Gamma \mbox{ for some $\ell\geq 1$} \}
is also finitely generated.
\end{enumerate}
%In the following, $\B$ always stands for the ring of global sections of $\X_0$, i.e. $\X_0=\spec(\B)$, and $K$
%\mw{Not good to use $K$ here?? Switch to $K_0$??}
%Let $\SSS$ be a scheme over $\X_0$ and $K_1$ a finite extension of $K$. Suppose that $b: \spec(K_1)\rightarrow \SSS$ is a morphism over $\X_0$. Then the residue field $K(b(\xi))$ of $\SSS$ at $b(\xi)$ is an extension of $K$ and $b$ induces a $K$-homomorphism $b^*: K(b(\xi))\rightarrow K_1$, where $\xi$ is the unique point of $\spec(K_1)$.
%	\label{LM:residucefields}
%	Let $\SSS$ be a scheme of finite type over $\X_0$ and let $K_1$ be a finite field extension of $K_0$. Assume that $s\in\SSS(K_1)$
%	%$b\in \Hom_{\X_0}(\spec(K_1),\SSS)$
%	is such that the induced morphism $k_0(s(\xi))\to K_1$ is an isomorphism, where $\xi$ is the unique point of $\spec(K_1)$. Let $\B_1\subseteq K_1$ be a finitely generated $\B_0$-algebra with $K_1$ as field of fractions such that $s\in\SSS(\B_1)$.
%	%b\in \Hom_{\X_0}(\spec(\B_1),\SSS)$.
%	Then there exists a nonempty open subset $U_1$ of $\X_1=\spec(\B_1)$ such that the morphism $k_0(s(x_1))\to k_0(x_1)$ induced from $s\colon \X_1\to \SSS$ is an isomorphism for every $x_1\in U$.
%	% the residue field of $\SSS$ at $b(x_1)$ is $k_0(x_0)$-isomorphic to $k_0(x_1)$, where $x_0=x_1\cap \B$.
%	Let $Z$ be an affine open subset of $\SSS$ containing $b(\xi)$. Embedding $Z$ into some affine space over $\B$, we may assume that $Z$ is a closed subscheme of $\mathbb{A}^n_{\B}$ for some $n>0$, i.e. $Z=\spec(R)$ with $R=\B[\alpha_1,\dots,\alpha_n]$. Let $U_1=b^{-1}(Z)$. Replacing $U_1$ by a nonmepty open subset of $U_1$ if necessary, we may assume that $U_1=\spec(\tilde{\B}_1)$ where $\tilde{\B}_1$ is the localization of $\B_1$ with respect to some nonzero $\beta\in \B_1$. Note that $\spec(\tilde{\B}_1)$ and $\spec(\B_1)$ have the same residue field at $x\in \spec(\tilde{\B}_1)$. The restriction of $b$ on $U_1$ corresponds to a $\B$-homomophism $\varphi: R\rightarrow \tilde{\B}_1$. Let $a_i$ be the image of $\alpha_i$ in $K(b(\xi))$, the residue field of $\SSS$ at $b(\xi)$. We then have that $K(b(\xi))=K(a_1,\dots,a_n)$ and $K_1=K(\varphi(a_1),\dots,\varphi(a_n))$. As $\xi$ is the generic point of $\spec(\tilde{\B}_1)$, one sees that $\varphi(a_i)=\varphi(\alpha_i)$ for all $i$. Write
%	\begin{align*}
%	\tilde{\B}_1&=\B[P_1(\varphi(\alpha_1),\dots,\varphi(\alpha_n)),\dots,P_s(\varphi(\alpha_1),\dots,\varphi(\alpha_n))]\\
%	&=\B[\varphi(P_1(\alpha_1,\dots,\alpha_n)),\dots,\varphi(P_s(\alpha_1,\dots,\alpha_n))]
%	\end{align*}
%	where $P_i\in \B_f [X_1,\dots,X_n]$ for some nonzero $f\in \B$. Set $U=U_1\cap D(f)$. Suppose $x_1\in U$ and $x_0=x_1\cap \B$. The residue field $k_0(x_1)$ of $\spec(\tilde{\B}_1)$ at $x_1$ is $k_0(x_0)(c_1,\dots,c_s)$ where $c_i=\overline{\varphi(P_i(\alpha_1,\dots,\alpha_n))}$ is the image of $\varphi(P_i(\alpha_1,\dots,\alpha_n))$ in $k_0(x_1)$. Let $\bar{a}_i$ be the image of $\alpha_i$ in $k_0(b(x_1))$. Then $k_0(b(x_1))=k_0(x_0)(\bar{a}_1,\dots,\bar{a}_n)$. As $\varphi$ is a local homomorphism,
%	$$
%	c_i=\overline{\varphi(P_i(\alpha_1,\dots,\alpha_n))}=\varphi(\overline{P_i(\alpha_1,\dots,\alpha_n)})=\varphi(\bar{P}_i(\bar{a}_1,\dots,\bar{a}_n)).
%	$$
%	where $\overline{P_i(\alpha_1,\dots,\alpha_n)}$ is the image of $P_i(\alpha_1,\dots,\alpha_n)$ in $k_0(b(x_1))$ and $\bar{P}_i$ is the image of $P_i$ in $k_0(x_0)[X_1,\dots,X_n]$. Therefore
%	$$
%	k_0(x_1)=k_0(x_0)(c_1,\dots,c_n)\subseteq \varphi(k_0(x_0)(\bar{a}_1,\dots,\bar{a}_n))=\varphi(k_0(b(x_1))).
%	$$
%	On the other hand, $\varphi$ induces a $k_0(x_0)$-homomorphism from $k_0(b(x_1))$ to $k_0(x_1)$. Hence $k_0(b(x_1))$ is actually $k_0(x_0)$-isomorphic to $k_0(x_1)$.
We will need a few lemmas of a preparatory nature.

\begin{lemma} \label{lemma: multiplication by m}
Let $G$ be a connected commutative algebraic group over a field $k$ of characteristic zero and let $m\geq 1$ be an integer. Then the morphism $[m]\colon G\to G,\ g\mapsto g^m$ has finite kernel and $[m]\colon G(\overline{k})\to G(\overline{k})$ is surjective.
\end{lemma}
\begin{proof}
Note that $[m]$ is a morphism of algebraic groups because $G$ is commutative. The induced morphism
$\operatorname{Lie}([m])\colon \operatorname{Lie}(G)\to \operatorname{Lie}(G)$ on the Lie algebra of $G$ is multiplication by $m$. As we are in characteristic zero, this implies that $\operatorname{Lie}([m])$ is an isomorphism. In particular, $\operatorname{Lie}(\ker([m]))=\ker(\operatorname{Lie}([m]))=0$. Thus $\ker([m])$ is finite.
Then, for dimension reasons, the image of $[m]\colon G(\overline{k})\to G(\overline{k})$ must have the same dimension as $G$. As the image is closed and $G$ is connected, it follows that $[m]\colon G(\overline{k})\to G(\overline{k})$ is surjective.
\end{proof}

Let $_1⊆K_0$ be a finitely generated $_0$-algebra, e.g., $_1=_0$. Then for every $x_1∈_1=(_1)$ we have a specialization morphism
$$\sigma_{x_1}\colon \cA_0(\B_1)\to \cA_0(k_0(x_1)),$$
obtained by applying $$, considered as a functor on the category of $_0$-algebras, to the morphism $_1→k_0(x_1)$.

\begin{lemma} \label{lemma: assumption A1}
Let $\B_1\subseteq \overline{K_0}$ be a finitely generated $\B_0$-algebra,
%\mw{Enough to assume that exists $m$??}
$a\in \cA_0(\B_1)$ and $m\geq 1$.  Then the set $\{b\in \cA_0(\overline{K_0})\mid b^m=a\}$ is finite and nonempty and there exist a nonempty open subset $\U_1$ of $\X_1=\spec(\B_1)$ such that
|\{ b\in \cA_0(\overline{k_0(x_1)})\mid b^m=\sigma_{x_1}(a)\}|=|\{b\in \cA_0(\overline{K_0})\mid b^m=a\}|
for every $x_1\in \U_1$.
\end{lemma}
\begin{proof}
The set $\{b\in \cA_0(\overline{K_0})\mid b^m=a\}$ is finite and nonempty by Lemma \ref{lemma: multiplication by m}. Set $\cA_1=\cA_{0,\B_1}$ and consider the morphism $[m]\colon \cA_1\to \cA_1, \ g\mapsto g^m$ and its kernel $\ker([m])\leq \cA_1$. Then $\ker([m])_x$ is the kernel of the $m$-th power map on $\cA_{1,x_1}$ for every $x_1\in \X_1$.

It follows from Lemma \ref{lemma: multiplication by m} that $\ker([m])_\xi$ is finite, where $\xi$ is the generic point of $\X_1$. Being finite spreads out from the generic fibre and also the number of geometric points is constant over a nonempty open subset (\cite[Cor. 9.7.9]{Grothendieck:EGAIV3}). Thus, there exists a nonempty open subset $\U_1$ of $\X_1$ such that $$|\{b\in \cA_{1,x_1}(\overline{k_0(x_1)})|\ b^m=1\}|=|\{b\in \cA_{1,\xi}(\overline{K_0})|\ b^m=1\}|$$
for all $x_1\in \U_1$. Shrinking $\U_1$ if necessary, we can also assume that $\cA_{1,x_1}$ is connected for all $x_1\in\U_1$. (Recall that an algebraic group is connected if and only if it is geometrically connected). Using Lemma \ref{lemma: multiplication by m} we then find
\begin{align*}
|\{ b\in \cA_0(\overline{k_0(x_1)})\mid\ & b^m=\sigma_{x_1}(a)\}|=|\{ b\in \cA_{1,x_1}(\overline{k_0(x_1)})\mid b^m=\sigma_{x_1}(a)\}|= \\
& =|\{b\in \cA_{1,x_1}(\overline{k_0(x_1)})|\ b^m=1\}|=|\{b\in \cA_{1,\xi}(\overline{K_0})|\ b^m=1\}|= \\
&=|\{b\in \cA_0(\overline{K_0})\mid b^m=a\}|
\end{align*}
for all $x_1\in\U_1$.
\end{proof}

\begin{lemma}
\label{LM:residucefields}
Let $\SSS$ be a scheme of finite type over $\B_0$ and let $\B_1\subseteq\overline{K_0}$ be a finitely generated $\B_0$-algebra. Let $s\in\SSS(\B_1)$ be such that $k_0(s(\xi))\to k_0(\xi)=k_0(\B_1)$ is an isomorphism, where $\xi$ is the generic point of $\X_1=\spec(\B_1)$ and we think of $s$ as a morphism $s\colon \X_1\to \SSS$. Then there exists a nonempty open subset $\U_1$ of $\X_1$ such that the morphism $k_0(s(x_1))\to k_0(x_1)$ induced by $s$ is an isomorphism for every $x_1\in \U_1$.
% the residue field of $\SSS$ at $b(x_1)$ is $k_0(x_0)$-isomorphic to $k_0(x_1)$, where $x_0=x_1\cap \B$.
\end{lemma}
\begin{proof}
Let $\U$ be an affine open subset of $\SSS$ containing $s(\xi)$ and let $D(b_1)$ be a basic open subset of $\X_1$ contained in $s^{-1}(\U)$. Then the restriction $\tilde{s}\colon D(b_1)\to \U$ of $s\colon \X_1\to \SSS$ satisfies the assumption of the lemma, i.e., the induced map $k_0(\tilde{s}(\xi))\to k_0(\xi)$ is an isomorphism. We can thus assume without loss of generality that $\SSS$ is affine.

So we can identify $\SSS$ with the spectrum of a finitely generated $\B_0$-algebra $\R_1$. The point $s\in\SSS(\B_1)$ corresponds to a morphism $\psi\colon\R_1\to \B_1$ of $\B_0$-algebras. The assumption that $k_0(s(\xi))\to k_0(\xi)$ is an isomorphism means that the field of fractions of $\psi(\R_1)$ (formed inside $k_0(\B_1)$) equals all of $k_0(\B_1)$.

Fix $f_1,\ldots,f_m\in\B_1$ such that $\B_1=\B_0[f_1,\ldots,f_m]$. For $i=1,\ldots,m$ we can then write $f_i=\frac{\psi(r_i)}{\psi(r_i')}$ with $r_1,\ldots,r_m,r'_1,\ldots,r'_m\in \R_1$ and $\psi(r_1),\ldots,\psi(r_m')\in \R_1$ nonzero. We claim that $\U_1=D(\psi(r'_1)\ldots\psi(r'_m))\subseteq \X_1$ has the desired property.

Let $x_1\in \U_1$ correspond to the prime ideal $\p_1$ of $\B_1$. For $f\in \B_1$ let $\overline{f}\in \B_1/\p_1\subseteq k_0(\B_1/\p_1)=k_0(x_1)$ denote the image of $f$ in $\B_1/\p_1$. As $\psi(r_i')f_i=\psi(r_i)$ in $\R_1$, we have $\overline{\psi(r_i')}\overline{f_i}=\overline{\psi(r_i)}$ for $i=1,\ldots,m$. As $x_1\in \U_1$, we can divide by $\overline{\psi(r_i')}$ in $k_0(x_1)$ to obtain $\overline{f_i}=\frac{\overline{\psi(r_i)}}{\overline{\psi(r_i')}}$ in $k_0(x_1)$.
Note that the morphism $k_0(s(x_1))\to k_0(x_1)$ is obtained from the injection $\R_1/\psi^{-1}(\p_1)\to \B_1/\p_1$ by passing to the field of fractions. In particular, $k_0(s(x_1))\to k_0(x_1)$ is an isomorphism if and only if the field of fractions of $\overline{\psi(\R_1)}\subseteq \B_1/\p_1\subseteq k_0(\B_1/\p_1)$ equals all of $k_0(\B_1/\p_1)$. As $k_0(\B_1/\p_1)=k_0(\B_0)(\overline{f_1},\ldots,\overline{f_m})$ the latter follows from $\overline{f_i}=\frac{\overline{\psi(r_i)}}{\overline{\psi(r_i')}}$.
%	Thus
%	$$k_0(x_1)=k_0(\B_0)(\overline{f_1},\ldots,\overline{f_m})\subseteq \psi(R)$$
%	 Embedding $Z$ into some affine space over $\B$, we may assume that $Z$ is a closed subscheme of $\mathbb{A}^n_{\B}$ for some $n>0$, i.e. $Z=\spec(R)$ with $R=\B[\alpha_1,\dots,\alpha_n]$. Let $U_1=b^{-1}(Z)$. Replacing $U_1$ by a nonmepty open subset of $U_1$ if necessary, we may assume that $U_1=\spec(\tilde{\B}_1)$ where $\tilde{\B}_1$ is the localization of $\B_1$ with respect to some nonzero $\beta\in \B_1$. Note that $\spec(\tilde{\B}_1)$ and $\spec(\B_1)$ have the same residue field at $x\in \spec(\tilde{\B}_1)$. The restriction of $b$ on $U_1$ corresponds to a $\B$-homomophism $\varphi: R\rightarrow \tilde{\B}_1$. Let $a_i$ be the image of $\alpha_i$ in $K(b(\xi))$, the residue field of $\SSS$ at $b(\xi)$. We then have that $K(b(\xi))=K(a_1,\dots,a_n)$ and $K_1=K(\varphi(a_1),\dots,\varphi(a_n))$. As $\xi$ is the generic point of $\spec(\tilde{\B}_1)$, one sees that $\varphi(a_i)=\varphi(\alpha_i)$ for all $i$. Write
%	\begin{align*}
%	\tilde{\B}_1&=\B[P_1(\varphi(\alpha_1),\dots,\varphi(\alpha_n)),\dots,P_s(\varphi(\alpha_1),\dots,\varphi(\alpha_n))]\\
%	&=\B[\varphi(P_1(\alpha_1,\dots,\alpha_n)),\dots,\varphi(P_s(\alpha_1,\dots,\alpha_n))]
%	\end{align*}
%	where $P_i\in \B_f [X_1,\dots,X_n]$ for some nonzero $f\in \B$. Set $U=U_1\cap D(f)$. Suppose $x_1\in U$ and $x_0=x_1\cap \B$. The residue field $k_0(x_1)$ of $\spec(\tilde{\B}_1)$ at $x_1$ is $k_0(x_0)(c_1,\dots,c_s)$ where $c_i=\overline{\varphi(P_i(\alpha_1,\dots,\alpha_n))}$ is the image of $\varphi(P_i(\alpha_1,\dots,\alpha_n))$ in $k_0(x_1)$. Let $\bar{a}_i$ be the image of $\alpha_i$ in $k_0(b(x_1))$. Then $k_0(b(x_1))=k_0(x_0)(\bar{a}_1,\dots,\bar{a}_n)$. As $\varphi$ is a local homomorphism,
%	$$
%	c_i=\overline{\varphi(P_i(\alpha_1,\dots,\alpha_n))}=\varphi(\overline{P_i(\alpha_1,\dots,\alpha_n)})=\varphi(\bar{P}_i(\bar{a}_1,\dots,\bar{a}_n)).
%	$$
%	where $\overline{P_i(\alpha_1,\dots,\alpha_n)}$ is the image of $P_i(\alpha_1,\dots,\alpha_n)$ in $k_0(b(x_1))$ and $\bar{P}_i$ is the image of $P_i$ in $k_0(x_0)[X_1,\dots,X_n]$. Therefore
%	$$
%	k_0(x_1)=k_0(x_0)(c_1,\dots,c_n)\subseteq \varphi(k_0(x_0)(\bar{a}_1,\dots,\bar{a}_n))=\varphi(k_0(b(x_1))).
%	$$
%	On the other hand, $\varphi$ induces a $k_0(x_0)$-homomorphism from $k_0(b(x_1))$ to $k_0(x_1)$. Hence $k_0(b(x_1))$ is actually $k_0(x_0)$-isomorphic to $k_0(x_1)$.
\end{proof}

\begin{lemma}
\label{LM:distinctpointsunderspecialiation}
Let $\B_1\subseteq \overline{K_0}$ be a finitely generated $\B_0$-algebra and let $S$ be a finite subset of $\cA_0(\B_1)$. Then there exists a nonempty open subset $\U_1$ of $\X_1=\spec(\B_1)$ such that $\sigma_{x_1}$ is injective on $S$ for every $x_1\in \U_1$.
\end{lemma}
\begin{proof}
It suffices to treat the case when $S$ consists of two distinct elements $s,s'$.
As $\cA_0\to \X_0$ is separated, the equalizer $\Y_1\to \X_1$ of $s, s'\colon \X_1\to \cA_0$ (in the category of schemes over $\X_0$) is a closed subscheme of $\X_1$ (\cite[\href{https://stacks.math.columbia.edu/tag/01KM}{Tag 01KM}]{stacks-project}). In particular, for a morphism $\f\colon \Y_1'\to \X_1$ of $\X_0$-schemes one has $s\f=s'\f$ if and only if $\f$ factors through the closed immersion $\Y_1\hookrightarrow \X_1$.

We will show that $\Y_1$ defines a proper closed subset of $\X_1$. Suppose for a contradiction that the underlying set of $\Y_1$ is all of $\X_1$. Since $\X_1$ is reduced, the only closed subscheme supported on all of $\X_1$ is $\X_1$ itself. So $\Y_1=\X_1$ (as schemes). But then $s=s'$; a contradiction.

Thus $\Y_1$ defines a proper closed subset of $\X_1$ and its complement $\U_1\subseteq \X_1$ is a nonempty open subset. For $x_1\in \U_1$, the morphism $\f_{x_1}\colon \spec(k_0(x_1))\to \X_1$ does not factor through $\Y_1\to \X_1$ and so $s\f_{x_1}\neq s'\f_{x_1}$, i.e., $\s_{x_1}(s)\neq \s_{x_1}(s')$.
%	?? It suffices to show that if $1\neq b\in \Hom_{\X_0}(\spec(\B_1),\cA)$ there is a nonempty open subset $U$ of $\spec(\B_1)$ such that for each $x_1\in U$, $\sigma_{x_1}(b)\neq 1$. Since $b\neq 1$, there is $a\in \Hom_{\X_0}(\spec(\B_1),\cA)$ such that $ab\neq a$. Let $U$ be a nonempty open subset of $\spec(\B_1)$ such that $ab(x_1)\neq a(x_1)$ for all $x_1\in U$. On the other hand, for each $x_1\in U$, one has that
%	$$
%	\sigma_{x_1}(ab)(\xi)=ab(x_1)\neq a(x_1)=\sigma_{x_1}(a)(\xi)
%	$$
%	where $\xi$ is the unique point of $\spec(k_0(x_1))$. This implies
%	$\sigma_{x_1}(ab)=\sigma_{x_1}(a)\sigma_{x_1}(b)\neq \sigma_{x_1}(a)$. Therefore $\sigma_{x_1}(b)\neq 1$.
\end{proof}

The following lemma explains how Hilbert subsets enter into N\'{e}ron's specialization theorem.

\begin{lemma}
\label{LM:solutionsunderspecialization}
Let $m\geq 1$, $\tilde{\B}\subseteq K_0$ a finitely generated $\B_0$-algebra and $a\in \cA_0(\tilde{\B})$ such that $\{b\in \cA_0(K_0)\mid b^m=a\}\subseteq \cA_0(\tilde{\B})$. Then there exists a Hilbert subset $\tilde{H}$ of $\tilde{\X}=\spec(\tilde{\B})$ such that
\begin{equation} \label{eq: torsion identity}
\{u\in \cA_0(k_0(\tilde{x})) \mid u^m=\sigma_{\tilde{x}}(a)\}=\sigma_{\tilde{x}}(\{b\in \cA_0(K_0)\mid b^m=a\}).
\end{equation}
for all $\tilde{x}\in\tilde{H}$.
\end{lemma}
\begin{proof}
Note that the inclusion ``$\supseteq$'' in (\ref{eq: torsion identity}) is trivial.
Set $S=\{b\in \cA_0(\overline{K_0})\mid b^m=a\}$.  Let $\B_1\subseteq \overline{K_0}$ be a finitely generated $\tilde{\B}$-algebra such that $S\subseteq \cA_0(\B_1)$. By Lemma~\ref{LM:distinctpointsunderspecialiation} there exists a nonempty open subset $\U_1$ of $\X_1=\spec(\B_1)$ such that $\sigma_{x_1}$ is injective on $S$ for all $x_1\in \U_1$. By Lemma \ref{lemma: assumption A1}, there exists a nonempty open subset $\mathcal{V}_1$ of $\X_1$ such that
\begin{equation} \label{eq: cardinal equality}
|\{ u\in \cA_0(\overline{k_0(x_1)})\mid u^m=\sigma_{x_1}(a)\}|=|S|
\end{equation}
for all $x_1\in \mathcal{V}_1$.
Let $\f\colon \X_1\to \tilde{\X}$ be the morphism corresponding to the inclusion $\tilde{\B}\subseteq \B_1$. Since $\B_1$ is algebraic over $\tilde{\B}$, there exists a nonempty Zariksi open subset $\mathcal{W}_1$ of $\X_1$ such that $k_0(x_1)$ is algebraic over $k_0(\f(x_1))$ for all $x_1\in \mathcal{W}_1$. (This follows, for example, from Lemma \ref{lemma: good generic behaviour}.) By Chevalley's theorem, there exists a nonempty basic open subset $\tilde{\U}$ of $\tilde{\X}$ contained in $\f(\U_1\cap \mathcal{V}_1\cap \mathcal{W}_1)$.

Let $\tilde{x}\in \tilde{\U}$. Then there exists an $x_1\in \U_1\cap \mathcal{V}_1\cap \mathcal{W}_1$ with $\f(x_1)=\tilde{x}$. We claim that
\begin{equation} \label{eq: surjective on algebraic closure}
\{u\in \cA_0(\overline{k_0(\tilde{x})}) \mid u^m=\sigma_{\tilde{x}}(a)\}=\sigma_{x_1}(S).
\end{equation}
%	First assume that $S\subseteq \cA_0(K_0)$. We claim that in this case $\tilde{H}=\tilde{U}$ does the job. Let $\tilde{x}\in \tilde{H}$. Then there exists an $x_1\in U_1\cap V_1$ that lifts $\tilde{x}$.
As $\s_{x_1}$ is injective on $S$, we find
|S|=|\sigma_{x_1}(S)|\leq |\{u\in \cA_0(k_0(x_1)) \mid u^m=\sigma_{x_1}(a)\}| \leq |\{u\in \cA_0(\overline{k_0(x_1)}) \mid u^m=\sigma_{x_1}(a)\}|.
From (\ref{eq: cardinal equality}), we thus deduce that $\sigma_{x_1}(S)=\{u\in \cA_0(\overline{k_0(x_1)}) \mid u^m=\sigma_{x_1}(a)\}$. This implies (\ref{eq: surjective on algebraic closure}) because $\overline{k_0(x_1)}=\overline{k_0(\tilde{x})}$ since $k_0(x_1)$ is algebraic over $k_0(\tilde{x})=k_0(\f(x_1))$.
%	As $x_1\in V_1$ we have $|S|=|\{u\in \cA_0(\overline{k_0(x_1)}) \mid u^m=\sigma_{x_1}(a)\}|$.
%	So the sets $\sigma_{x_1}(S)$ and $\{u\in \cA_0(k_0(x_1)) \mid u^m=\sigma_{x_1}(a)\}$ have the same cardinality. As the former is contained in the latter, these two sets must indeed be equal as desired.

\medskip

We first assume that $S\subseteq \cA_0(K_0)$. Then $S=\{b\in\cA_0(K_0)|\ b^m=a\}\subseteq\cA_0(\tilde{\B})$ by assumption.
The commutativity of
\xymatrix{
\cA_0(\tilde{\B}) \ar@{^{(}->}[r] \ar_-{\s_{\tilde{x}}}[d] & \cA_0(\B_1) \ar^-{\s_{x_1}}[d] \\
\cA_0(k_0(\tilde{x})) \ar@{^{(}->}[r] & \cA_0(k_0(x_1))
paired with (\ref{eq: surjective on algebraic closure}) then yields $\s_{\tilde{x}}(S)=\{u\in \cA_0(\overline{k_0(\tilde{x})}) \mid u^m=\sigma_{\tilde{x}}(a)\}$. In particular, $\{u\in \cA_0(k_0(\tilde{x})) \mid u^m=\sigma_{\tilde{x}}(a)\}\subseteq\s_{\tilde{x}}(S)$ as desired. So, in case $S\subseteq \cA_0(K_0)$, we can choose as $\tilde{H}=\tilde{\U}$.

\medskip

Now assume that $S\setminus \cA_0(K_0)\neq \emptyset$ and let $b\in S\setminus \cA_0(K_0)$.
%	Let $b\in \cA(\overline{K})$. Then $b$ induces a $K$-morphism $k_0(b(\xi))\to\overline{K}$, where $\xi$ is the unique point of $\spec(\overline{K})$. Considering $k_0(b(\xi))$ as a subfield of $\overline{K}$ via this morphism, we have
%	$b\in \cA(K)$ if and only if $k_0(b(\xi))=K$.
%	For $x\in \spec(\tilde{\B})$ with $\tilde{\B}$ a finitely generated $\B$-algebra such that $b\in \cA(\tilde{\B})$ and $x_0=x\cap \B$, similar statement holds for $\sigma_{x}(b)$, i.e. $\sigma_{x}(b)\in \cA(k_0(x_0))$ if and only if $k_0(b(x))=k_0(x_0)$.
%	\medskip
Then $k_0(b(\xi))\hookrightarrow \overline{K_0}$ is a finite extension of $K_0$ with $[k_0(b(\xi)):K_0]>1$, where we think of $b$ as a morphism $b\colon \spec(\overline{K_0})\to \cA_0$ and $\xi$ is the unique point of $\spec(\overline{K_0})$. Let $\B_b\subseteq k_0(b(\xi))$ be a finitely generated $\tilde{\B}$\=/algebra with $k_0(b(\xi))$ as field of fractions and such that $b\in \cA_0(\B_b)$. Furthermore, we may assume $\B_b\subseteq \B_1$.

Then Lemma~\ref{LM:residucefields}, applied with $\SSS=\cA_0$, $\B_1=\B_b$ and $s=b\in\cA_0(\B_b)$, yields a nonempty open subset $\mathcal{V}_b$ of $\spec(\B_b)$ such that
$k_0(b(x'))\to k_0(x')$ is an isomorphism for every $x'\in \mathcal{V}_b$.
By Chevalley's theorem, there exists a nonempty basic open subset $\mathcal{U}_b$ of $\tilde{\X}=\spec(\tilde{\B})$ such that $\U_b$ lies in the image of $\spec(\B_b)\to \spec(\tilde\B)$.

% \subseteq \phi_b(\mathcal{V}_b)$ where $\phi_b: \spec(\B_b)\rightarrow \spec(\tilde{\B})$ is the morphism corresponding to the inclusion $\tilde{\B}\subseteq \B_b$.

Set $\tilde{H}_b=\U_b\cap H(\B_b/\tilde{\B})$ and let $\tilde{x}\in \tilde{H}_b$. Then $[k_0(x_b):k_0(\tilde{x})]=[k_0(b(\xi)):K_0]>1$, where $x_b$ is the unique element of $\spec(\B_b)$ lying above $\tilde{x}$. As $x_b\in\mathcal{V}_b$, the field extensions $k_0(b(x_b))$ and $k_0(x_b)$ of $k_0(\tilde{x})$ are isomorphic. Therefore, $k_0(b(x_b))$ is a non-trivial field extension of $k_0(\tilde{x})$.
%	In particular, $k_0(b(x_b))\neq k_0(\tilde{x})$. In other words, for $\tilde{x}\in \tilde{H}_b$ we have $\sigma_{x_b}(b)\notin \cA_0(k_0(\tilde{x}))$.

We will show that $\tilde{H}=\tilde{\U}\cap (\cap_{b\in S\setminus \cA_0(K_0)} \tilde{H}_b)$ has the desired property. Let $\tilde{x}\in\tilde{H}$.
%	As $\tilde{x}\in\tilde{U}$, there exists an $x_1\in U_1\cap V_1$ mapping to $\tilde{x}$ under $\spec(\B_1)\to \spec(\tilde{\B})$. As $x_1\in U_1$, the specialization map $\sigma_{x_1}$ is injective on $S$. Since $x_1\in V_2$, we know that $|\{u\in \cA_0(\overline{k_0(\tilde{x})}) \mid u^m=\sigma_{\tilde{x}}(a)\}$
%	$$
%	\{u\in \cA_0(\overline{k_0(\tilde{x})}) \mid u^m=\sigma_{\tilde{x}}(a)\}=\sigma_{x_1}(S).
%	$$
Then there exist an $x_1\in \U_1\cap\mathcal{V}_1\cap\mathcal{W}_1\subseteq \X_1$ with $\f(x_1)=\tilde{x}$.
Given (\ref{eq: surjective on algebraic closure}), to verify (\ref{eq: torsion identity}), it suffices to show that $\sigma_{x_1}(b)\notin \cA_0(k_0(\tilde{x}))$ for every $b\in S\smallsetminus\cA_0(K_0)$.
Note that $\sigma_{x_1}(b)\notin \cA_0(k_0(\tilde{x}))$ if and only if $k_0(b(x_1))$ is a non-trivial extension of $k_0(\tilde{x})$.

For $b\in S\setminus \cA_0(K_0)$, since $x_b$ is the unique element of $\spec(\B_b)$ lying above $\tilde{x}$ and $\B_b\subseteq \B_1$, we see that $x_b$ is the image of $x_1$ under $\spec(\B_1)\to \spec(\B_b)$. So $b(x_1)=b(x_b)$ and $k_0(b(x_1))=k_0(b(x_b))$ is a non-trivial extension of $k_0(\tilde{x})$ as desired.
%Thus $\sigma_{x_1}(b)=\sigma_{x_b}(b)\notin \cA_0(k_0(\tilde{x}))$.
%	% On the other hand, for $b\in S\cap \cA_0(K_0)$, it is clear that $\sigma_x(b)=\sigma_{\tilde{x}}(b)\in \cA(k_0(\tilde{x}))$. Therefore,
%	%$$
%	\{\sigma_{\tilde{x}}(b) \mid b\in S\cap \cA_0(K_0)\}=\{u\in \cA_0(k_0(\tilde{x})) \mid u^m=\sigma_{\tilde{x}}(a)\}.
%	$$
%	for every $\tilde{x}\in\tilde{H}$.
\end{proof}
We are now prepared to prove our variant of N\'{e}ron's specialization theorem.

\begin{theo}
\label{thm:specializationtheorem}
Let $\Gamma$ be a finitely generated subgroup of $\cA_0(\B_0)$. Then there exists a Hilbert subset $H_0$ of $\X_0$ such that $\sigma_{x_0}\colon \cA_0(\B_0)\to \cA_0(k_0(x_0))$ is injective on $\Gamma$ for every $x_0\in H_0$.
\end{theo}
\begin{proof}
Set $\tilde{\Gamma}=\{a\in \cA_0(K_0) \mid a^\ell\in \Gamma \mbox{ for some $\ell\geq 1$} \}$. Then $\tilde{\Gamma}$ is a subgroup of $\cA_0(K_0)$ and by assumption (A1) it is finitely generated. Let $\tilde{\B}\subseteq K_0$ be a finitely generated $\B_0$-algebra such that $\tilde{\Gamma}\subseteq \cA_0(\tilde{\B})$. We shall show that there exists a Hilbert subset $\tilde{H}$ of $\tilde{\X}=\spec(\tilde{\B})$ such that the specialization map $\sigma_{\tilde{x}}\colon \cA_0(\tilde{\B})\to\cA(k_0(\tilde{x}))$ is injective on $\tilde{\Gamma}$ for every $\tilde{x}\in \tilde{H}$. Note that this implies the theorem since, by Lemma \ref{lemma: Hilbert set under projection}, there exists a Hilbert subset $H_0$ of $\X_0$ contained in the image of $\tilde{H}$ under $\tilde{\X}\to\X_0$ and if $\tilde{x}\in\tilde{H}$ maps to $x_0\in H_0$, then the diagram
\xymatrix{
\cA_0(\B) \ar@{^{(}->}[r] \ar_-{\s_{x_0}}[d] & \cA_0(\tilde{\B}) \ar^-{\s_{\tilde{x}}}[d] \\
\cA_0(k_0(x_0)) \ar@{^{(}->}[r] & \cA_0(k_0(\tilde{x}))

Let $m>1$ be an integer such that the order of the torsion subgroup of $\tilde{\Gamma}$ divides $m$.
Let $\{a_1,\ldots,a_\ell\}$ be a set of representatives of $\tilde{\Gamma}/\tilde{\Gamma}^m$. Without loss of generality we may assume that $a_1=1$. For $i=1,\dots,\ell$ set $\Delta_i=\{ a\in \tilde{\Gamma}\mid a^m=a_i\}$. Note that $\Delta_i=\{ a\in \cA_0(K_0)\mid a^m=a_i\}$ by construction of $\tilde{\Gamma}$.
%	from the choice of $\tilde{\Gamma}$, for each $i=1,\dots,\ell$,
%	$$
%	\{ b\in \cA(K)\mid b^m=a_i\}=\{ b\in \tilde{\Gamma}\mid b^m=a_i\}.
%	$$
%	Denote the above set by

Lemma~\ref{LM:solutionsunderspecialization} applied with $a=a_i$, yields a Hilbert subset $\tilde{H}_i$ of $\tilde{\X}$ such that
\{u\in \cA_0(k_0(\tilde{x})) \mid u^m=\sigma_{\tilde{x}}(a_i)\}=	\sigma_{\tilde{x}}(\Delta_i)%\{u\in \sigma_{x_0}(\tilde{\Gamma}) \mid u^m=\sigma_{x_0}(a_i)\}.
for every $\tilde{x}\in \tilde{H}_i$.
Set $\tilde{H}=\cap_{i=1}^\ell \tilde{H}_i$ and let $\tilde{x}\in \tilde{H}$.
We will show that $\sigma_{\tilde{x}}$ is injective on $\tilde{\Gamma}$.
%	 Suppose $x_0\in \tilde{H}$. Then $\sigma_{x_0}(\Delta_i)\neq \emptyset$ if and only if $i=1$.
%We will show that $\sigma_{x_0}$ is injective on $\tilde{\Gamma}$.
It suffices to show that $I=\sigma^{-1}_{\tilde{x}}(1)\cap \tilde{\Gamma}$ is trivial. Note that $I$ is a finitely generated group because it is a subgroup of the finitely generated group $\tilde{\Gamma}$.

We claim that $I=I^m$. Let $u\in I$ and write $u=a_i w^m$ for some $i$ and $w\in \tilde{\Gamma}$. Then $1=\sigma_{\tilde{x}}(u)=\sigma_{\tilde{x}}(a_i)\sigma_{\tilde{x}}(w)^m$ and so $\sigma_{\tilde{x}}(w^{-1})^m=\sigma_{\tilde{x}}(a_i)$. Because $\tilde{x}\in\tilde{H}_i$, we have $\s_{\tilde{x}}(w^{-1})=\sigma_{\tilde{x}}(a)$ for some $a\in\Delta_i$, i.e., $a^m=a_i$. This implies that $a_i=1$, i.e., $i=1$.

%The choice of $x_0$ implies that $a_i=1$, i.e. $i=1$.
Hence $\sigma_{\tilde{x}}(w^{-1})=\sigma_{\tilde{x}}(a)$ for some $a\in\tilde{\Gamma}$ with $a^m=1$. So $\s_{\tilde{x}}(aw)=1$ and $aw\in I$. Moreover, $$u=a_iw^m=w^m=a^mw^m=(aw)^m\in I^m.$$
Thus $I=I^m$ as claimed.
% so there is $\bar{w}\in \Delta_1$ such that $\sigma_{x_0}(w)=\sigma_{x_0}(\bar{w})$, i.e. $w\bar{w}^{-1}\in I$.
%	   Since $\bar{w}\in \Delta_1$, $\bar{w}^m=1$ and thus $u=a_i w^m=w^m=(w\bar{w}^{-1})^m\in I^m$. In other words, $u\in I$. It is clear that $I^m\subset I$. So $I=I^m$. This proves our claim.
As the order of the torsion subgroup of $\tilde{\Gamma}$ divides $m$, the group $\tilde{\Gamma}^m$ is torsion free. Therefore, also $I=I^m\subseteq\tilde{\Gamma}^m$ is torsion free.
But a finitely generated torsion-free group is a free $\mathbb{Z}$-module and so can satisfy $I^m=I$ only if $I=1$ is trivial. Thus $I=1$ and $\sigma_{\tilde{x}}$ is injective on $\tilde{\Gamma}$ for every $\tilde{x}\in\tilde{\Gamma}$ as desired.
%	    As $m$ is divided by the order of the torsion group of $\tilde{\Gamma}$ and also by the order of the torsion group of $I$, $I^m$ is torsion free and therefore $I=I^m$ is free.
%	     This happens only if $I=\{1\}$. Consequently, for each $x_0\in \tilde{H}$, $\sigma_{x_0}^{-1}(1)\cap \tilde{\Gamma}=I=\{1\}$, i.e. $\sigma_{x_0}$ is injective on $\tilde{\Gamma}$.
\end{proof}

The following corollary contains the special case of Theorem \ref{thm:specializationtheorem} relevant for our purpose.

%?? Recall definition of abelian scheme??
%Recall that a group scheme $\cA_0\to \X_0$ is an abelian scheme if it is proper, smooth and has connected geometric fibres. For an abelian scheme $\cA_0$ over $\X_0$, the function $s\to \dim (\cA_0)_s$ is locally constant, i.e. there is a nonempty open subset $\U$ of $\X_0$ such that $s\to \dim (\cA_0)_s$ is a constant on $\U$, where $(\cA_0)_s$ denotes the fibre of $\cA_0$ over $s$. In particular, for any $x_0\in \U$, $\dim (\cA_0)_{x_0}=\dim (\cA_0)_{\eta}$, where $\eta$ is the generic point of $\X_0$.

%??Fix usage of $H_0$ or $H$??
\begin{cor} \label{cor: Nerons specialization theorem}
Let $k_0$ be a finitely generated field extension of $\mathbb{Q}$, $\X_0=\spec(\B_0)$ an affine variety over $k_0$ and $\cA_0$ a group scheme over $\B_0$ of abelian type. Then there exists a Hilbert subset $H_0$ of $\X_0$ such that the specialization morphism $\s_{x_0}\colon \cA_0(\B_0)\to \cA_0(k_0(x_0))$ is injective for every $x_0\in H_0$.
\end{cor}
\begin{proof}