Let $G_i$ be an inverse system of affine Algebraic groups (ie. Group objects in category of affine varieties).
Is the inverse limit an affine algebraic group scheme? More precisely, does the inverse limit have a scheme structure?
Let me explain the context. Let $\pi_1(X,x)$ be the fundamental group of a compact Kahler manifold. Let us consider the inverse system of representations of $\pi_1(X)$ ie. morphisms to affine algebraic groups $G_i$. The inverse limit is called the pro-algebraic completion of the fundamental group and is denoted as $w_1(X,x)$.
My question is : Is $w_1(X,x)$ a scheme?
As direct limits exist in the category of rings (Atiyah-Macdonald Exercise 2.21), if we consider $G_i=\operatorname{Spec}(A_i)$ and $A=\displaystyle\lim_{\longrightarrow} A_i$, then $\operatorname{Spec}(A)$ is the inverse limit of $G_i$ in the category of affine schemes.
It is not hard to prove that $\operatorname{Spec}(A)$ is actually the inverse limit in the category of arbitrary schemes. For this, consider an affine cover $X=\bigcup U_j$ with $U_j=\operatorname{Spec}B_j$. Then we have \begin{align*}\operatorname{Hom}_{\mathscr{sch}}(X,\operatorname{\mathop{Spec}A})&=\bigcup_j \operatorname{Hom}_{\mathscr{sch}}(U_j,\operatorname{\mathop{Spec}A}) \\&=\bigcup_j\lim_{\substack{\longrightarrow \\ i}}\operatorname{Hom}_{\mathscr{cring}}(A_i,B_j) \\&=\bigcup_j\lim_{\substack{\longleftarrow \\ i}}\operatorname{Hom}_{\mathscr{sch}}(U_j,G_i) \\&=\lim_{\substack{\longleftarrow \\ i}}\bigcup_j\operatorname{Hom}_{\mathscr{sch}}(U_j,G_i)\\&=\operatorname{Hom}_{\mathscr{sch}}(X,G_i) \end{align*} where in the middle we used that colimits commute with each other. If we work in the category of $k$-schemes (or even $S$-schemes for an arbitrary scheme $S$ if you work with $\underline{\operatorname{Spec}}_S$) everything works essentially the same and the inverse limit is also a $k$-scheme.
Now, if each transition map $\phi_{ij}:G_i\rightarrow G_j$ is a group morphism, and $m_i:G_i\times G_i\rightarrow G_i$ denotes the multiplication, as $m_j\circ (\phi_{ij}\times \phi_{ij})=\phi_{ij}\circ m_i$ by the universal property, we can lift the multiplication to $m:G\times G\rightarrow G$. Similarly, we can lift the neutral element and the inverse map. As $\displaystyle\lim_{\longleftarrow}$ is a functor (from the category $\mathscr{schemes}^{\text{indexes}}$ to $\mathscr{schemes}$) all the diagrams are preserved, so $G$ is also an affine group.