(vl-port-fix x) is a fty fixing function.
Note that in the execution this is just an inline identity function.
Function:
(defun vl-port-fix$inline (x) (declare (xargs :guard (vl-port-p x))) (let ((__function__ 'vl-port-fix)) (declare (ignorable __function__)) (mbe :logic (common-lisp::case (tag x) ((:vl-regularport) (vl-regularport-fix x)) (otherwise (vl-interfaceport-fix x))) :exec x)))
Theorem:
(defthm vl-port-p-of-vl-port-fix (b* ((fty::newx (vl-port-fix$inline x))) (vl-port-p fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm vl-port-fix-when-vl-port-p (implies (vl-port-p x) (equal (vl-port-fix x) x)))
Function:
(defun vl-port-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-port-p acl2::x) (vl-port-p acl2::y)))) (equal (vl-port-fix acl2::x) (vl-port-fix acl2::y)))
Theorem:
(defthm vl-port-equiv-is-an-equivalence (and (booleanp (vl-port-equiv x y)) (vl-port-equiv x x) (implies (vl-port-equiv x y) (vl-port-equiv y x)) (implies (and (vl-port-equiv x y) (vl-port-equiv y z)) (vl-port-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-port-equiv-implies-equal-vl-port-fix-1 (implies (vl-port-equiv acl2::x x-equiv) (equal (vl-port-fix acl2::x) (vl-port-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-port-fix-under-vl-port-equiv (vl-port-equiv (vl-port-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-port-fix-1-forward-to-vl-port-equiv (implies (equal (vl-port-fix acl2::x) acl2::y) (vl-port-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-port-fix-2-forward-to-vl-port-equiv (implies (equal acl2::x (vl-port-fix acl2::y)) (vl-port-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-port-equiv-of-vl-port-fix-1-forward (implies (vl-port-equiv (vl-port-fix acl2::x) acl2::y) (vl-port-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-port-equiv-of-vl-port-fix-2-forward (implies (vl-port-equiv acl2::x (vl-port-fix acl2::y)) (vl-port-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm tag-of-vl-port-fix-forward (or (equal (tag (vl-port-fix x)) :vl-regularport) (equal (tag (vl-port-fix x)) :vl-interfaceport)) :rule-classes ((:forward-chaining :trigger-terms ((tag (vl-port-fix x))))))