The algebra of rewriting for presentations of inverse monoids