## 2 Materials and Methods
### Riemann Approximation EM
#### 2.2.2. Theorem and Proof  
We state and prove the following Theorem for the convergence of the EM with a Riemann approximation.  
**Theorem 2**.: _Assume that the hidden variable \(z\) is continuous and bounded. Consider the approximation_  
\[\tilde{p}_{n,\theta}(z):=\frac{h(\lfloor nz\rfloor/n;\theta)}{\int_{z^{\prime}}h (\lfloor nz^{\prime}\rfloor/n;\theta)dz^{\prime}}\,.\]  
_We call \"Riemann approximation EM\" the associated Stable Approximate EM. Under conditions \(M1-3\) of Theorem 1, if \(z\mapsto S(z)\) is continuous, then the conclusions of Theorem 1 hold for the Riemann approximation EM._  
Proof.: Under the current assumptions, it is sufficient to verify condition (4) in order to apply Theorem 1. Without loss of generality, we will assume that the bounded variable \(z\) is contained in \([0,1]\). Since \(S\) is continuous, the first part of the condition is easily verified: \(\int_{z=0}^{1}S_{u}^{2}(z)dz<\infty\).  
For the second part of the condition, we consider a compact \(K\subseteq\Theta\). First, note that \(h(z;\theta)=\exp(\psi(\theta)+\langle S(z),\phi(\theta)\rangle)\) is continuous in \((z,\theta)\), hence uniformly continuous on the compact set \([0,1]\times K\). Additionally, we have:  
\[0<m:=\min_{(z,\theta)\in[0,1]\times K}h(z;\theta)\leq h(z; \theta)\,,\] \[h(z;\theta)\leq\max_{(z,\theta)\in[0,1]\times K}h(z;\theta)=:M<\infty\,.\]  
where \(m\) and \(M\) are constants independent of \(z\) and \(\theta\). This also means that \(m\leq g(\theta)=\int_{z=0}^{1}h(z;\theta)\leq M\). Moreover, since \(\tilde{h}_{n}(z;\theta)=h(\lfloor nz\rfloor/n;\theta)\), then we also have \(\forall z\in[0,1],\theta\in K,n\in\mathbb{N},\ m\leq\tilde{h}_{n}(z;\theta)\leq M\) and \(m\leq\tilde{g}_{n}(\theta)=\int_{z=0}^{1}\tilde{h}_{n}(z;\theta)\leq M\).  
As \(h\) is uniformly continuous, \(\forall\epsilon>0,\exists\delta>0,\forall(z,z^{\prime})\in[0,1]^{2},(\theta, \theta^{\prime})\in K^{2}\):  
\[\left|z-z^{\prime}\right|\leq\delta\text{ and }\left\|\theta-\theta^{\prime} \right\|\leq\delta\Rightarrow\left|h(z;\theta)-h(z^{\prime};\theta^{\prime}) \right|\leq\epsilon\,.\]  
By definition, \(\lfloor nz\rfloor/n-z\leq 1/n\). Hence \(\exists N\in\mathbb{N},\forall n\geq N,\lfloor nz\rfloor/n-z\leq\delta\). As a consequence:  
\[\forall\epsilon>0,\,\exists N\in\mathbb{N},\,\forall n\geq N,\,\forall(z, \theta)\in[0,1]\times K,\quad\left|h(z;\theta)-\tilde{h}_{n}(z;\theta)\right| \leq\epsilon\,.\]  
In other words, \(\{\tilde{h}_{n}\}_{n}\) converges uniformly towards \(h\). Let us fix \(\epsilon\) and \(N\) now. Then, \(\forall n\geq N,\,\forall(z,\theta)\in[0,1]\times K\):  
\[\tilde{p}_{\theta,n}(z)-p_{\theta}(z) =\frac{\tilde{h}_{n}(z;\theta)}{\int_{z}\tilde{h}_{n}(z;\theta)dz }-\frac{h(z;\theta)}{\int_{z}h(z;\theta)dz}\] \[=\frac{\tilde{h}_{n}(z;\theta)-h(z;\theta)}{\int_{z}\tilde{h}_{n}( z;\theta)dz}+h(z;\theta)\frac{\int_{z}\left(h(z;\theta)-\tilde{h}_{n}(z; \theta)\right)dz}{\int_{z}h(z;\theta)dz\int_{z}\tilde{h}_{n}(z;\theta)dz}\] \[\leq\frac{\epsilon}{m}+M\frac{\epsilon}{m^{2}}\] \[=\epsilon\frac{m+M}{m^{2}}\,.\]  
Hence, for this \(\epsilon,\ \forall n\geq N:\)  
\[\sup_{\theta\in K}\ \int_{z=0}^{1}(\tilde{p}_{\theta,n}(z)-p_{\theta}(z))^{2}dz \leq\epsilon^{2}\left(\frac{m+M}{m^{2}}\right)^{2},\]which, by definition, means that  
\[\sup_{\theta\in K}\ \int_{z=0}^{1}(\bar{p}_{\theta,n}(z)-p_{\theta}(z))^{2}dz \underset{n\to\infty}{\longrightarrow}0\,.\]  
With this, condition (4) is fully verified, and the conclusions of Theorem 1 are applicable, which concludes the proof.