This chapter studies the problem of determining whether a TRS is confluent. After a brief look at the (undecidable) decision problem, the rest of the chapter divides neatly into two parts:
The first part deals with terminating systems, for which confluence turns out to be decidable. This is a key result in our search for decidable equational theories: if E constitutes a terminating TRS, we can decide if it is also confluent, in which case we know by Theorem 4.1.1 that ≈E is decidable.
The second part deals with those systems not covered by the first part, namely (potentially) nonterminating ones. The emphasis here is not on deciding ≈E by rewriting, which requires termination, but on the computational content of a TRS. Viewing a TRS as a program, confluence simply means that the program is deterministic. We show that for the class of so-called orthogonal systems, where no two rules interfere with each other, confluence holds irrespective of termination. This result has immediate consequences for the theory and design of functional programming languages.
The decision problem
Just as for termination and most other interesting properties (of term rewriting systems or otherwise), confluence is in general undecidable:
Theorem 6.1.1The following problem is undecidable:
Instance: A finite TRS R.
Question: Is R confluent?
Proof Given a set of identities E such that Var(l) = Var(r) and neither l nor r is a variable for all l ≈ r ∈ E, we can reduce the ground word problem for E to the confluence problem of a related TRS as follows.