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