Muckenhoupt
Ap-properties of distance functions and applications to Hardy-Sobolev -type inequalities
For a metric space with a doubling measure and a closed set $E$, the weight $w(x)=\operatorname{dist}(x,E)^{-\alpha}$ is shown to belong to Muckenhoupt's $A_p$ class ($1\le p<\infty$) precisely when the Assouad codimension of $E$ satisfies a sharp inequality involving $\alpha$ and $p$. Using general $A_p$-weighted embeddings, this characterization yields global Hardy–Sobolev and fractional Hardy–Sobolev inequalities on metric measure spaces.