Generate a local theorem for the rewriting performed by the Axe rewriter.
(solve-gen-axe-rewriter-theorem matrix rewritten-term method-rules names-to-avoid wrld) → (mv event name updated-names-to-avoid)
If solve-gen-solution-axe-rewriter succeeds,
it should be the case that
the matrix of
So here we attempt to generate a local theorem asserting that. Our proof strategy is fairly crude for now: we simply enable the rules passed to the Axe rewriter, hoping that ACL2 can perform the same rewritings. We add these to the current ACL2 theory, just in case we may need some other basic rules. Clearly, this strategy should be refined significantly.
Function:
(defun solve-gen-axe-rewriter-theorem (matrix rewritten-term method-rules names-to-avoid wrld) (declare (xargs :guard (and (pseudo-termp matrix) (pseudo-termp rewritten-term) (symbol-listp method-rules) (symbol-listp names-to-avoid) (plist-worldp wrld)))) (let ((__function__ 'solve-gen-axe-rewriter-theorem)) (declare (ignorable __function__)) (b* (((mv name names-to-avoid) (fresh-logical-name-with-$s-suffix 'axe-rewriting nil names-to-avoid wrld)) (event (cons 'local (cons (cons 'defthmd (cons name (cons (cons 'equal (cons matrix (cons rewritten-term 'nil))) (cons ':hints (cons (cons (cons '"Goal" (cons ':in-theory (cons (cons 'enable method-rules) 'nil))) 'nil) 'nil))))) 'nil)))) (mv event name names-to-avoid))))