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