Fixing function for vl-function-specialization structures.
(vl-function-specialization-fix x) → new-x
Function:
(defun vl-function-specialization-fix$inline (x) (declare (xargs :guard (vl-function-specialization-p x))) (let ((__function__ 'vl-function-specialization-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((function (sv::svex-fix (std::da-nth 0 x))) (body (vl-stmt-fix (std::da-nth 1 x))) (constraints (sv::constraintlist-fix (std::da-nth 2 x))) (successp (std::da-nth 3 x))) (list function body constraints successp)) :exec x)))
Theorem:
(defthm vl-function-specialization-p-of-vl-function-specialization-fix (b* ((new-x (vl-function-specialization-fix$inline x))) (vl-function-specialization-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-function-specialization-fix-when-vl-function-specialization-p (implies (vl-function-specialization-p x) (equal (vl-function-specialization-fix x) x)))
Function:
(defun vl-function-specialization-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-function-specialization-p acl2::x) (vl-function-specialization-p acl2::y)))) (equal (vl-function-specialization-fix acl2::x) (vl-function-specialization-fix acl2::y)))
Theorem:
(defthm vl-function-specialization-equiv-is-an-equivalence (and (booleanp (vl-function-specialization-equiv x y)) (vl-function-specialization-equiv x x) (implies (vl-function-specialization-equiv x y) (vl-function-specialization-equiv y x)) (implies (and (vl-function-specialization-equiv x y) (vl-function-specialization-equiv y z)) (vl-function-specialization-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-function-specialization-equiv-implies-equal-vl-function-specialization-fix-1 (implies (vl-function-specialization-equiv acl2::x x-equiv) (equal (vl-function-specialization-fix acl2::x) (vl-function-specialization-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-function-specialization-fix-under-vl-function-specialization-equiv (vl-function-specialization-equiv (vl-function-specialization-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-function-specialization-fix-1-forward-to-vl-function-specialization-equiv (implies (equal (vl-function-specialization-fix acl2::x) acl2::y) (vl-function-specialization-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-function-specialization-fix-2-forward-to-vl-function-specialization-equiv (implies (equal acl2::x (vl-function-specialization-fix acl2::y)) (vl-function-specialization-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-function-specialization-equiv-of-vl-function-specialization-fix-1-forward (implies (vl-function-specialization-equiv (vl-function-specialization-fix acl2::x) acl2::y) (vl-function-specialization-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-function-specialization-equiv-of-vl-function-specialization-fix-2-forward (implies (vl-function-specialization-equiv acl2::x (vl-function-specialization-fix acl2::y)) (vl-function-specialization-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)