Math 2.0

Computer science Definition

Knuth–Bendix completion

Builds on Term rewriting for equational theoriesRewriting systemConfluenceNewman's lemmaWell-founded relation

Definition

Let TT be the set of terms over a signature and a set of variables. Let EE be a finite set of equations s≈ts \approx t between terms. Let >> be a reduction order on TT, that is, a strict order with these properties. It is well-founded, and s>ts > t implies C[s]>C[t]C[s] > C[t] for every context CC and σ(s)>σ(t)\sigma(s) > \sigma(t) for every substitution σ\sigma. Let l1→r1l_1 \to r_1 and l2→r2l_2 \to r_2 be rules with disjoint variables. Let pp be a position of l1l_1 where the subterm l1∣pl_1|_p is not a variable and has a most general unifier σ\sigma with l2l_2. Then the pair (σ(r1),σ(l1)[σ(r2)]p)(\sigma(r_1), \sigma(l_1)[\sigma(r_2)]_p) is a critical pair. The Knuth–Bendix completion procedure, with input EE and >>, maintains a set RR of rules of a term rewriting system:

  1. To orient an equation s≈ts \approx t with s≠ts \ne t: add s→ts \to t to RR if s>ts > t, add t→st \to s if t>st > s, and stop with failure otherwise.
  2. Start with R=∅R = \emptyset and orient every equation of EE.
  3. For each critical pair (s,t)(s, t) of rules of RR, compute normal forms s′s' of ss and t′t' of tt with respect to RR. If s′≠t′s' \ne t', orient s′≈t′s' \approx t'.
  4. Repeat step 3 until every critical pair of RR has equal normal forms, and then stop with output RR.

Remarks

If the procedure stops with output RR, then RR is terminating, since l>rl > r for every rule, and confluent. Indeed, a terminating term rewriting system whose critical pairs are joinable is locally confluent, and Newman's lemma gives confluence. Moreover s≈ts \approx t follows from EE if and only if ss and tt have the same normal form with respect to RR. Example: for the group axioms e⋅x≈xe \cdot x \approx x, x−1⋅x≈ex^{-1} \cdot x \approx e, (x⋅y)⋅z≈x⋅(y⋅z)(x \cdot y) \cdot z \approx x \cdot (y \cdot z) and a suitable reduction order, completion stops with ten rules, among them x⋅x−1→ex \cdot x^{-1} \to e, (x−1)−1→x(x^{-1})^{-1} \to x and (x⋅y)−1→y−1⋅x−1(x \cdot y)^{-1} \to y^{-1} \cdot x^{-1}. Non-example: for E={x⋅y≈y⋅x}E = \set{x \cdot y \approx y \cdot x} the procedure fails in step 1 for every reduction order, since x⋅y>y⋅xx \cdot y > y \cdot x would give y⋅x>x⋅yy \cdot x > x \cdot y by the substitution exchanging xx and yy. The procedure can also run forever, adding infinitely many rules. Practical versions also simplify and delete rules during the run.

Reading path

To understand this page from the ground up, read these 6 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Confluence concept
  2. Rewriting system concept
  3. Term rewriting for equational theories concept
  4. Well-founded relation concept
  5. Newman's lemma statement
  6. Knuth–Bendix completion definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Knuth–Bendix_completion_algorithm
About this page
TagMPMMVXXXZS
URIm2://MPMMVXXXZS
Kinddefinition
WritingW0 stub
MSC68Q42, 68V15, 03D03
DefinesKnuth–Bendix completion
UsesTerm rewriting for equational theories, Rewriting system, Confluence, Newman's lemma, Well-founded relation
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.