V. Lifschitz, L. Morgenstern, D. Plaisted 51
system for R modulo E. Note that rules with E-equivalent left-hand sides need not be
kept. The R, E rewrite relation only requires using the equational theory on the chosen
redex s instead of the whole term, to match s with the left-hand side of some rule. Such
E-matching is often (but not always, see [116]) easy enough computationally to make
R, E rewriting much more efficient than R/E rewriting. Unfortunately, →
R/E
has
better logical properties for deciding R ∪ E equivalence. So the theory of equational
rewriting is largely concerned with finding connections between these two rewriting
relations.
Consider the systems R/E and R, E where R is {a ∗ b → d} and E consists of the
associative and commutative axioms for ∗. Suppose s is (a ∗ c) ∗ b and t is c ∗ d. Then
s →
R/E
t since s is E-equivalent to c ∗ (a ∗ b). However, it is not true that s →
R,E
t
since there is no subterm of s that is E-equivalent to a ∗ b. Suppose s is (b ∗ a) ∗ c.
Then s →
R,E
d ∗ c since b ∗ a is E-equivalent to a ∗ b.
Note that if E equivalence classes are nontrivial then it is impossible for class
rewriting to be confluent in the traditional sense (since any term E-equivalent to a
normal form will also be a normal form of a term). So it is necessary to modify the def-
inition to allow E-equivalent normal forms. We want to capture the property that class
rewriting is confluent when considered as a rewrite relation on equivalence classes.
More precisely, R/E is (class) confluent if for any term t,ift →
∗
R/E
u and t →
∗
R/E
v
then there are E-equivalent terms u
and v
such that u →
∗
R/E
u
and v →
∗
R/E
v
.
This implies that R/E is confluent and hence Church–Rosser, considered as a rewrite
relation on E-equivalence classes. If R/E is class confluent and terminating then a
term may have more than one normal form, but all of them will be E-equivalent. Fur-
thermore, if R/E is class confluent and terminating, then any R
=
∪E equivalent terms
can be reduced to E equivalent terms by rewriting. Then an E-equivalence procedure
can be used to decide R
=
∪E equivalence, if there is one. Note that E-equivalent rules
need not both be kept, for this method.
R is said to be Church–Rosser modulo E if any two R
=
∪ E-equivalent terms can
be R, E rewritten to E-equivalent terms. This is not the same as saying that R/E is
Church–Rosser, considered as a rewrite system on E-equivalence classes; in fact, it is
a stronger property. Note that R, E rewriting is a subset of R/E rewriting, so if R/E
is terminating, so is R, E.IfR/E is terminating and R is Church–Rosser modulo
E then R, E rewriting is also terminating and R
=
∪ E-equality is decidable if E-
equality is. Also, the computationally simpler R, E rewriting can be used to decide
the equational theory. But Church–Rosser modulo E is not a local property; in fact
it is undecidable in general. Therefore one desires decidable sufficient conditions for
it. This is the contribution of Jouannaud and Kirchner [130], using confluence and
“coherence”. The idea of coherence is that there should be some similarity in the way
all elements of an E-equivalence class rewrite. Their conditions involve critical pairs
between rules and equations and E-unification procedures.
Another approach is to add new rules to R to obtain a logically equivalent sys-
tem R
/E; that is, R
=
∪ E and R
=
∪ E have the same logical consequences (i.e.,
they are equivalent), but R
,E rewriting is the same as R/E rewriting. Therefore it
is possible to use the computationally simpler R
,E rewriting to decide the equality
theory of R/E. This is done for associative–commutative operators by Peterson and
Stickel [205]. In this case, confluence can be decided by methods simpler than those
of Jouannaud and Kirchner. Termination for equational rewriting systems is tricky to