(4vmask-alist-fix x) is an fty alist fixing function that follows the fix-keys strategy.
(4vmask-alist-fix x) → fty::newx
Note that in the execution this is just an inline identity function.
Function:
(defun 4vmask-alist-fix$inline (x) (declare (xargs :guard (4vmask-alist-p x))) (let ((__function__ '4vmask-alist-fix)) (declare (ignorable __function__)) (mbe :logic (if (atom x) nil (if (consp (car x)) (cons (cons (svar-fix (caar x)) (4vmask-fix (cdar x))) (4vmask-alist-fix (cdr x))) (4vmask-alist-fix (cdr x)))) :exec x)))
Theorem:
(defthm 4vmask-alist-p-of-4vmask-alist-fix (b* ((fty::newx (4vmask-alist-fix$inline x))) (4vmask-alist-p fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm 4vmask-alist-fix-when-4vmask-alist-p (implies (4vmask-alist-p x) (equal (4vmask-alist-fix x) x)))
Function:
(defun 4vmask-alist-equiv$inline (x y) (declare (xargs :guard (and (4vmask-alist-p x) (4vmask-alist-p y)))) (equal (4vmask-alist-fix x) (4vmask-alist-fix y)))
Theorem:
(defthm 4vmask-alist-equiv-is-an-equivalence (and (booleanp (4vmask-alist-equiv x y)) (4vmask-alist-equiv x x) (implies (4vmask-alist-equiv x y) (4vmask-alist-equiv y x)) (implies (and (4vmask-alist-equiv x y) (4vmask-alist-equiv y z)) (4vmask-alist-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm 4vmask-alist-equiv-implies-equal-4vmask-alist-fix-1 (implies (4vmask-alist-equiv x x-equiv) (equal (4vmask-alist-fix x) (4vmask-alist-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm 4vmask-alist-fix-under-4vmask-alist-equiv (4vmask-alist-equiv (4vmask-alist-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-4vmask-alist-fix-1-forward-to-4vmask-alist-equiv (implies (equal (4vmask-alist-fix x) y) (4vmask-alist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-4vmask-alist-fix-2-forward-to-4vmask-alist-equiv (implies (equal x (4vmask-alist-fix y)) (4vmask-alist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm 4vmask-alist-equiv-of-4vmask-alist-fix-1-forward (implies (4vmask-alist-equiv (4vmask-alist-fix x) y) (4vmask-alist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm 4vmask-alist-equiv-of-4vmask-alist-fix-2-forward (implies (4vmask-alist-equiv x (4vmask-alist-fix y)) (4vmask-alist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm cons-of-svar-fix-k-under-4vmask-alist-equiv (4vmask-alist-equiv (cons (cons (svar-fix acl2::k) acl2::v) x) (cons (cons acl2::k acl2::v) x)))
Theorem:
(defthm cons-svar-equiv-congruence-on-k-under-4vmask-alist-equiv (implies (svar-equiv acl2::k k-equiv) (4vmask-alist-equiv (cons (cons acl2::k acl2::v) x) (cons (cons k-equiv acl2::v) x))) :rule-classes :congruence)
Theorem:
(defthm cons-of-4vmask-fix-v-under-4vmask-alist-equiv (4vmask-alist-equiv (cons (cons acl2::k (4vmask-fix acl2::v)) x) (cons (cons acl2::k acl2::v) x)))
Theorem:
(defthm cons-4vmask-equiv-congruence-on-v-under-4vmask-alist-equiv (implies (4vmask-equiv acl2::v v-equiv) (4vmask-alist-equiv (cons (cons acl2::k acl2::v) x) (cons (cons acl2::k v-equiv) x))) :rule-classes :congruence)
Theorem:
(defthm cons-of-4vmask-alist-fix-y-under-4vmask-alist-equiv (4vmask-alist-equiv (cons x (4vmask-alist-fix y)) (cons x y)))
Theorem:
(defthm cons-4vmask-alist-equiv-congruence-on-y-under-4vmask-alist-equiv (implies (4vmask-alist-equiv y y-equiv) (4vmask-alist-equiv (cons x y) (cons x y-equiv))) :rule-classes :congruence)
Theorem:
(defthm 4vmask-alist-fix-of-acons (equal (4vmask-alist-fix (cons (cons acl2::a acl2::b) x)) (cons (cons (svar-fix acl2::a) (4vmask-fix acl2::b)) (4vmask-alist-fix x))))
Theorem:
(defthm 4vmask-alist-fix-of-append (equal (4vmask-alist-fix (append std::a std::b)) (append (4vmask-alist-fix std::a) (4vmask-alist-fix std::b))))
Theorem:
(defthm consp-car-of-4vmask-alist-fix (equal (consp (car (4vmask-alist-fix x))) (consp (4vmask-alist-fix x))))