Does this version of Grönwall's lemma hold? Here is the lemma with more general hypothesis :

Let $f,g,y\in L_{\text{loc}}^1(\mathbb{R})$ non-negatives such that for all $t \in \mathbb{R}$, $\displaystyle y(t) \le f(t) + \left \vert \int_{t_0}^t y(s)g(s)\mathrm{d}s \right\vert$. Then for all $t \in \mathbb{R}$, $\displaystyle y(t)\le f(t) + \left \vert\int_{t_0}^t f(u)g(u)\exp\left(\int_{u}^t g(\tau)\mathrm{d}\tau\right)\mathrm{d}u \right \vert$.

In my opinion, the assumptions on $f,g$ and $y$ are sufficient to make that statement valid.
Moreover would the proof be similar to the classical Grönwall's lemma ? I mean that for the classical version, we can consider $t_0<t$ and study the function $\displaystyle t \mapsto f(t) +  \int_{t_0}^t y(s)g(s)\mathrm{d}s$ which is $\mathcal{C}^1$ in that case.
Thanks in advance !
 A: I will give a proof for $t>t_{0}$. Define $y(t)g(t)=h(t)$ and without loss of generality we assume that $g(t)>0$ for all $t$. (Otherwise we can define $\tilde{g}(t)=g(t)+\epsilon$ and get the result by letting $\epsilon$ tend to zero).
For all $t \in \mathbb{R}$, $\displaystyle \frac{h(t)}{g(t)}\le f(t)+\int_{t_{0}}^{t} h(s)\mathrm{d}s$. Then $\displaystyle h(t)\leq f(t)g(t)+g(t)\int_{t_{0}}^{t}h(s)\mathrm{d}s$.
Set $\displaystyle z(t) = \int_{t_{0}}^{t} h(s)\mathrm{d}s$. As $z$ is in particular absolutely continuous then for almost every $t \in \mathbb{R}$, $z'(t)-z(t)g(t)\leq f(t)g(t)$.
Multiplying by the integrating factor $\displaystyle\exp\left(-\int_{s}^{t}g(r)\mathrm{d}r\right)$ we get $\displaystyle (\exp\left(-\int_{s}^{t}g(r)\mathrm{d}r\right)z(t))'\leq f(t)g(t) \exp\left(-\int_{s}^{t}g(r)\right)\mathrm{d}r$.
Taking $t=v$ it gives : $\displaystyle(\exp\left(-\int_{s}^{v}g(r)\mathrm{d}r\right)z(v))'\leq f(v)g(v) \exp\left(-\int_{s}^{v}g(r)\mathrm{d}r\right)$.
Integrating from $t_{0}$ to $t$ we get :
$\displaystyle \exp\left(-\int_{s}^{t}g(r)\mathrm{d}r\right)z(t) \leq \int_{t_{0}}^{t}f(v)g(v)\exp\left(-\int_{s}^{v}g(r)\mathrm{d}r\right)\mathrm{d}v$.
Multiplying with the exponential we obtain for almost every $t \in \mathbb{R}$ :
$\displaystyle z(t)\leq \int_{t_{0}}^{t}f(v)g(v)\exp\left(\int_{s}^{t}g(r)\mathrm{d}r-\int_{s}^{v}g(r)\mathrm{d}r\right) \mathrm{d}v=\int_{t_{0}}^{t}f(v)g(v)\exp\left(\int_{v}^{t}g(r)dr\right)dv$.
However for all $t\in \mathbb{R}$, $z(t)\geq\,y(t)-f(t)$ hence the result is proved !
The case where $t<t_{0}$ is treated likewise !
