Fixing function for ctrex-rule structures.
(ctrex-rule-fix x) → new-x
Function:
(defun ctrex-rule-fix$inline (x) (declare (xargs :guard (ctrex-rule-p x))) (let ((__function__ 'ctrex-rule-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((name (acl2::symbol-fix (std::prod-car (std::prod-car (std::prod-car x))))) (assigned-var (pseudo-var-fix (std::prod-cdr (std::prod-car (std::prod-car x))))) (assign (pseudo-term-fix (std::prod-car (std::prod-cdr (std::prod-car x))))) (match (pseudo-term-subst-fix (std::prod-cdr (std::prod-cdr (std::prod-car x))))) (match-conds (pseudo-term-subst-fix (std::prod-car (std::prod-car (std::prod-cdr x))))) (assign-cond (pseudo-term-fix (std::prod-cdr (std::prod-car (std::prod-cdr x))))) (hyp (pseudo-term-fix (std::prod-car (std::prod-cdr (std::prod-cdr x))))) (equiv (pseudo-fnsym-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-cdr x)))))) (ruletype (ctrex-ruletype-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-cdr x))))))) (std::prod-cons (std::prod-cons (std::prod-cons name assigned-var) (std::prod-cons assign match)) (std::prod-cons (std::prod-cons match-conds assign-cond) (std::prod-cons hyp (std::prod-cons equiv ruletype))))) :exec x)))
Theorem:
(defthm ctrex-rule-p-of-ctrex-rule-fix (b* ((new-x (ctrex-rule-fix$inline x))) (ctrex-rule-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm ctrex-rule-fix-when-ctrex-rule-p (implies (ctrex-rule-p x) (equal (ctrex-rule-fix x) x)))
Function:
(defun ctrex-rule-equiv$inline (x y) (declare (xargs :guard (and (ctrex-rule-p x) (ctrex-rule-p y)))) (equal (ctrex-rule-fix x) (ctrex-rule-fix y)))
Theorem:
(defthm ctrex-rule-equiv-is-an-equivalence (and (booleanp (ctrex-rule-equiv x y)) (ctrex-rule-equiv x x) (implies (ctrex-rule-equiv x y) (ctrex-rule-equiv y x)) (implies (and (ctrex-rule-equiv x y) (ctrex-rule-equiv y z)) (ctrex-rule-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm ctrex-rule-equiv-implies-equal-ctrex-rule-fix-1 (implies (ctrex-rule-equiv x x-equiv) (equal (ctrex-rule-fix x) (ctrex-rule-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm ctrex-rule-fix-under-ctrex-rule-equiv (ctrex-rule-equiv (ctrex-rule-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-ctrex-rule-fix-1-forward-to-ctrex-rule-equiv (implies (equal (ctrex-rule-fix x) y) (ctrex-rule-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-ctrex-rule-fix-2-forward-to-ctrex-rule-equiv (implies (equal x (ctrex-rule-fix y)) (ctrex-rule-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm ctrex-rule-equiv-of-ctrex-rule-fix-1-forward (implies (ctrex-rule-equiv (ctrex-rule-fix x) y) (ctrex-rule-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm ctrex-rule-equiv-of-ctrex-rule-fix-2-forward (implies (ctrex-rule-equiv x (ctrex-rule-fix y)) (ctrex-rule-equiv x y)) :rule-classes :forward-chaining)