term-rewriting.mws