Fixing function for vl-constint structures.
(vl-constint-fix x) → new-x
Function:
(defun vl-constint-fix$inline (x) (declare (xargs :guard (vl-constint-p x))) (let ((__function__ 'vl-constint-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((origwidth (pos-fix (std::prod-car (std::prod-car (cdr x))))) (value (nfix (std::prod-cdr (std::prod-car (cdr x))))) (origtype (vl-exprtype-fix (std::prod-car (std::prod-cdr (cdr x))))) (wasunsized (acl2::bool-fix (std::prod-cdr (std::prod-cdr (cdr x)))))) (let ((value (acl2::loghead (pos-fix origwidth) value))) (hons :vl-constint (std::prod-hons (std::prod-hons origwidth value) (std::prod-hons origtype wasunsized))))) :exec x)))
Theorem:
(defthm vl-constint-p-of-vl-constint-fix (b* ((new-x (vl-constint-fix$inline x))) (vl-constint-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-constint-fix-when-vl-constint-p (implies (vl-constint-p x) (equal (vl-constint-fix x) x)))
Function:
(defun vl-constint-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-constint-p acl2::x) (vl-constint-p acl2::y)))) (equal (vl-constint-fix acl2::x) (vl-constint-fix acl2::y)))
Theorem:
(defthm vl-constint-equiv-is-an-equivalence (and (booleanp (vl-constint-equiv x y)) (vl-constint-equiv x x) (implies (vl-constint-equiv x y) (vl-constint-equiv y x)) (implies (and (vl-constint-equiv x y) (vl-constint-equiv y z)) (vl-constint-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-constint-equiv-implies-equal-vl-constint-fix-1 (implies (vl-constint-equiv acl2::x x-equiv) (equal (vl-constint-fix acl2::x) (vl-constint-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-constint-fix-under-vl-constint-equiv (vl-constint-equiv (vl-constint-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-constint-fix-1-forward-to-vl-constint-equiv (implies (equal (vl-constint-fix acl2::x) acl2::y) (vl-constint-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-constint-fix-2-forward-to-vl-constint-equiv (implies (equal acl2::x (vl-constint-fix acl2::y)) (vl-constint-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-constint-equiv-of-vl-constint-fix-1-forward (implies (vl-constint-equiv (vl-constint-fix acl2::x) acl2::y) (vl-constint-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-constint-equiv-of-vl-constint-fix-2-forward (implies (vl-constint-equiv acl2::x (vl-constint-fix acl2::y)) (vl-constint-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)