Formalization of a Stochastic Approximation Theorem