The Specificity Rule for Lazy Pattern-Matching in Ambiguous Term Rewrite Systems

Many functional languages based on term rewriting (such as Miranda and ML) allow the programmer to write ambiguous rule systems, with the understanding that rules will be matched against a term in the order in which the rules are written, and that the pattern-matching of a rule against a term proceeds from left to right.