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