Fixing function for vl-selstep structures.
(vl-selstep-fix x) → new-x
Function:
(defun vl-selstep-fix$inline (x) (declare (xargs :guard (vl-selstep-p x))) (let ((__function__ 'vl-selstep-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((select (vl-select-fix (std::prod-car x))) (type (vl-datatype-fix (std::prod-car (std::prod-cdr x)))) (caveat (std::prod-cdr (std::prod-cdr x)))) (std::prod-cons select (std::prod-cons type caveat))) :exec x)))
Theorem:
(defthm vl-selstep-p-of-vl-selstep-fix (b* ((new-x (vl-selstep-fix$inline x))) (vl-selstep-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-selstep-fix-when-vl-selstep-p (implies (vl-selstep-p x) (equal (vl-selstep-fix x) x)))
Function:
(defun vl-selstep-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-selstep-p acl2::x) (vl-selstep-p acl2::y)))) (equal (vl-selstep-fix acl2::x) (vl-selstep-fix acl2::y)))
Theorem:
(defthm vl-selstep-equiv-is-an-equivalence (and (booleanp (vl-selstep-equiv x y)) (vl-selstep-equiv x x) (implies (vl-selstep-equiv x y) (vl-selstep-equiv y x)) (implies (and (vl-selstep-equiv x y) (vl-selstep-equiv y z)) (vl-selstep-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-selstep-equiv-implies-equal-vl-selstep-fix-1 (implies (vl-selstep-equiv acl2::x x-equiv) (equal (vl-selstep-fix acl2::x) (vl-selstep-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-selstep-fix-under-vl-selstep-equiv (vl-selstep-equiv (vl-selstep-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-selstep-fix-1-forward-to-vl-selstep-equiv (implies (equal (vl-selstep-fix acl2::x) acl2::y) (vl-selstep-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-selstep-fix-2-forward-to-vl-selstep-equiv (implies (equal acl2::x (vl-selstep-fix acl2::y)) (vl-selstep-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-selstep-equiv-of-vl-selstep-fix-1-forward (implies (vl-selstep-equiv (vl-selstep-fix acl2::x) acl2::y) (vl-selstep-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-selstep-equiv-of-vl-selstep-fix-2-forward (implies (vl-selstep-equiv acl2::x (vl-selstep-fix acl2::y)) (vl-selstep-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)