nLab rewriting




Given an alphabet of letters and symbols (perhaps ‘typed’, so that certain symbols are declared to be ‘symbols for functions’, etc., e.g. ‘++’ is a symbol for a binary operation), then one can form strings of letters to give words or more generally (well formed) formulae involving symbols of all types.

In a rewriting system, one specifies a set of rules that describe valid replacements of subformulae by other ones. On some formulae of a rewriting system, the rewriting rules may produce conflicts, when two or more rules can be applied.

Example type

One type of example of a rewriting system is given by a group presentation, (X,R)(X,R), where XX is a set of generators for a group GG and RR is a subset of pairs of elements in the free group on XX. As a definite example, take

  • X={a,b}X = \{a,b\}

  • R={(aaa,1),(bb,1),(abab,1)}R = \{(a a a,1),(b b,1),(a b a b,1)\}

(and the group being presented is the symmetric group, S 3S_3 on three symbols). We think of (aaa,1)(a a a,1) as a ‘rewrite rule’: ‘’replace aaaa a a by 1’’, often written aaa1a a a \rightsquigarrow 1 (or just aaa1a a a \to 1).

Working with the presentation, we can then start generating words in the generators, for instance aaababa a a b a b and then see how that word can be ‘rewritten’ using the rewrite rules to babb a b using the first rule and to aaa a using the last. There is thus a potential conflict between these rewritten forms of the word.

It is usual to choose a ‘normal form’ for each word. In the example, in the symmetric group and the above presentation the elements of the group are often listed as 1,a,a 2,b,ab,a 2b1, a, a^2, b, a b, a^2 b. These might be our choice of normal forms for the elements. In other words any element has a unique representative in the form a ib ja^i b^j, and we choose to label them that way. With the two uses of the rules applied to aaababa a a b a b, the first did not gave a normal form, the second did.

In order to transform a rewriting system into a computation algorithm, one needs to apply the rules in a deterministic way, using a reduction strategy. We also need to know that there is a unique normal form that can be found for each word and that the ‘algorithm’ will terminate, that is it really is an algorithm!.

We therefore will need to discuss confluence, normal form, termination and reduction strategies?.


A classical foundational paper is

  • Axel Thue, Probleme über Veränderungen von Zeichenreihen nach gegebenen Regeln., Kristiania Vidensk. Selsk, Skr. (1914), no. 10, 493–524.

A key lemma, often called Newman lemma, is given in the beautiful paper:

For good references on word rewriting see

  • Ronald V. Book, Friedrich Otto, String-rewriting systems, Texts and Monographs in Computer Science, Springer-Verlag, 1993.

and on term rewriting

  • Franz Baader, Tobias Nipkow, Term rewriting and all that, Cambridge University Press, 1998.

  • Terese, Term rewriting systems, Cambridge Tracts in Theoretical Computer Science, vol. 55, Cambridge University Press, 2003.

For the higher dimensional forms of rewriting, one source is in the work of Guiraud and Malbos:

This also includes emerging homotopical theory of computation based on polygraphs (introduced by Albert Burroni) and polygraphic resolutions (introduced by François Métayer):

  • Yves Lafont, Algebra and geometry of rewriting, Applied Categorical Structures August 15:4, 2007, pp 415-437 doi

Again within the context of higher dimensional forms of rewriting, Tibor Beke has given a categorification of certain rewriting procedures of Knuth. This is of relevance here as it contains a strong result on coherence theory:

There is a preprint by Samuel Mimram

An approach via diagrammatic sets is in

with slides (for GeoCat 2020), here.

  • N. Ghani, C. Lüth, Rewriting via coinserters, Nordic Journal of Computing 10 (2003) 290–312 pdf

Last revised on August 5, 2022 at 20:56:59. See the history of this page for a list of all contributions to it.