  Let $X$ be a ball Banach function space on $\mathbb{R}^n$. In this article,
under some mild assumptions about both $X$ and the boundedness of the
Hardy--Littlewood maximal operator on both $X$ and the associate space of its
convexification, the authors successfully recover the homogeneous ball Banach
Sobolev semi-norm $\|\,|\nabla f|\,\|_X$ via the functional $$
\sup_{\lambda\in(0,\infty)}\lambda \left\|\left[\int_{\{y\in\mathbb{R}^n:\
|f(\cdot)-f(y)|>\lambda|\cdot-y|^{1+\frac{\gamma}{q}}\}}
\left|\cdot-y\right|^{\gamma-n}\,dy\right]^\frac{1}{q}\right\|_X $$ for any
distributions $f$ with $|\nabla f|\in X$, as well as the corresponding limiting
identities with the limit for $\lambda\to\infty$ when $\gamma\in(0,\infty)$ or
the limit for $\lambda\to0^+$ when $\gamma\in(-\infty,0)$, where
$\gamma\in\mathbb{R}\setminus\{0\}$ and where $q\in(0,\infty)$ is related to
$X$. In particular, some of these results are still new even when $X:=L^p(X)$
with $p\in[1,\infty)$. As applications, the authors obtain some fractional
Sobolev-type and some fractional Gagliardo--Nirenberg-type inequalities in the
setting of $X$. All these results are of quite wide generality and are applied
to various specific function spaces, including Morrey, mixed-norm (or variable
or weighted) Lebesgue, Lorentz, and Orlicz (or Orlicz-slice) spaces, some of
which are new even in all these special cases. The novelty of this article is
to use both the method of the extrapolation and the boundedness of the
Hardy--Littlewood maximal operator on both $X$ and the associate space of its
convexification to overcome the essential difficulties caused by the deficiency
of both the translation and the rotation invariance and an explicit expression
of the norm of $X$.
