Newman's lemma

From testwiki
Revision as of 15:12, 1 March 2025 by imported>Jean Abou Samra (Consistency)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In theoretical computer science, specifically in term rewriting, Newman's lemma, also commonly called the diamond lemma, is a criterion to prove that an abstract rewriting system is confluent. It states that local confluence is a sufficient condition for confluence, provided that the system is also terminating. This is useful since local confluence is usually easier to verify than confluence.

The lemma was originally proved by Max Newman in 1942.Template:R A considerably simpler proof (given below) was proposed by Gérard Huet.Template:R A number of other proofs exist.Template:R

Statement and proof

The lemma is purely combinatorial and applies to any relation. Owing to the context where it is commonly applied, it is stated below in the terminology of abstract rewriting systems (this is simply a set whose elements are called terms, equipped with a relation called reduction, and see the corresponding article for definitions of termination, confluence, local confluence and normal forms).

Newman's lemma:Template:R If an abstract rewriting system is terminating and locally confluent, then it is confluent. As a corollary, every term has a unique normal form.

Proof: We prove by well-founded induction on u along that every diagram

Diagram with arrows u→*v,u→*w (arrows are dotted to express that they represent sequences of arbitrarily many reduction steps)
Diagram with arrows u*v,u*w (arrows are dotted to express that they represent sequences of arbitrarily many reduction steps)

can be extended to a diagram

Diagram with arrows u→*v→*t,u→*w→*t
Diagram with arrows u*v*t,u*w*t

where the dotted arrows represent sequences of arbitrarily many reductions by .

If u=v or u=w, this is trivial. Otherwise, we have at least one reduction on each side:

Diagram with arrows u→v0→*v,u→w0→*w

By local confluence, this diagram can be extended to:

Diagram with arrows u→v0→*v,u→w0→*w,v0→*t,w0→*t

then by induction hypothesis on v0:

Diagram with arrows u→v0→*v→*v1,u→w0→*t→*v1,v0→*t,w0→*w

and finally, by induction hypothesis on w0:

Diagram with arrows u→v0→*v→*v1→*w1,u→w0→*t→*v1,v0→*t,w0→*w→*w1

References

Cite error: <ref> tag with name "newman" defined in <references> is not used in prior text.
Cite error: <ref> tag with name "huet" defined in <references> is not used in prior text.
Cite error: <ref> tag with name "klop" defined in <references> is not used in prior text.
Cite error: <ref> tag with name "harrison" defined in <references> is not used in prior text.
Cite error: <ref> tag with name "cohn" defined in <references> is not used in prior text.
Cite error: <ref> tag with name "terese" defined in <references> is not used in prior text.
Cite error: <ref> tag with name "trat" defined in <references> is not used in prior text.
Cite error: <ref> tag with name "van-oostrom" defined in <references> is not used in prior text.