# Dyadic cubes

In mathematics, the dyadic cubes are a collection of cubes in R$^n$ of different sizes or scales such that the set of cubes of each scale partition R$^n$ and each cube in one scale may be written as a union of cubes of a smaller scale. These are frequently used in mathematics (particularly harmonic analysis) as a way of discretizing objects in order to make computations or analysis easier. For example, to study an arbitrary subset of A of Euclidean space, one may instead replace it by a union of dyadic cubes of a particular size that cover the set. One can consider this set as a pixelized version of the original set, and as smaller cubes are used one gets a clearer image of the set A. Most notable appearances of dyadic cubes include the Whitney extension theorem and the Calderón–Zygmund lemma.

## Dyadic cubes in Euclidean space

In Euclidean space, dyadic cubes may be constructed as follows: for each integer k let Δ$_k$ be the set of cubes in R$^n$ of sidelength 2$^{−k}$ and corners in the set
    $2^{-k}\mathbf {Z} ^{n}=\left\{2^{-k}(v_{1},\dots ,v_{n}):v_{j}\in \mathbf {Z} \right\}$
and let Δ be the union of all the Δ$_k$.
The most important features of these cubes are the following:
* For each integer k, Δ$_k$ partitions R$^n$.
* All cubes in Δ$_k$ have the same sidelength, namely 2$^{−k}$.
* If the interiors of two cubes Q and R in Δ have nonempty intersection, then either Q is contained in R or R is contained in Q.
* Each Q in Δ$_k$ may be written as a union of 2$^n$ cubes in Δ$_{k+1}$ with disjoint interiors.
We use the word "partition" somewhat loosely: for although their union is all of R$^n$, the cubes in Δ$_k$ can overlap at their boundaries. These overlaps, however, have zero Lebesgue measure, and so in most applications this slightly weaker form of partition is no hindrance.
It may also seem odd that larger k corresponds to smaller cubes. One can think of k as the degree of magnification. In practice, however, letting Δ$_k$ be the set of cubes of sidelength 2$^k$ or 2$^{−k}$ is a matter of preference or convenience.

## The one-third trick

One disadvantage to dyadic cubes in Euclidean space is that they rely too much on the specific position of the cubes. For example, for the dyadic cubes Δ described above, it is not possible to contain an arbitrary ball inside some Q in Δ (consider, for example, the unit ball centered at zero). Alternatively, there may be such a cube that contains the ball, but the sizes of the ball and cube are very different. Because of this caveat, it is sometimes useful to work with two or more collections of dyadic cubes simultaneously.

### Definition

The following is known as the one-third trick:
Let Δ$_k$ be the dyadic cubes of scale k as above. Define
    $\Delta _{k}^{\alpha }=\{Q+\alpha :Q\in \Delta _{k}\}.$
This is the set of dyadic cubes in Δ$_k$ translated by the vector α. For each such α, let Δ$^α$ be the union of the Δ$_k$$^α$ over k.
* There is a universal constant C > 0 such that for any ball B with radius r < 1/3, there is α in {0,1/3}$^n$ and a cube Q in Δ$^α$ containing B whose diameter is no more than Cr.
* More generally, if B is a ball with any radius r > 0, there is α in {0, 1/3, 4/3, 4$^2$/3, ...}$^n$ and a cube Q in Δ$^α$ containing B whose diameter is no more than Cr.

### An example application

The appeal of the one-third trick is that one can first prove dyadic versions of a theorem and then deduce "non-dyadic" theorems from those. For example, recall the Hardy-Littlewood Maximal function
    $Mf(x)=\sup _{r>0}{\frac {1}{|B(x,r)|}}\int _{B(x,r)}|f(y)|dy$
where f is a locally integrable function and |B(x, r)| denotes the measure of the ball B(x, r). The Hardy–Littlewood maximal inequality states that for an integrable function f,
    $\left|\{x\in \mathbf {R} ^{n}:Mf(x)>\lambda \}\right|\leq {\frac {C_{n}}{\lambda }}\|f\|_{1}$
for λ > 0 where C$_n$ is some constant depending only on dimension.
This theorem is typically proven using the Vitali Covering Lemma. However, one can avoid using this lemma by proving the above inequality first for the dyadic maximal functions
    $M_{\Delta ^{\alpha }}f(x)=\sup _{x\in Q\in \Delta ^{\alpha }}{\frac {1}{|Q|}}\int _{Q}|f(x)|dx.$
The proof is similar to the proof of the original theorem, however the properties of the dyadic cubes rid us of the need to use the Vitali covering lemma. We may then deduce the original inequality by using the one-third trick.

## Dyadic cubes in metric spaces

Analogues of dyadic cubes may be constructed in some metric spaces. In particular, let X be a metric space with metric d that supports a doubling measure μ, that is, a measure such that for x ∈ X and r > 0, one has:
    $\mu (B(x,2r))\leq C\mu (B(x,r))$
where C > 0 is a universal constant independent of the choice of x and r.
If X supports such a measure, then there exist collections of sets Δ$_k$ such that they (and their union Δ) satisfy the following:
* For each integer k, Δ$_k$ partitions X, in the sense that
       $\mu \left(X\backslash \bigcup \nolimits _{Q\in \Delta _{k}}Q\right)=0.$
* All sets Q in Δ$_k$ have roughly the same size. More specifically, each such Q has a center z$_Q$ such that
       $B(z_{Q},c_{1}\delta ^{k})\subseteq Q\subseteq B(z_{Q},c_{2}\delta ^{k})$
    where c$_1$, c$_2$, and δ are positive constants depending only on the doubling constant C of the measure μ and independent of Q.
* Each Q in Δ$_k$ is contained in a unique set R in Δ$_{k−1}$.
* There are constants constant C$_3$, η > 0 depending only on μ such that for all k and t > 0,
       $\mu \left(\left\{x\in Q:d(x,X\backslash Q)\leq t\delta ^{k}\right\}\right)\leq C_{3}t^{\eta }\mu (Q).$
These conditions are very similar to the properties for the usual Euclidean cubes described earlier. The last condition says that the area near the boundary of a "cube" Q in Δ is small, which is a property taken for granted in the Euclidean case although is very important for extending results from harmonic analysis to the metric space setting.