4. As shown in Figure 1, given that $E$ is a point on side $BC$ of rectangle $ABCD$, and folding along $AE$ makes vertex $B$ coincide with point $F$ on side $CD$. If $AD=16, BE=10$, then the length of $AE$ is $\qquad$
4. $10 \sqrt{5}$.

From the problem, we have
$$
E F=B E=10, E C=A D-B E=6 \text {. }
$$

By the Pythagorean theorem, $C F=\sqrt{E F^{2}-E C^{2}}=8$.
Clearly, Rt $\triangle A F D \backsim \mathrm{Rt} \triangle F E C$.
Thus, $\frac{D F}{D A}=\frac{E C}{C F}=\frac{3}{4}$. Therefore, $D F=12$.
At this point, $A B=C D=C F+D F=20$.
Again, by the Pythagorean theorem,
$$
A E=\sqrt{A B_{-}^{2}+B E^{2}}=10 \sqrt{5} .
$$