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