exponential/logarithm for unipotent algebraic groups Let $k$ be a field (of possibly positive characteristic), let $U_n$ denote the space of all $n \times n$ unipotent upper triangular matrices over $k$, and let $G$ be an algebraic subgroup of $U_n$ (hence a unipotent algebraic group itself).  Then each $X \in \text{Lie}(G)$ (thought of as a member of $\text{Lie}(U_n)$, i.e. a strictly upper triangular $n \times n$ matrix) is nilpotent, so it makes sense to define
$\text{exp}(X) = 1 + X + X^2/2! + \dots + X^{n-1}/(n-1)!$
(This definition makes sense even in characteristic $p > 0$ so long as $p \geq n$, i.e. so that $p$ never divides $1!, 2!, \dots, (n-1)!$).  We can also define, for $g \in G$,
since $g-1$ is nilpotent,
$\log(g) =  (g-1) - (g-1)^2/2 + (g-1)^3/3 - \dots \pm (g-1)^{n-1}/(n-1) $
Obviously $\text{exp}$ and $\log$ define maps from $\text{Lie}(U_n)$ to $U_n$ and back to $\text{Lie}(U_n)$, and are bijective, being inverses of one another.
My Question: If $g \in G$, is $\log(g) \in \text{Lie}(G)$?  Or, equivalently, for $X \in \text{Lie}(G)$, is $\text{exp}(X) \in G$?
I feel like there should be an obvious proof of this, but I don't see it.  If $G$ were a Lie group, the Lie algebra of $G$ would often just be defined to
be all $X$ such that $e^{tX} \in G$ for all $t \in \mathbb{R}$, and so for Lie groups $\text{exp}$ maps from $\text{Lie}(G)$ to $G$ simply by definition.  In the algebraic group context this definition no longer makes sense generally, and even when it does, is not used in the literature (so far as I've seen),
so I tried using each of the following equivalent definitions of $\text{Lie}(G)$, with no success:


*

*$\text{Lie}(G) = \text{Dist}_1^+(G)$ (distributions of order no greater than $1$ without constant term)

*$\text{Lie}(G) = $ the subspace of $\text{Lie}(U_n) = \text{Dist}_1^+(U_n)$ which kills $I = (\text{defining polynomials of $G$})$

*$\text{Lie}(G) = \{M \in \text{Lie}(U_n): 1 + \tau M \in G(k[\tau]) \}$ where $\tau^2 = 0$

*$\text{Lie}(G) = \{M \in \text{Lie}(U_n) : 1 + \tau M \text{ satisfies the defining polynomials of } G  \}$, again where $\tau^2 = 0$

*$\text{Lie}(G) = $ left invariant derivations on the Hopf algebra of $G$
It is certainly believable on it's face; we have that $\text{Lie}(G) \stackrel{\text{exp}}{\longrightarrow} U_n \stackrel{\log}{\longrightarrow} \text{Lie}(G)$
composes to the identity, similarly for $G \stackrel{\log}{\longrightarrow} \text{Lie}(U_n) \stackrel{\text{exp}}{\longrightarrow} G$, but I don't see why in the
meantime that $\log(G) \subset \text{Lie}(G)$ or that $\text{exp}(\text{Lie}(G)) \subset G$.
If it makes a difference, I'm actually only interested in the case where the defining polynomials of $G$ have integer (perhaps mod $p$) coefficients.
Thanks in advance for any help.
EDIT: Here's a more basic question, one which might help answer the above.
Suppose $k = \mathbb{R}$.  Then $G$ is also a Lie group, and it is customary to define
$\text{Lie}(G) = \{ X \in \text{Lie}(U_n): e^{tX} \in G \text{ for all } t \in \mathbb{R} \}$
Can someone explain, or point me to a reference explaining, why this definition is equivalent to any of the above definitions for $\text{Lie}(G)$ as an algebraic group?
 A: EDIT: I roll back to the previous proof, in characteristic 0 only. My last proof including characteristic $p$ was false (thanks to Will Sawin for noticing this).
Let $G={\rm GL}_{n,k}$\,, where $k$ is a field of characteristic 0. 
Consider the formal power series
$$\exp(x)=1 + x+\frac{1}{2!}x^2+\dots$$
over ${\mathbb{Q}}$ and the polynomial
$$\exp_{<n}(x)=1+x+\dots+\frac{1}{(n-1)!}x^{n-1},$$
which is defined also in characteristic $p\ge n$.

Theorem 1. Let $k$ be a field of characteristic 0.
   Let $H\subset G={\rm GL}_{n,k}$ be an algebraic subgroup defined over $k$.
  Let $X\in{\rm Lie}(H)\subset{\mathfrak{gl}}_{n,k} = M_n(k)$ be a nilpotent matrix. Then
  $\exp_{<n}(X)\in H(k)$.

Note that since $X\in M_n(k)$ is nilpotent, we have $X^n=0$.
The version of Theorem 1 in positive characteristic is false, see the answer of Will Sawin.
Set $V=k^n$. Write 
$$T^{ij}(V)=V\otimes\dots\otimes V\otimes V^*\otimes\dots\otimes V^*$$ ($i$ times $V$, $j$ times $V^*$), where $V^*$ is the dual space to $V$, and set
$$W=W^{\le N}=\bigoplus_{0\le i,j\le N} T^{ij}(V).$$
Let $\theta=\theta^{\le N}$ denote the natural representation of $G={\rm GL}(V)$ in $W$, and let $d\theta$ denote the corresponding
representation of ${\rm Lie}(G)={\mathfrak{gl}}(V)$ in $W$.
Since $X$ is nilpotent and $\theta\colon {\rm GL}(V)\to {\rm GL}(W)$ is a homomorphism of linear algebraic groups,
the linear operator $(d\theta)(X)\in{\rm End}(W)$ is nilpotent; see  Springer, Linear Algebraic Groups (2nd ed.), Theorem 4.4.20.
Note that in general it is not true that $((d\theta)(X))^n=0$, but one can show that $((d\theta)(X))^{2nN}=0$.

Theorem 2. Assume that ${\rm char}(k)=0$.
  Then for any nilpotent matrix $X\in {\rm End}(V)={\mathfrak{gl}}(V)$
  we have
$$\exp((d\theta)(X))=\theta(\exp(X)).$$ 

Note that $\theta(\exp(X))$ and $\exp((d\theta)(X))$ are defined
because both $X\in {\rm End}(V)$ and $(d\theta)(X)\in{\rm End}(W)$
are nilpotent operators and because ${\rm char}(k)=0$.
We deduce Theorem 1 from Theorem 2. There exists a natural number $N=N_H$ and a tensor $t=t_H\in W=W^{\le N}$
such that $H$ is the stabilizer in $G$ of the line $k\cdot t\subset W$ with respect to $\theta$
and such that ${\rm Lie}(H)$ is the stabilizer in ${\rm Lie} (G)$ of  this line with respect to $d\theta$;
see Springer's book, Lemmas 5.5.1 and 5.5.2.
Since $X\in {\rm Lie}(H)$, we have $(d\theta)(X)\cdot t=\lambda t$ for some $\lambda\in k$,
and we have $\lambda=0$ since $(d\theta)(X)$ is nilpotent.
Now it follows from Theorem 2 that 
$$\theta(\exp(X))\cdot t=\exp((d\theta)(X))\cdot t=t,$$
and therefore, $\exp(X)\in H(k)$, which proves Theorem 1.
Proof of Theorem 2.  Let $A$ be a Lie group over $k=\mathbb{R}$ or $k={\mathbb{C}}$.
As usual, for $X\in{\rm Lie}(A)$ we define the exponential map  $Z(s)=\exp(sX)\in A$
as the solution of the differential equation
$\frac{d}{ds} Z(s)=X\cdot Z(s)$ with initial condition $Z(0)=1_A$.
Then for $A={\rm GL}(V)$ the exponential map is defined by the convergent series above.
If $\phi\colon A\to B$ is a homomorphism of Lie groups,
then the following diagram commutes:
$$
\require{AMScd}
\begin{CD}
{\rm Lie}(A) @>{d\phi}>> {\rm Lie}(B);\\
@V{\exp_A}VV @VV{\exp_B}V \\
A @>{\phi}>> B;
\end{CD}
$$
Indeed, both composite maps are solutions of the same differential equation with the same initial condition.
Note that the algebraic groups ${\rm GL}(V)$ and ${\rm GL}(W^{\le N})$
and the homomorphism $\theta=\theta^{\le N}$ are all defined  over ${\mathbb{Q}}$.
We use the idea of the Lefschetz principle.
We consider the finitely generated field $l={\mathbb{Q}}(x_{ij})$,
where $x_{ij}\in k$ for  $1\le i,j\le n$ are the matrix elements of $X$.
We embed $l$ into ${\mathbb{C}}$.
We obtain that
$$\exp((d\theta)(X))=\theta(\exp(X))$$
over ${\mathbb{C}}$. Since $X$ and $(d\theta)(X)$ are nilpotent, the expressions in the formula above
are actually polynomials of $(d\theta)(X)$ and $X$, respectively. This completes the proof of Theorem 2.
A: This is false in characteristic $p$, no matter how large $p$ is. The counterexample is the group parameterized by
$\begin{pmatrix} 1 & t & t^p \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}$
Its Lie algebra is generated by the matrix
$\begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}$
whose exponential does not lie in the group.
A: In characteristic $p>0$ you can expect a property of this kind in nice situations with certain precautions.
First precaution is that a Lie subalgebra ${\mathfrak g} \leq Lie (GL_n)$ may be tangent to several distinct connected algebraic subgroups. This is brilliantly explored by Will Sawin in his answer.
In practice, your ${\mathfrak g}$ and $G$ are often God given, i.e., they are stabilizers of a $k$-tensor $t$ on $V$. Then you will have your desired exponential and logarithm as soon as you have a second precaution: you need to require $X^{p/k}=0$ or $(1-g)^{p/k}=0$.
A: It seems to me that a reasonable way to prove this result in characteristic 0 is to use the standard Lie group/Lie algebra argument, but to use the algebraic exponential function as defined in Demazure-Gabriel Groupes algebriques to supplement the explicit version used in the question.
