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