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