Notion of fractal dimension which distinguishes point and square from square I am new to fractal dimensions and am looking for a notion of fractal dimension which would help me distinguish between the following two sets on the cartesian plane:
\begin{align}A&=[0,1]\times[0,1] \cup (2,2)\\B&=[0,1]\times[0,1]\end{align}
In other words, I am asking:
Is there some form of a fractal dimension, say $D$, which would give $D(B)=2$, as $B$ is a 2-d square, but $D(A)\not=2$, as $A$ is a 2-d square joined with a 0-d point?
 A: For any point $x$ in any metric space $X$ you can consider the "local dimension at $x$ with radius $r$," namely the Hausdorff dimension of the closed ball
$$B_r(x) = \{ y \in x : d(x, y) \le r \}$$
of radius $r$ around $x$. If this dimension is constant for all sufficiently small $r$ you can consider the "local dimension at $x$" to be this constant value. Probably a similar definition can be written down for local topological dimensions.
A solid square $[0, 1] \times [0, 1]$ has local dimension $2$ at every point, and the isolated point in $A$ has local dimension $0$. So $A$ and $B$ can be distinguished by the fact that the local dimension of every point in $B$ is $2$, whereas this is not true for $A$.
This seems to me to be more or less the obvious thing to do and I'm surprised this isn't standard. Dimensions are inherently local. In other words, the dimension of a geometric object $X$ is inherently not a number but a function on $X$ given by the local dimension at $x \in X$. It happens that we often consider $X$ such that the local dimension at every point is the same number $d$, in which case it would make sense to say that $X$ has dimension $d$. But this is not true in your case, so I'm suggesting that in your case we instead consider the more refined invariant given by local dimension.
A: Most generic notions of dimension (Hausdorff, box-counting, Assouad, lower, etc.) attempt to assign a single number to a space.  They are, in some sense, defined locally, but they try to capture some global structure.  Examples such as the disjoint union of a square and point suggest that "dimension" is not the right tool for distinguishing or fully describing these spaces.
A better tool might be the "local dimension," discussed in [1] (I don't have a precise reference of the top of my head, and most of my books are still in boxes—I think that the discussion of local dimensions is in chapter 17 of the third edition).
$\DeclareMathOperator{\locu}{\overline{\dim}_{\text{loc}}}$
$\DeclareMathOperator{\locl}{\underline{\dim}_{\text{loc}}}$
$\DeclareMathOperator{\loc}{\dim_{\text{loc}}}$

Definition.  Let $(X,d,\mu)$ be a metric measure space (i.e. a space with underlying set $X$, metric $d$, and measure $\mu$).  The lower local dimension of $\mu$ at a point $x$ is
$$\locl \mu(x) := \liminf_{r\downarrow 0} \frac{\log(\mu(B(x,r)))}{\log(r)},$$
and the upper local dimension of $\mu$ at a point $x$ is
$$\locu \mu(x) := \limsup_{r\downarrow 0} \frac{\log(\mu(B(x,r)))}{\log(r)}.$$
If these two limits coincide, then the local dimension of $\mu$ at $x$ is the common value, denoted $\loc \mu(x)$.

Very roughly speaking, the local dimension of a measure at a point tells us how balls scale around that point—the local dimension "sees" the scaling exponent about a point.  For the spaces we are considering, these limits coincide (or fail to exist in the same way), so I'm going to go ahead and work with the local dimension, and not worry about the upper and lower dimension.
As an example, in $\mathbb{R}^2$ with the usual two dimensional Lebesgue measure $\lambda^2$, the measure of a ball of radius $r$ is $\pi r^2$.  Hence
$$ \loc \lambda^2(x)
= \lim_{r \downarrow 0} \frac{\log(\lambda^2(B(x,r)))}{\log(r)}
= \lim_{r \downarrow 0} \frac{\log( \pi r^2 ) }{ \log(r) }
= \lim_{r \downarrow 0} \frac{2 \log(r) + \log(\pi) }{ \log(r) }
= 2. \tag{*}$$
There are various tools which can be used to analyze the local dimension(s) of a space, but for our purposes, the image of the function $x \mapsto \loc\mu(x)$ ought to be sufficient.
Now... take
\begin{align}
A &= [0,1]^2 \cup \{(2,2)\} \\
B &= [0,1]^2,
\end{align}
each with the subspace metric, and the two dimensional Lebesgue measure restricted to the space (denoted by $\mu_A$ and $\mu_B$).  For any point $x \in [0,1]^2$, the local dimension of the measure is given by
$$ \loc \mu_A(x) = \loc \mu_B(x) = 2. $$
Note that the computation is identical that in (*) for any interior point (with $r$ sufficiently small), and similar for boundary and "corner" points (the $\pi$ is replaced with $\pi/2$ or $\pi/4$.
On the other hand, for the point $(2,2)$, the local dimension is a slightly more wily beast.  The two dimensional Lebesgue measure of an isolated point is $0$, thus for any sufficiently small $r$, we have $$\mu_A\bigl( A \cap B((2,2), r)\bigr) = 0.$$  In this context, it is (perhaps) reasonable to define $\log(0) = -\infty$.  With respect to this convention,
$$\loc \mu_A((2,2)) = \lim_{r \downarrow 0} \frac{\log( 0 )}{ \log(r) } = -\infty. $$
It is, therefore, reasonable to conclude that
$$ \loc \mu_A(A) = \{2,-\infty\}, \qquad\text{and}\qquad
\loc \mu_B(B) = \{2\}. $$
It is, perhaps, worth noting that this computation indicates that an isolated point in this space is not zero dimensional, but is, instead "negative infinite dimensional".  This is an entirely reasonable interpretation, and has to do with the fact that points are null sets for the Lebesgue measure.  You might consider what would happen if you gave the point counting measure (so that $\mu_A((2,2)) = 1$).
Another (related) approach might be to massage the theory of the complex dimensions of a relative fractal drum (RFD), introduced by Lapidus and collaborators, and described in some detail in chapter 5 of [2].  I am not going to get into this in too much detail here, as it takes a little work to develop the right tools, but I will note that the theory of RFDs gives us much better language for talking about spaces which have "negative" dimension (including negative infinite dimension).

[1] Falconer, Kenneth, Fractal geometry. Mathematical foundations and applications, Hoboken, NJ: John Wiley & Sons (ISBN 978-1-119-94239-9/hbk). xxx, 368 p. (2014). ZBL1285.28011.
[2] Lapidus, Michel L.; van Frankenhuijsen, Machiel, Fractal geometry, complex dimensions and zeta functions. Geometry and spectra of fractal strings, Springer Monographs in Mathematics. New York, NY: Springer (ISBN 978-1-4614-2175-7/hbk; 978-1-4614-2176-4/ebook). xxvi, 567 p. (2013). ZBL1261.28011.
