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