<figure><img src="image_1.png" /></figure>

HAL
open science

# About the optimal estimation of a density with infinite support under Hellinger loss

Mathieu Sart

► To cite this version:

Mathieu Sart. About the optimal estimation of a density with infinite support under Hellinger loss.
2024. hal-04042886v2

HAL Id: hal-04042886

https://hal.science/hal-04042886v2

Preprint submitted on 29 Mar 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.
# About the optimal estimation of a density with infinite support under Hellinger loss

Mathieu Sart

<figure><img src="image_1.png" /></figure>

## To cite this version:

Mathieu Sart. About the optimal estimation of a density with infinite support under Hellinger loss. Electronic Journal of Statistics, 2024, 18 (2), pp.4526 - 4577. 10.1214/24-EJS2306. hal-04042886v4

HAL Id: hal-04042886

https://hal.science/hal-04042886v4

Submitted on 20 Jan 2025

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# ABOUT THE OPTIMAL ESTIMATION OF A DENSITY WITH INFINITE SUPPORT UNDER HELLINGER LOSS

MATHIEU SART

ABSTRACT. The aim of this paper is to give a complete description of the optimal estimation rates for the Hellinger loss when the square root of the density belongs to a Besov ball $B_{p,\infty}^{\alpha}(\mathbb{R})$. We make them explicit without further conditions when $p < 2$, and under a tail dominance condition when $p$ is larger. We also show that these rates can be improved when the density is assumed to be unimodal.

## 1. INTRODUCTION

We consider $n$ independent and identically distributed random variables $X_1, \dots, X_n$ with values in $\mathbb{R}$. We suppose that their distribution is absolutely continuous with respect to the Lebesgue measure and denote their density by $f$.

An important challenge in the density estimation problem is to determine as accurately as possible the minimax risk. The latter can be defined as follows. Let $\mathcal{D}(\mathbb{R})$ be the set of densities on $\mathbb{R}$, $\mathcal{F}$ be a subset of $\mathcal{D}(\mathbb{R})$, and $\mathcal{L}$ be a loss function. The minimax risk is

$$ \mathcal{R}(\mathcal{F}, \mathcal{L}) = \inf_{\hat{f}} \sup_{f \in \mathcal{F}} \mathbb{E}[\mathcal{L}(f, \hat{f})], $$

where the infimum is taken over all estimators $\hat{f}$. Different choices are possible for $\mathcal{L}$. Among them are the $q^{th}$ powers of the $L^q$ distances $\mathcal{L} = d_q^q$, or the square of the Hellinger distance $\mathcal{L} = h^2$. We recall that $h$ is defined for all $f_1, f_2 \in \mathcal{D}(\mathbb{R})$ by

$$ h^2(f_1, f_2) = \frac{1}{2} \int \left( \sqrt{f_1(x)} - \sqrt{f_2(x)} \right)^2 dx. $$

The role of the minimax risk is to give a baseline against which to compare when proposing a statistical estimation procedure. We are more precisely interested here in the optimal estimation rate, that is in the sequence $(\varepsilon_n)_{n \ge 1}$ satisfying

$$ 0 < \liminf_{n \to +\infty} \varepsilon_n^{-1} \mathcal{R}(\mathcal{F}, \mathcal{L}) < \limsup_{n \to +\infty} \varepsilon_n^{-1} \mathcal{R}(\mathcal{F}, \mathcal{L}) < +\infty. $$

An optimal estimation procedure $\hat{f}$ is therefore a procedure whose risk $\mathbb{E}[\mathcal{L}(f, \hat{f})]$ converges at the rate $\varepsilon_n$ under the sole condition that $f$ lies in $\mathcal{F}$. This minimax point of view thus makes it possible to discard certain procedures that are not rate optimal, even in the a priori simple case where $f$ is a smooth density on $\mathbb{R}$.

<footnote>Date: March, 2024.</footnote>

<footnote n="2010">2010 Mathematics Subject Classification. 62G05, 62G07.</footnote>

<footnote>Key words and phrases. Besov classes, minimax rates, non-parametric estimation.</footnote>
# About the optimal estimation of a density with infinite support under Hellinger loss

Mathieu Sart

Universite Jean Monnet, CNRS, Ecole Centrale de Lyon, INSA Lyon, Universite Claude Bernard Lyon 1, ICJ UMR5208, 42023 Saint-Etienne, France,
e-mail: mathieu.sart@univ-st-etienne.fr

**Abstract:** The aim of this paper is to give a complete description of the optimal estimation rates for the Hellinger loss when the square root of the density belongs to a Besov ball $B_{p,\infty}^{\alpha}(R)$. We make them explicit without further conditions when $p < 2$, and under a tail dominance condition when $p$ is larger. We also show that these rates can be improved when the density is assumed to be unimodal.

**MSC2020 subject classifications:** 62G05, 62G07.

**Keywords and phrases:** Besov classes, minimax rates, shape constraints, non-parametric estimation.

Received April 2023.

## Contents

<table><tr><td>1</td><td>Introduction</td><td>4527</td></tr><tr><td>2</td><td>Minimax rates under smoothness assumptions</td><td>4529</td></tr><tr><td>2.1</td><td>Wavelet basis</td><td>4530</td></tr><tr><td>2.2</td><td>Besov classes</td><td>4530</td></tr><tr><td>2.3</td><td>Tail dominance condition</td><td>4531</td></tr><tr><td>2.4</td><td>Minimax risk</td><td>4532</td></tr><tr><td>3</td><td>Mixing shape and smoothness constraints</td><td>4535</td></tr><tr><td>4</td><td>Proofs</td><td>4538</td></tr><tr><td>4.1</td><td>Proof of Proposition 2.1</td><td>4538</td></tr><tr><td>4.2</td><td>Proof of Theorem 2.2</td><td>4540</td></tr><tr><td>4.3</td><td>Proof of Theorem 2.3</td><td>4546</td></tr><tr><td>4.4</td><td>Sketch of the proof of Proposition 2.4</td><td>4548</td></tr><tr><td>4.5</td><td>Proof of Proposition 3.1</td><td>4549</td></tr><tr><td>4.6</td><td>Proof of Theorem 3.2</td><td>4550</td></tr><tr><td>4.6.1</td><td>Proofs of Lemmas 6 and 7: preliminary results</td><td>4559</td></tr><tr><td>4.6.2</td><td>Proof of Lemma 6</td><td>4562</td></tr><tr><td>4.6.3</td><td>Proof of Lemma 7</td><td>4563</td></tr><tr><td>4.7</td><td>Proof of Theorem 3.3</td><td>4565</td></tr><tr><td>4.8</td><td>Proof of the claims of Section 2.4</td><td>4571</td></tr><tr><td></td><td>References</td><td>4575</td></tr></table>
To formalize things a little more, we state that $f$ is smooth if $f$ belongs to a ball $\mathfrak{B}_{p,\infty}^{\alpha}(R)$ of a Besov space. In a nutshell, the parameter $R$ is an upper-bound of the (quasi) Besov norm of the elements $f$ of $\mathfrak{B}_{p,\infty}^{\alpha}(R)$. This (quasi) norm measures the variations of $f$ by means of a (quasi) $L^p$ norm and according to the smoothness exponent $\alpha$. The larger $p$ is, the more uniformly the regularity of $f$ is measured. The latter is therefore likely to have much smaller local variations if $p$ is large than if $p$ is small. Note also that $R$ induces a constraint on the (quasi) $L^p$ norm of $f$ and hence on its tails when $p < 1$ (the smaller $p$ is, the lighter they should be). There are several possible equivalent definitions of $R$, and we choose one in Section 2. For the sake of rigour, we assume throughout this introduction that $R$ is large enough $(\mathfrak{B}_{p,\infty}^{\alpha}(R)$ does not contain densities with compact support in $[0, 1]$ if $R$ is too small when $\alpha > (1/p - 1)_+$.

The minimax rates have been studied by many authors when $\mathcal{L} = d_q^q$. They are now fully known, up to log factors, when the density is also compactly supported, that is when it belongs to

$$ \mathcal{F} = \{f \in \mathfrak{B}_{p,\infty}^{\alpha}(R), \text{supp } f \subset [0, 1]\}. $$

A summary of these rates can be found in [Sar21]. Let us just mention that the case $p \ge q$ can be easily solved with linear estimators. This is no longer true when $p < q$, see [DJKP96]. To be optimal, an estimator must, in some sense, adapt to local variations of the density. When, moreover, $\alpha$ is allowed to be smaller than $1/p$, the statistical estimation procedure must be able to cope with singularities to be optimal.

In recent years, a special endeavour has been made by statisticians to remove the assumption of compact support. For the $L^q$ loss, results can be found in [JLL04, RBRTM11, GL11, Lep13, GL14, LW19, Sar23]. Other statistical frameworks have also been involved in this effort. We may cite the regression model, the problem of estimating the conditional density, the hazard rate, the intensity of a Poisson process, or the density in the convolution structure model. For more details, we refer to [RBR10, LW19, BC21, CGC21, CL23].

The aim of the present manuscript is to deal with the Hellinger loss $\mathcal{L} = h^2$. The latter naturally appears in the study of maximum likelihood estimators, see [BM98, DW16, KS16] for some references. This is also true for the $T$- and $\rho$-estimators, the founding references being [Bir06a] and [BBS17]. In the case of the Hellinger loss, the assumption of regularity is traditionally put on $\sqrt{f}$, and we will also adopt this point of view here. Note that the minimax risk has already been investigated in [Bir06a] when $\sqrt{f}$ is compactly supported and belongs to a Besov ball. The whole point of this paper is to understand how the minimax risk evolves when $f$ is no longer assumed to be compactly supported.

For the $L^q$ losses, the estimation rates remain noticeably the same as in the compact case (within possible log factors) when the tails of $f$ are light enough, say when $f(x) \le |x|^{-b}$ for some large $b$ and all $|x| \ge 1$. This point has been revealed by [GL14]. Actually, there are not even logarithmic losses when $q = 1$, see [Sar23]. The situation turns out to be completely different for the Hellinger loss.

First, the minimax risk for the Hellinger loss does not tend to 0 if the only assumption made on the density is $\sqrt{f} \in \mathfrak{B}_{p,\infty}^{\alpha}(R)$ with $p \ge 2$. A supplementary condition on the tails of $f$ is required to ensure the convergence of the minimax risk. We propose here to use the one of [Sar23]. This phenomenon can be explained by the importance that the Hellinger distance gives to the estimation errors in the tails of $f$. A similar result is true for the $L^1$ loss when $f \in \mathfrak{B}_{p,\infty}^{\alpha}(R)$ but not for the other $L^q$ losses [GL14, Sar23]. We prove that the minimax risk achieves the rate $n^{-\gamma}$
# 1. Introduction

We consider $n$ independent and identically distributed random variables $X_1, \dots, X_n$ with values in $\mathbb{R}$. We suppose that their distribution is absolutely continuous with respect to the Lebesgue measure and denote their density by $f$.

An important challenge in the density estimation problem is to determine as accurately as possible the minimax risk. The latter can be defined as follows. Let $\mathcal{D}(\mathbb{R})$ be the set of densities on $\mathbb{R}$, $\mathcal{F}$ be a subset of $\mathcal{D}(\mathbb{R})$, and $\mathcal{L}$ be a loss function. The minimax risk is

$$ \mathcal{R}(\mathcal{F}, \mathcal{L}) = \inf_{\hat{f}} \sup_{f \in \mathcal{F}} \mathbb{E} \left[ \mathcal{L}(f, \hat{f}) \right], $$

where the infimum is taken over all estimators $\hat{f}$. Different choices are possible for $\mathcal{L}$. Among them are the $q^{\text{th}}$ powers of the $\mathbb{L}^q$ distances $\mathcal{L} = d_q^q$, or the square of the Hellinger distance $\mathcal{L} = h^2$. We recall that $h$ is defined for all $f_1, f_2 \in \mathcal{D}(\mathbb{R})$ by

$$ h^2(f_1, f_2) = \frac{1}{2} \int \left( \sqrt{f_1(x)} - \sqrt{f_2(x)} \right)^2 dx. $$

The role of the minimax risk is to give a baseline against which to compare when proposing a statistical estimation procedure. We are more precisely interested here in the optimal estimation rate, that is in the sequence $(\varepsilon_n)_{n \ge 1}$ satisfying

$$ 0 < \liminf_{n \to +\infty} \varepsilon_n^{-1} \mathcal{R}(\mathcal{F}, \mathcal{L}) \le \limsup_{n \to +\infty} \varepsilon_n^{-1} \mathcal{R}(\mathcal{F}, \mathcal{L}) < +\infty. $$

An optimal estimation procedure $\hat{f}$ is therefore a procedure whose risk $\mathbb{E}[\mathcal{L}(f, \hat{f})]$ converges at the rate $\varepsilon_n$ under the sole condition that $f$ lies in $\mathcal{F}$. This minimax point of view thus makes it possible to discard certain procedures that are not rate optimal, even in the a priori simple case where $f$ is a smooth density on $\mathbb{R}$.

To formalize things a little more, we state that $f$ is smooth if $f$ belongs to a ball $\mathfrak{B}_{p,\infty}^\alpha(R)$ of a Besov space. In a nutshell, the parameter $R$ is an upper-bound of the (quasi) Besov norm of the elements $f$ of $\mathfrak{B}_{p,\infty}^\alpha(R)$. This (quasi) norm measures the variations of $f$ by means of a (quasi) $\mathbb{L}^p$ norm and according to the smoothness exponent $\alpha$. The larger $p$ is, the more uniformly the regularity of $f$ is measured. The latter is therefore likely to have much smaller local variations if $p$ is large than if $p$ is small. Note also that $R$ induces a constraint on the (quasi) $\mathbb{L}^p$ norm of $f$ and hence on its tails when $p < 1$ (the smaller $p$ is, the lighter they should be). There are several possible equivalent definitions of $R$, and we choose one in Section 2. For the sake of rigour, we assume throughout this introduction that $R$ is large enough ($\mathfrak{B}_{p,\infty}^\alpha(R)$ does not contain densities with compact support in $[0, 1]$ if $R$ is too small when $\alpha > (1/p - 1)_+$).

The minimax rates have been studied by many authors when $\mathcal{L} = d_q^q$. They are now fully known, up to log factors, when the density is also compactly supported, that is when it belongs to

$$ \mathcal{F} = \{ f \in \mathfrak{B}_{p,\infty}^\alpha(R), \text{supp } f \subset [0, 1] \}. $$
where $\gamma \in (0, 2\alpha/(2\alpha + 1)]$ depends on the tails of $f$. But contrary to the $L^q$ losses (including $q = 1$), we never have $\gamma = 2\alpha/(2\alpha + 1)$ if the tail dominance condition allows $f(x) \le |x|^{-b}$, and this, whatever the value of $b > 1$.

Second, the optimal rate of convergence is $n^{1-p/2}$ when $p < 2$ and no additional assumption is made. This result is valid for all $\alpha > 1/p - 1/2$. This rate contrasts with the classical rate $n^{-2\alpha/(2\alpha+1)}$ associated with compactly supported densities. A faster rate can be obtained under the tail dominance condition of [Sar23]. But, as above, it is not possible to recover the rate $n^{-2\alpha/(2\alpha+1)}$ if the density is allowed to be slightly fat tailed. In the remaining case $\alpha \le 1/p - 1/2$, the minimax risk does not tend to 0 even when the density is compactly supported on $[0, 1]$.

In the results mentioned above, the tails of $f$ may not tend monotonically to 0. In other words, the density can be alternately increasing and decreasing, and this, an infinite number of times over an interval of infinite length. The fact that the density can oscillate as many times as we like is exploited in the proof of our lower bound. It is therefore natural to wonder whether banning this possibility might not improve the results. This leads us to study the minimax risk under the following three conditions: 1.) $\sqrt{f} \in \mathfrak{B}_{p,\infty}^{\alpha}(R)$ with $\alpha > \max\{1, 1/p - 1/2\}$ and $p > 0$. 2.) $f$ is unimodal on $\mathbb{R}$ 3.) the tail dominance condition of [Sar23].

The idea of mixing two types of constraints in the density model – one of regularity and one of unimodality – also appears in [EL00, VDVVDL03, HK05, DL14, LM17, LM19] to cite a few papers. An overview of what is being done in the literature may be found in [DL18]. Unfortunately, adding the constraint “$f$ is unimodal” to the assumption “$f$ is smooth” generally has no impact on the convergence rates. This phenomenon may be due to the losses functions that are used or to the supplementary assumptions that are made. For instance, no improvement is to be expected for $h^2$ when $f$ is compactly supported (see Theorem 7).

The situation is quite different in the non-compact case. The optimal estimation rates under the three above points depend on $\alpha, p$ and the tails of $f$. They are always faster than the classical rate $n^{-2/3}$ corresponding to the estimation of a bounded unimodal density with compact support. They are also always faster than the ones that can be obtained without the unimodality assumption, i.e. under points 1.) and 3.) only. Mixing a shape and smoothness constraint can therefore lead to better rates than would have been possible under these constraints taken separately.

We present our results in Sections 2 and 3. The proofs are postponed to Section 4. Throughout this paper, we suppose $n \ge 2$. Moreover, $c, c_1, c_2, \dots$ are terms that may vary from line to line. To lighten the notations, we define for all class $\mathcal{F}$ of functions,

$$ \mathcal{R}(\mathcal{F}) = \mathcal{R}(\mathcal{F}, h^2). $$

We denote for $p > 0$ and $x = (x_k)_{k \in \mathbb{Z}}$ the weak (quasi) $\ell^p$ norm of $x$ by

$$ \|x\|_{p,\infty} = \sup_{t>0} t \left( \sum_{k \in \mathbb{Z}} 1_{|x_k| \ge t} \right)^{1/p}. $$

When $p = \infty$, we set $\|x\|_{\infty,\infty} = \|x\|_{\infty}$.
A summary of these rates can be found in [Sar21]. Let us just mention that the case $p \ge q$ can be easily solved with linear estimators. This is no longer true when $p < q$, see [DJKP96]. To be optimal, an estimator must, in some sense, adapt to local variations of the density. When, moreover, $\alpha$ is allowed to be smaller than $1/p$, the statistical estimation procedure must be able to cope with singularities to be optimal.

In recent years, a special endeavour has been made by statisticians to remove the assumption of compact support. For the $L^q$ loss, results can be found in [JLL04, RBRTM11, GL11, Lep13, GL14, LW19, Sar23]. Other statistical frameworks have also been involved in this effort. We may cite the regression model, the problem of estimating the conditional density, the hazard rate, the intensity of a Poisson process, or the density in the convolution structure model. For more details, we refer to [RBR10, LW19, BC21, CGC21, CL23].

The aim of the present manuscript is to deal with the Hellinger loss $\mathcal{L} = h^2$. The latter naturally appears in the study of maximum likelihood estimators, see [BM98, DW16, KS16] for some references. This is also true for the $T$- and $\rho$-estimators, the founding references being [Bir06a] and [BBS17]. In the case of the Hellinger loss, the assumption of regularity is traditionally put on $\sqrt{f}$, and we will also adopt this point of view here. Note that the minimax risk has already been investigated in [Bir06a] when $\sqrt{f}$ is compactly supported and belongs to a Besov ball. The whole point of this paper is to understand how the minimax risk evolves when $f$ is no longer assumed to be compactly supported.

For the $L^q$ losses, the estimation rates remain noticeably the same as in the compact case (within possible log factors) when the tails of $f$ are light enough, say when $f(x) \le |x|^{-b}$ for some large $b$ and all $|x| \ge 1$. This point has been revealed by [GL14]. Actually, there are not even logarithmic losses when $q = 1$, see [Sar23]. The situation turns out to be completely different for the Hellinger loss.

First, the minimax risk for the Hellinger loss does not tend to 0 if the only assumption made on the density is $\sqrt{f} \in \mathfrak{B}_{p,\infty}^{\alpha}(R)$ with $p \ge 2$. A supplementary condition on the tails of $f$ is required to ensure the convergence of the minimax risk. We propose here to use the one of [Sar23]. This phenomenon can be explained by the importance that the Hellinger distance gives to the estimation errors in the tails of $f$. A similar result is true for the $L^1$ loss when $f \in \mathfrak{B}_{p,\infty}^{\alpha}(R)$ but not for the other $L^q$ losses [GL14, Sar23]. We prove that the minimax risk achieves the rate $n^{-\gamma}$ where $\gamma \in (0, 2\alpha/(2\alpha+1)]$ depends on the tails of $f$. But contrary to the $L^q$ losses (including $q = 1$), we never have $\gamma = 2\alpha/(2\alpha+1)$ if the tail dominance condition allows $f(x) \le |x|^{-b}$, and this, whatever the value of $b > 1$.

Second, the optimal rate of convergence is $n^{1-p/2}$ when $p < 2$ and no additional assumption is made. This result is valid for all $\alpha > 1/p - 1/2$. This rate contrasts with the classical rate $n^{-2\alpha/(2\alpha+1)}$ associated with compactly supported densities. A faster rate can be obtained under the tail dominance condition of [Sar23]. But, as above, it is not possible to recover the rate $n^{-2\alpha/(2\alpha+1)}$ if the density is allowed to be slightly fat tailed. In the remaining case $\alpha \le 1/p - 1/2$, the minimax risk does not tend to 0 even when the
## 2. MINIMAX RATES UNDER SMOOTHNESS ASSUMPTIONS

We present in this section the classes of functions we use to model the smoothness of $f$ and the size of its tails. We then carry out the associated minimax rates.

**2.1. Wavelet basis.** A classical way to measure the regularity of a function is to decompose it in a wavelet basis, and to put conditions on its wavelet coefficients. We deal here with the special bi-orthogonal basis of [CDF92] where the father wavelet is $\phi = 1_{[0,1]}$, where the mother wavelet $\psi$ is piecewise constant and where their duals $\bar{\phi}$ and $\bar{\psi}$ are compactly supported and Hölder continuous with exponent $\tau \in \mathbb{N}^*$. The wavelet $\psi$ is also orthogonal to polynomials of degree $\tau - 1$.

In this basis, any square integrable function $f$ can be written as

$$ (1) \qquad f = \sum_{k \in \mathbb{Z}} \alpha_{J_0,k}(f) \bar{\phi}_{J_0,k} + \sum_{j=J_0}^{\infty} \sum_{k \in \mathbb{Z}} \beta_{j,k}(f) \bar{\psi}_{j,k}, $$

where $J_0 \in \mathbb{Z}$ is an arbitrary number to be chosen, where

$$ \alpha_{J_0,k}(f) = \int f(x) \phi_{J_0,k}(x) \, dx, $$

$$ \beta_{j,k}(f) = \int f(x) \psi_{j,k}(x) \, dx, $$

and where for any $x \in \mathbb{R}$, $j, k \in \mathbb{Z}$,

$$ \phi_{j,k}(x) = 2^{j/2} \phi(2^j x - k), \quad \psi_{j,k}(x) = 2^{j/2} \psi(2^j x - k), $$

$$ \bar{\phi}_{j,k}(x) = 2^{j/2} \bar{\phi}(2^j x - k), \quad \bar{\psi}_{j,k}(x) = 2^{j/2} \bar{\psi}(2^j x - k). $$

It is worthwhile to notice that the coefficients $\alpha_{j,k}(f)$, $\beta_{j,k}(f)$ are well defined if $f$ is only supposed to be integrable. The decomposition (1) remains valid in this case (see Appendix H of [Sar23] for instance).

**2.2. Besov classes.** We consider $p \in (0, +\infty]$, $\alpha \in ((1/p - 1)_+, \tau)$ and introduce the standard Besov space $B_{p,\infty}^{\alpha}$. By definition, it is composed of functions $f$ of $L^{\max\{p,1\}}(\mathbb{R})$ satisfying $\|f\|_{B_{p,\infty}^{\alpha}} < \infty$ where

$$ \|f\|_{B_{p,\infty}^{\alpha}} = \|\alpha_0.(f)\|_{p} + \sup_{j \ge 0} \left\{ 2^{j(\alpha+1/2-1/p)} \|\beta_{j,.(}f)\|_{p} \right\}, $$

see [DJ97]. The quantity $\|f\|_{B_{p,\infty}^{\alpha}}$ refers to the (quasi) Besov norm of $f$. The Besov ball $\mathfrak{B}_{p,\infty}^{\alpha}(R)$ is thus defined for $R > 0$ by

$$ \mathfrak{B}_{p,\infty}^{\alpha}(R) = \{f \in \mathfrak{B}_{p,\infty}^{\alpha}, \|f\|_{\mathfrak{B}_{p,\infty}^{\alpha}} \le R\}. $$

In the present paper, we pay particular attention to the strong and weak Besov classes $B_{p,\infty}^{\alpha}(R)$ and $WB_{p,\infty}^{\alpha}(R)$. They are defined as follows:

$$ B_{p,\infty}^{\alpha}(R) = \{f \in B_{p,\infty}^{\alpha}, \forall j \ge 0, \|\beta_{j,.(}f)\|_{p} \le R2^{-j(\alpha+1/2-1/p)}\}, $$

$$ WB_{p,\infty}^{\alpha}(R) = \{f \in L^1(\mathbb{R}), \forall j \ge 0, \|\beta_{j,.(}f)\|_{p,\infty} \le R2^{-j(\alpha+1/2-1/p)}\}. $$
density is compactly supported on $[0, 1]$.

In the results mentioned above, the tails of $f$ may not tend monotonically to 0. In other words, the density can be alternately increasing and decreasing, and this, an infinite number of times over an interval of infinite length. The fact that the density can oscillate as many times as we like is exploited in the proof of our lower bound. It is therefore natural to wonder whether banning this possibility might not improve the results. This leads us to study the minimax risk under the following three conditions: 1.) $\sqrt{f} \in \mathfrak{B}_{p,\infty}^{\alpha}(\mathbb{R})$ with $\alpha > \max\{1, 1/p - 1/2\}$ and $p > 0$ 2.) $f$ is unimodal on $\mathbb{R}$ 3.) the tail dominance condition of [Sar23].

The idea of mixing two types of constraints in the density model – one of regularity and one of unimodality – also appears in [EL00, VDVVDL03, HK05, DL14, LM17, LM19] to cite a few papers. An overview of what is being done in the literature may be found in [DL18]. Unfortunately, adding the constraint “$f$ is unimodal” to the assumption “$f$ is smooth” generally has no impact on the convergence rates. This phenomenon may be due to the losses functions that are used or to the supplementary assumptions that are made. For instance, no improvement is to be expected for $h^2$ when $f$ is compactly supported (see Theorem 3.3).

The situation is quite different in the non-compact case. The optimal estimation rates under the three above points depend on $\alpha, p$ and the tails of $f$. They are always faster than the classical rate $n^{-2/3}$ corresponding to the estimation of a bounded unimodal density with compact support. They are also always faster than the ones that can be obtained without the unimodality assumption, i.e. under points 1.) and 3.) only. Mixing a shape and smoothness constraint can therefore lead to better rates than would have been possible under these constraints taken separately.

We present our results in Sections 2 and 3. The proofs are postponed to Section 4. Throughout this paper, we suppose $n \ge 2$. Moreover, $c, c_1, c_2, \dots$ are terms that may vary from line to line. To lighten the notations, we define for all class $\mathcal{F}$ of functions,

$$ \mathcal{R}(\mathcal{F}) = \mathcal{R}(\mathcal{F}, h^2). $$

We denote for $p > 0$ and $x = (x_k)_{k \in \mathbb{Z}}$ the weak (quasi) $\ell^p$ norm of $x$ by

$$ \|x\|_{p,\infty} = \sup_{t>0} t \left( \sum_{k \in \mathbb{Z}} 1_{|x_k| \ge t} \right)^{1/p}. $$

When $p = \infty$, we set $\|x\|_{\infty,\infty} = \|x\|_{\infty}$.

## 2. Minimax rates under smoothness assumptions

We present in this section the classes of functions we use to model the smoothness of $f$ and the size of its tails. We then carry out the associated minimax rates.
We can classify the above conditions on the wavelet coefficients by order of importance: they are the weakest for the weak Besov classes, then the strong Besov classes, and finally the Besov balls.

**2.3. Tail dominance condition.** We describe here a supplementary assumption that is intended to control the tails of the density.

We define for $j, k \in \mathbb{Z}$,

$$ (2) \qquad F_{j,k}(f) = \int_{2^{-j(k-1/2)}}^{2^{-j(k+1/2)}} f(x) \, dx. $$

We set for $M > 0$, and $\theta \in (0, 1)$,

$$ \begin{aligned} \mathcal{T}_{\theta}(M) &= \{ f \in \mathbb{L}^1(\mathbb{R}), f \ge 0, \forall j \ge 0, \|F_{j,\cdot}(f)\|_{\theta}^{\theta} \le M 2^{j(1-\theta)} \} \\ \mathcal{W}\mathcal{T}_{\theta}(M) &= \{ f \in \mathbb{L}^1(\mathbb{R}), f \ge 0, \forall j \ge 0, \|F_{j,\cdot}(f)\|_{\theta,\infty}^{\theta} \le M 2^{j(1-\theta)} \}. \end{aligned} $$

The case $\theta = 0$ corresponds to compactly supported functions:

$$ \begin{aligned} \mathcal{T}_{\theta}(M) &= \mathcal{W}\mathcal{T}_{\theta}(M) \\ &= \{ f \in \mathbb{L}^1(\mathbb{R}), f \ge 0, \forall j \ge 0, |\{k \in \mathbb{Z}, F_{j,k}(f) > 0\}| \le M 2^j \}. \end{aligned} $$

In this formula, $|\cdot|$ denotes the size of the set between the two bars. A density belonging to one of these classes is therefore a density whose tails are sufficiently light. The smaller $\theta$ is, the lighter they are.

In line with [Sar23], we say that the “weak tail dominance condition” is fulfilled if $f \in \mathcal{W}\mathcal{T}_{\theta}(M)$. The “strong tail dominance condition” is met if $f \in \mathcal{T}_{\theta}(M)$. This terminology “tail dominance condition” has been initially proposed by Alexander Goldenshluger and Oleg Lepski in [GL14]. Their condition do not exactly match with ours though (our conditions are always implied by theirs, see [CL20] where the condition $f \in \mathcal{T}_{\theta}(M)$ also appears).

We recall – see Proposition 1 of [Sar23] – that a compactly supported density on $[-L, L]$ satisfies our tail dominance condition with $\theta = 0$ and $M = 2L+2$. This bound on $M$ can be a bit pessimistic though. Think for example about the density $f$ defined for $a > 0$ and $x \in \mathbb{R}$ by

$$ f(x) = \frac{1}{2} \mathbb{1}_{[-a-1, -a]}(x) + \frac{1}{2} \mathbb{1}_{[a, a+1]}(x). $$

It belongs to $\mathcal{T}_0(6)$ whereas $L = a + 1$ may be taken arbitrarily large. In the non-compact case, a density $f$ satisfying $f(x) \le A^b|x|^{-b}$ for all $|x| \ge 1$ and some $A > 0, b > 1$, lies in $\mathcal{W}\mathcal{T}_{\theta}(M)$ with $\theta = 1/b$ and $M$ only depending on $b, A$. The (strong) tail dominance condition is automatically fulfilled with $\theta = p$ when $f$ belongs to a Besov ball $\mathfrak{B}_{p,\infty}^{\alpha}(R)$ with $p < 1$. A variant of this last claim, that is useful when dealing with a smoothness assumption on $\sqrt{f}$, is the following.

**Proposition 1.** Let $p \in (0, 2)$, $R > 0$, $\alpha \in (1/p - 1/2, \tau)$ and $f \in \mathcal{D}(\mathbb{R})$. Then, if $\sqrt{f}$ belongs to $\mathfrak{B}_{p,\infty}^{\alpha}(R)$, $f$ belongs to $\mathcal{T}_{p/2}(c_1 R^p)$. Conversely, if $\sqrt{f} \in \mathcal{B}_{p,\infty}^{\alpha}(R)$ and $f \in \mathcal{T}_{p/2}(R^p)$, then $\sqrt{f} \in \mathfrak{B}_{p,\infty}^{\alpha}(c_2 R)$. The terms $c_1, c_2$ only depend on the wavelet basis and $\alpha, p$.
## 2.1. Wavelet basis

A classical way to measure the regularity of a function is to decompose it in a wavelet basis, and to put conditions on its wavelet coefficients. We deal here with the special bi-orthogonal basis of [CDF92] where the father wavelet is $\phi = 1_{[0,1]}$, where the mother wavelet $\psi$ is piecewise constant and where their duals $\bar{\phi}$ and $\bar{\psi}$ are compactly supported and Hölder continuous with exponent $\tau \in \mathbb{N}^*$. The wavelet $\psi$ is also orthogonal to polynomials of degree $\tau - 1$.

In this basis, any square integrable function $f$ can be written as

$$f = \sum_{k \in \mathbb{Z}} \alpha_{J_0,k}(f) \bar{\phi}_{J_0,k} + \sum_{j=J_0}^{\infty} \sum_{k \in \mathbb{Z}} \beta_{j,k}(f) \bar{\psi}_{j,k}, \quad (2.1)$$

where $J_0 \in \mathbb{Z}$ is an arbitrary number to be chosen, where

$$\begin{aligned}
\alpha_{J_0,k}(f) &= \int f(x) \phi_{J_0,k}(x) \, dx, \\
\beta_{j,k}(f) &= \int f(x) \psi_{j,k}(x) \, dx,
\end{aligned}$$

and where for any $x \in \mathbb{R}$, $j, k \in \mathbb{Z}$,

$$\begin{aligned}
\phi_{j,k}(x) &= 2^{j/2} \phi(2^j x - k), & \psi_{j,k}(x) &= 2^{j/2} \psi(2^j x - k), \\
\bar{\phi}_{j,k}(x) &= 2^{j/2} \bar{\phi}(2^j x - k), & \bar{\psi}_{j,k}(x) &= 2^{j/2} \bar{\psi}(2^j x - k).
\end{aligned}$$

## 2.2. Besov classes

We consider $p \in (0, +\infty]$, $\alpha \in ((1/p - 1)_+, \tau)$ and introduce the standard Besov space $\mathcal{B}_{p,\infty}^{\alpha}$. By definition, it is composed of functions $f$ of $L^{\max\{p,1\}}(\mathbb{R})$ satisfying $\|f\|_{\mathcal{B}_{p,\infty}^{\alpha}} < \infty$ where

$$\|f\|_{\mathcal{B}_{p,\infty}^{\alpha}} = \|\alpha_{0,\cdot}(f)\|_{p} + \sup_{j \ge 0} \left\{ 2^{j(\alpha+1/2-1/p)} \|\beta_{j,\cdot}(f)\|_{p} \right\},$$

see [DJ97]. The quantity $\|f\|_{\mathcal{B}_{p,\infty}^{\alpha}}$ refers to the (quasi) Besov norm of $f$. The Besov ball $\mathfrak{B}_{p,\infty}^{\alpha}(R)$ is thus defined for $R > 0$ by

$$\mathfrak{B}_{p,\infty}^{\alpha}(R) = \{f \in \mathcal{B}_{p,\infty}^{\alpha}, \|f\|_{\mathcal{B}_{p,\infty}^{\alpha}} \le R\}.$$

In the present paper, we pay particular attention to the strong and weak Besov classes $\mathcal{B}_{p,\infty}^{\alpha}(R)$ and $W\mathcal{B}_{p,\infty}^{\alpha}(R)$. They are defined as follows:

$$\begin{aligned}
\mathcal{B}_{p,\infty}^{\alpha}(R) &= \{f \in L^1(\mathbb{R}), \forall j \ge 0, \|\beta_{j,\cdot}(f)\|_{p} \le R2^{-j(\alpha+1/2-1/p)}\}, \\
W\mathcal{B}_{p,\infty}^{\alpha}(R) &= \{f \in L^1(\mathbb{R}), \forall j \ge 0, \|\beta_{j,\cdot}(f)\|_{p,\infty} \le R2^{-j(\alpha+1/2-1/p)}\}.
\end{aligned}$$

We can classify the above conditions on the wavelet coefficients by order of importance: they are the weakest for the weak Besov classes, then the strong Besov classes, and finally the Besov balls.
**2.4. Minimax risk.** We now investigate the minimax risk under the preceding conditions. We consider $p \in (0, +\infty]$, $\alpha \in ((1/p - 1/2)_+, \tau)$, $\theta \in [0, p/2] \cap [0, 1)$, $R > 0$, $M \ge 1$. We define when $p \ne 2$,

$$ \mathcal{S}_{p,\theta}^{\alpha}(R, M) = \{f \in \mathcal{D}(\mathbb{R}), \sqrt{f} \in \mathcal{W}\mathcal{B}_{p,\infty}^{\alpha}(R), f \in \mathcal{W}\mathcal{T}_{\theta}(M)\}. $$

When $p = 2$, we rather set

$$ \mathcal{S}_{p,\theta}^{\alpha}(R, M) = \{f \in \mathcal{D}(\mathbb{R}), \sqrt{f} \in \mathcal{B}_{p,\infty}^{\alpha}(R), f \in \mathcal{W}\mathcal{T}_{\theta}(M)\}. $$

The theorem below gives a non-asymptotic upper-bound of the minimax risk when $f$ belongs to $\mathcal{S}_{p,\theta}^{\alpha}(R, M)$.

**Theorem 2.** For all $p \in (0, +\infty]$, $\alpha \in ((1/p - 1/2)_+, \tau)$, $\theta \in [0, p/2] \cap [0, 1)$, $R > 0$, $M \ge 1$,

$$ (3) \qquad \mathcal{R}(\mathcal{S}_{p,\theta}^{\alpha}(R, M)) \le c_1 [\varepsilon_n + (\log n)n^{-1}], $$

where

$$ \varepsilon_n = R^{2(1-\theta)/(2\alpha+1-2\theta/p)} M^{(1+2\alpha-2/p)/(1+2\alpha-2\theta/p)} n^{-2\alpha(1-\theta)/(2\alpha+1-2\theta/p)} \\ + Mn^{-(1-\theta)}, $$

and where $c_1$ is a positive number only depending on $p, \alpha, \theta$ and the wavelet basis.

This result can be compared with the following lower-bound:

**Theorem 3.** For all $p \in (0, +\infty]$, $\alpha \in ((1/p - 1/2)_+, \tau)$, $\theta \in [0, p/2] \cap [0, 1)$, there are $R_0, M_0$ such that for all $R \ge R_0$, $M \ge M_0$ and $n$ large enough,

$$ \mathcal{R}(\mathcal{S}_{p,\theta}^{\prime\alpha}(R, M)) \ge c_2 \varepsilon_n, $$

where $\varepsilon_n$ is given in the preceding theorem, and where $\mathcal{S}_{p,\theta}^{\prime\alpha}(R, M)$ is a subset of $\mathcal{S}_{p,\theta}^{\alpha}(R, M)$. Moreover, any function $f \in \mathcal{S}_{p,\theta}^{\prime\alpha}(R, M)$ belongs to $\mathcal{T}_{\theta}(M)$ and satisfies $|x|f^{\theta}(x) \le c_3M$ for all $|x| \ge 1$. We also have $\sqrt{f} \in \mathcal{B}_{p,\infty}^{\alpha}(R)$ and even $\sqrt{f} \in \mathfrak{B}_{p,\infty}^{\alpha}(R)$ if $\theta < p/2$ of if $\theta = p/2$ with $M \le R^p$. Above, $c_2, c_3, M_0, R_0$ are positive numbers only depending on $p, \alpha, \theta$ and the wavelet basis.

When $\theta = 0$, we recover the usual estimation rate, and this, for all possible values of $\alpha$ and $p$ satisfying $\alpha \in ((1/p - 1/2)_+, \tau)$. We recall that $\tau$ can be taken arbitrarily large. The case $\alpha \le (1/p - 1/2)_+$ is treated below.

We observe that the optimal estimation rate is strongly affected by the parameter $\theta$, i.e, the tails of $f$. The larger $\theta$ is, the slower the rate is. However, the choice of the dominance condition (whether weak or strong) has no influence on the rate. We can also assume, without changing the results, that the density is fat tailed, i.e. its tails are smaller than the inverse of a power of $|x|$. As explained in the introduction, this deterioration of rates when the density is slightly fat tailed does not occur for the $L^q$ losses (whatever $q \ge 1$, and up to possible log factors).

When $p \ge 2$, the minimax rate can be made arbitrarily slow by letting $\theta$ tend to 1. Actually, it is not possible to estimate the density under the sole assumption that $\sqrt{f}$ belongs to a Besov ball $\mathfrak{B}_{p,\infty}^{\alpha}(R)$ with $R$ large enough (see the proof of Theorem 3). The situation appears to be quite different when $p < 2$. The tail dominance condition is indeed always satisfied in this case with
## 2.3. Tail dominance condition

We describe here a supplementary assumption that is intended to control the tails of the density.

We define for $j, k \in \mathbb{Z}$,

$$F_{j,k}(f) = \int_{2^{-j}(k-1/2)}^{2^{-j}(k+1/2)} f(x) \, dx. \qquad (2.2)$$

We set for $M > 0$, and $\theta \in (0, 1)$,

$$ \begin{aligned} \mathcal{T}_{\theta}(M) &= \{ f \in \mathbb{L}^1(\mathbb{R}), f \ge 0, \forall j \ge 0, \|F_{j, \cdot}(f)\|_{\theta}^{\theta} \le M 2^{j(1-\theta)} \} \\ \mathcal{W}\mathcal{T}_{\theta}(M) &= \{ f \in \mathbb{L}^1(\mathbb{R}), f \ge 0, \forall j \ge 0, \|F_{j, \cdot}(f)\|_{\theta, \infty}^{\theta} \le M 2^{j(1-\theta)} \}. \end{aligned} $$

The case $\theta = 0$ corresponds to compactly supported functions:

$$ \begin{aligned} \mathcal{T}_{\theta}(M) &= \mathcal{W}\mathcal{T}_{\theta}(M) \\ &= \{ f \in \mathbb{L}^1(\mathbb{R}), f \ge 0, \forall j \ge 0, |\{k \in \mathbb{Z}, F_{j,k}(f) > 0\}| \le M 2^j \}. \end{aligned} $$

In this formula, $| \cdot |$ denotes the size of the set between the two bars. A density belonging to one of these classes is therefore a density whose tails are sufficiently light. The smaller $\theta$ is, the lighter they are.

In line with [Sar23], we say that the “weak tail dominance condition” is fulfilled if $f \in \mathcal{W}\mathcal{T}_{\theta}(M)$. The “strong tail dominance condition” is met if $f \in \mathcal{T}_{\theta}(M)$. This terminology “tail dominance condition” has been initially proposed by Alexander Goldenshluger and Oleg Lepski in [GL14]. Their condition do not exactly match with ours though (our conditions are always implied by theirs, see [CL20] where the condition $f \in \mathcal{T}_{\theta}(M)$ also appears).

We recall – see Proposition 1 of [Sar23] – that a compactly supported density on $[-L, L]$ satisfies our tail dominance condition with $\theta = 0$ and $M = 2L + 2$. This bound on $M$ can be a bit pessimistic though. Think for example about the density $f$ defined for $a > 0$ and $x \in \mathbb{R}$ by

$$f(x) = \frac{1}{2} \mathbb{1}_{[-a-1, -a]}(x) + \frac{1}{2} \mathbb{1}_{[a, a+1]}(x).$$

It belongs to $\mathcal{T}_0(6)$ whereas $L = a + 1$ may be taken arbitrarily large. In the non-compact case, a density $f$ satisfying $f(x) \le A^b|x|^{-b}$ for all $|x| \ge 1$ and some $A > 0, b > 1$, lies in $\mathcal{W}\mathcal{T}_{\theta}(M)$ with $\theta = 1/b$ and $M$ only depending on $b, A$. The (strong) tail dominance condition is automatically fulfilled with $\theta = p$ when $f$ belongs to a Besov ball $\mathfrak{B}_{p, \infty}^{\alpha}(R)$ with $p < 1$. A variant of this last claim, that is useful when dealing with a smoothness assumption on $\sqrt{f}$, is the following.

**Proposition 2.1.** Let $p \in (0, 2)$, $R > 0$, $\alpha \in (1/p - 1/2, \tau)$ and $f \in \mathcal{D}(\mathbb{R})$. Then, if $\sqrt{f}$ belongs to $\mathfrak{B}_{p, \infty}^{\alpha}(R)$, $f$ belongs to $\mathcal{T}_{p/2}(c_1 R^p)$. Conversely, if $\sqrt{f} \in \mathfrak{B}_{p, \infty}^{\alpha}(R)$ and $f \in \mathcal{T}_{p/2}(R^p)$, then $\sqrt{f} \in \mathfrak{B}_{p, \infty}^{\alpha}(c_2 R)$. The terms $c_1, c_2$ only depend on the wavelet basis and $\alpha, p$.
$\theta = p/2$. More precisely, we derive from the above: for all $p \in (0, 2)$, $\alpha \in ((1/p - 1/2)_+, \tau)$, $R \ge R_0$, and $n$ large enough,

$$c_2 R^p n^{-(1-p/2)} \le \mathcal{R} \left( \left\{ f \in \mathcal{D}(\mathbb{R}), \sqrt{f} \in \mathfrak{B}_{p,\infty}^{\alpha}(R) \right\} \right) \le c_1 R^p n^{-(1-p/2)}.$$

The rate is much slower than the standard rate $n^{-2\alpha/(2\alpha+1)}$ we would have had if the density was compactly supported though.

We will not insist on this point but the preceding rates can be reached by an adaptive estimator (that is by an estimator whose construction does not involve $p, \alpha, \theta, R, M$). We refer to the proof of Theorem 2 for more details.

In the previous results, we assumed $\alpha > 1/p - 1/2$ when $p < 2$. This condition is necessary to ensure the convergence of the minimax risk, even when the density is compactly supported. We may indeed show:

**Proposition 4.** For all $p \in (0, 2)$, $R > 0$, $\tau > 1/p - 1/2$ and $\alpha = 1/p - 1/2$,

$$\mathcal{R} \left( \left\{ f \in \mathcal{D}(\mathbb{R}), \sqrt{f} \in \mathfrak{B}_{p,\infty}^{\alpha}(R), \text{supp } f \subset [0, 1] \right\} \right) \ge \frac{1}{16}.$$

It is interesting to note that the exponent in the optimal rate does not tend to 0 when $\alpha \to 1/p - 1/2$. There is thus a kind of discontinuity at the boundary $\alpha = 1/p - 1/2$. A similar phenomenon occurs for the $L^1$ distance but not for the other $L^q$ distances, see [Sar21, Sar23].

### 3. MIXING SHAPE AND SMOOTHNESS CONSTRAINTS

As explained in the previous section, the assumption “f is compactly supported” cannot be weakened to include densities whose tails are bounded by $|x|^{-1/\theta}$ without this having a substantial impact on the results. Such a minimax approach is always a little pessimistic though. The target function may well have properties other than regularity. Many densities, for example, have tails that tend monotonically to 0. This leads us to wonder whether adding the constraint “f is unimodal on $\mathbb{R}$” might improve the results. If this is true when $\alpha > 1$ and $\theta \ne 0$, this will indicate that the estimation errors can be better controlled when the tails are not allowed to oscillate.

Throughout this section, we suppose that f is unimodal with unknown mode, that is $f \in \mathcal{U}$ where

$$\mathcal{U} = \{ f \in \mathcal{D}(\mathbb{R}), \text{ there exists } m \in \mathbb{R} \text{ such that } f \text{ is non-decreasing} \\ \text{ on } (-\infty, m] \text{ and non-increasing on } [m, +\infty) \}.$$

It turns out that the weak tail dominance condition can be written more simply when f is unimodal. Consider $\theta \in (0, 1)$, $M \ge 1$ and

$$\mathbb{L}^{\theta, \infty}(M) = \left\{ f \in \mathcal{D}(\mathbb{R}), \forall t > 0, |\{x \in \mathbb{R}, f(x) \ge t\}| < Mt^{-\theta} \right\}.$$

When f is unimodal with mode at $m \in \mathbb{R}$, f belongs to $\mathbb{L}^{\theta, \infty}(M)$ implies

$$(4) \qquad f(x) \le \frac{M^{1/\theta}}{|x - m|^{1/\theta}},$$

for all $x \ne m$. Conversely, if f satisfies (4), f lies in $\mathbb{L}^{\theta, \infty}(cM)$ for all $c > 2$. This inequality is most informative when x moves significantly away from m (f(m) may be infinite). It can therefore
## 2.4. Minimax risk

We now investigate the minimax risk under the preceding conditions. We consider $p \in (0, +\infty]$, $\alpha \in ((1/p - 1/2)_+, \tau)$, $\theta \in [0, p/2] \cap [0, 1)$, $R > 0$, $M \ge 1$. We define when $p \ne 2$,

$$ \mathcal{S}_{p,\theta}^{\alpha}(R, M) = \{ f \in \mathcal{D}(\mathbb{R}), \sqrt{f} \in \mathcal{W}\mathcal{B}_{p,\infty}^{\alpha}(R), f \in \mathcal{W}\mathcal{T}_{\theta}(M) \}. $$

When $p = 2$, we rather set

$$ \mathcal{S}_{p,\theta}^{\alpha}(R, M) = \{ f \in \mathcal{D}(\mathbb{R}), \sqrt{f} \in \mathcal{B}_{p,\infty}^{\alpha}(R), f \in \mathcal{W}\mathcal{T}_{\theta}(M) \}. $$

We recall that $\tau$ is defined in Section 2.1 and exclusively depends on the wavelets. As there is a wavelet basis for each value of $\tau \in \mathbb{N}^*$, we can take it arbitrarily large.

The theorem below gives a non-asymptotic upper-bound of the minimax risk when $f$ belongs to $\mathcal{S}_{p,\theta}^{\alpha}(R, M)$.

**Theorem 2.2.** For all $p \in (0, +\infty]$, $\alpha \in ((1/p - 1/2)_+, \tau)$, $\theta \in [0, p/2] \cap [0, 1)$, $R > 0$, $M \ge 1$,

$$ \mathcal{R}(\mathcal{S}_{p,\theta}^{\alpha}(R, M)) \le c_1 [\varepsilon_n + (\log n)n^{-1}], \quad (2.3) $$

where

$$ \varepsilon_n = R^{2(1-\theta)/(2\alpha+1-2\theta/p)} M^{(1+2\alpha-2/p)/(1+2\alpha-2\theta/p)} n^{-2\alpha(1-\theta)/(2\alpha+1-2\theta/p)} + Mn^{-(1-\theta)}, $$

and where $c_1$ is a positive number only depending on $p, \alpha, \theta$ and the wavelet basis.

This result can be compared with the following lower-bound:

**Theorem 2.3.** For all $p \in (0, +\infty]$, $\alpha \in ((1/p - 1/2)_+, \tau)$, $\theta \in [0, p/2] \cap [0, 1)$, there are $R_0, M_0$ such that for all $R \ge R_0$, $M \ge M_0$ and $n$ large enough,

$$ \mathcal{R}(\mathcal{S}_{p,\theta}^{\prime\alpha}(R, M)) \ge c_2 \varepsilon_n, $$

where $\varepsilon_n$ is given in the preceding theorem, and where $\mathcal{S}_{p,\theta}^{\prime\alpha}(R, M)$ is a subset of $\mathcal{S}_{p,\theta}^{\alpha}(R, M)$. Moreover,

$$ \mathcal{S}_{p,\theta}^{\prime\alpha}(R, M) \subset \left\{ f \in \mathcal{D}(\mathbb{R}), \sqrt{f} \in \mathcal{B}_{p,\infty}^{\alpha}(R), f \in \mathcal{T}_{\theta}(M), \sup_{x \in \mathbb{R}} |x| f^{\theta}(x) \le M, \|f\|_{\infty} \le 1 \right\}. $$

When $\theta < p/2$ or when $\theta = p/2$ with $M \le R^p$, we also have

$$ \mathcal{S}_{p,\theta}^{\prime\alpha}(R, M) \subset \{ f \in \mathcal{D}(\mathbb{R}), \sqrt{f} \in \mathfrak{B}_{p,\infty}^{\alpha}(R) \}. $$

Above, $c_2, M_0, R_0$ are positive numbers only depending on $p, \alpha, \theta$ and the wavelet basis.
be seen as a condition on the tails of $f$. In any way, it is equivalent to the weak tail dominance condition:

**Proposition 5.** Consider $M \ge 1$, $\theta \in (0,1)$ and suppose that $f \in \mathcal{U}$. If $f$ belongs to $\mathbb{L}^{\theta,\infty}(M)$, then

$$ (5) \qquad |\{k \in \mathbb{Z}, F_{j,k}(f) \ge t\}| \le c_1 [1 + M 2^{j(1-\theta)} t^{-\theta}] $$

for all $j \in \mathbb{Z}$ and $t > 0$. In particular, $f$ belongs to $WT_{\theta}(2c_1M)$. Conversely, if $f$ belongs to $WT_{\theta}(M)$, then $f$ lies in $\mathbb{L}^{\theta,\infty}(c_2M)$. The terms $c_1$ and $c_2$ are constants.

We now consider $p \in (0, +\infty]$, $\alpha \in (\max(1/p - 1/2, 1), \tau)$, $\theta \in (0, p/2] \cap [0, 1)$, $R > 0$ and $M \ge 1$. We study here the minimax risk on

$$ \mathcal{U} \mathcal{S}_{p,\theta}^{\alpha}(R, M) = \mathcal{U} \cap \mathcal{S}_{p,\theta}^{\alpha}(R, M). $$

It involves the following parameters:

$$ (6) \qquad \begin{aligned} t &= \frac{(2\alpha + 1)(1 - \theta)}{1 + 2\alpha + 2\theta + 4\alpha\theta - 6\theta/p} \\ \gamma &= 2t\alpha/(2\alpha + 1) + 2(1 - t)/3 \end{aligned} $$

$$ \beta_1 = \frac{2(1 - \theta)}{1 + 2\alpha + 2\theta + 4\alpha\theta - 6\theta/p} $$

$$ \beta_2 = \frac{1 + 2\alpha - 2/p}{1 + 2\alpha + 2\theta + 4\alpha\theta - 6\theta/p} $$

We now state:

**Theorem 6.** For all $p \in (0, +\infty]$, $\alpha \in (\max(1/p - 1/2, 1), \tau)$, $\theta \in (0, p/2] \cap (0, 1)$, $R > 0$, $M \ge 1$,

$$ (7) \qquad \mathcal{R}(\mathcal{U} \mathcal{S}_{p,\theta}^{\alpha}(R, M)) \le c \left[ R^{\beta_1} M^{\beta_2} n^{-\gamma} + v_n \right], $$

where $c$ only depends on $p, \alpha, \theta$ and the wavelet basis. The term $v_n$ only depends on $p, \alpha, \theta, M, R, n$, and tends to 0 faster than $n^{-\gamma}$.

In this inequality, $v_n$ is smaller than $R^{\beta_1} M^{\beta_2} n^{-\gamma}$ when $n \ge n_0$ for some $n_0$ only depending on $p, \alpha, \theta, M, R$. It does, however, appear in (7) as the result is non-asymptotic. Its expression is not displayed here as it is a little cumbersome. It can be found in the proof in the theorem, see (30) and (36).

In (6), $t$ is between 0 and 1. The smaller $\theta$ is, the larger $t$ is, and the closer the rate is to the standard estimation rate $n^{-2\alpha/(2\alpha+1)}$ of a compactly supported density. However, and this is a major improvement on the previous section, the exponent $\gamma$ gets closer to $2/3$ when $\theta$ becomes very close to 1. Without the additional shape constraint, the rate became arbitrarily slow.

We can check that

$$ \gamma > \max \left\{ \frac{2\alpha(1 - \theta)}{(2\alpha + 1 - 2\theta/p)}, \frac{2}{3} \right\}. $$

We recall that the first term in the maximum refers to the exponent we have when we estimate a fat tailed density $f$ whose square root is $\alpha$-smooth. The second is the usual exponent corresponding to the estimation of a unimodal density. Here, $\gamma$ is larger than these two exponents. Thereby, associating a smoothness assumption with a shape constraint may lead to faster rates of convergence than those achievable under these assumptions taken separately.
When $\theta = 0$, we recover the usual estimation rate, and this, for all possible values of $\alpha$ and $p$ satisfying $\alpha \in ((1/p - 1/2)_+, \tau)$. The case $\alpha \le (1/p - 1/2)_+$ is treated below.

We observe that the optimal estimation rate is strongly affected by the parameter $\theta$, i.e, the tails of $f$. The larger $\theta$ is, the slower the rate is. However, the choice of the dominance condition (whether weak or strong) has no influence on the rate. We can also assume, without changing the results, that the density is fat tailed, i.e. its tails are smaller than the inverse of a power of $|x|$. As explained in the introduction, this deterioration of rates when the density is slightly fat tailed does not occur for the $L^q$ losses (whatever $q \ge 1$, and up to possible log factors).

When $p \ge 2$, the minimax rate can be made arbitrarily slow by letting $\theta$ tend to 1. Actually, it is not possible to estimate the density under the sole assumption that $\sqrt{f}$ belongs to a Besov ball $\mathfrak{B}_{p,\infty}^{\alpha}(R)$ with $R$ large enough (see the proof of Theorem 2.3). The situation appears to be quite different when $p < 2$. The tail dominance condition is indeed always satisfied in this case with $\theta = p/2$. More precisely, we derive from the above: for all $p \in (0, 2)$, $\alpha \in ((1/p - 1/2)_+, \tau)$, $R \ge R_0$, and $n$ large enough,

$$c_2 R^p n^{-(1-p/2)} \le \mathcal{R} \left( \left\{ f \in \mathcal{D}(\mathbb{R}), \sqrt{f} \in \mathfrak{B}_{p,\infty}^{\alpha}(R) \right\} \right) \le c_1 R^p n^{-(1-p/2)}.$$

The rate is much slower than the standard rate $n^{-2\alpha/(2\alpha+1)}$ we would have had if the density was compactly supported though.

We will not insist on this point but the preceding rates can be reached by an adaptive estimator (that is by an estimator whose construction does not involve $p, \alpha, \theta, R, M$).

The proof of Theorem 2.2 is based on an oracle inequality (or model selection inequality) for the Hellinger loss. A crude version of this one is as follows: for all suitable collection $(V_m)_{m \in \mathcal{M}}$ of finite dimensional linear spaces, not containing too many spaces per dimension, we may build an estimator $\hat{f}_1$ satisfying

$$\mathbb{E} [h^2(f, \hat{f}_1)] \le c \inf_{m \in \mathcal{M}} \left\{ d_2^2(\sqrt{f}, V_m) + \frac{\dim V_m}{n} \right\}, \quad (2.4)$$

where $c$ is a constant and where $d_2$ denotes the $L^2$ distance.

Such an inequality can be derived from the T-estimation theory of [Bir06a]. Interestingly, the latter also leads to results for the $L^2$ and $L^1$ losses. More precisely, we may define estimators $\hat{f}_2$ and $\hat{f}_3$ such that

$$\mathbb{E} [d_2^2(f, \hat{f}_2)] \le c \inf_{m \in \mathcal{M}} \left\{ d_2^2(f, V_m) + \|f\|_{\infty} \frac{\dim V_m}{n} \right\} \quad (2.5)$$

$$\mathbb{E} [d_1(f, \hat{f}_3)] \le c \inf_{m \in \mathcal{M}} \left\{ d_1(f, V_m) + \sqrt{\frac{\dim V_m}{n}} \right\}, \quad (2.6)$$

where $c$ is another constant. We refer to [Bir06a] and [Bir14] for more details.
This phenomenon occurs even with a very mild smoothness assumption: ours does not even guarantee the continuity of $f$ when $p \in (1/\tau, 1)$ and $\alpha \in (\max(1/p - 1/2, 1), 1/p]$. Consider indeed two sequences $(a_k)_{k \ge 1}$ and $(b_k)_{k \ge 1}$ of non-negative numbers. The first sequence $(a_k)_k$ is assumed to be non-decreasing, and the second $(b_k)_k$ is non-increasing. We also suppose:

$$ (8) \qquad \sum_{k=1}^{\infty} a_k (k(k+1))^{-1} + \sum_{k=1}^{\infty} b_k = 1/2 $$

$$ (9) \qquad \sum_{k=2}^{\infty} b_k^{\theta} \le M $$

$$ (10) \qquad \sum_{k=1}^{\infty} a_k^{p/2} (k(k+1))^{\alpha p-1} + \sum_{k=1}^{\infty} b_k^{p/2} \le R^p. $$

We then define the function $f$ for $x \ge 0$ by

$$ f(x) = \sum_{k=1}^{\infty} a_k 1_{[1/(k+1), 1/k)}(x) + \sum_{k=1}^{\infty} b_k 1_{[k-1, k)}(x), $$

and extent it to an even function on $\mathbb{R}$. We may check that $f$ is unimodal. Equality (8) ensures that $f$ is a density, (9) gives an upper-bound on the $L^\theta$ (quasi) norm of $f$. In particular, $f \in W T_\theta(c_1 M)$ for some $c_1$, see Proposition 5. Elementary maths based on (10) lead to $\sqrt{f} \in \mathfrak{B}_{p,\infty}^\alpha(c_2 R)$ for some $c_2 > 0$ only depending on the wavelet basis, $p$, $\alpha$ when $p \in (1/\tau, 1)$ and $\alpha \in (\max(1/p - 1/2, 1), 1/p]$. In conclusion, $f \in \mathcal{W} \mathcal{S}_{p,\theta}^\alpha(c_1 R, c_2 M)$. This function $f$ can admit an infinite number of discontinuities and not be bounded (and of course not be compactly supported).

Although Theorem 6 only establishes a minimax risk bound, the proof gives an estimator that achieves this rate adaptively, i.e., without a priori knowledge of $p, \alpha, \theta, R, M$.

We still need to verify that (7) is sharp. This is the aim of the following theorem.

**Theorem 7.** For all $p \in (0, +\infty]$, $\alpha \in (\max(1/p - 1/2, 1), \tau)$, $\theta \in (0, p/2) \cap (0, 1)$, there are $R_0, M_0$ such that for all $R \ge R_0$, $M \ge M_0$ and $n$ large enough,

$$ \mathcal{R}(\mathcal{W} \mathcal{S}_{p,\theta}^{\alpha}(R, M)) \ge c R^{\beta_1} M^{\beta_2} n^{-\gamma}, $$

where $\mathcal{W} \mathcal{S}_{p,\theta}^\alpha(R, M)$ is a subset of $\mathcal{W} \mathcal{S}_{p,\theta}^\alpha(R, M)$. Moreover, any function $f \in \mathcal{W} \mathcal{S}_{p,\theta}^\alpha(R, M)$ is unimodal at 0 and such that $\sqrt{f} \in \mathfrak{B}_{p,\infty}^\alpha(R)$, $\int f^\theta(x) dx \le M$. Besides, $c$ is a positive term only depending on $\alpha, p, \theta$ and the wavelet basis. All the above remains true when $\theta = p/2$ under the additional condition $M \le R^p$. The lower bound is also true when $\theta = 0$. In this case, the densities of $\mathcal{W} \mathcal{S}_{p,\theta}^\alpha(R, M)$ are compactly supported in $[-M, M]$.

## 4. PROOFS

**4.1. Proof of Proposition 1.** We only show that if $\sqrt{f}$ belongs to $\mathfrak{B}_{p,\infty}^\alpha(R)$, then $f \in T_{p/2}(c_1 R^p)$. The proof of the converse is straightforward (just apply Cauchy-Schwarz inequality). To simplify the notations, we omit the square root of $f$ in the wavelets coefficients.
We show in the proof of Theorem 2.2 that it is possible to choose the collection $(V_m)_{m \in \mathcal{M}}$ so that the infimum in (2.4) tends to 0 at the rate indicated by (2.3). The conclusion to be drawn is that an oracle inequality of this form is sufficiently precise to obtain the optimal rates of convergence under (weak) smoothness assumptions in the non compact setting.

Observe now that (2.5) and (2.6) are very similar to (2.4). More precisely, the only thing to do to go from $h^2$ to $d_2^2$ is to replace $\sqrt{f}$ by $f$ and add a sup norm to the variance term. The bounds we get for one should therefore also work for the other, up to minor modifications. In particular, the rates should correspond when $f$ is bounded and when we suppose “$\int f^{1/2}(x) dx \le M$” for the Hellinger loss to make the comparison fair as $\int f(x) dx = 1$ for the $L^2$ loss. This is not true: the optimal estimation rate of a bounded function in $\mathfrak{B}_{p,\infty}^\alpha(R)$ for the $L^2$ loss is the standard one $n^{-2\alpha/(2\alpha+1)}$ when $p \in [1, 2]$ and $\alpha > 1/p - 1/2$, even in the non-compact case (at least up to log factors, see [RBRTM11]). This rate is faster than the rate $n^{-\alpha/(2\alpha+1-1/p)}$ given by Theorem 2.2 when $\sqrt{f} \in \mathfrak{B}_{p,\infty}^\alpha(R)$ is bounded and in $\mathcal{T}_{1/2}(M)$ (this last condition implies $\int (f(x))^{1/2} dx \le M$).

This paradox is in fact due to the variance term in (2.5) that may be too large. A term of the order of “model dimension over $n$” is of the right order of magnitude when we deal with $h^2$. But not necessarily for $d_2^2$.

Another way of looking at it, which is perhaps a little more revealing, is to apply these inequalities to a single model. Introduce for all $j \ge 0$,

$$ 
\begin{aligned}
K_j &= \{k \in \mathbb{Z}, \mathbb{P}(X \in \text{supp } \psi_{j,k}) \ge 1/n\} \\
K_{-1} &= \{k \in \mathbb{Z}, \mathbb{P}(X \in \text{supp } \phi_{0,k}) \ge 1/n\}
\end{aligned}
$$

and define for $J \ge 0$,

$$ V = \left\{ \sum_{k \in K_{-1}} \gamma_{-1,k} \bar{\phi}_{0,k} + \sum_{j=0}^{J} \sum_{k \in K_j} \gamma_{j,k} \bar{\psi}_{j,k}, \forall j \ge -1, k \in K_j, \gamma_{j,k} \in \mathbb{R} \right\}. $$

In the unrealistic but very favourable situation where the sets $K_j$ are known, it is possible to build estimators that satisfy (2.4), (2.5), (2.6) with $(V_m)_{m \in \mathcal{M}}$ reduced to $V$.

The size of each set $K_j$ can be bounded by $c'n^\theta 2^{j(1-\theta)}$ when $f \in W\mathcal{T}_\theta(M)$ (as $\phi$ and $\psi$ are compactly supported). In particular, the dimension of $V$ is no larger than

$$ \dim V \le c'' M 2^{J(1-\theta)} n^\theta. $$

We show in Section 4.8:

$$ d_2^2(\sqrt{f}, V) \le c''' [R^2 2^{-2J\alpha} + \varepsilon_n] \quad \text{if } \sqrt{f} \in \mathfrak{B}_{2,\infty}^\alpha(R) \text{ and } f \in \mathcal{T}_{1/2}(M) $$

$$ d_2^2(f, V) \le c''' [R^2 2^{-2J\alpha} + \varepsilon'_n] \quad \text{if } f \in \mathfrak{B}_{2,\infty}^\alpha(R) $$

$$ d_1(f, V) \le c''' [R2^{-J\alpha} + \varepsilon''_n] \quad \text{if } f \in \mathfrak{B}_{1,\infty}^\alpha(R) \cap \mathcal{T}_{1/2}(M). $$
We define

$$F_{k,j_1,j_2} = \sum_{\substack{k_1 \in \mathbb{Z} \\ k_2 \in \mathbb{Z}}} |\beta_{j_1,k_1}||\beta_{j_2,k_2}|I_{j,k,j_1,k_1,j_2,k_2},$$

where

$$I_{j,k,j_1,k_1,j_2,k_2} = \int_{2^{-j}(k-1/2)}^{2^{-j}(k+1/2)} |\bar{\psi}_{j_1,k_1}\bar{\psi}_{j_2,k_2}|.$$

Since $p < 2$, $\| \cdot \|_1 \le \| \cdot \|_{p/2}$, and hence

$$(11) \qquad (F_k(f))^{p/2} \le 2 \sum_{\substack{j_1 \ge -1 \\ j_2 \ge j_1}} (F_{k,j_1,j_2})^{p/2}.$$

We consider a real number $\bar{L} > 0$ large enough to ensure that $\supp \bar{\psi}_{j',k'} \subset [2^{-j_+'}(-\bar{L}+k'), 2^{-j_+'}(\bar{L}+k')]$, where $j_+ = \max\{j, 0\}$, and set

$$K_{j,j',k'} = [-\bar{L} + 2^{j-j_+'} (k' - \bar{L}), \bar{L} + 2^{j-j_+'} (k' + \bar{L})].$$

Note that $K_{j,j',k}$ contains at most

$$(12) \qquad |K_{j,j',k'}| \le c_1 [1 + 2^{j-j'}]$$

integers. Moreover, $I_{j,k,j_1,k_1,j_2,k_2} = 0$ if $k_1 \notin K_{j_1,j_2,k_2}$ or if $k_2 \notin K_{j_2,j_1,k_1}$. If $\bar{L}$ is large enough, the integral is also zero if $k \notin K_{j_1,j_1,k_1}$ or if $k \notin K_{j_2,j_2,k_2}$. The same thing is true if $k_1 \notin K_{j_1,j,k}$ or $k_2 \notin K_{j_2,j,k}$. In any case, we have $I_{j,k,j_1,k_1,j_2,k_2} \le c_2 r_{j_1,j_2}$ where

$$r_{j_1,j_2} = 2^{\min\{j_1/2+j_2/2-j, -(j_2-j_1)/2\}}.$$

We deduce from Cauchy-Schwarz inequality,

$$F_{k,j_1,j_2} \le c_2 r_{j_1,j_2} \left( \sum_{k_1 \in \mathbb{Z}} \beta_{j_1,k_1}^2 1_{k \in K_{j_1,j_1,k_1}} \sum_{k_2 \in \mathbb{Z}} 1_{k_2 \in K_{j_2,j_2,k_2} \cap K_{j_2,j,k}} \right)^{1/2} \\ \times \left( \sum_{k_2 \in \mathbb{Z}} \beta_{j_2,k_2}^2 1_{k \in K_{j_2,j_2,k_2}} \sum_{k_1 \in \mathbb{Z}} 1_{k_1 \in K_{j_1,j_1,k_1} \cap K_{j_1,j,k}} \right)^{1/2}.$$

By using the inequality $\| \cdot \|_1 \le \| \cdot \|_{p/2}$ again,

$$(F_{k,j_1,j_2})^{p/2} \le c_3 r_{j_1,j_2}^{p/2} \left( \sum_{k_1 \in \mathbb{Z}} \beta_{j_1,k_1}^p 1_{k \in K_{j_1,j_1,k_1}} \left( \sum_{k_2 \in \mathbb{Z}} 1_{k_2 \in K_{j_2,j_2,k_2} \cap K_{j_2,j,k}} \right)^{p/2} \right)^{1/2} \\ \times \left( \sum_{k_2 \in \mathbb{Z}} \beta_{j_2,k_2}^p 1_{k \in K_{j_2,j_2,k_2}} \left( \sum_{k_1 \in \mathbb{Z}} 1_{k_1 \in K_{j_1,j_1,k_1} \cap K_{j_1,j,k}} \right)^{p/2} \right)^{1/2}.$$
Above,

$$\epsilon'_{n} = R^{2/(2\alpha+1)}n^{-2\alpha/(2\alpha+1)} + n^{-1}$$

$$\epsilon''_{n} = R^{1/(2\alpha+1)}M^{2\alpha/(2\alpha+1)}n^{-\alpha/(2\alpha+1)} + Mn^{-1/2}.$$

We now choose $2^J$ to optimize the right-hand sides of (2.4), (2.5) and (2.6). We deduce the rate $n^{-2\alpha/(4\alpha+1)}$ for $\hat{f}_1$, $n^{-2(1-\theta)\alpha/(1-\theta+2\alpha)}$ for $\hat{f}_2$, and $n^{-\alpha/(4\alpha+1)}$ for $\hat{f}_3$. The first is the right rate of convergence. Not the other two.

Yet, estimating such a function for the $\mathbb{L}^1$ or $\mathbb{L}^2$ loss is not a difficult problem. By way of example, a suitable linear estimator $\tilde{f}$ in $V$ or in

$$V' = \left\{ \sum_{k \in \mathbb{Z}} \gamma_{-1,k} \bar{\phi}_{0,k} + \sum_{j=0}^{J} \sum_{k \in \mathbb{Z}} \gamma_{j,k} \bar{\psi}_{j,k}, \forall j \ge -1, k \in K_j, \gamma_{j,k} \in \mathbb{R} \right\},$$

suits (if $J$ is correctly chosen): it satisfies for $n$ large enough,

$$\sup_{f \in \mathcal{B}_{2,\infty}^{\alpha}(R)} \mathbb{E}[d_2^2(f, \tilde{f})] \le Cn^{-2\alpha/(2\alpha+1)}$$

$$\sup_{f \in \mathcal{B}_{1,\infty}^{\alpha}(R) \cap \mathcal{T}_{1/2}(M)} \mathbb{E}[d_1^2(f, \tilde{f})] \le Cn^{-\alpha/(2\alpha+1)},$$

and converges therefore faster than the rates given by (2.5) and (2.6). The proof of these inequalities is given in Section 4.8. More general results for the $\mathbb{L}^1$ loss are to be found in [Sar23].

In Theorems 2.2 and 2.3, we assumed $\alpha > 1/p - 1/2$ when $p < 2$. This condition is necessary to ensure the convergence of the minimax risk, even when the density is compactly supported. We may indeed show:

**Proposition 2.4.** For all $p \in (0, 2)$, $R > 0$, $\tau > 1/p - 1/2$ and $\alpha = 1/p - 1/2$,

$$\mathcal{R}\left(\left\{f \in \mathcal{D}(\mathbb{R}), \sqrt{f} \in \mathfrak{B}_{p,\infty}^{\alpha}(R), \text{supp } f \subset [0,1]\right\}\right) \ge 1/16.$$

It is interesting to note that the exponent in the optimal rate does not tend to 0 when $\alpha \to 1/p - 1/2$. There is thus a kind of discontinuity at the boundary $\alpha = 1/p - 1/2$. A similar phenomenon occurs for the $\mathbb{L}^1$ distance but not for the other $\mathbb{L}^q$ distances, see [Sar21, Sar23].

### 3. Mixing shape and smoothness constraints

As explained in the previous section, the assumption “f is compactly supported” cannot be weakened to include densities whose tails are bounded by $|x|^{-1/\theta}$ without this having a substantial impact on the results. Such a minimax approach is always a little pessimistic though. The target function may well have properties other than regularity. Many densities, for example, have tails that tend monotonically to 0. This leads us to wonder whether adding the constraint “f is unimodal on $\mathbb{R}$” might improve the results. If this is true when $\alpha > 1$ and $\theta \ne 0$,
A new application of Cauchy-Schwarz leads to

$$
\begin{align*}
& \sum_{k \in \mathbb{Z}} (F_{k,j_1,j_2})^{p/2} \\
& \le c_3 r_{j_1,j_2}^{p/2} \left( \sum_{k \in \mathbb{Z}} \sum_{k_1 \in \mathbb{Z}} \beta_{j_1,k_1}^p 1_{k \in K_{j,j_1,k_1}} \left( \sum_{k_2 \in \mathbb{Z}} 1_{k_2 \in K_{j_2,j_1,k_1} \cap K_{j_2,j,k}} \right)^{p/2} \right)^{1/2} \\
& \qquad \times \left( \sum_{k \in \mathbb{Z}} \sum_{k_2 \in \mathbb{Z}} \beta_{j_2,k_2}^p 1_{k \in K_{j,j_2,k_2}} \left( \sum_{k_1 \in \mathbb{Z}} 1_{k_1 \in K_{j_1,j_2,k_2} \cap K_{j_1,j,k}} \right)^{p/2} \right)^{1/2} \\
& \le c_3 r_{j_1,j_2}^{p/2} R^{p/2} 2^{-(j_1+j_2)(p/2)(\alpha+1/2-1/p)} \left( \sup_{k,k_1 \in \mathbb{Z}} |K_{j,j_1,k_1}| |K_{j_2,j_1,k_1} \cap K_{j_2,j,k}|^{p/2} \right)^{1/2} \\
& \qquad \times \left( \sup_{k,k_2 \in \mathbb{Z}} |K_{j,j_2,k_2}| |K_{j_1,j_2,k_2} \cap K_{j_1,j,k}|^{p/2} \right)^{1/2}.
\end{align*}
$$

We now use (12) to get if $j_2 \ge j$ and $j_1 \ge j$

$$
\sum_{k \in \mathbb{Z}} (F_{k,j_1,j_2})^{p/2} \le c_4 R^{p/2} 2^{-(p/2)(j_1+j_2)(\alpha-1/p+1/2)}.
$$

If $j_2 \ge j$ and $j_1 < j$,

$$
\sum_{k \in \mathbb{Z}} (F_{k,j_1,j_2})^{p/2} \le c_4 R^{p/2} 2^{j(1-p/2)/2} 2^{-(p/2)j_2(\alpha-1/p+1/2)} 2^{-\alpha(p/2)j_1}.
$$

If $j_2 \le j$, and $j_1 \le j$,

$$
\sum_{k \in \mathbb{Z}} (F_{k,j_1,j_2})^{p/2} \le c_4 R^{p/2} 2^{j(1-p/2)/2} 2^{-(p/2)j_1\alpha} 2^{-(p/2)j_2\alpha}.
$$

We conclude thanks to (11).

<figure><img src="image_2.png" /></figure>

**4.2.** *Proof of Theorem 2.* Our proof relies on the result below that is due to [Bir06a] (see his
Theorem 6 and Proposition 8).

**Proposition 8.** Let $(V_m)_{m \in \mathcal{M}}$ be an at most countable collection of linear spaces of $L^2(\mathbb{R})$ with finite dimension. Let $(\Delta_m)_{m \in \mathcal{M}}$ be a family of non-negative weights such that

$$
\sum_{m \in \mathcal{M}} e^{-\Delta_m} \le 1.
$$

Then, there is a density estimator $\hat{f}$ such that

$$
\mathbb{E} [h^2(f, \hat{f})] \le c \inf_{m \in \mathcal{M}} \left\{ d_2^2(\sqrt{f}, V_m) + \frac{\dim V_m + \Delta_m}{n} \right\}.
$$

In the above inequality, c is a universal constant.
this will indicate that the estimation errors can be better controlled when the tails are not allowed to oscillate.

Throughout this section, we suppose that $f$ is unimodal with unknown mode, that is $f \in \mathcal{U}$ where

$$ \mathcal{U} = \{f \in \mathcal{D}(\mathbb{R}), \text{ there exists } m \in \mathbb{R} \text{ such that } f \text{ is non-decreasing on } (-\infty, m] \text{ and non-increasing on } [m, +\infty)\}. $$

It turns out that the weak tail dominance condition can be written more simply when $f$ is unimodal. Consider $\theta \in (0, 1)$, $M \ge 1$ and

$$ \mathbb{L}^{\theta, \infty}(M) = \{f \in \mathcal{D}(\mathbb{R}), \forall t > 0, |\{x \in \mathbb{R}, f(x) \ge t\}| < Mt^{-\theta}\}. $$

When $f$ is unimodal with mode at $m \in \mathbb{R}$, $f$ belongs to $\mathbb{L}^{\theta, \infty}(M)$ implies

$$ f(x) \le \frac{M^{1/\theta}}{|x - m|^{1/\theta}}, \qquad (3.1) $$

for all $x \ne m$. Conversely, if $f$ satisfies (3.1), $f$ lies in $\mathbb{L}^{\theta, \infty}(cM)$ for all $c > 2$. This inequality is most informative when $x$ moves significantly away from $m$ ($f(m)$ may be infinite). It can therefore be seen as a condition on the tails of $f$. In any way, it is equivalent to the weak tail dominance condition:

**Proposition 3.1.** Consider $M \ge 1$, $\theta \in (0, 1)$ and suppose that $f \in \mathcal{U}$. If $f$ belongs to $\mathbb{L}^{\theta, \infty}(M)$, then

$$ |\{k \in \mathbb{Z}, F_{j,k}(f) \ge t\}| \le c_1 \left[1 + M2^{j(1-\theta)}t^{-\theta}\right] \qquad (3.2) $$

for all $j \in \mathbb{Z}$ and $t > 0$. In particular, $f$ belongs to $\mathcal{W}\mathcal{T}_{\theta}(2c_1M)$. Conversely, if $f$ belongs to $\mathcal{W}\mathcal{T}_{\theta}(M)$, then $f$ lies in $\mathbb{L}^{\theta, \infty}(c_2M)$. The terms $c_1$ and $c_2$ are constants.

We now consider $p \in (0, +\infty]$, $\alpha \in (\max(1/p - 1/2, 1), \tau)$, $\theta \in (0, p/2] \cap [0, 1)$, $R > 0$ and $M \ge 1$. We study here the minimax risk on

$$ \mathcal{U} \mathcal{S}_{p, \theta}^{\alpha}(R, M) = \mathcal{U} \cap \mathcal{S}_{p, \theta}^{\alpha}(R, M). $$

It involves the following parameters:

$$ \begin{aligned} t &= \frac{(2\alpha + 1)(1 - \theta)}{1 + 2\alpha + 2\theta + 4\alpha\theta - 6\theta/p} \\ \gamma &= 2t\alpha/(2\alpha + 1) + 2(1 - t)/3 \end{aligned} \qquad (3.3) $$

$$ \begin{aligned} \beta_1 &= \frac{2(1 - \theta)}{1 + 2\alpha + 2\theta + 4\alpha\theta - 6\theta/p} \\ \beta_2 &= \frac{1 + 2\alpha - 2/p}{1 + 2\alpha + 2\theta + 4\alpha\theta - 6\theta/p}. \end{aligned} $$

We now state:
Without loss of generality, we may assume in the sequel that we have another independent sample $X'_1, \dots, X'_n$ of $X$. We set for $j \ge 0$ and $k \in \mathbb{Z}$,

$$I_{j,k} = \{x \in \mathbb{R}, \psi_{j,k}(x) \neq 0\}.$$

When $j = -1$, we rather set

$$I_{-1,k} = \{x \in \mathbb{R}, \phi_{0,k}(x) \neq 0\}.$$

We then consider the (random) set

$$\tilde{\mathbb{Z}}_j = \{k \in \mathbb{Z}, \exists i \in \{1, \dots, n\}, X'_i \in I_{j,k}\}.$$

We now order the sample $X'_1 < X'_2 < \dots < X'_n$ and define the smallest integer $\tilde{J} \ge 0$ satisfying

$$\min_{1 \le i \le n-1} (X'_{(i+1)} - X'_{(i)}) > 2^{1-\tilde{J}} L_{\psi}.$$

In this inequality, $L_{\psi} \ge 1$ stands for a real number such that $\text{supp } \psi \subset [-L_{\psi}, L_{\psi}]$.

Let $\tilde{\mathcal{K}}$ be the collection of all sets of the form $\mathbf{K} = (K_j)_{j \in \{-1, \dots, \tilde{J}\}}$ where $K_j$ denotes a finite subset of $\tilde{\mathbb{Z}}_j$. We define for all such $\mathbf{K}$ the linear space

$$V_{\mathbf{K}} = \left\{ \sum_{k \in K_{-1}} \gamma_{-1,k} \bar{\phi}_{0,k} + \sum_{j=0}^{\tilde{J}} \sum_{k \in K_j} \gamma_{j,k} \bar{\psi}_{j,k}, \forall j \ge -1, k \in K_j, \gamma_{j,k} \in \mathbb{R} \right\}.$$

The dimension of this linear space is not larger than

$$\dim V_{\mathbf{K}} \le \sum_{j=-1}^{\tilde{J}} |K_j|.$$

For all $\mathbf{K} \in \tilde{\mathcal{K}}$, we set

$$\Delta_{\mathbf{K}} = \sum_{j=-1}^{\tilde{J}} \left\{ |K_j| + |K_j| \log \left( e^{\frac{|\tilde{\mathbb{Z}}_j|}{|K_j|}} \right) - \log (1 - e^{-1}) \right\},$$

where we use the convention $0 \times \log(e^{\frac{|\tilde{\mathbb{Z}}_j|}{0}}) = 0$. It follows from Proposition 2.5 of [Mas07] that

$$\sum_{\mathbf{K} \in \tilde{\mathcal{K}}} e^{-\Delta_{\mathbf{K}}} \le 1.$$

We apply Proposition 8 conditionally to the independent sample $X'_1, \dots, X'_n$ and take the expectation of the result. By cleaning it a little, we get

$$\mathbb{E}[h^2(f, \hat{f})] \\ \le c_1 \mathbb{E} \left[ \inf_{\mathbf{K} \in \tilde{\mathcal{K}}} \left\{ d_2^2(\sqrt{f}, V_{\mathbf{K}}) + \frac{1}{n} \sum_{j=-1}^{\tilde{J}} |K_j| \log_+(|\tilde{\mathbb{Z}}_j|/|K_j|) + \frac{\tilde{J}+1}{n} \right\} \right],$$
**Theorem 3.2.** For all $p \in (0, +\infty]$, $\alpha \in (\max(1/p - 1/2, 1), \tau)$, $\theta \in (0, p/2] \cap (0, 1)$, $R > 0$, $M \ge 1$,

$$ \mathcal{R}(\mathcal{W}\mathcal{S}_{p,\theta}^{\alpha}(R, M)) \le c [R^{\beta_1} M^{\beta_2} n^{-\gamma} + v_n], \quad (3.4) $$

where c only depends on $p, \alpha, \theta$ and the wavelet basis. The term $v_n$ only depends on $p, \alpha, \theta, M, R, n$, and tends to 0 faster than $n^{-\gamma}$.

In this inequality, $v_n$ is smaller than $R^{\beta_1} M^{\beta_2} n^{-\gamma}$ when $n \ge n_0$ for some $n_0$ only depending on $p, \alpha, \theta, M, R$. It does, however, appear in (3.4) as the result is non-asymptotic. Its expression is not displayed here as it is a little cumbersome. It can be found in the proof in the theorem, see (4.21) and (4.27).

In (3.3), $t$ is between 0 and 1. The smaller $\theta$ is, the larger $t$ is, and the closer the rate is to the standard estimation rate $n^{-2\alpha/(2\alpha+1)}$ of a compactly supported density. However, and this is a major improvement on the previous section, the exponent $\gamma$ gets closer to $2/3$ when $\theta$ becomes very close to 1. Without the additional shape constraint, the rate became arbitrarily slow.

We can check that

$$ \gamma > \max\{2\alpha(1-\theta)/(2\alpha+1-2\theta/p), 2/3\}. $$

We recall that the first term in the maximum refers to the exponent we have when we estimate a fat tailed density $f$ whose square root is $\alpha$-smooth. The second is the usual exponent corresponding to the estimation of a unimodal density. Here, $\gamma$ is larger than these two exponents. Thereby, associating a smoothness assumption with a shape constraint may lead to faster rates of convergence than those achievable under these assumptions taken separately.

This phenomenon occurs even with a very mild smoothness assumption: ours does not even guarantee the continuity of $f$ when $p \in (1/\tau, 1)$ and $\alpha \in (\max(1/p - 1/2, 1), 1/p]$. Consider indeed two sequences $(a_k)_{k \ge 1}$ and $(b_k)_{k \ge 1}$ of non-negative numbers. The first sequence $(a_k)_k$ is assumed to be non-decreasing, and the second $(b_k)_k$ is non-increasing. We also suppose:

$$ \sum_{k=1}^{\infty} a_k (k+1)^{-1} + \sum_{k=1}^{\infty} b_k = 1/2 \quad (3.5) $$

$$ \sum_{k=2}^{\infty} b_k^{\theta} \le M \quad (3.6) $$

$$ \sum_{k=1}^{\infty} a_k^{p/2} (k(k+1))^{\alpha p - 1} + \sum_{k=1}^{\infty} b_k^{p/2} \le R^p. \quad (3.7) $$

We then define the function $f$ for $x \ge 0$ by

$$ f(x) = \sum_{k=1}^{\infty} a_k \mathbb{1}_{[1/(k+1), 1/k)}(x) + \sum_{k=1}^{\infty} b_k \mathbb{1}_{[k-1, k)}(x), $$

and extend it to an even function on $\mathbb{R}$. We may check that $f$ is unimodal. Equality (3.5) ensures that $f$ is a density, (3.6) gives an upper-bound on the $L^\theta$
where $c_1$ is universal, where $\log_+(x) = \log(e+x)$, and where $0 \times \log_+(|\tilde{Z}_j|/0) = 0$. To simplify the notations, we set in the sequel

$$ \beta_{j,k}^{*} = \begin{cases} \beta_{j,k}(\sqrt{f}) & \text{if } j \ge 0 \\ \alpha_{0,k}(\sqrt{f}) & \text{if } j = -1. \end{cases} $$

We deduce from the above inequality, and from (1) with $J_0 = 0$,

$$ \begin{aligned} \mathbb{E}[h^2(f, \hat{f})] &\le c_2 \left\{ \mathbb{E} \left[ \sum_{j=-1}^{\tilde{J}} \inf_{K_j \subset \tilde{Z}_j} \left\{ \sum_{k \in \mathbb{Z} \setminus K_j} (\beta_{j,k}^*)^2 + \frac{|K_j| \log_+(|\tilde{Z}_j|/|K_j|)}{n} \right\} \right] \right. \\ &\qquad \left. + \frac{\mathbb{E}[\tilde{J}]+1}{n} + \mathbb{E} \left[ \sum_{j=\tilde{J}+1}^{\infty} \sum_{k \in \mathbb{Z}} (\beta_{j,k}^*)^2 \right] \right\} \\ &\le c_2 [A + R_1 + R_2 + T], \end{aligned} $$

where

$$ \begin{aligned} A &= \frac{\mathbb{E}[\tilde{J}] + 1}{n}, \\ R_1 &= \frac{\mathbb{E}[|\tilde{Z}_{-1}|]}{n}, \\ R_2 &= \sum_{j=0}^{\infty} \mathbb{E} \left[ \inf_{K_j \subset \tilde{Z}_j} \left\{ \sum_{k \in \tilde{Z}_j \setminus K_j} (\beta_{j,k}^*)^2 + \frac{|K_j| \log_+(|\tilde{Z}_j|/|K_j|)}{n} \right\} \right], \\ T &= \mathbb{E} \left[ \sum_{k \notin \tilde{Z}_{-1}} \alpha_{0,k}^2 + \sum_{j=0}^{\tilde{J}} \sum_{k \notin \tilde{Z}_j} (\beta_{j,k}^*)^2 + \sum_{j=\tilde{J}+1}^{\infty} \sum_{k \in \mathbb{Z}} (\beta_{j,k}^*)^2 \right]. \end{aligned} $$

This oracle inequality has the same flavour as that obtained by [Sar23] for the $L^1$ loss (see his inequality (14)). We can hence use some of its results to reduce the size of this proof. First, note that an upper-bound on $R_1$ is given by his Lemma 23: $R_1 \le c_3 Mn^{-(1-\theta)}$. For $T$, $A$ and $R_2$, we show:

**Lemma 1.** There exists $c_4 > 0$ only depending on $p, \alpha$ and the wavelet basis such that
$$ T \le c_4 \varepsilon_n. $$

**Lemma 2.** There exist $c_5, c_6 > 0$ only depending on $p, \alpha$ and the wavelet basis such that

$$ \begin{aligned} A &\le c_5 \frac{\log n + \log(1 + R)}{n} \\ &\le c_6 \left[ \varepsilon_n + \frac{\log n}{n} \right]. \end{aligned} $$

**Lemma 3.** There exists $c_7 > 0$ only depending on $p, \alpha$ and the wavelet basis such that
$$ R_2 \le c_7 \varepsilon_n. $$

It then remains to put all these bounds together to conclude. □
(quasi) norm of $f$. In particular, $f \in W\mathcal{T}_{\theta}(c_1M)$ for some $c_1$, see Proposition 3.1. Elementary maths based on (3.7) lead to $\sqrt{f} \in \mathfrak{B}_{p,\infty}^{\alpha}(c_2R)$ for some $c_2 > 0$ only depending on the wavelet basis, $p, \alpha$ when $p \in (1/\tau, 1)$ and $\alpha \in (\max(1/p-1/2, 1), 1/p]$. In conclusion, $f \in \mathcal{W}\mathcal{S}_{p,\theta}^{\alpha}(c_1R, c_2M)$. This function $f$ can admit an infinite number of discontinuities and not be bounded (and of course not be compactly supported).

Although Theorem 3.2 only establishes a minimax risk bound, the proof gives an estimator that achieves this rate adaptively, i.e., without a priori knowledge of $p, \alpha, \theta, R, M$.

We still need to verify that (3.4) is sharp. This is the aim of the following theorem.

**Theorem 3.3.** For all $p \in (0, +\infty]$, $\alpha \in (\max(1/p - 1/2, 1), \tau)$, $\theta \in (0, p/2) \cap (0, 1)$, there are $R_0, M_0$ such that for all $R \ge R_0$, $M \ge M_0$ and $n$ large enough,

$$ \mathcal{R}(\mathcal{W}\mathcal{S}_{p,\theta}^{\prime\alpha}(R, M)) \ge cR^{\beta_1}M^{\beta_2}n^{-\gamma}, $$

where $\mathcal{W}\mathcal{S}_{p,\theta}^{\prime\alpha}(R, M)$ is a subset of $\mathcal{W}\mathcal{S}_{p,\theta}^{\alpha}(R, M)$ and where $c$ is a positive term only depending on $\alpha, p, \theta$ and the wavelet basis. Moreover,

$$ \mathcal{W}\mathcal{S}_{p,\theta}^{\prime\alpha}(R, M) \subset \left\{ f \in \mathcal{W}, \sqrt{f} \in \mathfrak{B}_{p,\infty}^{\alpha}(R), \int_{\mathbb{R}} f^{\theta}(x) dx \le M \right\}. $$

All the above remains true when $\theta = p/2$ under the additional condition $M \le R^p$. The lower bound is also true when $\theta = 0$. In this case, the densities of $\mathcal{W}\mathcal{S}_{p,\theta}^{\prime\alpha}(R, M)$ are compactly supported in $[-M, M]$, $t = 1, \gamma = 2\alpha/(2\alpha + 1)$, $\beta_1 = 2/(1 + 2\alpha)$, $\beta_2 = (1 + 2\alpha - 2/p)/(1 + 2\alpha)$.

# 4. Proofs

## 4.1. Proof of Proposition 2.1

We only show that if $\sqrt{f}$ belongs to $\mathfrak{B}_{p,\infty}^{\alpha}(R)$, then $f \in \mathcal{T}_{p/2}(c_1R^p)$. The proof of the converse is straightforward (just apply Cauchy-Schwarz inequality). To simplify the notations, we omit the square root of $f$ in the wavelets coefficients.

We define

$$ F_{k,j_1,j_2} = \sum_{\substack{k_1 \in \mathbb{Z} \\ k_2 \in \mathbb{Z}}} |\beta_{j_1,k_1}| |\beta_{j_2,k_2}| I_{j,k,j_1,k_1,j_2,k_2}, $$

where

$$ I_{j,k,j_1,k_1,j_2,k_2} = \int_{2^{-j}(k-1/2)}^{2^{-j}(k+1/2)} |\bar{\psi}_{j_1,k_1} \bar{\psi}_{j_2,k_2}| . $$

Since $p < 2$, $\| \cdot \|_1 \le \| \cdot \|_{p/2}$, and hence

$$ (F_k(f))^{p/2} \le 2 \sum_{\substack{j_1 \ge -1 \\ j_2 \ge j_1}} (F_{k,j_1,j_2})^{p/2}. \quad (4.1) $$
Proof of Lemma 1. Define the number $\tilde{n}_{j,k}$ of $i \in \{1, \dots, n\}$ such that $X'_i \in I_{j,k}$. We have $\tilde{n}_{j,k} \le 1$ if $k \notin \tilde{\mathbb{Z}}_j$ or if $j \ge \tilde{J} + 1$. Hence,

$$T \le 2 \sum_{j=-1}^{\infty} \sum_{k \in \mathbb{Z}} (\beta_{j,k}^{*})^2 \mathbb{P}[\tilde{n}_{j,k} \le 1].$$

Set

$$f_{j,k} = \int f(x) 1_{I_{j,k}}(x) dx \\ \bar{\mathbb{Z}}_j = \{k \in \mathbb{Z}, f_{j,k} \ge 1/n\}.$$

We have,

$$T \le 2 \sum_{j=-1}^{\infty} \sum_{k \in \mathbb{Z}} (\beta_{j,k}^{*})^2 [(1 - f_{j,k})^n + n f_{j,k} (1 - f_{j,k})^{n-1}] \\ \le 4T_1 + 4T_2,$$

where

$$T_1 = \sum_{j=-1}^{\infty} \sum_{k \notin \mathbb{Z}_j} (\beta_{j,k}^*)^2 \\ T_2 = n \sum_{j=-1}^{\infty} \sum_{k \in \mathbb{Z}_j} (\beta_{j,k}^*)^2 f_{j,k} (1 - f_{j,k})^{n-1}.$$

Define $b_{j,k}$ such that $(\beta_{j,k}^*)^2 = 2^{-j/2}|b_{j,k}|$. For all $j \ge 0$,

$$\|b_{j,} \|_{p/2} \le R^2 2^{-j(2\alpha+1/2-1/(p/2))}$$

if $\sqrt{\tilde{J}} \in \mathcal{B}_{p,\infty}^{\alpha}(R)$. This inequality also holds true for the weak $\ell^{p/2}$ (quasi) norm if $\sqrt{\tilde{f}}$ belongs to the weak Besov class. We conclude by using Lemma 21 of [Sar23] with his $\beta_{j,k}$ replaced by $b_{j,k}$, $p$ by $p/2$, $\alpha$ by $2\alpha$ and $R$ by $R^2$. $\square$

Proof of Lemma 2. Let $\xi > 0$, $q > 1$ and suppose that the $L^q$ norm of $f$ is finite: $\|f\|_q < \infty$. Lemma 17 of [Sar23] ensures that $\tilde{J} \le c_1[1 + \log(1 + \xi)]$, with probability $1 - n^2 \|f\|_q/\xi$. In this inequality, $c_1$ is a term only depending on $q$ and $\psi$. We deduce,

$$\begin{aligned} \mathbb{E}[\tilde{J}] &\le c_2 \left[ 1 + \int_0^\infty \mathbb{P} \left( \tilde{J} \ge c_1 [1 + \log(1 + \xi)] \right) (1 + \xi)^{-1} d\xi \right] \\ &\le c_3 \left[ 1 + c_1 n^2 \|f\|_q \int_{\max\{n^2 \|f\|_q, 1\}}^\infty \xi^{-1} (1 + \xi)^{-1} d\xi \right. \\ &\qquad \left. + c_1 \int_0^{\max\{n^2 \|f\|_q, 1\}} (1 + \xi)^{-1} d\xi \right] \\ &\le c_4 [1 + \log(1 + n^2 \|f\|_q)]. \end{aligned}$$

It then remains to bound $\|f\|_q$ for some $q > 1$.
We consider a real number $\bar{L} > 0$ large enough to ensure that $\text{supp } \bar{\psi}_{j',k'} \subset [2^{-j'}(-\bar{L} + k'), 2^{-j'}(\bar{L} + k')]$, where $j'_{+} = \max\{j, 0\}$, and set

$$K_{j,j',k'} = [-\bar{L} + 2^{j-j'}(k' - \bar{L}), \bar{L} + 2^{j-j'}(k' + \bar{L})].$$

Note that $K_{j,j',k}$ contains at most

$$|K_{j,j',k'}| \le c_1 [1 + 2^{j-j'}] \quad (4.2)$$

integers. Moreover, $I_{j,k,j_1,k_1,j_2,k_2} = 0$ if $k_1 \notin K_{j_1,j_2,k_2}$ or if $k_2 \notin K_{j_2,j_1,k_1}$. If $\bar{L}$ is large enough, the integral is also zero if $k \notin K_{j,j_1,k_1}$ or if $k \notin K_{j,j_2,k_2}$. The same thing is true if $k_1 \notin K_{j_1,j,k}$ or $k_2 \notin K_{j_2,j,k}$. In any case, we have $I_{j,k,j_1,k_1,j_2,k_2} \le c_2 r_{j_1,j_2}$ where

$$r_{j_1,j_2} = 2^{\min\{j_1/2+j_2/2-j, -(j_2-j_1)/2\}}.$$

We deduce from Cauchy-Schwarz inequality,

$$F_{k,j_1,j_2} \le c_2 r_{j_1,j_2} \left( \sum_{k_1 \in \mathbb{Z}} \beta_{j_1,k_1}^2 \mathbb{1}_{k \in K_{j,j_1,k_1}} \sum_{k_2 \in \mathbb{Z}} \mathbb{1}_{k_2 \in K_{j_2,j_1,k_1} \cap K_{j_2,j_2}} \right)^{1/2} \\ \times \left( \sum_{k_2 \in \mathbb{Z}} \beta_{j_2,k_2}^2 \mathbb{1}_{k \in K_{j,j_2,k_2}} \sum_{k_1 \in \mathbb{Z}} \mathbb{1}_{k_1 \in K_{j_1,j_2,k_2} \cap K_{j_1,j_1}} \right)^{1/2}.$$

By using the inequality $\| \cdot \|_1 \le \| \cdot \|_{p/2}$ again,

$$(F_{k,j_1,j_2})^{p/2} \\ \le c_3 r_{j_1,j_2}^{p/2} \left( \sum_{k_1 \in \mathbb{Z}} \beta_{j_1,k_1}^p \mathbb{1}_{k \in K_{j,j_1,k_1}} \left( \sum_{k_2 \in \mathbb{Z}} \mathbb{1}_{k_2 \in K_{j_2,j_1,k_1} \cap K_{j_2,j_2}} \right)^{p/2} \right)^{1/2} \\ \times \left( \sum_{k_2 \in \mathbb{Z}} \beta_{j_2,k_2}^p \mathbb{1}_{k \in K_{j,j_2,k_2}} \left( \sum_{k_1 \in \mathbb{Z}} \mathbb{1}_{k_1 \in K_{j_1,j_2,k_2} \cap K_{j_1,j_1}} \right)^{p/2} \right)^{1/2}.$$

A new application of Cauchy-Schwarz leads to

$$\sum_{k \in \mathbb{Z}} (F_{k,j_1,j_2})^{p/2} \\ \le c_3 r_{j_1,j_2}^{p/2} \left( \sum_{k \in \mathbb{Z}} \sum_{k_1 \in \mathbb{Z}} \beta_{j_1,k_1}^p \mathbb{1}_{k \in K_{j,j_1,k_1}} \left( \sum_{k_2 \in \mathbb{Z}} \mathbb{1}_{k_2 \in K_{j_2,j_1,k_1} \cap K_{j_2,j_2}} \right)^{p/2} \right)^{1/2} \\ \times \left( \sum_{k \in \mathbb{Z}} \sum_{k_2 \in \mathbb{Z}} \beta_{j_2,k_2}^p \mathbb{1}_{k \in K_{j,j_2,k_2}} \left( \sum_{k_1 \in \mathbb{Z}} \mathbb{1}_{k_1 \in K_{j_1,j_2,k_2} \cap K_{j_1,j_1}} \right)^{p/2} \right)^{1/2}.$$
We consider $q \in (\max\{1, p/2\}, p(\alpha + 1/2))$ if $p$ is finite and $q > 1$ if $p$ is infinite. When $\sum_{j=-1}^{\infty} 2^{(j/2)(1-1/q)} ||\beta_{j,\cdot}^*||_{2q}$ is finite, $\sqrt{f} \in L^{2q}(\mathbb{R})$, and

$$ (13) \qquad \|f\|_q^{1/2} = \|\sqrt{f}\|_{2q} \\ \le c_5 \sum_{j=-1}^{\infty} 2^{(j/2)(1-1/q)} \|\beta_{j,\cdot}^*\|_{2q}. $$

Note that $|\beta_{j,k}^*| \le c_6 \sqrt{f_{j,k}} \le c_6$ as $f$ is a density and hence

$$ \|\beta_{j, \cdot}^*\|_{2q}^{2q} \le c_7 \sum_{k \in \mathbb{Z}} f_{j,k} \le c_8. $$

We moreover have when $p$ is finite and $j \ge 0$,

$$ \|\beta_{j, \cdot}^*\|_{2q}^{2q} \le c_9 \|\beta_{j, \cdot}^*\|_{p, \infty}^p \le c_9 R^p 2^{-jp(\alpha+1/2-1/p)}. $$

When $p = \infty$ and $j \ge 0$, we rather have,

$$ \|\beta_{j, \cdot}^*\|_{2q}^{2q} \le c_{10} \left( \sum_{k \in \mathbb{Z}} f_{j,k} \right) \|\beta_{j, \cdot}^*\|_{\infty}^{2(q-1)} \\ \le c_{11} R^{2(q-1)} 2^{-j(q-1)(2\alpha+1)}. $$

In both cases,

$$ (14) \qquad \sum_{j=0}^{\infty} 2^{(j/2)(1-1/q)} \|\beta_{j, \cdot}^*\|_{2q} < c_{12} R^r, $$

where $r = p/(2q)$ if $p$ is finite, and $r = 1 - 1/q$ if $p = \infty$. We conclude by (13). $\square$

Proof of Lemma 3 when $p \ge 2$. By choosing $K_j = \emptyset$ or $K_j = \tilde{Z}_j$,

$$ R_2 \le \sum_{j=0}^{\infty} \min \left\{ \mathbb{E} \left[ \left[ \sum_{k \in \tilde{Z}_j} (\beta_{j,k}^*)^2 \right], \frac{\mathbb{E}[|\tilde{Z}_j|]}{n} \right] \right\}. $$

It follows from Lemma 23 of [Sar23] that

$$ (15) \qquad \mathbb{E}[|\tilde{Z}_j|] \le c_1 M n^{\theta} 2^{j(1-\theta)}. $$

By using a suitable version of Hölder's inequality – see [CVNRF15] – we get

$$ \sum_{k \in \tilde{Z}_j} (\beta_{j,k}^*)^2 \le c_2 \|\beta_{j, \cdot}^*\|_{p, \infty}^2 |\tilde{Z}_j|^{1-2/p}. $$

When $p \ne 2$, we deduce from $\sqrt{f} \in W \mathcal{B}_{p, \infty}^{\alpha}(R)$,

$$ \sum_{k \in \tilde{Z}_j} (\beta_{j,k}^*)^2 \le c_2 R^2 2^{-2j(\alpha+1/2-1/p)} |\tilde{Z}_j|^{1-2/p}. $$
$$ \le c_3 r_{j_1, j_2}^{p/2} R^p 2^{-(j_1+j_2)(p/2)(\alpha+1/2-1/p)} \left( \sup_{k,k_1 \in \mathbb{Z}} |K_{j,j_1,k_1}| |K_{j_2,j_1,k_1} \cap K_{j_2,j,k}|^{p/2} \right)^{1/2} \\ \times \left( \sup_{k,k_2 \in \mathbb{Z}} |K_{j,j_2,k_2}| |K_{j_1,j_2,k_2} \cap K_{j_1,j,k}|^{p/2} \right)^{1/2} . $$

We now use (4.2) to get if $j_2 \ge j$ and $j_1 \ge j$

$$ \sum_{k \in \mathbb{Z}} (F_{k,j_1,j_2})^{p/2} \le c_4 R^p 2^{-(p/2)(j_1+j_2)(\alpha-1/p+1/2)}. $$

If $j_2 \ge j$ and $j_1 < j$,

$$ \sum_{k \in \mathbb{Z}} (F_{k,j_1,j_2})^{p/2} \le c_4 R^p 2^{j(1-p/2)/2} 2^{-(p/2)j_2(\alpha-1/p+1/2)} 2^{-\alpha(p/2)j_1}. $$

If $j_2 \le j$, and $j_1 \le j$,

$$ \sum_{k \in \mathbb{Z}} (F_{k,j_1,j_2})^{p/2} \le c_4 R^p 2^{j(1-p/2)} 2^{-(p/2)j_1\alpha} 2^{-(p/2)j_2\alpha}. $$

We conclude thanks to (4.1).

<figure><img src="image_3.png" /></figure>

## 4.2. Proof of Theorem 2.2

Our proof relies on the result below that is due to [Bir06a] (see his Theorem 6 and Proposition 8).

**Proposition 4.1.** Let $(V_m)_{m \in \mathcal{M}}$ be an at most countable collection of linear spaces of $L^2(\mathbb{R})$ with finite dimension. Let $(\Delta_m)_{m \in \mathcal{M}}$ be a family of non-negative weights such that

$$ \sum_{m \in \mathcal{M}} e^{-\Delta_m} \le 1. $$

Then, there is a density estimator $\hat{f}$ such that

$$ \mathbb{E}[h^2(f, \hat{f})] \le c \inf_{m \in \mathcal{M}} \left\{ d_2^2(\sqrt{f}, V_m) + \frac{\dim V_m + \Delta_m}{n} \right\}. $$

In the above inequality, $c$ is a universal constant.

Without loss of generality, we may assume in the sequel that we have another independent sample $X'_1, \dots, X'_n$ of $X$. We set for $j \ge 0$ and $k \in \mathbb{Z}$,

$$ I_{j,k} = \{x \in \mathbb{R}, \psi_{j,k}(x) \ne 0\}. $$

When $j = -1$, we rather set

$$ I_{-1,k} = \{x \in \mathbb{R}, \phi_{0,k}(x) \ne 0\}. $$
This last inequality is also true when $p = 2$ and $\sqrt{f} \in \mathcal{B}_{p,\infty}^{\alpha}(R)$. We deduce from (15) and Jensen's inequality,

$$R_2 \le c_3 \sum_{j=0}^{\infty} \min \left\{ Mn^{-(1-\theta)} 2^{j(1-\theta)}, R^2 M^{1-2/p} n^{\theta(1-2/p)} 2^{-j(2\alpha+\theta(1-2/p))} \right\}.$$

It remains to compute the right-hand side of this inequality to prove the result. $\square$

*Proof of Lemma 3 when $p < 2$. We set for $j \ge 0$,*

$$\tilde{K}_j = \{k \in \tilde{\mathbb{Z}}_j, (\beta_{j,k}^*)^2 \ge 1/n\}$$

and observe as $\sqrt{f} \in W\mathcal{B}_{p,\infty}^{\alpha}(R)$,

$$|\tilde{K}_j| \le n^{p/2} R^p 2^{-jp(\alpha+1/2-1/p)}.$$

By using a classical inequality in weak spaces, see (35) of [Sar23],

$$\sum_{k \in \tilde{\mathbb{Z}}_j \setminus \tilde{K}_j} (\beta_{j,k}^*)^2 \le c_1 n^{-(1-p/2)} R^p 2^{-jp(\alpha+1/2-1/p)}.$$

Therefore,

$$R_2 \le c_2 \sum_{j=0}^{\infty} \min \left\{ \frac{\mathbb{E}[|\tilde{\mathbb{Z}}_j|]}{n}, \mathbb{E} \left[ \sum_{k \in \tilde{\mathbb{Z}}_j \setminus \tilde{K}_j} (\beta_{j,k}^*)^2 + \frac{|\tilde{K}_j| \log_+(|\tilde{\mathbb{Z}}_j|/|\tilde{K}_j|)}{n} \right] \right\}.$$

By doing as in the preceding proof for the first term, and by using Jensen's inequality,

$$R_2 \le c_3 \sum_{j=0}^{\infty} \min \left\{ Mn^{-(1-\theta)} 2^{j(1-\theta)}, n^{-(1-p/2)} R^p 2^{-jp(\alpha+1/2-1/p)} \times \log_+(MR^{-p}n^{\theta-p/2} 2^{jp(\alpha+1/2-\theta/p)}) \right\}.$$

Elementary computations allows to bound the right-hand side of this inequality from above (see Lemma 30 of [Sar23]). $\square$

**4.3. Proof of Theorem 3.** Let $\ell \ge 1$ be the smallest integer such that $(-2^\ell, 2^\ell)$ contains the supports of $\bar{\phi}$ and $\bar{\psi}$. We consider two integers $j \ge -1$, $j_0 \ge 0$ such that $2^{j_0+j-\ell} \ge 12$. We define $\underline{k} \ge 1$ as the smallest integer satisfying $1 + 2\underline{k} \ge 2^{j_0+j-\ell-1}$, and $\bar{k} \ge 1$ as the largest integer satisfying $4\bar{k} + 2\bar{\underline{k}} + 1 \le 2^{j_0+j-\ell}$. We endow $\mathcal{D} = \{0, 1\}^{\bar{k}}$ with the Hamming distance $\Delta$ defined for all $\delta, \delta' \in \mathcal{D}$ by

$$\Delta(\delta, \delta') = \sum_{k=1}^{\bar{k}} |\delta_k - \delta'_k|.$$

We consider $b > 0$ and set for $\delta \in \mathcal{D}$,

$$h_{\delta} = b \left[ \sum_{k=1}^{\bar{k}} \delta_k \bar{\psi}_{j, 2^{\ell+1}(k+\underline{k})} + \sum_{k=1}^{\bar{k}} (1 - \delta_k) \bar{\psi}_{j, 2^{\ell+1}(k+\underline{k}+\bar{k})} \right].$$
We then consider the (random) set

$$
\tilde{\mathbb{Z}}_j = \{k \in \mathbb{Z}, \exists i \in \{1, \dots, n\}, X'_i \in I_{j,k}\}.
$$

We now order the sample $X'_{(1)} < X'_{(2)} < \cdots < X'_{(n)}$ and define the smallest
integer $\tilde{J} \ge 0$ satisfying

$$
\min_{1 \le i \le n-1} (X'_{(i+1)} - X'_{(i)}) > 2^{1-\tilde{J}} L_{\psi}.
$$

In this inequality, $L_\psi \ge 1$ stands for a real number such that $\supp \psi \subset [-L_\psi, L_\psi]$.

Let $\tilde{\mathcal{K}}$ be the collection of all sets of the form $\mathbf{K} = (K_j)_{j \in \{-1, \dots, \tilde{J}\}}$ where $K_j$
denotes a finite subset of $\tilde{\mathbb{Z}}_j$. We define for all such $\mathbf{K}$ the linear space

$$
V_{\mathbf{K}} = \left\{ \sum_{k \in K_{-1}} \gamma_{-1,k} \bar{\phi}_{0,k} + \sum_{j=0}^{\tilde{J}} \sum_{k \in K_j} \gamma_{j,k} \bar{\psi}_{j,k}, \forall j \ge -1, k \in K_j, \gamma_{j,k} \in \mathbb{R} \right\}.
$$

The dimension of this linear space is not larger than

$$
\dim V_{\mathbf{K}} \leq \sum_{j=-1}^{\tilde{J}} |K_j|.
$$

For all $\mathbf{K} \in \tilde{\mathcal{K}}$, we set

$$
\Delta_{\mathbf{K}} = \sum_{j=-1}^{\tilde{J}} \left\{ |K_j| + |K_j| \log \left( \frac{e|\tilde{\mathbb{Z}}_j|}{|K_j|} \right) - \log(1-e^{-1}) \right\},
$$

where we use the convention $0 \times \log(e|\tilde{\mathbb{Z}}_j|/0) = 0$. It follows from Proposition 2.5 of [Mas07] that

$$
\sum_{\mathbf{K} \in \tilde{\mathcal{K}}} e^{-\Delta_{\mathbf{K}}} \le 1.
$$

We apply Proposition 4.1 conditionally to the independent sample $X'_1, \dots, X'_n$
and take the expectation of the result. By cleaning it a little, we get

$$
\mathbb{E}[h^2(f, \hat{f})] \\
\le c_1 \mathbb{E} \left[ \inf_{\mathbf{K} \in \tilde{\mathcal{K}}} \left\{ d_2^2(\sqrt{f}, V_{\mathbf{K}}) + \frac{1}{n} \sum_{j=-1}^{\tilde{J}} |K_j| \log_+ \left( \frac{|\tilde{\mathbb{Z}}_j|}{|K_j|} \right) + \frac{\tilde{J}+1}{n} \right\} \right],
$$

where $c_1$ is universal, where $\log_+(x) = \log(e+x)$, and where $0 \times \log_+(|\tilde{\mathbb{Z}}_j|/0) = 0$.
To simplify the notations, we set in the sequel

$$
\beta_{j,k}^{*} = \begin{cases} \beta_{j,k}(\sqrt{f}) & \text{if } j \ge 0 \\ \alpha_{0,k}(\sqrt{f}) & \text{if } j = -1. \end{cases}
$$
Let $g_0 \in \mathfrak{B}_{p,\infty}^\alpha(R_{g_0})$ be a compactly supported density on $[0, 2]$ satisfying $\inf_{x \in [1/2, 1]} g_0(x) \ge 1/4$ and $\|g_0\|_\infty \le 1$. We then consider

$$ \kappa = 4 \max \{2^{1/2} \|\bar{\phi}\|_\infty, \|\bar{\psi}\|_\infty\} $$

and set for $x \in \mathbb{R}$,

$$ g(x) = \kappa b 2^{j/2} g_0(2^{-j_0} x). $$

Let $\zeta$ be a density, compactly supported on $(-1, 0)$, bounded by 1, and such that $\sqrt{\zeta} \in \mathfrak{B}_{p,\infty}^\alpha(R/\max\{2^{1/p}, 2\})$. Such a density does exist (recall that $R$ is large enough in the proof). We put

$$ q = \int (g(x) + h_\delta(x))^2 dx, $$

and define for $x \in \mathbb{R}$,

$$ f_{\delta}(x) = (1-q)\zeta(x) + (g(x) + h_{\delta}(x))^2. $$

We now state:

**Lemma 4.** There are $a_1, a_2, a_3, a_4$ such that if

$$ b^2 2^{j_0 + j} \le a_1 $$

$$ b 2^{j/2} 2^{j_0(1/p - \alpha)} \le a_2 R $$

$$ b 2^{j_0/p} 2^{j(\alpha+1/2)} 1_{j \ge 0} \le a_3 R $$

$$ b^{2\theta} 2^{j\theta} 2^{j_0} \le a_4 M $$

then, $f_\delta$ is a density belonging to $T_\theta(M)$ such that $\sqrt{f_\delta} \in \mathfrak{B}_{p,\infty}^\alpha(R)$. If $b 2^{j/2} 2^{j_0/p} \le a_2 R$, $\sqrt{f_\delta} \in \mathfrak{B}_{p,\infty}^\alpha(R)$. For all $|x| \ge 1$,

$$ |x| f_{\delta}^{\theta}(x) \le a_5 M, $$

and for all $\delta, \delta' \in \mathcal{D}$,

$$ h^2(f_\delta, f_{\delta'}) = a_6 b^2 \Delta(\delta, \delta'). $$

The terms $a_1, a_2, a_3, a_4, a_5, a_6$ above are positive and only depend on $g_0, p, \theta$ and the wavelet basis.

The proof of this lemma is given after the present proof. We define

$$ \mathcal{S}_{p,\theta}^{\alpha}(R, M) = \{f_\delta, \delta \in \mathcal{D}\}. $$

It follows from Assouad's lemma – see [Bir06b] – that if $b^2 = 1/(2a_6n)$,

$$ \mathcal{R}(\mathcal{S}_{p,\theta}^{\alpha}(R, M)) \ge c_0 n^{-1} 2^{j_0+j}, $$

where $c_0$ only depends on the wavelet basis, $g_0, p, \theta$. It then remains to choose $j$ and $j_0$.

We first suppose either $\theta < p/2$ or $\theta = p/2$ and $R \ge M^{1/p}$. We then define $j \ge 0$ as the largest integer such that

$$ 2^{j(1+2\alpha-2\theta/p)} \le R^2 M^{-2/p} n^{1-2\theta/p}. $$

We then consider $c_1$ small enough and the largest integer $j_0 \ge 0$ such that

$$ 2^{j_0} \le c_1 M n^{\theta} 2^{-j\theta}. $$

We may check that the conditions of the lemma are satisfied.
We deduce from the above inequality, and from (2.1) with $J_0 = 0$,

$$ \mathbb{E}[h^2(f, \hat{f})] \le c_2 \left\{ \mathbb{E} \left[ \sum_{j=-1}^{\tilde{J}} \inf_{K_j \subset \tilde{Z}_j} \left\{ \sum_{k \in \tilde{Z} \setminus K_j} (\beta_{j,k}^*)^2 + \frac{|K_j| \log_+(|\tilde{Z}_j|/|K_j|)}{n} \right\} \right] \right. \\ \left. + \frac{\mathbb{E}[\tilde{J}]+1}{n} + \mathbb{E} \left[ \sum_{j=\tilde{J}+1}^{\infty} \sum_{k \in \tilde{Z}} (\beta_{j,k}^*)^2 \right] \right\} \\ \le c_2 [A + R_1 + R_2 + T], $$

where

$$ A = \frac{\mathbb{E}[\tilde{J}] + 1}{n}, \\ R_1 = \frac{\mathbb{E}[|\tilde{Z}_{-1}|]}{n}, \\ R_2 = \sum_{j=0}^{\infty} \mathbb{E} \left[ \inf_{K_j \subset \tilde{Z}_j} \left\{ \sum_{k \in \tilde{Z}_j \setminus K_j} (\beta_{j,k}^*)^2 + \frac{|K_j| \log_+(|\tilde{Z}_j|/|K_j|)}{n} \right\} \right], \\ T = \mathbb{E} \left[ \sum_{k \notin \tilde{Z}_{-1}} \alpha_{0,k}^2 + \sum_{j=0}^{\tilde{J}} \sum_{k \notin \tilde{Z}_j} (\beta_{j,k}^*)^2 + \sum_{j=\tilde{J}+1}^{\infty} \sum_{k \in \tilde{Z}} (\beta_{j,k}^*)^2 \right]. $$

This oracle inequality has the same flavour as that obtained by [Sar23] for the $L^1$ loss (see his inequality (14)). We can hence use some of its results to reduce the size of this proof. First, note that an upper-bound on $R_1$ is given by his Lemma 23: $R_1 \le c_3 Mn^{-(1-\theta)}$. For $T$, $A$ and $R_2$, we show:

**Lemma 1.** There exists $c_4 > 0$ only depending on $p, \alpha$ and the wavelet basis such that

$$ T \le c_4 \varepsilon_n. $$

**Lemma 2.** There exist $c_5, c_6 > 0$ only depending on $p, \alpha$ and the wavelet basis such that

$$ A \le c_5 \frac{\log n + \log(1 + R)}{n} \\ \le c_6 \left[ \varepsilon_n + \frac{\log n}{n} \right]. $$

**Lemma 3.** There exists $c_7 > 0$ only depending on $p, \alpha$ and the wavelet basis such that

$$ R_2 \le c_7 \varepsilon_n. $$

It then remains to put all these bounds together to conclude. $\square$
We now suppose $\theta = p/2$ and $R < M^{1/p}$. We set $j = -1$, consider $c_2$ small enough and define $j_0 \ge 0$ as the largest integer such that $2^{j_0} \le c_2 M n^\theta$. All the conditions of the lemma are met, hence the result.

Remark. We can see from this proof why the minimax risk does not tend to 0 when the tail dominance condition is not fulfilled and $p \ge 2$. Formally, this means choosing $\theta = 1$ and $M = 1$. The proof of Lemma 4 with $j = -1$ ensures that $f_\delta$ is a density such that $\sqrt{f_\delta} \in \mathfrak{B}_{p,\infty}^\alpha(R)$ if $b^2 2^{j_0+j} \le a_1$ and $b 2^{j/2} 2^{j_0/p} \le a_2 R$. We then choose $b^2$ as above and $2^{j_0} \le c_2 n$ for some $c_2$. $\square$

*Proof of Lemma 4.* First, observe that

$$q \le 2 \left[ \int g^2(x) \, dx + \int h_\delta^2(x) \, dx \right]$$

is not larger than 1 if we choose $a_1$ appropriately. This entails that $f_\delta$ is a density.

We have $\text{supp } h_\delta \subset [2^{\ell-j}(2\underline{k} + 1), 2^{\ell-j}(4\bar{k} + 2\underline{k} + 1)] \subset [2^{j_0-1}, 2^{j_0}]$, $\text{supp } g \subset [0, 2^{j_0+1}]$ and $g(x) \ge \|h_\delta\|_\infty$ for all $x \in [2^{j_0-1}, 2^{j_0}]$. We deduce $g + h_\delta \ge 0$ and

$$\sqrt{f_\delta(x)} = \sqrt{(1-q)\zeta(x)} + g(x) + h_\delta(x).$$

We also have

$$h_\delta \in \mathfrak{B}_{p,\infty}^\alpha \left( b\bar{k}^{1/p} 2^{j(\alpha+1/2-1/p)} 1_{j \ge 0} \right) \cap \mathfrak{B}_{p,\infty}^\alpha \left( b\bar{k}^{1/p} 2^{j(\alpha+1/2-1/p)} \right),$$

$$g \in \mathfrak{B}_{p,\infty}^\alpha \left( c_1 b 2^{j/2} 2^{j_0(1/p-\alpha)} \right) \cap \mathfrak{B}_{p,\infty}^\alpha \left( c_1 b 2^{j/2} 2^{j_0/p} \right),$$

where $c_1$ only depends on $g_0$ and the wavelet basis. Therefore, we may consider $a_2$ and $a_3$ so that $\sqrt{f_\delta} \in \mathfrak{B}_{p,\infty}^\alpha(R)$. If the supplementary conditions are fulfilled, $\sqrt{f_\delta} \in \mathfrak{B}_{p,\infty}^\alpha(R)$.

Note that $\zeta$ belongs to $\mathcal{T}_\theta(M/2)$ if $M$ is large enough, which is assumed throughout the proof of Theorem 3. Besides,

$$h_\delta^2 \in \mathcal{T}_\theta(\|h_\delta\|_\infty^{2\theta}(2^{j_0+1} + 1)),$$

see Lemma 2.1 of [CL20]. A similar result holds true for $g^2$ and hence $f_\delta \in \mathcal{T}_\theta(M)$ if $a_4$ is small enough.

As to the Hellinger distance, we have

$$h^2(f_\delta, f_{\delta'}) = \frac{1}{2} \int (h_\delta(x) - h_{\delta'}(x))^2 \, dx,$$

and we conclude using that the supports of $\bar{\psi}_{j,2^{\ell+1}k}$ are disjoint.

Finally, for all $|x| \ge 1$,

$$f_\delta(x) \le 2 (\|g\|_\infty^2 + \|h_\delta\|_\infty^2) \\ \le c_2 b^2 2^j,$$

where $c_2$ only depends on $g_0$ and the wavelet basis. Since $f_\delta$ is compactly supported on $[-1, 2^{j_0+1}]$, we get

$$|x| f_\delta^\theta(x) \le 2^{j_0+1} [c_2 b^2 2^j]^\theta \\ \le 2 a_4 c_2^\theta M.$$

$\square$
Proof of Lemma 1. Define the number $\tilde{n}_{j,k}$ of $i \in \{1, \dots, n\}$ such that $X'_i \in I_{j,k}$. We have $\tilde{n}_{j,k} \le 1$ if $k \notin \tilde{Z}_j$ or if $j \ge \tilde{J} + 1$. Hence,

$$T \le 2 \sum_{j=-1}^{\infty} \sum_{k \in \mathbb{Z}} (\beta_{j,k}^{*})^2 \mathbb{P}[\tilde{n}_{j,k} \le 1].$$

Set

$$ 
\begin{align} 
f_{j,k} &= \int f(x) \mathbb{1}_{I_{j,k}}(x) \, dx \tag{4.3} \\ 
\bar{Z}_j &= \{k \in \mathbb{Z}, f_{j,k} \ge 1/n\}. \nonumber 
\end{align} 
$$

We have,

$$ 
\begin{align*} 
T \le 2 \sum_{j=-1}^{\infty} \sum_{k \in \mathbb{Z}} (\beta_{j,k}^{*})^2 & [ (1-f_{j,k})^n + n f_{j,k} (1-f_{j,k})^{n-1} ] \\ 
& \le 4T_1 + 4T_2, 
\end{align*} 
$$

where

$$ 
\begin{align*} 
T_1 &= \sum_{j=-1}^{\infty} \sum_{k \notin \bar{Z}_j} (\beta_{j,k}^{*})^2 \\ 
T_2 &= n \sum_{j=-1}^{\infty} \sum_{k \in \bar{Z}_j} (\beta_{j,k}^{*})^2 f_{j,k} (1-f_{j,k})^{n-1}. 
\end{align*} 
$$

Define $b_{j,k}$ such that $(\beta_{j,k}^{*})^2 = 2^{-j/2}|b_{j,k}|$. For all $j \ge 0$,

$$ \|b_{j,k}\|_{p/2} \le R^2 2^{-j(2\alpha+1/2-1/(p/2))} $$

if $\sqrt{f} \in \mathcal{B}_{p,\infty}^{\alpha}(R)$. This inequality also holds true for the weak $\ell^{p/2}$ (quasi) norm if $\sqrt{f}$ belongs to the weak Besov class. We conclude by using Lemma 21 of [Sar23] with his $\beta_{j,k}$ replaced by $b_{j,k}$, $p$ by $p/2$, $\alpha$ by $2\alpha$ and $R$ by $R^2$. $\square$

Proof of Lemma 2. Let $\xi > 0$, $q > 1$ and suppose that the $L^q$ norm of $f$ is finite: $\|f\|_q < \infty$. Lemma 17 of [Sar23] ensures that $\tilde{J} \le c_1 [1 + \log(1 + \xi)]$, with probability $1 - n^2 \|f\|_q/\xi$. In this inequality, $c_1$ is a term only depending on $q$ and $\psi$. We deduce,

$$ 
\begin{align*} 
\mathbb{E}[\tilde{J}] &\le c_2 \left[ 1 + \int_0^\infty \mathbb{P} \left( \tilde{J} \ge c_1 [1 + \log(1 + \xi)] \right) (1 + \xi)^{-1} d\xi \right] \\ 
&\le c_3 \left[ 1 + c_1 n^2 \|f\|_q \int_{\max\{n^2 \|f\|_q, 1\}}^\infty \xi^{-1} (1 + \xi)^{-1} d\xi \right. \\ 
&\qquad \left. + c_1 \int_0^{\max\{n^2 \|f\|_q, 1\}} (1 + \xi)^{-1} d\xi \right] 
\end{align*} 
$$
**4.4.** Sketch of the proof of Proposition 4. Let $\varphi_\delta$ be the map defined in the proof of Proposition 4 of [Sar23] with his $\alpha$ replaced by $2\alpha$ and his $p$ replaced by $p/2$. In other words,

$$ \varphi_\delta(x) = \frac{1}{D} \sum_{j=j_0}^{j_1} 2^j \sum_{k \in K_j} \delta_{j,k} 1_{I_{j,k}}(x), $$

where the $I_{j,k} \subset [0, 1/2)$ are disjoint intervals of size $2^{-j}$, where $\delta_{j,k} \in \{0, 1\}$, where $|K_j| = n^{p/2} + 1$, where $j_0$ is the smallest integer such that $2^{j_0} \ge 4(n^{p/2} + 1)$, where $j_1 \ge j_0$ is to be specified, and where $D = (j_1 - j_0 + 1)(n^{p/2} + 1)$. We define for $x \in \mathbb{R}$,

$$ f_{\delta}(x) = \varphi_{\delta}(x) + \varphi_{1-\delta}(x - 1/2). $$

Note that $f_\delta$ is a compactly supported density on $[0, 1]$ such that $\sqrt{f_\delta(x)} = \sqrt{\varphi_\delta(x)} + \sqrt{\varphi_{1-\delta}(x - 1/2)}$ and

$$ \sqrt{\varphi_{\delta}(x)} = \frac{1}{\sqrt{D}} \sum_{j=j_0}^{j_1} 2^{j/2} \sum_{k \in K_j} \delta_{j,k} 1_{I_{j,k}}(x). $$

The lemma below is proved as Lemma 36 of [Sar23] (just replace the $\ell^{1-\ell^p}$ inequality by Hölder's inequality in the first line of his proof when $p \in (1, 2)$).

**Lemma 5.** For all $\varepsilon > 0$, $j_1$ large enough, and $\delta = (\delta_{j,k})_{j,k}$, $\sqrt{\varphi_\delta}$ belongs to $\mathfrak{B}_{p,\infty}^\alpha(\varepsilon)$.

We deduce that $\sqrt{f_\delta}$ lies in $\mathfrak{B}_{p,\infty}^\alpha(R)$ if $j_1$ is large enough. Now, for all $\delta, \delta'$ of the form $\delta = (\delta_{j,k})_{j,k}$, $\delta' = (\delta'_{j,k})_{j,k}$,

$$ h^2(f_\delta, f_{\delta'}) = \frac{1}{D} \sum_{j=j_0}^{j_1} \sum_{k \in K_j} |\delta_{j,k} - \delta'_{j,k}|. $$

We conclude by using Assouad's Lemma (see [Bir06b], Lemma 2) and by taking $j_1$ large enough. $\square$

**4.5.** Proof of Proposition 5. We consider $m \in \mathbb{R}$ such that $f$ is non-increasing on $[m, +\infty)$ and non-decreasing on $(-\infty, m]$.

We first assume that $f \in \mathbb{L}^{\theta, \infty}(M)$. Then, for all $j, k \in \mathbb{Z}$ such that $k \ge 1/2 + 2^j m$,

$$ F_{j,k}(f) \le 2^{-j} f(2^{-j}(k - 1/2)). $$

If $k \ge 1/2 + 2^j m$ is such that $f(2^{-j}(k - 1/2)) \ge t 2^j$, then $2^{-j}(k - 1/2)$ belongs to an interval of length at most $M 2^{-j\theta} t^{-\theta}$. There are therefore at most $c[1 + M 2^{j(1-\theta)} t^{-\theta}]$ integers $k \ge 1/2 + 2^j m$ such that $F_{j,k}(f) \ge t$. We can follow a similar line of reasoning to deal with $k$ not larger than $-1/2 + 2^j m$. This leads to (5).

We now suppose that $f \in \mathcal{W}\mathcal{T}_\theta(M)$. We consider $t > 0$ and $x > m$ such that $f(x) \ge t$. Let $j \ge 0$ large enough to ensure that $2^{1-j} \le Mt^{-\theta}$ and $x \ge m + 2^{-j}$. Suppose that there exists $k \ge 3/2 + 2^j m$ such that $x \ge 2^{-j}(k - 1/2)$. We then have

$$ f(x) \le f(2^{-j}(k - 1/2)) \le 2^j F_{j,k-1}(f). $$

Therefore, any $k \in [3/2 + 2^j m, 1/2 + 2^j x]$ is such that $F_{j,k-1}(f) \ge 2^{-j}t$. We deduce from $f \in \mathcal{W}\mathcal{T}_\theta(M)$, that

$$ |[3/2 + 2^j m, 1/2 + 2^j x]| \le Mt^{-\theta} 2^j, $$
$$ \leq c_4 [1 + \log(1 + n^2 \|f\|_q)] . $$

It then remains to bound $\|f\|_q$ for some $q > 1$.

We consider $q \in (\max\{1, p/2\}, p(\alpha + 1/2))$ if $p$ is finite and $q > 1$ if $p$ is infinite. When $\sum_{j=-1}^{\infty} 2^{(j/2)(1-1/q)} \|\beta_{j,\cdot}^*\|_{2q}$ is finite, $\sqrt{f} \in L^{2q}(\mathbb{R})$, and

$$ \begin{aligned} \|f\|_q^{1/2} &= \|\sqrt{f}\|_{2q} \\ &\leq c_5 \sum_{j=-1}^{\infty} 2^{(j/2)(1-1/q)} \|\beta_{j,\cdot}^*\|_{2q}. \end{aligned} \quad (4.4) $$

Note that $|\beta_{j,k}^*| \leq c_6 \sqrt{f_{j,k}} \leq c_6$ as $f$ is a density and hence

$$ \|\beta_{j, \cdot}^*\|_{2q}^{2q} \leq c_7 \sum_{k \in \mathbb{Z}} f_{j,k} \leq c_8. $$

We moreover have when $p$ is finite and $j \geq 0$,

$$ \|\beta_{j, \cdot}^*\|_{2q}^{2q} \leq c_9 \|\beta_{j, \cdot}^*\|_{p, \infty}^p \leq c_9 R^p 2^{-jp(\alpha+1/2-1/p)}. $$

When $p = \infty$ and $j \geq 0$, we rather have,

$$ \begin{aligned} \|\beta_{j, \cdot}^*\|_{2q}^{2q} &\leq c_{10} \left( \sum_{k \in \mathbb{Z}} f_{j,k} \right) \|\beta_{j, \cdot}^*\|_{\infty}^{2(q-1)} \\ &\leq c_{11} R^{2(q-1)} 2^{-j(q-1)(2\alpha+1)}. \end{aligned} $$

In both cases,

$$ \sum_{j=0}^{\infty} 2^{(j/2)(1-1/q)} \|\beta_{j, \cdot}^*\|_{2q} < c_{12} R^r, \quad (4.5) $$

where $r = p/(2q)$ if $p$ is finite, and $r = 1-1/q$ if $p = \infty$. We conclude by (4.4). $\square$

Proof of Lemma 3 when $p \geq 2$. By choosing $K_j = \emptyset$ or $K_j = \tilde{Z}_j$,

$$ R_2 \leq \sum_{j=0}^{\infty} \min \left\{ \mathbb{E} \left[ \sum_{k \in \tilde{Z}_j} (\beta_{j,k}^*)^2 \right], \frac{\mathbb{E}[|\tilde{Z}_j|]}{n} \right\}. $$

It follows from Lemma 23 of [Sar23] that

$$ \mathbb{E}[|\tilde{Z}_j|] \leq c_1 M n^{\theta} 2^{j(1-\theta)}. \quad (4.6) $$

By using a suitable version of Hölder's inequality – see [CVNRF15] – we get

$$ \sum_{k \in \tilde{Z}_j} (\beta_{j,k}^*)^2 \leq c_2 \|\beta_{j, \cdot}^*\|_{p, \infty}^2 |\tilde{Z}_j|^{1-2/p}. $$
and hence $2^j(x - m) - 2 \le Mt^{-\theta}2^j$. Therefore, $x$ belongs to an interval of length at most $2^{1-j} + Mt^{-\theta} \le 2Mt^{-\theta}$. We do the same reasoning when $x < m$ to complete the proof. $\square$

**4.6. Proof of Theorem 6.** As in the proof of Theorem 2, we suppose that we have another independent sample $X'_1, \dots, X'_n$ of $X$. We consider an integer $L_{\text{wav}} \ge 1$ such that $\text{supp } \psi \subset [-L_{\text{wav}}, L_{\text{wav}}]$ and the interval

$$ (16) \qquad I_{j,k} = [2^{-j}(k - L_{\text{wav}}), 2^{-j}(k + L_{\text{wav}})]. $$

It contains the supports of $\phi_{j,k}$ and $\psi_{j,k}$. We consider some $\rho > 0$ whose value is to be specified later on, set $u_n = n(2\rho \log n)^{-1}$, and introduce the smallest integer $\bar{r}_n \ge 0$ such that $2^{-\bar{r}_n} \le u_n^{-1}$. Note that the integer $r_n$ is well defined when $u_n \ge 1$, that is when $n$ is large enough, and more precisely when $n/\log n \ge 2\rho$. As the Hellinger distance between two densities is no larger than 1, we may throughout this proof assume that $n$ fulfils this property (otherwise, the risk bound still holds up to an increase of the risk of $2\rho(\log n)/n$). We define for all $j \in \mathbb{Z}$ and $r \ge 0$,

$$ \begin{aligned} \tilde{Z}_{j,r} &= \left\{ k \in \mathbb{Z}, 2^{-r} < \frac{1}{n} \sum_{i=1}^{n} 1_{X'_{i} \in I_{j,k}} \le 2^{-r+1} \right\} \\ \tilde{Z}_{j,r,-} &= \left\{ k \in \mathbb{Z}, \frac{1}{n} \sum_{i=1}^{n} 1_{X'_{i} \in I_{j,k}} > 2^{-r} \right\}. \end{aligned} $$

Let $J_0 \le 0$ and $J_1 \ge 0$. Let, for each $j \in \{J_0, \dots, J_1\}$, a subset $K_j$ of $\tilde{Z}_{j,\bar{r}_n,-}$. We put $\mathbf{K} = (K_j)_{J_0 \le j \le J_1}$ and group together all the possible sets $\mathbf{K}$ into a collection $\tilde{\mathcal{K}}_{J_0,J_1}$. We also set

$$ \tilde{\mathcal{K}} = \bigcup_{\substack{J_0 \le 0 \\ J_1 \ge 0}} \tilde{\mathcal{K}}_{J_0, J_1}. $$

Consider $\mathbf{K} \in \tilde{\mathcal{K}}$ and $J_0, J_1$ such that $\mathbf{K} \in \tilde{\mathcal{K}}_{J_0, J_1}$. We associate this set with the linear space

$$ V_{\mathbf{K}} = \left\{ \sum_{k \in \tilde{Z}_{J_0, \bar{r}_n, -}} \gamma_{J_0-1, k} \bar{\phi}_{J_0, k} + \sum_{j=J_0}^{J_1} \sum_{k \in K_j} \gamma_{j, k} \bar{\psi}_{j, k}, \forall j, k, \gamma_{j, k} \in \mathbb{R} \right\}. $$

Its dimension is not larger than

$$ \dim V_{\mathbf{K}} \le |\tilde{Z}_{J_0, \bar{r}_n, -}| + \sum_{j=J_0}^{J_1} |K_j|. $$

The set $K_j$ also writes

$$ K_j = (K_j \cap \tilde{Z}_{j,r_j,-}) \bigcup \bigcup_{r=r_j+1}^{\bar{r}_n} (K_j \cap \tilde{Z}_{j,r}), $$
When $p \neq 2$, we deduce from $\sqrt{f} \in W\mathcal{B}_{p,\infty}^{\alpha}(R)$,

$$ \sum_{k \in \tilde{Z}_j} (\beta_{j,k}^*)^2 \leq c_2 R^2 2^{-2j(\alpha+1/2-1/p)} |\tilde{Z}_j|^{1-2/p}. $$

This last inequality is also true when $p = 2$ and $\sqrt{f} \in \mathcal{B}_{p,\infty}^{\alpha}(R)$. We deduce from (4.6) and Jensen's inequality,

$$ R_2 \leq c_3 \sum_{j=0}^{\infty} \min \left\{ Mn^{-(1-\theta)} 2^{j(1-\theta)}, R^2 M^{1-2/p} n^{\theta(1-2/p)} 2^{-j(2\alpha+\theta(1-2/p))} \right\}. $$

It remains to compute the right-hand side of this inequality to prove the result.

<figure><img src="image_4.png" /></figure>

Proof of Lemma 3 when $p < 2$. We set for $j \geq 0$,

$$ \tilde{K}_j = \{k \in \tilde{Z}_j, (\beta_{j,k}^*)^2 \geq 1/n\} $$

and observe as $\sqrt{f} \in W\mathcal{B}_{p,\infty}^{\alpha}(R)$,

$$ |\tilde{K}_j| \leq n^{p/2} R^p 2^{-jp(\alpha+1/2-1/p)}. $$

By using a classical inequality in weak spaces, see (35) of [Sar23],

$$ \sum_{k \in \tilde{Z}_j \setminus \tilde{K}_j} (\beta_{j,k}^*)^2 \leq c_1 n^{-(1-p/2)} R^p 2^{-jp(\alpha+1/2-1/p)}. $$

Therefore,

$$ R_2 \leq c_2 \sum_{j=0}^{\infty} \min \left\{ \frac{\mathbb{E}[|\tilde{Z}_j|]}{n}, \mathbb{E} \left[ \sum_{k \in \tilde{Z}_j \setminus \tilde{K}_j} (\beta_{j,k}^*)^2 + \frac{|\tilde{K}_j| \log_+(|\tilde{Z}_j|/|\tilde{K}_j|)}{n} \right] \right\}. $$

By doing as in the preceding proof for the first term, and by using Jensen's inequality,

$$ R_2 \leq c_3 \sum_{j=0}^{\infty} \min \left\{ Mn^{-(1-\theta)} 2^{j(1-\theta)}, n^{-(1-p/2)} R^p 2^{-jp(\alpha+1/2-1/p)} \times \log_+(MR^{-p}n^{\theta-p/2} 2^{jp(\alpha+1/2-\theta/p)}) \right\}. $$

Elementary computations allows to bound the right-hand side of this inequality from above (see Lemma 30 of [Sar23]).

<figure><img src="image_5.png" /></figure>
and this, for any choice of $r_j \in \{0, \dots, \bar{r}_n\}$ (the set to the right of the union sign is empty if $r_j = \bar{r}_n$). We put

$$ \Delta_K = \sum_{j=J_0}^{J_1} \inf_{r_j \le \bar{r}_n} \left[ \sum_{r=r_j+1}^{\bar{r}_n} \left\{ \begin{aligned} & |K_j \cap \tilde{Z}_{j,r}| + |K_j \cap \tilde{Z}_{j,r}| \log (e|\tilde{Z}_{j,r}|/|K_j \cap \tilde{Z}_{j,r}|) \\ & - \log (1 - e^{-1}) \end{aligned} \right\} \\ + \left\{ \begin{aligned} & |K_j \cap \tilde{Z}_{j,r_j,-}| + |K_j \cap \tilde{Z}_{j,r_j,-}| \log (e|\tilde{Z}_{j,r_j,-}|/|K_j \cap \tilde{Z}_{j,r_j,-}|) \\ & - \log (1 - e^{-1}) \end{aligned} \right\} \\ + |J_0| + J_1 + (|J_0| + J_1 + 2) \log(1 + \bar{r}_n) + \log(2(1 - 1/e)^{-1}). \right] $$

Above, we use the convention $0 \times \log(e|\cdot|/0) = 0$ when necessary. Elementary, albeit cumbersome, computations using Proposition 2.5 of [Mas07] yield

$$ \sum_{K \in \tilde{K}} e^{-\Delta_K} \le 1. $$

We consider an event $\mathcal{A}$ of probability $1 - 1/n$ not depending on $X_1, \dots, X_n$ but rather on $X'_1, \dots, X'_n$ and to be specified later on. We apply Proposition 8 conditionally to $X'_1, \dots, X'_n$ when $\mathcal{A}$ occurs to define an estimator $\hat{f}$. When $\mathcal{A}$ does not happen, $\hat{f}$ is any density estimator (as $\mathcal{A}$ is not known by the statistician, we should take the same, but the whole point is that we do not need any of its properties). We take the expectation of the result and simplify it a bit. This leads to: for all $J_0 \le 0$ and $J_1 \ge 0$:

$$ (17) \qquad \mathbb{E}[h^2(f, \hat{f}) 1_{\mathcal{A}}] \le c \mathbb{E} \left[ \left\{ \sum_{j=J_0}^{J_1} U_j + T + A + \frac{|\tilde{Z}_{J_0, \bar{r}_n, -}| + (|J_0| + J_1 + 1) \log(1 + \bar{r}_n)}{n} \right\} 1_{\mathcal{A}} \right], $$

where

$$ \begin{align*} U_j &= \inf_{0 \le r_j \le \bar{r}_n} \left\{ U_{j,r_j,-} + \sum_{r=r_j+1}^{\bar{r}_n} U_{j,r} \right\} \\ U_{j,r_j,-} &= \inf_{K_j \subset \tilde{Z}_{j,r_j,-}} \sum_{k \in \tilde{Z}_{j,r_j,-} \setminus K_j} \beta_{j,k}^2 + \frac{|K_j|}{n} \log_+ \left( \frac{|\tilde{Z}_{j,r_j,-}|}{|K_j|} \right) \\ U_{j,r} &= \inf_{K_j \subset \tilde{Z}_{j,r}} \sum_{k \in \tilde{Z}_{j,r} \setminus K_j} \beta_{j,k}^2 + \frac{|K_j|}{n} \log_+ \left( \frac{|\tilde{Z}_{j,r}|}{|K_j|} \right) \\ T &= \sum_{j=J_0}^{J_1} \sum_{k \in \mathbb{Z} \setminus \tilde{Z}_{j, \bar{r}_n, -}} \beta_{j,k}^2 + \sum_{k \in \mathbb{Z} \setminus \tilde{Z}_{J_0, \bar{r}_n, -}} \alpha_{J_0, k}^2 \end{align*} $$
### 4.3. Proof of Theorem 2.3

Since the theorem is stated for $R$ and $M$ large enough, we may without loss of generality prove the theorem with $R$ replaced by $c_1 R$ and $M$ by $c_2 M$ where $c_1, c_2$ only depend on $\alpha, p, \theta$ and the wavelet basis.

Let $\ell \ge 1$ be the smallest integer such that $(-2^\ell, 2^\ell)$ contains the supports of $\bar{\phi}$ and $\bar{\psi}$. We consider two integers $j \ge -1, j_0 \ge 0$ such that $2^{j_0+j-\ell} \ge 12$. We define $\bar{k} \ge 1$ as the smallest integer satisfying $1+2\bar{k} \ge 2^{j_0+j-\ell-1}$, and $\bar{k} \ge 1$ as the largest integer satisfying $4\bar{k}+2\bar{k}+1 \le 2^{j_0+j-\ell}$. We endow $\mathcal{D} = \{0,1\}^{\bar{k}}$ with the Hamming distance $\Delta$ defined for all $\delta, \delta' \in \mathcal{D}$ by

$$ \Delta(\delta, \delta') = \sum_{k=1}^{\bar{k}} |\delta_k - \delta'_k|. $$

We consider $b > 0$ and set for $\delta \in \mathcal{D}$,

$$ h_{\delta} = b \left[ \sum_{k=1}^{\bar{k}} \delta_k \bar{\psi}_{j, 2^{\ell+1}(k+\bar{k})} + \sum_{k=1}^{\bar{k}} (1 - \delta_k) \bar{\psi}_{j, 2^{\ell+1}(k+\bar{k}+\bar{k})} \right]. $$

Let $g_0 \in \mathfrak{B}_{p,\infty}^{\alpha}(R_{g_0})$ be a compactly supported density on $[0,2]$ satisfying $\inf_{x \in [1/2,1]} g_0(x) \ge 1/4$ and $\|g_0\|_{\infty} \le 1$. We then consider

$$ \kappa = 4 \max \{2^{1/2} \|\bar{\phi}\|_{\infty}, \|\bar{\psi}\|_{\infty}\} $$

and set for $x \in \mathbb{R}$,

$$ g(x) = \kappa b 2^{j/2} g_0(2^{-j_0} x). $$

Let $\zeta$ be a density, compactly supported on $(-3,0)$, bounded by $1/2$, and such that $\sqrt{\zeta} \in \mathfrak{B}_{p,\infty}^{\alpha}(R/\max\{2^{1/p}, 2\})$. Such a density does exist (recall that $R$ is large enough in the proof). We put

$$ q = \int (g(x) + h_{\delta}(x))^2 dx, $$

and define for $x \in \mathbb{R}$,

$$ f_{\delta}(x) = (1-q)\zeta(x) + (g(x) + h_{\delta}(x))^2. $$

We now state:

**Lemma 4.** There are $a_1, a_2, a_3, a_4$ such that if

$$ b^2 2^{j_0+j} \le a_1 $$

$$ b 2^{j/2} 2^{j_0(1/p-\alpha)} \le a_2 R $$

$$ b 2^{j_0/p} 2^{j(\alpha+1/2)} \mathbb{1}_{j \ge 0} \le a_3 R $$

$$ b^{2\theta} 2^{j\theta} 2^{j_0} \le a_4 M $$
$$A = \sum_{j=J_1+1}^{\infty} \sum_{k \in \mathbb{Z}} \beta_{j,k}^2,$$

where $\alpha_{J_0,k} = \alpha_{J_0,k}(\sqrt{f})$, $\beta_{j,k} = \beta_{j,k}(\sqrt{f})$, and where $\log_+(x) = \log(e+x)$.

Since $\hat{f}$ is always a density, $h^2(f, \hat{f}) \le 1$. The triangle inequality then ensures,

$$ (18) \qquad \begin{aligned} \mathbb{E}[h^2(f, \hat{f})] &\le \mathbb{E}[h^2(f, \hat{f})1_A] + \mathbb{P}(A^c) \\ &\le \mathbb{E}[h^2(f, \hat{f})1_A] + 1/n. \end{aligned} $$

Within one residual term, inequality (17) hence gives an upper-bound on the Hellinger risk $\mathbb{E}[h^2(f, \hat{f})]$ of $\hat{f}$. We now need the two following lemmas, to be proven after the present proof.

**Lemma 6.** There exist $\rho > 0$ and an event $A$ meeting the above conditions on which the three inequalities below hold true. First,

$$T \le c \left[ (J_1 - J_0 + 1) \frac{\log n}{n} + M 2^{J_0(1-\theta)} \left( \frac{\log n}{n} \right)^{1-\theta} \right],$$

Second,

$$A \le c R^{q_1} 2^{-J_1(1-1/q_2)}.$$

The terms $q_1 > 0, q_2 > 1$ only depend on $\alpha, p$ and the wavelet basis. Third, the cardinality of $\tilde{\mathbb{Z}}_{j,r,-}$ can be bounded from above for all $j \in \mathbb{Z}$ and $r \in \{0, \dots, \bar{r}_n\}$ by

$$(19) \qquad |\tilde{\mathbb{Z}}_{j,r,-}| \le c [1 + M 2^{r\theta} 2^{j(1-\theta)}].$$

Above, $c$ only depends on $\alpha, p, \theta$ and the wavelet basis.

**Lemma 7.** The following results hold true on the event $A$ and are written for the value of $\rho$ given by Lemma 6. For all $j \in \mathbb{Z}$ and $r \le \bar{r}_n$,

$$(20) \qquad U_{j,r} \le c \frac{2^{-r/2}}{\sqrt{n}} \log_+ \left( 2^{r/2} \frac{1 + M 2^{r\theta} 2^{j(1-\theta)}}{\sqrt{n}} \right)$$

$$(21) \qquad U_{j,r} \le c \frac{1 + M 2^{r\theta + j(1-\theta)}}{n}.$$

We also have when $p \ge 2$ and $j \ge 0$,

$$(22) \qquad U_{j,r} \le c R^2 M^{1-2/p} 2^{-j(2\alpha-2\theta/p+\theta)} 2^{r\theta(1-2/p)}.$$

When $p < 2$ and $j \ge 0$,

$$(23) \qquad U_{j,r,-} \le c R^p 2^{-jp(\alpha+1/2-1/p)} n^{-(1-p/2)} \\ \qquad \qquad \times \log_+ \left( M R^{-p} 2^{r\theta} n^{-p/2} 2^{jp(\alpha+1/2-\theta/p)} \right).$$

In these inequalities, $c$ only depends on $\alpha, p, \theta$ and the wavelet basis.
then, $f_\delta$ is a density belonging to $\mathcal{T}_\theta(M)$ such that $\sqrt{f_\delta} \in \mathfrak{B}_{p,\infty}^\alpha(R)$. If $b2^{j/2}2^{j_0/p} \le a_2R$, $\sqrt{f_\delta} \in \mathfrak{B}_{p,\infty}^\alpha(R)$. Moreover $\|f_\delta\|_\infty \le 1/2 + a_5b^22^j$. For all $x \in \mathbb{R}$,

$$|x|f_{\delta}^{\theta}(x) \le a_{6}M,$$

and for all $\delta, \delta' \in \mathcal{D}$,

$$h^2(f_\delta, f_{\delta'}) = a_7 b^2 \Delta(\delta, \delta').$$

The terms $a_1, a_2, a_3, a_4, a_5, a_6, a_7$ above are positive and only depend on $g_0, p, \theta$ and the wavelet basis.

The proof of this lemma is given after the present proof. We define

$$\mathcal{S}_{p,\theta}^{\alpha}(R, M) = \{f_{\delta}, \delta \in \mathcal{D}\}.$$

It follows from Assouad's lemma – see [Bir06b] – that if $b^2 = 1/(2a_6n)$,

$$\mathcal{R}(\mathcal{S}_{p,\theta}^{\alpha}(R, M)) \ge c_0 n^{-1} 2^{j_0+j},$$

where $c_0$ only depends on the wavelet basis, $g_0, p, \theta$. It then remains to choose $j$ and $j_0$.

We first suppose either $\theta < p/2$ or $\theta = p/2$ and $R \ge M^{1/p}$. We then define $j \ge 0$ as the largest integer such that

$$2^{j(1+2\alpha-2\theta/p)} \le R^2 M^{-2/p} n^{1-2\theta/p}.$$

We then consider $c_1$ small enough and the largest integer $j_0 \ge 0$ such that

$$2^{j_0} \le c_1 M n^{\theta} 2^{-j\theta}.$$

We may check that the conditions of the lemma are satisfied.

We now suppose $\theta = p/2$ and $R < M^{1/p}$. We set $j = -1$, consider $c_2$ small enough and define $j_0 \ge 0$ as the largest integer such that $2^{j_0} \le c_2 M n^\theta$. All the conditions of the lemma are met, hence the result.

Remark. We can see from this proof why the minimax risk does not tend to 0 when the tail dominance condition is not fulfilled and $p \ge 2$. Formally, this means choosing $\theta = 1$ and $M = 1$. The proof of Lemma 4 with $j = -1$ ensures that $f_\delta$ is a density such that $\sqrt{f_\delta} \in \mathfrak{B}_{p,\infty}^\alpha(R)$ if $b^22^{j_0+j} \le a_1$ and $b2^{j/2}2^{j_0/p} \le a_2R$. We then choose $b^2$ as above and $2^{j_0} \le c_2n$ for some $c_2$. $\square$

*Proof of Lemma 4.* First, observe that

$$q \le 2 \left[ \int g^2(x) dx + \int h_{\delta}^2(x) dx \right]$$

is not larger than 1 if we choose $a_1$ appropriately. This entails that $f_\delta$ is a density.

We have $\text{supp } h_\delta \subset [2^{\ell-j}(2\bar{k}+1), 2^{\ell-j}(4\bar{k}+2\bar{k}+1)] \subset [2^{j_0-1}, 2^{j_0}]$, $\text{supp } g \subset [0, 2^{j_0+1}]$ and $g(x) \ge \|h_\delta\|_\infty$ for all $x \in [2^{j_0-1}, 2^{j_0}]$. We deduce $g+h_\delta \ge 0$ and

$$\sqrt{f_{\delta}(x)} = \sqrt{(1-q)\zeta(x)} + g(x) + h_{\delta}(x).$$
We are now in position to prove Theorem 6. We define $J_1$ as the smallest integer such that $R^{q_1} 2^{-J_1(1-1/q_2)} \le 1/n$ where $q_1, q_2$ appear in Lemma 6. We define $J_0$ as the largest negative integer such that

$$M 2^{J_0(1-\theta)} \le \left( \frac{\log n}{n} \right)^{\theta}.$$

We deduce from (17), (18) some $c_1, c_2$ such that

$$\mathbb{E}[h^2(f, \hat{f})] \le c_1 \mathbb{E} \left[ \sum_{j=J_0}^{J_1} U_j 1_A \right] + c_2 \frac{\log n + \log(1+R) + \log M}{n} \log(1+\bar{r}_n).$$

The factor $c_1$ only depends on the wavelet basis, whereas $c_2$ only depends on $\alpha, p, \theta$ and the wavelet basis. It then remains to bound

$$U = \sum_{j=J_0}^{J_1} U_j$$

on $A$ from above. We treat cases $p \ge 2$ and $p < 2$ separately.

*Proof of Theorem 6 when $p \ge 2$.* Note that

$$U_j \le \sum_{r=1}^{\bar{r}_n} U_{j,r}.$$

For all $j \ge 0$ and $r \le \bar{r}_n$, Lemma 7 implies:

$$U_{j,r} \le c_1 \min \left\{ \frac{2^{-r/2} \log_+ \left( \frac{M 2^{r(\theta+1/2)} 2^{j(1-\theta)}}{\sqrt{n}} \right)}{R^2 M^{1-2/p} 2^{-j(2\alpha-2\theta/p+\theta)} 2^{r\theta(1-2/p)}}, \frac{M 2^{r\theta} 2^{j(1-\theta)}}{n} \right\}.$$

We first compute

$$\begin{align} U^{(1)} &= \sum_{j=0}^{\infty} \sum_{r=j}^{\bar{r}_n} U_{j,r} \nonumber \\ &\le c_2 \sum_{r=0}^{\bar{r}_n} \sum_{j=0}^{\infty} \min \left\{ \frac{2^{-r/2-j/2}}{\sqrt{n}} \log_+ \left( M \frac{2^{r(\theta+1/2)} 2^{3j/2}}{\sqrt{n}} \right), \right. \tag{24} \\ & \qquad \left. R^2 M^{1-2/p} 2^{-2j\alpha} 2^{r\theta(1-2/p)}, \frac{M 2^{r\theta} 2^j}{n} \right\}. \nonumber \end{align}$$

Let us denote by $U_r^{(1)}$ the sum in $j$. We may bound it from above by proceeding as follows. First, let us assume that

$$nM^{-2} 2^{-r(2\theta+1)} \le 1.$$
We also have

$$h_{\delta} \in \mathcal{B}_{p,\infty}^{\alpha} \left( b\bar{k}^{1/p} 2^{j(\alpha+1/2-1/p)} 1_{j \ge 0} \right) \cap \mathfrak{B}_{p,\infty}^{\alpha} \left( b\bar{k}^{1/p} 2^{j(\alpha+1/2-1/p)} \right),$$ $$g \in \mathcal{B}_{p,\infty}^{\alpha} \left( c_1 b 2^{j/2} 2^{j_0(1/p-\alpha)} \right) \cap \mathfrak{B}_{p,\infty}^{\alpha} \left( c_1 b 2^{j/2} 2^{j_0/p} \right),$$

where $c_1$ only depends on $g_0$ and the wavelet basis. Therefore, we may consider $a_2$ and $a_3$ so that $\sqrt{f_{\delta}} \in \mathcal{B}_{p,\infty}^{\alpha}(R)$. If the supplementary conditions are fulfilled, $\sqrt{f_{\delta}} \in \mathfrak{B}_{p,\infty}^{\alpha}(R)$.

Note that $\zeta$ belongs to $\mathcal{T}_{\theta}(M/2)$ if $M$ is large enough, which is assumed throughout the proof of Theorem 2.3. Besides,

$$h_{\delta}^{2} \in \mathcal{T}_{\theta}(\|h_{\delta}\|_{\infty}^{2\theta}(2^{j_{0}+1} + 1)),$$

see Lemma 2.1 of [CL20]. A similar result holds true for $g^2$ and hence $f_{\delta} \in \mathcal{T}_{\theta}(M)$ if $a_4$ is small enough.

As to the Hellinger distance, we have

$$h^2(f_{\delta}, f_{\delta'}) = \frac{1}{2} \int (h_{\delta}(x) - h_{\delta'}(x))^2 dx,$$

and we conclude using that the supports of $\bar{\psi}_{j,2^{\ell+1}k}$ are disjoint. Finally, for all $x \ge 0$,

$$f_{\delta}(x) \le 2 (\|g\|_{\infty}^{2} + \|h_{\delta}\|_{\infty}^{2}) \\ \le c_{2} b^{2} 2^{j},$$

where $c_2$ only depends on $g_0$ and the wavelet basis. Since $f_{\delta}$ is compactly supported on $[-3, 2^{j_0+1}]$, we get for all $x \ge 0$,

$$|x|f_{\delta}^{\theta}(x) \le 2^{j_0+1} [c_2 b^2 2^j]^{\theta} \\ \le 2a_4 c_2^{\theta} M.$$

Moreover, as $|f_{\delta}(x)| \le 1/2$ when $x \in [-3, 0]$, and $M$ is at least 1, this inequality is actually true for all $x \in \mathbb{R}$, up to a multiplicative factor. $\square$

### 4.4. Sketch of the proof of Proposition 2.4

Let $\varphi_{\delta}$ be the map defined in the proof of Proposition 4 of [Sar23] with his $\alpha$ replaced by $2\alpha$ and his $p$ replaced by $p/2$. In other words,

$$\varphi_{\delta}(x) = \frac{1}{D} \sum_{j=j_0}^{j_1} 2^j \sum_{k \in K_j} \delta_{j,k} 1_{I_{j,k}}(x),$$

where the $I_{j,k} \subset [0, 1/2)$ are disjoint intervals of size $2^{-j}$, where $\delta_{j,k} \in \{0, 1\}$, where $|K_j| = n^{p/2}+1$, where $j_0$ is the smallest integer such that $2^{j_0} \ge 4(n^{p/2}+1)$,
Lemma 30 of [Sar23] entails:

$$ (25) \qquad U_r^{(1)} \le c_3 \frac{2^{-r/2}}{\sqrt{n}} \log_+ \left( M \frac{2^{r(\theta+1/2)}}{\sqrt{n}} \right). $$

In the contrary case, we may consider the largest integer $j_r \ge 0$ such that

$$ 2^{3j_r} \le nM^{-2}2^{-r(2\theta+1)}. $$

We then have,

$$ (26) \qquad U_r^{(1)} \le \sum_{j=0}^{j_r} \frac{M2^{r\theta}2^j}{n} + \sum_{j=j_r+1}^{\infty} \frac{2^{-r/2-j/2}}{\sqrt{n}} \log_+ \left( M \frac{2^{r(\theta+1/2)} 2^{3j/2}}{\sqrt{n}} \right) \\ \le c_4 M^{1/3} n^{-2/3} 2^{-r(1-\theta)/3}. $$

To get the last inequality, Lemma 30 of [Sar23] is used once again. By grouping (25) and (26), we thus have for all $r \ge 0$,

$$ (27) \qquad U_r^{(1)} \le c_5 \left\{ M^{1/3} n^{-2/3} 2^{-r(1-\theta)/3} + 2^{-r/2} n^{-1/2} \log_+ \left( M 2^{r(\theta+1/2)} n^{-1/2} \right) 1_{nM^{-2} \le 2^{r(2\theta+1)}} \right\}. $$

This bound is obtained by using only the minimum between terms 1 and 3 in (24). We can also make a similar reasoning with terms 2 and 3 only. This leads to

$$ (28) \qquad U_r^{(1)} \le c_6 \left[ R^{2/(1+2\alpha)} M^{(1+2\alpha-2/p)/(1+2\alpha)} n^{-2\alpha/(2\alpha+1)} 2^{r\theta(1-2/((1+2\alpha)p))} \right. \\ \left. \qquad + R^2 M^{1-2/p} 2^{r\theta(1-2/p)} 1_{nR^2 M^{-2/p} \le 2^{2r\theta/p}} \right]. $$

If

$$ M^{1/3-(1+2\alpha-2/p)/(1+2\alpha)} R^{-2/(1+2\alpha)} n^{2\alpha/(2\alpha+1)-2/3} \le 1, $$

we sum (27) for all $r$. Thereby,

$$ \begin{aligned} U^{(1)} &\le c_7 \left[ M^{1/3} n^{-2/3} + M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} \right] \\ &\le c_7 \left[ M^{(1+2\alpha-2/p)/(1+2\alpha)} R^{2/(1+2\alpha)} n^{-2\alpha/(2\alpha+1)} \right. \\ & \qquad \left. + M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} \right]. \end{aligned} $$

Otherwise, we define $\mathfrak{v}_0 \ge 0$ as the largest integer such that

$$ 2^{\mathfrak{v}_0(1+2\alpha+2\theta+4\alpha\theta-6\theta/p)/(3(2\alpha+1))} $$

$$ (29) \qquad \le M^{1/3-(1+2\alpha-2/p)/(1+2\alpha)} R^{-2/(1+2\alpha)} n^{2\alpha/(2\alpha+1)-2/3}. $$

We sum (27) when $r \ge \mathfrak{v}_0 + 1$ and (28) when $r \le \mathfrak{v}_0$ to get

$$ U^{(1)} \le c_8 \left[ R^{\beta_1} M^{\beta_2} n^{-\gamma} + M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} \right. \\ \left. \qquad + R^2 M^{1-2/p} 2^{\mathfrak{v}_0\theta(1-2/p)} (1 + \mathfrak{v}_0 1_{p=2}) 1_{nR^2 M^{-2/p} \le 2^{2\mathfrak{v}_0\theta/p}} \right]. $$

Observe that

$$ nR^2 M^{-2/p} \le 2^{2\mathfrak{v}_0\theta/p} $$
where $j_1 \ge j_0$ is to be specified, and where $D = (j_1 - j_0 + 1)(n^{p/2} + 1)$. We define for $x \in \mathbb{R}$,

$$f_{\delta}(x) = \varphi_{\delta}(x) + \varphi_{1-\delta}(x - 1/2).$$

Note that $f_{\delta}$ is a compactly supported density on $[0, 1]$ such that $\sqrt{f_{\delta}(x)} = \sqrt{\varphi_{\delta}(x)} + \sqrt{\varphi_{1-\delta}(x - 1/2)}$ and

$$\sqrt{\varphi_{\delta}(x)} = \frac{1}{\sqrt{D}} \sum_{j=j_0}^{j_1} 2^{j/2} \sum_{k \in K_j} \delta_{j,k} \mathbb{1}_{I_{j,k}}(x).$$

The lemma below is proved as Lemma 36 of [Sar23] (just replace the $\ell^1-\ell^p$ inequality by Hölder's inequality in the first line of his proof when $p \in (1, 2)$).

**Lemma 5.** For all $\varepsilon > 0$, $j_1$ large enough, and $\delta = (\delta_{j,k})_{j,k}$, $\sqrt{\varphi_{\delta}}$ belongs to $\mathfrak{B}_{p,\infty}^{\alpha}(\varepsilon)$.

We deduce that $\sqrt{f_{\delta}}$ lies in $\mathfrak{B}_{p,\infty}^{\alpha}(R)$ if $j_1$ is large enough. Now, for all $\delta, \delta'$ of the form $\delta = (\delta_{j,k})_{j,k}$, $\delta' = (\delta'_{j,k})_{j,k}$,

$$h^2(f_{\delta}, f_{\delta'}) = \frac{1}{D} \sum_{j=j_0}^{j_1} \sum_{k \in K_j} |\delta_{j,k} - \delta'_{j,k}|.$$

We conclude by using Assouad's Lemma (see [Bir06b], Lemma 2) and by taking $j_1$ large enough. $\square$

### 4.5. Proof of Proposition 3.1

We consider $m \in \mathbb{R}$ such that $f$ is non-increasing on $[m, +\infty)$ and non-decreasing on $(-\infty, m]$.

We first assume that $f \in \mathbb{L}^{\theta, \infty}(M)$. Then, for all $j, k \in \mathbb{Z}$ such that $k \ge 1/2 + 2^j m$,

$$F_{j,k}(f) \le 2^{-j} f(2^{-j}(k - 1/2)).$$

If $k \ge 1/2 + 2^j m$ is such that $f(2^{-j}(k - 1/2)) \ge t2^j$, then $2^{-j}(k - 1/2)$ belongs to an interval of length at most $M2^{-j\theta}t^{-\theta}$. There are therefore at most $c[1 + M2^{j(1-\theta)}t^{-\theta}]$ integers $k \ge 1/2 + 2^j m$ such that $F_{j,k}(f) \ge t$. We can follow a similar line of reasoning to deal with $k$ not larger than $-1/2 + 2^j m$. This leads to (3.2).

We now suppose that $f \in \mathcal{WT}_{\theta}(M)$. We consider $t > 0$ and $x > m$ such that $f(x) \ge t$. Let $j \ge 0$ large enough to ensure that $2^{1-j} < Mt^{-\theta}$ and $x \ge m + 2^{-j}$. Suppose that there exists $k \ge 3/2 + 2^j m$ such that $x \ge 2^{-j}(k - 1/2)$. We then have

$$f(x) \le f(2^{-j}(k - 1/2)) \le 2^j F_{j,k-1}(f).$$

Therefore, any $k \in [3/2 + 2^j m, 1/2 + 2^j x]$ is such that $F_{j,k-1}(f) \ge 2^{-j}t$. We deduce from $f \in \mathcal{WT}_{\theta}(M)$, that

$$|[3/2 + 2^j m, 1/2 + 2^j x]| \le Mt^{-\theta} 2^j,$$
is possible only if

$$M^{-2(2\alpha+1)/p} R^{2(2\theta+1)(2\alpha+1)} n^{(2\alpha+1)(1-2\theta/p+2\theta)} \le 1,$$

that is if $n$ is small enough. We now study

$$ 
\begin{aligned}
U^{(2)} &= \sum_{j=0}^{\infty} \sum_{r<j} U_{j,r} \\
&\le c_9 \sum_{j=0}^{\infty} \min \left\{ R^2 M^{1-2/p} 2^{-2j\alpha}, M \frac{2^j}{n} \right\} \\
&\le c_{10} \left[ R^{2/(1+2\alpha)} M^{(1+2\alpha-2/p)/(1+2\alpha)} n^{-2\alpha/(2\alpha+1)} + Mn^{-1} \right].
\end{aligned}
$$

We finally deal with

$$ 
\begin{aligned}
U^{(3)} &= \sum_{j=J_0}^{0} \sum_{r=0}^{\bar{r}_n} U_{j,r} \\
&\le c_{11} \sum_{j=0}^{|J_0|} \sum_{r=0}^{\bar{r}_n} \min \left\{ \frac{2^{-r/2}}{\sqrt{n}} \log \left( 2^{r/2} \frac{1+M2^{r\theta}2^{-j(1-\theta)}}{\sqrt{n}} \right), \frac{1+M2^{r\theta}2^{-j(1-\theta)}}{n} \right\} \\
&\le c_{12} \frac{|J_0|^2}{n} + c_{12} \sum_{j=0}^{|J_0|} \sum_{r=0}^{\bar{r}_n} U_{j,r}^{(3)}
\end{aligned}
$$

where

$$U_{j,r}^{(3)} = \min \left\{ \frac{2^{-r/2}}{\sqrt{n}} \log_+ \left( \frac{M2^{r(\theta+1/2)} 2^{-j(1-\theta)}}{\sqrt{n}} \right), \frac{M2^{r\theta} 2^{-j(1-\theta)}}{n} \right\}.$$

Note that

$$|J_0| \le c_{13} \log(M(n/\log n)^\theta).$$

When $2^{2j(1-\theta)} \le M^2/n$ (and $j \ge 0$), which is possible only if $n \le M^2$, we do:

$$ 
\begin{aligned}
\sum_{2^{2j(1-\theta)} \le M^2/n} \sum_{r=0}^{\bar{r}_n} U_{j,r}^{(3)} \\
&\le \sum_{2^{2j(1-\theta)} \le M^2/n} \sum_{r=0}^{\infty} \frac{2^{-r/2}}{\sqrt{n}} \log_+ \left( \frac{M2^{r(\theta+1/2)} 2^{-j(1-\theta)}}{\sqrt{n}} \right) \\
&\le c_{14} \sum_{2^{2j(1-\theta)} \le M^2/n} \frac{1}{\sqrt{n}} \log_+ \left( \frac{M2^{-j(1-\theta)}}{\sqrt{n}} \right) \\
&\le c_{15} \frac{\log_+^2(M^2/n)}{\sqrt{n}}.
\end{aligned}
$$

When $2^{2j(1-\theta)} \ge M^2/n$ (and $j \ge 0$), we may consider the largest integer $r_j \ge 0$ such that

$$2^{r_j(2\theta+1)} \le nM^{-2} 2^{2j(1-\theta)}.$$
and hence $2^j(x-m)-2 \le Mt^{-\theta}2^j$. Therefore, $x$ belongs to an interval of length at most $2^{1-j} + Mt^{-\theta} < 2Mt^{-\theta}$. We do the same reasoning when $x < m$ to complete the proof. $\square$

### 4.6. Proof of Theorem 3.2

As in the proof of Theorem 2.2, we suppose that we have another independent sample $X'_1, \dots, X'_n$ of $X$. We consider an integer $L_{\text{wav}} \ge 1$ such that $\text{supp } \psi \subset [-L_{\text{wav}}, L_{\text{wav}}]$ and the interval

$$I_{j,k} = [2^{-j}(k - L_{\text{wav}}), 2^{-j}(k + L_{\text{wav}})]. \quad (4.7)$$

It contains the supports of $\phi_{j,k}$ and $\psi_{j,k}$. We consider some $\rho > 0$ whose value is to be specified later on, set $u_n = n(2\rho \log n)^{-1}$, and introduce the smallest integer $\bar{r}_n \ge 0$ such that $2^{-\bar{r}_n} \le u_n^{-1}$. Note that the integer $r_n$ is well defined when $u_n \ge 1$, that is when $n$ is large enough, and more precisely when $n/\log n \ge 2\rho$. As the Hellinger distance between two densities is no larger than 1, we may throughout this proof assume that $n$ fulfils this property (otherwise, the risk bound still holds up to an increase of the risk of $2\rho(\log n)/n$). We define for all $j \in \mathbb{Z}$ and $r \ge 0$,

$$\begin{aligned} \tilde{Z}_{j,r} &= \left\{ k \in \mathbb{Z}, 2^{-r} < \frac{1}{n} \sum_{i=1}^{n} 1_{X'_{i} \in I_{j,k}} \le 2^{-r+1} \right\} \\ \tilde{Z}_{j,r,-} &= \left\{ k \in \mathbb{Z}, \frac{1}{n} \sum_{i=1}^{n} 1_{X'_{i} \in I_{j,k}} > 2^{-r} \right\}. \end{aligned}$$

Let $J_0 \le 0$ and $J_1 \ge 0$. Let, for each $j \in \{J_0, \dots, J_1\}$, a subset $K_j$ of $\tilde{Z}_{j, \bar{r}_n, -}$. We put $\mathbf{K} = (K_j)_{J_0 \le j \le J_1}$ and group together all the possible sets $\mathbf{K}$ into a collection $\tilde{\mathcal{K}}_{J_0, J_1}$. We also set

$$\tilde{\mathcal{K}} = \bigcup_{\substack{J_0 \le 0 \\ J_1 \ge 0}} \tilde{\mathcal{K}}_{J_0, J_1}.$$

Consider $\mathbf{K} \in \tilde{\mathcal{K}}$ and $J_0, J_1$ such that $\mathbf{K} \in \tilde{\mathcal{K}}_{J_0, J_1}$. We associate this set with the linear space

$$V_{\mathbf{K}} = \left\{ \sum_{k \in \tilde{Z}_{J_0, \bar{r}_n, -}} \gamma_{J_0-1, k} \bar{\phi}_{J_0, k} + \sum_{j=J_0}^{J_1} \sum_{k \in K_j} \gamma_{j, k} \bar{\psi}_{j, k}, \forall j, k, \gamma_{j, k} \in \mathbb{R} \right\}.$$

Its dimension is not larger than

$$\dim V_{\mathbf{K}} \le |\tilde{Z}_{J_0, \bar{r}_n, -}| + \sum_{j=J_0}^{J_1} |K_j|.$$
We then have,

$$
\begin{align*}
& \sum_{2^{2j}(1-\theta) \le M^2/n} \sum_{r=0}^{\bar{r}_n} U_{j,r}^{(3)} \\
& \le c_{16} \sum_{j=0}^{|J_0|} \left\{ \sum_{r \ge r_j} \frac{2^{-r/2}}{\sqrt{n}} \log_+ \left( \frac{M2^{r(\theta+1/2)} 2^{-j(1-\theta)}}{\sqrt{n}} \right) + \sum_{r<r_j} \frac{M2^{r\theta} 2^{-j(1-\theta)}}{n} \right\} \\
& \le c_{17} \sum_{j=0}^{|J_0|} M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} 2^{-j(1-\theta)/(2\theta+1)} \\
& \le c_{18} M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)}.
\end{align*}
$$

In conclusion,

$$
U^{(3)} \le c_{19} \left[ M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} + \log^2(M(n/\log n)^\theta) n^{-1} \right. \\
\left. \qquad + \log_+^2(M^2/n) n^{-1/2} 1_{n \le M^2} \right].
$$

It then remains to sum up the different results to get a bound on $U$ and hence (7) where

$$
\begin{equation} \tag{30}
\begin{split}
v_n ={}& R^{2/(1+2\alpha)} M^{(1+2\alpha-2/p)/(1+2\alpha)} n^{-2\alpha/(2\alpha+1)} + M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} \\
& + \log^2(M(n/\log n)^\theta) n^{-1} + (\log n)(\log(1+\log n)) n^{-1} \\
& + (\log M) \log(1+\log n) n^{-1} + \log(1+R) \log(1+\log n) n^{-1} + Mn^{-1} \\
& + R^2 M^{1-2/p} 2^{\mathfrak{v}_0\theta(1-2/p)} (1+\mathfrak{v}_0 1_{p=2}) 1_{M^{-2(1+2\alpha)/p} R^{2(2\theta+1)(2\alpha+1)} n^{(2\alpha+1)(1-2\theta/p+2\theta)} \le 1} \\
& \phantom{+ R^2 M^{1-2/p} 2^{\mathfrak{v}_0\theta(1-2/p)} (1+\mathfrak{v}_0 1_{p=2})} + \log_+^2(M^2/n) n^{-1/2} 1_{n \le M^2}
\end{split}
\end{equation}
$$

and where $\mathfrak{v}_0$ is given by (29).

<figure><img src="image_3.png" /></figure>

Proof of Theorem 6 when $p < 2$. We apply Lemma 7: $U_j$ satisfies for all $j \in \{0, \dots, J_1\}$, and $r_j \in \{0, \dots, \bar{r}_n\}$,

$$
U_j \le c_1 \left\{ R^p 2^{-jp(\alpha+1/2-1/p)} n^{-(1-p/2)} \log_+ \left( M R^{-p} 2^{r_j \theta} n^{-p/2} 2^{jp(\alpha+1/2-\theta/p)} \right) \right. \\
\left. \qquad + \sum_{r=r_j+1}^{\bar{r}_n} 2^{-r/2} n^{-1/2} \log_+ \left( M 2^{r(\theta+1/2)} 2^{j(1-\theta)} n^{-1/2} \right) \right\}.
$$

Note that this inequality also holds true for $r_j > \bar{r}_n$. If we choose $r_j = \bar{r}_n$, we get (using $2^{\bar{r}_n} \le c_2 n$),

$$
(31) \qquad U_j \le c_3 R^{p/2} 2^{-jp(\alpha+1/2-1/p)} n^{-(1-p/2)} \log_+ (MR^{-p} n^{\theta-p/2} 2^{jp(\alpha+1/2-\theta/p)}).
$$

We may refine this result when $n^{1-p}R^{-2p}2^{2jp(\alpha+1/2-1/p)} \ge 1$. In this case, we may define the largest number $r_j \ge 0$ satisfying

$2^{r_j} \le n^{1-p} R^{-2p} 2^{2jp(\alpha+1/2-1/p)}.$
The set $K_j$ also writes

$$K_j = (K_j \cap \tilde{\mathbb{Z}}_{j,r_j,-}) \cup \bigcup_{r=r_j+1}^{\tilde{r}_n} (K_j \cap \tilde{\mathbb{Z}}_{j,r}),$$

and this, for any choice of $r_j \in \{0, \dots, \tilde{r}_n\}$ (the set to the right of the union sign is empty if $r_j = \tilde{r}_n$). We put

$$\Delta_K = \sum_{j=J_0}^{J_1} \inf_{r_j \le \tilde{r}_n} \left[ \sum_{r=r_j+1}^{\tilde{r}_n} \left\{ \begin{aligned} & |K_j \cap \tilde{\mathbb{Z}}_{j,r}| + |K_j \cap \tilde{\mathbb{Z}}_{j,r}| \log (e|\tilde{\mathbb{Z}}_{j,r}|/|K_j \cap \tilde{\mathbb{Z}}_{j,r}|) \\ & - \log (1 - e^{-1}) \end{aligned} \right\} \right. \\ \qquad + \left. \begin{aligned} & |K_j \cap \tilde{\mathbb{Z}}_{j,r_j,-}| + |K_j \cap \tilde{\mathbb{Z}}_{j,r_j,-}| \log (e|\tilde{\mathbb{Z}}_{j,r_j,-}|/|K_j \cap \tilde{\mathbb{Z}}_{j,r_j,-}|) \\ & - \log (1 - e^{-1}) \end{aligned} \right\} \\ \qquad + |J_0| + J_1 + (|J_0| + J_1 + 2) \log(1 + \tilde{r}_n) + \log(2(1 - 1/e)^{-1}).$$

Above, we use the convention $0 \times \log(e|\cdot|/0) = 0$ when necessary. Elementary, albeit cumbersome, computations using Proposition 2.5 of [Mas07] yield

$$\sum_{K \in \tilde{\mathcal{K}}} e^{-\Delta_K} \le 1.$$

We consider an event $\mathcal{A}$ of probability $1 - 1/n$ not depending on $X_1, \dots, X_n$ but rather on $X'_1, \dots, X'_n$ and to be specified later on. We apply Proposition 4.1 conditionally to $X'_1, \dots, X'_n$ when $\mathcal{A}$ occurs to define an estimator $\hat{f}$. When $\mathcal{A}$ does not happen, $\hat{f}$ is any density estimator (as $\mathcal{A}$ is not known by the statistician, we should take the same, but the whole point is that we do not need any of its properties). We take the expectation of the result and simplify it a bit. This leads to: for all $J_0 \le 0$ and $J_1 \ge 0$:

$$\mathbb{E}[h^2(f, \hat{f}) \mathbb{1}_{\mathcal{A}}] \le c \mathbb{E} \left[ \left\{ \sum_{j=J_0}^{J_1} U_j + T + A \right. \right. \\ \left. \left. + \frac{|\tilde{\mathbb{Z}}_{J_0, \tilde{r}_n, -}| + (|J_0| + J_1 + 1) \log(1 + \tilde{r}_n)}{n} \right\} \mathbb{1}_{\mathcal{A}} \right], (4.8)$$

where

$$U_j = \inf_{0 \le r_j \le \tilde{r}_n} \left\{ U_{j,r_j,-} + \sum_{r=r_j+1}^{\tilde{r}_n} U_{j,r} \right\} \\ U_{j,r_j,-} = \inf_{K_j \subset \tilde{\mathbb{Z}}_{j,r_j,-}} \sum_{k \in \tilde{\mathbb{Z}}_{j,r_j,-} \setminus K_j} \beta_{j,k}^2 + \frac{|K_j|}{n} \log_+(|\tilde{\mathbb{Z}}_{j,r_j,-}|/|K_j|)$$
We then derive from Lemma 30 of [Sar23],

$$
\begin{align}
U_j &\le c_4 \left\{ R^p 2^{-jp(\alpha+1/2-1/p)} n^{-(1-p/2)} \log_+ (MR^{-p} 2^{r_j \theta} n^{-p/2} 2^{jp(\alpha+1/2-\theta/p)}) \right. \nonumber \\
&\qquad \left. + 2^{-r_j/2} n^{-1/2} \log_+ (M 2^{r_j(\theta+1/2)} 2^{j(1-\theta)} n^{-1/2}) \right\} \nonumber \\
&\le c_5 R^p 2^{-jp(\alpha+1/2-1/p)} n^{-(1-p/2)} \nonumber \\
&\qquad \times \log_+ (MR^{-p(1+2\theta)} n^{\theta-p/2-p\theta} 2^{j(p/2-3\theta+\alpha p+p\theta+2\alpha p\theta)}). \tag{32}
\end{align}
$$

We now have when $j \ge 0$,

$$
(33) \qquad U_j \le U_{j,+} + U_{j,-},
$$

with

$$
U_{j,+} = \sum_{r=j}^{\infty} U_{j,r} \quad \text{and} \quad U_{j,-} = \sum_{r=0}^{j-1} U_{j,r}.
$$

We deduce from Lemma 7,

$$
U_{j,+} \le c_6 \sum_{r \ge 0} \min \left\{ \frac{2^{-r/2-j/2}}{\sqrt{n}} \log_+ \left( M \frac{2^{r(\theta+1/2)} 2^{3j/2}}{\sqrt{n}} \right), M \frac{2^j 2^{r\theta}}{n} \right\}.
$$

Elementary computations lead to

$$
U_{j,+} \le \begin{cases} c_7 2^{-j/2} n^{-1/2} \log_+ (M 2^{3j/2} n^{-1/2}) & \text{if } 2^{3j} \ge nM^{-2} \\ c_7 M^{1/(2\theta+1)} 2^{j(1-\theta)/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} & \text{otherwise.} \end{cases}
$$

We also deduce from (21), $U_{j,-} \le c_8 M 2^j n^{-1}$. Therefore, (33) gives

$$
U_j \le \begin{cases} c_9 M 2^j n^{-1} & \text{if } 2^{3j} \ge nM^{-2} \\ c_9 M^{1/(2\theta+1)} 2^{j(1-\theta)/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} & \text{otherwise.} \end{cases}
$$

Suppose that $R^2 M^{-2/p} n \ge 1$ and consider the smallest integer $j_0 \ge 0$ such that
$$2^{j_0(2\alpha+1)} \ge R^2 M^{-2/p} n.$$

Then,

$$
\begin{align*}
& \sum_{2^{3j} \ge nM^{-2}} U_j \\
\le & c_{10} \left\{ \sum_{j=0}^{j_0} M 2^j n^{-1} + \sum_{j=j_0+1}^{\infty} R^p 2^{-jp(\alpha+1/2-1/p)} n^{-(1-p/2)} \right. \\
& \qquad \left. \times \log_+ (MR^{-p} n^{\theta-p/2} 2^{jp(\alpha+1/2-\theta/p)}) \right\} \\
\le & c_{11} M^{(1+2\alpha-2/p)/(2\alpha+1)} R^{2/(2\alpha+1)} n^{-2\alpha/(2\alpha+1)} \log_+ (n^\alpha M^{1/p} R^{-1}).
\end{align*}
$$

When $R^2 M^{-2/p} n < 1$, we only use (31):

$$
\sum_{2^{3j} \ge n M^{-2}} U_j \le c_{12} R^p n^{-(1-p/2)} \log_+ (MR^{-p} n^{\theta-p/2}).
$$
$$
\begin{align*}
U_{j,r} &= \inf_{K_j \subset \tilde{Z}_{j,r} \setminus K_j} \sum_{k \in \tilde{Z}_{j,r} \setminus K_j} \beta_{j,k}^2 + \frac{|K_j|}{n} \log_+ \left( \frac{|\tilde{Z}_{j,r}|}{|K_j|} \right) \\
T &= \sum_{j=J_0}^{J_1} \sum_{k \in \mathbb{Z} \setminus \tilde{Z}_{j,r, \bar{r}_n, -}} \beta_{j,k}^2 + \sum_{k \in \mathbb{Z} \setminus \tilde{Z}_{J_0, r, \bar{r}_n, -}} \alpha_{J_0, k}^2 \\
A &= \sum_{j=J_1+1}^{\infty} \sum_{k \in \mathbb{Z}} \beta_{j,k}^2,
\end{align*}
$$

where $\alpha_{J_0,k} = \alpha_{J_0,k}(\sqrt{f})$, $\beta_{j,k} = \beta_{j,k}(\sqrt{f})$, and where $\log_+(x) = \log(e+x)$.

Since $\hat{f}$ is always a density, $h^2(f, \hat{f}) \le 1$. The triangle inequality then ensures,

$$
\begin{align}
\mathbb{E}[h^2(f, \hat{f})] &\le \mathbb{E}[h^2(f, \hat{f})1_A] + \mathbb{P}(A^c) \nonumber \\
&\le \mathbb{E}[h^2(f, \hat{f})1_A] + 1/n. \tag{4.9}
\end{align}
$$

Within one residual term, inequality (4.8) hence gives an upper-bound on the Hellinger risk $\mathbb{E}[h^2(f, \hat{f})]$ of $\hat{f}$. We now need the two following lemmas, to be proven after the present proof.

**Lemma 6.** There exist $\rho > 0$ and an event $\mathcal{A}$ meeting the above conditions on which the three inequalities below hold true. First,

$$
T \le c \left[ (J_1 - J_0 + 1) \frac{\log n}{n} + M 2^{J_0(1-\theta)} \left( \frac{\log n}{n} \right)^{1-\theta} \right],
$$

Second,

$$
A \leq c R^{q_1} 2^{-J_1(1-1/q_2)}.
$$

The terms $q_1 \ge 0, q_2 > 1$ only depend on $\alpha, p$ and the wavelet basis. Third, the
cardinality of $\tilde{Z}_{j,r,-}$ can be bounded from above for all $j \in \mathbb{Z}$ and $r \in \{0, \dots, \bar{r}_n\}$
by

$$
|\tilde{Z}_{j,r,-}| \le c [1 + M 2^{r\theta} 2^{j(1-\theta)}]. \quad (4.10)
$$

Above, c only depends on $\alpha, p, \theta$ and the wavelet basis.

**Lemma 7.** The following results hold true on the event $\mathcal{A}$ and are written for the value of $\rho$ given by Lemma 6. For all $j \in \mathbb{Z}$ and $r \le \bar{r}_n$,

$$
U_{j,r} \le c \frac{2^{-r/2}}{\sqrt{n}} \log_+ \left( 2^{r/2} \frac{1 + M 2^{r\theta} 2^{j(1-\theta)}}{\sqrt{n}} \right) \quad (4.11)
$$

$$
U_{j,r} \le c \frac{1 + M 2^{r\theta + j(1-\theta)}}{n}. \quad (4.12)
$$

We also have when $p \ge 2$ and $j \ge 0$,

$$
U_{j,r} \le c R^2 M^{1-2/p} 2^{-j(2\alpha-2\theta/p+\theta)} 2^{r\theta(1-2/p)}. \quad (4.13)
$$
We now deal with smaller values of $j$. We first suppose

$$ (34) \qquad R^p n^{-(1-p/2)} \geq M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)}, $$

and

$$ (35) \qquad n^{2\alpha-2\theta/p-1+2\theta} R^{-4(1-\theta)} M^{-2(1+2\alpha-2/p)} \geq 1. $$

The first inequality allows us to consider the smallest integer $j_1 \ge 0$ such that

$$ 2^{j_1[(1-\theta)/(2\theta+1)+p(\alpha+1/2-1/p)]} \geq R^p M^{-1/(2\theta+1)} n^{(\theta+1)/(2\theta+1)-1+p/2}. $$

The second ensures

$$ n^{1-p} R^{-2p} 2^{2jp(\alpha+1/2-1/p)} \geq 1 $$

for all $j \ge j_1$. We may hence use (32):

$$ \begin{aligned} \sum_{\substack{j \ge 0 \\ 2^{3j} < nM^{-2}}} U_j \le c_{13} & \left\{ \sum_{j=0}^{j_1} M^{1/(2\theta+1)} 2^{j(1-\theta)/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} \right. \\ & + \sum_{j=j_1+1}^{\infty} R^p 2^{-jp(\alpha+1/2-1/p)} n^{-(1-p/2)} \\ & \qquad \left. \times \log_+ (MR^{-p(1+2\theta)} n^{\theta-p/2-p\theta} 2^{j(p/2-3\theta+\alpha p+p\theta+2\alpha p\theta)}) \right\} \\ & \le c_{14} R^{\beta_1} M^{\beta_2} n^{-\gamma}. \end{aligned} $$

When either (34) or (35) is not true, we merely apply (31):

$$ \sum_{\substack{j \ge 0 \\ 2^{3j} < nM^{-2}}} U_j \le c_{15} R^p n^{-(1-p/2)} \log_+ (MR^{-p} n^{\theta-p/2}). $$

The above provides an upper-bound on

$$ \sum_{j=0}^{\infty} U_j. $$

We still have to work with negative values of $j$. For this, we use (20) and (21):

$$ \sum_{j=J_0}^{0} U_j \\ \le c_{16} \sum_{j=0}^{|J_0|} \sum_{r=0}^{r_n} \min \left\{ \frac{2^{-r/2}}{\sqrt{n}} \log_+ \left( 2^{r/2} \frac{1+M2^{r\theta}2^{-j(1-\theta)}}{\sqrt{n}} \right), \frac{1+M2^{r\theta}2^{-j(1-\theta)}}{n} \right\}. $$
When $p < 2$ and $j \ge 0$,

$$ U_{j,r,-} \le c R^p 2^{-jp(\alpha+1/2-1/p)} n^{-(1-p/2)} \\ \times \log_+ \left( M R^{-p} 2^{r\theta} n^{-p/2} 2^{jp(\alpha+1/2-\theta/p)} \right). \quad (4.14) $$

In these inequalities, $c$ only depends on $\alpha, p, \theta$ and the wavelet basis.

We are now in position to prove Theorem 3.2. We define $J_1$ as the smallest integer such that $R^{q_1} 2^{-J_1(1-1/q_2)} \le 1/n$ where $q_1, q_2$ appear in Lemma 6. We define $J_0$ as the largest negative integer such that

$$ M 2^{J_0(1-\theta)} \le \left( \frac{\log n}{n} \right)^{\theta}. $$

We deduce from (4.8), (4.9) some $c_1, c_2$ such that

$$ \mathbb{E}[h^2(f, \hat{f})] \le c_1 \mathbb{E} \left[ \sum_{j=J_0}^{J_1} U_j 1_A \right] \\ + c_2 \frac{\log n + \log(1+R) + \log M}{n} \log(1+\bar{r}_n). $$

The factor $c_1$ only depends on the wavelet basis, whereas $c_2$ only depends on $\alpha, p, \theta$ and the wavelet basis. It then remains to bound

$$ U = \sum_{j=J_0}^{J_1} U_j $$

on $A$ from above. We treat cases $p \ge 2$ and $p < 2$ separately.

*Proof of Theorem 3.2 when $p \ge 2$.* Note that

$$ U_j \le \sum_{r=1}^{\bar{r}_n} U_{j,r}. $$

For all $j \ge 0$ and $r \le \bar{r}_n$, Lemma 7 implies:

$$ U_{j,r} \le c_1 \min \left\{ \frac{2^{-r/2} \log_+ \left( \frac{M 2^{r(\theta+1/2)} 2^{j(1-\theta)}}{\sqrt{n}} \right)}{R^2 M^{1-2/p} 2^{-j(2\alpha-2\theta/p+\theta)} 2^{r\theta(1-2/p)}}, \frac{M 2^{r\theta} 2^{j(1-\theta)}}{n} \right\}. $$

We first compute

$$ U^{(1)} = \sum_{j=0}^{\infty} \sum_{r=j}^{\bar{r}_n} U_{j,r} $$
We have already found an upper-bound of this term when $p \ge 2$. The calculations are the same here. We now put all these results together to get (7) with

$$ (36) \qquad \begin{aligned} v_n ={}& R^{2/(1+2\alpha)} M^{(1+2\alpha-2/p)/(1+2\alpha)} n^{-2\alpha/(2\alpha+1)} \log_+ (n^\alpha M^{1/p} R^{-1}) \\ & + M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} + \log^2(M(n/\log n)^\theta)n^{-1} \\ & + R^p n^{-(1-p/2)} \log_+ (MR^{-p}n^{\theta-p/2}) \left[ \begin{aligned} & 1_{M^{-2/p}R^2n<1} \\ & + 1_{R^p n^{-(1-p/2)}<M^{1/(2\theta+1)}n^{-(\theta+1)/(2\theta+1)}} \\ & + 1_{n^{2\alpha-2\theta/p-1+2\theta}R^{-4(1-\theta)}M^{-2(1+2\alpha-2/p)}<1} \end{aligned} \right] \\ & + \log_+^2(M^2/n)n^{-1/2}1_{n\le M^2} + \log(1+R)\log(1+\log n)n^{-1} \\ & + (\log M)\log(1+\log n)n^{-1} + (\log n)\log(1+\log n)n^{-1}. \end{aligned} $$

□

### 4.6.1. Proofs of Lemmas 6 and 7: preliminary results

**Lemma 8.** There is an event $\mathcal{A}$ of probability $1 - 1/n$ on which: for all $r > 0$ such that $2^r \le n$, and for all interval $I \subset \mathbb{R}$ such that $2^{-r} < \mathbb{P}(X \in I) \le 2^{-r+1}$,

$$ \left| \frac{1}{n} \sum_{i=1}^{n} \{1_I(X'_i) - \mathbb{E}[1_I(X'_i)]\} \right| \le c \left[ \sqrt{\frac{2^{-r} \log n}{n}} + \frac{\log n}{n} \right], $$

where $c$ is numerical value. In particular, there is some $\rho > 0$ such that any interval $I$ satisfying $n^{-1} \sum_{i=1}^n 1_I(X'_i) \ge \rho(\log n)/n$ is such that:

$$ \frac{1}{2} \mathbb{P}(X \in I) \le \frac{1}{n} \sum_{i=1}^{n} 1_I(X'_i) \le 2 \mathbb{P}(X \in I). $$

*Sketch of the proof of Lemma 8.* A short way to prove the lemma is to remark that the collection of functions of the form $1_I$ where $I$ is an interval is VC subgraph with finite dimension. We then apply Proposition 6 of [Sar23]. □

**Lemma 9.** Let $m \in \mathbb{R}$ such that $f$ is non-increasing on $[m, +\infty)$ and non-decreasing on $(-\infty, m]$. Then, for all $j \in \mathbb{Z}$, $k_0 \ge L_{wav} + 1 + m2^j$,

$$ (37) \qquad \sum_{k \ge k_0} |\beta_{j,k}| \le c f_{j,k_0-1}^{1/2}, $$

where

$$ f_{j,k} = \int_{I_{j,k}} f(x) \, dx = \int_{2^{-j}(k-L_{wav})}^{2^{-j}(k+L_{wav})} f(x) \, dx, $$

and where we recall that $I_{j,k}$ is given by (16). Moreover, for all $j \in \mathbb{Z}$, $k_0 \le -L_{wav} - 1 + m2^j$,

$$ (38) \qquad \sum_{k \le k_0} |\beta_{j,k}| \le c f_{j,k_0+1}^{1/2}. $$

Above, $c$ only depends on the wavelet basis.
$$ \le c_2 \sum_{r=0}^{\bar{n}} \sum_{j=0}^{\infty} \min \left\{ \frac{2^{-r/2-j/2}}{\sqrt{n}} \log_+ \left( M \frac{2^{r(\theta+1/2)} 2^{3j/2}}{\sqrt{n}} \right), R^2 M^{1-2/p} 2^{-2j\alpha} 2^{r\theta(1-2/p)}, \frac{M 2^{r\theta} 2^j}{n} \right\}. \quad (4.15) $$

Let us denote by $U_r^{(1)}$ the sum in $j$. We may bound it from above by proceeding as follows. First, let us assume that

$$ nM^{-2}2^{-r(2\theta+1)} \le 1. $$

Lemma 30 of [Sar23] entails:

$$ U_r^{(1)} \le c_3 \frac{2^{-r/2}}{\sqrt{n}} \log_+ \left( M \frac{2^{r(\theta+1/2)}}{\sqrt{n}} \right). \quad (4.16) $$

In the contrary case, we may consider the largest integer $j_r \ge 0$ such that

$$ 2^{3j_r} \le nM^{-2}2^{-r(2\theta+1)}. $$

We then have,

$$ \begin{aligned} U_r^{(1)} &\le \sum_{j=0}^{j_r} \frac{M 2^{r\theta} 2^j}{n} + \sum_{j=j_r+1}^{\infty} \frac{2^{-r/2-j/2}}{\sqrt{n}} \log_+ \left( M \frac{2^{r(\theta+1/2)} 2^{3j/2}}{\sqrt{n}} \right) \\ &\le c_4 M^{1/3} n^{-2/3} 2^{-r(1-\theta)/3}. \end{aligned} \quad (4.17) $$

To get the last inequality, Lemma 30 of [Sar23] is used once again. By grouping (4.16) and (4.17), we thus have for all $r \ge 0$,

$$ U_r^{(1)} \le c_5 \left\{ M^{1/3} n^{-2/3} 2^{-r(1-\theta)/3} + 2^{-r/2} n^{-1/2} \log_+ \left( M 2^{r(\theta+1/2)} n^{-1/2} \right) \mathbb{1}_{nM^{-2} \le 2^{r(2\theta+1)}} \right\}. \quad (4.18) $$

This bound is obtained by using only the minimum between terms 1 and 3 in (4.15). We can also make a similar reasoning with terms 2 and 3 only. This leads to

$$ U_r^{(1)} \le c_6 \left[ R^{2/(1+2\alpha)} M^{(1+2\alpha-2/p)/(1+2\alpha)} n^{-2\alpha/(2\alpha+1)} 2^{r\theta(1-2/((1+2\alpha)p))} + R^2 M^{1-2/p} 2^{r\theta(1-2/p)} \mathbb{1}_{nR^2 M^{-2/p} \le 2^{2r\theta/p}} \right]. \quad (4.19) $$

If

$$ M^{1/3-(1+2\alpha-2/p)/(1+2\alpha)} R^{-2/(1+2\alpha)} n^{2\alpha/(2\alpha+1)-2/3} \le 1, $$

we sum (4.18) for all $r$. Thereby,

$$ U^{(1)} \le c_7 \left[ M^{1/3} n^{-2/3} + M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} \right] $$
Proof of Lemma 9. We only show (37), the proof of (38) is similar. Since $\int \psi_{j,k}(x) dx = 0$ for all $j, k \in \mathbb{Z}$, we deduce for all $k \ge L_{\text{wav}} + 1 + m2^j$,

$$ egin{aligned} |\beta_{j,k}| &= \left| \int \left( \sqrt{f(x)} - \sqrt{f(2^{-j}(k + L_{\text{wav}}))} \right) \psi_{j,k}(x) dx \right| \\ &\le 2^{j/2} \|\psi\|_{\infty} \int_{2^{-j}(k-L_{\text{wav}})}^{2^{-j}(k+L_{\text{wav}})} \left( \sqrt{f(x)} - \sqrt{f(2^{-j}(k + L_{\text{wav}}))} \right) dx \\ &\le 2^{1-j/2} L_{\text{wav}} \|\psi\|_{\infty} \left( \sqrt{f(2^{-j}(k - L_{\text{wav}}))} - \sqrt{f(2^{-j}(k + L_{\text{wav}}))} \right). \end{aligned} $$

Therefore,

$$ egin{aligned} \sum_{k \ge k_0} |\beta_{j,k}| &\le c_1 2^{-j/2} \sqrt{f(2^{-j}(k_0 - L_{\text{wav}}))} \\ &\le c_2 2^{j/2} \int_{2^{-j}(k_0 - L_{\text{wav}} - 1)}^{2^{-j}(k_0 - L_{\text{wav}})} \sqrt{f(x)} dx \\ &\le c_3 \sqrt{\int_{2^{-j}(k_0 - L_{\text{wav}} - 1)}^{2^{-j}(k_0 - L_{\text{wav}})} f(x) dx} \\ &\le c_3 f_{j,k_0-1}^{1/2}. \end{aligned} $$

□

**Lemma 10.** We consider $m \in \mathbb{R}$ such that $f$ is non-increasing on $[m, +\infty)$ and non-decreasing on $(-\infty, m]$. We set for all $r \le \bar{r}_n$,

$$ egin{aligned} \tilde{Z}_{j,r+,\text{right}} &= \left\{ k \in \mathbb{Z} \cap [L_{\text{wav}} + m2^j, +\infty), \frac{1}{n} \sum_{i=1}^{n} 1_{X'_i \in I_{j,k}} \le 2^{-r+1} \right\} \\ \tilde{Z}_{j,r+,\text{left}} &= \left\{ k \in \mathbb{Z} \cap (-\infty, -L_{\text{wav}} + m2^j], \frac{1}{n} \sum_{i=1}^{n} 1_{X'_i \in I_{j,k}} \le 2^{-r+1} \right\} \end{aligned} $$

and

$$ \tilde{k}_{j,r,\text{right}} = \min \tilde{Z}_{j,r+,\text{right}} + 1, $$

$$ \tilde{k}_{j,r,\text{left}} = \max \tilde{Z}_{j,r+,\text{left}} - 1. $$

Let $\rho > 0$ and $A$ be given by Lemma 8. On this event, the above sets are non-empty. Moreover, $f_{j,k} \le c2^{-r}$ for all $j \in \mathbb{Z}$, $r \le \bar{r}_n$, $k \ge \tilde{k}_{j,r,\text{right}} - 1$ or $k \le \tilde{k}_{j,r,\text{left}} + 1$. Moreover,

$$ (39) \qquad \sum_{k \ge \tilde{k}_{j,r,\text{right}}} |\beta_{j,k}| \le c2^{-r/2} \quad \text{and} \quad \sum_{k \ge \tilde{k}_{j,r,\text{right}}} \beta_{j,k}^2 \le c2^{-r} $$

$$ (40) \qquad \sum_{k \le \tilde{k}_{j,r,\text{left}}} |\beta_{j,k}| \le c2^{-r/2} \quad \text{and} \quad \sum_{k \le \tilde{k}_{j,r,\text{left}}} \beta_{j,k}^2 \le c2^{-r}. $$

We also have when $f \in \mathcal{W}\mathcal{T}_{\theta}(M)$,

$$ (41) \qquad |\tilde{Z}_{j,r,-}| \le c [1 + M2^{r\theta} 2^{j(1-\theta)}]. $$
$$ \leq c_7 \left[ M^{(1+2\alpha-2/p)/(1+2\alpha)} R^{2/(1+2\alpha)} n^{-2\alpha/(2\alpha+1)} + M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} \right]. $$

Otherwise, we define $\mathbf{v}_0 \ge 0$ as the largest integer such that

$$ \begin{aligned} & 2^{\mathbf{v}_0(1+2\alpha+2\theta+4\alpha\theta-6\theta/p)/(3(2\alpha+1))} \\ & \le M^{1/3-(1+2\alpha-2/p)/(1+2\alpha)} R^{-2/(1+2\alpha)} n^{2\alpha/(2\alpha+1)-2/3}. \end{aligned} \quad (4.20) $$

We sum (4.18) when $r \ge \mathbf{v}_0 + 1$ and (4.19) when $r \le \mathbf{v}_0$ to get

$$ U^{(1)} \le c_8 \left[ R^{\beta_1} M^{\beta_2} n^{-\gamma} + M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} + R^2 M^{1-2/p} 2^{\mathbf{v}_0\theta(1-2/p)} (1 + \mathbf{v}_0 \mathbf{1}_{p=2}) \mathbf{1}_{nR^2 M^{-2/p} \le 2^{2\mathbf{v}_0\theta/p}} \right]. $$

Observe that

$$ nR^2 M^{-2/p} \le 2^{2\mathbf{v}_0\theta/p} $$

is possible only if

$$ M^{-2(2\alpha+1)/p} R^{2(2\theta+1)(2\alpha+1)} n^{(2\alpha+1)(1-2\theta/p+2\theta)} \le 1, $$

that is if $n$ is small enough. We now study

$$ \begin{aligned} U^{(2)} &= \sum_{j=0}^{\infty} \sum_{r<j} U_{j,r} \\ &\le c_9 \sum_{j=0}^{\infty} \min \left\{ R^2 M^{1-2/p} 2^{-2j\alpha}, M \frac{2^j}{n} \right\} \\ &\le c_{10} \left[ R^{2/(1+2\alpha)} M^{(1+2\alpha-2/p)/(1+2\alpha)} n^{-2\alpha/(2\alpha+1)} + Mn^{-1} \right]. \end{aligned} $$

We finally deal with

$$ \begin{aligned} U^{(3)} &= \sum_{j=J_0}^{0} \sum_{r=0}^{\bar{r}_n} U_{j,r} \\ &\le c_{11} \sum_{j=0}^{|J_0|} \sum_{r=0}^{\bar{r}_n} \min \left\{ \frac{2^{-r/2}}{\sqrt{n}} \log \left( 2^{r/2} \frac{1+M2^{r\theta}2^{-j(1-\theta)}}{\sqrt{n}} \right), \frac{1+M2^{r\theta}2^{-j(1-\theta)}}{n} \right\} \\ &\le c_{12} \frac{|J_0|^2}{n} + c_{12} \sum_{j=0}^{|J_0|} \sum_{r=0}^{\bar{r}_n} U_{j,r}^{(3)} \end{aligned} $$

where

$$ U_{j,r}^{(3)} = \min \left\{ \frac{2^{-r/2}}{\sqrt{n}} \log_+ \left( \frac{M2^{r(\theta+1/2)}2^{-j(1-\theta)}}{\sqrt{n}} \right), \frac{M2^{r\theta}2^{-j(1-\theta)}}{n} \right\}. $$
In these results, c only depends on θ and the wavelet basis.

*Proof of Lemma 10.* We deduce from Lemma 8 that

$$|\tilde{\mathbb{Z}}_{j,r,-}| \le |\{k \in \mathbb{Z}, f_{j,k} > 2^{-r-1}\}|$$

holds true on $\mathcal{A}$. Since

$$f_{j,k} \le \sum_{k'=-L_{\text{wav}}}^{L_{\text{wav}}} F_{j,k+k'}(f),$$

we may use Proposition 5 to get (41). Since $\tilde{\mathbb{Z}}_{j,r,-}$ is finite, $\tilde{\mathbb{Z}}_{j,r,+}$, left and $\tilde{\mathbb{Z}}_{j,r,+}$, right are non-empty.

We now prove (39). The proof of (40) is similar. Lemma 8 ensures that

$$f_{j,\min \tilde{\mathbb{Z}}_{j,r,+}, \text{right}} \le c_1 \left[ \frac{1}{n} \sum_{i=1}^{n} 1_{X_i' \in I_{j,\min \tilde{\mathbb{Z}}_{j,r,+}, \text{right}}} + \frac{\log n}{n} \right] \le c_2 2^{-r}.$$

Moreover, as $f$ is non-increasing on $(m, +\infty)$, we have for all $k \ge \tilde{k}_{j,r,\text{right}} - 1$, $f_{j,k} \le c_2 2^{-r}$. Lemma 9 yields

$$\sum_{k \ge \tilde{k}_{j,r,\text{right}}} |\beta_{j,k}| \le c_3 f_{j,\tilde{k}_{j,r,\text{right}}-1}^{1/2} \\ \le c_4 2^{-r/2}.$$

For the right part of (39), we merely use Cauchy-Schwarz inequality:

$$\sum_{k \ge \tilde{k}_{j,r,\text{right}}} \beta_{j,k}^2 \le \sum_{k \ge \tilde{k}_{j,r,\text{right}}} (f_{j,k})^{1/2} |\beta_{j,k}| \\ \le c_5 2^{-r/2} \sum_{k \ge \tilde{k}_{j,r,\text{right}}} |\beta_{j,k}|.$$

□

### 4.6.2. Proof of Lemma 6. We deduce from Lemma 10,

$$\sum_{\substack{k \in \mathbb{Z} \\ k \ge L_{\text{wav}} + m2^j}} \beta_{j,k}^2 \le \sum_{k \ge \tilde{k}_{j,\bar{r}_n,\text{right}}-1} \beta_{j,k}^2 \le \beta_{j,\tilde{k}_{j,\bar{r}_n,\text{right}}-1}^2 + c_1 \frac{\log n}{n}.$$

Likewise,

$$\sum_{\substack{k \in \mathbb{Z} \\ k \le -L_{\text{wav}} + m2^j}} \beta_{j,k}^2 \le \beta_{j,\tilde{k}_{j,\bar{r}_n,\text{left}}+1}^2 + c_2 \frac{\log n}{n}.$$

Cauchy-Schwarz inequality and Lemma 8 lead to $\beta_{j,k}^2 \le f_{j,k} \le c_3(\log n)/n$ when $k \notin \tilde{\mathbb{Z}}_{j,\bar{r}_n,-}$. By putting it all together,

$$(42) \qquad \sum_{k \in \mathbb{Z} \setminus \tilde{\mathbb{Z}}_{j, \bar{r}_n, -}} \beta_{j,k}^2 \le c_4 \frac{\log n}{n}.$$
Note that

$$|J_0| \le c_{13} \log(M(n/\log n)^\theta).$$

When $2^{2j(1-\theta)} \le M^2/n$ (and $j \ge 0$), which is possible only if $n \le M^2$, we do:

$$
\begin{align*}
\sum_{2^{2j}(1-\theta)} \le M^2/n \sum_{r=0}^{\bar{r}_n} U_{j,r}^{(3)} & \\
&\le \sum_{2^{2j}(1-\theta)} \le M^2/n \sum_{r=0}^{\infty} \frac{2^{-r/2}}{\sqrt{n}} \log_+ \left( \frac{M2^{r(\theta+1/2)}2^{-j(1-\theta)}}{\sqrt{n}} \right) \\
&\le c_{14} \sum_{2^{2j}(1-\theta)} \le M^2/n \frac{1}{\sqrt{n}} \log_+ \left( \frac{M2^{-j(1-\theta)}}{\sqrt{n}} \right) \\
&\le c_{15} \frac{\log_+^2(M^2/n)}{\sqrt{n}}.
\end{align*}
$$

When $2^{2j(1-\theta)} \ge M^2/n$ (and $j \ge 0$), we may consider the largest integer $r_j \ge 0$ such that

$$2^{r_j(2\theta+1)} \le nM^{-2}2^{2j(1-\theta)}.$$

We then have,

$$
\begin{align*}
\sum_{2^{2j}(1-\theta)} \le M^2/n \sum_{r=0}^{\bar{r}_n} U_{j,r}^{(3)} & \\
&\le c_{16} \sum_{j=0}^{|J_0|} \left\{ \sum_{r \ge r_j} \frac{2^{-r/2}}{\sqrt{n}} \log_+ \left( \frac{M2^{r(\theta+1/2)}2^{-j(1-\theta)}}{\sqrt{n}} \right) + \sum_{r<r_j} \frac{M2^{r\theta}2^{-j(1-\theta)}}{n} \right\} \\
&\le c_{17} \sum_{j=0}^{|J_0|} M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} 2^{-j(1-\theta)/(2\theta+1)} \\
&\le c_{18} M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)}.
\end{align*}
$$

In conclusion,

$$U^{(3)} \le c_{19} \left[ M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} + \log^2(M(n/\log n)^\theta) n^{-1} \right. \\ \left. + \log_+^2(M^2/n) n^{-1/2} \mathbb{1}_{n \le M^2} \right].$$

It then remains to sum up the different results to get a bound on $U$ and hence (3.4) where

$$
\begin{align*}
v_n ={}& R^2/(1+2\alpha) M^{(1+2\alpha-2/p)/(1+2\alpha)} n^{-2\alpha/(2\alpha+1)} + M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} \\
& + \log^2(M(n/\log n)^\theta) n^{-1} + (\log n)(\log(1+\log n)) n^{-1} \\
& + (\log M) \log(1+\log n) n^{-1} + \log(1+R) \log(1+\log n) n^{-1} + Mn^{-1}
\end{align*}
$$
We also have $\alpha_{J_0,k}^2 \le f_{J_0,k} \le c_5(\log n)/n$ when $k \notin \tilde{\mathbb{Z}}_{J_0, \bar{r}_n, -}$. Hence,

$$ \sum_{k \in \mathbb{Z} \setminus \tilde{\mathbb{Z}}_{J_0, \bar{r}_n, -}} \alpha_{J_0, k}^2 \le \sum_{2^r \ge c_6 n / (\log n)} 2^{-r} \left| \{ k \in \mathbb{Z}, f_{J_0, k} \ge 2^{-r} \} \right|. $$

By doing as at the beginning of the proof of Lemma 10,

$$ \left| \{ k \in \mathbb{Z}, f_{J_0, k} \ge 2^{-r} \} \right| \le c_7 [1 + M 2^{r\theta} 2^{J_0(1-\theta)}]. $$

We deduce,

$$ \sum_{k \in \mathbb{Z} \setminus \tilde{\mathbb{Z}}_{J_0, \bar{r}_n, -}} \alpha_{J_0, k}^2 \le c_8 \left[ \frac{\log n}{n} + M \left( \frac{\log n}{n} \right)^{1-\theta} 2^{J_0(1-\theta)} \right]. $$

The upper-bound on $T$ follows from this inequality and (42).

It then remains to bound $A$ from above. The proof of Lemma 2 ensures that there are some $q_1 > 0$, $q_2 > 1$, such that $\|f\|_{q_2} \le c_9 R^{q_1}$ for some $c_9$ only depending on the wavelet basis, $\alpha, p$. Hence,

$$ f_{j,k} \le c_{10} R^{q_1} 2^{-j(1-1/q_2)}. $$

Let

$$ \begin{aligned} \bar{\mathbb{Z}}_{j,r} &= \{k \in \mathbb{Z}, 2^{-r} < f_{j,k} \le 2^{-r+1}\}, \\ \bar{\mathbb{Z}}_{j,r,+} &= \{k \in \mathbb{Z}, f_{j,k} \le 2^{-r+1}\}, \\ \bar{\mathbb{Z}}_{j,r+,\text{right}} &= \{k \in \mathbb{Z} \cap [L_{\text{wav}} + m2^j, +\infty), f_{j,k} \le 2^{-r+1}\}, \\ \bar{\mathbb{Z}}_{j,r+,\text{left}} &= \{k \in \mathbb{Z} \cap (-\infty, -L_{\text{wav}} + m2^j], f_{j,k} \le 2^{-r+1}\}, \end{aligned} $$

and

$$ \begin{aligned} \bar{k}_{j,r,\text{right}} &= \min \bar{\mathbb{Z}}_{j,r+,\text{right}} + 1 \\ \bar{k}_{j,r,\text{left}} &= \max \bar{\mathbb{Z}}_{j,r+,\text{left}} - 1. \end{aligned} $$

We have,

$$ \begin{aligned} A &\le \sum_{j=J_1+1}^{\infty} \sum_{2^r \ge c_{11} R^{-q_1}} \sum_{k \in \bar{\mathbb{Z}}_{j,r}} \beta_{j,k}^2 \\ &\le \sum_{j=J_1+1}^{\infty} \sum_{2^r \ge c_{11} R^{-q_1}} \sum_{k \in [-L_{\text{wav}}+m2^j, L_{\text{wav}}+m2^j] \cap \bar{\mathbb{Z}}_{j,r}} f_{j,k} \\ &\quad + \sum_{j=J_1+1}^{\infty} \sum_{2^r \ge c_{11} R^{-q_1}} \left[ f_{j,\bar{k}_{j,r,\text{right}}-1} + f_{j,\bar{k}_{j,r,\text{left}}+1} + \sum_{\substack{k \ge \bar{k}_{j,r,\text{right}} \\ \text{or } k \le \bar{k}_{j,r,\text{left}}}} \beta_{j,k}^2 \right] \\ &\le c_{12} \sum_{j=J_1+1}^{\infty} \sum_{2^r \ge c_{11} R^{-q_1}} 2^{-r} \end{aligned} $$
$$ + R^2 M^{1-2/p} 2^{\mathfrak{r}_0 \theta(1-2/p)} \\ \times (1 + \mathfrak{r}_0 \mathbf{1}_{p=2}) \mathbf{1}_{M^{-2(1+2\alpha)/p} R^{2(2\theta+1)(2\alpha+1)} n^{(2\alpha+1)(1-2\theta/p+2\theta)} \le 1} \\ + \log_+^2 (M^2/n) n^{-1/2} \mathbf{1}_{n \le M^2} \quad (4.21) $$

and where $\mathfrak{r}_0$ is given by (4.20). □

*Proof of Theorem 3.2 when $p < 2$. We apply Lemma 7: $U_j$ satisfies for all $j \in \{0, \dots, J_1\}$, and $r_j \in \{0, \dots, \bar{r}_n\}$,*

$$ U_j \le c_1 \left\{ R^p 2^{-jp(\alpha+1/2-1/p)} n^{-(1-p/2)} \log_+ (MR^{-p} 2^{r_j \theta} n^{-p/2} 2^{jp(\alpha+1/2-\theta/p)}) \right. \\ \left. + \sum_{r=r_j+1}^{\bar{r}_n} 2^{-r/2} n^{-1/2} \log_+ (M 2^{r(\theta+1/2)} 2^{j(1-\theta)} n^{-1/2}) \right\}. $$

Note that this inequality also holds true for $r_j > \bar{r}_n$. If we choose $r_j = \bar{r}_n$, we get (using $2^{\bar{r}_n} \le c_2 n$),

$$ U_j \le c_3 R^p 2^{-jp(\alpha+1/2-1/p)} n^{-(1-p/2)} \log_+ (MR^{-p} n^{\theta-p/2} 2^{jp(\alpha+1/2-\theta/p)}). \quad (4.22) $$

We may refine this result when $n^{1-p} R^{-2p} 2^{2jp(\alpha+1/2-1/p)} \ge 1$. In this case, we may define the largest number $r_j \ge 0$ satisfying

$$ 2^{r_j} \le n^{1-p} R^{-2p} 2^{2jp(\alpha+1/2-1/p)}. $$

We then derive from Lemma 30 of [Sar23],

$$ \begin{aligned} U_j &\le c_4 \left\{ R^p 2^{-jp(\alpha+1/2-1/p)} n^{-(1-p/2)} \log_+ (MR^{-p} 2^{r_j \theta} n^{-p/2} 2^{jp(\alpha+1/2-\theta/p)}) \right. \\ &\qquad \left. + 2^{-r_j/2} n^{-1/2} \log_+ (M 2^{r_j(\theta+1/2)} 2^{j(1-\theta)} n^{-1/2}) \right\} \\ &\le c_5 R^p 2^{-jp(\alpha+1/2-1/p)} n^{-(1-p/2)} \\ &\qquad \times \log_+ (MR^{-p(1+2\theta)} n^{\theta-p/2-p\theta} 2^{j(p/2-3\theta+\alpha p+p\theta+2\alpha p\theta)}). \end{aligned} \quad (4.23) $$

We now have when $j \ge 0$,

$$ U_j \le U_{j,+} + U_{j,-}, \quad (4.24) $$

with

$$ U_{j,+} = \sum_{r=j}^{\infty} U_{j,r} \quad \text{and} \quad U_{j,-} = \sum_{r=0}^{j-1} U_{j,r}. $$

We deduce from Lemma 7,

$$ U_{j,+} \le c_6 \sum_{r \ge 0} \min \left\{ \frac{2^{-r/2-j/2}}{\sqrt{n}} \log_+ \left( M \frac{2^{r(\theta+1/2)} 2^{3j/2}}{\sqrt{n}} \right), M \frac{2^j 2^{r\theta}}{n} \right\}. $$
$$ \leq c_{13} R^{q_1} 2^{-J_1(1-1/q_2)}. $$

<figure><img src="image_4.png" /></figure>

**4.6.3. Proof of Lemma 7.** The proof of (21) simply ensues from (41). As to (22), we do the same reasoning as in the proof of Lemma 3. In short, for all $p \geq 2$,

$$ \sum_{k \in \tilde{Z}_{j,r}} \beta_{j,k}^2 \leq c_2 R^2 2^{-2j(\alpha+1/2-1/p)} |\tilde{Z}_{j,r}|^{1-2/p}. $$

We then use (41). The same goes for (23): we set

$$ K_{j,r} = \{k \in \tilde{Z}_{j,r,-}, |\beta_{j,k}| \geq 1/\sqrt{n}\}. $$

As $\sqrt{f}$ is smooth, we have:

$$ |K_{j,r}| \leq c_3 n^{p/2} R^{p/2} 2^{-jp(\alpha+1/2-1/p)}. $$

A suitable inequality in weak spaces – see (35) of [Sar23] – leads to

$$ \sum_{k \in \tilde{Z}_{j,r,-} \setminus K_{j,r}} \beta_{j,k}^2 \leq c_4 n^{-(1-p/2)} R^{p/2} 2^{-jp(\alpha+1/2-1/p)}. $$

We deduce,

$$ \begin{aligned} U_{j,r,-} &\leq c_5 n^{p/2-1} R^{p/2-2jp(\alpha+1/2-1/p)} \log_+ \left( |\tilde{Z}_{j,r,-}| n^{-p/2} R^{-p/2} 2^{jp(\alpha+1/2-1/p)} \right) \\ &\leq c_6 n^{p/2-1} R^{p/2-2jp(\alpha+1/2-1/p)} \log_+ \left( M R^{-p/2} 2^{r\theta} n^{-p/2} 2^{jp(\alpha+1/2-\theta/p)} \right), \end{aligned} $$

thanks to (41).

We now show (20). We introduce the integers $\tilde{k}_{j,r,\text{right}}$ and $\tilde{k}_{j,r,\text{left}}$ appearing in Lemma 10. We then set

$$ K_{j,r}^{(1)} = \{k \in \tilde{Z}_{j,r}, k < \tilde{k}_{j,r,\text{right}} \text{ or } |\beta_{j,k}| \geq 1/\sqrt{n}\} $$

$$ K_{j,r}^{(2)} = \{k \in \tilde{Z}_{j,r}, k > \tilde{k}_{j,r,\text{left}} \text{ or } |\beta_{j,k}| \geq 1/\sqrt{n}\} $$

and

$$ K_{j,r} = K_{j,r}^{(1)} \cap K_{j,r}^{(2)}. $$

Now,

$$ \begin{aligned} \sum_{k \in \tilde{Z}_{j,r} \setminus K_{j,r}} \beta_{j,k}^2 &\leq \frac{1}{\sqrt{n}} \left[ \sum_{k \geq \tilde{k}_{j,r,\text{right}}} |\beta_{j,k}| + \sum_{k \leq \tilde{k}_{j,r,\text{left}}} |\beta_{j,k}| \right] \\ &\leq \frac{c_7}{\sqrt{n}} 2^{-r/2}. \end{aligned} $$
Elementary computations lead to

$$ U_{j,+} \le \begin{cases} c_7 2^{-j/2} n^{-1/2} \log_+(M 2^{3j/2} n^{-1/2}) & \text{if } 2^{3j} \ge nM^{-2} \\ c_7 M^{1/(2\theta+1)} 2^{j(1-\theta)/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} & \text{otherwise.} \end{cases} $$

We also deduce from (4.12), $U_{j,-} \le c_8 M 2^j n^{-1}$. Therefore, (4.24) gives

$$ U_j \le \begin{cases} c_9 M 2^j n^{-1} & \text{if } 2^{3j} \ge nM^{-2} \\ c_9 M^{1/(2\theta+1)} 2^{j(1-\theta)/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} & \text{otherwise.} \end{cases} $$

Suppose that $R^2 M^{-2/p} n \ge 1$ and consider the smallest integer $j_0 \ge 0$ such that

$$ 2^{j_0(2\alpha+1)} \ge R^2 M^{-2/p} n. $$

Then,

$$ \begin{aligned} & \sum_{2^{3j} \ge nM^{-2}} U_j \\ & \le c_{10} \left\{ \sum_{j=0}^{j_0} M 2^j n^{-1} + \sum_{j=j_0+1}^{\infty} R^p 2^{-jp(\alpha+1/2-1/p)} n^{-(1-p/2)} \right. \\ & \qquad \left. \times \log_+(MR^{-p}n^{\theta-p/2}2^{jp(\alpha+1/2-\theta/p)}) \right\} \\ & \le c_{11} M^{(1+2\alpha-2/p)/(2\alpha+1)} R^{2/(2\alpha+1)} n^{-2\alpha/(2\alpha+1)} \log_+(n^\alpha M^{1/p}R^{-1}). \end{aligned} $$

When $R^2 M^{-2/p} n < 1$, we only use (4.22):

$$ \sum_{2^{3j} \ge nM^{-2}} U_j \le c_{12} R^p n^{-(1-p/2)} \log_+(MR^{-p}n^{\theta-p/2}). $$

We now deal with smaller values of $j$. We first suppose

$$ R^p n^{-(1-p/2)} \ge M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)}, \quad (4.25) $$

and

$$ n^{2\alpha-2\theta/p-1+2\theta} R^{-4(1-\theta)} M^{-2(1+2\alpha-2/p)} \ge 1. \quad (4.26) $$

The first inequality allows us to consider the smallest integer $j_1 \ge 0$ such that

$$ 2^{j_1[(1-\theta)/(2\theta+1)+p(\alpha+1/2-1/p)]} \ge R^p M^{-1/(2\theta+1)} n^{(\theta+1)/(2\theta+1)-1+p/2}. $$

The second ensures

$$ n^{1-p} R^{-2p} 2^{2jp(\alpha+1/2-1/p)} \ge 1 $$

for all $j \ge j_1$. We may hence use (4.23):

$$ \sum_{2^{3j} < nM^{-2}} U_j \le c_{13} \left\{ \sum_{j=0}^{j_1} M^{1/(2\theta+1)} 2^{j(1-\theta)/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} \right. $$
Moreover,

$$|K_{j,r}| \leq \left| \left\{ k \in \tilde{\mathbb{Z}}_{j,r}, k \in [\tilde{k}_{j,r,\text{left}}, \tilde{k}_{j,r,\text{right}}] \right\} \right| + \sqrt{n} \left[ \sum_{k \geq \tilde{k}_{j,r,\text{right}}} |\beta_{j,k}| + \sum_{k \leq \tilde{k}_{j,r,\text{left}}} |\beta_{j,k}| \right].$$

The elements in the first set are either equal to $\tilde{k}_{j,r,\text{left}}$, $\tilde{k}_{j,r,\text{right}}$, $\tilde{k}_{j,r,\text{left}} + 1$, $\tilde{k}_{j,r,\text{right}} - 1$ or in $[-L_{\text{wav}} + m2^j, L_{\text{wav}} + m2^j]$. Hence, using Lemma 10,

$$|K_{j,r}| \leq c_8 [1 + \sqrt{n} 2^{-r/2}] \\ \leq c_9 \sqrt{n} 2^{-r/2}.$$

We then deduce (20) from (41). □

**4.7. Proof of Theorem 7.** Since the theorem is stated for $R$ and $M$ large enough, we may without loss of generality replace $R$ by $c_1 R$ and $M$ by $c_2 M$, where $c_1, c_2$ only depend on $\alpha, p, \theta$ and the wavelet basis. In other words, we only need to build a subset $\mathcal{U} \mathcal{S}_{p,\theta}^{\alpha}(R, M)$ of $\mathcal{U} \mathcal{S}_{p,\theta}^{\alpha}(c_1 R, c_2 M)$. The densities $f$ in this set may satisfy $\sqrt{f} \in \mathfrak{B}_{p,\infty}^{\alpha}(c_1 R)$ and $\int f^{\theta}(x) dx \leq c_2 M$.

Throughout the proof, we consider $r \geq 1$ and denote the elements of $\{0, 1\}^{r+1}$ by $(\delta_k)_{0 \leq k \leq r}$. We define the Hamming distance $\Delta$ for $\delta, \delta' \in \{0, 1\}^{r+1}$ by

$$\Delta(\delta, \delta') = \sum_{k=0}^{r} |\delta_k - \delta'_k|.$$

We denote the Kullback Leibler divergence between two densities $f$ and $g$ by

$$K(f,g) = \int f(x) \log (f(x)/g(x)) dx,$$

whenever it exists. We use it here for densities $f$ and $g$ that vanish only simultaneously (in which case the convention $0 \times \log(0/0) = 0$ is applied).

It is convenient to draw on the Varshamov-Gilbert bound to prove the lower bound. The lemma below is ready to use. It follows from Theorem 2.5 and Lemma 2.9 of [Tsy08] (see also Section E in the third preprint version of [Sar23] for the constants).

**Lemma 11.** Consider $\bar{r} \geq 14$ and suppose $r = 2\bar{r}$. Then, there is a subset $\mathcal{D}$ of $\{0, 1\}^{r+1}$ such that

$$\sum_{k=0}^{r} \delta_k = \bar{r}$$

for all $\delta \in \mathcal{D}$. Moreover,

$$\Delta(\delta, \delta') \geq \bar{r}/4,$$

for all pair $(\delta, \delta') \in \mathcal{D}$ composed of distinct elements.
$$ + \sum_{j=j_1+1}^{\infty} R^p 2^{-jp(\alpha+1/2-1/p)} n^{-(1-p/2)} \\ \times \log_+(MR^{-p(1+2\theta)} n^{\theta-p/2} p^{2j(p/2-3\theta+\alpha p+p\theta+2\alpha p\theta)}) \} \\ \le c_{14} R^{\beta_1} M^{\beta_2} n^{-\gamma}. $$

When either (4.25) or (4.26) is not true, we merely apply (4.22):

$$ \sum_{\substack{j \ge 0 \\ 2^{3j} < nM^{-2}}} U_j \le c_{15} R^p n^{-(1-p/2)} \log_+(MR^{-p} n^{\theta-p/2}). $$

The above provides an upper-bound on

$$ \sum_{j=0}^{\infty} U_j. $$

We still have to work with negative values of $j$. For this, we use (4.11) and (4.12):

$$ \sum_{j=J_0}^{0} U_j \\ \le c_{16} \sum_{j=0}^{|J_0|} \sum_{r=0}^{r_n} \min \left\{ \frac{2^{-r/2}}{\sqrt{n}} \log_+ \left( 2^{r/2} \frac{1+M2^{r\theta}2^{-j(1-\theta)}}{\sqrt{n}} \right), \frac{1+M2^{r\theta}2^{-j(1-\theta)}}{n} \right\}. $$

We have already found an upper-bound of this term when $p \ge 2$. The calculations are the same here. We now put all these results together to get (3.4) with

$$ \begin{aligned} v_n ={}& R^{2/(1+2\alpha)} M^{(1+2\alpha-2/p)/(1+2\alpha)} n^{-2\alpha/(2\alpha+1)} \log_+ (n^\alpha M^{1/p} R^{-1}) \\ & + M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)} + \log^2(M(n/\log n)^\theta) n^{-1} \\ & + R^p n^{-(1-p/2)} \log_+ (MR^{-p} n^{\theta-p/2}) [1_{M^{-2/p}R^2 n<1} \\ & \qquad + 1_{R^p n^{-(1-p/2)}<M^{1/(2\theta+1)} n^{-(\theta+1)/(2\theta+1)}} \\ & \qquad + 1_{n^{2\alpha-2\theta/p-1+2\theta} R^{-4(1-\theta)} M^{-2(1+2\alpha-2/p)<1}}] \\ & + \log_+^2(M^2/n) n^{-1/2} 1_{n \le M^2} + \log(1+R) \log(1+\log n) n^{-1} \\ & + (\log M) \log(1+\log n) n^{-1} + (\log n) \log(1+\log n) n^{-1}. \end{aligned} \quad (4.27) $$

□

### 4.6.1. *Proofs of Lemmas 6 and 7: preliminary results*

**Lemma 8.** There is an event $\mathcal{A}$ of probability $1 - 1/n$ on which: for all $r > 0$ such that $2^r \le n$, and for all interval $I \subset \mathbb{R}$ such that $2^{-r} < \mathbb{P}(X \in I) \le 2^{-r+1}$,

$$ \left| \frac{1}{n} \sum_{i=1}^{n} \{ 1_I(X'_i) - \mathbb{E}[1_I(X'_i)] \} \right| \le c \left[ \sqrt{\frac{2^{-r} \log n}{n}} + \frac{\log n}{n} \right], $$
We now assume that there exists a family of densities $\mathcal{F} = \{f_\delta, \delta \in \mathcal{D}\}$ indexed by this set and satisfying

$$ (43) \qquad \begin{gathered} h^2(f_\delta, f_{\delta'}) \ge \eta\Delta(\delta, \delta') \\ K(f_\delta, f_{\delta'}) \le \frac{5r}{1000n} \end{gathered} $$

for some $\eta > 0$ and all $\delta \neq \delta' \in \mathcal{D}$.

Then, there exists a numerical value $c > 0$ such that

$$ \mathcal{R}(\mathcal{F}) \ge c\eta r. $$

We need to construct a suitable family $\mathcal{F}$ of densities satisfying the conditions of the previous lemma. The two results below are tailored to solve this problem. They are proven after the current proof.

**Lemma 12.** We consider $q \ge 2$ and two non-negative maps $\zeta_0, \zeta_1$ on $[0, +\infty)$. We suppose that these functions are non-increasing, compactly supported on $[0, 1]$ and with continuous derivatives up to order $q$. Moreover, $\zeta_\delta(0) = 1$, $\zeta_\delta(1) = 0$, and $\zeta_\delta^{(s)}(0) = \zeta_\delta^{(s)}(1) = 0$ for all $\delta \in \{0, 1\}$ and $s \in \{1, \dots, q-1\}$, where $\zeta_\delta^{(s)}$ denotes the $s$th derivative of $\zeta_\delta$. We consider a positive integer $r$, three positive numbers $\tau, b_0, \ell_0, x_0 \in (0, r\ell_0]$, $\varepsilon = \tau/r$, and set for all $k \ge 0$,

$$ \begin{align*} b_k &= b_0(1 + \varepsilon)^{-k} \\ \ell_k &= \ell_0(1 + \varepsilon)^{2k} \\ x_{k+1} &= x_k + \ell_k. \end{align*} $$

We then define for all $x \ge 0$ and $\delta = (\delta_k)_{0 \le k \le r} \in \{0, 1\}^{r+1}$,

$$ (44) \qquad \begin{gathered} g_\delta(x) = b_0 1_{[0, x_0)} \\ + \frac{1}{1 + \varepsilon} \sum_{k=0}^{r} b_k \left[ 1 + \varepsilon \zeta_{\delta_k} \left( \frac{x - x_k}{\ell_k} \right) \right] 1_{[x_k, x_{k+1})}(x). \end{gathered} $$

We extend $g_\delta$ to an even function on $\mathbb{R}$.

This function $g_\delta$ has the following properties: it is unimodal and such that $g_\delta(x_k) = b_k$ for all $k \in \{0, \dots, r\}$, $\delta \in \{0, 1\}^{r+1}$. Moreover, $g_\delta$ lies in $\mathfrak{B}_{p,\infty}^\alpha(c\mathbb{R})$ for all $p \in (0, +\infty]$, $\alpha \in (\max\{1, 1/p-1\}, q)$ and $R > 0$ satisfying

$$ (45) \qquad b_0 r^{1/p-1} \le R \ell_0^{\alpha-1/p} $$

$$ (46) \qquad b_0 \ell_0^{1/p} r^{1/p} \le R. $$

Above, $c$ only depends on the wavelet basis, $\zeta_0, \zeta_1, p, q, \alpha$ and $\tau$.

**Lemma 13.** Consider some $q \ge 2$. There exist two functions $\zeta_0, \zeta_1$ fulfilling the assumptions of Lemma 12. They satisfy

$$ (47) \qquad \int_0^1 \zeta_0(x) \, dx = \int_0^1 \zeta_1(x) \, dx $$

and do not coincide almost everywhere on $[0, 1]$.
where c is numerical value. In particular, there is some $\rho > 0$ such that any interval I satisfying $n^{-1} \sum_{i=1}^{n} 1_I(X'_i) \ge \rho(\log n)/n$ is such that:

$$ \frac{1}{2} \mathbb{P}(X \in I) \le \frac{1}{n} \sum_{i=1}^{n} 1_I(X'_i) \le 2 \mathbb{P}(X \in I). $$

Sketch of the proof of Lemma 8. A short way to prove the lemma is to remark that the collection of functions of the form $1_I$ where $I$ is an interval is VC subgraph with finite dimension. We then apply Proposition 6 of [Sar23]. □

**Lemma 9.** Let $m \in \mathbb{R}$ such that $f$ is non-increasing on $[m, +\infty)$ and non-decreasing on $(-\infty, m]$. Then, for all $j \in \mathbb{Z}$, $k_0 \ge L_{wav} + 1 + m2^j$,

$$ \sum_{k \ge k_0} |\beta_{j,k}| \le c f_{j,k_0-1}^{1/2}, \qquad (4.28) $$

where

$$ f_{j,k} = \int_{I_{j,k}} f(x) \, dx = \int_{2^{-j}(k-L_{wav})}^{2^{-j}(k+L_{wav})} f(x) \, dx, $$

and where we recall that $I_{j,k}$ is given by (4.7). Moreover, for all $j \in \mathbb{Z}$, $k_0 \le -L_{wav} - 1 + m2^j$,

$$ \sum_{k \le k_0} |\beta_{j,k}| \le c f_{j,k_0+1}^{1/2}. \qquad (4.29) $$

Above, c only depends on the wavelet basis.

**Proof of Lemma 9.** We only show (4.28), the proof of (4.29) is similar. Since $\int \psi_{j,k}(x) dx = 0$ for all $j, k \in \mathbb{Z}$, we deduce for all $k \ge L_{wav} + 1 + m2^j$,

$$ \begin{aligned} |\beta_{j,k}| &= \left| \int \left( \sqrt{f(x)} - \sqrt{f(2^{-j}(k+L_{wav}))} \right) \psi_{j,k}(x) dx \right| \\ &\le 2^{j/2} \|\psi\|_{\infty} \int_{2^{-j}(k-L_{wav})}^{2^{-j}(k+L_{wav})} \left( \sqrt{f(x)} - \sqrt{f(2^{-j}(k+L_{wav}))} \right) dx \\ &\le 2^{1-j/2} L_{wav} \|\psi\|_{\infty} \left( \sqrt{f(2^{-j}(k-L_{wav}))} - \sqrt{f(2^{-j}(k+L_{wav}))} \right). \end{aligned} $$

Therefore,

$$ \begin{aligned} \sum_{k \ge k_0} |\beta_{j,k}| &\le c_1 2^{-j/2} \sqrt{f(2^{-j}(k_0 - L_{wav}))} \\ &\le c_2 2^{j/2} \int_{2^{-j}(k_0 - L_{wav} - 1)}^{2^{-j}(k_0 - L_{wav})} \sqrt{f(x)} dx \\ &\le c_3 \sqrt{\int_{2^{-j}(k_0 - L_{wav} - 1)}^{2^{-j}(k_0 - L_{wav})} f(x) dx} \\ &\le c_3 f_{j,k_0-1}^{1/2}. \end{aligned} \qquad \square $$
Let $\bar{r}$ be the largest integer such that

$$ \bar{r} \le R^{\beta_1} M^{\beta_2} n^{1-\gamma}. $$

We consider the smallest integer $q$ larger than $\alpha$, and the set $\mathcal{D}$ given in the first part of Lemma 11. Let then $\zeta_0, \zeta_1$ be the maps given by Lemma 13. We consider $a > 0$ and set

$$ \varepsilon = 1/\bar{r} $$

$$ \ell_0^{2(\alpha-1/p+1/2)} = aR^{-2}n^{-1}r^{2/p} $$

$$ b_0^2 = ar^2(n\ell_0)^{-1}. $$

Note that (45) holds true. Moreover, $b_0\ell_0^{1/p}\varepsilon^{-1/p}$ tends to 0 when $n$ goes to infinity when $\theta < p/2$. Hence (46) is true. When $\theta = p/2$,

$$ b_0 \ell_0^{1/p} \varepsilon^{-1/p} \le 2^{(2\alpha p - 3 + p + 2/p)/(p + 2\alpha p - 2)} a^{\alpha/(1 + 2\alpha - 2/p)} M^{1/p}. $$

We thus also have (46) when $M \le R^p$ and $a$ small enough.

We consider $x_0 = r\ell_0$, $\delta \in \mathcal{D}$, and the map $g_\delta$ defined by (44). Let then $I$ be the value of the integral in (47), and

$$ I_{0,2} = \int_0^1 \zeta_0^2(x) \, dx $$

$$ I_{1,2} = \int_0^1 \zeta_1^2(x) \, dx. $$

Elementary maths lead to:

$$ \int (g_{\delta}(x))^2 dx = \frac{2ar^3}{n} + \frac{8a(1 + 2\varepsilon I)(2 + \varepsilon)}{n(1 + \varepsilon)^2 \varepsilon^3} + \frac{8a(\bar{r}I_{1,2} + (\bar{r} + 1)I_{0,2})}{n(1 + \varepsilon)^2}. $$

This integral does not depend on $\delta$ and tends to 0 when $n$ goes to infinity. Besides,

$$ \int (g_{\delta}(x))^{2\theta} dx \le c_1 b_0^{2\theta} \ell_0 r, $$

for all $n$ large enough and some $c_1 > 0$ only depending on $\zeta_0, \zeta_1$ and $\theta$. In particular,

$$ \int (g_{\delta}(x))^{2\theta} dx \le c_1 a^{(1-2\theta/p+2\alpha\theta)/(1+2\alpha-2/p)} M \\ \le c_1 M, $$

when $a \le 1$. We also have $\text{supp } g_\delta \subset [-c_1 M, c_1 M]$ when $\theta = 0$.

We now apply Lemma 12 with suitable values of parameters to get a unimodal non-negative function $\zeta \in \mathfrak{B}_{p,\infty}^{\alpha}(c_2 R)$, compactly supported on $[-1, 1]$, and such that $\int (\zeta(x))^2 dx > 1$, $\int (\zeta(x))^{2\theta} dx \le M$ (up to an increase of $R, M$). We then consider $s \in (0, 1)$ and set

$$ f_{\delta} = (g_{\delta} + s\zeta)^2. $$

As $x_0 > 1$ for $n$ or $M$ large enough,

$$ \int f_{\delta}(x) \, dx = \int (g_{\delta}(x))^2 \, dx + 2sb_0 \int \zeta(x) \, dx + s^2 \int (\zeta(x))^2 \, dx. $$

Note that $b_0$ tends to 0 as $n$ goes to infinity. We may hence find $s \in (0, 1)$, not depending on $\delta$, such that this integral is 1.
**Lemma 10.** We consider $m \in \mathbb{R}$ such that $f$ is non-increasing on $[m, +\infty)$ and non-decreasing on $(-\infty, m]$. We set for all $r \le \bar{r}_n$,

$$ \begin{aligned} \tilde{Z}_{j,r,+,{\text{right}}} &= \left\{ k \in \mathbb{Z} \cap [L_{\text{wav}} + m2^j, +\infty) , \frac{1}{n} \sum_{i=1}^{n} 1_{X'_i \in I_{j,k}} \le 2^{-r+1} \right\} \\ \tilde{Z}_{j,r,+,{\text{left}}} &= \left\{ k \in \mathbb{Z} \cap (-\infty, -L_{\text{wav}} + m2^j] , \frac{1}{n} \sum_{i=1}^{n} 1_{X'_i \in I_{j,k}} \le 2^{-r+1} \right\} \end{aligned} $$

and

$$ \tilde{k}_{j,r,{\text{right}}} = \min \tilde{Z}_{j,r,+,{\text{right}}} + 1, $$

$$ \tilde{k}_{j,r,{\text{left}}} = \max \tilde{Z}_{j,r,+,{\text{left}}} - 1. $$

Let $\rho > 0$ and $\mathcal{A}$ be given by Lemma 8. On this event, the above sets are non-empty. Moreover, $f_{j,k} \le c2^{-r}$ for all $j \in \mathbb{Z}$, $r \le \bar{r}_n$, $k \ge \tilde{k}_{j,r,{\text{right}}} - 1$ or $k \le \tilde{k}_{j,r,{\text{left}}} + 1$. Moreover,

$$ \sum_{k \ge \tilde{k}_{j,r,{\text{right}}} |\beta_{j,k}| \le c2^{-r/2} \quad \text{and} \quad \sum_{k \ge \tilde{k}_{j,r,{\text{right}}} |\beta_{j,k}^2| \le c2^{-r} \quad (4.30) $$

$$ \sum_{k \le \tilde{k}_{j,r,{\text{left}}} |\beta_{j,k}| \le c2^{-r/2}} \quad \text{and} \quad \sum_{k \le \tilde{k}_{j,r,{\text{left}}} |\beta_{j,k}^2| \le c2^{-r}} \quad (4.31) $$

We also have when $f \in \mathcal{W}\mathcal{T}_{\theta}(M)$,

$$ |\tilde{Z}_{j,r,-}| \le c [1 + M2^{r\theta} 2^{j(1-\theta)}]. \quad (4.32) $$

In these results, $c$ only depends on $\theta$ and the wavelet basis.

**Proof of Lemma 10.** We deduce from Lemma 8 that

$$ |\tilde{Z}_{j,r,-}| \le |\{k \in \mathbb{Z}, f_{j,k} > 2^{-r-1}\}| $$

holds true on $\mathcal{A}$. Since

$$ f_{j,k} \le \sum_{k'=-L_{\text{wav}}}^{L_{\text{wav}}} F_{j,k+k'}(f), $$

we may use Proposition 3.1 to get (4.32). Since $\tilde{Z}_{j,r,-}$ is finite, $\tilde{Z}_{j,r,+,{\text{left}}}$ and $\tilde{Z}_{j,r,+,{\text{right}}}$ are non-empty.

We now prove (4.30). The proof of (4.31) is similar. Lemma 8 ensures that

$$ f_{j,\min \tilde{Z}_{j,r,+,{\text{right}}} } \le c_1 \left[ \frac{1}{n} \sum_{i=1}^{n} 1_{X'_i \in I_{j,\min \tilde{Z}_{j,r,+,{\text{right}}}}} + \frac{\log n}{n} \right] \le c_2 2^{-r}. $$
By putting all these results together, by using Lemma 12 and Proposition 5, we get that $f_\delta$ is a density lying in $\mathcal{S}_{p,\theta}^\alpha(c_3R, c_4M)$ and such that $\sqrt{f_\delta} \in \mathfrak{B}_{p,\infty}^\alpha(c_3R)$. Its support is included in $[-c_1M, c_1M]$ when $\theta = 0$.

Since $g_\delta$ is unimodal, we have $g_\delta(x) \in [b_{r+1}, b_0]$ for all $x \in [-x_{r+1}, x_{r+1}]$ that is for all $x$ in the support of $f_\delta$. An elementary inequality yields $b_0 \le e^3 b_{r+1}$. We then deduce from Lemma 2.7 of [Tsy08], that for all $\delta \ne \delta' \in \mathcal{D}$,

$$
\begin{align*}
K(f_\delta, f_{\delta'}) &\le b_{r+1}^{-2} \int (f_\delta(x) - f_{\delta'}(x))^2 \, dx \\
&\le b_{r+1}^{-2} \int (g_\delta(x) - g_{\delta'}(x))^2 (g_\delta(x) + g_{\delta'}(x) + 2s\zeta(x))^2 \, dx \\
&\le b_{r+1}^{-2} \int (g_\delta(x) - g_{\delta'}(x))^2 (g_\delta(x) + g_{\delta'}(x))^2 \, dx \\
&\le 4e^6 \int (g_\delta(x) - g_{\delta'}(x))^2 \, dx \\
&\le \frac{8e^6}{(1+\varepsilon)^2} \varepsilon^2 \sum_{k=0}^r b_k^2 \ell_k |\delta_k - \delta_{k'}| \int (\zeta_0(x) - \zeta_1(x))^2 \, dx \\
&\le c_5 b_0^2 \ell_0 \varepsilon^2 r \\
&\le c_6 ar/n,
\end{align*}
$$

where $c_5, c_6$ only depend on $\zeta_0, \zeta_1$. We now choose a small enough to ensure that (43) holds true.

Moreover,

$$
\begin{align*}
h^2(f_\delta, f_{\delta'}) &= \frac{\varepsilon^2}{(1+\varepsilon)^2} \sum_{k=0}^{r} b_k^2 \ell_k |\delta_k - \delta_{k'}| \int_0^1 (\zeta_0(x) - \zeta_1(x))^2 \, dx \\
&\geq c_7 b_0^2 \ell_0 \varepsilon^2 \Delta(\delta, \delta'), \\
&\geq c_8 (a/n) \Delta(\delta, \delta'),
\end{align*}
$$

for some $c_7, c_8 > 0$ only depending on $\zeta_0, \zeta_1$.

We may hence apply Lemma 11 with $\eta$ of the order of $n^{-1}$. This leads to

$$
\mathcal{R}(\mathcal{F}) \geq c_9 r/n,
$$

where $\mathcal{F} = \{f_\delta, \delta \in \mathcal{D}\}$. We conclude using the definition of $r$. $\square$

*Proof of Lemma 12.* The only delicate point is $g_\delta \in \mathfrak{B}_{p,\infty}^\alpha(cR)$ for some $c$. We prove this result when $p < \infty$. The proof when $p = \infty$ is obtained by making slight modifications. We suppose without loss of generality that $q \ge 2$ is the smallest integer larger than $\alpha$.

The $q^{\text{th}}$ order difference operator evaluated in $g_\delta$ is defined for $h > 0$ and $x \in \mathbb{R}$ by

$$
\Delta_h^q g_\delta(x) = \sum_{j=0}^{q} \binom{q}{j} (-1)^{q-j} g_\delta(x + jh).
$$
Moreover, as $f$ is non-increasing on $(m, +\infty)$, we have for all $k \ge \tilde{k}_{j,r,\text{right}} - 1$, $f_{j,k} \le c_2 2^{-r}$. Lemma 9 yields

$$ \sum_{k \ge \tilde{k}_{j,r,\text{right}}} |\beta_{j,k}| \le c_3 f_{j,\tilde{k}_{j,r,\text{right}}-1}^{1/2} \\ \le c_4 2^{-r/2}. $$

For the right part of (4.30), we merely use Cauchy-Schwarz inequality:

$$ \sum_{k \ge \tilde{k}_{j,r,\text{right}}} \beta_{j,k}^2 \le \sum_{k \ge \tilde{k}_{j,r,\text{right}}} (f_{j,k})^{1/2} |\beta_{j,k}| \\ \le c_5 2^{-r/2} \sum_{k \ge \tilde{k}_{j,r,\text{right}}} |\beta_{j,k}|. \quad \square $$

### 4.6.2. Proof of Lemma 6

We deduce from Lemma 10,

$$ \sum_{\substack{k \in \mathbb{Z} \\ k \ge L_{\text{wav}} + m2^j}} \beta_{j,k}^2 \le \sum_{k \ge \tilde{k}_{j,\bar{r}_n,\text{right}} - 1} \beta_{j,k}^2 \le \beta_{j,\tilde{k}_{j,\bar{r}_n,\text{right}} - 1}^2 + c_1 \frac{\log n}{n}. $$

Likewise,

$$ \sum_{\substack{k \in \mathbb{Z} \\ k \le -L_{\text{wav}} + m2^j}} \beta_{j,k}^2 \le \beta_{j,\tilde{k}_{j,\bar{r}_n,\text{left}} + 1}^2 + c_2 \frac{\log n}{n}. $$

Cauchy-Schwarz inequality and Lemma 8 lead to $\beta_{j,k}^2 \le f_{j,k} \le c_3(\log n)/n$ when $k \notin \tilde{Z}_{j,\bar{r}_n,-}$. By putting it all together,

$$ \sum_{k \in \mathbb{Z} \setminus \tilde{Z}_{j, \bar{r}_n, -}} \beta_{j,k}^2 \le c_4 \frac{\log n}{n}. \quad (4.33) $$

We also have $\alpha_{J_0,k}^2 \le f_{J_0,k} \le c_5(\log n)/n$ when $k \notin \tilde{Z}_{J_0,\bar{r}_n,-}$. Hence,

$$ \sum_{k \in \mathbb{Z} \setminus \tilde{Z}_{J_0, \bar{r}_n, -}} \alpha_{J_0, k}^2 \le \sum_{2^r \ge c_6 n / (\log n)} 2^{-r} |\{k \in \mathbb{Z}, f_{J_0, k} \ge 2^{-r}\}|. $$

By doing as at the beginning of the proof of Lemma 10,

$$ |\{k \in \mathbb{Z}, f_{J_0,k} \ge 2^{-r}\}| \le c_7 [1 + M 2^{r\theta} 2^{J_0(1-\theta)}]. $$

We deduce,

$$ \sum_{k \in \mathbb{Z} \setminus \tilde{Z}_{J_0, \bar{r}_n, -}} \alpha_{J_0, k}^2 \le c_8 \left[ \frac{\log n}{n} + M \left( \frac{\log n}{n} \right)^{1-\theta} 2^{J_0(1-\theta)} \right]. $$
Section 7 in Chapter 2 of [DL93] gives

$$ \Delta_h^q g_\delta(x) = h^{q-1} \int (\Delta_h^1 g_\delta)^{(q-1)} (x + th) M(t) dt, $$

where $M$ is a compactly supported density function on $[0, q-1]$ and bounded by 1. Therefore,

$$ (48) \qquad \Delta_h^q g_\delta(x) = h^{q-1} \int [g_\delta^{(q-1)}(x + (t+1)h) - g_\delta^{(q-1)}(x+th)] M(t) dt. $$

We consider $k \in \{0, \dots, r\}$ and the map $\zeta_{k,\delta_k}$ defined for $x \ge 0$ by

$$ \zeta_{k,\delta_k}(x) = [1 + \varepsilon\zeta_{\delta_k}((x-x_k)/\ell_k)] 1_{[x_k, x_{k+1})}(x). $$

When $x < 0$, we rather set $\zeta_{k,\delta_k}(x) = \zeta_{k,\delta_k}(|x|)$. It is $q-1$ times differentiable at all points except $-x_{k+1}, -x_k, x_k, x_{k+1}$. We nevertheless set

$$ \begin{aligned} \zeta_{k,\delta_k}^{(q-1)}(-x_{k+1}) &= \zeta_{k,\delta_k}^{(q-1)}(-x_k) \\ &= \zeta_{k,\delta_k}^{(q-1)}(x_k) \\ &= \zeta_{k,\delta_k}^{(q-1)}(x_{k+1}) \\ &= 0 \end{aligned} $$

so that

$$ (49) \qquad g_{\delta}^{(q-1)}(x) = \frac{1}{1+\varepsilon} \sum_{k=0}^{r} b_k \zeta_{k,\delta_k}^{(q-1)}(x) $$

holds true on $\mathbb{R}$.

Define now

$$ \bar{\alpha} = \alpha - (q-1) \in [0, 1). $$

Since $\zeta_{\delta_k}^{(q-1)}$ is compactly supported with a continuous derivative on $\mathbb{R}$,

$$ |\zeta_{\delta_k}^{(q-1)}(b) - \zeta_{\delta_k}^{(q-1)}(a)| \le c_1 |b-a|^{\bar{\alpha}} $$

for all $a, b \in \mathbb{R}$, $\delta_k \in \{0, 1\}$, and some $c_1$ only depending on $\zeta_0, \zeta_1, \alpha, q$. Therefore, for all $a, b \ge 0$,

$$ (50) \qquad |\zeta_{k,\delta_k}^{(q-1)}(b) - \zeta_{k,\delta_k}^{(q-1)}(a)| \le c_1 \varepsilon \ell_k^{-\alpha} |b-a|^{\bar{\alpha}}. $$

The same result holds true when $a, b \le 0$. Suppose now that $a, b$ have opposite signs, say $a \ge 0$ and $b \le 0$. Then, $\zeta_{k,\delta_k}^{(q-1)}(b) = 0$ if $|b| \le x_k$. Otherwise, we use $\zeta_{k,\delta_k}^{(q-1)}(x_k) = 0$ to get

$$ \begin{aligned} |\zeta_{k,\delta_k}^{(q-1)}(b)| &= |\zeta_{k,\delta_k}^{(q-1)}(|b|) - \zeta_{k,\delta_k}^{(q-1)}(x_k)| \\ &\le c_1 \varepsilon \ell_k^{-\alpha} (|b| - x_k)^{\bar{\alpha}} \\ &\le c_1 \varepsilon \ell_k^{-\alpha} (|b| + a)^{\bar{\alpha}} \\ &\le c_1 \varepsilon \ell_k^{-\alpha} |b-a|^{\bar{\alpha}}. \end{aligned} $$

A similar reasoning applies to $|\zeta_{k,\delta_k}^{(q-1)}(a)|$. To sum up, (50) holds true for all $a, b \in \mathbb{R}$ (to within a multiplication of $c_1$ by 2).
The upper-bound on $T$ follows from this inequality and (4.33).

It then remains to bound $A$ from above. The proof of Lemma 2 ensures that there are some $q_1 > 0$, $q_2 > 1$, such that $\|f\|_{q_2} \le c_9 R^{q_1}$ for some $c_9$ only depending on the wavelet basis, $\alpha, p$. Hence,

$$f_{j,k} \le c_{10} R^{q_1} 2^{-j(1-1/q_2)}.$$

Let

$$
\begin{align*}
\bar{Z}_{j,r} &= \{k \in \mathbb{Z}, 2^{-r} < f_{j,k} \le 2^{-r+1}\}, \\
\bar{Z}_{j,r,+} &= \{k \in \mathbb{Z}, f_{j,k} \le 2^{-r+1}\}, \\
\bar{Z}_{j,r,+,\text{right}} &= \{k \in \mathbb{Z} \cap [L_{\text{wav}} + m2^j, +\infty), f_{j,k} \le 2^{-r+1}\}, \\
\bar{Z}_{j,r,+,\text{left}} &= \{k \in \mathbb{Z} \cap (-\infty, -L_{\text{wav}} + m2^j], f_{j,k} \le 2^{-r+1}\},
\end{align*}
$$

and

$$
\begin{align*}
\bar{k}_{j,r,\text{right}} &= \min \bar{Z}_{j,r,+}, \text{right} + 1 \\
\bar{k}_{j,r,\text{left}} &= \max \bar{Z}_{j,r,+}, \text{left} - 1.
\end{align*}
$$

We have,

$$
\begin{align*}
A &\le \sum_{j=J_1+1}^{\infty} \sum_{2^r \ge c_{11} R^{-q_1}} \sum_{2^{j(1-1/q_2)} \le k \in \bar{Z}_{j,r}} \beta_{j,k}^2 \\
&\le \sum_{j=J_1+1}^{\infty} \sum_{2^r \ge c_{11} R^{-q_1}} \sum_{k \in [-L_{\text{wav}}+m2^j, L_{\text{wav}}+m2^j] \cap \bar{Z}_{j,r}} f_{j,k} \\
&\quad + \sum_{j=J_1+1}^{\infty} \sum_{2^r \ge c_{11} R^{-q_1}} \sum_{\substack{k \ge \bar{k}_{j,r,\text{right}} \\ \text{or } k \le \bar{k}_{j,r,\text{left}}}} \left[ f_{j,\bar{k}_{j,r,\text{right}}} - 1 + f_{j,\bar{k}_{j,r,\text{left}}} + 1 + \sum_{\substack{k \ge \bar{k}_{j,r,\text{right}} \\ \text{or } k \le \bar{k}_{j,r,\text{left}}}} \beta_{j,k}^2 \right] \\
&\le c_{12} \sum_{j=J_1+1}^{\infty} \sum_{2^r \ge c_{11} R^{-q_1}} 2^{-r} \\
&\le c_{13} R^{q_1} 2^{-J_1(1-1/q_2)}. \quad \square
\end{align*}
$$

### 4.6.3. Proof of Lemma 7

The proof of (4.12) simply ensues from (4.32). As to (4.13), we do the same reasoning as in the proof of Lemma 3. In short, for all $p \ge 2$,

$$\sum_{k \in \tilde{Z}_{j,r}} \beta_{j,k}^2 \le c_2 R^2 2^{-2j(\alpha+1/2-1/p)} |\tilde{Z}_{j,r}|^{1-2/p}.$$
Consider now $x \in \mathbb{R}$, $h > 0$ and $t \in [0, q - 1]$. There can only be one non-zero term in the sum of (49). Therefore,

$$ egin{aligned} \left| g_{\delta}^{(q-1)}(x + (t+1)h) - g_{\delta}^{(q-1)}(x + th) \right| & \le 2c_1 b_0 \varepsilon \sup_{k \ge 0} \{(1+\varepsilon)^{-k-1} \ell_k^{-\alpha}\} h^{\bar{\alpha}}. \\ & \le 2c_1 b_0 \varepsilon \ell_0^{-\alpha} h^{\bar{\alpha}}. \end{aligned} $$

We deduce from (48) that $|\Delta_h^q g_\delta(x)|$ satisfies

$$ |\Delta_h^q g_\delta(x)| \le c_2 b_0 \varepsilon \ell_0^{-\alpha} h^{\alpha}. $$

Yet, $\Delta_h^q g_\delta(\cdot)$ is compactly supported on $[-x_{r+1} - qh, x_{r+1}]$. Observe that

$$ egin{aligned} x_{r+1} & \le x_0 + \sum_{j=0}^{r} \ell_j \\ & \le r\ell_0 + \ell_0 \sum_{j=0}^{r} (1+\varepsilon)^{2j} \\ & \le c_3 r\ell_0. \end{aligned} $$

We hence get when $h \le r\ell_0$,

$$ egin{aligned} \int_{-\infty}^{\infty} |\Delta_h^q g_\delta(x)|^p dx & \le c_4 r\ell_0 (b_0 \varepsilon \ell_0^{-\alpha} h^\alpha)^p \\ & \le c_5 R^p h^{\alpha p}, \end{aligned} $$

where the last inequality relies on (45). When $h \ge r\ell_0$, we bound the $L^p$ (quasi) norm of $|\Delta_h^q g_\delta(\cdot)|$ as follows:

$$ egin{aligned} \int_{-\infty}^{\infty} |\Delta_h^q g_\delta(x)|^p dx & \le c_6 \int_{-\infty}^{\infty} |g_\delta(x)|^p dx \\ & \le c_7 \left[ b_0^p x_0 + \sum_{k=0}^{r} b_k^p \ell_k \right] \\ & \le c_7 \left[ b_0^p r \ell_0 + b_0^p \ell_0 \sum_{k=0}^{r} (1+\varepsilon)^{(2-p)k} \right] \\ & \le c_8 b_0^p r \ell_0. \end{aligned} $$

We apply (45):

$$ \int_{-\infty}^{\infty} |\Delta_h^q g_\delta(x)|^p dx \le c_9 R^p r^p \ell_0^{\alpha p}. $$

Since $\alpha > 1$, $r^p \le r^{\alpha p}$ and the right-hand side of the last inequality is not larger than $c_9 R^p h^{\alpha p}$.

We may also use (46) in place of (45) to get $\|g_\delta\|_p \le c_{10} R$. The conclusion $g_\delta \in \mathfrak{B}_{p,\infty}^\alpha(c_{11} R)$ then stems from another (equivalent) definition of Besov balls. See Section 10 in Chapter 2 of [DL93] for more details. □

*Proof of Lemma 13.* We introduce for all $p \ge 1$ and $x \in [0, +\infty)$,

$$ f_p(x) = (1 - x^p)^p 1_{[0,1]}(x). $$
We then use (4.32). The same goes for (4.14): we set

$$K_{j,r} = \{ k \in \tilde{\mathbb{Z}}_{j,r,-} | |\beta_{j,k}| \geq 1/\sqrt{n} \}.$$

As $\sqrt{f}$ is smooth, we have:

$$|K_{j,r}| \leq c_3 n^{p/2} R^p 2^{-jp(\alpha+1/2-1/p)}.$$

A suitable inequality in weak spaces – see (35) of [Sar23] – leads to

$$\sum_{k \in \tilde{\mathbb{Z}}_{j,r,-} \setminus K_{j,r}} \beta_{j,k}^2 \leq c_4 n^{-(1-p/2)} R^p 2^{-jp(\alpha+1/2-1/p)}.$$

We deduce,

$$\begin{aligned} U_{j,r,-} &\leq c_5 n^{p/2-1} R^p 2^{-jp(\alpha+1/2-1/p)} \log_+ \left( |\tilde{\mathbb{Z}}_{j,r,-}| n^{-p/2} R^{-p} 2^{jp(\alpha+1/2-1/p)} \right) \\ &\leq c_6 n^{p/2-1} R^p 2^{-jp(\alpha+1/2-1/p)} \log_+ \left( M R^{-p} 2^{r\theta} n^{-p/2} 2^{jp(\alpha+1/2-\theta/p)} \right), \end{aligned}$$

thanks to (4.32).

We now show (4.11). We introduce the integers $\tilde{k}_{j,r,\text{right}}$ and $\tilde{k}_{j,r,\text{left}}$ appearing in Lemma 10. We then set

$$K_{j,r}^{(1)} = \{ k \in \tilde{\mathbb{Z}}_{j,r}, k < \tilde{k}_{j,r,\text{right}} \text{ or } |\beta_{j,k}| \geq 1/\sqrt{n} \}$$

$$K_{j,r}^{(2)} = \{ k \in \tilde{\mathbb{Z}}_{j,r}, k > \tilde{k}_{j,r,\text{left}} \text{ or } |\beta_{j,k}| \geq 1/\sqrt{n} \}$$

and

$$K_{j,r} = K_{j,r}^{(1)} \cap K_{j,r}^{(2)}.$$

Now,

$$\begin{aligned} \sum_{k \in \tilde{\mathbb{Z}}_{j,r} \setminus K_{j,r}} \beta_{j,k}^2 &\leq \frac{1}{\sqrt{n}} \left[ \sum_{k \geq \tilde{k}_{j,r,\text{right}}} |\beta_{j,k}| + \sum_{k \leq \tilde{k}_{j,r,\text{left}}} |\beta_{j,k}| \right] \\ &\leq \frac{c_7}{\sqrt{n}} 2^{-r/2}. \end{aligned}$$

Moreover,

$$|K_{j,r}| \leq \left| \left\{ k \in \tilde{\mathbb{Z}}_{j,r}, k \in [\tilde{k}_{j,r,\text{left}}, \tilde{k}_{j,r,\text{right}}] \right\} \right| + \sqrt{n} \left[ \sum_{k \geq \tilde{k}_{j,r,\text{right}}} |\beta_{j,k}| + \sum_{k \leq \tilde{k}_{j,r,\text{left}}} |\beta_{j,k}| \right].$$

The elements in the first set are either equal to $\tilde{k}_{j,r,\text{left}}$, $\tilde{k}_{j,r,\text{right}}$, $\tilde{k}_{j,r,\text{left}}+1$, $\tilde{k}_{j,r,\text{right}}-1$ or in $[-L_{\text{wav}} + m2^j, L_{\text{wav}} + m2^j]$. Hence, using Lemma 10,

$$\begin{aligned} |K_{j,r}| &\leq c_8 [1 + \sqrt{n} 2^{-r/2}] \\ &\leq c_9 \sqrt{n} 2^{-r/2}. \end{aligned}$$

We then deduce (4.11) from (4.32). □

<figure><img src="image_6.png" /></figure>
This map is non-increasing on $[0, 1]$, $p-1$ times differentiable, and such that $f_p(0) = 1$, $f_p(1) = 0$, $f_p^{(s)}(0) = f_p^{(s)}(1) = 0$ for all $s \in \{1, \dots, p-1\}$. It fulfils the assumptions of Lemma 12 when $p \ge q+2$. We define the first function $\zeta_0$ by $\zeta_0 = f_{q+3}$.

We then consider $t \in [0, 1]$ and set

$$ \zeta_1 = tf_{q+2} + (1-t)f_{q+4}. $$

Since $f_{q+2}(x) \le f_{q+3}(x) \le f_{q+4}(x)$ for all $x$, the integral of $\zeta_1$ evolves continuously from $\int f_{q+2}$ to $\int f_{q+4}$ as $t$ varies from 0 to 1. There is therefore some $t \in [0, 1]$ such that (47) holds true.

We conclude by noticing that $\zeta_1$ satisfies the assumptions of Lemma 12 and cannot coincide almost everywhere with $\zeta_0$ because they are polynomials of different degrees on $[0, 1]$. $\square$

## REFERENCES

[BBS17] Yannick Baraud, Lucien Birgé, and Mathieu Sart. A new method for estimation and model selection: $\rho$-estimation. *Inventiones mathematicae*, 207(2):425–517, 2017.

[BC21] Elodie Brunel and Fabienne Comte. Hazard regression with noncompactly supported bases. *Canadian Journal of Statistics*, 49(4):1273–1297, 2021.

[Bir06a] Lucien Birgé. Model selection via testing: an alternative to (penalized) maximum likelihood estimators. *Annales de l'IHP Probabilités et statistiques*, 42(3):273–325, 2006.

[Bir06b] Lucien Birgé. Statistical estimation with model selection. *Indagationes Mathematicae*, 17(4):497–537, 2006.

[BM98] Lucien Birgé and Pascal Massart. Minimum contrast estimators on sieves: exponential bounds and rates of convergence. *Bernoulli*, 4(3):329–375, 1998.

[CDF92] Albert Cohen, Ingrid Daubechies, and J-C Feauveau. Biorthogonal bases of compactly supported wavelets. *Communications on pure and applied mathematics*, 45(5):485–560, 1992.

[CGC21] Fabienne Comte and Valentine Genon-Catalot. Drift estimation on non compact support for diffusion models. *Stochastic Processes and their Applications*, 134:174–207, 2021.

[CL20] Kaikai Cao and Youming Liu. Uncompactly supported density estimation with $l^1$ risk. *Communications on Pure & Applied Analysis*, 19(8), 2020.

[CL23] Fabienne Comte and Claire Lacour. Non compact estimation of the conditional density from direct or noisy data. *Annales de l'Institut Henri Poincaré. Probabilités et Statistiques (to appear)*, 2023.

[CVNRF15] René Erlin Castillo, Fabio Andrés Vallejo Narvaez, and Julio C. Ramos Fernández. Multiplication and composition operators on weak $l_p$ spaces. *Bulletin of the Malaysian Mathematical Sciences Society*, 38(3):927–973, 2015.

[DJ97] Bernard Delyon and Anatoli Juditsky. On the computation of wavelet coefficients. *Journal of Approximation Theory*, 88(1):47–79, 1997.

[DJKP96] David L Donoho, Iain M Johnstone, Gérard Kerkyacharian, and Dominique Picard. Density estimation by wavelet thresholding. *The Annals of Statistics*, 24(2):508–539, 1996.

[DL93] Ronald A DeVore and George G Lorentz. *Constructive approximation*, volume 303. Springer Berlin, Heidelberg, 1993.
### 4.7. Proof of Theorem 3.3

Since the theorem is stated for $R$ and $M$ large enough, we may without loss of generality replace $R$ by $c_1R$ and $M$ by $c_2M$, where $c_1, c_2$ only depend on $\alpha, p, \theta$ and the wavelet basis. In other words, we only need to build a subset $\mathcal{W}\mathcal{S}'_{p,\theta}^\alpha(R, M)$ of $\mathcal{W}\mathcal{S}_{p,\theta}^\alpha(c_1R, c_2M)$. The densities $f$ in this set may satisfy $\sqrt{f} \in \mathfrak{B}_{p,\infty}^\alpha(c_1R)$ and $\int f^\theta(x) dx \le c_2M$.

Throughout the proof, we consider $r \ge 1$ and denote the elements of $\{0, 1\}^{r+1}$ by $(\delta_k)_{0 \le k \le r}$. We define the Hamming distance $\Delta$ for $\delta, \delta' \in \{0, 1\}^{r+1}$ by

$$ \Delta(\delta, \delta') = \sum_{k=0}^{r} |\delta_k - \delta'_k|. $$

We denote the Kullback Leibler divergence between two densities $f$ and $g$ by

$$ K(f, g) = \int f(x) \log(f(x)/g(x)) dx, $$

whenever it exists. We use it here for densities $f$ and $g$ that vanish only simultaneously (in which case the convention $0 \times \log(0/0) = 0$ is applied).

It is convenient to draw on the Varshamov-Gilbert bound to prove the lower bound. The lemma below is ready to use. It follows from Theorem 2.5 and Lemma 2.9 of [Tsy08] (see also Section E in the third preprint version of [Sar23] for the constants).

**Lemma 11.** Consider $\bar{r} \ge 14$ and suppose $r = 2\bar{r}$. Then, there is a subset $\mathcal{D}$ of $\{0, 1\}^{r+1}$ such that

$$ \sum_{k=0}^{r} \delta_k = \bar{r} $$

for all $\delta \in \mathcal{D}$. Moreover,

$$ \Delta(\delta, \delta') \ge \bar{r}/4, $$

for all pair $(\delta, \delta') \in \mathcal{D}$ composed of distinct elements.

We now assume that there exists a family of densities $\mathcal{F} = \{f_\delta, \delta \in \mathcal{D}\}$ indexed by this set and satisfying

$$ \begin{aligned} h^2(f_\delta, f_{\delta'}) &\ge \eta \Delta(\delta, \delta') \\ K(f_\delta, f_{\delta'}) &\le \frac{5r}{1000n} \end{aligned} \quad (4.34) $$

for some $\eta > 0$ and all $\delta \ne \delta' \in \mathcal{D}$.

Then, there exists a numerical value $c > 0$ such that

$$ \mathcal{R}(\mathcal{F}) \ge c\eta r. $$

We need to construct a suitable family $\mathcal{F}$ of densities satisfying the conditions of the previous lemma. The two results below are tailored to solve this problem. They are proven after the current proof.