Rewrite Rules are Generated from DEFTHM Events
By reading the documentation of defthm
(defthm associativity-of-app (equal (app (app a b) c) (app a (app b c))))
we not only command the system to prove that
* we commanded it to use that fact as a rewrite rule.
That means that every time the system encounters a term of the form
(app (app x y) z)
it will replace it with
(app x (app y z))!