# Application of Borel cantelli lemma to a sequence of processes

Let $$g^k$$ be a sequence of processes satisfying $$P\left(\int_0^T |g^k-g^{k+1}|^2\,ds>2^{-k}\right) \leq 2^{-k}$$

Then the book I am reading states that as a application of the Borel-Cantelli lemma we get that

$$\sum_{k=1} ^ \infty \left(\int_0^T |g^k-g^{k+1}|^2\,ds\right)^{1/2}< \infty \quad \text{a.s.} \quad P.$$

Can anyone please explain how Borel-Cantelli Lemma is being used to arrive at this .

By the Borel-Cantelli Lemma, you can get that $$\mathbb{P}(\limsup_{k\to\infty} \{ \int_0^T |g^k - g^{k+1}|^2 ds\}>\frac{1}{2^k}\})=0$$ This means that $$\mathbb{P}$$-a.s. there exists $$N\in \mathbb{N}$$ such that for all $$k\geq N$$: $$\int_0^T |g^k - g^{k+1}|^2 ds\leq \frac{1}{2^k}$$, therefore $$(\int_0^T |g^k - g^{k+1}|^2 ds)^{1/2}\leq (\frac{1}{\sqrt{2}})^k$$ it implies that $$\sum_{k\in\mathbb{N}}(\int_0^T |g^k - g^{k+1}|^2 ds)^{1/2}<\infty$$.