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