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