and $\overline {\mathbf d}=(\overline d_1, \dots, \overline d_{m-f+1})$, i.e., $\overline {\mathbf d}=(d_f, \dots, d_{m})$. By Lemma \[propbat\], there exists a partition $\overline {\mathbf g}=(\overline g_1, \dots, \overline g_{m-f+2})$ such that $\sum_{i=1}^{m-f+2}\overline g_i=\overline S$ and $\overline {\mathbf g}\prec' \overline {\mathbf d}$.

        Now we define $$\begin{array}{ll}
        g_i=\min\{c_i, d_i\}, & 1\leq i \leq f-1,\\
        g_i= \overline g_{i-f+1}, & f\leq i \leq m+1.
        \end{array}$$ Let us see that $g_{f}\leq g_{f-1}$, i.e., that $\overline g_1 \leq \min\{c_{f-1}, d_{f-1}\}$. If $\overline g_1 \leq \overline d_1$, then $\overline g_1 \leq d_f=\min\{c_{f}, d_{f}\}\leq \min\{c_{f-1}, d_{f-1}\}$. If $\overline g_1 > \overline d_1$, then $\overline d_i= \overline g_{i+1}$, $1\leq i \leq  m-f+1$, hence $\overline S=\overline g_1+\sum_{i=1}^{m-f+1}\overline d_i$. As $\overline S\leq c_f+\sum_{i=f}^{m}d_i$, we obtain $\overline g_1\leq c_f\leq \min\{c_{f-1}, d_{f-1}\}$. Therefore ${\mathbf g}=(g_1, \dots, g_{m+1})$ is a partition.

        Let $h'=\min\{i \; : \; d_i<g_i\}$ and $\overline h'=\min\{i \; : \; \overline d_i<\overline g_i\}$. Observe that $d_i \geq g_i$, $1\leq i \leq f-1$, $d_i=\overline{d}_{i-f+1}\geq \overline{g}_{i-f+1}=g_i$ for $f\leq i < f+\overline{h}'-1$, and $d_{f+\overline{h}'-1}=\overline{d}_{\overline{h}'}<\overline{g}_{\overline{h}'}= g_{f+\overline{h}'-1}$. Then, $h'=f+\overline{h}'-1$. As $d_i=\overline d_{i-f+1}=\overline g_{i-f+2}=g_{i+1}$ for $h'\leq i \leq m$, we obtain that ${\mathbf g}\prec' {\mathbf d}$.

        Let $h=\min\{i \; : \; c_i<g_i\}$. Recall that $d_i\leq c_i$ for $f\leq i \leq m$. We have, $$\begin{array}{ll}
        g_i\leq c_i, & 1\leq 