Fixing function for vars+modes structures.
(vars+modes-fix x) → new-x
Function:
(defun vars+modes-fix$inline (x) (declare (xargs :guard (vars+modes-p x))) (let ((__function__ 'vars+modes-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((vars (identifier-set-fix (cdr (std::da-nth 0 (cdr x))))) (modes (mode-set-fix (cdr (std::da-nth 1 (cdr x)))))) (cons :vars+modes (list (cons 'vars vars) (cons 'modes modes)))) :exec x)))
Theorem:
(defthm vars+modes-p-of-vars+modes-fix (b* ((new-x (vars+modes-fix$inline x))) (vars+modes-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vars+modes-fix-when-vars+modes-p (implies (vars+modes-p x) (equal (vars+modes-fix x) x)))
Function:
(defun vars+modes-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vars+modes-p acl2::x) (vars+modes-p acl2::y)))) (equal (vars+modes-fix acl2::x) (vars+modes-fix acl2::y)))
Theorem:
(defthm vars+modes-equiv-is-an-equivalence (and (booleanp (vars+modes-equiv x y)) (vars+modes-equiv x x) (implies (vars+modes-equiv x y) (vars+modes-equiv y x)) (implies (and (vars+modes-equiv x y) (vars+modes-equiv y z)) (vars+modes-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vars+modes-equiv-implies-equal-vars+modes-fix-1 (implies (vars+modes-equiv acl2::x x-equiv) (equal (vars+modes-fix acl2::x) (vars+modes-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vars+modes-fix-under-vars+modes-equiv (vars+modes-equiv (vars+modes-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vars+modes-fix-1-forward-to-vars+modes-equiv (implies (equal (vars+modes-fix acl2::x) acl2::y) (vars+modes-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vars+modes-fix-2-forward-to-vars+modes-equiv (implies (equal acl2::x (vars+modes-fix acl2::y)) (vars+modes-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vars+modes-equiv-of-vars+modes-fix-1-forward (implies (vars+modes-equiv (vars+modes-fix acl2::x) acl2::y) (vars+modes-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vars+modes-equiv-of-vars+modes-fix-2-forward (implies (vars+modes-equiv acl2::x (vars+modes-fix acl2::y)) (vars+modes-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)