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