  We establish the existence of liftings into discrete subspaces of
$\mathbf{H}(\mathrm{div})$ of piecewise polynomial data on locally refined
simplicial partitions of polygonal/polyhedral domains. Our liftings are robust
with respect to the polynomial degree. This result has important applications
in the a posteriori error analysis of parabolic problems, where it permits the
removal of so-called transition conditions that link two consecutive meshes. It
can also be used in a the posteriori error analysis of elliptic problems, where
it allows the treatment of meshes with arbitrary numbers of hanging nodes
between elements. We present a constructive proof based on the a posteriori
error analysis of an auxiliary elliptic problem with $H^{-1}$ source terms,
thereby yielding results of independent interest. In particular, for such
problems, we obtain guaranteed upper bounds on the error along with
polynomial-degree robust local efficiency of the estimators.
