A general framework for the rigorous computation of invariant densities and the coarse-fine strategy