HOME

TheInfoList



OR:

A critical pair arises in a
term rewriting system In mathematics, computer science, and logic, rewriting covers a wide range of methods of replacing subterms of a formula with other terms. Such methods may be achieved by rewriting systems (also known as rewrite systems, rewrite engines, or reduc ...
when two rewrite rules overlap to yield two different terms. In more detail, (''t''1, ''t''2) is a critical pair if there is a term ''t'' for which two different applications of a rewrite rule (either the same rule applied differently, or two different rules) yield the terms ''t''1 and ''t''2.


Definitions

The actual definition of a critical pair is slightly more involved as it excludes pairs that can be obtained from critical pairs by substitution and orients the pair based on the overlap. Specifically, for a pair of overlapping rules \rho_0 : l_0 \to r_0 and \rho_1 : l_1 \to r_1, with the overlap being that l_0 = D /math> for some non-empty
context In semiotics, linguistics, sociology and anthropology, context refers to those objects or entities which surround a ''focal event'', in these disciplines typically a communicative event, of some kind. Context is "a frame that surrounds the event ...
D ;/math>, and the term s (that is not a variable) matches l_1 under some substitutions s \sigma = l_1 \tau that are most general, the critical pair is (D \sigma _1 \tau r_0 \sigma). When both sides of the critical pair can reduce to the same term, the critical pair is called ''convergent''. Where one side of the critical pair is identical to the other, the critical pair is called ''trivial''.


Examples

For example, in the term rewriting system with rules : the only critical pair is ⟨''g''(''x'',''z''), ''f''(''x'',''z'')⟩. Both of these terms can be derived from the term ''f''(''g''(''x'',''y''),''z'') by applying a single rewrite rule. As another example, consider the term rewriting system with the single rule : By applying this rule in two different ways to the term ''f''(''f''(''x'',''x''),''x''), we see that (''f''(''x'',''x''), ''f''(''x'',''x'')) is a (trivial) critical pair.


Critical pair lemma

Confluence clearly implies convergent critical pairs: if any critical pair ⟨''a'', ''b''⟩ arises, then ''a'' and ''b'' have a common reduct and thus the critical pair is convergent. If the term rewriting system is not confluent, the critical pair may not converge, so critical pairs are potential sources where confluence will fail. The critical pair lemma states that a term rewriting system is weakly (a.k.a. locally) confluent if and only if all critical pairs are convergent. Thus, to find out if a term rewriting system is weakly confluent, it suffices to test all critical pairs and see if they are convergent. This makes it possible to find out algorithmically if a term rewriting system is weakly confluent or not, given that one can algorithmically check if two terms converge.


See also

* Knuth–Bendix completion, an algorithm based on critical pairs to compute a confluent and terminating term rewriting system equivalent to a given one


External links

*


References

{{Reflist *
Franz Baader Franz Baader (15 June 1959, Spalt) is a German computer scientist at Dresden University of Technology. He received his PhD in Computer Science in 1989 from the University of Erlangen-Nuremberg, Germany, where he was a teaching and research assi ...
and
Tobias Nipkow Tobias Nipkow (born 1958) is a German computer scientist. Career Nipkow received his Diplom (MSc) in computer science from the Department of Computer Science of the Technische Hochschule Darmstadt in 1982, and his Ph.D. from the University of M ...
,
Term Rewriting and All That
', Cambridge University Press, 199
(book weblink)
Rewriting systems