Fixing function for rewrite-config structures.
(rewrite-config-fix x) → new-x
Function:
(defun rewrite-config-fix$inline (x) (declare (xargs :guard (rewrite-config-p x))) (let ((__function__ 'rewrite-config-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((cuts4-config (cuts4-config-fix (cdr (std::da-nth 0 (cdr x))))) (cut-tries-limit (acl2::maybe-natp-fix (cdr (std::da-nth 1 (cdr x))))) (zero-cost-replace (acl2::bool-fix (cdr (std::da-nth 2 (cdr x))))) (evaluation-method (rewrite-eval-method-fix (cdr (std::da-nth 3 (cdr x))))) (gatesimp (gatesimp-fix (cdr (std::da-nth 4 (cdr x)))))) (cons :rewrite-config (list (cons 'cuts4-config cuts4-config) (cons 'cut-tries-limit cut-tries-limit) (cons 'zero-cost-replace zero-cost-replace) (cons 'evaluation-method evaluation-method) (cons 'gatesimp gatesimp)))) :exec x)))
Theorem:
(defthm rewrite-config-p-of-rewrite-config-fix (b* ((new-x (rewrite-config-fix$inline x))) (rewrite-config-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm rewrite-config-fix-when-rewrite-config-p (implies (rewrite-config-p x) (equal (rewrite-config-fix x) x)))
Function:
(defun rewrite-config-equiv$inline (x acl2::y) (declare (xargs :guard (and (rewrite-config-p x) (rewrite-config-p acl2::y)))) (equal (rewrite-config-fix x) (rewrite-config-fix acl2::y)))
Theorem:
(defthm rewrite-config-equiv-is-an-equivalence (and (booleanp (rewrite-config-equiv x y)) (rewrite-config-equiv x x) (implies (rewrite-config-equiv x y) (rewrite-config-equiv y x)) (implies (and (rewrite-config-equiv x y) (rewrite-config-equiv y z)) (rewrite-config-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm rewrite-config-equiv-implies-equal-rewrite-config-fix-1 (implies (rewrite-config-equiv x x-equiv) (equal (rewrite-config-fix x) (rewrite-config-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm rewrite-config-fix-under-rewrite-config-equiv (rewrite-config-equiv (rewrite-config-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-rewrite-config-fix-1-forward-to-rewrite-config-equiv (implies (equal (rewrite-config-fix x) acl2::y) (rewrite-config-equiv x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-rewrite-config-fix-2-forward-to-rewrite-config-equiv (implies (equal x (rewrite-config-fix acl2::y)) (rewrite-config-equiv x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm rewrite-config-equiv-of-rewrite-config-fix-1-forward (implies (rewrite-config-equiv (rewrite-config-fix x) acl2::y) (rewrite-config-equiv x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm rewrite-config-equiv-of-rewrite-config-fix-2-forward (implies (rewrite-config-equiv x (rewrite-config-fix acl2::y)) (rewrite-config-equiv x acl2::y)) :rule-classes :forward-chaining)