Rewriting laws