# Documentation

rewrite :: Eq a => [([a], [a])] -> [a] -> [a]Source

Given a list of rewrite rules of the form (left,right), and a word, rewrite it by repeatedly replacing any left substring in the word by the corresponding right

knuthBendix :: Ord a => [([a], [a])] -> [([a], [a])]Source

Implementation of the Knuth-Bendix algorithm. Given a list of relations, return a confluent rewrite system. The algorithm is not guaranteed to terminate.

nfs :: Ord a => ([a], [([a], [a])]) -> [[a]]Source

Given generators and a confluent rewrite system, return (normal forms of) all elements