Polygraphic rewriting