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